@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.

package/dist/index.mjs CHANGED
@@ -1023,6 +1023,7 @@ var MemoryCache = class {
1023
1023
  };
1024
1024
 
1025
1025
  // src/providers/transaction-request/input.ts
1026
+ import { BYTES_32, UTXO_ID_LEN } from "@fuel-ts/abi-coder";
1026
1027
  import { ZeroBytes32 } from "@fuel-ts/address/configs";
1027
1028
  import { ErrorCode as ErrorCode3, FuelError as FuelError3 } from "@fuel-ts/errors";
1028
1029
  import { bn as bn2, toNumber } from "@fuel-ts/math";
@@ -1036,8 +1037,8 @@ var inputify = (value) => {
1036
1037
  const predicateData = arrayify(value.predicateData ?? "0x");
1037
1038
  return {
1038
1039
  type: InputType.Coin,
1039
- txID: hexlify3(arrayify(value.id).slice(0, 32)),
1040
- outputIndex: toNumber(arrayify(value.id).slice(32, 33)),
1040
+ txID: hexlify3(arrayify(value.id).slice(0, BYTES_32)),
1041
+ outputIndex: toNumber(arrayify(value.id).slice(BYTES_32, UTXO_ID_LEN)),
1041
1042
  owner: hexlify3(value.owner),
1042
1043
  amount: bn2(value.amount),
1043
1044
  assetId: hexlify3(value.assetId),
@@ -1155,6 +1156,7 @@ var outputify = (value) => {
1155
1156
  };
1156
1157
 
1157
1158
  // src/providers/transaction-request/transaction-request.ts
1159
+ import { UTXO_ID_LEN as UTXO_ID_LEN2 } from "@fuel-ts/abi-coder";
1158
1160
  import { Address, addressify } from "@fuel-ts/address";
1159
1161
  import { BaseAssetId as BaseAssetId2, ZeroBytes32 as ZeroBytes324 } from "@fuel-ts/address/configs";
1160
1162
  import { randomBytes } from "@fuel-ts/crypto";
@@ -2120,12 +2122,12 @@ var BaseTransactionRequest = class {
2120
2122
  const updateAssetInput = (assetId, quantity) => {
2121
2123
  const assetInput = findAssetInput(assetId);
2122
2124
  if (assetInput && "assetId" in assetInput) {
2123
- assetInput.id = hexlify7(randomBytes(33));
2125
+ assetInput.id = hexlify7(randomBytes(UTXO_ID_LEN2));
2124
2126
  assetInput.amount = quantity;
2125
2127
  } else {
2126
2128
  this.addResources([
2127
2129
  {
2128
- id: hexlify7(randomBytes(33)),
2130
+ id: hexlify7(randomBytes(UTXO_ID_LEN2)),
2129
2131
  amount: quantity,
2130
2132
  assetId,
2131
2133
  owner: resourcesOwner || Address.fromRandom(),