@fuel-ts/account 0.84.0 → 0.85.0
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 +6 -6
- package/dist/account.d.ts.map +1 -1
- package/dist/index.global.js +188 -146
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +271 -224
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +188 -143
- package/dist/index.mjs.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +346 -552
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/assets/assets.d.ts +9 -0
- package/dist/providers/assets/assets.d.ts.map +1 -0
- package/dist/providers/assets/index.d.ts +1 -2
- package/dist/providers/assets/index.d.ts.map +1 -1
- package/dist/providers/assets/utils/fuelAssetsBaseUrl.d.ts +2 -0
- package/dist/providers/assets/utils/fuelAssetsBaseUrl.d.ts.map +1 -0
- package/dist/providers/assets/utils/index.d.ts +1 -0
- package/dist/providers/assets/utils/index.d.ts.map +1 -1
- package/dist/providers/assets/utils/resolveIconPaths.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +5 -9
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/transaction-summary/receipt.d.ts +2 -2
- package/dist/providers/transaction-summary/receipt.d.ts.map +1 -1
- package/dist/providers/transaction-summary/types.d.ts +5 -13
- package/dist/providers/transaction-summary/types.d.ts.map +1 -1
- package/dist/providers/utils/extract-tx-error.d.ts +2 -2
- package/dist/providers/utils/extract-tx-error.d.ts.map +1 -1
- package/dist/providers/utils/gas.d.ts.map +1 -1
- package/dist/providers/utils/receipts.d.ts +2 -2
- package/dist/providers/utils/receipts.d.ts.map +1 -1
- package/dist/test-utils.global.js +210 -146
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +283 -218
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +208 -143
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.global.js
CHANGED
@@ -29470,9 +29470,9 @@ spurious results.`);
|
|
29470
29470
|
// ../versions/dist/index.mjs
|
29471
29471
|
function getBuiltinVersions() {
|
29472
29472
|
return {
|
29473
|
-
FORC: "0.56.
|
29473
|
+
FORC: "0.56.1",
|
29474
29474
|
FUEL_CORE: "0.26.0",
|
29475
|
-
FUELS: "0.
|
29475
|
+
FUELS: "0.85.0"
|
29476
29476
|
};
|
29477
29477
|
}
|
29478
29478
|
function parseVersion(version2) {
|
@@ -29593,7 +29593,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
29593
29593
|
ErrorCode2["ACCOUNT_REQUIRED"] = "account-required";
|
29594
29594
|
ErrorCode2["UNLOCKED_WALLET_REQUIRED"] = "unlocked-wallet-required";
|
29595
29595
|
ErrorCode2["ERROR_BUILDING_BLOCK_EXPLORER_URL"] = "error-building-block-explorer-url";
|
29596
|
-
ErrorCode2["UNSUPPORTED_FUEL_CLIENT_VERSION"] = "unsupported-fuel-client-version";
|
29597
29596
|
ErrorCode2["VITEPRESS_PLUGIN_ERROR"] = "vitepress-plugin-error";
|
29598
29597
|
ErrorCode2["INVALID_MULTICALL"] = "invalid-multicall";
|
29599
29598
|
ErrorCode2["SCRIPT_REVERTED"] = "script-reverted";
|
@@ -37811,7 +37810,7 @@ spurious results.`);
|
|
37811
37810
|
var lib_default2 = gql;
|
37812
37811
|
|
37813
37812
|
// src/providers/__generated__/operations.ts
|
37814
|
-
var
|
37813
|
+
var TransactionStatusSubscriptionFragmentDoc = lib_default2`
|
37815
37814
|
fragment transactionStatusSubscriptionFragment on TransactionStatus {
|
37816
37815
|
type: __typename
|
37817
37816
|
... on SqueezedOutStatus {
|
@@ -37819,7 +37818,13 @@ spurious results.`);
|
|
37819
37818
|
}
|
37820
37819
|
}
|
37821
37820
|
`;
|
37822
|
-
var
|
37821
|
+
var SubmittedStatusFragmentDoc = lib_default2`
|
37822
|
+
fragment SubmittedStatusFragment on SubmittedStatus {
|
37823
|
+
type: __typename
|
37824
|
+
time
|
37825
|
+
}
|
37826
|
+
`;
|
37827
|
+
var ReceiptFragmentDoc = lib_default2`
|
37823
37828
|
fragment receiptFragment on Receipt {
|
37824
37829
|
id
|
37825
37830
|
pc
|
@@ -37851,45 +37856,65 @@ spurious results.`);
|
|
37851
37856
|
subId
|
37852
37857
|
}
|
37853
37858
|
`;
|
37854
|
-
var
|
37855
|
-
fragment
|
37859
|
+
var SuccessStatusFragmentDoc = lib_default2`
|
37860
|
+
fragment SuccessStatusFragment on SuccessStatus {
|
37861
|
+
type: __typename
|
37862
|
+
block {
|
37863
|
+
id
|
37864
|
+
}
|
37865
|
+
time
|
37866
|
+
programState {
|
37867
|
+
returnType
|
37868
|
+
data
|
37869
|
+
}
|
37870
|
+
receipts {
|
37871
|
+
...receiptFragment
|
37872
|
+
}
|
37873
|
+
totalGas
|
37874
|
+
totalFee
|
37875
|
+
}
|
37876
|
+
${ReceiptFragmentDoc}`;
|
37877
|
+
var FailureStatusFragmentDoc = lib_default2`
|
37878
|
+
fragment FailureStatusFragment on FailureStatus {
|
37879
|
+
type: __typename
|
37880
|
+
block {
|
37881
|
+
id
|
37882
|
+
}
|
37883
|
+
totalGas
|
37884
|
+
totalFee
|
37885
|
+
time
|
37886
|
+
reason
|
37887
|
+
receipts {
|
37888
|
+
...receiptFragment
|
37889
|
+
}
|
37890
|
+
}
|
37891
|
+
${ReceiptFragmentDoc}`;
|
37892
|
+
var SqueezedOutStatusFragmentDoc = lib_default2`
|
37893
|
+
fragment SqueezedOutStatusFragment on SqueezedOutStatus {
|
37856
37894
|
type: __typename
|
37895
|
+
reason
|
37896
|
+
}
|
37897
|
+
`;
|
37898
|
+
var TransactionStatusFragmentDoc = lib_default2`
|
37899
|
+
fragment transactionStatusFragment on TransactionStatus {
|
37857
37900
|
... on SubmittedStatus {
|
37858
|
-
|
37901
|
+
...SubmittedStatusFragment
|
37859
37902
|
}
|
37860
37903
|
... on SuccessStatus {
|
37861
|
-
|
37862
|
-
id
|
37863
|
-
}
|
37864
|
-
time
|
37865
|
-
programState {
|
37866
|
-
returnType
|
37867
|
-
data
|
37868
|
-
}
|
37869
|
-
receipts {
|
37870
|
-
...receiptFragment
|
37871
|
-
}
|
37872
|
-
totalGas
|
37873
|
-
totalFee
|
37904
|
+
...SuccessStatusFragment
|
37874
37905
|
}
|
37875
37906
|
... on FailureStatus {
|
37876
|
-
|
37877
|
-
id
|
37878
|
-
}
|
37879
|
-
totalGas
|
37880
|
-
totalFee
|
37881
|
-
time
|
37882
|
-
reason
|
37883
|
-
receipts {
|
37884
|
-
...receiptFragment
|
37885
|
-
}
|
37907
|
+
...FailureStatusFragment
|
37886
37908
|
}
|
37887
37909
|
... on SqueezedOutStatus {
|
37888
|
-
|
37910
|
+
...SqueezedOutStatusFragment
|
37889
37911
|
}
|
37890
37912
|
}
|
37891
|
-
${
|
37892
|
-
|
37913
|
+
${SubmittedStatusFragmentDoc}
|
37914
|
+
${SuccessStatusFragmentDoc}
|
37915
|
+
${FailureStatusFragmentDoc}
|
37916
|
+
${SqueezedOutStatusFragmentDoc}`;
|
37917
|
+
var TransactionFragmentDoc = lib_default2`
|
37893
37918
|
fragment transactionFragment on Transaction {
|
37894
37919
|
id
|
37895
37920
|
rawPayload
|
@@ -37897,8 +37922,8 @@ spurious results.`);
|
|
37897
37922
|
...transactionStatusFragment
|
37898
37923
|
}
|
37899
37924
|
}
|
37900
|
-
${
|
37901
|
-
var
|
37925
|
+
${TransactionStatusFragmentDoc}`;
|
37926
|
+
var InputEstimatePredicatesFragmentDoc = lib_default2`
|
37902
37927
|
fragment inputEstimatePredicatesFragment on Input {
|
37903
37928
|
... on InputCoin {
|
37904
37929
|
predicateGasUsed
|
@@ -37908,14 +37933,14 @@ spurious results.`);
|
|
37908
37933
|
}
|
37909
37934
|
}
|
37910
37935
|
`;
|
37911
|
-
var
|
37936
|
+
var TransactionEstimatePredicatesFragmentDoc = lib_default2`
|
37912
37937
|
fragment transactionEstimatePredicatesFragment on Transaction {
|
37913
37938
|
inputs {
|
37914
37939
|
...inputEstimatePredicatesFragment
|
37915
37940
|
}
|
37916
37941
|
}
|
37917
|
-
${
|
37918
|
-
var
|
37942
|
+
${InputEstimatePredicatesFragmentDoc}`;
|
37943
|
+
var DryRunFailureStatusFragmentDoc = lib_default2`
|
37919
37944
|
fragment dryRunFailureStatusFragment on DryRunFailureStatus {
|
37920
37945
|
totalGas
|
37921
37946
|
totalFee
|
@@ -37926,7 +37951,7 @@ spurious results.`);
|
|
37926
37951
|
}
|
37927
37952
|
}
|
37928
37953
|
`;
|
37929
|
-
var
|
37954
|
+
var DryRunSuccessStatusFragmentDoc = lib_default2`
|
37930
37955
|
fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
|
37931
37956
|
totalGas
|
37932
37957
|
totalFee
|
@@ -37936,7 +37961,7 @@ spurious results.`);
|
|
37936
37961
|
}
|
37937
37962
|
}
|
37938
37963
|
`;
|
37939
|
-
var
|
37964
|
+
var DryRunTransactionStatusFragmentDoc = lib_default2`
|
37940
37965
|
fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
|
37941
37966
|
... on DryRunFailureStatus {
|
37942
37967
|
...dryRunFailureStatusFragment
|
@@ -37945,9 +37970,9 @@ spurious results.`);
|
|
37945
37970
|
...dryRunSuccessStatusFragment
|
37946
37971
|
}
|
37947
37972
|
}
|
37948
|
-
${
|
37949
|
-
${
|
37950
|
-
var
|
37973
|
+
${DryRunFailureStatusFragmentDoc}
|
37974
|
+
${DryRunSuccessStatusFragmentDoc}`;
|
37975
|
+
var DryRunTransactionExecutionStatusFragmentDoc = lib_default2`
|
37951
37976
|
fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
|
37952
37977
|
id
|
37953
37978
|
status {
|
@@ -37957,11 +37982,11 @@ ${DryRunSuccessStatusFragmentFragmentDoc}`;
|
|
37957
37982
|
...receiptFragment
|
37958
37983
|
}
|
37959
37984
|
}
|
37960
|
-
${
|
37961
|
-
${
|
37962
|
-
var
|
37985
|
+
${DryRunTransactionStatusFragmentDoc}
|
37986
|
+
${ReceiptFragmentDoc}`;
|
37987
|
+
var CoinFragmentDoc = lib_default2`
|
37963
37988
|
fragment coinFragment on Coin {
|
37964
|
-
__typename
|
37989
|
+
type: __typename
|
37965
37990
|
utxoId
|
37966
37991
|
owner
|
37967
37992
|
amount
|
@@ -37970,9 +37995,9 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
37970
37995
|
txCreatedIdx
|
37971
37996
|
}
|
37972
37997
|
`;
|
37973
|
-
var
|
37998
|
+
var MessageCoinFragmentDoc = lib_default2`
|
37974
37999
|
fragment messageCoinFragment on MessageCoin {
|
37975
|
-
__typename
|
38000
|
+
type: __typename
|
37976
38001
|
sender
|
37977
38002
|
recipient
|
37978
38003
|
nonce
|
@@ -37981,7 +38006,7 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
37981
38006
|
daHeight
|
37982
38007
|
}
|
37983
38008
|
`;
|
37984
|
-
var
|
38009
|
+
var MessageFragmentDoc = lib_default2`
|
37985
38010
|
fragment messageFragment on Message {
|
37986
38011
|
amount
|
37987
38012
|
sender
|
@@ -37991,7 +38016,7 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
37991
38016
|
daHeight
|
37992
38017
|
}
|
37993
38018
|
`;
|
37994
|
-
var
|
38019
|
+
var MessageProofFragmentDoc = lib_default2`
|
37995
38020
|
fragment messageProofFragment on MessageProof {
|
37996
38021
|
messageProof {
|
37997
38022
|
proofSet
|
@@ -38038,14 +38063,14 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
38038
38063
|
data
|
38039
38064
|
}
|
38040
38065
|
`;
|
38041
|
-
var
|
38066
|
+
var BalanceFragmentDoc = lib_default2`
|
38042
38067
|
fragment balanceFragment on Balance {
|
38043
38068
|
owner
|
38044
38069
|
amount
|
38045
38070
|
assetId
|
38046
38071
|
}
|
38047
38072
|
`;
|
38048
|
-
var
|
38073
|
+
var BlockFragmentDoc = lib_default2`
|
38049
38074
|
fragment blockFragment on Block {
|
38050
38075
|
id
|
38051
38076
|
height
|
@@ -38057,7 +38082,7 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
38057
38082
|
}
|
38058
38083
|
}
|
38059
38084
|
`;
|
38060
|
-
var
|
38085
|
+
var TxParametersFragmentDoc = lib_default2`
|
38061
38086
|
fragment TxParametersFragment on TxParameters {
|
38062
38087
|
version
|
38063
38088
|
maxInputs
|
@@ -38068,7 +38093,7 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
38068
38093
|
maxBytecodeSubsections
|
38069
38094
|
}
|
38070
38095
|
`;
|
38071
|
-
var
|
38096
|
+
var PredicateParametersFragmentDoc = lib_default2`
|
38072
38097
|
fragment PredicateParametersFragment on PredicateParameters {
|
38073
38098
|
version
|
38074
38099
|
maxPredicateLength
|
@@ -38077,41 +38102,42 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
38077
38102
|
maxMessageDataLength
|
38078
38103
|
}
|
38079
38104
|
`;
|
38080
|
-
var
|
38105
|
+
var ScriptParametersFragmentDoc = lib_default2`
|
38081
38106
|
fragment ScriptParametersFragment on ScriptParameters {
|
38082
38107
|
version
|
38083
38108
|
maxScriptLength
|
38084
38109
|
maxScriptDataLength
|
38085
38110
|
}
|
38086
38111
|
`;
|
38087
|
-
var
|
38112
|
+
var ContractParametersFragmentDoc = lib_default2`
|
38088
38113
|
fragment ContractParametersFragment on ContractParameters {
|
38089
38114
|
version
|
38090
38115
|
contractMaxSize
|
38091
38116
|
maxStorageSlots
|
38092
38117
|
}
|
38093
38118
|
`;
|
38094
|
-
var
|
38119
|
+
var FeeParametersFragmentDoc = lib_default2`
|
38095
38120
|
fragment FeeParametersFragment on FeeParameters {
|
38096
38121
|
version
|
38097
38122
|
gasPriceFactor
|
38098
38123
|
gasPerByte
|
38099
38124
|
}
|
38100
38125
|
`;
|
38101
|
-
var
|
38126
|
+
var DependentCostFragmentDoc = lib_default2`
|
38102
38127
|
fragment DependentCostFragment on DependentCost {
|
38103
|
-
__typename
|
38104
38128
|
... on LightOperation {
|
38129
|
+
type: __typename
|
38105
38130
|
base
|
38106
38131
|
unitsPerGas
|
38107
38132
|
}
|
38108
38133
|
... on HeavyOperation {
|
38134
|
+
type: __typename
|
38109
38135
|
base
|
38110
38136
|
gasPerUnit
|
38111
38137
|
}
|
38112
38138
|
}
|
38113
38139
|
`;
|
38114
|
-
var
|
38140
|
+
var GasCostsFragmentDoc = lib_default2`
|
38115
38141
|
fragment GasCostsFragment on GasCosts {
|
38116
38142
|
version
|
38117
38143
|
add
|
@@ -38267,8 +38293,8 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
38267
38293
|
}
|
38268
38294
|
newStoragePerByte
|
38269
38295
|
}
|
38270
|
-
${
|
38271
|
-
var
|
38296
|
+
${DependentCostFragmentDoc}`;
|
38297
|
+
var ConsensusParametersFragmentDoc = lib_default2`
|
38272
38298
|
fragment consensusParametersFragment on ConsensusParameters {
|
38273
38299
|
version
|
38274
38300
|
txParams {
|
@@ -38292,13 +38318,13 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
38292
38318
|
baseAssetId
|
38293
38319
|
chainId
|
38294
38320
|
}
|
38295
|
-
${
|
38296
|
-
${
|
38297
|
-
${
|
38298
|
-
${
|
38299
|
-
${
|
38300
|
-
${
|
38301
|
-
var
|
38321
|
+
${TxParametersFragmentDoc}
|
38322
|
+
${PredicateParametersFragmentDoc}
|
38323
|
+
${ScriptParametersFragmentDoc}
|
38324
|
+
${ContractParametersFragmentDoc}
|
38325
|
+
${FeeParametersFragmentDoc}
|
38326
|
+
${GasCostsFragmentDoc}`;
|
38327
|
+
var ChainInfoFragmentDoc = lib_default2`
|
38302
38328
|
fragment chainInfoFragment on ChainInfo {
|
38303
38329
|
name
|
38304
38330
|
latestBlock {
|
@@ -38309,16 +38335,16 @@ ${GasCostsFragmentFragmentDoc}`;
|
|
38309
38335
|
...consensusParametersFragment
|
38310
38336
|
}
|
38311
38337
|
}
|
38312
|
-
${
|
38313
|
-
${
|
38314
|
-
var
|
38338
|
+
${BlockFragmentDoc}
|
38339
|
+
${ConsensusParametersFragmentDoc}`;
|
38340
|
+
var ContractBalanceFragmentDoc = lib_default2`
|
38315
38341
|
fragment contractBalanceFragment on ContractBalance {
|
38316
38342
|
contract
|
38317
38343
|
amount
|
38318
38344
|
assetId
|
38319
38345
|
}
|
38320
38346
|
`;
|
38321
|
-
var
|
38347
|
+
var PageInfoFragmentDoc = lib_default2`
|
38322
38348
|
fragment pageInfoFragment on PageInfo {
|
38323
38349
|
hasPreviousPage
|
38324
38350
|
hasNextPage
|
@@ -38326,7 +38352,7 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
38326
38352
|
endCursor
|
38327
38353
|
}
|
38328
38354
|
`;
|
38329
|
-
var
|
38355
|
+
var NodeInfoFragmentDoc = lib_default2`
|
38330
38356
|
fragment nodeInfoFragment on NodeInfo {
|
38331
38357
|
utxoValidation
|
38332
38358
|
vmBacktrace
|
@@ -38335,7 +38361,7 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
38335
38361
|
nodeVersion
|
38336
38362
|
}
|
38337
38363
|
`;
|
38338
|
-
var
|
38364
|
+
var RelayedTransactionStatusFragmentDoc = lib_default2`
|
38339
38365
|
fragment relayedTransactionStatusFragment on RelayedTransactionStatus {
|
38340
38366
|
... on RelayedTransactionFailed {
|
38341
38367
|
blockHeight
|
@@ -38356,28 +38382,28 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
38356
38382
|
...nodeInfoFragment
|
38357
38383
|
}
|
38358
38384
|
}
|
38359
|
-
${
|
38385
|
+
${NodeInfoFragmentDoc}`;
|
38360
38386
|
var GetChainDocument = lib_default2`
|
38361
38387
|
query getChain {
|
38362
38388
|
chain {
|
38363
38389
|
...chainInfoFragment
|
38364
38390
|
}
|
38365
38391
|
}
|
38366
|
-
${
|
38392
|
+
${ChainInfoFragmentDoc}`;
|
38367
38393
|
var GetTransactionDocument = lib_default2`
|
38368
38394
|
query getTransaction($transactionId: TransactionId!) {
|
38369
38395
|
transaction(id: $transactionId) {
|
38370
38396
|
...transactionFragment
|
38371
38397
|
}
|
38372
38398
|
}
|
38373
|
-
${
|
38399
|
+
${TransactionFragmentDoc}`;
|
38374
38400
|
var GetTransactionWithReceiptsDocument = lib_default2`
|
38375
38401
|
query getTransactionWithReceipts($transactionId: TransactionId!) {
|
38376
38402
|
transaction(id: $transactionId) {
|
38377
38403
|
...transactionFragment
|
38378
38404
|
}
|
38379
38405
|
}
|
38380
|
-
${
|
38406
|
+
${TransactionFragmentDoc}`;
|
38381
38407
|
var GetTransactionsDocument = lib_default2`
|
38382
38408
|
query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
|
38383
38409
|
transactions(after: $after, before: $before, first: $first, last: $last) {
|
@@ -38388,7 +38414,7 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
38388
38414
|
}
|
38389
38415
|
}
|
38390
38416
|
}
|
38391
|
-
${
|
38417
|
+
${TransactionFragmentDoc}`;
|
38392
38418
|
var GetTransactionsByOwnerDocument = lib_default2`
|
38393
38419
|
query getTransactionsByOwner($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
|
38394
38420
|
transactionsByOwner(
|
@@ -38408,22 +38434,22 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
38408
38434
|
}
|
38409
38435
|
}
|
38410
38436
|
}
|
38411
|
-
${
|
38412
|
-
${
|
38437
|
+
${PageInfoFragmentDoc}
|
38438
|
+
${TransactionFragmentDoc}`;
|
38413
38439
|
var EstimatePredicatesDocument = lib_default2`
|
38414
38440
|
query estimatePredicates($encodedTransaction: HexString!) {
|
38415
38441
|
estimatePredicates(tx: $encodedTransaction) {
|
38416
38442
|
...transactionEstimatePredicatesFragment
|
38417
38443
|
}
|
38418
38444
|
}
|
38419
|
-
${
|
38445
|
+
${TransactionEstimatePredicatesFragmentDoc}`;
|
38420
38446
|
var GetBlockDocument = lib_default2`
|
38421
38447
|
query getBlock($blockId: BlockId, $height: U32) {
|
38422
38448
|
block(id: $blockId, height: $height) {
|
38423
38449
|
...blockFragment
|
38424
38450
|
}
|
38425
38451
|
}
|
38426
|
-
${
|
38452
|
+
${BlockFragmentDoc}`;
|
38427
38453
|
var GetBlockWithTransactionsDocument = lib_default2`
|
38428
38454
|
query getBlockWithTransactions($blockId: BlockId, $blockHeight: U32) {
|
38429
38455
|
block(id: $blockId, height: $blockHeight) {
|
@@ -38433,8 +38459,8 @@ ${TransactionFragmentFragmentDoc}`;
|
|
38433
38459
|
}
|
38434
38460
|
}
|
38435
38461
|
}
|
38436
|
-
${
|
38437
|
-
${
|
38462
|
+
${BlockFragmentDoc}
|
38463
|
+
${TransactionFragmentDoc}`;
|
38438
38464
|
var GetBlocksDocument = lib_default2`
|
38439
38465
|
query getBlocks($after: String, $before: String, $first: Int, $last: Int) {
|
38440
38466
|
blocks(after: $after, before: $before, first: $first, last: $last) {
|
@@ -38445,14 +38471,14 @@ ${TransactionFragmentFragmentDoc}`;
|
|
38445
38471
|
}
|
38446
38472
|
}
|
38447
38473
|
}
|
38448
|
-
${
|
38474
|
+
${BlockFragmentDoc}`;
|
38449
38475
|
var GetCoinDocument = lib_default2`
|
38450
38476
|
query getCoin($coinId: UtxoId!) {
|
38451
38477
|
coin(utxoId: $coinId) {
|
38452
38478
|
...coinFragment
|
38453
38479
|
}
|
38454
38480
|
}
|
38455
|
-
${
|
38481
|
+
${CoinFragmentDoc}`;
|
38456
38482
|
var GetCoinsDocument = lib_default2`
|
38457
38483
|
query getCoins($filter: CoinFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
38458
38484
|
coins(
|
@@ -38469,7 +38495,7 @@ ${TransactionFragmentFragmentDoc}`;
|
|
38469
38495
|
}
|
38470
38496
|
}
|
38471
38497
|
}
|
38472
|
-
${
|
38498
|
+
${CoinFragmentDoc}`;
|
38473
38499
|
var GetCoinsToSpendDocument = lib_default2`
|
38474
38500
|
query getCoinsToSpend($owner: Address!, $queryPerAsset: [SpendQueryElementInput!]!, $excludedIds: ExcludeInput) {
|
38475
38501
|
coinsToSpend(
|
@@ -38481,8 +38507,8 @@ ${TransactionFragmentFragmentDoc}`;
|
|
38481
38507
|
...messageCoinFragment
|
38482
38508
|
}
|
38483
38509
|
}
|
38484
|
-
${
|
38485
|
-
${
|
38510
|
+
${CoinFragmentDoc}
|
38511
|
+
${MessageCoinFragmentDoc}`;
|
38486
38512
|
var GetContractDocument = lib_default2`
|
38487
38513
|
query getContract($contractId: ContractId!) {
|
38488
38514
|
contract(id: $contractId) {
|
@@ -38497,14 +38523,14 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
38497
38523
|
...contractBalanceFragment
|
38498
38524
|
}
|
38499
38525
|
}
|
38500
|
-
${
|
38526
|
+
${ContractBalanceFragmentDoc}`;
|
38501
38527
|
var GetBalanceDocument = lib_default2`
|
38502
38528
|
query getBalance($owner: Address!, $assetId: AssetId!) {
|
38503
38529
|
balance(owner: $owner, assetId: $assetId) {
|
38504
38530
|
...balanceFragment
|
38505
38531
|
}
|
38506
38532
|
}
|
38507
|
-
${
|
38533
|
+
${BalanceFragmentDoc}`;
|
38508
38534
|
var GetLatestGasPriceDocument = lib_default2`
|
38509
38535
|
query getLatestGasPrice {
|
38510
38536
|
latestGasPrice {
|
@@ -38535,7 +38561,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
38535
38561
|
}
|
38536
38562
|
}
|
38537
38563
|
}
|
38538
|
-
${
|
38564
|
+
${BalanceFragmentDoc}`;
|
38539
38565
|
var GetMessagesDocument = lib_default2`
|
38540
38566
|
query getMessages($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
|
38541
38567
|
messages(
|
@@ -38552,7 +38578,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
38552
38578
|
}
|
38553
38579
|
}
|
38554
38580
|
}
|
38555
|
-
${
|
38581
|
+
${MessageFragmentDoc}`;
|
38556
38582
|
var GetMessageProofDocument = lib_default2`
|
38557
38583
|
query getMessageProof($transactionId: TransactionId!, $nonce: Nonce!, $commitBlockId: BlockId, $commitBlockHeight: U32) {
|
38558
38584
|
messageProof(
|
@@ -38564,7 +38590,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
38564
38590
|
...messageProofFragment
|
38565
38591
|
}
|
38566
38592
|
}
|
38567
|
-
${
|
38593
|
+
${MessageProofFragmentDoc}`;
|
38568
38594
|
var GetMessageStatusDocument = lib_default2`
|
38569
38595
|
query getMessageStatus($nonce: Nonce!) {
|
38570
38596
|
messageStatus(nonce: $nonce) {
|
@@ -38578,14 +38604,14 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
38578
38604
|
...relayedTransactionStatusFragment
|
38579
38605
|
}
|
38580
38606
|
}
|
38581
|
-
${
|
38607
|
+
${RelayedTransactionStatusFragmentDoc}`;
|
38582
38608
|
var DryRunDocument = lib_default2`
|
38583
38609
|
mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean) {
|
38584
38610
|
dryRun(txs: $encodedTransactions, utxoValidation: $utxoValidation) {
|
38585
38611
|
...dryRunTransactionExecutionStatusFragment
|
38586
38612
|
}
|
38587
38613
|
}
|
38588
|
-
${
|
38614
|
+
${DryRunTransactionExecutionStatusFragmentDoc}`;
|
38589
38615
|
var SubmitDocument = lib_default2`
|
38590
38616
|
mutation submit($encodedTransaction: HexString!) {
|
38591
38617
|
submit(tx: $encodedTransaction) {
|
@@ -38607,21 +38633,21 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
38607
38633
|
...messageFragment
|
38608
38634
|
}
|
38609
38635
|
}
|
38610
|
-
${
|
38636
|
+
${MessageFragmentDoc}`;
|
38611
38637
|
var SubmitAndAwaitDocument = lib_default2`
|
38612
38638
|
subscription submitAndAwait($encodedTransaction: HexString!) {
|
38613
38639
|
submitAndAwait(tx: $encodedTransaction) {
|
38614
38640
|
...transactionStatusSubscriptionFragment
|
38615
38641
|
}
|
38616
38642
|
}
|
38617
|
-
${
|
38643
|
+
${TransactionStatusSubscriptionFragmentDoc}`;
|
38618
38644
|
var StatusChangeDocument = lib_default2`
|
38619
38645
|
subscription statusChange($transactionId: TransactionId!) {
|
38620
38646
|
statusChange(id: $transactionId) {
|
38621
38647
|
...transactionStatusSubscriptionFragment
|
38622
38648
|
}
|
38623
38649
|
}
|
38624
|
-
${
|
38650
|
+
${TransactionStatusSubscriptionFragmentDoc}`;
|
38625
38651
|
function getSdk(requester) {
|
38626
38652
|
return {
|
38627
38653
|
getVersion(variables, options) {
|
@@ -39314,10 +39340,9 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
39314
39340
|
function resolveGasDependentCosts(byteSize, gasDependentCost) {
|
39315
39341
|
const base = bn(gasDependentCost.base);
|
39316
39342
|
let dependentValue = bn(0);
|
39317
|
-
if (
|
39343
|
+
if ("unitsPerGas" in gasDependentCost) {
|
39318
39344
|
dependentValue = bn(byteSize).div(bn(gasDependentCost.unitsPerGas));
|
39319
|
-
}
|
39320
|
-
if (gasDependentCost.__typename === "HeavyOperation") {
|
39345
|
+
} else {
|
39321
39346
|
dependentValue = bn(byteSize).mul(bn(gasDependentCost.gasPerUnit));
|
39322
39347
|
}
|
39323
39348
|
return base.add(dependentValue);
|
@@ -41612,9 +41637,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
41612
41637
|
static ensureClientVersionIsSupported(nodeInfo) {
|
41613
41638
|
const { isMajorSupported, isMinorSupported, supportedVersion } = checkFuelCoreVersionCompatibility(nodeInfo.nodeVersion);
|
41614
41639
|
if (!isMajorSupported || !isMinorSupported) {
|
41615
|
-
|
41616
|
-
|
41617
|
-
|
41640
|
+
console.warn(
|
41641
|
+
`The Fuel Node that you are trying to connect to is using fuel-core version ${nodeInfo.nodeVersion},
|
41642
|
+
which is not supported by the version of the TS SDK that you are using.
|
41643
|
+
Things may not work as expected.
|
41644
|
+
Supported fuel-core version: ${supportedVersion}.`
|
41618
41645
|
);
|
41619
41646
|
}
|
41620
41647
|
}
|
@@ -42051,10 +42078,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42051
42078
|
const txRequestClone = clone_default(transactionRequestify(transactionRequestLike));
|
42052
42079
|
const isScriptTransaction = txRequestClone.type === TransactionType.Script;
|
42053
42080
|
const baseAssetId = this.getBaseAssetId();
|
42081
|
+
const updateMaxFee = txRequestClone.maxFee.eq(0);
|
42054
42082
|
const coinOutputsQuantities = txRequestClone.getCoinOutputsQuantities();
|
42055
42083
|
const allQuantities = mergeQuantities(coinOutputsQuantities, quantitiesToContract);
|
42056
42084
|
txRequestClone.fundWithFakeUtxos(allQuantities, baseAssetId, resourcesOwner?.address);
|
42057
|
-
txRequestClone.maxFee = bn(0);
|
42058
42085
|
if (isScriptTransaction) {
|
42059
42086
|
txRequestClone.gasLimit = bn(0);
|
42060
42087
|
}
|
@@ -42069,6 +42096,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42069
42096
|
addedSignatures = signedRequest.witnesses.length - lengthBefore;
|
42070
42097
|
}
|
42071
42098
|
await this.estimatePredicates(signedRequest);
|
42099
|
+
txRequestClone.updatePredicateGasUsed(signedRequest.inputs);
|
42072
42100
|
let { maxFee, maxGas, minFee, minGas, gasPrice, gasLimit } = await this.estimateTxGasAndFee({
|
42073
42101
|
transactionRequest: signedRequest
|
42074
42102
|
});
|
@@ -42077,7 +42105,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42077
42105
|
let missingContractIds = [];
|
42078
42106
|
let outputVariables = 0;
|
42079
42107
|
let gasUsed = bn(0);
|
42080
|
-
txRequestClone.updatePredicateGasUsed(signedRequest.inputs);
|
42081
42108
|
txRequestClone.maxFee = maxFee;
|
42082
42109
|
if (isScriptTransaction) {
|
42083
42110
|
txRequestClone.gasLimit = gasLimit;
|
@@ -42105,7 +42132,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42105
42132
|
missingContractIds,
|
42106
42133
|
addedSignatures,
|
42107
42134
|
estimatedPredicates: txRequestClone.inputs,
|
42108
|
-
dryRunStatus
|
42135
|
+
dryRunStatus,
|
42136
|
+
updateMaxFee
|
42109
42137
|
};
|
42110
42138
|
}
|
42111
42139
|
async getResourcesForTransaction(owner, transactionRequestLike, quantitiesToContract = []) {
|
@@ -42178,7 +42206,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42178
42206
|
};
|
42179
42207
|
const result = await this.operations.getCoinsToSpend(coinsQuery);
|
42180
42208
|
const coins = result.coinsToSpend.flat().map((coin) => {
|
42181
|
-
switch (coin.
|
42209
|
+
switch (coin.type) {
|
42182
42210
|
case "MessageCoin":
|
42183
42211
|
return {
|
42184
42212
|
amount: bn(coin.amount),
|
@@ -42757,8 +42785,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42757
42785
|
}));
|
42758
42786
|
}
|
42759
42787
|
|
42760
|
-
// src/providers/assets/
|
42761
|
-
var
|
42788
|
+
// src/providers/assets/utils/fuelAssetsBaseUrl.ts
|
42789
|
+
var fuelAssetsBaseUrl = "https://cdn.fuel.network/assets/";
|
42790
|
+
|
42791
|
+
// src/providers/assets/assets.ts
|
42792
|
+
var rawAssets = [
|
42762
42793
|
{
|
42763
42794
|
name: "Ethereum",
|
42764
42795
|
symbol: "ETH",
|
@@ -42789,6 +42820,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42789
42820
|
]
|
42790
42821
|
}
|
42791
42822
|
];
|
42823
|
+
var assets = resolveIconPaths(rawAssets, fuelAssetsBaseUrl);
|
42792
42824
|
|
42793
42825
|
// src/providers/transaction-request/helpers.ts
|
42794
42826
|
var isRequestInputCoin = (input) => input.type === InputType.Coin;
|
@@ -42993,18 +43025,18 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42993
43025
|
return balances;
|
42994
43026
|
}
|
42995
43027
|
/**
|
42996
|
-
*
|
43028
|
+
* Funds a transaction request by adding the necessary resources.
|
42997
43029
|
*
|
42998
|
-
* @
|
42999
|
-
* @param
|
43000
|
-
* @param
|
43001
|
-
* @returns
|
43030
|
+
* @typeParam T - The type of the TransactionRequest.
|
43031
|
+
* @param request - The transaction request to fund.
|
43032
|
+
* @param params - The estimated transaction parameters.
|
43033
|
+
* @returns The funded transaction request.
|
43002
43034
|
*/
|
43003
43035
|
async fund(request, params) {
|
43004
|
-
const { addedSignatures, estimatedPredicates,
|
43036
|
+
const { addedSignatures, estimatedPredicates, requiredQuantities, updateMaxFee } = params;
|
43037
|
+
const fee = request.maxFee;
|
43005
43038
|
const baseAssetId = this.provider.getBaseAssetId();
|
43006
43039
|
const requiredInBaseAsset = requiredQuantities.find((quantity) => quantity.assetId === baseAssetId)?.amount || bn(0);
|
43007
|
-
const txRequest = request;
|
43008
43040
|
const requiredQuantitiesWithFee = addAmountToCoinQuantities({
|
43009
43041
|
amount: bn(fee),
|
43010
43042
|
assetId: baseAssetId,
|
@@ -43041,14 +43073,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43041
43073
|
cacheTxInputsFromOwner(request.inputs, this.address)
|
43042
43074
|
);
|
43043
43075
|
request.addResources(resources);
|
43044
|
-
|
43045
|
-
|
43046
|
-
const requestToReestimate2 = clone_default(
|
43076
|
+
request.shiftPredicateData();
|
43077
|
+
request.updatePredicateGasUsed(estimatedPredicates);
|
43078
|
+
const requestToReestimate2 = clone_default(request);
|
43047
43079
|
if (addedSignatures) {
|
43048
43080
|
Array.from({ length: addedSignatures }).forEach(
|
43049
43081
|
() => requestToReestimate2.addEmptyWitness()
|
43050
43082
|
);
|
43051
43083
|
}
|
43084
|
+
if (!updateMaxFee) {
|
43085
|
+
break;
|
43086
|
+
}
|
43052
43087
|
const { maxFee: newFee } = await this.provider.estimateTxGasAndFee({
|
43053
43088
|
transactionRequest: requestToReestimate2
|
43054
43089
|
});
|
@@ -43070,17 +43105,20 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43070
43105
|
}
|
43071
43106
|
fundingAttempts += 1;
|
43072
43107
|
}
|
43073
|
-
|
43074
|
-
|
43075
|
-
const requestToReestimate = clone_default(
|
43108
|
+
request.shiftPredicateData();
|
43109
|
+
request.updatePredicateGasUsed(estimatedPredicates);
|
43110
|
+
const requestToReestimate = clone_default(request);
|
43076
43111
|
if (addedSignatures) {
|
43077
43112
|
Array.from({ length: addedSignatures }).forEach(() => requestToReestimate.addEmptyWitness());
|
43078
43113
|
}
|
43114
|
+
if (!updateMaxFee) {
|
43115
|
+
return request;
|
43116
|
+
}
|
43079
43117
|
const { maxFee } = await this.provider.estimateTxGasAndFee({
|
43080
43118
|
transactionRequest: requestToReestimate
|
43081
43119
|
});
|
43082
|
-
|
43083
|
-
return
|
43120
|
+
request.maxFee = maxFee;
|
43121
|
+
return request;
|
43084
43122
|
}
|
43085
43123
|
/**
|
43086
43124
|
* A helper that creates a transfer transaction request and returns it.
|
@@ -43092,20 +43130,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43092
43130
|
* @returns A promise that resolves to the prepared transaction request.
|
43093
43131
|
*/
|
43094
43132
|
async createTransfer(destination, amount, assetId, txParams = {}) {
|
43095
|
-
|
43133
|
+
let request = new ScriptTransactionRequest(txParams);
|
43096
43134
|
const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
|
43097
43135
|
request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetIdToTransfer);
|
43098
43136
|
const txCost = await this.provider.getTransactionCost(request, {
|
43099
43137
|
estimateTxDependencies: true,
|
43100
43138
|
resourcesOwner: this
|
43101
43139
|
});
|
43102
|
-
this.validateGasLimitAndMaxFee({
|
43140
|
+
request = this.validateGasLimitAndMaxFee({
|
43141
|
+
transactionRequest: request,
|
43103
43142
|
gasUsed: txCost.gasUsed,
|
43104
43143
|
maxFee: txCost.maxFee,
|
43105
43144
|
txParams
|
43106
43145
|
});
|
43107
|
-
request.gasLimit = txCost.gasUsed;
|
43108
|
-
request.maxFee = txCost.maxFee;
|
43109
43146
|
await this.fund(request, txCost);
|
43110
43147
|
return request;
|
43111
43148
|
}
|
@@ -43152,7 +43189,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43152
43189
|
amountToTransfer: bn(amount),
|
43153
43190
|
assetId: assetIdToTransfer
|
43154
43191
|
});
|
43155
|
-
|
43192
|
+
let request = new ScriptTransactionRequest({
|
43156
43193
|
...txParams,
|
43157
43194
|
script,
|
43158
43195
|
scriptData
|
@@ -43162,13 +43199,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43162
43199
|
resourcesOwner: this,
|
43163
43200
|
quantitiesToContract: [{ amount: bn(amount), assetId: String(assetIdToTransfer) }]
|
43164
43201
|
});
|
43165
|
-
this.validateGasLimitAndMaxFee({
|
43202
|
+
request = this.validateGasLimitAndMaxFee({
|
43203
|
+
transactionRequest: request,
|
43166
43204
|
gasUsed: txCost.gasUsed,
|
43167
43205
|
maxFee: txCost.maxFee,
|
43168
43206
|
txParams
|
43169
43207
|
});
|
43170
|
-
request.gasLimit = txCost.gasUsed;
|
43171
|
-
request.maxFee = txCost.maxFee;
|
43172
43208
|
await this.fund(request, txCost);
|
43173
43209
|
return this.sendTransaction(request);
|
43174
43210
|
}
|
@@ -43195,16 +43231,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43195
43231
|
]);
|
43196
43232
|
const params = { script, ...txParams };
|
43197
43233
|
const baseAssetId = this.provider.getBaseAssetId();
|
43198
|
-
|
43234
|
+
let request = new ScriptTransactionRequest(params);
|
43199
43235
|
const quantitiesToContract = [{ amount: bn(amount), assetId: baseAssetId }];
|
43200
43236
|
const txCost = await this.provider.getTransactionCost(request, { quantitiesToContract });
|
43201
|
-
this.validateGasLimitAndMaxFee({
|
43237
|
+
request = this.validateGasLimitAndMaxFee({
|
43238
|
+
transactionRequest: request,
|
43202
43239
|
gasUsed: txCost.gasUsed,
|
43203
43240
|
maxFee: txCost.maxFee,
|
43204
43241
|
txParams
|
43205
43242
|
});
|
43206
|
-
request.maxFee = txCost.maxFee;
|
43207
|
-
request.gasLimit = txCost.gasUsed;
|
43208
43243
|
await this.fund(request, txCost);
|
43209
43244
|
return this.sendTransaction(request);
|
43210
43245
|
}
|
@@ -43264,22 +43299,29 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43264
43299
|
return this.provider.simulate(transactionRequest, { estimateTxDependencies: false });
|
43265
43300
|
}
|
43266
43301
|
validateGasLimitAndMaxFee({
|
43267
|
-
txParams: { gasLimit: setGasLimit, maxFee: setMaxFee },
|
43268
43302
|
gasUsed,
|
43269
|
-
maxFee
|
43303
|
+
maxFee,
|
43304
|
+
transactionRequest,
|
43305
|
+
txParams: { gasLimit: setGasLimit, maxFee: setMaxFee }
|
43270
43306
|
}) {
|
43271
|
-
|
43307
|
+
const request = transactionRequestify(transactionRequest);
|
43308
|
+
if (!isDefined(setGasLimit)) {
|
43309
|
+
request.gasLimit = gasUsed;
|
43310
|
+
} else if (gasUsed.gt(setGasLimit)) {
|
43272
43311
|
throw new FuelError(
|
43273
43312
|
ErrorCode.GAS_LIMIT_TOO_LOW,
|
43274
43313
|
`Gas limit '${setGasLimit}' is lower than the required: '${gasUsed}'.`
|
43275
43314
|
);
|
43276
43315
|
}
|
43277
|
-
if (isDefined(setMaxFee)
|
43316
|
+
if (!isDefined(setMaxFee)) {
|
43317
|
+
request.maxFee = maxFee;
|
43318
|
+
} else if (maxFee.gt(setMaxFee)) {
|
43278
43319
|
throw new FuelError(
|
43279
43320
|
ErrorCode.MAX_FEE_TOO_LOW,
|
43280
43321
|
`Max fee '${setMaxFee}' is lower than the required: '${maxFee}'.`
|
43281
43322
|
);
|
43282
43323
|
}
|
43324
|
+
return request;
|
43283
43325
|
}
|
43284
43326
|
};
|
43285
43327
|
|