---
title: Integration
slug: integration
icon: 🖥️
docTags: 
createdAt: 2023-03-13T06:34:10.000Z
---

# [Typescript SDK](https://github.com/Typus-Lab/typus-sdk)

## Install

:::BlockQuote
npm i&#x20;
:::

## 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

:::BlockQuote
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:

:::BlockQuote
sui client call --gas-budget 10000 --package $PACKAGE --module "token\_btc" --function "mint" --args $REGISTRY 10001
:::

&#x20;        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:

:::BlockQuote
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&#x20;**&#x69;s *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

:::BlockQuote
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:

:::BlockQuote
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
:::

&#x20;        note: "1" in script is vault index

- or run test to deposit token:

:::BlockQuote
npx ts-node test/testDeposit.ts
:::

