diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index dfc87538..4412274b 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -156,5 +156,30 @@ export async function init( throw error; } }, + + /** + * @param {(string)[]} contract_addresses + * @returns {Promise} + */ + getTokens: async ( + contract_addresses: string[] + ): Promise => { + return await client.getTokens(contract_addresses); + }, + + /** + * @param {(string)[]} account_addresses + * @param {(string)[]} contract_addresses + * @returns {Promise} + */ + getTokenBalances: async ( + account_addresses: string[], + contract_addresses: string[] + ): Promise => { + return await client.getTokenBalances( + account_addresses, + contract_addresses + ); + }, }; } diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index 13ef1010..66fd5bc7 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -307,6 +307,20 @@ export interface SDK { domain?: StarknetDomain ) => TypedData; sendMessage: (data: TypedData, account: Account) => Promise; + /** + * @param {string[]} contract_addresses + * @returns {Promise} + */ + getTokens(contract_addresses: string[]): Promise; + /** + * @param {string[]} account_addresses + * @param {string[]} contract_addresses + * @returns {Promise} + */ + getTokenBalances( + account_addresses: string[], + contract_addresses: string[] + ): Promise; } /**