https://github.com/synycboom/tinyman-go-sdk
Tinyman Golang SDK
https://github.com/synycboom/tinyman-go-sdk
algorand golang sdk tinyman
Last synced: about 1 year ago
JSON representation
Tinyman Golang SDK
- Host: GitHub
- URL: https://github.com/synycboom/tinyman-go-sdk
- Owner: synycboom
- License: mit
- Created: 2022-04-01T08:24:29.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-11T15:38:07.000Z (about 4 years ago)
- Last Synced: 2025-01-29T22:29:44.264Z (over 1 year ago)
- Topics: algorand, golang, sdk, tinyman
- Language: Go
- Homepage:
- Size: 107 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tinyman-go-sdk
# Overview
This is a Golang SDK providing access to the [Tinyman AMM](https://docs.tinyman.org/) on the Algorand blockchain. It currently supports V1.1 Tinyman.
# Installation
```command
go get github.com/synycboom/tinyman-go-sdk@v0.1.2
```
This SDK also requires gl-algorand-sdk
```command
go get -u github.com/algorand/go-algorand-sdk/...
```
# Package overview
`v1` package provides a Tinyman client which is a main entry point for this SDK.
`v1/constants` contains constants for using with the SDK.
`v1/contracts` provides a getter function to retrieve the pool logic signature account.
`v1/pools` provides a liquidity pool utilities that you'll use to interact with it.
`v1/prepare` contains functions that prepare transaction groups to interact with the Tinyman contracts.
`utils` provides utilities like converting numbers, getting states, etc.
`types` contains data types used in the SDK.
`examples` are the example codes.
# Usage
## Boostrapping
Bootstrap a liquidity pool [/example/bootstrap](/example/bootstrap/main.go)
## Minting
Add assets to an existing pool in exchange for the liquidity pool asset [/example/mint](/example/mint/main.go).
## Burning
Exchange the liquidity pool asset for the pool assets [/example/burn](/example/burn/main.go).
## Swapping
Swap one asset for another in an existing pool [/example/swap](/example/swap/main.go).
## Redeeming
Redeem excess amounts from previous transactions [/example/redeem](/example/redeem/main.go).
## Running example
To run the examples, create a new `/example/.env` file by following the variables in [/example/.env.example](/example/.env.example)
Then setup /.vscode/launch.json, and use it to run the examples
# License
tinyman-go-sdk is licensed under a MIT license except for the exceptions listed below. See the LICENSE file for details.
## Exceptions
`v1/contracts/asc-v1_1.json` is currently unlicensed. It may be used by this SDK but may not be used in any other way or be distributed separately without the express permission of Tinyman.
# Disclaimer
Nothing in the repo constitutes professional and/or financial advice. Use this SDK at your own risk.