@fuel-ts/account 0.89.1 → 0.90.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.

Files changed (50) hide show
  1. package/dist/account.d.ts +8 -0
  2. package/dist/account.d.ts.map +1 -1
  3. package/dist/configs.d.ts +3 -1
  4. package/dist/configs.d.ts.map +1 -1
  5. package/dist/configs.global.js +4 -2
  6. package/dist/configs.global.js.map +1 -1
  7. package/dist/configs.js +10 -4
  8. package/dist/configs.js.map +1 -1
  9. package/dist/configs.mjs +7 -3
  10. package/dist/configs.mjs.map +1 -1
  11. package/dist/index.global.js +3328 -3275
  12. package/dist/index.global.js.map +1 -1
  13. package/dist/index.js +217 -169
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +121 -72
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/predicate/predicate.d.ts +8 -0
  18. package/dist/predicate/predicate.d.ts.map +1 -1
  19. package/dist/providers/__generated__/operations.d.ts +58 -0
  20. package/dist/providers/__generated__/operations.d.ts.map +1 -1
  21. package/dist/providers/chains.d.ts +1 -1
  22. package/dist/providers/provider.d.ts +12 -2
  23. package/dist/providers/provider.d.ts.map +1 -1
  24. package/dist/providers/utils/auto-retry-fetch.d.ts.map +1 -1
  25. package/dist/providers/utils/index.d.ts +0 -1
  26. package/dist/providers/utils/index.d.ts.map +1 -1
  27. package/dist/test-utils/asset-id.d.ts +8 -0
  28. package/dist/test-utils/asset-id.d.ts.map +1 -0
  29. package/dist/test-utils/launchNode.d.ts +8 -1
  30. package/dist/test-utils/launchNode.d.ts.map +1 -1
  31. package/dist/test-utils/setup-test-provider-and-wallets.d.ts +33 -0
  32. package/dist/test-utils/setup-test-provider-and-wallets.d.ts.map +1 -0
  33. package/dist/test-utils/test-message.d.ts +29 -0
  34. package/dist/test-utils/test-message.d.ts.map +1 -0
  35. package/dist/test-utils/wallet-config.d.ts +55 -0
  36. package/dist/test-utils/wallet-config.d.ts.map +1 -0
  37. package/dist/test-utils.d.ts +8 -0
  38. package/dist/test-utils.d.ts.map +1 -0
  39. package/dist/test-utils.global.js +2275 -1900
  40. package/dist/test-utils.global.js.map +1 -1
  41. package/dist/test-utils.js +491 -210
  42. package/dist/test-utils.js.map +1 -1
  43. package/dist/test-utils.mjs +398 -121
  44. package/dist/test-utils.mjs.map +1 -1
  45. package/dist/wallet/base-wallet-unlocked.d.ts +1 -1
  46. package/package.json +18 -17
  47. package/dist/providers/utils/sleep.d.ts +0 -3
  48. package/dist/providers/utils/sleep.d.ts.map +0 -1
  49. package/dist/test-utils/index.d.ts +0 -4
  50. package/dist/test-utils/index.d.ts.map +0 -1
@@ -1,6 +1,7 @@
1
1
  import type { JsonAbi, InputValue } from '@fuel-ts/abi-coder';
2
2
  import { Interface } from '@fuel-ts/abi-coder';
3
3
  import type { BytesLike } from '@fuel-ts/interfaces';
4
+ import type { FakeResources } from '../account';
4
5
  import { Account } from '../account';
5
6
  import type { CallResult, CoinQuantityLike, ExcludeResourcesOption, Provider, Resource, TransactionRequest, TransactionRequestLike, TransactionResponse } from '../providers';
6
7
  export type PredicateParams<T = InputValue[]> = {
@@ -68,6 +69,13 @@ export declare class Predicate<TInputData extends InputValue[]> extends Account
68
69
  * @returns A promise that resolves to an array of Resources.
69
70
  */
70
71
  getResourcesToSpend(quantities: CoinQuantityLike[] /** IDs of coins to exclude */, excludedIds?: ExcludeResourcesOption): Promise<Resource[]>;
72
+ /**
73
+ * Generates an array of fake resources based on the provided coins.
74
+ *
75
+ * @param coins - An array of `FakeResources` objects representing the coins.
76
+ * @returns An array of `Resource` objects with generated properties.
77
+ */
78
+ generateFakeResources(coins: FakeResources[]): Array<Resource>;
71
79
  /**
72
80
  * Sets the configurable constants for the predicate.
73
81
  *
@@ -1 +1 @@
1
- {"version":3,"file":"predicate.d.ts","sourceRoot":"","sources":["../../src/predicate/predicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EA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AE,UAAU,CAAC;IAClB,aAAa,EAAE,UAAU,CAA+B;IACxD,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;;;;;OAQG;gBACS,EACV,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,SAAS,EACT,qBAAqB,GACtB,EAAE,eAAe,CAAC,UAAU,CAAC;IAgB9B;;;;;OAKG;IACH,gCAAgC,CAAC,CAAC,SAAS,kBAAkB,EAC3D,sBAAsB,EAAE,sBAAsB;IAwBhD;;;;;OAKG;IACH,eAAe,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAK7F;;;;;OAKG;IACH,mBAAmB,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC;IAKxF,OAAO,CAAC,gBAAgB;IASxB;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAgCnC;;;;;;OAMG;IACG,mBAAmB,CACvB,UAAU,EAAE,gBAAgB,EAAE,CAAC,8BAA8B,EAC7D,WAAW,CAAC,EAAE,sBAAsB,GACnC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAatB;;;;;OAKG;IACH,qBAAqB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC;IAQ9D;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAuCvC;;;;;OAKG;IACH,OAAO,CAAC,8BAA8B;CAgCvC"}
@@ -67,6 +67,7 @@ export type GqlBlock = {
67
67
  height: Scalars['U32'];
68
68
  id: Scalars['BlockId'];
69
69
  transactions: Array<GqlTransaction>;
70
+ version: GqlBlockVersion;
70
71
  };
71
72
  export type GqlBlockConnection = {
72
73
  /** A list of edges. */
@@ -83,6 +84,9 @@ export type GqlBlockEdge = {
83
84
  /** The item at the end of the edge */
84
85
  node: GqlBlock;
85
86
  };
87
+ export declare enum GqlBlockVersion {
88
+ V1 = "V1"
89
+ }
86
90
  /** Breakpoint, defined as a tuple of contract ID and relative PC offset inside it */
87
91
  export type GqlBreakpoint = {
88
92
  contract: Scalars['ContractId'];
@@ -256,6 +260,7 @@ export type GqlGasCosts = {
256
260
  add: Scalars['U64'];
257
261
  addi: Scalars['U64'];
258
262
  aloc: Scalars['U64'];
263
+ alocDependentCost: GqlDependentCost;
259
264
  and: Scalars['U64'];
260
265
  andi: Scalars['U64'];
261
266
  bal: Scalars['U64'];
@@ -410,7 +415,12 @@ export type GqlHeader = {
410
415
  transactionsCount: Scalars['U16'];
411
416
  /** Merkle root of transactions. */
412
417
  transactionsRoot: Scalars['Bytes32'];
418
+ /** Version of the header */
419
+ version: GqlHeaderVersion;
413
420
  };
421
+ export declare enum GqlHeaderVersion {
422
+ V1 = "V1"
423
+ }
414
424
  export type GqlHeavyOperation = {
415
425
  base: Scalars['U64'];
416
426
  gasPerUnit: Scalars['U64'];
@@ -555,6 +565,7 @@ export type GqlMutationContinueTxArgs = {
555
565
  id: Scalars['ID'];
556
566
  };
557
567
  export type GqlMutationDryRunArgs = {
568
+ gasPrice?: InputMaybe<Scalars['U64']>;
558
569
  txs: Array<Scalars['HexString']>;
559
570
  utxoValidation?: InputMaybe<Scalars['Boolean']>;
560
571
  };
@@ -1473,6 +1484,7 @@ export type GqlMessageProofFragment = {
1473
1484
  proofIndex: string;
1474
1485
  };
1475
1486
  messageBlockHeader: {
1487
+ version: GqlHeaderVersion;
1476
1488
  id: string;
1477
1489
  daHeight: string;
1478
1490
  consensusParametersVersion: string;
@@ -1488,6 +1500,7 @@ export type GqlMessageProofFragment = {
1488
1500
  applicationHash: string;
1489
1501
  };
1490
1502
  commitBlockHeader: {
1503
+ version: GqlHeaderVersion;
1491
1504
  id: string;
1492
1505
  daHeight: string;
1493
1506
  consensusParametersVersion: string;
@@ -1641,6 +1654,15 @@ export type GqlGasCostsFragment = {
1641
1654
  xor: string;
1642
1655
  xori: string;
1643
1656
  newStoragePerByte: string;
1657
+ alocDependentCost: {
1658
+ base: string;
1659
+ gasPerUnit: string;
1660
+ type: 'HeavyOperation';
1661
+ } | {
1662
+ base: string;
1663
+ unitsPerGas: string;
1664
+ type: 'LightOperation';
1665
+ };
1644
1666
  call: {
1645
1667
  base: string;
1646
1668
  gasPerUnit: string;
@@ -1957,6 +1979,15 @@ export type GqlConsensusParametersFragment = {
1957
1979
  xor: string;
1958
1980
  xori: string;
1959
1981
  newStoragePerByte: string;
1982
+ alocDependentCost: {
1983
+ base: string;
1984
+ gasPerUnit: string;
1985
+ type: 'HeavyOperation';
1986
+ } | {
1987
+ base: string;
1988
+ unitsPerGas: string;
1989
+ type: 'LightOperation';
1990
+ };
1960
1991
  call: {
1961
1992
  base: string;
1962
1993
  gasPerUnit: string;
@@ -2287,6 +2318,15 @@ export type GqlChainInfoFragment = {
2287
2318
  xor: string;
2288
2319
  xori: string;
2289
2320
  newStoragePerByte: string;
2321
+ alocDependentCost: {
2322
+ base: string;
2323
+ gasPerUnit: string;
2324
+ type: 'HeavyOperation';
2325
+ } | {
2326
+ base: string;
2327
+ unitsPerGas: string;
2328
+ type: 'LightOperation';
2329
+ };
2290
2330
  call: {
2291
2331
  base: string;
2292
2332
  gasPerUnit: string;
@@ -2664,6 +2704,15 @@ export type GqlGetChainQuery = {
2664
2704
  xor: string;
2665
2705
  xori: string;
2666
2706
  newStoragePerByte: string;
2707
+ alocDependentCost: {
2708
+ base: string;
2709
+ gasPerUnit: string;
2710
+ type: 'HeavyOperation';
2711
+ } | {
2712
+ base: string;
2713
+ unitsPerGas: string;
2714
+ type: 'LightOperation';
2715
+ };
2667
2716
  call: {
2668
2717
  base: string;
2669
2718
  gasPerUnit: string;
@@ -3153,6 +3202,12 @@ export type GqlGetTransactionsQuery = {
3153
3202
  } | null;
3154
3203
  };
3155
3204
  }>;
3205
+ pageInfo: {
3206
+ hasPreviousPage: boolean;
3207
+ hasNextPage: boolean;
3208
+ startCursor?: string | null;
3209
+ endCursor?: string | null;
3210
+ };
3156
3211
  };
3157
3212
  };
3158
3213
  export type GqlGetTransactionsByOwnerQueryVariables = Exact<{
@@ -3589,6 +3644,7 @@ export type GqlGetMessageProofQuery = {
3589
3644
  proofIndex: string;
3590
3645
  };
3591
3646
  messageBlockHeader: {
3647
+ version: GqlHeaderVersion;
3592
3648
  id: string;
3593
3649
  daHeight: string;
3594
3650
  consensusParametersVersion: string;
@@ -3604,6 +3660,7 @@ export type GqlGetMessageProofQuery = {
3604
3660
  applicationHash: string;
3605
3661
  };
3606
3662
  commitBlockHeader: {
3663
+ version: GqlHeaderVersion;
3607
3664
  id: string;
3608
3665
  daHeight: string;
3609
3666
  consensusParametersVersion: string;
@@ -3640,6 +3697,7 @@ export type GqlGetRelayedTransactionStatusQuery = {
3640
3697
  export type GqlDryRunMutationVariables = Exact<{
3641
3698
  encodedTransactions: Array<Scalars['HexString']> | Scalars['HexString'];
3642
3699
  utxoValidation?: InputMaybe<Scalars['Boolean']>;
3700
+ gasPrice?: InputMaybe<Scalars['U64']>;
3643
3701
  }>;
3644
3702
  export type GqlDryRunMutation = {
3645
3703
  dryRun: Array<{