@fuel-ts/account 0.0.0-rc-2408-20240620151941 → 0.0.0-rc-2366-20240620152942
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/dist/account.d.ts +4 -4
- package/dist/account.d.ts.map +1 -1
- package/dist/index.global.js +95 -82
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +95 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +95 -82
- package/dist/index.mjs.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +0 -18
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +5 -20
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/test-utils.global.js +95 -106
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +95 -82
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +95 -82
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +15 -15
@@ -3,7 +3,7 @@ import type { AbstractAccount, AbstractAddress, BytesLike } from '@fuel-ts/inter
|
|
3
3
|
import { BN } from '@fuel-ts/math';
|
4
4
|
import type { Transaction } from '@fuel-ts/transactions';
|
5
5
|
import { getSdk as getOperationsSdk } from './__generated__/operations';
|
6
|
-
import type { GqlConsensusParametersVersion, GqlContractParameters as ContractParameters, GqlDryRunFailureStatusFragment, GqlDryRunSuccessStatusFragment, GqlFeeParameters as FeeParameters, GqlGasCosts as GasCosts, GqlPredicateParameters as PredicateParameters, GqlScriptParameters as ScriptParameters, GqlTxParameters as TxParameters, GqlPageInfo
|
6
|
+
import type { GqlConsensusParametersVersion, GqlContractParameters as ContractParameters, GqlDryRunFailureStatusFragment, GqlDryRunSuccessStatusFragment, GqlFeeParameters as FeeParameters, GqlGasCosts as GasCosts, GqlGetBlocksQueryVariables, GqlMessage, GqlPredicateParameters as PredicateParameters, GqlRelayedTransactionFailed, GqlScriptParameters as ScriptParameters, GqlTxParameters as TxParameters, GqlPageInfo } from './__generated__/operations';
|
7
7
|
import type { Coin } from './coin';
|
8
8
|
import type { CoinQuantity, CoinQuantityLike } from './coin-quantity';
|
9
9
|
import { MemoryCache } from './memory-cache';
|
@@ -33,17 +33,6 @@ export type Block = {
|
|
33
33
|
time: string;
|
34
34
|
transactionIds: string[];
|
35
35
|
};
|
36
|
-
export type GetCoinsResponse = {
|
37
|
-
coins: Coin[];
|
38
|
-
pageInfo: GqlPageInfo;
|
39
|
-
};
|
40
|
-
export type GetMessagesResponse = {
|
41
|
-
messages: Message[];
|
42
|
-
pageInfo: GqlPageInfo;
|
43
|
-
};
|
44
|
-
export type GetBalancesResponse = {
|
45
|
-
balances: CoinQuantity[];
|
46
|
-
};
|
47
36
|
export type GetTransactionsResponse = {
|
48
37
|
transactions: Transaction[];
|
49
38
|
pageInfo: GqlPageInfo;
|
@@ -462,7 +451,7 @@ export default class Provider {
|
|
462
451
|
*
|
463
452
|
* @returns A promise that resolves to the coins.
|
464
453
|
*/
|
465
|
-
getCoins(owner: string | AbstractAddress, assetId?: BytesLike, paginationArgs?: CursorPaginationArgs): Promise<
|
454
|
+
getCoins(owner: string | AbstractAddress, assetId?: BytesLike, paginationArgs?: CursorPaginationArgs): Promise<Coin[]>;
|
466
455
|
/**
|
467
456
|
* Returns resources for the given owner satisfying the spend query.
|
468
457
|
*
|
@@ -485,7 +474,7 @@ export default class Provider {
|
|
485
474
|
* @param params - The parameters to query blocks.
|
486
475
|
* @returns A promise that resolves to the blocks.
|
487
476
|
*/
|
488
|
-
getBlocks(params:
|
477
|
+
getBlocks(params: GqlGetBlocksQueryVariables): Promise<Block[]>;
|
489
478
|
/**
|
490
479
|
* Returns block matching the given ID or type, including transaction data.
|
491
480
|
*
|
@@ -548,7 +537,7 @@ export default class Provider {
|
|
548
537
|
* @param paginationArgs - Pagination arguments (optional).
|
549
538
|
* @returns A promise that resolves to the balances.
|
550
539
|
*/
|
551
|
-
getBalances(owner: string | AbstractAddress): Promise<
|
540
|
+
getBalances(owner: string | AbstractAddress, paginationArgs?: CursorPaginationArgs): Promise<CoinQuantity[]>;
|
552
541
|
/**
|
553
542
|
* Returns message for the given address.
|
554
543
|
*
|
@@ -556,7 +545,7 @@ export default class Provider {
|
|
556
545
|
* @param paginationArgs - Pagination arguments (optional).
|
557
546
|
* @returns A promise that resolves to the messages.
|
558
547
|
*/
|
559
|
-
getMessages(address: string | AbstractAddress, paginationArgs?: CursorPaginationArgs): Promise<
|
548
|
+
getMessages(address: string | AbstractAddress, paginationArgs?: CursorPaginationArgs): Promise<Message[]>;
|
560
549
|
/**
|
561
550
|
* Returns Message Proof for given transaction id and the message id from MessageOut receipt.
|
562
551
|
*
|
@@ -618,10 +607,6 @@ export default class Provider {
|
|
618
607
|
* @returns A promise that resolves to the relayed transaction.
|
619
608
|
*/
|
620
609
|
getRelayedTransactionStatus(relayedTransactionId: string): Promise<GqlRelayedTransactionFailed | null>;
|
621
|
-
/**
|
622
|
-
* @hidden
|
623
|
-
*/
|
624
|
-
private validatePaginationArgs;
|
625
610
|
/**
|
626
611
|
* @hidden
|
627
612
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/providers/provider.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,EAAE,EAAM,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAiBzD,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAEV,6BAA6B,EAC7B,qBAAqB,IAAI,kBAAkB,EAC3C,8BAA8B,EAC9B,8BAA8B,EAC9B,gBAAgB,IAAI,aAAa,EACjC,WAAW,IAAI,QAAQ,EACvB,sBAAsB,IAAI,mBAAmB,EA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BrB;;;;;;;;OAQG;IACG,eAAe,CACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,MAAM,EACtB,iBAAiB,CAAC,EAAE,EAAE,GACrB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAoG/B;;;;OAIG;IACG,iBAAiB,IAAI,OAAO,CAAC,EAAE,CAAC;IAKtC;;;;;OAKG;IACG,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;IAOzD;;;;;OAKG;IACG,gBAAgB;IACpB,kDAAkD;IAClD,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,aAAa,CAAC;IAKzB;;;;;;OAMG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAQtD;;;;;OAKG;IAEG,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAIjF;;;;;OAKG;IACG,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAUlE;;;;;OAKG;IACG,2BAA2B,CAC/B,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,2BAA2B,GAAG,IAAI,CAAC;IAY9C;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAqB3B"}
|
@@ -33665,30 +33665,6 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33665
33665
|
amount: 18446744073709552e3,
|
33666
33666
|
data: "",
|
33667
33667
|
da_height: 0
|
33668
|
-
},
|
33669
|
-
{
|
33670
|
-
sender: "0xbb18456fef301df282ee9311b25f31315a563eb901255207f43c5d39b85f4047",
|
33671
|
-
recipient: "0x88a3467430f8971c6acda91a0f48a82d6a57ef288e4972db0e455fb3100e7cc8",
|
33672
|
-
nonce: "0x3217a0408218725bf3ac744c99cb73b3b3b386c7d3b723b744f30fd83e28bebd",
|
33673
|
-
amount: 18446744073709552e3,
|
33674
|
-
data: "",
|
33675
|
-
da_height: 0
|
33676
|
-
},
|
33677
|
-
{
|
33678
|
-
sender: "0xd761d0612bc8125f59cd84d5e1db66342932f2f3cb684a3a1a3501b49fdc0656",
|
33679
|
-
recipient: "0x88a3467430f8971c6acda91a0f48a82d6a57ef288e4972db0e455fb3100e7cc8",
|
33680
|
-
nonce: "0x235beb4d685377b67dc915de8a1bab443aab48a47819b203dd709ce34fb62106",
|
33681
|
-
amount: 18446744073709552e3,
|
33682
|
-
data: "",
|
33683
|
-
da_height: 0
|
33684
|
-
},
|
33685
|
-
{
|
33686
|
-
sender: "0xf99941a4ef44577a87027af7a3d655c6e182cd6d4580347dc4cc4a1a4f5bd07d",
|
33687
|
-
recipient: "0x88a3467430f8971c6acda91a0f48a82d6a57ef288e4972db0e455fb3100e7cc8",
|
33688
|
-
nonce: "0x03d7ad03b6a14262fc7efc59a9b95afb43af702f4becdaba866364b438b0ebd3",
|
33689
|
-
amount: 18446744073709552e3,
|
33690
|
-
data: "",
|
33691
|
-
da_height: 0
|
33692
33668
|
}
|
33693
33669
|
],
|
33694
33670
|
contracts: [],
|
@@ -41209,9 +41185,6 @@ ${TransactionFragmentDoc}`;
|
|
41209
41185
|
first: $first
|
41210
41186
|
last: $last
|
41211
41187
|
) {
|
41212
|
-
pageInfo {
|
41213
|
-
...pageInfoFragment
|
41214
|
-
}
|
41215
41188
|
edges {
|
41216
41189
|
node {
|
41217
41190
|
...coinFragment
|
@@ -41219,8 +41192,7 @@ ${TransactionFragmentDoc}`;
|
|
41219
41192
|
}
|
41220
41193
|
}
|
41221
41194
|
}
|
41222
|
-
${
|
41223
|
-
${CoinFragmentDoc}`;
|
41195
|
+
${CoinFragmentDoc}`;
|
41224
41196
|
var GetCoinsToSpendDocument = lib_default2`
|
41225
41197
|
query getCoinsToSpend($owner: Address!, $queryPerAsset: [SpendQueryElementInput!]!, $excludedIds: ExcludeInput) {
|
41226
41198
|
coinsToSpend(
|
@@ -41279,9 +41251,6 @@ ${MessageCoinFragmentDoc}`;
|
|
41279
41251
|
first: $first
|
41280
41252
|
last: $last
|
41281
41253
|
) {
|
41282
|
-
pageInfo {
|
41283
|
-
...pageInfoFragment
|
41284
|
-
}
|
41285
41254
|
edges {
|
41286
41255
|
node {
|
41287
41256
|
...balanceFragment
|
@@ -41289,8 +41258,7 @@ ${MessageCoinFragmentDoc}`;
|
|
41289
41258
|
}
|
41290
41259
|
}
|
41291
41260
|
}
|
41292
|
-
${
|
41293
|
-
${BalanceFragmentDoc}`;
|
41261
|
+
${BalanceFragmentDoc}`;
|
41294
41262
|
var GetMessagesDocument = lib_default2`
|
41295
41263
|
query getMessages($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
|
41296
41264
|
messages(
|
@@ -41300,9 +41268,6 @@ ${BalanceFragmentDoc}`;
|
|
41300
41268
|
first: $first
|
41301
41269
|
last: $last
|
41302
41270
|
) {
|
41303
|
-
pageInfo {
|
41304
|
-
...pageInfoFragment
|
41305
|
-
}
|
41306
41271
|
edges {
|
41307
41272
|
node {
|
41308
41273
|
...messageFragment
|
@@ -41310,8 +41275,7 @@ ${BalanceFragmentDoc}`;
|
|
41310
41275
|
}
|
41311
41276
|
}
|
41312
41277
|
}
|
41313
|
-
${
|
41314
|
-
${MessageFragmentDoc}`;
|
41278
|
+
${MessageFragmentDoc}`;
|
41315
41279
|
var GetMessageProofDocument = lib_default2`
|
41316
41280
|
query getMessageProof($transactionId: TransactionId!, $nonce: Nonce!, $commitBlockId: BlockId, $commitBlockHeight: U32) {
|
41317
41281
|
messageProof(
|
@@ -44814,27 +44778,21 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44814
44778
|
* @returns A promise that resolves to the coins.
|
44815
44779
|
*/
|
44816
44780
|
async getCoins(owner, assetId, paginationArgs) {
|
44817
|
-
this.validatePaginationArgs(paginationArgs);
|
44818
44781
|
const ownerAddress = Address.fromAddressOrString(owner);
|
44819
|
-
const {
|
44820
|
-
|
44821
|
-
} = await this.operations.getCoins({
|
44822
|
-
first: 100,
|
44782
|
+
const result = await this.operations.getCoins({
|
44783
|
+
first: 10,
|
44823
44784
|
...paginationArgs,
|
44824
44785
|
filter: { owner: ownerAddress.toB256(), assetId: assetId && hexlify(assetId) }
|
44825
44786
|
});
|
44826
|
-
const coins = edges.map((
|
44827
|
-
|
44828
|
-
|
44829
|
-
|
44830
|
-
|
44831
|
-
|
44832
|
-
|
44787
|
+
const coins = result.coins.edges.map((edge) => edge.node);
|
44788
|
+
return coins.map((coin) => ({
|
44789
|
+
id: coin.utxoId,
|
44790
|
+
assetId: coin.assetId,
|
44791
|
+
amount: bn(coin.amount),
|
44792
|
+
owner: Address.fromAddressOrString(coin.owner),
|
44793
|
+
blockCreated: bn(coin.blockCreated),
|
44794
|
+
txCreatedIdx: bn(coin.txCreatedIdx)
|
44833
44795
|
}));
|
44834
|
-
return {
|
44835
|
-
coins,
|
44836
|
-
pageInfo
|
44837
|
-
};
|
44838
44796
|
}
|
44839
44797
|
/**
|
44840
44798
|
* Returns resources for the given owner satisfying the spend query.
|
@@ -45044,22 +45002,17 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
45044
45002
|
* @param paginationArgs - Pagination arguments (optional).
|
45045
45003
|
* @returns A promise that resolves to the balances.
|
45046
45004
|
*/
|
45047
|
-
async getBalances(owner) {
|
45048
|
-
const {
|
45049
|
-
|
45050
|
-
|
45051
|
-
/**
|
45052
|
-
* The query parameters for this method were designed to support pagination,
|
45053
|
-
* but the current Fuel-Core implementation does not support pagination yet.
|
45054
|
-
*/
|
45055
|
-
first: 1e4,
|
45005
|
+
async getBalances(owner, paginationArgs) {
|
45006
|
+
const result = await this.operations.getBalances({
|
45007
|
+
first: 10,
|
45008
|
+
...paginationArgs,
|
45056
45009
|
filter: { owner: Address.fromAddressOrString(owner).toB256() }
|
45057
45010
|
});
|
45058
|
-
const balances = edges.map((
|
45059
|
-
|
45060
|
-
|
45011
|
+
const balances = result.balances.edges.map((edge) => edge.node);
|
45012
|
+
return balances.map((balance) => ({
|
45013
|
+
assetId: balance.assetId,
|
45014
|
+
amount: bn(balance.amount)
|
45061
45015
|
}));
|
45062
|
-
return { balances };
|
45063
45016
|
}
|
45064
45017
|
/**
|
45065
45018
|
* Returns message for the given address.
|
@@ -45069,33 +45022,27 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
45069
45022
|
* @returns A promise that resolves to the messages.
|
45070
45023
|
*/
|
45071
45024
|
async getMessages(address, paginationArgs) {
|
45072
|
-
this.
|
45073
|
-
|
45074
|
-
messages: { edges, pageInfo }
|
45075
|
-
} = await this.operations.getMessages({
|
45076
|
-
first: 100,
|
45025
|
+
const result = await this.operations.getMessages({
|
45026
|
+
first: 10,
|
45077
45027
|
...paginationArgs,
|
45078
45028
|
owner: Address.fromAddressOrString(address).toB256()
|
45079
45029
|
});
|
45080
|
-
const messages = edges.map((
|
45030
|
+
const messages = result.messages.edges.map((edge) => edge.node);
|
45031
|
+
return messages.map((message) => ({
|
45081
45032
|
messageId: InputMessageCoder.getMessageId({
|
45082
|
-
sender:
|
45083
|
-
recipient:
|
45084
|
-
nonce:
|
45085
|
-
amount: bn(
|
45086
|
-
data:
|
45033
|
+
sender: message.sender,
|
45034
|
+
recipient: message.recipient,
|
45035
|
+
nonce: message.nonce,
|
45036
|
+
amount: bn(message.amount),
|
45037
|
+
data: message.data
|
45087
45038
|
}),
|
45088
|
-
sender: Address.fromAddressOrString(
|
45089
|
-
recipient: Address.fromAddressOrString(
|
45090
|
-
nonce:
|
45091
|
-
amount: bn(
|
45092
|
-
data: InputMessageCoder.decodeData(
|
45093
|
-
daHeight: bn(
|
45039
|
+
sender: Address.fromAddressOrString(message.sender),
|
45040
|
+
recipient: Address.fromAddressOrString(message.recipient),
|
45041
|
+
nonce: message.nonce,
|
45042
|
+
amount: bn(message.amount),
|
45043
|
+
data: InputMessageCoder.decodeData(message.data),
|
45044
|
+
daHeight: bn(message.daHeight)
|
45094
45045
|
}));
|
45095
|
-
return {
|
45096
|
-
messages,
|
45097
|
-
pageInfo
|
45098
|
-
};
|
45099
45046
|
}
|
45100
45047
|
/**
|
45101
45048
|
* Returns Message Proof for given transaction id and the message id from MessageOut receipt.
|
@@ -45274,18 +45221,6 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
45274
45221
|
}
|
45275
45222
|
return relayedTransactionStatus;
|
45276
45223
|
}
|
45277
|
-
/**
|
45278
|
-
* @hidden
|
45279
|
-
*/
|
45280
|
-
validatePaginationArgs({ first, last } = {}) {
|
45281
|
-
const MAX_PAGINATION_LIMIT = 1e3;
|
45282
|
-
if ((first || 0) > MAX_PAGINATION_LIMIT || (last || 0) > MAX_PAGINATION_LIMIT) {
|
45283
|
-
throw new FuelError(
|
45284
|
-
ErrorCode.INVALID_INPUT_PARAMETERS,
|
45285
|
-
"Pagination limit cannot exceed 1000 items"
|
45286
|
-
);
|
45287
|
-
}
|
45288
|
-
}
|
45289
45224
|
/**
|
45290
45225
|
* @hidden
|
45291
45226
|
*/
|
@@ -45502,16 +45437,52 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
45502
45437
|
* @param assetId - The asset ID of the coins to retrieve (optional).
|
45503
45438
|
* @returns A promise that resolves to an array of Coins.
|
45504
45439
|
*/
|
45505
|
-
async getCoins(assetId
|
45506
|
-
|
45440
|
+
async getCoins(assetId) {
|
45441
|
+
const coins = [];
|
45442
|
+
const pageSize = 9999;
|
45443
|
+
let cursor;
|
45444
|
+
for (; ; ) {
|
45445
|
+
const pageCoins = await this.provider.getCoins(this.address, assetId, {
|
45446
|
+
first: pageSize,
|
45447
|
+
after: cursor
|
45448
|
+
});
|
45449
|
+
coins.push(...pageCoins);
|
45450
|
+
const hasNextPage = pageCoins.length >= pageSize;
|
45451
|
+
if (!hasNextPage) {
|
45452
|
+
break;
|
45453
|
+
}
|
45454
|
+
throw new FuelError(
|
45455
|
+
ErrorCode.NOT_SUPPORTED,
|
45456
|
+
`Wallets containing more than ${pageSize} coins exceed the current supported limit.`
|
45457
|
+
);
|
45458
|
+
}
|
45459
|
+
return coins;
|
45507
45460
|
}
|
45508
45461
|
/**
|
45509
45462
|
* Retrieves messages owned by the account.
|
45510
45463
|
*
|
45511
45464
|
* @returns A promise that resolves to an array of Messages.
|
45512
45465
|
*/
|
45513
|
-
async getMessages(
|
45514
|
-
|
45466
|
+
async getMessages() {
|
45467
|
+
const messages = [];
|
45468
|
+
const pageSize = 9999;
|
45469
|
+
let cursor;
|
45470
|
+
for (; ; ) {
|
45471
|
+
const pageMessages = await this.provider.getMessages(this.address, {
|
45472
|
+
first: pageSize,
|
45473
|
+
after: cursor
|
45474
|
+
});
|
45475
|
+
messages.push(...pageMessages);
|
45476
|
+
const hasNextPage = pageMessages.length >= pageSize;
|
45477
|
+
if (!hasNextPage) {
|
45478
|
+
break;
|
45479
|
+
}
|
45480
|
+
throw new FuelError(
|
45481
|
+
ErrorCode.NOT_SUPPORTED,
|
45482
|
+
`Wallets containing more than ${pageSize} messages exceed the current supported limit.`
|
45483
|
+
);
|
45484
|
+
}
|
45485
|
+
return messages;
|
45515
45486
|
}
|
45516
45487
|
/**
|
45517
45488
|
* Retrieves the balance of the account for the given asset.
|
@@ -45530,7 +45501,25 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
45530
45501
|
* @returns A promise that resolves to an array of Coins and their quantities.
|
45531
45502
|
*/
|
45532
45503
|
async getBalances() {
|
45533
|
-
|
45504
|
+
const balances = [];
|
45505
|
+
const pageSize = 9999;
|
45506
|
+
let cursor;
|
45507
|
+
for (; ; ) {
|
45508
|
+
const pageBalances = await this.provider.getBalances(this.address, {
|
45509
|
+
first: pageSize,
|
45510
|
+
after: cursor
|
45511
|
+
});
|
45512
|
+
balances.push(...pageBalances);
|
45513
|
+
const hasNextPage = pageBalances.length >= pageSize;
|
45514
|
+
if (!hasNextPage) {
|
45515
|
+
break;
|
45516
|
+
}
|
45517
|
+
throw new FuelError(
|
45518
|
+
ErrorCode.NOT_SUPPORTED,
|
45519
|
+
`Wallets containing more than ${pageSize} balances exceed the current supported limit.`
|
45520
|
+
);
|
45521
|
+
}
|
45522
|
+
return balances;
|
45534
45523
|
}
|
45535
45524
|
/**
|
45536
45525
|
* Funds a transaction request by adding the necessary resources.
|