@fuel-ts/account 0.0.0-rc-2241-20240508114911 → 0.0.0-rc-2037-20240508123129
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 +197 -168
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +430 -387
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +337 -301
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts +9 -2
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +552 -346
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +10 -4
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/transaction-request/helpers.d.ts +4 -0
- package/dist/providers/transaction-request/helpers.d.ts.map +1 -1
- package/dist/providers/transaction-request/index.d.ts +1 -0
- package/dist/providers/transaction-request/index.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +2 -0
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/utils.d.ts +0 -4
- package/dist/providers/transaction-request/utils.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 +13 -5
- 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/seedTestWallet.d.ts +1 -1
- package/dist/test-utils/seedTestWallet.d.ts.map +1 -1
- package/dist/test-utils.global.js +163 -175
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +373 -385
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +292 -304
- package/dist/test-utils.mjs.map +1 -1
- package/dist/wallet/base-wallet-unlocked.d.ts +2 -2
- package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
- package/package.json +15 -15
package/dist/index.global.js
CHANGED
@@ -37810,7 +37810,7 @@ spurious results.`);
|
|
37810
37810
|
var lib_default2 = gql;
|
37811
37811
|
|
37812
37812
|
// src/providers/__generated__/operations.ts
|
37813
|
-
var
|
37813
|
+
var TransactionStatusSubscriptionFragmentFragmentDoc = lib_default2`
|
37814
37814
|
fragment transactionStatusSubscriptionFragment on TransactionStatus {
|
37815
37815
|
type: __typename
|
37816
37816
|
... on SqueezedOutStatus {
|
@@ -37818,13 +37818,7 @@ spurious results.`);
|
|
37818
37818
|
}
|
37819
37819
|
}
|
37820
37820
|
`;
|
37821
|
-
var
|
37822
|
-
fragment SubmittedStatusFragment on SubmittedStatus {
|
37823
|
-
type: __typename
|
37824
|
-
time
|
37825
|
-
}
|
37826
|
-
`;
|
37827
|
-
var ReceiptFragmentDoc = lib_default2`
|
37821
|
+
var ReceiptFragmentFragmentDoc = lib_default2`
|
37828
37822
|
fragment receiptFragment on Receipt {
|
37829
37823
|
id
|
37830
37824
|
pc
|
@@ -37856,65 +37850,45 @@ spurious results.`);
|
|
37856
37850
|
subId
|
37857
37851
|
}
|
37858
37852
|
`;
|
37859
|
-
var
|
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 {
|
37894
|
-
type: __typename
|
37895
|
-
reason
|
37896
|
-
}
|
37897
|
-
`;
|
37898
|
-
var TransactionStatusFragmentDoc = lib_default2`
|
37853
|
+
var TransactionStatusFragmentFragmentDoc = lib_default2`
|
37899
37854
|
fragment transactionStatusFragment on TransactionStatus {
|
37855
|
+
type: __typename
|
37900
37856
|
... on SubmittedStatus {
|
37901
|
-
|
37857
|
+
time
|
37902
37858
|
}
|
37903
37859
|
... on SuccessStatus {
|
37904
|
-
|
37860
|
+
block {
|
37861
|
+
id
|
37862
|
+
}
|
37863
|
+
time
|
37864
|
+
programState {
|
37865
|
+
returnType
|
37866
|
+
data
|
37867
|
+
}
|
37868
|
+
receipts {
|
37869
|
+
...receiptFragment
|
37870
|
+
}
|
37871
|
+
totalGas
|
37872
|
+
totalFee
|
37905
37873
|
}
|
37906
37874
|
... on FailureStatus {
|
37907
|
-
|
37875
|
+
block {
|
37876
|
+
id
|
37877
|
+
}
|
37878
|
+
totalGas
|
37879
|
+
totalFee
|
37880
|
+
time
|
37881
|
+
reason
|
37882
|
+
receipts {
|
37883
|
+
...receiptFragment
|
37884
|
+
}
|
37908
37885
|
}
|
37909
37886
|
... on SqueezedOutStatus {
|
37910
|
-
|
37887
|
+
reason
|
37911
37888
|
}
|
37912
37889
|
}
|
37913
|
-
${
|
37914
|
-
|
37915
|
-
${FailureStatusFragmentDoc}
|
37916
|
-
${SqueezedOutStatusFragmentDoc}`;
|
37917
|
-
var TransactionFragmentDoc = lib_default2`
|
37890
|
+
${ReceiptFragmentFragmentDoc}`;
|
37891
|
+
var TransactionFragmentFragmentDoc = lib_default2`
|
37918
37892
|
fragment transactionFragment on Transaction {
|
37919
37893
|
id
|
37920
37894
|
rawPayload
|
@@ -37922,8 +37896,8 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
37922
37896
|
...transactionStatusFragment
|
37923
37897
|
}
|
37924
37898
|
}
|
37925
|
-
${
|
37926
|
-
var
|
37899
|
+
${TransactionStatusFragmentFragmentDoc}`;
|
37900
|
+
var InputEstimatePredicatesFragmentFragmentDoc = lib_default2`
|
37927
37901
|
fragment inputEstimatePredicatesFragment on Input {
|
37928
37902
|
... on InputCoin {
|
37929
37903
|
predicateGasUsed
|
@@ -37933,14 +37907,14 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
37933
37907
|
}
|
37934
37908
|
}
|
37935
37909
|
`;
|
37936
|
-
var
|
37910
|
+
var TransactionEstimatePredicatesFragmentFragmentDoc = lib_default2`
|
37937
37911
|
fragment transactionEstimatePredicatesFragment on Transaction {
|
37938
37912
|
inputs {
|
37939
37913
|
...inputEstimatePredicatesFragment
|
37940
37914
|
}
|
37941
37915
|
}
|
37942
|
-
${
|
37943
|
-
var
|
37916
|
+
${InputEstimatePredicatesFragmentFragmentDoc}`;
|
37917
|
+
var DryRunFailureStatusFragmentFragmentDoc = lib_default2`
|
37944
37918
|
fragment dryRunFailureStatusFragment on DryRunFailureStatus {
|
37945
37919
|
totalGas
|
37946
37920
|
totalFee
|
@@ -37951,7 +37925,7 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
37951
37925
|
}
|
37952
37926
|
}
|
37953
37927
|
`;
|
37954
|
-
var
|
37928
|
+
var DryRunSuccessStatusFragmentFragmentDoc = lib_default2`
|
37955
37929
|
fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
|
37956
37930
|
totalGas
|
37957
37931
|
totalFee
|
@@ -37961,7 +37935,7 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
37961
37935
|
}
|
37962
37936
|
}
|
37963
37937
|
`;
|
37964
|
-
var
|
37938
|
+
var DryRunTransactionStatusFragmentFragmentDoc = lib_default2`
|
37965
37939
|
fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
|
37966
37940
|
... on DryRunFailureStatus {
|
37967
37941
|
...dryRunFailureStatusFragment
|
@@ -37970,9 +37944,9 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
37970
37944
|
...dryRunSuccessStatusFragment
|
37971
37945
|
}
|
37972
37946
|
}
|
37973
|
-
${
|
37974
|
-
${
|
37975
|
-
var
|
37947
|
+
${DryRunFailureStatusFragmentFragmentDoc}
|
37948
|
+
${DryRunSuccessStatusFragmentFragmentDoc}`;
|
37949
|
+
var DryRunTransactionExecutionStatusFragmentFragmentDoc = lib_default2`
|
37976
37950
|
fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
|
37977
37951
|
id
|
37978
37952
|
status {
|
@@ -37982,11 +37956,11 @@ ${DryRunSuccessStatusFragmentDoc}`;
|
|
37982
37956
|
...receiptFragment
|
37983
37957
|
}
|
37984
37958
|
}
|
37985
|
-
${
|
37986
|
-
${
|
37987
|
-
var
|
37959
|
+
${DryRunTransactionStatusFragmentFragmentDoc}
|
37960
|
+
${ReceiptFragmentFragmentDoc}`;
|
37961
|
+
var CoinFragmentFragmentDoc = lib_default2`
|
37988
37962
|
fragment coinFragment on Coin {
|
37989
|
-
|
37963
|
+
__typename
|
37990
37964
|
utxoId
|
37991
37965
|
owner
|
37992
37966
|
amount
|
@@ -37995,9 +37969,9 @@ ${ReceiptFragmentDoc}`;
|
|
37995
37969
|
txCreatedIdx
|
37996
37970
|
}
|
37997
37971
|
`;
|
37998
|
-
var
|
37972
|
+
var MessageCoinFragmentFragmentDoc = lib_default2`
|
37999
37973
|
fragment messageCoinFragment on MessageCoin {
|
38000
|
-
|
37974
|
+
__typename
|
38001
37975
|
sender
|
38002
37976
|
recipient
|
38003
37977
|
nonce
|
@@ -38006,7 +37980,7 @@ ${ReceiptFragmentDoc}`;
|
|
38006
37980
|
daHeight
|
38007
37981
|
}
|
38008
37982
|
`;
|
38009
|
-
var
|
37983
|
+
var MessageFragmentFragmentDoc = lib_default2`
|
38010
37984
|
fragment messageFragment on Message {
|
38011
37985
|
amount
|
38012
37986
|
sender
|
@@ -38016,7 +37990,7 @@ ${ReceiptFragmentDoc}`;
|
|
38016
37990
|
daHeight
|
38017
37991
|
}
|
38018
37992
|
`;
|
38019
|
-
var
|
37993
|
+
var MessageProofFragmentFragmentDoc = lib_default2`
|
38020
37994
|
fragment messageProofFragment on MessageProof {
|
38021
37995
|
messageProof {
|
38022
37996
|
proofSet
|
@@ -38063,14 +38037,14 @@ ${ReceiptFragmentDoc}`;
|
|
38063
38037
|
data
|
38064
38038
|
}
|
38065
38039
|
`;
|
38066
|
-
var
|
38040
|
+
var BalanceFragmentFragmentDoc = lib_default2`
|
38067
38041
|
fragment balanceFragment on Balance {
|
38068
38042
|
owner
|
38069
38043
|
amount
|
38070
38044
|
assetId
|
38071
38045
|
}
|
38072
38046
|
`;
|
38073
|
-
var
|
38047
|
+
var BlockFragmentFragmentDoc = lib_default2`
|
38074
38048
|
fragment blockFragment on Block {
|
38075
38049
|
id
|
38076
38050
|
height
|
@@ -38082,7 +38056,7 @@ ${ReceiptFragmentDoc}`;
|
|
38082
38056
|
}
|
38083
38057
|
}
|
38084
38058
|
`;
|
38085
|
-
var
|
38059
|
+
var TxParametersFragmentFragmentDoc = lib_default2`
|
38086
38060
|
fragment TxParametersFragment on TxParameters {
|
38087
38061
|
version
|
38088
38062
|
maxInputs
|
@@ -38093,7 +38067,7 @@ ${ReceiptFragmentDoc}`;
|
|
38093
38067
|
maxBytecodeSubsections
|
38094
38068
|
}
|
38095
38069
|
`;
|
38096
|
-
var
|
38070
|
+
var PredicateParametersFragmentFragmentDoc = lib_default2`
|
38097
38071
|
fragment PredicateParametersFragment on PredicateParameters {
|
38098
38072
|
version
|
38099
38073
|
maxPredicateLength
|
@@ -38102,42 +38076,41 @@ ${ReceiptFragmentDoc}`;
|
|
38102
38076
|
maxMessageDataLength
|
38103
38077
|
}
|
38104
38078
|
`;
|
38105
|
-
var
|
38079
|
+
var ScriptParametersFragmentFragmentDoc = lib_default2`
|
38106
38080
|
fragment ScriptParametersFragment on ScriptParameters {
|
38107
38081
|
version
|
38108
38082
|
maxScriptLength
|
38109
38083
|
maxScriptDataLength
|
38110
38084
|
}
|
38111
38085
|
`;
|
38112
|
-
var
|
38086
|
+
var ContractParametersFragmentFragmentDoc = lib_default2`
|
38113
38087
|
fragment ContractParametersFragment on ContractParameters {
|
38114
38088
|
version
|
38115
38089
|
contractMaxSize
|
38116
38090
|
maxStorageSlots
|
38117
38091
|
}
|
38118
38092
|
`;
|
38119
|
-
var
|
38093
|
+
var FeeParametersFragmentFragmentDoc = lib_default2`
|
38120
38094
|
fragment FeeParametersFragment on FeeParameters {
|
38121
38095
|
version
|
38122
38096
|
gasPriceFactor
|
38123
38097
|
gasPerByte
|
38124
38098
|
}
|
38125
38099
|
`;
|
38126
|
-
var
|
38100
|
+
var DependentCostFragmentFragmentDoc = lib_default2`
|
38127
38101
|
fragment DependentCostFragment on DependentCost {
|
38102
|
+
__typename
|
38128
38103
|
... on LightOperation {
|
38129
|
-
type: __typename
|
38130
38104
|
base
|
38131
38105
|
unitsPerGas
|
38132
38106
|
}
|
38133
38107
|
... on HeavyOperation {
|
38134
|
-
type: __typename
|
38135
38108
|
base
|
38136
38109
|
gasPerUnit
|
38137
38110
|
}
|
38138
38111
|
}
|
38139
38112
|
`;
|
38140
|
-
var
|
38113
|
+
var GasCostsFragmentFragmentDoc = lib_default2`
|
38141
38114
|
fragment GasCostsFragment on GasCosts {
|
38142
38115
|
version
|
38143
38116
|
add
|
@@ -38293,8 +38266,8 @@ ${ReceiptFragmentDoc}`;
|
|
38293
38266
|
}
|
38294
38267
|
newStoragePerByte
|
38295
38268
|
}
|
38296
|
-
${
|
38297
|
-
var
|
38269
|
+
${DependentCostFragmentFragmentDoc}`;
|
38270
|
+
var ConsensusParametersFragmentFragmentDoc = lib_default2`
|
38298
38271
|
fragment consensusParametersFragment on ConsensusParameters {
|
38299
38272
|
version
|
38300
38273
|
txParams {
|
@@ -38318,13 +38291,13 @@ ${ReceiptFragmentDoc}`;
|
|
38318
38291
|
baseAssetId
|
38319
38292
|
chainId
|
38320
38293
|
}
|
38321
|
-
${
|
38322
|
-
${
|
38323
|
-
${
|
38324
|
-
${
|
38325
|
-
${
|
38326
|
-
${
|
38327
|
-
var
|
38294
|
+
${TxParametersFragmentFragmentDoc}
|
38295
|
+
${PredicateParametersFragmentFragmentDoc}
|
38296
|
+
${ScriptParametersFragmentFragmentDoc}
|
38297
|
+
${ContractParametersFragmentFragmentDoc}
|
38298
|
+
${FeeParametersFragmentFragmentDoc}
|
38299
|
+
${GasCostsFragmentFragmentDoc}`;
|
38300
|
+
var ChainInfoFragmentFragmentDoc = lib_default2`
|
38328
38301
|
fragment chainInfoFragment on ChainInfo {
|
38329
38302
|
name
|
38330
38303
|
latestBlock {
|
@@ -38335,16 +38308,16 @@ ${GasCostsFragmentDoc}`;
|
|
38335
38308
|
...consensusParametersFragment
|
38336
38309
|
}
|
38337
38310
|
}
|
38338
|
-
${
|
38339
|
-
${
|
38340
|
-
var
|
38311
|
+
${BlockFragmentFragmentDoc}
|
38312
|
+
${ConsensusParametersFragmentFragmentDoc}`;
|
38313
|
+
var ContractBalanceFragmentFragmentDoc = lib_default2`
|
38341
38314
|
fragment contractBalanceFragment on ContractBalance {
|
38342
38315
|
contract
|
38343
38316
|
amount
|
38344
38317
|
assetId
|
38345
38318
|
}
|
38346
38319
|
`;
|
38347
|
-
var
|
38320
|
+
var PageInfoFragmentFragmentDoc = lib_default2`
|
38348
38321
|
fragment pageInfoFragment on PageInfo {
|
38349
38322
|
hasPreviousPage
|
38350
38323
|
hasNextPage
|
@@ -38352,7 +38325,7 @@ ${ConsensusParametersFragmentDoc}`;
|
|
38352
38325
|
endCursor
|
38353
38326
|
}
|
38354
38327
|
`;
|
38355
|
-
var
|
38328
|
+
var NodeInfoFragmentFragmentDoc = lib_default2`
|
38356
38329
|
fragment nodeInfoFragment on NodeInfo {
|
38357
38330
|
utxoValidation
|
38358
38331
|
vmBacktrace
|
@@ -38361,7 +38334,7 @@ ${ConsensusParametersFragmentDoc}`;
|
|
38361
38334
|
nodeVersion
|
38362
38335
|
}
|
38363
38336
|
`;
|
38364
|
-
var
|
38337
|
+
var RelayedTransactionStatusFragmentFragmentDoc = lib_default2`
|
38365
38338
|
fragment relayedTransactionStatusFragment on RelayedTransactionStatus {
|
38366
38339
|
... on RelayedTransactionFailed {
|
38367
38340
|
blockHeight
|
@@ -38382,28 +38355,28 @@ ${ConsensusParametersFragmentDoc}`;
|
|
38382
38355
|
...nodeInfoFragment
|
38383
38356
|
}
|
38384
38357
|
}
|
38385
|
-
${
|
38358
|
+
${NodeInfoFragmentFragmentDoc}`;
|
38386
38359
|
var GetChainDocument = lib_default2`
|
38387
38360
|
query getChain {
|
38388
38361
|
chain {
|
38389
38362
|
...chainInfoFragment
|
38390
38363
|
}
|
38391
38364
|
}
|
38392
|
-
${
|
38365
|
+
${ChainInfoFragmentFragmentDoc}`;
|
38393
38366
|
var GetTransactionDocument = lib_default2`
|
38394
38367
|
query getTransaction($transactionId: TransactionId!) {
|
38395
38368
|
transaction(id: $transactionId) {
|
38396
38369
|
...transactionFragment
|
38397
38370
|
}
|
38398
38371
|
}
|
38399
|
-
${
|
38372
|
+
${TransactionFragmentFragmentDoc}`;
|
38400
38373
|
var GetTransactionWithReceiptsDocument = lib_default2`
|
38401
38374
|
query getTransactionWithReceipts($transactionId: TransactionId!) {
|
38402
38375
|
transaction(id: $transactionId) {
|
38403
38376
|
...transactionFragment
|
38404
38377
|
}
|
38405
38378
|
}
|
38406
|
-
${
|
38379
|
+
${TransactionFragmentFragmentDoc}`;
|
38407
38380
|
var GetTransactionsDocument = lib_default2`
|
38408
38381
|
query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
|
38409
38382
|
transactions(after: $after, before: $before, first: $first, last: $last) {
|
@@ -38414,7 +38387,7 @@ ${ConsensusParametersFragmentDoc}`;
|
|
38414
38387
|
}
|
38415
38388
|
}
|
38416
38389
|
}
|
38417
|
-
${
|
38390
|
+
${TransactionFragmentFragmentDoc}`;
|
38418
38391
|
var GetTransactionsByOwnerDocument = lib_default2`
|
38419
38392
|
query getTransactionsByOwner($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
|
38420
38393
|
transactionsByOwner(
|
@@ -38434,22 +38407,22 @@ ${ConsensusParametersFragmentDoc}`;
|
|
38434
38407
|
}
|
38435
38408
|
}
|
38436
38409
|
}
|
38437
|
-
${
|
38438
|
-
${
|
38410
|
+
${PageInfoFragmentFragmentDoc}
|
38411
|
+
${TransactionFragmentFragmentDoc}`;
|
38439
38412
|
var EstimatePredicatesDocument = lib_default2`
|
38440
38413
|
query estimatePredicates($encodedTransaction: HexString!) {
|
38441
38414
|
estimatePredicates(tx: $encodedTransaction) {
|
38442
38415
|
...transactionEstimatePredicatesFragment
|
38443
38416
|
}
|
38444
38417
|
}
|
38445
|
-
${
|
38418
|
+
${TransactionEstimatePredicatesFragmentFragmentDoc}`;
|
38446
38419
|
var GetBlockDocument = lib_default2`
|
38447
38420
|
query getBlock($blockId: BlockId, $height: U32) {
|
38448
38421
|
block(id: $blockId, height: $height) {
|
38449
38422
|
...blockFragment
|
38450
38423
|
}
|
38451
38424
|
}
|
38452
|
-
${
|
38425
|
+
${BlockFragmentFragmentDoc}`;
|
38453
38426
|
var GetBlockWithTransactionsDocument = lib_default2`
|
38454
38427
|
query getBlockWithTransactions($blockId: BlockId, $blockHeight: U32) {
|
38455
38428
|
block(id: $blockId, height: $blockHeight) {
|
@@ -38459,8 +38432,8 @@ ${TransactionFragmentDoc}`;
|
|
38459
38432
|
}
|
38460
38433
|
}
|
38461
38434
|
}
|
38462
|
-
${
|
38463
|
-
${
|
38435
|
+
${BlockFragmentFragmentDoc}
|
38436
|
+
${TransactionFragmentFragmentDoc}`;
|
38464
38437
|
var GetBlocksDocument = lib_default2`
|
38465
38438
|
query getBlocks($after: String, $before: String, $first: Int, $last: Int) {
|
38466
38439
|
blocks(after: $after, before: $before, first: $first, last: $last) {
|
@@ -38471,14 +38444,14 @@ ${TransactionFragmentDoc}`;
|
|
38471
38444
|
}
|
38472
38445
|
}
|
38473
38446
|
}
|
38474
|
-
${
|
38447
|
+
${BlockFragmentFragmentDoc}`;
|
38475
38448
|
var GetCoinDocument = lib_default2`
|
38476
38449
|
query getCoin($coinId: UtxoId!) {
|
38477
38450
|
coin(utxoId: $coinId) {
|
38478
38451
|
...coinFragment
|
38479
38452
|
}
|
38480
38453
|
}
|
38481
|
-
${
|
38454
|
+
${CoinFragmentFragmentDoc}`;
|
38482
38455
|
var GetCoinsDocument = lib_default2`
|
38483
38456
|
query getCoins($filter: CoinFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
38484
38457
|
coins(
|
@@ -38495,7 +38468,7 @@ ${TransactionFragmentDoc}`;
|
|
38495
38468
|
}
|
38496
38469
|
}
|
38497
38470
|
}
|
38498
|
-
${
|
38471
|
+
${CoinFragmentFragmentDoc}`;
|
38499
38472
|
var GetCoinsToSpendDocument = lib_default2`
|
38500
38473
|
query getCoinsToSpend($owner: Address!, $queryPerAsset: [SpendQueryElementInput!]!, $excludedIds: ExcludeInput) {
|
38501
38474
|
coinsToSpend(
|
@@ -38507,8 +38480,8 @@ ${TransactionFragmentDoc}`;
|
|
38507
38480
|
...messageCoinFragment
|
38508
38481
|
}
|
38509
38482
|
}
|
38510
|
-
${
|
38511
|
-
${
|
38483
|
+
${CoinFragmentFragmentDoc}
|
38484
|
+
${MessageCoinFragmentFragmentDoc}`;
|
38512
38485
|
var GetContractDocument = lib_default2`
|
38513
38486
|
query getContract($contractId: ContractId!) {
|
38514
38487
|
contract(id: $contractId) {
|
@@ -38523,14 +38496,14 @@ ${MessageCoinFragmentDoc}`;
|
|
38523
38496
|
...contractBalanceFragment
|
38524
38497
|
}
|
38525
38498
|
}
|
38526
|
-
${
|
38499
|
+
${ContractBalanceFragmentFragmentDoc}`;
|
38527
38500
|
var GetBalanceDocument = lib_default2`
|
38528
38501
|
query getBalance($owner: Address!, $assetId: AssetId!) {
|
38529
38502
|
balance(owner: $owner, assetId: $assetId) {
|
38530
38503
|
...balanceFragment
|
38531
38504
|
}
|
38532
38505
|
}
|
38533
|
-
${
|
38506
|
+
${BalanceFragmentFragmentDoc}`;
|
38534
38507
|
var GetLatestGasPriceDocument = lib_default2`
|
38535
38508
|
query getLatestGasPrice {
|
38536
38509
|
latestGasPrice {
|
@@ -38561,7 +38534,7 @@ ${MessageCoinFragmentDoc}`;
|
|
38561
38534
|
}
|
38562
38535
|
}
|
38563
38536
|
}
|
38564
|
-
${
|
38537
|
+
${BalanceFragmentFragmentDoc}`;
|
38565
38538
|
var GetMessagesDocument = lib_default2`
|
38566
38539
|
query getMessages($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
|
38567
38540
|
messages(
|
@@ -38578,7 +38551,7 @@ ${MessageCoinFragmentDoc}`;
|
|
38578
38551
|
}
|
38579
38552
|
}
|
38580
38553
|
}
|
38581
|
-
${
|
38554
|
+
${MessageFragmentFragmentDoc}`;
|
38582
38555
|
var GetMessageProofDocument = lib_default2`
|
38583
38556
|
query getMessageProof($transactionId: TransactionId!, $nonce: Nonce!, $commitBlockId: BlockId, $commitBlockHeight: U32) {
|
38584
38557
|
messageProof(
|
@@ -38590,7 +38563,7 @@ ${MessageCoinFragmentDoc}`;
|
|
38590
38563
|
...messageProofFragment
|
38591
38564
|
}
|
38592
38565
|
}
|
38593
|
-
${
|
38566
|
+
${MessageProofFragmentFragmentDoc}`;
|
38594
38567
|
var GetMessageStatusDocument = lib_default2`
|
38595
38568
|
query getMessageStatus($nonce: Nonce!) {
|
38596
38569
|
messageStatus(nonce: $nonce) {
|
@@ -38604,14 +38577,14 @@ ${MessageCoinFragmentDoc}`;
|
|
38604
38577
|
...relayedTransactionStatusFragment
|
38605
38578
|
}
|
38606
38579
|
}
|
38607
|
-
${
|
38580
|
+
${RelayedTransactionStatusFragmentFragmentDoc}`;
|
38608
38581
|
var DryRunDocument = lib_default2`
|
38609
38582
|
mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean) {
|
38610
38583
|
dryRun(txs: $encodedTransactions, utxoValidation: $utxoValidation) {
|
38611
38584
|
...dryRunTransactionExecutionStatusFragment
|
38612
38585
|
}
|
38613
38586
|
}
|
38614
|
-
${
|
38587
|
+
${DryRunTransactionExecutionStatusFragmentFragmentDoc}`;
|
38615
38588
|
var SubmitDocument = lib_default2`
|
38616
38589
|
mutation submit($encodedTransaction: HexString!) {
|
38617
38590
|
submit(tx: $encodedTransaction) {
|
@@ -38633,21 +38606,21 @@ ${MessageCoinFragmentDoc}`;
|
|
38633
38606
|
...messageFragment
|
38634
38607
|
}
|
38635
38608
|
}
|
38636
|
-
${
|
38609
|
+
${MessageFragmentFragmentDoc}`;
|
38637
38610
|
var SubmitAndAwaitDocument = lib_default2`
|
38638
38611
|
subscription submitAndAwait($encodedTransaction: HexString!) {
|
38639
38612
|
submitAndAwait(tx: $encodedTransaction) {
|
38640
38613
|
...transactionStatusSubscriptionFragment
|
38641
38614
|
}
|
38642
38615
|
}
|
38643
|
-
${
|
38616
|
+
${TransactionStatusSubscriptionFragmentFragmentDoc}`;
|
38644
38617
|
var StatusChangeDocument = lib_default2`
|
38645
38618
|
subscription statusChange($transactionId: TransactionId!) {
|
38646
38619
|
statusChange(id: $transactionId) {
|
38647
38620
|
...transactionStatusSubscriptionFragment
|
38648
38621
|
}
|
38649
38622
|
}
|
38650
|
-
${
|
38623
|
+
${TransactionStatusSubscriptionFragmentFragmentDoc}`;
|
38651
38624
|
function getSdk(requester) {
|
38652
38625
|
return {
|
38653
38626
|
getVersion(variables, options) {
|
@@ -39340,9 +39313,10 @@ ${MessageCoinFragmentDoc}`;
|
|
39340
39313
|
function resolveGasDependentCosts(byteSize, gasDependentCost) {
|
39341
39314
|
const base = bn(gasDependentCost.base);
|
39342
39315
|
let dependentValue = bn(0);
|
39343
|
-
if ("
|
39316
|
+
if (gasDependentCost.__typename === "LightOperation") {
|
39344
39317
|
dependentValue = bn(byteSize).div(bn(gasDependentCost.unitsPerGas));
|
39345
|
-
}
|
39318
|
+
}
|
39319
|
+
if (gasDependentCost.__typename === "HeavyOperation") {
|
39346
39320
|
dependentValue = bn(byteSize).mul(bn(gasDependentCost.gasPerUnit));
|
39347
39321
|
}
|
39348
39322
|
return base.add(dependentValue);
|
@@ -39550,6 +39524,50 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
39550
39524
|
name = "NoWitnessByOwnerError";
|
39551
39525
|
};
|
39552
39526
|
|
39527
|
+
// src/providers/transaction-request/helpers.ts
|
39528
|
+
var isRequestInputCoin = (input) => input.type === InputType.Coin;
|
39529
|
+
var isRequestInputMessage = (input) => input.type === InputType.Message;
|
39530
|
+
var isRequestInputResource = (input) => isRequestInputCoin(input) || isRequestInputMessage(input);
|
39531
|
+
var getRequestInputResourceOwner = (input) => isRequestInputCoin(input) ? input.owner : input.recipient;
|
39532
|
+
var isRequestInputResourceFromOwner = (input, owner) => getRequestInputResourceOwner(input) === owner.toB256();
|
39533
|
+
var getAssetAmountInRequestInputs = (inputs, assetId, baseAsset) => inputs.filter(isRequestInputResource).reduce((acc, input) => {
|
39534
|
+
if (isRequestInputCoin(input) && input.assetId === assetId) {
|
39535
|
+
return acc.add(input.amount);
|
39536
|
+
}
|
39537
|
+
if (isRequestInputMessage(input) && assetId === baseAsset) {
|
39538
|
+
return acc.add(input.amount);
|
39539
|
+
}
|
39540
|
+
return acc;
|
39541
|
+
}, bn(0));
|
39542
|
+
var cacheRequestInputsResources = (inputs) => inputs.filter(isRequestInputResource).reduce(
|
39543
|
+
(cache2, input) => {
|
39544
|
+
if (isRequestInputCoin(input)) {
|
39545
|
+
cache2.utxos.push(input.id);
|
39546
|
+
} else {
|
39547
|
+
cache2.messages.push(input.nonce);
|
39548
|
+
}
|
39549
|
+
return cache2;
|
39550
|
+
},
|
39551
|
+
{
|
39552
|
+
utxos: [],
|
39553
|
+
messages: []
|
39554
|
+
}
|
39555
|
+
);
|
39556
|
+
var cacheRequestInputsResourcesFromOwner = (inputs, owner) => inputs.reduce(
|
39557
|
+
(acc, input) => {
|
39558
|
+
if (isRequestInputCoin(input) && input.owner === owner.toB256()) {
|
39559
|
+
acc.utxos.push(input.id);
|
39560
|
+
} else if (isRequestInputMessage(input) && input.recipient === owner.toB256()) {
|
39561
|
+
acc.messages.push(input.nonce);
|
39562
|
+
}
|
39563
|
+
return acc;
|
39564
|
+
},
|
39565
|
+
{
|
39566
|
+
utxos: [],
|
39567
|
+
messages: []
|
39568
|
+
}
|
39569
|
+
);
|
39570
|
+
|
39553
39571
|
// src/providers/transaction-request/witness.ts
|
39554
39572
|
var witnessify = (value) => {
|
39555
39573
|
const data = arrayify(value);
|
@@ -39787,7 +39805,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
39787
39805
|
* @param coin - Coin resource.
|
39788
39806
|
*/
|
39789
39807
|
addCoinInput(coin) {
|
39790
|
-
const { assetId, owner, amount } = coin;
|
39808
|
+
const { assetId, owner, amount, id, predicate } = coin;
|
39791
39809
|
let witnessIndex;
|
39792
39810
|
if (coin.predicate) {
|
39793
39811
|
witnessIndex = 0;
|
@@ -39798,13 +39816,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
39798
39816
|
}
|
39799
39817
|
}
|
39800
39818
|
const input = {
|
39801
|
-
|
39819
|
+
id,
|
39802
39820
|
type: InputType.Coin,
|
39803
39821
|
owner: owner.toB256(),
|
39804
39822
|
amount,
|
39805
39823
|
assetId,
|
39806
39824
|
txPointer: "0x00000000000000000000000000000000",
|
39807
|
-
witnessIndex
|
39825
|
+
witnessIndex,
|
39826
|
+
predicate
|
39808
39827
|
};
|
39809
39828
|
this.pushInput(input);
|
39810
39829
|
this.addChangeOutput(owner, assetId);
|
@@ -39816,7 +39835,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
39816
39835
|
* @param message - Message resource.
|
39817
39836
|
*/
|
39818
39837
|
addMessageInput(message) {
|
39819
|
-
const { recipient, sender, amount, assetId } = message;
|
39838
|
+
const { recipient, sender, amount, predicate, nonce, assetId } = message;
|
39820
39839
|
let witnessIndex;
|
39821
39840
|
if (message.predicate) {
|
39822
39841
|
witnessIndex = 0;
|
@@ -39827,12 +39846,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
39827
39846
|
}
|
39828
39847
|
}
|
39829
39848
|
const input = {
|
39830
|
-
|
39849
|
+
nonce,
|
39831
39850
|
type: InputType.Message,
|
39832
39851
|
sender: sender.toB256(),
|
39833
39852
|
recipient: recipient.toB256(),
|
39834
39853
|
amount,
|
39835
|
-
witnessIndex
|
39854
|
+
witnessIndex,
|
39855
|
+
predicate
|
39836
39856
|
};
|
39837
39857
|
this.pushInput(input);
|
39838
39858
|
this.addChangeOutput(recipient, assetId);
|
@@ -40022,6 +40042,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
40022
40042
|
toJSON() {
|
40023
40043
|
return normalizeJSON(this);
|
40024
40044
|
}
|
40045
|
+
removeWitness(index) {
|
40046
|
+
this.witnesses.splice(index, 1);
|
40047
|
+
this.adjustWitnessIndexes(index);
|
40048
|
+
}
|
40049
|
+
adjustWitnessIndexes(removedIndex) {
|
40050
|
+
this.inputs.filter(isRequestInputResource).forEach((input) => {
|
40051
|
+
if (input.witnessIndex > removedIndex) {
|
40052
|
+
input.witnessIndex -= 1;
|
40053
|
+
}
|
40054
|
+
});
|
40055
|
+
}
|
40025
40056
|
updatePredicateGasUsed(inputs) {
|
40026
40057
|
this.inputs.forEach((i) => {
|
40027
40058
|
let correspondingInput;
|
@@ -40448,21 +40479,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
40448
40479
|
}
|
40449
40480
|
}
|
40450
40481
|
};
|
40451
|
-
var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
|
40452
|
-
(acc, input) => {
|
40453
|
-
if (input.type === InputType.Coin && input.owner === owner.toB256()) {
|
40454
|
-
acc.utxos.push(input.id);
|
40455
|
-
}
|
40456
|
-
if (input.type === InputType.Message && input.recipient === owner.toB256()) {
|
40457
|
-
acc.messages.push(input.nonce);
|
40458
|
-
}
|
40459
|
-
return acc;
|
40460
|
-
},
|
40461
|
-
{
|
40462
|
-
utxos: [],
|
40463
|
-
messages: []
|
40464
|
-
}
|
40465
|
-
);
|
40466
40482
|
|
40467
40483
|
// src/providers/transaction-summary/calculate-tx-fee-for-summary.ts
|
40468
40484
|
var calculateTXFeeForSummary = (params) => {
|
@@ -42205,7 +42221,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
42205
42221
|
};
|
42206
42222
|
const result = await this.operations.getCoinsToSpend(coinsQuery);
|
42207
42223
|
const coins = result.coinsToSpend.flat().map((coin) => {
|
42208
|
-
switch (coin.
|
42224
|
+
switch (coin.__typename) {
|
42209
42225
|
case "MessageCoin":
|
42210
42226
|
return {
|
42211
42227
|
amount: bn(coin.amount),
|
@@ -42817,20 +42833,6 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
42817
42833
|
}
|
42818
42834
|
];
|
42819
42835
|
|
42820
|
-
// src/providers/transaction-request/helpers.ts
|
42821
|
-
var isRequestInputCoin = (input) => input.type === InputType.Coin;
|
42822
|
-
var isRequestInputMessage = (input) => input.type === InputType.Message;
|
42823
|
-
var isRequestInputResource = (input) => isRequestInputCoin(input) || isRequestInputMessage(input);
|
42824
|
-
var getAssetAmountInRequestInputs = (inputs, assetId, baseAsset) => inputs.filter(isRequestInputResource).reduce((acc, input) => {
|
42825
|
-
if (isRequestInputCoin(input) && input.assetId === assetId) {
|
42826
|
-
return acc.add(input.amount);
|
42827
|
-
}
|
42828
|
-
if (isRequestInputMessage(input) && assetId === baseAsset) {
|
42829
|
-
return acc.add(input.amount);
|
42830
|
-
}
|
42831
|
-
return acc;
|
42832
|
-
}, bn(0));
|
42833
|
-
|
42834
42836
|
// src/utils/formatTransferToContractScriptData.ts
|
42835
42837
|
var asm = __toESM(require_node());
|
42836
42838
|
var formatTransferToContractScriptData = (params) => {
|
@@ -43065,7 +43067,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43065
43067
|
while (needsToBeFunded && fundingAttempts < MAX_FUNDING_ATTEMPTS) {
|
43066
43068
|
const resources = await this.getResourcesToSpend(
|
43067
43069
|
missingQuantities,
|
43068
|
-
|
43070
|
+
cacheRequestInputsResourcesFromOwner(request.inputs, this.address)
|
43069
43071
|
);
|
43070
43072
|
request.addResources(resources);
|
43071
43073
|
txRequest.shiftPredicateData();
|
@@ -48165,10 +48167,15 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
48165
48167
|
populateTransactionPredicateData(transactionRequestLike) {
|
48166
48168
|
const request = transactionRequestify(transactionRequestLike);
|
48167
48169
|
const { policies } = BaseTransactionRequest.getPolicyMeta(request);
|
48168
|
-
|
48169
|
-
|
48170
|
+
const placeholderIndex = this.getIndexFromPlaceholderWitness(request);
|
48171
|
+
if (placeholderIndex !== -1) {
|
48172
|
+
request.removeWitness(placeholderIndex);
|
48173
|
+
}
|
48174
|
+
request.inputs.filter(isRequestInputResource).forEach((input) => {
|
48175
|
+
if (isRequestInputResourceFromOwner(input, this.address)) {
|
48170
48176
|
input.predicate = hexlify(this.bytes);
|
48171
48177
|
input.predicateData = hexlify(this.getPredicateData(policies.length));
|
48178
|
+
input.witnessIndex = 0;
|
48172
48179
|
}
|
48173
48180
|
});
|
48174
48181
|
return request;
|
@@ -48291,6 +48298,28 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
48291
48298
|
}
|
48292
48299
|
return mutatedBytes;
|
48293
48300
|
}
|
48301
|
+
/**
|
48302
|
+
* Returns the index of the witness placeholder that was added to this predicate.
|
48303
|
+
* If no witness placeholder was added, it returns -1.
|
48304
|
+
* @param request - The transaction request.
|
48305
|
+
* @returns The index of the witness placeholder, or -1 if there is no witness placeholder.
|
48306
|
+
*/
|
48307
|
+
getIndexFromPlaceholderWitness(request) {
|
48308
|
+
const predicateInputs = request.inputs.filter(isRequestInputResource).filter((input) => isRequestInputResourceFromOwner(input, this.address));
|
48309
|
+
let index = -1;
|
48310
|
+
const hasEmptyPredicateInputs = predicateInputs.find((input) => !input.predicate);
|
48311
|
+
if (hasEmptyPredicateInputs) {
|
48312
|
+
index = hasEmptyPredicateInputs.witnessIndex;
|
48313
|
+
const allInputsAreEmpty = predicateInputs.every((input) => !input.predicate);
|
48314
|
+
if (!allInputsAreEmpty) {
|
48315
|
+
const wasFilledInputAddedFirst = !!predicateInputs[0]?.predicate;
|
48316
|
+
if (wasFilledInputAddedFirst) {
|
48317
|
+
index = -1;
|
48318
|
+
}
|
48319
|
+
}
|
48320
|
+
}
|
48321
|
+
return index;
|
48322
|
+
}
|
48294
48323
|
};
|
48295
48324
|
|
48296
48325
|
// src/connectors/fuel-connector.ts
|