Skip to content

Latest commit

Β 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TONCO Examples

TypeScript examples of SDK usage, including dependency installation, script execution, and swap operation simulations.

πŸ“¦ Installation

Make sure ts-node is installed if you're working with TypeScript:

npm install -g ts-node

Using npm:

cd sdk_examples
npm install

or yarn:

cd sdk_examples
yarn install

πŸš€ Getting Started

Copy sdk_examples/.env.example to sdk_examples/.env and add your Toncenter API key.

TypeScript examples of SDK usage can be found in the sdk_examples directory. To run a specific script:

Using npm scripts:

npm run dev                # Run index.ts
npm run estimate-swap-exact-in      # Estimate exact-in swap
npm run estimate-swap-exact-out     # Estimate exact-out swap
npm run estimate-swap-exact-in-multihop   # Estimate exact-in multihop swap
npm run estimate-swap-exact-out-multihop  # Estimate exact-out multihop swap

npm run create-swap-message         # Create swap message
npm run create-swap-multihop-message # Create multihop swap message

npm run create-mint-message         # Create mint message

Running manually:

ts-node <script_name>.ts

πŸ“„ Examples

The sdk_examples directory contains example scripts demonstrating how to use the SDK. You can explore and adapt them to your needs.

About

This repository contains a demo version of Tonco, showcasing core functionalities in a simplified environment for testing and evaluation purposes.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages