Integration

11min
typescript sdk install npm i for frontend the payload to call is in utils/ , and file name is get tx ts (ex\ getclaimtx ts) it will return a tx in scripts/ , the simple example file name to send variable into payload is get tx ts (ex\ getclaimtx ts) frontend can refer to scripts/ to call utils/ tx and send it for integration testing simple test for important function npx ts node scripts/sui ts mint customized token get package object id and one of asset registry (for example\ btc) from sui dev token, and use the registry mint 10001 token sui client call gas budget 10000 package $package module "token btc" function "mint" args $registry 10001 you will get different object with balance every time after mint, and all of them created by a same registry or run test to mint customized token npx ts node test/testmint ts deposit token to shark fin vault token example tokena, which is created by "mint customized token" step, and the type argument is 0x27b3674c685046f66cad1d5496d2967894fa5329 token usdc , which can be found with tokena object id from explorer steps to deposit token step0 insure package and vault registry are correct (generate from shark fin package) step1 check shark fin registry vault num (ex 1) step2 create new vault(vaulta) with tokena sui client call gas budget 1000 package $package module "shark fin" function "new shark fin vault" type args 0x27b3674c685046f66cad1d5496d2967894fa5329 token usdc args $vault registry 1671344789 true 1 10 step3 check shark fin registry vault num in this example, should be 2 step4 deposit tokena to vaulta in this deposit example, deposit 9999 tokena to vaulta sui client call gas budget 1000 package $package module "shark fin" function "deposit" type args 0x27b3674c685046f66cad1d5496d2967894fa5329 token usdc args $vault registry 1 true $tokenaid 9999 note "1" in script is vault index or run test to deposit token npx ts node test/testdeposit ts