0.2.7 • Published 9 months ago

@ultrade/ultrade-js-sdk v0.2.7

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

Ultrade JS SDK

Warning

SDK is under development

Structure of SDK

Three are three classes: AmmClient, TransactionComposer, PendingTxnResponse.

AmmClient contains main and util functions.

main:

  • constructor
  • create a pool for asset a and b
  • bootstrap
  • add liquidity (mint)
  • remove liquidity (burn)
  • swap

a main function returns an instance of TransactionComposer.

utils:

  • get pairs
  • get LP token
  • get pool by assets
  • get pool by LP token
  • get balances of an address
  • get balance of an address per asset
  • check if an address opted in an asset

TransactionComposer sign transactions with secret key or algorand session wallet and send them to blockchain. it has signAndSend public function returns PendingTxnResponse

PendingTxnResponse contains transaction infomation.

Example of Usage

Please checkout unit tests in tests folder.

License

MIT

0.2.7

9 months ago

0.2.6

9 months ago

0.2.5

9 months ago

0.2.4

9 months ago

0.2.3

10 months ago