We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7ea531 commit 52dcff8Copy full SHA for 52dcff8
ts-sdk-sui/src/Sui.ts
@@ -368,6 +368,25 @@ export const readCoinBalances = (contractAddress: string, address: string) =>
368
return totalBalance
369
})
370
371
+ export const getAllCoins = (address: string) =>
372
+ Effect.gen(function*() {
373
+ const client = (yield* PublicClient).client
374
+ let params = {
375
+ owner: address,
376
+ }
377
+
378
+ const coins = yield* Effect.tryPromise({
379
+ try: async () => {
380
+ const result = await client.getAllCoins(params)
381
+ return result.data
382
+ },
383
+ catch: err =>
384
+ new ReadCoinError({
385
+ cause: extractErrorDetails(err as ReadCoinError),
386
+ }),
387
+ })
388
+ return coins
389
390
391
// /**
392
// * Read the balance of an ERC20 token for a specific address
0 commit comments