@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
@@ -41517,7 +41517,7 @@ spurious results.`);
|
|
41517
41517
|
var lib_default2 = gql;
|
41518
41518
|
|
41519
41519
|
// src/providers/__generated__/operations.ts
|
41520
|
-
var
|
41520
|
+
var TransactionStatusSubscriptionFragmentFragmentDoc = lib_default2`
|
41521
41521
|
fragment transactionStatusSubscriptionFragment on TransactionStatus {
|
41522
41522
|
type: __typename
|
41523
41523
|
... on SqueezedOutStatus {
|
@@ -41525,13 +41525,7 @@ spurious results.`);
|
|
41525
41525
|
}
|
41526
41526
|
}
|
41527
41527
|
`;
|
41528
|
-
var
|
41529
|
-
fragment SubmittedStatusFragment on SubmittedStatus {
|
41530
|
-
type: __typename
|
41531
|
-
time
|
41532
|
-
}
|
41533
|
-
`;
|
41534
|
-
var ReceiptFragmentDoc = lib_default2`
|
41528
|
+
var ReceiptFragmentFragmentDoc = lib_default2`
|
41535
41529
|
fragment receiptFragment on Receipt {
|
41536
41530
|
id
|
41537
41531
|
pc
|
@@ -41563,65 +41557,45 @@ spurious results.`);
|
|
41563
41557
|
subId
|
41564
41558
|
}
|
41565
41559
|
`;
|
41566
|
-
var
|
41567
|
-
fragment SuccessStatusFragment on SuccessStatus {
|
41568
|
-
type: __typename
|
41569
|
-
block {
|
41570
|
-
id
|
41571
|
-
}
|
41572
|
-
time
|
41573
|
-
programState {
|
41574
|
-
returnType
|
41575
|
-
data
|
41576
|
-
}
|
41577
|
-
receipts {
|
41578
|
-
...receiptFragment
|
41579
|
-
}
|
41580
|
-
totalGas
|
41581
|
-
totalFee
|
41582
|
-
}
|
41583
|
-
${ReceiptFragmentDoc}`;
|
41584
|
-
var FailureStatusFragmentDoc = lib_default2`
|
41585
|
-
fragment FailureStatusFragment on FailureStatus {
|
41586
|
-
type: __typename
|
41587
|
-
block {
|
41588
|
-
id
|
41589
|
-
}
|
41590
|
-
totalGas
|
41591
|
-
totalFee
|
41592
|
-
time
|
41593
|
-
reason
|
41594
|
-
receipts {
|
41595
|
-
...receiptFragment
|
41596
|
-
}
|
41597
|
-
}
|
41598
|
-
${ReceiptFragmentDoc}`;
|
41599
|
-
var SqueezedOutStatusFragmentDoc = lib_default2`
|
41600
|
-
fragment SqueezedOutStatusFragment on SqueezedOutStatus {
|
41601
|
-
type: __typename
|
41602
|
-
reason
|
41603
|
-
}
|
41604
|
-
`;
|
41605
|
-
var TransactionStatusFragmentDoc = lib_default2`
|
41560
|
+
var TransactionStatusFragmentFragmentDoc = lib_default2`
|
41606
41561
|
fragment transactionStatusFragment on TransactionStatus {
|
41562
|
+
type: __typename
|
41607
41563
|
... on SubmittedStatus {
|
41608
|
-
|
41564
|
+
time
|
41609
41565
|
}
|
41610
41566
|
... on SuccessStatus {
|
41611
|
-
|
41567
|
+
block {
|
41568
|
+
id
|
41569
|
+
}
|
41570
|
+
time
|
41571
|
+
programState {
|
41572
|
+
returnType
|
41573
|
+
data
|
41574
|
+
}
|
41575
|
+
receipts {
|
41576
|
+
...receiptFragment
|
41577
|
+
}
|
41578
|
+
totalGas
|
41579
|
+
totalFee
|
41612
41580
|
}
|
41613
41581
|
... on FailureStatus {
|
41614
|
-
|
41582
|
+
block {
|
41583
|
+
id
|
41584
|
+
}
|
41585
|
+
totalGas
|
41586
|
+
totalFee
|
41587
|
+
time
|
41588
|
+
reason
|
41589
|
+
receipts {
|
41590
|
+
...receiptFragment
|
41591
|
+
}
|
41615
41592
|
}
|
41616
41593
|
... on SqueezedOutStatus {
|
41617
|
-
|
41594
|
+
reason
|
41618
41595
|
}
|
41619
41596
|
}
|
41620
|
-
${
|
41621
|
-
|
41622
|
-
${FailureStatusFragmentDoc}
|
41623
|
-
${SqueezedOutStatusFragmentDoc}`;
|
41624
|
-
var TransactionFragmentDoc = lib_default2`
|
41597
|
+
${ReceiptFragmentFragmentDoc}`;
|
41598
|
+
var TransactionFragmentFragmentDoc = lib_default2`
|
41625
41599
|
fragment transactionFragment on Transaction {
|
41626
41600
|
id
|
41627
41601
|
rawPayload
|
@@ -41629,8 +41603,8 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
41629
41603
|
...transactionStatusFragment
|
41630
41604
|
}
|
41631
41605
|
}
|
41632
|
-
${
|
41633
|
-
var
|
41606
|
+
${TransactionStatusFragmentFragmentDoc}`;
|
41607
|
+
var InputEstimatePredicatesFragmentFragmentDoc = lib_default2`
|
41634
41608
|
fragment inputEstimatePredicatesFragment on Input {
|
41635
41609
|
... on InputCoin {
|
41636
41610
|
predicateGasUsed
|
@@ -41640,14 +41614,14 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
41640
41614
|
}
|
41641
41615
|
}
|
41642
41616
|
`;
|
41643
|
-
var
|
41617
|
+
var TransactionEstimatePredicatesFragmentFragmentDoc = lib_default2`
|
41644
41618
|
fragment transactionEstimatePredicatesFragment on Transaction {
|
41645
41619
|
inputs {
|
41646
41620
|
...inputEstimatePredicatesFragment
|
41647
41621
|
}
|
41648
41622
|
}
|
41649
|
-
${
|
41650
|
-
var
|
41623
|
+
${InputEstimatePredicatesFragmentFragmentDoc}`;
|
41624
|
+
var DryRunFailureStatusFragmentFragmentDoc = lib_default2`
|
41651
41625
|
fragment dryRunFailureStatusFragment on DryRunFailureStatus {
|
41652
41626
|
totalGas
|
41653
41627
|
totalFee
|
@@ -41658,7 +41632,7 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
41658
41632
|
}
|
41659
41633
|
}
|
41660
41634
|
`;
|
41661
|
-
var
|
41635
|
+
var DryRunSuccessStatusFragmentFragmentDoc = lib_default2`
|
41662
41636
|
fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
|
41663
41637
|
totalGas
|
41664
41638
|
totalFee
|
@@ -41668,7 +41642,7 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
41668
41642
|
}
|
41669
41643
|
}
|
41670
41644
|
`;
|
41671
|
-
var
|
41645
|
+
var DryRunTransactionStatusFragmentFragmentDoc = lib_default2`
|
41672
41646
|
fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
|
41673
41647
|
... on DryRunFailureStatus {
|
41674
41648
|
...dryRunFailureStatusFragment
|
@@ -41677,9 +41651,9 @@ ${SqueezedOutStatusFragmentDoc}`;
|
|
41677
41651
|
...dryRunSuccessStatusFragment
|
41678
41652
|
}
|
41679
41653
|
}
|
41680
|
-
${
|
41681
|
-
${
|
41682
|
-
var
|
41654
|
+
${DryRunFailureStatusFragmentFragmentDoc}
|
41655
|
+
${DryRunSuccessStatusFragmentFragmentDoc}`;
|
41656
|
+
var DryRunTransactionExecutionStatusFragmentFragmentDoc = lib_default2`
|
41683
41657
|
fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
|
41684
41658
|
id
|
41685
41659
|
status {
|
@@ -41689,11 +41663,11 @@ ${DryRunSuccessStatusFragmentDoc}`;
|
|
41689
41663
|
...receiptFragment
|
41690
41664
|
}
|
41691
41665
|
}
|
41692
|
-
${
|
41693
|
-
${
|
41694
|
-
var
|
41666
|
+
${DryRunTransactionStatusFragmentFragmentDoc}
|
41667
|
+
${ReceiptFragmentFragmentDoc}`;
|
41668
|
+
var CoinFragmentFragmentDoc = lib_default2`
|
41695
41669
|
fragment coinFragment on Coin {
|
41696
|
-
|
41670
|
+
__typename
|
41697
41671
|
utxoId
|
41698
41672
|
owner
|
41699
41673
|
amount
|
@@ -41702,9 +41676,9 @@ ${ReceiptFragmentDoc}`;
|
|
41702
41676
|
txCreatedIdx
|
41703
41677
|
}
|
41704
41678
|
`;
|
41705
|
-
var
|
41679
|
+
var MessageCoinFragmentFragmentDoc = lib_default2`
|
41706
41680
|
fragment messageCoinFragment on MessageCoin {
|
41707
|
-
|
41681
|
+
__typename
|
41708
41682
|
sender
|
41709
41683
|
recipient
|
41710
41684
|
nonce
|
@@ -41713,7 +41687,7 @@ ${ReceiptFragmentDoc}`;
|
|
41713
41687
|
daHeight
|
41714
41688
|
}
|
41715
41689
|
`;
|
41716
|
-
var
|
41690
|
+
var MessageFragmentFragmentDoc = lib_default2`
|
41717
41691
|
fragment messageFragment on Message {
|
41718
41692
|
amount
|
41719
41693
|
sender
|
@@ -41723,7 +41697,7 @@ ${ReceiptFragmentDoc}`;
|
|
41723
41697
|
daHeight
|
41724
41698
|
}
|
41725
41699
|
`;
|
41726
|
-
var
|
41700
|
+
var MessageProofFragmentFragmentDoc = lib_default2`
|
41727
41701
|
fragment messageProofFragment on MessageProof {
|
41728
41702
|
messageProof {
|
41729
41703
|
proofSet
|
@@ -41770,14 +41744,14 @@ ${ReceiptFragmentDoc}`;
|
|
41770
41744
|
data
|
41771
41745
|
}
|
41772
41746
|
`;
|
41773
|
-
var
|
41747
|
+
var BalanceFragmentFragmentDoc = lib_default2`
|
41774
41748
|
fragment balanceFragment on Balance {
|
41775
41749
|
owner
|
41776
41750
|
amount
|
41777
41751
|
assetId
|
41778
41752
|
}
|
41779
41753
|
`;
|
41780
|
-
var
|
41754
|
+
var BlockFragmentFragmentDoc = lib_default2`
|
41781
41755
|
fragment blockFragment on Block {
|
41782
41756
|
id
|
41783
41757
|
height
|
@@ -41789,7 +41763,7 @@ ${ReceiptFragmentDoc}`;
|
|
41789
41763
|
}
|
41790
41764
|
}
|
41791
41765
|
`;
|
41792
|
-
var
|
41766
|
+
var TxParametersFragmentFragmentDoc = lib_default2`
|
41793
41767
|
fragment TxParametersFragment on TxParameters {
|
41794
41768
|
version
|
41795
41769
|
maxInputs
|
@@ -41800,7 +41774,7 @@ ${ReceiptFragmentDoc}`;
|
|
41800
41774
|
maxBytecodeSubsections
|
41801
41775
|
}
|
41802
41776
|
`;
|
41803
|
-
var
|
41777
|
+
var PredicateParametersFragmentFragmentDoc = lib_default2`
|
41804
41778
|
fragment PredicateParametersFragment on PredicateParameters {
|
41805
41779
|
version
|
41806
41780
|
maxPredicateLength
|
@@ -41809,42 +41783,41 @@ ${ReceiptFragmentDoc}`;
|
|
41809
41783
|
maxMessageDataLength
|
41810
41784
|
}
|
41811
41785
|
`;
|
41812
|
-
var
|
41786
|
+
var ScriptParametersFragmentFragmentDoc = lib_default2`
|
41813
41787
|
fragment ScriptParametersFragment on ScriptParameters {
|
41814
41788
|
version
|
41815
41789
|
maxScriptLength
|
41816
41790
|
maxScriptDataLength
|
41817
41791
|
}
|
41818
41792
|
`;
|
41819
|
-
var
|
41793
|
+
var ContractParametersFragmentFragmentDoc = lib_default2`
|
41820
41794
|
fragment ContractParametersFragment on ContractParameters {
|
41821
41795
|
version
|
41822
41796
|
contractMaxSize
|
41823
41797
|
maxStorageSlots
|
41824
41798
|
}
|
41825
41799
|
`;
|
41826
|
-
var
|
41800
|
+
var FeeParametersFragmentFragmentDoc = lib_default2`
|
41827
41801
|
fragment FeeParametersFragment on FeeParameters {
|
41828
41802
|
version
|
41829
41803
|
gasPriceFactor
|
41830
41804
|
gasPerByte
|
41831
41805
|
}
|
41832
41806
|
`;
|
41833
|
-
var
|
41807
|
+
var DependentCostFragmentFragmentDoc = lib_default2`
|
41834
41808
|
fragment DependentCostFragment on DependentCost {
|
41809
|
+
__typename
|
41835
41810
|
... on LightOperation {
|
41836
|
-
type: __typename
|
41837
41811
|
base
|
41838
41812
|
unitsPerGas
|
41839
41813
|
}
|
41840
41814
|
... on HeavyOperation {
|
41841
|
-
type: __typename
|
41842
41815
|
base
|
41843
41816
|
gasPerUnit
|
41844
41817
|
}
|
41845
41818
|
}
|
41846
41819
|
`;
|
41847
|
-
var
|
41820
|
+
var GasCostsFragmentFragmentDoc = lib_default2`
|
41848
41821
|
fragment GasCostsFragment on GasCosts {
|
41849
41822
|
version
|
41850
41823
|
add
|
@@ -42000,8 +41973,8 @@ ${ReceiptFragmentDoc}`;
|
|
42000
41973
|
}
|
42001
41974
|
newStoragePerByte
|
42002
41975
|
}
|
42003
|
-
${
|
42004
|
-
var
|
41976
|
+
${DependentCostFragmentFragmentDoc}`;
|
41977
|
+
var ConsensusParametersFragmentFragmentDoc = lib_default2`
|
42005
41978
|
fragment consensusParametersFragment on ConsensusParameters {
|
42006
41979
|
version
|
42007
41980
|
txParams {
|
@@ -42025,13 +41998,13 @@ ${ReceiptFragmentDoc}`;
|
|
42025
41998
|
baseAssetId
|
42026
41999
|
chainId
|
42027
42000
|
}
|
42028
|
-
${
|
42029
|
-
${
|
42030
|
-
${
|
42031
|
-
${
|
42032
|
-
${
|
42033
|
-
${
|
42034
|
-
var
|
42001
|
+
${TxParametersFragmentFragmentDoc}
|
42002
|
+
${PredicateParametersFragmentFragmentDoc}
|
42003
|
+
${ScriptParametersFragmentFragmentDoc}
|
42004
|
+
${ContractParametersFragmentFragmentDoc}
|
42005
|
+
${FeeParametersFragmentFragmentDoc}
|
42006
|
+
${GasCostsFragmentFragmentDoc}`;
|
42007
|
+
var ChainInfoFragmentFragmentDoc = lib_default2`
|
42035
42008
|
fragment chainInfoFragment on ChainInfo {
|
42036
42009
|
name
|
42037
42010
|
latestBlock {
|
@@ -42042,16 +42015,16 @@ ${GasCostsFragmentDoc}`;
|
|
42042
42015
|
...consensusParametersFragment
|
42043
42016
|
}
|
42044
42017
|
}
|
42045
|
-
${
|
42046
|
-
${
|
42047
|
-
var
|
42018
|
+
${BlockFragmentFragmentDoc}
|
42019
|
+
${ConsensusParametersFragmentFragmentDoc}`;
|
42020
|
+
var ContractBalanceFragmentFragmentDoc = lib_default2`
|
42048
42021
|
fragment contractBalanceFragment on ContractBalance {
|
42049
42022
|
contract
|
42050
42023
|
amount
|
42051
42024
|
assetId
|
42052
42025
|
}
|
42053
42026
|
`;
|
42054
|
-
var
|
42027
|
+
var PageInfoFragmentFragmentDoc = lib_default2`
|
42055
42028
|
fragment pageInfoFragment on PageInfo {
|
42056
42029
|
hasPreviousPage
|
42057
42030
|
hasNextPage
|
@@ -42059,7 +42032,7 @@ ${ConsensusParametersFragmentDoc}`;
|
|
42059
42032
|
endCursor
|
42060
42033
|
}
|
42061
42034
|
`;
|
42062
|
-
var
|
42035
|
+
var NodeInfoFragmentFragmentDoc = lib_default2`
|
42063
42036
|
fragment nodeInfoFragment on NodeInfo {
|
42064
42037
|
utxoValidation
|
42065
42038
|
vmBacktrace
|
@@ -42068,7 +42041,7 @@ ${ConsensusParametersFragmentDoc}`;
|
|
42068
42041
|
nodeVersion
|
42069
42042
|
}
|
42070
42043
|
`;
|
42071
|
-
var
|
42044
|
+
var RelayedTransactionStatusFragmentFragmentDoc = lib_default2`
|
42072
42045
|
fragment relayedTransactionStatusFragment on RelayedTransactionStatus {
|
42073
42046
|
... on RelayedTransactionFailed {
|
42074
42047
|
blockHeight
|
@@ -42089,28 +42062,28 @@ ${ConsensusParametersFragmentDoc}`;
|
|
42089
42062
|
...nodeInfoFragment
|
42090
42063
|
}
|
42091
42064
|
}
|
42092
|
-
${
|
42065
|
+
${NodeInfoFragmentFragmentDoc}`;
|
42093
42066
|
var GetChainDocument = lib_default2`
|
42094
42067
|
query getChain {
|
42095
42068
|
chain {
|
42096
42069
|
...chainInfoFragment
|
42097
42070
|
}
|
42098
42071
|
}
|
42099
|
-
${
|
42072
|
+
${ChainInfoFragmentFragmentDoc}`;
|
42100
42073
|
var GetTransactionDocument = lib_default2`
|
42101
42074
|
query getTransaction($transactionId: TransactionId!) {
|
42102
42075
|
transaction(id: $transactionId) {
|
42103
42076
|
...transactionFragment
|
42104
42077
|
}
|
42105
42078
|
}
|
42106
|
-
${
|
42079
|
+
${TransactionFragmentFragmentDoc}`;
|
42107
42080
|
var GetTransactionWithReceiptsDocument = lib_default2`
|
42108
42081
|
query getTransactionWithReceipts($transactionId: TransactionId!) {
|
42109
42082
|
transaction(id: $transactionId) {
|
42110
42083
|
...transactionFragment
|
42111
42084
|
}
|
42112
42085
|
}
|
42113
|
-
${
|
42086
|
+
${TransactionFragmentFragmentDoc}`;
|
42114
42087
|
var GetTransactionsDocument = lib_default2`
|
42115
42088
|
query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
|
42116
42089
|
transactions(after: $after, before: $before, first: $first, last: $last) {
|
@@ -42121,7 +42094,7 @@ ${ConsensusParametersFragmentDoc}`;
|
|
42121
42094
|
}
|
42122
42095
|
}
|
42123
42096
|
}
|
42124
|
-
${
|
42097
|
+
${TransactionFragmentFragmentDoc}`;
|
42125
42098
|
var GetTransactionsByOwnerDocument = lib_default2`
|
42126
42099
|
query getTransactionsByOwner($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
|
42127
42100
|
transactionsByOwner(
|
@@ -42141,22 +42114,22 @@ ${ConsensusParametersFragmentDoc}`;
|
|
42141
42114
|
}
|
42142
42115
|
}
|
42143
42116
|
}
|
42144
|
-
${
|
42145
|
-
${
|
42117
|
+
${PageInfoFragmentFragmentDoc}
|
42118
|
+
${TransactionFragmentFragmentDoc}`;
|
42146
42119
|
var EstimatePredicatesDocument = lib_default2`
|
42147
42120
|
query estimatePredicates($encodedTransaction: HexString!) {
|
42148
42121
|
estimatePredicates(tx: $encodedTransaction) {
|
42149
42122
|
...transactionEstimatePredicatesFragment
|
42150
42123
|
}
|
42151
42124
|
}
|
42152
|
-
${
|
42125
|
+
${TransactionEstimatePredicatesFragmentFragmentDoc}`;
|
42153
42126
|
var GetBlockDocument = lib_default2`
|
42154
42127
|
query getBlock($blockId: BlockId, $height: U32) {
|
42155
42128
|
block(id: $blockId, height: $height) {
|
42156
42129
|
...blockFragment
|
42157
42130
|
}
|
42158
42131
|
}
|
42159
|
-
${
|
42132
|
+
${BlockFragmentFragmentDoc}`;
|
42160
42133
|
var GetBlockWithTransactionsDocument = lib_default2`
|
42161
42134
|
query getBlockWithTransactions($blockId: BlockId, $blockHeight: U32) {
|
42162
42135
|
block(id: $blockId, height: $blockHeight) {
|
@@ -42166,8 +42139,8 @@ ${TransactionFragmentDoc}`;
|
|
42166
42139
|
}
|
42167
42140
|
}
|
42168
42141
|
}
|
42169
|
-
${
|
42170
|
-
${
|
42142
|
+
${BlockFragmentFragmentDoc}
|
42143
|
+
${TransactionFragmentFragmentDoc}`;
|
42171
42144
|
var GetBlocksDocument = lib_default2`
|
42172
42145
|
query getBlocks($after: String, $before: String, $first: Int, $last: Int) {
|
42173
42146
|
blocks(after: $after, before: $before, first: $first, last: $last) {
|
@@ -42178,14 +42151,14 @@ ${TransactionFragmentDoc}`;
|
|
42178
42151
|
}
|
42179
42152
|
}
|
42180
42153
|
}
|
42181
|
-
${
|
42154
|
+
${BlockFragmentFragmentDoc}`;
|
42182
42155
|
var GetCoinDocument = lib_default2`
|
42183
42156
|
query getCoin($coinId: UtxoId!) {
|
42184
42157
|
coin(utxoId: $coinId) {
|
42185
42158
|
...coinFragment
|
42186
42159
|
}
|
42187
42160
|
}
|
42188
|
-
${
|
42161
|
+
${CoinFragmentFragmentDoc}`;
|
42189
42162
|
var GetCoinsDocument = lib_default2`
|
42190
42163
|
query getCoins($filter: CoinFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
42191
42164
|
coins(
|
@@ -42202,7 +42175,7 @@ ${TransactionFragmentDoc}`;
|
|
42202
42175
|
}
|
42203
42176
|
}
|
42204
42177
|
}
|
42205
|
-
${
|
42178
|
+
${CoinFragmentFragmentDoc}`;
|
42206
42179
|
var GetCoinsToSpendDocument = lib_default2`
|
42207
42180
|
query getCoinsToSpend($owner: Address!, $queryPerAsset: [SpendQueryElementInput!]!, $excludedIds: ExcludeInput) {
|
42208
42181
|
coinsToSpend(
|
@@ -42214,8 +42187,8 @@ ${TransactionFragmentDoc}`;
|
|
42214
42187
|
...messageCoinFragment
|
42215
42188
|
}
|
42216
42189
|
}
|
42217
|
-
${
|
42218
|
-
${
|
42190
|
+
${CoinFragmentFragmentDoc}
|
42191
|
+
${MessageCoinFragmentFragmentDoc}`;
|
42219
42192
|
var GetContractDocument = lib_default2`
|
42220
42193
|
query getContract($contractId: ContractId!) {
|
42221
42194
|
contract(id: $contractId) {
|
@@ -42230,14 +42203,14 @@ ${MessageCoinFragmentDoc}`;
|
|
42230
42203
|
...contractBalanceFragment
|
42231
42204
|
}
|
42232
42205
|
}
|
42233
|
-
${
|
42206
|
+
${ContractBalanceFragmentFragmentDoc}`;
|
42234
42207
|
var GetBalanceDocument = lib_default2`
|
42235
42208
|
query getBalance($owner: Address!, $assetId: AssetId!) {
|
42236
42209
|
balance(owner: $owner, assetId: $assetId) {
|
42237
42210
|
...balanceFragment
|
42238
42211
|
}
|
42239
42212
|
}
|
42240
|
-
${
|
42213
|
+
${BalanceFragmentFragmentDoc}`;
|
42241
42214
|
var GetLatestGasPriceDocument = lib_default2`
|
42242
42215
|
query getLatestGasPrice {
|
42243
42216
|
latestGasPrice {
|
@@ -42268,7 +42241,7 @@ ${MessageCoinFragmentDoc}`;
|
|
42268
42241
|
}
|
42269
42242
|
}
|
42270
42243
|
}
|
42271
|
-
${
|
42244
|
+
${BalanceFragmentFragmentDoc}`;
|
42272
42245
|
var GetMessagesDocument = lib_default2`
|
42273
42246
|
query getMessages($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
|
42274
42247
|
messages(
|
@@ -42285,7 +42258,7 @@ ${MessageCoinFragmentDoc}`;
|
|
42285
42258
|
}
|
42286
42259
|
}
|
42287
42260
|
}
|
42288
|
-
${
|
42261
|
+
${MessageFragmentFragmentDoc}`;
|
42289
42262
|
var GetMessageProofDocument = lib_default2`
|
42290
42263
|
query getMessageProof($transactionId: TransactionId!, $nonce: Nonce!, $commitBlockId: BlockId, $commitBlockHeight: U32) {
|
42291
42264
|
messageProof(
|
@@ -42297,7 +42270,7 @@ ${MessageCoinFragmentDoc}`;
|
|
42297
42270
|
...messageProofFragment
|
42298
42271
|
}
|
42299
42272
|
}
|
42300
|
-
${
|
42273
|
+
${MessageProofFragmentFragmentDoc}`;
|
42301
42274
|
var GetMessageStatusDocument = lib_default2`
|
42302
42275
|
query getMessageStatus($nonce: Nonce!) {
|
42303
42276
|
messageStatus(nonce: $nonce) {
|
@@ -42311,14 +42284,14 @@ ${MessageCoinFragmentDoc}`;
|
|
42311
42284
|
...relayedTransactionStatusFragment
|
42312
42285
|
}
|
42313
42286
|
}
|
42314
|
-
${
|
42287
|
+
${RelayedTransactionStatusFragmentFragmentDoc}`;
|
42315
42288
|
var DryRunDocument = lib_default2`
|
42316
42289
|
mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean) {
|
42317
42290
|
dryRun(txs: $encodedTransactions, utxoValidation: $utxoValidation) {
|
42318
42291
|
...dryRunTransactionExecutionStatusFragment
|
42319
42292
|
}
|
42320
42293
|
}
|
42321
|
-
${
|
42294
|
+
${DryRunTransactionExecutionStatusFragmentFragmentDoc}`;
|
42322
42295
|
var SubmitDocument = lib_default2`
|
42323
42296
|
mutation submit($encodedTransaction: HexString!) {
|
42324
42297
|
submit(tx: $encodedTransaction) {
|
@@ -42340,21 +42313,21 @@ ${MessageCoinFragmentDoc}`;
|
|
42340
42313
|
...messageFragment
|
42341
42314
|
}
|
42342
42315
|
}
|
42343
|
-
${
|
42316
|
+
${MessageFragmentFragmentDoc}`;
|
42344
42317
|
var SubmitAndAwaitDocument = lib_default2`
|
42345
42318
|
subscription submitAndAwait($encodedTransaction: HexString!) {
|
42346
42319
|
submitAndAwait(tx: $encodedTransaction) {
|
42347
42320
|
...transactionStatusSubscriptionFragment
|
42348
42321
|
}
|
42349
42322
|
}
|
42350
|
-
${
|
42323
|
+
${TransactionStatusSubscriptionFragmentFragmentDoc}`;
|
42351
42324
|
var StatusChangeDocument = lib_default2`
|
42352
42325
|
subscription statusChange($transactionId: TransactionId!) {
|
42353
42326
|
statusChange(id: $transactionId) {
|
42354
42327
|
...transactionStatusSubscriptionFragment
|
42355
42328
|
}
|
42356
42329
|
}
|
42357
|
-
${
|
42330
|
+
${TransactionStatusSubscriptionFragmentFragmentDoc}`;
|
42358
42331
|
function getSdk(requester) {
|
42359
42332
|
return {
|
42360
42333
|
getVersion(variables, options) {
|
@@ -42983,9 +42956,10 @@ ${MessageCoinFragmentDoc}`;
|
|
42983
42956
|
function resolveGasDependentCosts(byteSize, gasDependentCost) {
|
42984
42957
|
const base = bn(gasDependentCost.base);
|
42985
42958
|
let dependentValue = bn(0);
|
42986
|
-
if ("
|
42959
|
+
if (gasDependentCost.__typename === "LightOperation") {
|
42987
42960
|
dependentValue = bn(byteSize).div(bn(gasDependentCost.unitsPerGas));
|
42988
|
-
}
|
42961
|
+
}
|
42962
|
+
if (gasDependentCost.__typename === "HeavyOperation") {
|
42989
42963
|
dependentValue = bn(byteSize).mul(bn(gasDependentCost.gasPerUnit));
|
42990
42964
|
}
|
42991
42965
|
return base.add(dependentValue);
|
@@ -43181,6 +43155,34 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43181
43155
|
name = "NoWitnessAtIndexError";
|
43182
43156
|
};
|
43183
43157
|
|
43158
|
+
// src/providers/transaction-request/helpers.ts
|
43159
|
+
var isRequestInputCoin = (input) => input.type === InputType.Coin;
|
43160
|
+
var isRequestInputMessage = (input) => input.type === InputType.Message;
|
43161
|
+
var isRequestInputResource = (input) => isRequestInputCoin(input) || isRequestInputMessage(input);
|
43162
|
+
var getAssetAmountInRequestInputs = (inputs, assetId, baseAsset) => inputs.filter(isRequestInputResource).reduce((acc, input) => {
|
43163
|
+
if (isRequestInputCoin(input) && input.assetId === assetId) {
|
43164
|
+
return acc.add(input.amount);
|
43165
|
+
}
|
43166
|
+
if (isRequestInputMessage(input) && assetId === baseAsset) {
|
43167
|
+
return acc.add(input.amount);
|
43168
|
+
}
|
43169
|
+
return acc;
|
43170
|
+
}, bn(0));
|
43171
|
+
var cacheRequestInputsResourcesFromOwner = (inputs, owner) => inputs.reduce(
|
43172
|
+
(acc, input) => {
|
43173
|
+
if (isRequestInputCoin(input) && input.owner === owner.toB256()) {
|
43174
|
+
acc.utxos.push(input.id);
|
43175
|
+
} else if (isRequestInputMessage(input) && input.recipient === owner.toB256()) {
|
43176
|
+
acc.messages.push(input.nonce);
|
43177
|
+
}
|
43178
|
+
return acc;
|
43179
|
+
},
|
43180
|
+
{
|
43181
|
+
utxos: [],
|
43182
|
+
messages: []
|
43183
|
+
}
|
43184
|
+
);
|
43185
|
+
|
43184
43186
|
// src/providers/transaction-request/witness.ts
|
43185
43187
|
var witnessify = (value) => {
|
43186
43188
|
const data = arrayify(value);
|
@@ -43418,7 +43420,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43418
43420
|
* @param coin - Coin resource.
|
43419
43421
|
*/
|
43420
43422
|
addCoinInput(coin) {
|
43421
|
-
const { assetId, owner, amount } = coin;
|
43423
|
+
const { assetId, owner, amount, id, predicate } = coin;
|
43422
43424
|
let witnessIndex;
|
43423
43425
|
if (coin.predicate) {
|
43424
43426
|
witnessIndex = 0;
|
@@ -43429,13 +43431,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43429
43431
|
}
|
43430
43432
|
}
|
43431
43433
|
const input = {
|
43432
|
-
|
43434
|
+
id,
|
43433
43435
|
type: InputType.Coin,
|
43434
43436
|
owner: owner.toB256(),
|
43435
43437
|
amount,
|
43436
43438
|
assetId,
|
43437
43439
|
txPointer: "0x00000000000000000000000000000000",
|
43438
|
-
witnessIndex
|
43440
|
+
witnessIndex,
|
43441
|
+
predicate
|
43439
43442
|
};
|
43440
43443
|
this.pushInput(input);
|
43441
43444
|
this.addChangeOutput(owner, assetId);
|
@@ -43447,7 +43450,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43447
43450
|
* @param message - Message resource.
|
43448
43451
|
*/
|
43449
43452
|
addMessageInput(message) {
|
43450
|
-
const { recipient, sender, amount, assetId } = message;
|
43453
|
+
const { recipient, sender, amount, predicate, nonce, assetId } = message;
|
43451
43454
|
let witnessIndex;
|
43452
43455
|
if (message.predicate) {
|
43453
43456
|
witnessIndex = 0;
|
@@ -43458,12 +43461,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43458
43461
|
}
|
43459
43462
|
}
|
43460
43463
|
const input = {
|
43461
|
-
|
43464
|
+
nonce,
|
43462
43465
|
type: InputType.Message,
|
43463
43466
|
sender: sender.toB256(),
|
43464
43467
|
recipient: recipient.toB256(),
|
43465
43468
|
amount,
|
43466
|
-
witnessIndex
|
43469
|
+
witnessIndex,
|
43470
|
+
predicate
|
43467
43471
|
};
|
43468
43472
|
this.pushInput(input);
|
43469
43473
|
this.addChangeOutput(recipient, assetId);
|
@@ -43653,6 +43657,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43653
43657
|
toJSON() {
|
43654
43658
|
return normalizeJSON(this);
|
43655
43659
|
}
|
43660
|
+
removeWitness(index) {
|
43661
|
+
this.witnesses.splice(index, 1);
|
43662
|
+
this.adjustWitnessIndexes(index);
|
43663
|
+
}
|
43664
|
+
adjustWitnessIndexes(removedIndex) {
|
43665
|
+
this.inputs.filter(isRequestInputResource).forEach((input) => {
|
43666
|
+
if (input.witnessIndex > removedIndex) {
|
43667
|
+
input.witnessIndex -= 1;
|
43668
|
+
}
|
43669
|
+
});
|
43670
|
+
}
|
43656
43671
|
updatePredicateGasUsed(inputs) {
|
43657
43672
|
this.inputs.forEach((i) => {
|
43658
43673
|
let correspondingInput;
|
@@ -44079,21 +44094,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44079
44094
|
}
|
44080
44095
|
}
|
44081
44096
|
};
|
44082
|
-
var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
|
44083
|
-
(acc, input) => {
|
44084
|
-
if (input.type === InputType.Coin && input.owner === owner.toB256()) {
|
44085
|
-
acc.utxos.push(input.id);
|
44086
|
-
}
|
44087
|
-
if (input.type === InputType.Message && input.recipient === owner.toB256()) {
|
44088
|
-
acc.messages.push(input.nonce);
|
44089
|
-
}
|
44090
|
-
return acc;
|
44091
|
-
},
|
44092
|
-
{
|
44093
|
-
utxos: [],
|
44094
|
-
messages: []
|
44095
|
-
}
|
44096
|
-
);
|
44097
44097
|
|
44098
44098
|
// src/providers/transaction-summary/calculate-tx-fee-for-summary.ts
|
44099
44099
|
var calculateTXFeeForSummary = (params) => {
|
@@ -45787,7 +45787,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
45787
45787
|
};
|
45788
45788
|
const result = await this.operations.getCoinsToSpend(coinsQuery);
|
45789
45789
|
const coins = result.coinsToSpend.flat().map((coin) => {
|
45790
|
-
switch (coin.
|
45790
|
+
switch (coin.__typename) {
|
45791
45791
|
case "MessageCoin":
|
45792
45792
|
return {
|
45793
45793
|
amount: bn(coin.amount),
|
@@ -46206,20 +46206,6 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
46206
46206
|
}
|
46207
46207
|
];
|
46208
46208
|
|
46209
|
-
// src/providers/transaction-request/helpers.ts
|
46210
|
-
var isRequestInputCoin = (input) => input.type === InputType.Coin;
|
46211
|
-
var isRequestInputMessage = (input) => input.type === InputType.Message;
|
46212
|
-
var isRequestInputResource = (input) => isRequestInputCoin(input) || isRequestInputMessage(input);
|
46213
|
-
var getAssetAmountInRequestInputs = (inputs, assetId, baseAsset) => inputs.filter(isRequestInputResource).reduce((acc, input) => {
|
46214
|
-
if (isRequestInputCoin(input) && input.assetId === assetId) {
|
46215
|
-
return acc.add(input.amount);
|
46216
|
-
}
|
46217
|
-
if (isRequestInputMessage(input) && assetId === baseAsset) {
|
46218
|
-
return acc.add(input.amount);
|
46219
|
-
}
|
46220
|
-
return acc;
|
46221
|
-
}, bn(0));
|
46222
|
-
|
46223
46209
|
// src/utils/formatTransferToContractScriptData.ts
|
46224
46210
|
var asm = __toESM(require_node());
|
46225
46211
|
var formatTransferToContractScriptData = (params) => {
|
@@ -46454,7 +46440,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
46454
46440
|
while (needsToBeFunded && fundingAttempts < MAX_FUNDING_ATTEMPTS) {
|
46455
46441
|
const resources = await this.getResourcesToSpend(
|
46456
46442
|
missingQuantities,
|
46457
|
-
|
46443
|
+
cacheRequestInputsResourcesFromOwner(request.inputs, this.address)
|
46458
46444
|
);
|
46459
46445
|
request.addResources(resources);
|
46460
46446
|
txRequest.shiftPredicateData();
|
@@ -51033,16 +51019,18 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
51033
51019
|
__publicField(Wallet, "fromEncryptedJson", WalletUnlocked.fromEncryptedJson);
|
51034
51020
|
|
51035
51021
|
// src/test-utils/seedTestWallet.ts
|
51036
|
-
var seedTestWallet = async (wallet, quantities) => {
|
51037
|
-
const
|
51038
|
-
|
51039
|
-
|
51040
|
-
);
|
51022
|
+
var seedTestWallet = async (wallet, quantities, utxosAmount = 1) => {
|
51023
|
+
const accountsToBeFunded = Array.isArray(wallet) ? wallet : [wallet];
|
51024
|
+
const [{ provider }] = accountsToBeFunded;
|
51025
|
+
const genesisWallet = new WalletUnlocked(process.env.GENESIS_SECRET || randomBytes22(32), provider);
|
51041
51026
|
const request = new ScriptTransactionRequest();
|
51042
|
-
quantities.forEach(
|
51043
|
-
|
51044
|
-
|
51045
|
-
|
51027
|
+
quantities.map(coinQuantityfy).forEach(
|
51028
|
+
({ amount, assetId }) => accountsToBeFunded.forEach(({ address }) => {
|
51029
|
+
for (let i = 0; i < utxosAmount; i++) {
|
51030
|
+
request.addCoinOutput(address, amount.div(utxosAmount), assetId);
|
51031
|
+
}
|
51032
|
+
})
|
51033
|
+
);
|
51046
51034
|
const txCost = await genesisWallet.provider.getTransactionCost(request);
|
51047
51035
|
request.gasLimit = txCost.gasUsed;
|
51048
51036
|
request.maxFee = txCost.maxFee;
|