Skip to content

SwingbyProtocol/python-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

24 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Swingby SDK for Python

An implementation of the Swingby standard development kit for Python3.

Features:

  • Official implementation
  • Http Client
  • Tustless swaps between ECDSA chains

Instillation

git clone https://github.com/SwingbyProtocol/python-sdk.git"
pip install ./python-sdk

Quickstart

Initiate a HTTP connection to one of our testnet nodes:

from swingby import NodeHttpClient
node = NodeHttpClient("https://testnet-node.swingby.network")

Create a trustless swap deposit

node = NodeHttpClient("https://testnet-node.swingby.network")
addr_to = "tbnb1dedxffvl324ggfdpxl0gw5hwylc848ztuy7g7c"
sr = node.swap(address_to=addr_to, amount="1.1", currency_from="BTC", currency_to="BTC.B")

Query last 5 completed swaps

node = NodeHttpClient("https://testnet-node.swingby.network")
swaps = node.query_swaps(page_size=5, status="COMPLETED")

for more examples on how to retrieve data from a node and interact with the Swingby network, please head to the examples examples/ folder.

Docs

For documentation on our node API, please visit testnet-node.swingby.network/docs.

Useful links

About

๐Ÿ”Œ Python 3.0 SDK for Skybridge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages