@fuel-ts/account 0.77.0 → 0.79.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 (30) hide show
  1. package/dist/account.d.ts +7 -0
  2. package/dist/account.d.ts.map +1 -1
  3. package/dist/connectors/fuel-connector.d.ts +10 -0
  4. package/dist/connectors/fuel-connector.d.ts.map +1 -1
  5. package/dist/index.global.js +103 -46
  6. package/dist/index.global.js.map +1 -1
  7. package/dist/index.js +104 -30
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +104 -30
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/providers/provider.d.ts +3 -2
  12. package/dist/providers/provider.d.ts.map +1 -1
  13. package/dist/providers/transaction-request/script-transaction-request.d.ts +3 -0
  14. package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -1
  15. package/dist/providers/transaction-request/transaction-request.d.ts +20 -1
  16. package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
  17. package/dist/providers/transaction-request/types.d.ts +5 -0
  18. package/dist/providers/transaction-request/types.d.ts.map +1 -1
  19. package/dist/providers/transaction-response/getDecodedLogs.d.ts +2 -2
  20. package/dist/providers/transaction-response/getDecodedLogs.d.ts.map +1 -1
  21. package/dist/providers/transaction-response/transaction-response.d.ts +5 -2
  22. package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -1
  23. package/dist/test-utils.global.js +91 -31
  24. package/dist/test-utils.global.js.map +1 -1
  25. package/dist/test-utils.js +92 -17
  26. package/dist/test-utils.js.map +1 -1
  27. package/dist/test-utils.mjs +90 -15
  28. package/dist/test-utils.mjs.map +1 -1
  29. package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
  30. package/package.json +16 -16
package/dist/account.d.ts CHANGED
@@ -158,6 +158,13 @@ export declare class Account extends AbstractAccount {
158
158
  /** Tx Params */
159
159
  txParams?: TxParamsType): Promise<TransactionResponse>;
160
160
  signMessage(message: string): Promise<string>;
161
+ /**
162
+ * Signs a transaction with the wallet's private key.
163
+ *
164
+ * @param transactionRequestLike - The transaction request to sign.
165
+ * @returns A promise that resolves to the signature of the transaction.
166
+ */
167
+ signTransaction(transactionRequestLike: TransactionRequestLike): Promise<string>;
161
168
  /**
162
169
  * Sends a transaction to the network.
163
170
  *
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAItD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EACV,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,sBAAsB,EACtB,QAAQ,EACR,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AASrB,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,4BAA4B,EAC5B,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,cAAc,CACjE,CAAC;AAEF;;GAEG;AACH,qBAAa,OAAQ,SAAQ,eAAe;IAC1C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,SAAS,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC;IAE/B,SAAS,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;IAErC;;;;;OAKG;gBACS,OAAO,EAAE,MAAM,GAAG,eAAe,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,aAAa;IAO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,sBAAsB,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAUtF;;;;;OAKG;IACG,eAAe,CACnB,sBAAsB,EAAE,sBAAsB,EAC9C,EAAE,sBAA6B,EAAE,cAAc,EAAE,GAAE,oBAAyB,GAC3E,OAAO,CAAC,mBAAmB,CAAC;IAgB/B;;;;;OAKG;IACG,mBAAmB,CACvB,sBAAsB,EAAE,sBAAsB,EAC9C,EAAE,sBAA6B,EAAE,GAAE,yBAA8B,GAChE,OAAO,CAAC,UAAU,CAAC;IAQtB,OAAO,CAAC,WAAW;CAyBpB"}
@@ -72,6 +72,16 @@ export declare abstract class FuelConnector extends EventEmitter {
72
72
  * @returns Message signature
73
73
  */
74
74
  signMessage(_address: string, _message: string): Promise<string>;
75
+ /**
76
+ * Should start the sign transaction process and return
77
+ * the signed transaction.
78
+ *
79
+ * @param address - The address to sign the transaction
80
+ * @param transaction - The transaction to sign
81
+ *
82
+ * @returns Transaction signature
83
+ */
84
+ signTransaction(_address: string, _transaction: TransactionRequestLike): Promise<string>;
75
85
  /**
76
86
  * Should start the send transaction process and return
77
87
  * the transaction id submitted to the network.
@@ -1 +1 @@
1
- {"version":3,"file":"fuel-connector.d.ts","sourceRoot":"","sources":["../../src/connectors/fuel-connector.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,YAAY,EACZ,OAAO,EACR,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,8BAAsB,aAAc,SAAQ,YAAY;IACtD,IAAI,EAAE,MAAM,CAAM;IAClB,QAAQ,EAAE,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O,CAAC,OAAO,CAAC;IAIxD;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAIzC;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAIxC;;;;;;OAMG;IACG,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIlE;;;;;OAKG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAIlD;;;;;OAKG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3C;;;;;OAKG;IACH,EAAE,CAAC,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,EACjE,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAC1B,IAAI;CAIR"}
@@ -28952,9 +28952,9 @@ spurious results.`);
28952
28952
  // ../versions/dist/index.mjs
28953
28953
  function getBuiltinVersions() {
28954
28954
  return {
28955
- FORC: "0.51.1",
28955
+ FORC: "0.49.3",
28956
28956
  FUEL_CORE: "0.22.1",
28957
- FUELS: "0.77.0"
28957
+ FUELS: "0.79.0"
28958
28958
  };
28959
28959
  }
28960
28960
  function parseVersion(version2) {
@@ -33196,18 +33196,9 @@ This unreleased fuel-core build may include features and updates not yet support
33196
33196
  var Interface = class {
33197
33197
  functions;
33198
33198
  configurables;
33199
- /*
33200
- TODO: Refactor so that there's no need for externalLoggedTypes
33201
-
33202
- This is dedicated to external contracts added via `<base-invocation-scope.ts>.addContracts()` method.
33203
- This is used to decode logs from contracts other than the main contract
33204
- we're interacting with.
33205
- */
33206
- externalLoggedTypes;
33207
33199
  jsonAbi;
33208
33200
  constructor(jsonAbi) {
33209
33201
  this.jsonAbi = jsonAbi;
33210
- this.externalLoggedTypes = {};
33211
33202
  this.functions = Object.fromEntries(
33212
33203
  this.jsonAbi.functions.map((x) => [x.name, new FunctionFragment(this.jsonAbi, x.name)])
33213
33204
  );
@@ -33248,20 +33239,12 @@ This unreleased fuel-core build may include features and updates not yet support
33248
33239
  const fragment = typeof functionFragment === "string" ? this.getFunction(functionFragment) : functionFragment;
33249
33240
  return fragment.decodeOutput(data);
33250
33241
  }
33251
- decodeLog(data, logId, receiptId) {
33252
- const isExternalLoggedType = this.externalLoggedTypes[receiptId];
33253
- if (isExternalLoggedType) {
33254
- const externalInterface = this.externalLoggedTypes[receiptId];
33255
- return externalInterface.decodeLog(data, logId, receiptId);
33256
- }
33242
+ decodeLog(data, logId) {
33257
33243
  const { loggedType } = findOrThrow(this.jsonAbi.loggedTypes, (type3) => type3.logId === logId);
33258
33244
  return AbiCoder.decode(this.jsonAbi, loggedType, arrayify(data), 0, {
33259
33245
  encoding: this.jsonAbi.encoding
33260
33246
  });
33261
33247
  }
33262
- updateExternalLoggedTypes(id, loggedTypes) {
33263
- this.externalLoggedTypes[id] = loggedTypes;
33264
- }
33265
33248
  encodeConfigurable(name, value) {
33266
33249
  const configurable = findOrThrow(
33267
33250
  this.jsonAbi.configurables,
@@ -39493,13 +39476,27 @@ ${MessageCoinFragmentFragmentDoc}`;
39493
39476
  this.outputs.push(output3);
39494
39477
  return this.outputs.length - 1;
39495
39478
  }
39479
+ /**
39480
+ * @hidden
39481
+ *
39482
+ * Pushes a witness to the list and returns the index
39483
+ *
39484
+ * @param signature - The signature to add to the witness.
39485
+ * @returns The index of the created witness.
39486
+ */
39487
+ addWitness(signature) {
39488
+ this.witnesses.push(signature);
39489
+ return this.witnesses.length - 1;
39490
+ }
39496
39491
  /**
39497
39492
  * @hidden
39498
39493
  *
39499
39494
  * Creates an empty witness without any side effects and returns the index
39495
+ *
39496
+ * @returns The index of the created witness.
39500
39497
  */
39501
- createWitness() {
39502
- this.witnesses.push(concat([ZeroBytes32, ZeroBytes32]));
39498
+ addEmptyWitness() {
39499
+ this.addWitness(concat([ZeroBytes32, ZeroBytes32]));
39503
39500
  return this.witnesses.length - 1;
39504
39501
  }
39505
39502
  /**
@@ -39528,6 +39525,21 @@ ${MessageCoinFragmentFragmentDoc}`;
39528
39525
  }
39529
39526
  this.witnesses[index] = witness;
39530
39527
  }
39528
+ /**
39529
+ * Helper function to add an external signature to the transaction.
39530
+ *
39531
+ * @param account - The account/s to sign to the transaction.
39532
+ * @returns The transaction with the signature witness added.
39533
+ */
39534
+ async addAccountWitnesses(account) {
39535
+ const accounts = Array.isArray(account) ? account : [account];
39536
+ await Promise.all(
39537
+ accounts.map(async (acc) => {
39538
+ this.addWitness(await acc.signTransaction(this));
39539
+ })
39540
+ );
39541
+ return this;
39542
+ }
39531
39543
  /**
39532
39544
  * Gets the coin inputs for a transaction.
39533
39545
  *
@@ -39593,7 +39605,7 @@ ${MessageCoinFragmentFragmentDoc}`;
39593
39605
  } else {
39594
39606
  witnessIndex = this.getCoinInputWitnessIndexByOwner(owner);
39595
39607
  if (typeof witnessIndex !== "number") {
39596
- witnessIndex = this.createWitness();
39608
+ witnessIndex = this.addEmptyWitness();
39597
39609
  }
39598
39610
  }
39599
39611
  const input = {
@@ -39627,7 +39639,7 @@ ${MessageCoinFragmentFragmentDoc}`;
39627
39639
  } else {
39628
39640
  witnessIndex = this.getCoinInputWitnessIndexByOwner(recipient);
39629
39641
  if (typeof witnessIndex !== "number") {
39630
- witnessIndex = this.createWitness();
39642
+ witnessIndex = this.addEmptyWitness();
39631
39643
  }
39632
39644
  }
39633
39645
  const input = {
@@ -40095,6 +40107,7 @@ ${MessageCoinFragmentFragmentDoc}`;
40095
40107
  script;
40096
40108
  /** Script input data (parameters) */
40097
40109
  scriptData;
40110
+ abis;
40098
40111
  /**
40099
40112
  * Constructor for `ScriptTransactionRequest`.
40100
40113
  *
@@ -40105,6 +40118,7 @@ ${MessageCoinFragmentFragmentDoc}`;
40105
40118
  this.gasLimit = bn(gasLimit);
40106
40119
  this.script = arrayify(script ?? returnZeroScript.bytes);
40107
40120
  this.scriptData = arrayify(scriptData ?? returnZeroScript.encodeScriptData());
40121
+ this.abis = rest.abis;
40108
40122
  }
40109
40123
  /**
40110
40124
  * Converts the transaction request to a `TransactionScript`.
@@ -40990,6 +41004,19 @@ ${MessageCoinFragmentFragmentDoc}`;
40990
41004
  return transactionSummary;
40991
41005
  }
40992
41006
 
41007
+ // src/providers/transaction-response/getDecodedLogs.ts
41008
+ function getDecodedLogs(receipts, mainAbi, externalAbis = {}) {
41009
+ return receipts.reduce((logs, receipt) => {
41010
+ if (receipt.type === ReceiptType.LogData || receipt.type === ReceiptType.Log) {
41011
+ const interfaceToUse = new Interface(externalAbis[receipt.id] || mainAbi);
41012
+ const data = receipt.type === ReceiptType.Log ? new BigNumberCoder("u64").encode(receipt.val0) : receipt.data;
41013
+ const [decodedLog] = interfaceToUse.decodeLog(data, receipt.val1.toNumber());
41014
+ logs.push(decodedLog);
41015
+ }
41016
+ return logs;
41017
+ }, []);
41018
+ }
41019
+
40993
41020
  // src/providers/transaction-response/transaction-response.ts
40994
41021
  var TransactionResponse2 = class {
40995
41022
  /** Transaction ID */
@@ -41000,15 +41027,17 @@ ${MessageCoinFragmentFragmentDoc}`;
41000
41027
  gasUsed = bn(0);
41001
41028
  /** The graphql Transaction with receipts object. */
41002
41029
  gqlTransaction;
41030
+ abis;
41003
41031
  /**
41004
41032
  * Constructor for `TransactionResponse`.
41005
41033
  *
41006
41034
  * @param id - The transaction ID.
41007
41035
  * @param provider - The provider.
41008
41036
  */
41009
- constructor(id, provider) {
41037
+ constructor(id, provider, abis) {
41010
41038
  this.id = id;
41011
41039
  this.provider = provider;
41040
+ this.abis = abis;
41012
41041
  }
41013
41042
  /**
41014
41043
  * Async constructor for `TransactionResponse`. This method can be used to create
@@ -41018,8 +41047,8 @@ ${MessageCoinFragmentFragmentDoc}`;
41018
41047
  * @param id - The transaction ID.
41019
41048
  * @param provider - The provider.
41020
41049
  */
41021
- static async create(id, provider) {
41022
- const response = new TransactionResponse2(id, provider);
41050
+ static async create(id, provider, abis) {
41051
+ const response = new TransactionResponse2(id, provider, abis);
41023
41052
  await response.fetch();
41024
41053
  return response;
41025
41054
  }
@@ -41123,6 +41152,14 @@ ${MessageCoinFragmentFragmentDoc}`;
41123
41152
  gqlTransaction: this.gqlTransaction,
41124
41153
  ...transactionSummary
41125
41154
  };
41155
+ if (this.abis) {
41156
+ const logs = getDecodedLogs(
41157
+ transactionSummary.receipts,
41158
+ this.abis.main,
41159
+ this.abis.otherContractsAbis
41160
+ );
41161
+ transactionResult.logs = logs;
41162
+ }
41126
41163
  return transactionResult;
41127
41164
  }
41128
41165
  /**
@@ -41142,21 +41179,6 @@ ${MessageCoinFragmentFragmentDoc}`;
41142
41179
  }
41143
41180
  };
41144
41181
 
41145
- // src/providers/transaction-response/getDecodedLogs.ts
41146
- function getDecodedLogs(receipts, abiInterface) {
41147
- return receipts.reduce((logs, r) => {
41148
- if (r.type === ReceiptType.LogData) {
41149
- logs.push(abiInterface.decodeLog(r.data, r.val1.toNumber(), r.id)[0]);
41150
- }
41151
- if (r.type === ReceiptType.Log) {
41152
- logs.push(
41153
- abiInterface.decodeLog(new BigNumberCoder("u64").encode(r.val0), r.val1.toNumber(), r.id)[0]
41154
- );
41155
- }
41156
- return logs;
41157
- }, []);
41158
- }
41159
-
41160
41182
  // src/providers/utils/auto-retry-fetch.ts
41161
41183
  function getWaitDelay(options, retryAttemptNum) {
41162
41184
  const duration = options.baseDelay ?? 150;
@@ -41491,6 +41513,10 @@ ${MessageCoinFragmentFragmentDoc}`;
41491
41513
  await this.estimateTxDependencies(transactionRequest);
41492
41514
  }
41493
41515
  const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
41516
+ let abis;
41517
+ if (transactionRequest.type === TransactionType.Script) {
41518
+ abis = transactionRequest.abis;
41519
+ }
41494
41520
  if (awaitExecution) {
41495
41521
  const subscription = this.operations.submitAndAwait({ encodedTransaction });
41496
41522
  for await (const { submitAndAwait } of subscription) {
@@ -41505,14 +41531,14 @@ ${MessageCoinFragmentFragmentDoc}`;
41505
41531
  }
41506
41532
  }
41507
41533
  const transactionId2 = transactionRequest.getTransactionId(this.getChainId());
41508
- const response = new TransactionResponse2(transactionId2, this);
41534
+ const response = new TransactionResponse2(transactionId2, this, abis);
41509
41535
  await response.fetch();
41510
41536
  return response;
41511
41537
  }
41512
41538
  const {
41513
41539
  submit: { id: transactionId }
41514
41540
  } = await this.operations.submit({ encodedTransaction });
41515
- return new TransactionResponse2(transactionId, this);
41541
+ return new TransactionResponse2(transactionId, this, abis);
41516
41542
  }
41517
41543
  /**
41518
41544
  * Executes a transaction without actually submitting it to the chain.
@@ -41663,7 +41689,8 @@ ${MessageCoinFragmentFragmentDoc}`;
41663
41689
  async getTransactionCost(transactionRequestLike, forwardingQuantities = [], {
41664
41690
  estimateTxDependencies = true,
41665
41691
  estimatePredicates = true,
41666
- resourcesOwner
41692
+ resourcesOwner,
41693
+ signatureCallback
41667
41694
  } = {}) {
41668
41695
  const txRequestClone = clone_default(transactionRequestify(transactionRequestLike));
41669
41696
  const chainInfo = this.getChain();
@@ -41682,6 +41709,9 @@ ${MessageCoinFragmentFragmentDoc}`;
41682
41709
  }
41683
41710
  await this.estimatePredicates(txRequestClone);
41684
41711
  }
41712
+ if (signatureCallback && isScriptTransaction) {
41713
+ await signatureCallback(txRequestClone);
41714
+ }
41685
41715
  const minGas = txRequestClone.calculateMinGas(chainInfo);
41686
41716
  const maxGas = txRequestClone.calculateMaxGas(chainInfo, minGas);
41687
41717
  let receipts = [];
@@ -42722,6 +42752,21 @@ ${MessageCoinFragmentFragmentDoc}`;
42722
42752
  }
42723
42753
  return this._connector.signMessage(this.address.toString(), message);
42724
42754
  }
42755
+ /**
42756
+ * Signs a transaction with the wallet's private key.
42757
+ *
42758
+ * @param transactionRequestLike - The transaction request to sign.
42759
+ * @returns A promise that resolves to the signature of the transaction.
42760
+ */
42761
+ async signTransaction(transactionRequestLike) {
42762
+ if (!this._connector) {
42763
+ throw new FuelError(
42764
+ ErrorCode.MISSING_CONNECTOR,
42765
+ "A connector is required to sign transactions."
42766
+ );
42767
+ }
42768
+ return this._connector.signTransaction(this.address.toString(), transactionRequestLike);
42769
+ }
42725
42770
  /**
42726
42771
  * Sends a transaction to the network.
42727
42772
  *
@@ -44333,7 +44378,7 @@ ${MessageCoinFragmentFragmentDoc}`;
44333
44378
  */
44334
44379
  async signTransaction(transactionRequestLike) {
44335
44380
  const transactionRequest = transactionRequestify(transactionRequestLike);
44336
- const chainId = this.provider.getChain().consensusParameters.chainId.toNumber();
44381
+ const chainId = this.provider.getChainId();
44337
44382
  const hashedTransaction = transactionRequest.getTransactionId(chainId);
44338
44383
  const signature = await this.signer().sign(hashedTransaction);
44339
44384
  return hexlify(signature);
@@ -47892,6 +47937,18 @@ ${MessageCoinFragmentFragmentDoc}`;
47892
47937
  async signMessage(_address, _message) {
47893
47938
  throw new Error("Method not implemented.");
47894
47939
  }
47940
+ /**
47941
+ * Should start the sign transaction process and return
47942
+ * the signed transaction.
47943
+ *
47944
+ * @param address - The address to sign the transaction
47945
+ * @param transaction - The transaction to sign
47946
+ *
47947
+ * @returns Transaction signature
47948
+ */
47949
+ async signTransaction(_address, _transaction) {
47950
+ throw new Error("Method not implemented.");
47951
+ }
47895
47952
  /**
47896
47953
  * Should start the send transaction process and return
47897
47954
  * the transaction id submitted to the network.