@fuel-ts/account 0.0.0-rc-2395-20240528075431 → 0.0.0-rc-1356-20240528093309
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/index.global.js +17 -30
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +126 -147
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -31
- package/dist/index.mjs.map +1 -1
- package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -1
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +0 -1
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/operations.d.ts +2 -4
- package/dist/providers/transaction-summary/operations.d.ts.map +1 -1
- package/dist/providers/transaction-summary/types.d.ts +0 -1
- package/dist/providers/transaction-summary/types.d.ts.map +1 -1
- package/dist/providers/utils/auto-retry-fetch.d.ts.map +1 -1
- package/dist/providers/utils/index.d.ts +0 -1
- package/dist/providers/utils/index.d.ts.map +1 -1
- package/dist/test-utils/asset-id.d.ts +8 -0
- package/dist/test-utils/asset-id.d.ts.map +1 -0
- package/dist/test-utils/index.d.ts +4 -0
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts +8 -1
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils/setup-test-provider-and-wallets.d.ts +33 -0
- package/dist/test-utils/setup-test-provider-and-wallets.d.ts.map +1 -0
- package/dist/test-utils/test-message.d.ts +29 -0
- package/dist/test-utils/test-message.d.ts.map +1 -0
- package/dist/test-utils/wallet-config.d.ts +55 -0
- package/dist/test-utils/wallet-config.d.ts.map +1 -0
- package/dist/test-utils.global.js +401 -79
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +410 -179
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +304 -77
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +16 -15
- package/dist/providers/utils/sleep.d.ts +0 -3
- package/dist/providers/utils/sleep.d.ts.map +0 -1
package/dist/index.global.js
CHANGED
@@ -29985,6 +29985,13 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
29985
29985
|
};
|
29986
29986
|
var DateTime = _DateTime;
|
29987
29987
|
__publicField3(DateTime, "TAI64_NULL", "");
|
29988
|
+
function sleep(time) {
|
29989
|
+
return new Promise((resolve) => {
|
29990
|
+
setTimeout(() => {
|
29991
|
+
resolve(true);
|
29992
|
+
}, time);
|
29993
|
+
});
|
29994
|
+
}
|
29988
29995
|
function isDefined(value) {
|
29989
29996
|
return value !== void 0;
|
29990
29997
|
}
|
@@ -38333,15 +38340,6 @@ ${MessageCoinFragmentDoc}`;
|
|
38333
38340
|
return normalize2(clone_default(root));
|
38334
38341
|
}
|
38335
38342
|
|
38336
|
-
// src/providers/utils/sleep.ts
|
38337
|
-
function sleep(time) {
|
38338
|
-
return new Promise((resolve) => {
|
38339
|
-
setTimeout(() => {
|
38340
|
-
resolve(true);
|
38341
|
-
}, time);
|
38342
|
-
});
|
38343
|
-
}
|
38344
|
-
|
38345
38343
|
// src/providers/utils/extract-tx-error.ts
|
38346
38344
|
var assemblePanicError = (statusReason) => {
|
38347
38345
|
let errorMessage = `The transaction reverted with reason: "${statusReason}".`;
|
@@ -39678,12 +39676,12 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39678
39676
|
}
|
39679
39677
|
function getWithdrawFromFuelOperations({
|
39680
39678
|
inputs,
|
39681
|
-
receipts
|
39682
|
-
assetId
|
39679
|
+
receipts
|
39683
39680
|
}) {
|
39684
39681
|
const messageOutReceipts = getReceiptsMessageOut(receipts);
|
39685
39682
|
const withdrawFromFuelOperations = messageOutReceipts.reduce(
|
39686
39683
|
(prevWithdrawFromFuelOps, receipt) => {
|
39684
|
+
const assetId = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
39687
39685
|
const input = getInputFromAssetId(inputs, assetId);
|
39688
39686
|
if (input) {
|
39689
39687
|
const inputAddress = getInputAccountAddress(input);
|
@@ -39897,8 +39895,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39897
39895
|
receipts,
|
39898
39896
|
abiMap,
|
39899
39897
|
rawPayload,
|
39900
|
-
maxInputs
|
39901
|
-
assetId
|
39898
|
+
maxInputs
|
39902
39899
|
}) {
|
39903
39900
|
if (isTypeCreate(transactionType)) {
|
39904
39901
|
return [
|
@@ -39917,7 +39914,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39917
39914
|
rawPayload,
|
39918
39915
|
maxInputs
|
39919
39916
|
}),
|
39920
|
-
...getWithdrawFromFuelOperations({ inputs, receipts
|
39917
|
+
...getWithdrawFromFuelOperations({ inputs, receipts })
|
39921
39918
|
];
|
39922
39919
|
}
|
39923
39920
|
return [...getPayProducerOperations(outputs)];
|
@@ -40050,8 +40047,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40050
40047
|
maxInputs,
|
40051
40048
|
gasCosts,
|
40052
40049
|
maxGasPerTx,
|
40053
|
-
gasPrice
|
40054
|
-
assetId
|
40050
|
+
gasPrice
|
40055
40051
|
} = params;
|
40056
40052
|
const gasUsed = getGasUsedFromReceipts(receipts);
|
40057
40053
|
const rawPayload = hexlify(transactionBytes);
|
@@ -40062,8 +40058,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40062
40058
|
receipts,
|
40063
40059
|
rawPayload,
|
40064
40060
|
abiMap,
|
40065
|
-
maxInputs
|
40066
|
-
assetId
|
40061
|
+
maxInputs
|
40067
40062
|
});
|
40068
40063
|
const typeName = getTransactionTypeName(transaction.type);
|
40069
40064
|
const tip = bn(transaction.policies?.find((policy) => policy.type === PolicyType.Tip)?.data);
|
@@ -40221,7 +40216,6 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40221
40216
|
const { gasPerByte, gasPriceFactor, gasCosts, maxGasPerTx } = this.provider.getGasConfig();
|
40222
40217
|
const gasPrice = await this.provider.getLatestGasPrice();
|
40223
40218
|
const maxInputs = this.provider.getChain().consensusParameters.txParameters.maxInputs;
|
40224
|
-
const assetId = this.provider.getBaseAssetId();
|
40225
40219
|
const transactionSummary = assembleTransactionSummary({
|
40226
40220
|
id: this.id,
|
40227
40221
|
receipts,
|
@@ -40234,8 +40228,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40234
40228
|
maxInputs,
|
40235
40229
|
gasCosts,
|
40236
40230
|
maxGasPerTx,
|
40237
|
-
gasPrice
|
40238
|
-
assetId
|
40231
|
+
gasPrice
|
40239
40232
|
});
|
40240
40233
|
return transactionSummary;
|
40241
40234
|
}
|
@@ -41601,7 +41594,6 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41601
41594
|
}
|
41602
41595
|
} = provider.getChain();
|
41603
41596
|
const gasPrice = await provider.getLatestGasPrice();
|
41604
|
-
const assetId = provider.getBaseAssetId();
|
41605
41597
|
const transactionInfo = assembleTransactionSummary({
|
41606
41598
|
id: gqlTransaction.id,
|
41607
41599
|
receipts,
|
@@ -41614,8 +41606,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41614
41606
|
maxInputs,
|
41615
41607
|
gasCosts,
|
41616
41608
|
maxGasPerTx,
|
41617
|
-
gasPrice
|
41618
|
-
assetId
|
41609
|
+
gasPrice
|
41619
41610
|
});
|
41620
41611
|
return {
|
41621
41612
|
gqlTransaction,
|
@@ -41630,7 +41621,6 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41630
41621
|
const transaction = transactionRequest.toTransaction();
|
41631
41622
|
const transactionBytes = transactionRequest.toTransactionBytes();
|
41632
41623
|
const gasPrice = await provider.getLatestGasPrice();
|
41633
|
-
const assetId = provider.getBaseAssetId();
|
41634
41624
|
const transactionSummary = assembleTransactionSummary({
|
41635
41625
|
receipts,
|
41636
41626
|
transaction,
|
@@ -41641,8 +41631,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41641
41631
|
maxInputs,
|
41642
41632
|
gasCosts,
|
41643
41633
|
maxGasPerTx,
|
41644
|
-
gasPrice
|
41645
|
-
assetId
|
41634
|
+
gasPrice
|
41646
41635
|
});
|
41647
41636
|
return transactionSummary;
|
41648
41637
|
}
|
@@ -41658,7 +41647,6 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41658
41647
|
}
|
41659
41648
|
} = provider.getChain();
|
41660
41649
|
const gasPrice = await provider.getLatestGasPrice();
|
41661
|
-
const assetId = provider.getBaseAssetId();
|
41662
41650
|
const transactions = edges.map((edge) => {
|
41663
41651
|
const { node: gqlTransaction } = edge;
|
41664
41652
|
const { id, rawPayload, status } = gqlTransaction;
|
@@ -41680,8 +41668,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41680
41668
|
maxInputs,
|
41681
41669
|
gasCosts,
|
41682
41670
|
maxGasPerTx,
|
41683
|
-
gasPrice
|
41684
|
-
assetId
|
41671
|
+
gasPrice
|
41685
41672
|
});
|
41686
41673
|
const output2 = {
|
41687
41674
|
gqlTransaction,
|