@fuel-ts/account 0.99.0 → 0.100.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.
Files changed (62) hide show
  1. package/dist/account.d.ts +9 -4
  2. package/dist/account.d.ts.map +1 -1
  3. package/dist/connectors/fuel-connector.d.ts +7 -6
  4. package/dist/connectors/fuel-connector.d.ts.map +1 -1
  5. package/dist/connectors/types/data-type.d.ts +8 -1
  6. package/dist/connectors/types/data-type.d.ts.map +1 -1
  7. package/dist/index.global.js +4116 -3431
  8. package/dist/index.global.js.map +1 -1
  9. package/dist/index.js +970 -562
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +900 -502
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/mnemonic/mnemonic.d.ts +1 -1
  14. package/dist/providers/__generated__/operations.d.ts +98 -3
  15. package/dist/providers/__generated__/operations.d.ts.map +1 -1
  16. package/dist/providers/coin-quantity.d.ts.map +1 -1
  17. package/dist/providers/message.d.ts.map +1 -1
  18. package/dist/providers/provider.d.ts +75 -11
  19. package/dist/providers/provider.d.ts.map +1 -1
  20. package/dist/providers/resource-cache.d.ts +6 -4
  21. package/dist/providers/resource-cache.d.ts.map +1 -1
  22. package/dist/providers/transaction-request/helpers.d.ts +10 -1
  23. package/dist/providers/transaction-request/helpers.d.ts.map +1 -1
  24. package/dist/providers/transaction-request/transaction-request.d.ts +29 -1
  25. package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
  26. package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -1
  27. package/dist/providers/transaction-summary/assemble-transaction-summary-from-serialized.d.ts +7 -0
  28. package/dist/providers/transaction-summary/assemble-transaction-summary-from-serialized.d.ts.map +1 -0
  29. package/dist/providers/transaction-summary/call.d.ts +8 -2
  30. package/dist/providers/transaction-summary/call.d.ts.map +1 -1
  31. package/dist/providers/transaction-summary/get-transaction-summary.d.ts +1 -1
  32. package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -1
  33. package/dist/providers/transaction-summary/index.d.ts +1 -0
  34. package/dist/providers/transaction-summary/index.d.ts.map +1 -1
  35. package/dist/providers/transaction-summary/operations.d.ts.map +1 -1
  36. package/dist/providers/transaction-summary/receipt.d.ts +3 -2
  37. package/dist/providers/transaction-summary/receipt.d.ts.map +1 -1
  38. package/dist/providers/transaction-summary/types.d.ts +5 -3
  39. package/dist/providers/transaction-summary/types.d.ts.map +1 -1
  40. package/dist/providers/utils/handle-gql-error-message.d.ts +0 -4
  41. package/dist/providers/utils/handle-gql-error-message.d.ts.map +1 -1
  42. package/dist/providers/utils/helpers.d.ts +14 -0
  43. package/dist/providers/utils/helpers.d.ts.map +1 -0
  44. package/dist/providers/utils/index.d.ts +1 -0
  45. package/dist/providers/utils/index.d.ts.map +1 -1
  46. package/dist/providers/utils/receipts.d.ts +4 -3
  47. package/dist/providers/utils/receipts.d.ts.map +1 -1
  48. package/dist/providers/utils/serialization.d.ts +35 -0
  49. package/dist/providers/utils/serialization.d.ts.map +1 -0
  50. package/dist/signer/signer.d.ts +1 -1
  51. package/dist/test-utils.global.js +3839 -3179
  52. package/dist/test-utils.global.js.map +1 -1
  53. package/dist/test-utils.js +895 -537
  54. package/dist/test-utils.js.map +1 -1
  55. package/dist/test-utils.mjs +827 -469
  56. package/dist/test-utils.mjs.map +1 -1
  57. package/dist/utils/formatTransferToContractScriptData.d.ts +3 -3
  58. package/dist/utils/formatTransferToContractScriptData.d.ts.map +1 -1
  59. package/dist/utils/predicate-script-loader-instructions.d.ts +2 -2
  60. package/dist/wallet/base-wallet-unlocked.d.ts +2 -1
  61. package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
  62. package/package.json +21 -21
@@ -45,7 +45,7 @@ declare class Mnemonic {
45
45
  * @param passphrase - Add additional security to protect the generated seed with a memorized passphrase. `Note: if the owner forgot the passphrase, all wallets and accounts derive from the phrase will be lost.`
46
46
  * @returns 64-byte array contains privateKey and chainCode as described on BIP39
47
47
  */
48
- static mnemonicToMasterKeys(phrase: MnemonicPhrase, passphrase?: BytesLike): Uint8Array;
48
+ static mnemonicToMasterKeys(phrase: MnemonicPhrase, passphrase?: BytesLike): Uint8Array<ArrayBufferLike>;
49
49
  /**
50
50
  * Validates if given mnemonic is valid
51
51
  * @param phrase - Mnemonic phrase composed by words from the provided wordlist
@@ -86,6 +86,10 @@ export type Scalars = {
86
86
  input: string;
87
87
  output: string;
88
88
  };
89
+ SubId: {
90
+ input: string;
91
+ output: string;
92
+ };
89
93
  Tai64Timestamp: {
90
94
  input: string;
91
95
  output: string;
@@ -110,13 +114,23 @@ export type Scalars = {
110
114
  input: string;
111
115
  output: string;
112
116
  };
117
+ U128: {
118
+ input: string;
119
+ output: string;
120
+ };
113
121
  UtxoId: {
114
122
  input: string;
115
123
  output: string;
116
124
  };
117
125
  };
126
+ export type GqlAssetInfoDetails = {
127
+ contractId: Scalars['ContractId']['output'];
128
+ subId: Scalars['SubId']['output'];
129
+ totalSupply: Scalars['U128']['output'];
130
+ };
118
131
  export type GqlBalance = {
119
132
  amount: Scalars['U64']['output'];
133
+ amountU128: Scalars['U128']['output'];
120
134
  assetId: Scalars['AssetId']['output'];
121
135
  owner: Scalars['Address']['output'];
122
136
  };
@@ -371,9 +385,11 @@ export type GqlGasCosts = {
371
385
  div: Scalars['U64']['output'];
372
386
  divi: Scalars['U64']['output'];
373
387
  eck1: Scalars['U64']['output'];
388
+ ecop?: Maybe<Scalars['U64']['output']>;
374
389
  ecr1: Scalars['U64']['output'];
375
390
  ed19: Scalars['U64']['output'];
376
391
  ed19DependentCost: GqlDependentCost;
392
+ epar?: Maybe<GqlDependentCost>;
377
393
  eq: Scalars['U64']['output'];
378
394
  exp: Scalars['U64']['output'];
379
395
  expi: Scalars['U64']['output'];
@@ -519,6 +535,14 @@ export type GqlHeavyOperation = {
519
535
  base: Scalars['U64']['output'];
520
536
  gasPerUnit: Scalars['U64']['output'];
521
537
  };
538
+ export type GqlIndexationFlags = {
539
+ /** Is asset metadata indexation enabled */
540
+ assetMetadata: Scalars['Boolean']['output'];
541
+ /** Is balances indexation enabled */
542
+ balances: Scalars['Boolean']['output'];
543
+ /** Is coins to spend indexation enabled */
544
+ coinsToSpend: Scalars['Boolean']['output'];
545
+ };
522
546
  export type GqlInput = GqlInputCoin | GqlInputContract | GqlInputMessage;
523
547
  export type GqlInputCoin = {
524
548
  amount: Scalars['U64']['output'];
@@ -693,6 +717,7 @@ export type GqlMutationSubmitArgs = {
693
717
  tx: Scalars['HexString']['input'];
694
718
  };
695
719
  export type GqlNodeInfo = {
720
+ indexation: GqlIndexationFlags;
696
721
  maxDepth: Scalars['U64']['output'];
697
722
  maxGas: Scalars['U64']['output'];
698
723
  maxSize: Scalars['U64']['output'];
@@ -762,6 +787,7 @@ export type GqlProgramState = {
762
787
  returnType: GqlReturnType;
763
788
  };
764
789
  export type GqlQuery = {
790
+ assetDetails: GqlAssetInfoDetails;
765
791
  balance: GqlBalance;
766
792
  balances: GqlBalanceConnection;
767
793
  blob?: Maybe<GqlBlob>;
@@ -799,7 +825,7 @@ export type GqlQuery = {
799
825
  /** Read read a range of memory bytes. */
800
826
  memory: Scalars['String']['output'];
801
827
  message?: Maybe<GqlMessage>;
802
- messageProof?: Maybe<GqlMessageProof>;
828
+ messageProof: GqlMessageProof;
803
829
  messageStatus: GqlMessageStatus;
804
830
  messages: GqlMessageConnection;
805
831
  nodeInfo: GqlNodeInfo;
@@ -812,6 +838,9 @@ export type GqlQuery = {
812
838
  transactions: GqlTransactionConnection;
813
839
  transactionsByOwner: GqlTransactionConnection;
814
840
  };
841
+ export type GqlQueryAssetDetailsArgs = {
842
+ id: Scalars['AssetId']['input'];
843
+ };
815
844
  export type GqlQueryBalanceArgs = {
816
845
  assetId: Scalars['AssetId']['input'];
817
846
  owner: Scalars['Address']['input'];
@@ -2720,6 +2749,22 @@ export type GqlEstimatePredicatesQuery = {
2720
2749
  } | {}> | null;
2721
2750
  };
2722
2751
  };
2752
+ export type GqlEstimatePredicatesAndGasPriceQueryVariables = Exact<{
2753
+ encodedTransaction: Scalars['HexString']['input'];
2754
+ blockHorizon: Scalars['U32']['input'];
2755
+ }>;
2756
+ export type GqlEstimatePredicatesAndGasPriceQuery = {
2757
+ estimatePredicates: {
2758
+ inputs?: Array<{
2759
+ predicateGasUsed: string;
2760
+ } | {
2761
+ predicateGasUsed: string;
2762
+ } | {}> | null;
2763
+ };
2764
+ estimateGasPrice: {
2765
+ gasPrice: string;
2766
+ };
2767
+ };
2723
2768
  export type GqlGetLatestBlockQueryVariables = Exact<{
2724
2769
  [key: string]: never;
2725
2770
  }>;
@@ -2933,6 +2978,15 @@ export type GqlGetBalanceQuery = {
2933
2978
  amount: string;
2934
2979
  };
2935
2980
  };
2981
+ export type GqlGetBalanceV2QueryVariables = Exact<{
2982
+ owner: Scalars['Address']['input'];
2983
+ assetId: Scalars['AssetId']['input'];
2984
+ }>;
2985
+ export type GqlGetBalanceV2Query = {
2986
+ balance: {
2987
+ amountU128: string;
2988
+ };
2989
+ };
2936
2990
  export type GqlGetLatestGasPriceQueryVariables = Exact<{
2937
2991
  [key: string]: never;
2938
2992
  }>;
@@ -2966,6 +3020,29 @@ export type GqlGetBalancesQuery = {
2966
3020
  }>;
2967
3021
  };
2968
3022
  };
3023
+ export type GqlGetBalancesV2QueryVariables = Exact<{
3024
+ filter: GqlBalanceFilterInput;
3025
+ after?: InputMaybe<Scalars['String']['input']>;
3026
+ before?: InputMaybe<Scalars['String']['input']>;
3027
+ first?: InputMaybe<Scalars['Int']['input']>;
3028
+ last?: InputMaybe<Scalars['Int']['input']>;
3029
+ }>;
3030
+ export type GqlGetBalancesV2Query = {
3031
+ balances: {
3032
+ pageInfo: {
3033
+ hasPreviousPage: boolean;
3034
+ hasNextPage: boolean;
3035
+ startCursor?: string | null;
3036
+ endCursor?: string | null;
3037
+ };
3038
+ edges: Array<{
3039
+ node: {
3040
+ assetId: string;
3041
+ amountU128: string;
3042
+ };
3043
+ }>;
3044
+ };
3045
+ };
2969
3046
  export type GqlGetMessagesQueryVariables = Exact<{
2970
3047
  owner: Scalars['Address']['input'];
2971
3048
  after?: InputMaybe<Scalars['String']['input']>;
@@ -3008,7 +3085,7 @@ export type GqlGetMessageProofQueryVariables = Exact<{
3008
3085
  commitBlockHeight?: InputMaybe<Scalars['U32']['input']>;
3009
3086
  }>;
3010
3087
  export type GqlGetMessageProofQuery = {
3011
- messageProof?: {
3088
+ messageProof: {
3012
3089
  sender: string;
3013
3090
  recipient: string;
3014
3091
  amount: string;
@@ -3053,7 +3130,7 @@ export type GqlGetMessageProofQuery = {
3053
3130
  time: string;
3054
3131
  applicationHash: string;
3055
3132
  };
3056
- } | null;
3133
+ };
3057
3134
  };
3058
3135
  export type GqlGetMessageStatusQueryVariables = Exact<{
3059
3136
  nonce: Scalars['Nonce']['input'];
@@ -3072,6 +3149,16 @@ export type GqlGetRelayedTransactionStatusQuery = {
3072
3149
  failure: string;
3073
3150
  } | null;
3074
3151
  };
3152
+ export type GqlGetAssetDetailsQueryVariables = Exact<{
3153
+ assetId: Scalars['AssetId']['input'];
3154
+ }>;
3155
+ export type GqlGetAssetDetailsQuery = {
3156
+ assetDetails: {
3157
+ subId: string;
3158
+ contractId: string;
3159
+ totalSupply: string;
3160
+ };
3161
+ };
3075
3162
  export type GqlDryRunMutationVariables = Exact<{
3076
3163
  encodedTransactions: Array<Scalars['HexString']['input']> | Scalars['HexString']['input'];
3077
3164
  utxoValidation?: InputMaybe<Scalars['Boolean']['input']>;
@@ -3565,6 +3652,7 @@ export declare const GetTransactionWithReceiptsDocument: DocumentNode;
3565
3652
  export declare const GetTransactionsDocument: DocumentNode;
3566
3653
  export declare const GetTransactionsByOwnerDocument: DocumentNode;
3567
3654
  export declare const EstimatePredicatesDocument: DocumentNode;
3655
+ export declare const EstimatePredicatesAndGasPriceDocument: DocumentNode;
3568
3656
  export declare const GetLatestBlockDocument: DocumentNode;
3569
3657
  export declare const GetLatestBlockHeightDocument: DocumentNode;
3570
3658
  export declare const GetBlockDocument: DocumentNode;
@@ -3576,14 +3664,17 @@ export declare const GetCoinsToSpendDocument: DocumentNode;
3576
3664
  export declare const GetContractDocument: DocumentNode;
3577
3665
  export declare const GetContractBalanceDocument: DocumentNode;
3578
3666
  export declare const GetBalanceDocument: DocumentNode;
3667
+ export declare const GetBalanceV2Document: DocumentNode;
3579
3668
  export declare const GetLatestGasPriceDocument: DocumentNode;
3580
3669
  export declare const EstimateGasPriceDocument: DocumentNode;
3581
3670
  export declare const GetBalancesDocument: DocumentNode;
3671
+ export declare const GetBalancesV2Document: DocumentNode;
3582
3672
  export declare const GetMessagesDocument: DocumentNode;
3583
3673
  export declare const DaCompressedBlockDocument: DocumentNode;
3584
3674
  export declare const GetMessageProofDocument: DocumentNode;
3585
3675
  export declare const GetMessageStatusDocument: DocumentNode;
3586
3676
  export declare const GetRelayedTransactionStatusDocument: DocumentNode;
3677
+ export declare const GetAssetDetailsDocument: DocumentNode;
3587
3678
  export declare const DryRunDocument: DocumentNode;
3588
3679
  export declare const SubmitDocument: DocumentNode;
3589
3680
  export declare const ProduceBlocksDocument: DocumentNode;
@@ -3603,6 +3694,7 @@ export declare function getSdk<C>(requester: Requester<C>): {
3603
3694
  getTransactions(variables?: GqlGetTransactionsQueryVariables, options?: C): Promise<GqlGetTransactionsQuery>;
3604
3695
  getTransactionsByOwner(variables: GqlGetTransactionsByOwnerQueryVariables, options?: C): Promise<GqlGetTransactionsByOwnerQuery>;
3605
3696
  estimatePredicates(variables: GqlEstimatePredicatesQueryVariables, options?: C): Promise<GqlEstimatePredicatesQuery>;
3697
+ estimatePredicatesAndGasPrice(variables: GqlEstimatePredicatesAndGasPriceQueryVariables, options?: C): Promise<GqlEstimatePredicatesAndGasPriceQuery>;
3606
3698
  getLatestBlock(variables?: GqlGetLatestBlockQueryVariables, options?: C): Promise<GqlGetLatestBlockQuery>;
3607
3699
  getLatestBlockHeight(variables?: GqlGetLatestBlockHeightQueryVariables, options?: C): Promise<GqlGetLatestBlockHeightQuery>;
3608
3700
  getBlock(variables?: GqlGetBlockQueryVariables, options?: C): Promise<GqlGetBlockQuery>;
@@ -3614,14 +3706,17 @@ export declare function getSdk<C>(requester: Requester<C>): {
3614
3706
  getContract(variables: GqlGetContractQueryVariables, options?: C): Promise<GqlGetContractQuery>;
3615
3707
  getContractBalance(variables: GqlGetContractBalanceQueryVariables, options?: C): Promise<GqlGetContractBalanceQuery>;
3616
3708
  getBalance(variables: GqlGetBalanceQueryVariables, options?: C): Promise<GqlGetBalanceQuery>;
3709
+ getBalanceV2(variables: GqlGetBalanceV2QueryVariables, options?: C): Promise<GqlGetBalanceV2Query>;
3617
3710
  getLatestGasPrice(variables?: GqlGetLatestGasPriceQueryVariables, options?: C): Promise<GqlGetLatestGasPriceQuery>;
3618
3711
  estimateGasPrice(variables: GqlEstimateGasPriceQueryVariables, options?: C): Promise<GqlEstimateGasPriceQuery>;
3619
3712
  getBalances(variables: GqlGetBalancesQueryVariables, options?: C): Promise<GqlGetBalancesQuery>;
3713
+ getBalancesV2(variables: GqlGetBalancesV2QueryVariables, options?: C): Promise<GqlGetBalancesV2Query>;
3620
3714
  getMessages(variables: GqlGetMessagesQueryVariables, options?: C): Promise<GqlGetMessagesQuery>;
3621
3715
  daCompressedBlock(variables: GqlDaCompressedBlockQueryVariables, options?: C): Promise<GqlDaCompressedBlockQuery>;
3622
3716
  getMessageProof(variables: GqlGetMessageProofQueryVariables, options?: C): Promise<GqlGetMessageProofQuery>;
3623
3717
  getMessageStatus(variables: GqlGetMessageStatusQueryVariables, options?: C): Promise<GqlGetMessageStatusQuery>;
3624
3718
  getRelayedTransactionStatus(variables: GqlGetRelayedTransactionStatusQueryVariables, options?: C): Promise<GqlGetRelayedTransactionStatusQuery>;
3719
+ getAssetDetails(variables: GqlGetAssetDetailsQueryVariables, options?: C): Promise<GqlGetAssetDetailsQuery>;
3625
3720
  dryRun(variables: GqlDryRunMutationVariables, options?: C): Promise<GqlDryRunMutation>;
3626
3721
  submit(variables: GqlSubmitMutationVariables, options?: C): Promise<GqlSubmitMutation>;
3627
3722
  produceBlocks(variables: GqlProduceBlocksMutationVariables, options?: C): Promise<GqlProduceBlocksMutation>;