@fuel-ts/account 0.0.0-rc-2034-20240410172045 → 0.0.0-rc-2034-20240410182856

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.

@@ -1018,6 +1018,7 @@ var MemoryCache = class {
1018
1018
  };
1019
1019
 
1020
1020
  // src/providers/transaction-request/input.ts
1021
+ import { BYTES_32, UTXO_ID_LEN } from "@fuel-ts/abi-coder";
1021
1022
  import { ZeroBytes32 } from "@fuel-ts/address/configs";
1022
1023
  import { ErrorCode as ErrorCode3, FuelError as FuelError3 } from "@fuel-ts/errors";
1023
1024
  import { bn as bn2, toNumber } from "@fuel-ts/math";
@@ -1031,8 +1032,8 @@ var inputify = (value) => {
1031
1032
  const predicateData = arrayify(value.predicateData ?? "0x");
1032
1033
  return {
1033
1034
  type: InputType.Coin,
1034
- txID: hexlify3(arrayify(value.id).slice(0, 32)),
1035
- outputIndex: toNumber(arrayify(value.id).slice(32, 33)),
1035
+ txID: hexlify3(arrayify(value.id).slice(0, BYTES_32)),
1036
+ outputIndex: toNumber(arrayify(value.id).slice(BYTES_32, UTXO_ID_LEN)),
1036
1037
  owner: hexlify3(value.owner),
1037
1038
  amount: bn2(value.amount),
1038
1039
  assetId: hexlify3(value.assetId),
@@ -1150,6 +1151,7 @@ var outputify = (value) => {
1150
1151
  };
1151
1152
 
1152
1153
  // src/providers/transaction-request/transaction-request.ts
1154
+ import { UTXO_ID_LEN as UTXO_ID_LEN2 } from "@fuel-ts/abi-coder";
1153
1155
  import { Address, addressify } from "@fuel-ts/address";
1154
1156
  import { BaseAssetId as BaseAssetId2, ZeroBytes32 as ZeroBytes324 } from "@fuel-ts/address/configs";
1155
1157
  import { randomBytes } from "@fuel-ts/crypto";
@@ -2041,12 +2043,12 @@ var BaseTransactionRequest = class {
2041
2043
  const updateAssetInput = (assetId, quantity) => {
2042
2044
  const assetInput = findAssetInput(assetId);
2043
2045
  if (assetInput && "assetId" in assetInput) {
2044
- assetInput.id = hexlify7(randomBytes(33));
2046
+ assetInput.id = hexlify7(randomBytes(UTXO_ID_LEN2));
2045
2047
  assetInput.amount = quantity;
2046
2048
  } else {
2047
2049
  this.addResources([
2048
2050
  {
2049
- id: hexlify7(randomBytes(33)),
2051
+ id: hexlify7(randomBytes(UTXO_ID_LEN2)),
2050
2052
  amount: quantity,
2051
2053
  assetId,
2052
2054
  owner: resourcesOwner || Address.fromRandom(),