interface ITokensModule { checkAllowance(token,
owner,
spender): Promise<bigint>; checkBalance(token,
owner): Promise<bigint>; checkBalances(tokens,
owner): Promise<Record<string, bigint>>; checkPermitAmount(token,
owner,
spender): Promise<bigint>; ensureAllowance(token,
owner,
spender,
amount,
options?): Promise<undefined | SdkResponse>; ensurePermit2Allowance(token,
options?): Promise<undefined | SdkResponse>; generatePermitBatchData(assets,
spender,
options?): Promise<PermitBatchData>; generatePermitData(token,
spender,
amount?,
options?): Promise<PermitData>; increaseAllowance(token,
spender,
amount,
options?): Promise<SdkResponse>; revoke(token,
spender): Promise<SdkResponse>; } Methods
checkAllowance
- checkAllowance(token, owner, spender): Promise<bigint>
Parameters
- token: string
- owner: string
- spender: string
Returns Promise<bigint>
checkBalance
- checkBalance(token, owner): Promise<bigint>
Parameters
- token: string
- owner: string
Returns Promise<bigint>
checkBalances
- checkBalances(tokens, owner): Promise<Record<string, bigint>>
Parameters
- tokens: string[]
- owner: string
Returns Promise<Record<string, bigint>>
checkPermitAmount
- checkPermitAmount(token, owner, spender): Promise<bigint>
Parameters
- token: string
- owner: string
- spender: string
Returns Promise<bigint>
ensureAllowance
- ensureAllowance(token, owner, spender, amount, options?): Promise<undefined | SdkResponse>
Parameters
- token: string
- owner: string
- spender: string
- amount: bigint
Optional
options: TransactionOptions
Returns Promise<undefined | SdkResponse>
ensurePermit2Allowance
- ensurePermit2Allowance(token, options?): Promise<undefined | SdkResponse>
Returns Promise<undefined | SdkResponse>
generatePermitBatchData
- generatePermitBatchData(assets, spender, options?): Promise<PermitBatchData>
Parameters
- assets: {
amount?: bigint;
token: string;
}[] - spender: string
Optional
options: TransactionOptions
generatePermitData
- generatePermitData(token, spender, amount?, options?): Promise<PermitData>
increaseAllowance
- increaseAllowance(token, spender, amount, options?): Promise<SdkResponse>
revoke
- revoke(token, spender): Promise<SdkResponse>
Parameters
- token: string
- spender: string
See CatalystSDK.checkAllowance