@fuel-ts/account 0.75.0 → 0.76.1

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.

@@ -1505,9 +1505,6 @@ function sleep(time) {
1505
1505
  });
1506
1506
  }
1507
1507
 
1508
- // src/providers/utils/time.ts
1509
- var fromUnixToTai64 = (unixTimestampMs) => (BigInt(unixTimestampMs) + BigInt(2 ** 62) + BigInt(10)).toString();
1510
-
1511
1508
  // src/providers/transaction-request/errors.ts
1512
1509
  var NoWitnessAtIndexError = class extends Error {
1513
1510
  constructor(index) {
@@ -2518,13 +2515,6 @@ var calculateTransactionFee = (params) => {
2518
2515
  };
2519
2516
  };
2520
2517
 
2521
- // src/providers/transaction-summary/date.ts
2522
- var import_tai64 = require("tai64");
2523
- var fromTai64ToDate = (tai64Timestamp) => {
2524
- const timestamp = import_tai64.TAI64.fromString(tai64Timestamp, 10).toUnix();
2525
- return new Date(timestamp * 1e3);
2526
- };
2527
-
2528
2518
  // src/providers/transaction-summary/operations.ts
2529
2519
  var import_configs10 = require("@fuel-ts/address/configs");
2530
2520
  var import_errors10 = require("@fuel-ts/errors");
@@ -3118,7 +3108,7 @@ function assembleTransactionSummary(params) {
3118
3108
  const burnedAssets = extractBurnedAssetsFromReceipts(receipts);
3119
3109
  let date;
3120
3110
  if (time) {
3121
- date = fromTai64ToDate(time);
3111
+ date = import_utils19.DateTime.fromTai64(time);
3122
3112
  }
3123
3113
  const transactionSummary = {
3124
3114
  id,
@@ -4226,13 +4216,13 @@ var _Provider = class {
4226
4216
  * Lets you produce blocks with custom timestamps and the block number of the last block produced.
4227
4217
  *
4228
4218
  * @param amount - The amount of blocks to produce
4229
- * @param startTime - The UNIX timestamp to set for the first produced block
4219
+ * @param startTime - The UNIX timestamp (milliseconds) to set for the first produced block
4230
4220
  * @returns A promise that resolves to the block number of the last produced block.
4231
4221
  */
4232
4222
  async produceBlocks(amount, startTime) {
4233
4223
  const { produceBlocks: latestBlockHeight } = await this.operations.produceBlocks({
4234
4224
  blocksToProduce: (0, import_math14.bn)(amount).toString(10),
4235
- startTimestamp: startTime ? fromUnixToTai64(startTime) : void 0
4225
+ startTimestamp: startTime ? import_utils22.DateTime.fromUnixMilliseconds(startTime).toTai64() : void 0
4236
4226
  });
4237
4227
  return (0, import_math14.bn)(latestBlockHeight);
4238
4228
  }
@@ -4314,7 +4304,7 @@ var import_utils26 = require("@fuel-ts/utils");
4314
4304
  var asm = __toESM(require("@fuels/vm-asm"));
4315
4305
  var formatTransferToContractScriptData = (params) => {
4316
4306
  const { assetId, amountToTransfer, hexlifiedContractId } = params;
4317
- const numberCoder = new import_abi_coder4.U64Coder();
4307
+ const numberCoder = new import_abi_coder4.BigNumberCoder("u64");
4318
4308
  const encoded = numberCoder.encode(new import_math16.BN(amountToTransfer).toNumber());
4319
4309
  const scriptData = Uint8Array.from([
4320
4310
  ...(0, import_utils26.arrayify)(hexlifiedContractId),