The Kinetic Client will give you access to all the methods you need to work with a token on the blockchain.We recommend starting with Devnet before moving on to Mainnet.
Don’t have an App Index? Join our Discord and we’ll get you started.While you’re waiting for confirmation of your App Index, use 1 on devnet so you can get started.
You can create accounts randomly or from existing mnemonics or secret keys. Below, we’ll make a keypair and use that for creating an account on the blockchain.
Copy
let owner = Keypair.random()let transaction = await kinetic.createAccount(owner: owner)
Check a user balance by passing in the public key of the account you want to check.The response object includes your total balance as well as detailing all of the Mints and Tokens held by that Public Key.
Copy
let balance = await kinetic.getBalance(account: owner.publicKey).balance
Kinetic will transfer the kin token by default unless specified otherwise. To send a different token make sure to include the **mint** parameter like below```swiftlet txSignature = await kinetic.makeTransfer( amount: "5000", destination: "BQJi5K2s4SDDbed1ArpXjb6n7yVUfM34ym9a179MAqVo", mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' // Token (mint) address for USDC owner: owner).signature
Created to help get you up and running as quickly as possible, these projects can be a great reference point when you get stuck or even a starter for your own project. Happy coding!