README
SDK Reference Document
CDS SDK provides easy-to-use APIs for developers to set up a CDS trading platform that is ready to use.
Quick start
First, use NPM to install the SDK
Then, if you are not access via a Web browser, follow below steps:
If you access via a Web browser, you can just use the Metamask Wallet:
After completing steps mentioned above, submit the transaction and confirm its status:
Env
For switching environments, env switches contracts for different environments, corresponding to scr/config/contracts. $ {env} .ts, with the option local, kcctest.
Rpc
The rpc is the access to blockchain node address, such as ethereum use node https : //mainnet.infura.io/v3/
Transaction
Transaction is the requested transaction content that can be generated by encapsulated functions. Obtained from the transaction generation function below:
Object | Description | Link |
CDS | Related to CDS , user transaction, and deposit liquidity, etc. | |
ticket | User transfer ticket,withdraw the rental ticket, etc. | |
ticketMarket | Users rent or sell ticket market | |
ticketSale | Primary market purchase | |
utils | utility class, ERC20 approve, ERC1155 approve, etc. |
Last updated