@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.global.js +5 -4
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +20 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/transaction-request/input.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/test-utils.global.js +5 -4
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +16 -14
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +6 -4
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +16 -16
package/dist/test-utils.mjs
CHANGED
@@ -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,
|
1035
|
-
outputIndex: toNumber(arrayify(value.id).slice(
|
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(
|
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(
|
2051
|
+
id: hexlify7(randomBytes(UTXO_ID_LEN2)),
|
2050
2052
|
amount: quantity,
|
2051
2053
|
assetId,
|
2052
2054
|
owner: resourcesOwner || Address.fromRandom(),
|