@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.
- package/dist/index.global.js +168 -1170
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +7 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -25
- package/dist/index.mjs.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +38 -38
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +1 -1
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/transaction-response/getDecodedLogs.d.ts.map +1 -1
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/index.d.ts +0 -1
- package/dist/providers/transaction-summary/index.d.ts.map +1 -1
- package/dist/providers/utils/index.d.ts +0 -1
- package/dist/providers/utils/index.d.ts.map +1 -1
- package/dist/test-utils.global.js +165 -1167
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +4 -14
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +8 -18
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +16 -16
- package/dist/providers/transaction-summary/date.d.ts +0 -3
- package/dist/providers/transaction-summary/date.d.ts.map +0 -1
- package/dist/providers/utils/time.d.ts +0 -40
- package/dist/providers/utils/time.d.ts.map +0 -1
package/dist/test-utils.js
CHANGED
@@ -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 =
|
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 ?
|
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.
|
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),
|