@titan/github
The @titan/github
package provides a collection of tools for efficiently interacting with the Titan network.
It achieves this by providing a unified token and contract list for Titan and other chains.
Installation
npm install @titan/github
Quickstart Recipes
- Get all token data on each network
import { TitanSDK } from '@titan/github'
const sdk = new TitanSDK({
chainId: 55004,
})
const tokenList = sdk.tokens
console.log('Token List:', tokenList)
import { TitanSDK } from '@titan/github'
const sdk = new TitanSDK({
chainId: 55004,
})
const TON_CONTRACT = sdk.getTokenContract('TON')
const totalSupply = await TON_CONTRACT.totalSupply()
console.log('totalSupply :', totalSupply)
import { TitanSDK } from '@titan/github'
const sdk = new TitanSDK({
chainId: 55004,
})
const L2StandardBridge = sdk.getContract('L2StandardBridge')
const L2Messenger = await L2StandardBridge.messenger()
console.log('L2Messenger : ', L2Messenger)
Example using CodeSandbox
You can try out the @titan/github package in an online environment using CodeSandbox. Click the button below to open the project in CodeSandbox:
This CodeSandbox project includes a basic setup with the @titan/sdk package. You can explore and experiment with the functionalities in a live environment.
Contributing
Directory Structure
├── contracts:
├── tokens:
├── bin:
├── test:
├── src
│ ├──
Production branch
The production branch is "main". This branch holds the codebase for the most recent "stable" releases. Any changes made to the main branch are initially integrated from the develop branch.
Development branch
The primary development branch is "develop". The develop branch includes the latest software version that remains compatible with the most recent experimental network deployments. If you're implementing a change that maintains backward compatibility, please submit your pull request to the develop branch.