@fuel-ts/account 0.75.0 → 0.76.0
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
@@ -20380,1075 +20380,6 @@ spurious results.`);
|
|
20380
20380
|
}
|
20381
20381
|
});
|
20382
20382
|
|
20383
|
-
// ../../node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js
|
20384
|
-
var require_long = __commonJS({
|
20385
|
-
"../../node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js"(exports, module2) {
|
20386
|
-
module2.exports = Long;
|
20387
|
-
var wasm = null;
|
20388
|
-
try {
|
20389
|
-
wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
|
20390
|
-
0,
|
20391
|
-
97,
|
20392
|
-
115,
|
20393
|
-
109,
|
20394
|
-
1,
|
20395
|
-
0,
|
20396
|
-
0,
|
20397
|
-
0,
|
20398
|
-
1,
|
20399
|
-
13,
|
20400
|
-
2,
|
20401
|
-
96,
|
20402
|
-
0,
|
20403
|
-
1,
|
20404
|
-
127,
|
20405
|
-
96,
|
20406
|
-
4,
|
20407
|
-
127,
|
20408
|
-
127,
|
20409
|
-
127,
|
20410
|
-
127,
|
20411
|
-
1,
|
20412
|
-
127,
|
20413
|
-
3,
|
20414
|
-
7,
|
20415
|
-
6,
|
20416
|
-
0,
|
20417
|
-
1,
|
20418
|
-
1,
|
20419
|
-
1,
|
20420
|
-
1,
|
20421
|
-
1,
|
20422
|
-
6,
|
20423
|
-
6,
|
20424
|
-
1,
|
20425
|
-
127,
|
20426
|
-
1,
|
20427
|
-
65,
|
20428
|
-
0,
|
20429
|
-
11,
|
20430
|
-
7,
|
20431
|
-
50,
|
20432
|
-
6,
|
20433
|
-
3,
|
20434
|
-
109,
|
20435
|
-
117,
|
20436
|
-
108,
|
20437
|
-
0,
|
20438
|
-
1,
|
20439
|
-
5,
|
20440
|
-
100,
|
20441
|
-
105,
|
20442
|
-
118,
|
20443
|
-
95,
|
20444
|
-
115,
|
20445
|
-
0,
|
20446
|
-
2,
|
20447
|
-
5,
|
20448
|
-
100,
|
20449
|
-
105,
|
20450
|
-
118,
|
20451
|
-
95,
|
20452
|
-
117,
|
20453
|
-
0,
|
20454
|
-
3,
|
20455
|
-
5,
|
20456
|
-
114,
|
20457
|
-
101,
|
20458
|
-
109,
|
20459
|
-
95,
|
20460
|
-
115,
|
20461
|
-
0,
|
20462
|
-
4,
|
20463
|
-
5,
|
20464
|
-
114,
|
20465
|
-
101,
|
20466
|
-
109,
|
20467
|
-
95,
|
20468
|
-
117,
|
20469
|
-
0,
|
20470
|
-
5,
|
20471
|
-
8,
|
20472
|
-
103,
|
20473
|
-
101,
|
20474
|
-
116,
|
20475
|
-
95,
|
20476
|
-
104,
|
20477
|
-
105,
|
20478
|
-
103,
|
20479
|
-
104,
|
20480
|
-
0,
|
20481
|
-
0,
|
20482
|
-
10,
|
20483
|
-
191,
|
20484
|
-
1,
|
20485
|
-
6,
|
20486
|
-
4,
|
20487
|
-
0,
|
20488
|
-
35,
|
20489
|
-
0,
|
20490
|
-
11,
|
20491
|
-
36,
|
20492
|
-
1,
|
20493
|
-
1,
|
20494
|
-
126,
|
20495
|
-
32,
|
20496
|
-
0,
|
20497
|
-
173,
|
20498
|
-
32,
|
20499
|
-
1,
|
20500
|
-
173,
|
20501
|
-
66,
|
20502
|
-
32,
|
20503
|
-
134,
|
20504
|
-
132,
|
20505
|
-
32,
|
20506
|
-
2,
|
20507
|
-
173,
|
20508
|
-
32,
|
20509
|
-
3,
|
20510
|
-
173,
|
20511
|
-
66,
|
20512
|
-
32,
|
20513
|
-
134,
|
20514
|
-
132,
|
20515
|
-
126,
|
20516
|
-
34,
|
20517
|
-
4,
|
20518
|
-
66,
|
20519
|
-
32,
|
20520
|
-
135,
|
20521
|
-
167,
|
20522
|
-
36,
|
20523
|
-
0,
|
20524
|
-
32,
|
20525
|
-
4,
|
20526
|
-
167,
|
20527
|
-
11,
|
20528
|
-
36,
|
20529
|
-
1,
|
20530
|
-
1,
|
20531
|
-
126,
|
20532
|
-
32,
|
20533
|
-
0,
|
20534
|
-
173,
|
20535
|
-
32,
|
20536
|
-
1,
|
20537
|
-
173,
|
20538
|
-
66,
|
20539
|
-
32,
|
20540
|
-
134,
|
20541
|
-
132,
|
20542
|
-
32,
|
20543
|
-
2,
|
20544
|
-
173,
|
20545
|
-
32,
|
20546
|
-
3,
|
20547
|
-
173,
|
20548
|
-
66,
|
20549
|
-
32,
|
20550
|
-
134,
|
20551
|
-
132,
|
20552
|
-
127,
|
20553
|
-
34,
|
20554
|
-
4,
|
20555
|
-
66,
|
20556
|
-
32,
|
20557
|
-
135,
|
20558
|
-
167,
|
20559
|
-
36,
|
20560
|
-
0,
|
20561
|
-
32,
|
20562
|
-
4,
|
20563
|
-
167,
|
20564
|
-
11,
|
20565
|
-
36,
|
20566
|
-
1,
|
20567
|
-
1,
|
20568
|
-
126,
|
20569
|
-
32,
|
20570
|
-
0,
|
20571
|
-
173,
|
20572
|
-
32,
|
20573
|
-
1,
|
20574
|
-
173,
|
20575
|
-
66,
|
20576
|
-
32,
|
20577
|
-
134,
|
20578
|
-
132,
|
20579
|
-
32,
|
20580
|
-
2,
|
20581
|
-
173,
|
20582
|
-
32,
|
20583
|
-
3,
|
20584
|
-
173,
|
20585
|
-
66,
|
20586
|
-
32,
|
20587
|
-
134,
|
20588
|
-
132,
|
20589
|
-
128,
|
20590
|
-
34,
|
20591
|
-
4,
|
20592
|
-
66,
|
20593
|
-
32,
|
20594
|
-
135,
|
20595
|
-
167,
|
20596
|
-
36,
|
20597
|
-
0,
|
20598
|
-
32,
|
20599
|
-
4,
|
20600
|
-
167,
|
20601
|
-
11,
|
20602
|
-
36,
|
20603
|
-
1,
|
20604
|
-
1,
|
20605
|
-
126,
|
20606
|
-
32,
|
20607
|
-
0,
|
20608
|
-
173,
|
20609
|
-
32,
|
20610
|
-
1,
|
20611
|
-
173,
|
20612
|
-
66,
|
20613
|
-
32,
|
20614
|
-
134,
|
20615
|
-
132,
|
20616
|
-
32,
|
20617
|
-
2,
|
20618
|
-
173,
|
20619
|
-
32,
|
20620
|
-
3,
|
20621
|
-
173,
|
20622
|
-
66,
|
20623
|
-
32,
|
20624
|
-
134,
|
20625
|
-
132,
|
20626
|
-
129,
|
20627
|
-
34,
|
20628
|
-
4,
|
20629
|
-
66,
|
20630
|
-
32,
|
20631
|
-
135,
|
20632
|
-
167,
|
20633
|
-
36,
|
20634
|
-
0,
|
20635
|
-
32,
|
20636
|
-
4,
|
20637
|
-
167,
|
20638
|
-
11,
|
20639
|
-
36,
|
20640
|
-
1,
|
20641
|
-
1,
|
20642
|
-
126,
|
20643
|
-
32,
|
20644
|
-
0,
|
20645
|
-
173,
|
20646
|
-
32,
|
20647
|
-
1,
|
20648
|
-
173,
|
20649
|
-
66,
|
20650
|
-
32,
|
20651
|
-
134,
|
20652
|
-
132,
|
20653
|
-
32,
|
20654
|
-
2,
|
20655
|
-
173,
|
20656
|
-
32,
|
20657
|
-
3,
|
20658
|
-
173,
|
20659
|
-
66,
|
20660
|
-
32,
|
20661
|
-
134,
|
20662
|
-
132,
|
20663
|
-
130,
|
20664
|
-
34,
|
20665
|
-
4,
|
20666
|
-
66,
|
20667
|
-
32,
|
20668
|
-
135,
|
20669
|
-
167,
|
20670
|
-
36,
|
20671
|
-
0,
|
20672
|
-
32,
|
20673
|
-
4,
|
20674
|
-
167,
|
20675
|
-
11
|
20676
|
-
])), {}).exports;
|
20677
|
-
} catch (e) {
|
20678
|
-
}
|
20679
|
-
function Long(low, high, unsigned) {
|
20680
|
-
this.low = low | 0;
|
20681
|
-
this.high = high | 0;
|
20682
|
-
this.unsigned = !!unsigned;
|
20683
|
-
}
|
20684
|
-
Long.prototype.__isLong__;
|
20685
|
-
Object.defineProperty(Long.prototype, "__isLong__", { value: true });
|
20686
|
-
function isLong(obj) {
|
20687
|
-
return (obj && obj["__isLong__"]) === true;
|
20688
|
-
}
|
20689
|
-
Long.isLong = isLong;
|
20690
|
-
var INT_CACHE = {};
|
20691
|
-
var UINT_CACHE = {};
|
20692
|
-
function fromInt(value, unsigned) {
|
20693
|
-
var obj, cachedObj, cache2;
|
20694
|
-
if (unsigned) {
|
20695
|
-
value >>>= 0;
|
20696
|
-
if (cache2 = 0 <= value && value < 256) {
|
20697
|
-
cachedObj = UINT_CACHE[value];
|
20698
|
-
if (cachedObj)
|
20699
|
-
return cachedObj;
|
20700
|
-
}
|
20701
|
-
obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
|
20702
|
-
if (cache2)
|
20703
|
-
UINT_CACHE[value] = obj;
|
20704
|
-
return obj;
|
20705
|
-
} else {
|
20706
|
-
value |= 0;
|
20707
|
-
if (cache2 = -128 <= value && value < 128) {
|
20708
|
-
cachedObj = INT_CACHE[value];
|
20709
|
-
if (cachedObj)
|
20710
|
-
return cachedObj;
|
20711
|
-
}
|
20712
|
-
obj = fromBits(value, value < 0 ? -1 : 0, false);
|
20713
|
-
if (cache2)
|
20714
|
-
INT_CACHE[value] = obj;
|
20715
|
-
return obj;
|
20716
|
-
}
|
20717
|
-
}
|
20718
|
-
Long.fromInt = fromInt;
|
20719
|
-
function fromNumber(value, unsigned) {
|
20720
|
-
if (isNaN(value))
|
20721
|
-
return unsigned ? UZERO : ZERO;
|
20722
|
-
if (unsigned) {
|
20723
|
-
if (value < 0)
|
20724
|
-
return UZERO;
|
20725
|
-
if (value >= TWO_PWR_64_DBL)
|
20726
|
-
return MAX_UNSIGNED_VALUE;
|
20727
|
-
} else {
|
20728
|
-
if (value <= -TWO_PWR_63_DBL)
|
20729
|
-
return MIN_VALUE;
|
20730
|
-
if (value + 1 >= TWO_PWR_63_DBL)
|
20731
|
-
return MAX_VALUE;
|
20732
|
-
}
|
20733
|
-
if (value < 0)
|
20734
|
-
return fromNumber(-value, unsigned).neg();
|
20735
|
-
return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);
|
20736
|
-
}
|
20737
|
-
Long.fromNumber = fromNumber;
|
20738
|
-
function fromBits(lowBits, highBits, unsigned) {
|
20739
|
-
return new Long(lowBits, highBits, unsigned);
|
20740
|
-
}
|
20741
|
-
Long.fromBits = fromBits;
|
20742
|
-
var pow_dbl = Math.pow;
|
20743
|
-
function fromString(str, unsigned, radix) {
|
20744
|
-
if (str.length === 0)
|
20745
|
-
throw Error("empty string");
|
20746
|
-
if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
|
20747
|
-
return ZERO;
|
20748
|
-
if (typeof unsigned === "number") {
|
20749
|
-
radix = unsigned, unsigned = false;
|
20750
|
-
} else {
|
20751
|
-
unsigned = !!unsigned;
|
20752
|
-
}
|
20753
|
-
radix = radix || 10;
|
20754
|
-
if (radix < 2 || 36 < radix)
|
20755
|
-
throw RangeError("radix");
|
20756
|
-
var p;
|
20757
|
-
if ((p = str.indexOf("-")) > 0)
|
20758
|
-
throw Error("interior hyphen");
|
20759
|
-
else if (p === 0) {
|
20760
|
-
return fromString(str.substring(1), unsigned, radix).neg();
|
20761
|
-
}
|
20762
|
-
var radixToPower = fromNumber(pow_dbl(radix, 8));
|
20763
|
-
var result = ZERO;
|
20764
|
-
for (var i = 0; i < str.length; i += 8) {
|
20765
|
-
var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
|
20766
|
-
if (size < 8) {
|
20767
|
-
var power = fromNumber(pow_dbl(radix, size));
|
20768
|
-
result = result.mul(power).add(fromNumber(value));
|
20769
|
-
} else {
|
20770
|
-
result = result.mul(radixToPower);
|
20771
|
-
result = result.add(fromNumber(value));
|
20772
|
-
}
|
20773
|
-
}
|
20774
|
-
result.unsigned = unsigned;
|
20775
|
-
return result;
|
20776
|
-
}
|
20777
|
-
Long.fromString = fromString;
|
20778
|
-
function fromValue(val, unsigned) {
|
20779
|
-
if (typeof val === "number")
|
20780
|
-
return fromNumber(val, unsigned);
|
20781
|
-
if (typeof val === "string")
|
20782
|
-
return fromString(val, unsigned);
|
20783
|
-
return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned);
|
20784
|
-
}
|
20785
|
-
Long.fromValue = fromValue;
|
20786
|
-
var TWO_PWR_16_DBL = 1 << 16;
|
20787
|
-
var TWO_PWR_24_DBL = 1 << 24;
|
20788
|
-
var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
|
20789
|
-
var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
|
20790
|
-
var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
|
20791
|
-
var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
|
20792
|
-
var ZERO = fromInt(0);
|
20793
|
-
Long.ZERO = ZERO;
|
20794
|
-
var UZERO = fromInt(0, true);
|
20795
|
-
Long.UZERO = UZERO;
|
20796
|
-
var ONE = fromInt(1);
|
20797
|
-
Long.ONE = ONE;
|
20798
|
-
var UONE = fromInt(1, true);
|
20799
|
-
Long.UONE = UONE;
|
20800
|
-
var NEG_ONE = fromInt(-1);
|
20801
|
-
Long.NEG_ONE = NEG_ONE;
|
20802
|
-
var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
|
20803
|
-
Long.MAX_VALUE = MAX_VALUE;
|
20804
|
-
var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
|
20805
|
-
Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
|
20806
|
-
var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
|
20807
|
-
Long.MIN_VALUE = MIN_VALUE;
|
20808
|
-
var LongPrototype = Long.prototype;
|
20809
|
-
LongPrototype.toInt = function toInt() {
|
20810
|
-
return this.unsigned ? this.low >>> 0 : this.low;
|
20811
|
-
};
|
20812
|
-
LongPrototype.toNumber = function toNumber3() {
|
20813
|
-
if (this.unsigned)
|
20814
|
-
return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
|
20815
|
-
return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
|
20816
|
-
};
|
20817
|
-
LongPrototype.toString = function toString(radix) {
|
20818
|
-
radix = radix || 10;
|
20819
|
-
if (radix < 2 || 36 < radix)
|
20820
|
-
throw RangeError("radix");
|
20821
|
-
if (this.isZero())
|
20822
|
-
return "0";
|
20823
|
-
if (this.isNegative()) {
|
20824
|
-
if (this.eq(MIN_VALUE)) {
|
20825
|
-
var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
|
20826
|
-
return div.toString(radix) + rem1.toInt().toString(radix);
|
20827
|
-
} else
|
20828
|
-
return "-" + this.neg().toString(radix);
|
20829
|
-
}
|
20830
|
-
var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
|
20831
|
-
var result = "";
|
20832
|
-
while (true) {
|
20833
|
-
var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
|
20834
|
-
rem = remDiv;
|
20835
|
-
if (rem.isZero())
|
20836
|
-
return digits + result;
|
20837
|
-
else {
|
20838
|
-
while (digits.length < 6)
|
20839
|
-
digits = "0" + digits;
|
20840
|
-
result = "" + digits + result;
|
20841
|
-
}
|
20842
|
-
}
|
20843
|
-
};
|
20844
|
-
LongPrototype.getHighBits = function getHighBits() {
|
20845
|
-
return this.high;
|
20846
|
-
};
|
20847
|
-
LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
|
20848
|
-
return this.high >>> 0;
|
20849
|
-
};
|
20850
|
-
LongPrototype.getLowBits = function getLowBits() {
|
20851
|
-
return this.low;
|
20852
|
-
};
|
20853
|
-
LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
|
20854
|
-
return this.low >>> 0;
|
20855
|
-
};
|
20856
|
-
LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
|
20857
|
-
if (this.isNegative())
|
20858
|
-
return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
|
20859
|
-
var val = this.high != 0 ? this.high : this.low;
|
20860
|
-
for (var bit = 31; bit > 0; bit--)
|
20861
|
-
if ((val & 1 << bit) != 0)
|
20862
|
-
break;
|
20863
|
-
return this.high != 0 ? bit + 33 : bit + 1;
|
20864
|
-
};
|
20865
|
-
LongPrototype.isZero = function isZero() {
|
20866
|
-
return this.high === 0 && this.low === 0;
|
20867
|
-
};
|
20868
|
-
LongPrototype.eqz = LongPrototype.isZero;
|
20869
|
-
LongPrototype.isNegative = function isNegative() {
|
20870
|
-
return !this.unsigned && this.high < 0;
|
20871
|
-
};
|
20872
|
-
LongPrototype.isPositive = function isPositive() {
|
20873
|
-
return this.unsigned || this.high >= 0;
|
20874
|
-
};
|
20875
|
-
LongPrototype.isOdd = function isOdd() {
|
20876
|
-
return (this.low & 1) === 1;
|
20877
|
-
};
|
20878
|
-
LongPrototype.isEven = function isEven() {
|
20879
|
-
return (this.low & 1) === 0;
|
20880
|
-
};
|
20881
|
-
LongPrototype.equals = function equals(other) {
|
20882
|
-
if (!isLong(other))
|
20883
|
-
other = fromValue(other);
|
20884
|
-
if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
|
20885
|
-
return false;
|
20886
|
-
return this.high === other.high && this.low === other.low;
|
20887
|
-
};
|
20888
|
-
LongPrototype.eq = LongPrototype.equals;
|
20889
|
-
LongPrototype.notEquals = function notEquals(other) {
|
20890
|
-
return !this.eq(
|
20891
|
-
/* validates */
|
20892
|
-
other
|
20893
|
-
);
|
20894
|
-
};
|
20895
|
-
LongPrototype.neq = LongPrototype.notEquals;
|
20896
|
-
LongPrototype.ne = LongPrototype.notEquals;
|
20897
|
-
LongPrototype.lessThan = function lessThan(other) {
|
20898
|
-
return this.comp(
|
20899
|
-
/* validates */
|
20900
|
-
other
|
20901
|
-
) < 0;
|
20902
|
-
};
|
20903
|
-
LongPrototype.lt = LongPrototype.lessThan;
|
20904
|
-
LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
|
20905
|
-
return this.comp(
|
20906
|
-
/* validates */
|
20907
|
-
other
|
20908
|
-
) <= 0;
|
20909
|
-
};
|
20910
|
-
LongPrototype.lte = LongPrototype.lessThanOrEqual;
|
20911
|
-
LongPrototype.le = LongPrototype.lessThanOrEqual;
|
20912
|
-
LongPrototype.greaterThan = function greaterThan(other) {
|
20913
|
-
return this.comp(
|
20914
|
-
/* validates */
|
20915
|
-
other
|
20916
|
-
) > 0;
|
20917
|
-
};
|
20918
|
-
LongPrototype.gt = LongPrototype.greaterThan;
|
20919
|
-
LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
|
20920
|
-
return this.comp(
|
20921
|
-
/* validates */
|
20922
|
-
other
|
20923
|
-
) >= 0;
|
20924
|
-
};
|
20925
|
-
LongPrototype.gte = LongPrototype.greaterThanOrEqual;
|
20926
|
-
LongPrototype.ge = LongPrototype.greaterThanOrEqual;
|
20927
|
-
LongPrototype.compare = function compare(other) {
|
20928
|
-
if (!isLong(other))
|
20929
|
-
other = fromValue(other);
|
20930
|
-
if (this.eq(other))
|
20931
|
-
return 0;
|
20932
|
-
var thisNeg = this.isNegative(), otherNeg = other.isNegative();
|
20933
|
-
if (thisNeg && !otherNeg)
|
20934
|
-
return -1;
|
20935
|
-
if (!thisNeg && otherNeg)
|
20936
|
-
return 1;
|
20937
|
-
if (!this.unsigned)
|
20938
|
-
return this.sub(other).isNegative() ? -1 : 1;
|
20939
|
-
return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
|
20940
|
-
};
|
20941
|
-
LongPrototype.comp = LongPrototype.compare;
|
20942
|
-
LongPrototype.negate = function negate() {
|
20943
|
-
if (!this.unsigned && this.eq(MIN_VALUE))
|
20944
|
-
return MIN_VALUE;
|
20945
|
-
return this.not().add(ONE);
|
20946
|
-
};
|
20947
|
-
LongPrototype.neg = LongPrototype.negate;
|
20948
|
-
LongPrototype.add = function add3(addend) {
|
20949
|
-
if (!isLong(addend))
|
20950
|
-
addend = fromValue(addend);
|
20951
|
-
var a48 = this.high >>> 16;
|
20952
|
-
var a32 = this.high & 65535;
|
20953
|
-
var a16 = this.low >>> 16;
|
20954
|
-
var a00 = this.low & 65535;
|
20955
|
-
var b48 = addend.high >>> 16;
|
20956
|
-
var b32 = addend.high & 65535;
|
20957
|
-
var b16 = addend.low >>> 16;
|
20958
|
-
var b00 = addend.low & 65535;
|
20959
|
-
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
20960
|
-
c00 += a00 + b00;
|
20961
|
-
c16 += c00 >>> 16;
|
20962
|
-
c00 &= 65535;
|
20963
|
-
c16 += a16 + b16;
|
20964
|
-
c32 += c16 >>> 16;
|
20965
|
-
c16 &= 65535;
|
20966
|
-
c32 += a32 + b32;
|
20967
|
-
c48 += c32 >>> 16;
|
20968
|
-
c32 &= 65535;
|
20969
|
-
c48 += a48 + b48;
|
20970
|
-
c48 &= 65535;
|
20971
|
-
return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
|
20972
|
-
};
|
20973
|
-
LongPrototype.subtract = function subtract(subtrahend) {
|
20974
|
-
if (!isLong(subtrahend))
|
20975
|
-
subtrahend = fromValue(subtrahend);
|
20976
|
-
return this.add(subtrahend.neg());
|
20977
|
-
};
|
20978
|
-
LongPrototype.sub = LongPrototype.subtract;
|
20979
|
-
LongPrototype.multiply = function multiply(multiplier) {
|
20980
|
-
if (this.isZero())
|
20981
|
-
return ZERO;
|
20982
|
-
if (!isLong(multiplier))
|
20983
|
-
multiplier = fromValue(multiplier);
|
20984
|
-
if (wasm) {
|
20985
|
-
var low = wasm.mul(
|
20986
|
-
this.low,
|
20987
|
-
this.high,
|
20988
|
-
multiplier.low,
|
20989
|
-
multiplier.high
|
20990
|
-
);
|
20991
|
-
return fromBits(low, wasm.get_high(), this.unsigned);
|
20992
|
-
}
|
20993
|
-
if (multiplier.isZero())
|
20994
|
-
return ZERO;
|
20995
|
-
if (this.eq(MIN_VALUE))
|
20996
|
-
return multiplier.isOdd() ? MIN_VALUE : ZERO;
|
20997
|
-
if (multiplier.eq(MIN_VALUE))
|
20998
|
-
return this.isOdd() ? MIN_VALUE : ZERO;
|
20999
|
-
if (this.isNegative()) {
|
21000
|
-
if (multiplier.isNegative())
|
21001
|
-
return this.neg().mul(multiplier.neg());
|
21002
|
-
else
|
21003
|
-
return this.neg().mul(multiplier).neg();
|
21004
|
-
} else if (multiplier.isNegative())
|
21005
|
-
return this.mul(multiplier.neg()).neg();
|
21006
|
-
if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
|
21007
|
-
return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
|
21008
|
-
var a48 = this.high >>> 16;
|
21009
|
-
var a32 = this.high & 65535;
|
21010
|
-
var a16 = this.low >>> 16;
|
21011
|
-
var a00 = this.low & 65535;
|
21012
|
-
var b48 = multiplier.high >>> 16;
|
21013
|
-
var b32 = multiplier.high & 65535;
|
21014
|
-
var b16 = multiplier.low >>> 16;
|
21015
|
-
var b00 = multiplier.low & 65535;
|
21016
|
-
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
21017
|
-
c00 += a00 * b00;
|
21018
|
-
c16 += c00 >>> 16;
|
21019
|
-
c00 &= 65535;
|
21020
|
-
c16 += a16 * b00;
|
21021
|
-
c32 += c16 >>> 16;
|
21022
|
-
c16 &= 65535;
|
21023
|
-
c16 += a00 * b16;
|
21024
|
-
c32 += c16 >>> 16;
|
21025
|
-
c16 &= 65535;
|
21026
|
-
c32 += a32 * b00;
|
21027
|
-
c48 += c32 >>> 16;
|
21028
|
-
c32 &= 65535;
|
21029
|
-
c32 += a16 * b16;
|
21030
|
-
c48 += c32 >>> 16;
|
21031
|
-
c32 &= 65535;
|
21032
|
-
c32 += a00 * b32;
|
21033
|
-
c48 += c32 >>> 16;
|
21034
|
-
c32 &= 65535;
|
21035
|
-
c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
|
21036
|
-
c48 &= 65535;
|
21037
|
-
return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
|
21038
|
-
};
|
21039
|
-
LongPrototype.mul = LongPrototype.multiply;
|
21040
|
-
LongPrototype.divide = function divide(divisor) {
|
21041
|
-
if (!isLong(divisor))
|
21042
|
-
divisor = fromValue(divisor);
|
21043
|
-
if (divisor.isZero())
|
21044
|
-
throw Error("division by zero");
|
21045
|
-
if (wasm) {
|
21046
|
-
if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
|
21047
|
-
return this;
|
21048
|
-
}
|
21049
|
-
var low = (this.unsigned ? wasm.div_u : wasm.div_s)(
|
21050
|
-
this.low,
|
21051
|
-
this.high,
|
21052
|
-
divisor.low,
|
21053
|
-
divisor.high
|
21054
|
-
);
|
21055
|
-
return fromBits(low, wasm.get_high(), this.unsigned);
|
21056
|
-
}
|
21057
|
-
if (this.isZero())
|
21058
|
-
return this.unsigned ? UZERO : ZERO;
|
21059
|
-
var approx, rem, res;
|
21060
|
-
if (!this.unsigned) {
|
21061
|
-
if (this.eq(MIN_VALUE)) {
|
21062
|
-
if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
|
21063
|
-
return MIN_VALUE;
|
21064
|
-
else if (divisor.eq(MIN_VALUE))
|
21065
|
-
return ONE;
|
21066
|
-
else {
|
21067
|
-
var halfThis = this.shr(1);
|
21068
|
-
approx = halfThis.div(divisor).shl(1);
|
21069
|
-
if (approx.eq(ZERO)) {
|
21070
|
-
return divisor.isNegative() ? ONE : NEG_ONE;
|
21071
|
-
} else {
|
21072
|
-
rem = this.sub(divisor.mul(approx));
|
21073
|
-
res = approx.add(rem.div(divisor));
|
21074
|
-
return res;
|
21075
|
-
}
|
21076
|
-
}
|
21077
|
-
} else if (divisor.eq(MIN_VALUE))
|
21078
|
-
return this.unsigned ? UZERO : ZERO;
|
21079
|
-
if (this.isNegative()) {
|
21080
|
-
if (divisor.isNegative())
|
21081
|
-
return this.neg().div(divisor.neg());
|
21082
|
-
return this.neg().div(divisor).neg();
|
21083
|
-
} else if (divisor.isNegative())
|
21084
|
-
return this.div(divisor.neg()).neg();
|
21085
|
-
res = ZERO;
|
21086
|
-
} else {
|
21087
|
-
if (!divisor.unsigned)
|
21088
|
-
divisor = divisor.toUnsigned();
|
21089
|
-
if (divisor.gt(this))
|
21090
|
-
return UZERO;
|
21091
|
-
if (divisor.gt(this.shru(1)))
|
21092
|
-
return UONE;
|
21093
|
-
res = UZERO;
|
21094
|
-
}
|
21095
|
-
rem = this;
|
21096
|
-
while (rem.gte(divisor)) {
|
21097
|
-
approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
|
21098
|
-
var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
|
21099
|
-
while (approxRem.isNegative() || approxRem.gt(rem)) {
|
21100
|
-
approx -= delta;
|
21101
|
-
approxRes = fromNumber(approx, this.unsigned);
|
21102
|
-
approxRem = approxRes.mul(divisor);
|
21103
|
-
}
|
21104
|
-
if (approxRes.isZero())
|
21105
|
-
approxRes = ONE;
|
21106
|
-
res = res.add(approxRes);
|
21107
|
-
rem = rem.sub(approxRem);
|
21108
|
-
}
|
21109
|
-
return res;
|
21110
|
-
};
|
21111
|
-
LongPrototype.div = LongPrototype.divide;
|
21112
|
-
LongPrototype.modulo = function modulo(divisor) {
|
21113
|
-
if (!isLong(divisor))
|
21114
|
-
divisor = fromValue(divisor);
|
21115
|
-
if (wasm) {
|
21116
|
-
var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(
|
21117
|
-
this.low,
|
21118
|
-
this.high,
|
21119
|
-
divisor.low,
|
21120
|
-
divisor.high
|
21121
|
-
);
|
21122
|
-
return fromBits(low, wasm.get_high(), this.unsigned);
|
21123
|
-
}
|
21124
|
-
return this.sub(this.div(divisor).mul(divisor));
|
21125
|
-
};
|
21126
|
-
LongPrototype.mod = LongPrototype.modulo;
|
21127
|
-
LongPrototype.rem = LongPrototype.modulo;
|
21128
|
-
LongPrototype.not = function not() {
|
21129
|
-
return fromBits(~this.low, ~this.high, this.unsigned);
|
21130
|
-
};
|
21131
|
-
LongPrototype.and = function and(other) {
|
21132
|
-
if (!isLong(other))
|
21133
|
-
other = fromValue(other);
|
21134
|
-
return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
|
21135
|
-
};
|
21136
|
-
LongPrototype.or = function or(other) {
|
21137
|
-
if (!isLong(other))
|
21138
|
-
other = fromValue(other);
|
21139
|
-
return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
|
21140
|
-
};
|
21141
|
-
LongPrototype.xor = function xor(other) {
|
21142
|
-
if (!isLong(other))
|
21143
|
-
other = fromValue(other);
|
21144
|
-
return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
|
21145
|
-
};
|
21146
|
-
LongPrototype.shiftLeft = function shiftLeft(numBits) {
|
21147
|
-
if (isLong(numBits))
|
21148
|
-
numBits = numBits.toInt();
|
21149
|
-
if ((numBits &= 63) === 0)
|
21150
|
-
return this;
|
21151
|
-
else if (numBits < 32)
|
21152
|
-
return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);
|
21153
|
-
else
|
21154
|
-
return fromBits(0, this.low << numBits - 32, this.unsigned);
|
21155
|
-
};
|
21156
|
-
LongPrototype.shl = LongPrototype.shiftLeft;
|
21157
|
-
LongPrototype.shiftRight = function shiftRight(numBits) {
|
21158
|
-
if (isLong(numBits))
|
21159
|
-
numBits = numBits.toInt();
|
21160
|
-
if ((numBits &= 63) === 0)
|
21161
|
-
return this;
|
21162
|
-
else if (numBits < 32)
|
21163
|
-
return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);
|
21164
|
-
else
|
21165
|
-
return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);
|
21166
|
-
};
|
21167
|
-
LongPrototype.shr = LongPrototype.shiftRight;
|
21168
|
-
LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
|
21169
|
-
if (isLong(numBits))
|
21170
|
-
numBits = numBits.toInt();
|
21171
|
-
numBits &= 63;
|
21172
|
-
if (numBits === 0)
|
21173
|
-
return this;
|
21174
|
-
else {
|
21175
|
-
var high = this.high;
|
21176
|
-
if (numBits < 32) {
|
21177
|
-
var low = this.low;
|
21178
|
-
return fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits, this.unsigned);
|
21179
|
-
} else if (numBits === 32)
|
21180
|
-
return fromBits(high, 0, this.unsigned);
|
21181
|
-
else
|
21182
|
-
return fromBits(high >>> numBits - 32, 0, this.unsigned);
|
21183
|
-
}
|
21184
|
-
};
|
21185
|
-
LongPrototype.shru = LongPrototype.shiftRightUnsigned;
|
21186
|
-
LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
|
21187
|
-
LongPrototype.toSigned = function toSigned() {
|
21188
|
-
if (!this.unsigned)
|
21189
|
-
return this;
|
21190
|
-
return fromBits(this.low, this.high, false);
|
21191
|
-
};
|
21192
|
-
LongPrototype.toUnsigned = function toUnsigned() {
|
21193
|
-
if (this.unsigned)
|
21194
|
-
return this;
|
21195
|
-
return fromBits(this.low, this.high, true);
|
21196
|
-
};
|
21197
|
-
LongPrototype.toBytes = function toBytes5(le) {
|
21198
|
-
return le ? this.toBytesLE() : this.toBytesBE();
|
21199
|
-
};
|
21200
|
-
LongPrototype.toBytesLE = function toBytesLE() {
|
21201
|
-
var hi = this.high, lo = this.low;
|
21202
|
-
return [
|
21203
|
-
lo & 255,
|
21204
|
-
lo >>> 8 & 255,
|
21205
|
-
lo >>> 16 & 255,
|
21206
|
-
lo >>> 24,
|
21207
|
-
hi & 255,
|
21208
|
-
hi >>> 8 & 255,
|
21209
|
-
hi >>> 16 & 255,
|
21210
|
-
hi >>> 24
|
21211
|
-
];
|
21212
|
-
};
|
21213
|
-
LongPrototype.toBytesBE = function toBytesBE() {
|
21214
|
-
var hi = this.high, lo = this.low;
|
21215
|
-
return [
|
21216
|
-
hi >>> 24,
|
21217
|
-
hi >>> 16 & 255,
|
21218
|
-
hi >>> 8 & 255,
|
21219
|
-
hi & 255,
|
21220
|
-
lo >>> 24,
|
21221
|
-
lo >>> 16 & 255,
|
21222
|
-
lo >>> 8 & 255,
|
21223
|
-
lo & 255
|
21224
|
-
];
|
21225
|
-
};
|
21226
|
-
Long.fromBytes = function fromBytes(bytes4, unsigned, le) {
|
21227
|
-
return le ? Long.fromBytesLE(bytes4, unsigned) : Long.fromBytesBE(bytes4, unsigned);
|
21228
|
-
};
|
21229
|
-
Long.fromBytesLE = function fromBytesLE(bytes4, unsigned) {
|
21230
|
-
return new Long(
|
21231
|
-
bytes4[0] | bytes4[1] << 8 | bytes4[2] << 16 | bytes4[3] << 24,
|
21232
|
-
bytes4[4] | bytes4[5] << 8 | bytes4[6] << 16 | bytes4[7] << 24,
|
21233
|
-
unsigned
|
21234
|
-
);
|
21235
|
-
};
|
21236
|
-
Long.fromBytesBE = function fromBytesBE(bytes4, unsigned) {
|
21237
|
-
return new Long(
|
21238
|
-
bytes4[4] << 24 | bytes4[5] << 16 | bytes4[6] << 8 | bytes4[7],
|
21239
|
-
bytes4[0] << 24 | bytes4[1] << 16 | bytes4[2] << 8 | bytes4[3],
|
21240
|
-
unsigned
|
21241
|
-
);
|
21242
|
-
};
|
21243
|
-
}
|
21244
|
-
});
|
21245
|
-
|
21246
|
-
// ../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/leapSeconds.js
|
21247
|
-
var require_leapSeconds = __commonJS({
|
21248
|
-
"../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/leapSeconds.js"(exports) {
|
21249
|
-
"use strict";
|
21250
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
21251
|
-
var leapSeconds = [
|
21252
|
-
[1483228800, 37],
|
21253
|
-
[1435708800, 36],
|
21254
|
-
[1341100800, 35],
|
21255
|
-
[1230768e3, 34],
|
21256
|
-
[1136073600, 33],
|
21257
|
-
[915148800, 32],
|
21258
|
-
[867715200, 31],
|
21259
|
-
[820454400, 30],
|
21260
|
-
[773020800, 29],
|
21261
|
-
[741484800, 28],
|
21262
|
-
[709948800, 27],
|
21263
|
-
[662688e3, 26],
|
21264
|
-
[631152e3, 25],
|
21265
|
-
[567993600, 24],
|
21266
|
-
[489024e3, 23],
|
21267
|
-
[425865600, 22],
|
21268
|
-
[394329600, 21],
|
21269
|
-
[362793600, 20],
|
21270
|
-
[315532800, 19],
|
21271
|
-
[283996800, 18],
|
21272
|
-
[252460800, 17],
|
21273
|
-
[220924800, 16],
|
21274
|
-
[189302400, 15],
|
21275
|
-
[157766400, 14],
|
21276
|
-
[126230400, 13],
|
21277
|
-
[94694400, 12],
|
21278
|
-
[78796800, 11],
|
21279
|
-
[63072e3, 10]
|
21280
|
-
];
|
21281
|
-
var addLeapSeconds = (timestamp) => {
|
21282
|
-
const leapSecond = leapSeconds.find(([ts]) => timestamp >= ts);
|
21283
|
-
return timestamp + (leapSecond ? leapSecond[1] : 0);
|
21284
|
-
};
|
21285
|
-
exports.addLeapSeconds = addLeapSeconds;
|
21286
|
-
var removeLeapSeconds = (timestamp) => {
|
21287
|
-
const leapSecond = leapSeconds.find(([ts, offset]) => timestamp - offset >= ts);
|
21288
|
-
return timestamp - (leapSecond ? leapSecond[1] : 0);
|
21289
|
-
};
|
21290
|
-
exports.removeLeapSeconds = removeLeapSeconds;
|
21291
|
-
}
|
21292
|
-
});
|
21293
|
-
|
21294
|
-
// ../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/TAI64.js
|
21295
|
-
var require_TAI64 = __commonJS({
|
21296
|
-
"../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/TAI64.js"(exports) {
|
21297
|
-
"use strict";
|
21298
|
-
var __importDefault = exports && exports.__importDefault || function(mod2) {
|
21299
|
-
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
21300
|
-
};
|
21301
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
21302
|
-
var long_1 = __importDefault(require_long());
|
21303
|
-
var leapSeconds_1 = require_leapSeconds();
|
21304
|
-
var TAI642 = class {
|
21305
|
-
/**
|
21306
|
-
* Construct an instance of TAI64.
|
21307
|
-
*
|
21308
|
-
* @param label - The TAI64 label between 0 and 2^63-1, inclusive
|
21309
|
-
* @returns An instance of TAI64
|
21310
|
-
* @throws RangeError if the given label is not between 0 and 2^63-1, inclusive
|
21311
|
-
*/
|
21312
|
-
constructor(label) {
|
21313
|
-
this.label = label;
|
21314
|
-
if (label.lt(long_1.default.ZERO) || label.gte(long_1.default.MAX_VALUE)) {
|
21315
|
-
throw new RangeError("Label must be an integer between 0 and 2^63-1, inclusive");
|
21316
|
-
}
|
21317
|
-
}
|
21318
|
-
/**
|
21319
|
-
* Return a TAI64 the current number of seconds elapsed since 1970 TAI.
|
21320
|
-
*
|
21321
|
-
* @returns An instance of TAI64
|
21322
|
-
*/
|
21323
|
-
static now() {
|
21324
|
-
const unixTimestamp = Math.floor(Date.now() / 1e3);
|
21325
|
-
return TAI642.fromUnix(unixTimestamp);
|
21326
|
-
}
|
21327
|
-
/**
|
21328
|
-
* Return a TAI64 corresponding to the given UNIX timestamp.
|
21329
|
-
*
|
21330
|
-
* @param timestamp - The UNIX timestamp in seconds
|
21331
|
-
* @returns An instance of TAI64
|
21332
|
-
*/
|
21333
|
-
static fromUnix(timestamp) {
|
21334
|
-
const seconds = leapSeconds_1.addLeapSeconds(timestamp);
|
21335
|
-
const label = TAI642.EPOCH.label.add(seconds);
|
21336
|
-
return new TAI642(label);
|
21337
|
-
}
|
21338
|
-
/**
|
21339
|
-
* Return a TAI64 corresponding to the given hexadecimal string representing a TAI64. This method
|
21340
|
-
* is an alias for `TAI64#fromString()` method.
|
21341
|
-
*
|
21342
|
-
* @param hexString - The hexadecimal string
|
21343
|
-
* @returns An instance of TAI64
|
21344
|
-
*/
|
21345
|
-
static fromHexString(hexString) {
|
21346
|
-
return TAI642.fromString(hexString);
|
21347
|
-
}
|
21348
|
-
/**
|
21349
|
-
* Return a TAI64 corresponding to the given string representing a TAI64 in the given radix.
|
21350
|
-
*
|
21351
|
-
* @param str - The string
|
21352
|
-
* @param radix - An integer that represents the radix (the base in mathematical numeral systems), defaults to `16`
|
21353
|
-
* @returns An instance of TAI64
|
21354
|
-
*/
|
21355
|
-
static fromString(str, radix = 16) {
|
21356
|
-
const label = long_1.default.fromString(str, false, radix);
|
21357
|
-
return new TAI642(label);
|
21358
|
-
}
|
21359
|
-
/**
|
21360
|
-
* Return a TAI64 corresponding to the given byte array representing a TAI64.
|
21361
|
-
*
|
21362
|
-
* @param bytes - The byte array
|
21363
|
-
* @returns An instance of TAI64
|
21364
|
-
*/
|
21365
|
-
static fromByteArray(bytes4) {
|
21366
|
-
const label = long_1.default.fromBytes(bytes4, false);
|
21367
|
-
return new TAI642(label);
|
21368
|
-
}
|
21369
|
-
/**
|
21370
|
-
* Return if this TAI64 is after the given TAI64.
|
21371
|
-
*
|
21372
|
-
* @param other - The other TAI64 to compare
|
21373
|
-
* @returns `true` if this TAI64 is after the given TAI64, `false` otherwise
|
21374
|
-
*/
|
21375
|
-
isAfter(other) {
|
21376
|
-
return this.compareTo(other) > 0;
|
21377
|
-
}
|
21378
|
-
/**
|
21379
|
-
* Return if this TAI64 is before the given TAI64.
|
21380
|
-
*
|
21381
|
-
* @param other - The other TAI64 to compare
|
21382
|
-
* @returns `true` if this TAI64 is before the given TAI64, `false` otherwise
|
21383
|
-
*/
|
21384
|
-
isBefore(other) {
|
21385
|
-
return this.compareTo(other) < 0;
|
21386
|
-
}
|
21387
|
-
/**
|
21388
|
-
* Return if this TAI64 is equal to the given TAI64.
|
21389
|
-
*
|
21390
|
-
* @param other - The other TAI64 to compare
|
21391
|
-
* @returns `true` if this TAI64 is equal to the given TAI64, `false` otherwise
|
21392
|
-
*/
|
21393
|
-
isEqual(other) {
|
21394
|
-
return this.compareTo(other) === 0;
|
21395
|
-
}
|
21396
|
-
/**
|
21397
|
-
* Compare this TAI64 to the given TAI64.
|
21398
|
-
*
|
21399
|
-
* @param other - The other TAI64 to compare
|
21400
|
-
* @returns
|
21401
|
-
* - `1` if this TAI64 is before the given TAI64
|
21402
|
-
* - `-1` if this TAI64 is before the given TAI64
|
21403
|
-
* - `0` if this TAI64 is equal to the given TAI64
|
21404
|
-
*/
|
21405
|
-
compareTo(other) {
|
21406
|
-
return this.label.compare(other.label);
|
21407
|
-
}
|
21408
|
-
/**
|
21409
|
-
* Return a byte array representation of this TAI64.
|
21410
|
-
*/
|
21411
|
-
toByteArray() {
|
21412
|
-
return this.label.toBytes();
|
21413
|
-
}
|
21414
|
-
/**
|
21415
|
-
* Return an hexadecimal string representation of this TAI64. This method
|
21416
|
-
* is an alias for `TAI64#toString()` method.
|
21417
|
-
*/
|
21418
|
-
toHexString() {
|
21419
|
-
return this.toString();
|
21420
|
-
}
|
21421
|
-
/**
|
21422
|
-
* Return a string representation of this TAI64.
|
21423
|
-
*
|
21424
|
-
* @param radix - An integer that represents the radix (the base in mathematical numeral systems), defaults to `16`
|
21425
|
-
*/
|
21426
|
-
toString(radix = 16) {
|
21427
|
-
return this.label.toString(radix);
|
21428
|
-
}
|
21429
|
-
/**
|
21430
|
-
* Return a UNIX timestamp corresponding to this TAI64.
|
21431
|
-
*/
|
21432
|
-
toUnix() {
|
21433
|
-
const elapsedSeconds = this.label.sub(TAI642.EPOCH.label);
|
21434
|
-
return leapSeconds_1.removeLeapSeconds(elapsedSeconds.toNumber());
|
21435
|
-
}
|
21436
|
-
};
|
21437
|
-
TAI642.EPOCH = new TAI642(long_1.default.MAX_VALUE.shiftRight(1).add(1));
|
21438
|
-
exports.TAI64 = TAI642;
|
21439
|
-
}
|
21440
|
-
});
|
21441
|
-
|
21442
|
-
// ../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/index.js
|
21443
|
-
var require_lib2 = __commonJS({
|
21444
|
-
"../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/index.js"(exports) {
|
21445
|
-
"use strict";
|
21446
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
21447
|
-
var TAI64_1 = require_TAI64();
|
21448
|
-
exports.TAI64 = TAI64_1.TAI64;
|
21449
|
-
}
|
21450
|
-
});
|
21451
|
-
|
21452
20383
|
// ../../node_modules/.pnpm/@fuels+vm-asm@0.42.1/node_modules/@fuels/vm-asm/dist/node/index.cjs
|
21453
20384
|
var require_node = __commonJS({
|
21454
20385
|
"../../node_modules/.pnpm/@fuels+vm-asm@0.42.1/node_modules/@fuels/vm-asm/dist/node/index.cjs"(exports) {
|
@@ -33064,9 +31995,9 @@ spurious results.`);
|
|
33064
31995
|
// ../versions/dist/index.mjs
|
33065
31996
|
function getBuiltinVersions() {
|
33066
31997
|
return {
|
33067
|
-
FORC: "0.
|
31998
|
+
FORC: "0.51.1",
|
33068
31999
|
FUEL_CORE: "0.22.1",
|
33069
|
-
FUELS: "0.
|
32000
|
+
FUELS: "0.76.0"
|
33070
32001
|
};
|
33071
32002
|
}
|
33072
32003
|
function parseVersion(version2) {
|
@@ -33224,6 +32155,12 @@ spurious results.`);
|
|
33224
32155
|
__publicField2(FuelError, "CODES", ErrorCode);
|
33225
32156
|
|
33226
32157
|
// ../utils/dist/index.mjs
|
32158
|
+
var __defProp3 = Object.defineProperty;
|
32159
|
+
var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
32160
|
+
var __publicField3 = (obj, key, value) => {
|
32161
|
+
__defNormalProp3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
32162
|
+
return value;
|
32163
|
+
};
|
33227
32164
|
var arrayify = (value) => {
|
33228
32165
|
if (value instanceof Uint8Array) {
|
33229
32166
|
return new Uint8Array(value);
|
@@ -33268,6 +32205,66 @@ spurious results.`);
|
|
33268
32205
|
}
|
33269
32206
|
return result;
|
33270
32207
|
}
|
32208
|
+
var TAI64_LEAP_SECONDS = 37;
|
32209
|
+
var TAI64_UNIX_OFFSET = BigInt(2 ** 62) + BigInt(TAI64_LEAP_SECONDS);
|
32210
|
+
var msToSeconds = (ms) => Math.floor(ms / 1e3);
|
32211
|
+
var secondsToMs = (seconds) => seconds * 1e3;
|
32212
|
+
var tai64ToUnixSeconds = (tai64) => Number(BigInt(tai64) - TAI64_UNIX_OFFSET);
|
32213
|
+
var unixSecondsToTai64 = (unixSeconds) => String(BigInt(unixSeconds) + TAI64_UNIX_OFFSET);
|
32214
|
+
var tai64ToUnixMilliseconds = (tai64) => secondsToMs(tai64ToUnixSeconds(tai64));
|
32215
|
+
var _DateTime = class extends Date {
|
32216
|
+
/**
|
32217
|
+
* Generates a new DateTime instance from a Tai64 timestamp.
|
32218
|
+
*
|
32219
|
+
* @param tai64 - Tai64 timestamp
|
32220
|
+
* @returns a new DateTime instance
|
32221
|
+
*/
|
32222
|
+
static fromTai64(tai64) {
|
32223
|
+
return new _DateTime(tai64ToUnixMilliseconds(tai64));
|
32224
|
+
}
|
32225
|
+
/**
|
32226
|
+
* @param unixMilliseconds - unix milliseconds timestamp
|
32227
|
+
* @returns a new DateTime instance
|
32228
|
+
*/
|
32229
|
+
static fromUnixMilliseconds(unixMilliseconds) {
|
32230
|
+
return new _DateTime(unixMilliseconds);
|
32231
|
+
}
|
32232
|
+
/**
|
32233
|
+
* @param unixSeconds - unix seconds timestamp
|
32234
|
+
* @returns a new DateTime instance
|
32235
|
+
*/
|
32236
|
+
static fromUnixSeconds(unixSeconds) {
|
32237
|
+
return new _DateTime(secondsToMs(unixSeconds));
|
32238
|
+
}
|
32239
|
+
/**
|
32240
|
+
* Hide the constructor to prevent direct instantiation.
|
32241
|
+
*/
|
32242
|
+
constructor(date) {
|
32243
|
+
super(date);
|
32244
|
+
}
|
32245
|
+
/**
|
32246
|
+
* Returns the Tai64 timestamp.
|
32247
|
+
*
|
32248
|
+
* @returns the Tai64 timestamp
|
32249
|
+
*/
|
32250
|
+
toTai64() {
|
32251
|
+
return unixSecondsToTai64(this.toUnixSeconds());
|
32252
|
+
}
|
32253
|
+
/**
|
32254
|
+
* @returns the unix milliseconds timestamp
|
32255
|
+
*/
|
32256
|
+
toUnixMilliseconds() {
|
32257
|
+
return this.getTime();
|
32258
|
+
}
|
32259
|
+
/**
|
32260
|
+
* @returns the unix seconds timestamp
|
32261
|
+
*/
|
32262
|
+
toUnixSeconds() {
|
32263
|
+
return msToSeconds(this.getTime());
|
32264
|
+
}
|
32265
|
+
};
|
32266
|
+
var DateTime = _DateTime;
|
32267
|
+
__publicField3(DateTime, "TAI64_NULL", "");
|
33271
32268
|
var chainConfig_default = {
|
33272
32269
|
chain_name: "local_testnet",
|
33273
32270
|
block_gas_limit: 5e9,
|
@@ -36132,10 +35129,10 @@ spurious results.`);
|
|
36132
35129
|
};
|
36133
35130
|
|
36134
35131
|
// ../abi-coder/dist/index.mjs
|
36135
|
-
var
|
36136
|
-
var
|
36137
|
-
var
|
36138
|
-
|
35132
|
+
var __defProp4 = Object.defineProperty;
|
35133
|
+
var __defNormalProp4 = (obj, key, value) => key in obj ? __defProp4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
35134
|
+
var __publicField4 = (obj, key, value) => {
|
35135
|
+
__defNormalProp4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
36139
35136
|
return value;
|
36140
35137
|
};
|
36141
35138
|
var __accessCheck2 = (obj, member, msg) => {
|
@@ -36165,6 +35162,7 @@ spurious results.`);
|
|
36165
35162
|
var U16_CODER_TYPE = "u16";
|
36166
35163
|
var U32_CODER_TYPE = "u32";
|
36167
35164
|
var U64_CODER_TYPE = "u64";
|
35165
|
+
var U256_CODER_TYPE = "u256";
|
36168
35166
|
var RAW_PTR_CODER_TYPE = "raw untyped ptr";
|
36169
35167
|
var RAW_SLICE_CODER_TYPE = "raw untyped slice";
|
36170
35168
|
var BOOL_CODER_TYPE = "bool";
|
@@ -36226,14 +35224,18 @@ spurious results.`);
|
|
36226
35224
|
WORD_SIZE + // Predicate size
|
36227
35225
|
WORD_SIZE + // Predicate data size
|
36228
35226
|
WORD_SIZE;
|
36229
|
-
var
|
36230
|
-
|
36231
|
-
|
35227
|
+
var encodedLengths = {
|
35228
|
+
u64: WORD_SIZE,
|
35229
|
+
u256: WORD_SIZE * 4
|
35230
|
+
};
|
35231
|
+
var BigNumberCoder = class extends Coder {
|
35232
|
+
constructor(baseType) {
|
35233
|
+
super("bigNumber", baseType, encodedLengths[baseType]);
|
36232
35234
|
}
|
36233
35235
|
encode(value) {
|
36234
35236
|
let bytes4;
|
36235
35237
|
try {
|
36236
|
-
bytes4 = toBytes3(value,
|
35238
|
+
bytes4 = toBytes3(value, this.encodedLength);
|
36237
35239
|
} catch (error) {
|
36238
35240
|
throw new FuelError(ErrorCode.ENCODE_ERROR, `Invalid ${this.type}.`);
|
36239
35241
|
}
|
@@ -36243,12 +35245,12 @@ spurious results.`);
|
|
36243
35245
|
if (data.length < this.encodedLength) {
|
36244
35246
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid ${this.type} data size.`);
|
36245
35247
|
}
|
36246
|
-
let bytes4 = data.slice(offset, offset +
|
36247
|
-
bytes4 = bytes4.slice(0,
|
35248
|
+
let bytes4 = data.slice(offset, offset + this.encodedLength);
|
35249
|
+
bytes4 = bytes4.slice(0, this.encodedLength);
|
36248
35250
|
if (bytes4.length !== this.encodedLength) {
|
36249
35251
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid ${this.type} byte data size.`);
|
36250
35252
|
}
|
36251
|
-
return [bn(bytes4), offset +
|
35253
|
+
return [bn(bytes4), offset + this.encodedLength];
|
36252
35254
|
}
|
36253
35255
|
};
|
36254
35256
|
var VEC_PROPERTY_SPACE = 3;
|
@@ -36288,7 +35290,7 @@ spurious results.`);
|
|
36288
35290
|
let updatedResults = results;
|
36289
35291
|
Object.entries(results.dynamicData).forEach(([pointerIndex, vData]) => {
|
36290
35292
|
const pointerOffset = parseInt(pointerIndex, 10) * WORD_SIZE;
|
36291
|
-
const adjustedValue = new
|
35293
|
+
const adjustedValue = new BigNumberCoder("u64").encode(
|
36292
35294
|
dataOffset + baseOffset + cumulativeDynamicByteLength
|
36293
35295
|
);
|
36294
35296
|
updatedResults.set(adjustedValue, pointerOffset);
|
@@ -36496,14 +35498,14 @@ spurious results.`);
|
|
36496
35498
|
throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
|
36497
35499
|
}
|
36498
35500
|
const parts = [];
|
36499
|
-
const pointer = new
|
35501
|
+
const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
|
36500
35502
|
const data = __privateMethod2(this, _getPaddedData, getPaddedData_fn).call(this, value);
|
36501
35503
|
pointer.dynamicData = {
|
36502
35504
|
0: concatWithDynamicData([data])
|
36503
35505
|
};
|
36504
35506
|
parts.push(pointer);
|
36505
|
-
parts.push(new
|
36506
|
-
parts.push(new
|
35507
|
+
parts.push(new BigNumberCoder("u64").encode(data.byteLength));
|
35508
|
+
parts.push(new BigNumberCoder("u64").encode(value.length));
|
36507
35509
|
return concatWithDynamicData(parts);
|
36508
35510
|
}
|
36509
35511
|
decode(data, offset) {
|
@@ -36511,7 +35513,7 @@ spurious results.`);
|
|
36511
35513
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid byte data size.`);
|
36512
35514
|
}
|
36513
35515
|
const len = data.slice(16, 24);
|
36514
|
-
const encodedLength = bn(new
|
35516
|
+
const encodedLength = bn(new BigNumberCoder("u64").decode(len, 0)[0]).toNumber();
|
36515
35517
|
const byteData = data.slice(BASE_VECTOR_OFFSET, BASE_VECTOR_OFFSET + encodedLength);
|
36516
35518
|
if (byteData.length !== encodedLength) {
|
36517
35519
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid bytes byte data size.`);
|
@@ -36528,7 +35530,7 @@ spurious results.`);
|
|
36528
35530
|
}
|
36529
35531
|
return concat(data);
|
36530
35532
|
};
|
36531
|
-
|
35533
|
+
__publicField4(ByteCoder, "memorySize", 1);
|
36532
35534
|
var isFullyNativeEnum = (enumCoders) => Object.values(enumCoders).every(
|
36533
35535
|
// @ts-expect-error complicated types
|
36534
35536
|
({ type: type3, coders }) => type3 === "()" && JSON.stringify(coders) === JSON.stringify([])
|
@@ -36539,7 +35541,7 @@ spurious results.`);
|
|
36539
35541
|
#caseIndexCoder;
|
36540
35542
|
#encodedValueSize;
|
36541
35543
|
constructor(name, coders) {
|
36542
|
-
const caseIndexCoder = new
|
35544
|
+
const caseIndexCoder = new BigNumberCoder("u64");
|
36543
35545
|
const encodedValueSize = Object.values(coders).reduce(
|
36544
35546
|
(max2, coder) => Math.max(max2, coder.encodedLength),
|
36545
35547
|
0
|
@@ -36583,7 +35585,7 @@ spurious results.`);
|
|
36583
35585
|
}
|
36584
35586
|
let newOffset = offset;
|
36585
35587
|
let decoded;
|
36586
|
-
[decoded, newOffset] = new
|
35588
|
+
[decoded, newOffset] = new BigNumberCoder("u64").decode(data, newOffset);
|
36587
35589
|
const caseIndex = toNumber2(decoded);
|
36588
35590
|
const caseKey = Object.keys(this.coders)[caseIndex];
|
36589
35591
|
if (!caseKey) {
|
@@ -36707,12 +35709,14 @@ spurious results.`);
|
|
36707
35709
|
}
|
36708
35710
|
const parts = [];
|
36709
35711
|
const coder = new NumberCoder("u8", { isSmallBytes: true });
|
36710
|
-
const pointer = new
|
35712
|
+
const pointer = new BigNumberCoder("u64").encode(
|
35713
|
+
BASE_RAW_SLICE_OFFSET
|
35714
|
+
);
|
36711
35715
|
pointer.dynamicData = {
|
36712
35716
|
0: concatWithDynamicData(value.map((v) => coder.encode(v)))
|
36713
35717
|
};
|
36714
35718
|
parts.push(pointer);
|
36715
|
-
parts.push(new
|
35719
|
+
parts.push(new BigNumberCoder("u64").encode(value.length));
|
36716
35720
|
return concatWithDynamicData(parts);
|
36717
35721
|
}
|
36718
35722
|
decode(data, offset) {
|
@@ -36734,14 +35738,14 @@ spurious results.`);
|
|
36734
35738
|
}
|
36735
35739
|
encode(value) {
|
36736
35740
|
const parts = [];
|
36737
|
-
const pointer = new
|
35741
|
+
const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
|
36738
35742
|
const data = __privateMethod2(this, _getPaddedData2, getPaddedData_fn2).call(this, value);
|
36739
35743
|
pointer.dynamicData = {
|
36740
35744
|
0: concatWithDynamicData([data])
|
36741
35745
|
};
|
36742
35746
|
parts.push(pointer);
|
36743
|
-
parts.push(new
|
36744
|
-
parts.push(new
|
35747
|
+
parts.push(new BigNumberCoder("u64").encode(data.byteLength));
|
35748
|
+
parts.push(new BigNumberCoder("u64").encode(value.length));
|
36745
35749
|
return concatWithDynamicData(parts);
|
36746
35750
|
}
|
36747
35751
|
decode(data, offset) {
|
@@ -36749,7 +35753,7 @@ spurious results.`);
|
|
36749
35753
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid std string data size.`);
|
36750
35754
|
}
|
36751
35755
|
const len = data.slice(16, 24);
|
36752
|
-
const encodedLength = bn(new
|
35756
|
+
const encodedLength = bn(new BigNumberCoder("u64").decode(len, 0)[0]).toNumber();
|
36753
35757
|
const byteData = data.slice(BASE_VECTOR_OFFSET, BASE_VECTOR_OFFSET + encodedLength);
|
36754
35758
|
if (byteData.length !== encodedLength) {
|
36755
35759
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid std string byte data size.`);
|
@@ -36767,7 +35771,7 @@ spurious results.`);
|
|
36767
35771
|
}
|
36768
35772
|
return concat(data);
|
36769
35773
|
};
|
36770
|
-
|
35774
|
+
__publicField4(StdStringCoder, "memorySize", 1);
|
36771
35775
|
var StringCoder = class extends Coder {
|
36772
35776
|
length;
|
36773
35777
|
#paddingLength;
|
@@ -36895,13 +35899,13 @@ spurious results.`);
|
|
36895
35899
|
throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
|
36896
35900
|
}
|
36897
35901
|
const parts = [];
|
36898
|
-
const pointer = new
|
35902
|
+
const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
|
36899
35903
|
pointer.dynamicData = {
|
36900
35904
|
0: concatWithDynamicData(Array.from(value).map((v) => this.coder.encode(v)))
|
36901
35905
|
};
|
36902
35906
|
parts.push(pointer);
|
36903
|
-
parts.push(new
|
36904
|
-
parts.push(new
|
35907
|
+
parts.push(new BigNumberCoder("u64").encode(value.length));
|
35908
|
+
parts.push(new BigNumberCoder("u64").encode(value.length));
|
36905
35909
|
return concatWithDynamicData(parts);
|
36906
35910
|
}
|
36907
35911
|
decode(data, offset) {
|
@@ -36909,7 +35913,7 @@ spurious results.`);
|
|
36909
35913
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid vec data size.`);
|
36910
35914
|
}
|
36911
35915
|
const len = data.slice(16, 24);
|
36912
|
-
const encodedLength = bn(new
|
35916
|
+
const encodedLength = bn(new BigNumberCoder("u64").decode(len, 0)[0]).toNumber();
|
36913
35917
|
const vectorRawDataLength = encodedLength * this.coder.encodedLength;
|
36914
35918
|
const vectorRawData = data.slice(BASE_VECTOR_OFFSET, BASE_VECTOR_OFFSET + vectorRawDataLength);
|
36915
35919
|
if (vectorRawData.length !== vectorRawDataLength) {
|
@@ -37084,7 +36088,9 @@ spurious results.`);
|
|
37084
36088
|
return new NumberCoder(resolvedAbiType.type, options);
|
37085
36089
|
case U64_CODER_TYPE:
|
37086
36090
|
case RAW_PTR_CODER_TYPE:
|
37087
|
-
return new
|
36091
|
+
return new BigNumberCoder("u64");
|
36092
|
+
case U256_CODER_TYPE:
|
36093
|
+
return new BigNumberCoder("u256");
|
37088
36094
|
case RAW_SLICE_CODER_TYPE:
|
37089
36095
|
return new RawSliceCoder();
|
37090
36096
|
case BOOL_CODER_TYPE:
|
@@ -37197,7 +36203,7 @@ spurious results.`);
|
|
37197
36203
|
throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
|
37198
36204
|
}
|
37199
36205
|
const bytes4 = new Uint8Array(value);
|
37200
|
-
const lengthBytes = new
|
36206
|
+
const lengthBytes = new BigNumberCoder("u64").encode(value.length);
|
37201
36207
|
return new Uint8Array([...lengthBytes, ...bytes4]);
|
37202
36208
|
}
|
37203
36209
|
decode(data, offset) {
|
@@ -37206,7 +36212,7 @@ spurious results.`);
|
|
37206
36212
|
}
|
37207
36213
|
const offsetAndLength = offset + WORD_SIZE;
|
37208
36214
|
const lengthBytes = data.slice(offset, offsetAndLength);
|
37209
|
-
const length = bn(new
|
36215
|
+
const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
|
37210
36216
|
const dataBytes = data.slice(offsetAndLength, offsetAndLength + length);
|
37211
36217
|
if (dataBytes.length !== length) {
|
37212
36218
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid bytes byte data size.`);
|
@@ -37214,7 +36220,7 @@ spurious results.`);
|
|
37214
36220
|
return [dataBytes, offsetAndLength + length];
|
37215
36221
|
}
|
37216
36222
|
};
|
37217
|
-
|
36223
|
+
__publicField4(ByteCoder2, "memorySize", 1);
|
37218
36224
|
var isFullyNativeEnum2 = (enumCoders) => Object.values(enumCoders).every(
|
37219
36225
|
// @ts-expect-error complicated types
|
37220
36226
|
({ type: type3, coders }) => type3 === "()" && JSON.stringify(coders) === JSON.stringify([])
|
@@ -37225,7 +36231,7 @@ spurious results.`);
|
|
37225
36231
|
#caseIndexCoder;
|
37226
36232
|
#encodedValueSize;
|
37227
36233
|
constructor(name, coders) {
|
37228
|
-
const caseIndexCoder = new
|
36234
|
+
const caseIndexCoder = new BigNumberCoder("u64");
|
37229
36235
|
const encodedValueSize = Object.values(coders).reduce(
|
37230
36236
|
(max2, coder) => Math.max(max2, coder.encodedLength),
|
37231
36237
|
0
|
@@ -37266,7 +36272,7 @@ spurious results.`);
|
|
37266
36272
|
if (data.length < this.#encodedValueSize) {
|
37267
36273
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid enum data size.`);
|
37268
36274
|
}
|
37269
|
-
const caseBytes = new
|
36275
|
+
const caseBytes = new BigNumberCoder("u64").decode(data, offset)[0];
|
37270
36276
|
const caseIndex = toNumber2(caseBytes);
|
37271
36277
|
const caseKey = Object.keys(this.coders)[caseIndex];
|
37272
36278
|
if (!caseKey) {
|
@@ -37338,7 +36344,7 @@ spurious results.`);
|
|
37338
36344
|
}
|
37339
36345
|
const internalCoder = new ArrayCoder(new NumberCoder2("u8"), value.length);
|
37340
36346
|
const bytes4 = internalCoder.encode(value);
|
37341
|
-
const lengthBytes = new
|
36347
|
+
const lengthBytes = new BigNumberCoder("u64").encode(bytes4.length);
|
37342
36348
|
return new Uint8Array([...lengthBytes, ...bytes4]);
|
37343
36349
|
}
|
37344
36350
|
decode(data, offset) {
|
@@ -37347,7 +36353,7 @@ spurious results.`);
|
|
37347
36353
|
}
|
37348
36354
|
const offsetAndLength = offset + WORD_SIZE;
|
37349
36355
|
const lengthBytes = data.slice(offset, offsetAndLength);
|
37350
|
-
const length = bn(new
|
36356
|
+
const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
|
37351
36357
|
const dataBytes = data.slice(offsetAndLength, offsetAndLength + length);
|
37352
36358
|
if (dataBytes.length !== length) {
|
37353
36359
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid raw slice byte data size.`);
|
@@ -37363,7 +36369,7 @@ spurious results.`);
|
|
37363
36369
|
}
|
37364
36370
|
encode(value) {
|
37365
36371
|
const bytes4 = toUtf8Bytes(value);
|
37366
|
-
const lengthBytes = new
|
36372
|
+
const lengthBytes = new BigNumberCoder("u64").encode(value.length);
|
37367
36373
|
return new Uint8Array([...lengthBytes, ...bytes4]);
|
37368
36374
|
}
|
37369
36375
|
decode(data, offset) {
|
@@ -37372,7 +36378,7 @@ spurious results.`);
|
|
37372
36378
|
}
|
37373
36379
|
const offsetAndLength = offset + WORD_SIZE;
|
37374
36380
|
const lengthBytes = data.slice(offset, offsetAndLength);
|
37375
|
-
const length = bn(new
|
36381
|
+
const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
|
37376
36382
|
const dataBytes = data.slice(offsetAndLength, offsetAndLength + length);
|
37377
36383
|
if (dataBytes.length !== length) {
|
37378
36384
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid std string byte data size.`);
|
@@ -37380,7 +36386,7 @@ spurious results.`);
|
|
37380
36386
|
return [toUtf8String(dataBytes), offsetAndLength + length];
|
37381
36387
|
}
|
37382
36388
|
};
|
37383
|
-
|
36389
|
+
__publicField4(StdStringCoder2, "memorySize", 1);
|
37384
36390
|
var StringCoder2 = class extends Coder {
|
37385
36391
|
constructor(length) {
|
37386
36392
|
super("string", `str[${length}]`, length);
|
@@ -37481,7 +36487,7 @@ spurious results.`);
|
|
37481
36487
|
throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
|
37482
36488
|
}
|
37483
36489
|
const bytes4 = value.map((v) => this.coder.encode(v));
|
37484
|
-
const lengthBytes = new
|
36490
|
+
const lengthBytes = new BigNumberCoder("u64").encode(value.length);
|
37485
36491
|
return new Uint8Array([...lengthBytes, ...concatBytes2(bytes4)]);
|
37486
36492
|
}
|
37487
36493
|
decode(data, offset) {
|
@@ -37490,7 +36496,7 @@ spurious results.`);
|
|
37490
36496
|
}
|
37491
36497
|
const offsetAndLength = offset + WORD_SIZE;
|
37492
36498
|
const lengthBytes = data.slice(offset, offsetAndLength);
|
37493
|
-
const length = bn(new
|
36499
|
+
const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
|
37494
36500
|
const dataLength2 = length * this.coder.encodedLength;
|
37495
36501
|
const dataBytes = data.slice(offsetAndLength, offsetAndLength + dataLength2);
|
37496
36502
|
if (dataBytes.length !== dataLength2) {
|
@@ -37512,7 +36518,9 @@ spurious results.`);
|
|
37512
36518
|
return new NumberCoder2(resolvedAbiType.type);
|
37513
36519
|
case U64_CODER_TYPE:
|
37514
36520
|
case RAW_PTR_CODER_TYPE:
|
37515
|
-
return new
|
36521
|
+
return new BigNumberCoder("u64");
|
36522
|
+
case U256_CODER_TYPE:
|
36523
|
+
return new BigNumberCoder("u256");
|
37516
36524
|
case RAW_SLICE_CODER_TYPE:
|
37517
36525
|
return new RawSliceCoder2();
|
37518
36526
|
case BOOL_CODER_TYPE:
|
@@ -37921,12 +36929,12 @@ spurious results.`);
|
|
37921
36929
|
parts.push(new B256Coder().encode(value.txID));
|
37922
36930
|
parts.push(new NumberCoder("u8").encode(value.outputIndex));
|
37923
36931
|
parts.push(new B256Coder().encode(value.owner));
|
37924
|
-
parts.push(new
|
36932
|
+
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
37925
36933
|
parts.push(new B256Coder().encode(value.assetId));
|
37926
36934
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
37927
36935
|
parts.push(new NumberCoder("u8").encode(value.witnessIndex));
|
37928
36936
|
parts.push(new NumberCoder("u32").encode(value.maturity));
|
37929
|
-
parts.push(new
|
36937
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
|
37930
36938
|
parts.push(new NumberCoder("u32").encode(value.predicateLength));
|
37931
36939
|
parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
|
37932
36940
|
parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
|
@@ -37942,7 +36950,7 @@ spurious results.`);
|
|
37942
36950
|
const outputIndex = decoded;
|
37943
36951
|
[decoded, o] = new B256Coder().decode(data, o);
|
37944
36952
|
const owner = decoded;
|
37945
|
-
[decoded, o] = new
|
36953
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37946
36954
|
const amount = decoded;
|
37947
36955
|
[decoded, o] = new B256Coder().decode(data, o);
|
37948
36956
|
const assetId = decoded;
|
@@ -37952,7 +36960,7 @@ spurious results.`);
|
|
37952
36960
|
const witnessIndex = Number(decoded);
|
37953
36961
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37954
36962
|
const maturity = decoded;
|
37955
|
-
[decoded, o] = new
|
36963
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37956
36964
|
const predicateGasUsed = decoded;
|
37957
36965
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37958
36966
|
const predicateLength = decoded;
|
@@ -38035,7 +37043,7 @@ spurious results.`);
|
|
38035
37043
|
parts.push(new ByteArrayCoder(32).encode(value.sender));
|
38036
37044
|
parts.push(new ByteArrayCoder(32).encode(value.recipient));
|
38037
37045
|
parts.push(new ByteArrayCoder(32).encode(value.nonce));
|
38038
|
-
parts.push(new
|
37046
|
+
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
38039
37047
|
parts.push(arrayify(value.data || "0x"));
|
38040
37048
|
return sha2562(concat(parts));
|
38041
37049
|
}
|
@@ -38049,10 +37057,10 @@ spurious results.`);
|
|
38049
37057
|
const data = InputMessageCoder.encodeData(value.data);
|
38050
37058
|
parts.push(new ByteArrayCoder(32).encode(value.sender));
|
38051
37059
|
parts.push(new ByteArrayCoder(32).encode(value.recipient));
|
38052
|
-
parts.push(new
|
37060
|
+
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
38053
37061
|
parts.push(new ByteArrayCoder(32).encode(value.nonce));
|
38054
37062
|
parts.push(new NumberCoder("u8").encode(value.witnessIndex));
|
38055
|
-
parts.push(new
|
37063
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
|
38056
37064
|
parts.push(new NumberCoder("u32").encode(data.length));
|
38057
37065
|
parts.push(new NumberCoder("u32").encode(value.predicateLength));
|
38058
37066
|
parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
|
@@ -38074,13 +37082,13 @@ spurious results.`);
|
|
38074
37082
|
const sender = decoded;
|
38075
37083
|
[decoded, o] = new B256Coder().decode(data, o);
|
38076
37084
|
const recipient = decoded;
|
38077
|
-
[decoded, o] = new
|
37085
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38078
37086
|
const amount = decoded;
|
38079
37087
|
[decoded, o] = new B256Coder().decode(data, o);
|
38080
37088
|
const nonce = decoded;
|
38081
37089
|
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38082
37090
|
const witnessIndex = Number(decoded);
|
38083
|
-
[decoded, o] = new
|
37091
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38084
37092
|
const predicateGasUsed = decoded;
|
38085
37093
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38086
37094
|
const dataLength2 = decoded;
|
@@ -38186,7 +37194,7 @@ spurious results.`);
|
|
38186
37194
|
encode(value) {
|
38187
37195
|
const parts = [];
|
38188
37196
|
parts.push(new B256Coder().encode(value.to));
|
38189
|
-
parts.push(new
|
37197
|
+
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
38190
37198
|
parts.push(new B256Coder().encode(value.assetId));
|
38191
37199
|
return concat(parts);
|
38192
37200
|
}
|
@@ -38195,7 +37203,7 @@ spurious results.`);
|
|
38195
37203
|
let o = offset;
|
38196
37204
|
[decoded, o] = new B256Coder().decode(data, o);
|
38197
37205
|
const to = decoded;
|
38198
|
-
[decoded, o] = new
|
37206
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38199
37207
|
const amount = decoded;
|
38200
37208
|
[decoded, o] = new B256Coder().decode(data, o);
|
38201
37209
|
const assetId = decoded;
|
@@ -38248,7 +37256,7 @@ spurious results.`);
|
|
38248
37256
|
encode(value) {
|
38249
37257
|
const parts = [];
|
38250
37258
|
parts.push(new B256Coder().encode(value.to));
|
38251
|
-
parts.push(new
|
37259
|
+
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
38252
37260
|
parts.push(new B256Coder().encode(value.assetId));
|
38253
37261
|
return concat(parts);
|
38254
37262
|
}
|
@@ -38257,7 +37265,7 @@ spurious results.`);
|
|
38257
37265
|
let o = offset;
|
38258
37266
|
[decoded, o] = new B256Coder().decode(data, o);
|
38259
37267
|
const to = decoded;
|
38260
|
-
[decoded, o] = new
|
37268
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38261
37269
|
const amount = decoded;
|
38262
37270
|
[decoded, o] = new B256Coder().decode(data, o);
|
38263
37271
|
const assetId = decoded;
|
@@ -38279,7 +37287,7 @@ spurious results.`);
|
|
38279
37287
|
encode(value) {
|
38280
37288
|
const parts = [];
|
38281
37289
|
parts.push(new B256Coder().encode(value.to));
|
38282
|
-
parts.push(new
|
37290
|
+
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
38283
37291
|
parts.push(new B256Coder().encode(value.assetId));
|
38284
37292
|
return concat(parts);
|
38285
37293
|
}
|
@@ -38288,7 +37296,7 @@ spurious results.`);
|
|
38288
37296
|
let o = offset;
|
38289
37297
|
[decoded, o] = new B256Coder().decode(data, o);
|
38290
37298
|
const to = decoded;
|
38291
|
-
[decoded, o] = new
|
37299
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38292
37300
|
const amount = decoded;
|
38293
37301
|
[decoded, o] = new B256Coder().decode(data, o);
|
38294
37302
|
const assetId = decoded;
|
@@ -38436,7 +37444,7 @@ spurious results.`);
|
|
38436
37444
|
case 8:
|
38437
37445
|
case 1:
|
38438
37446
|
case 2:
|
38439
|
-
parts.push(new
|
37447
|
+
parts.push(new BigNumberCoder("u64").encode(data));
|
38440
37448
|
break;
|
38441
37449
|
case 4:
|
38442
37450
|
parts.push(new NumberCoder("u32").encode(data));
|
@@ -38452,12 +37460,12 @@ spurious results.`);
|
|
38452
37460
|
let o = offset;
|
38453
37461
|
const policies = [];
|
38454
37462
|
if (policyTypes & 1) {
|
38455
|
-
const [gasPrice, nextOffset] = new
|
37463
|
+
const [gasPrice, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
38456
37464
|
o = nextOffset;
|
38457
37465
|
policies.push({ type: 1, data: gasPrice });
|
38458
37466
|
}
|
38459
37467
|
if (policyTypes & 2) {
|
38460
|
-
const [witnessLimit, nextOffset] = new
|
37468
|
+
const [witnessLimit, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
38461
37469
|
o = nextOffset;
|
38462
37470
|
policies.push({ type: 2, data: witnessLimit });
|
38463
37471
|
}
|
@@ -38467,7 +37475,7 @@ spurious results.`);
|
|
38467
37475
|
policies.push({ type: 4, data: maturity });
|
38468
37476
|
}
|
38469
37477
|
if (policyTypes & 8) {
|
38470
|
-
const [maxFee, nextOffset] = new
|
37478
|
+
const [maxFee, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
38471
37479
|
o = nextOffset;
|
38472
37480
|
policies.push({ type: 8, data: maxFee });
|
38473
37481
|
}
|
@@ -38499,7 +37507,7 @@ spurious results.`);
|
|
38499
37507
|
parts.push(new ByteArrayCoder(32).encode(value.sender));
|
38500
37508
|
parts.push(new ByteArrayCoder(32).encode(value.recipient));
|
38501
37509
|
parts.push(new ByteArrayCoder(32).encode(value.nonce));
|
38502
|
-
parts.push(new
|
37510
|
+
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
38503
37511
|
parts.push(arrayify(value.data || "0x"));
|
38504
37512
|
return sha2562(concat(parts));
|
38505
37513
|
}
|
@@ -38507,7 +37515,7 @@ spurious results.`);
|
|
38507
37515
|
const parts = [];
|
38508
37516
|
parts.push(new B256Coder().encode(value.sender));
|
38509
37517
|
parts.push(new B256Coder().encode(value.recipient));
|
38510
|
-
parts.push(new
|
37518
|
+
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
38511
37519
|
parts.push(new B256Coder().encode(value.nonce));
|
38512
37520
|
parts.push(new NumberCoder("u16").encode(value.data.length));
|
38513
37521
|
parts.push(new B256Coder().encode(value.digest));
|
@@ -38521,7 +37529,7 @@ spurious results.`);
|
|
38521
37529
|
const sender = decoded;
|
38522
37530
|
[decoded, o] = new B256Coder().decode(data, o);
|
38523
37531
|
const recipient = decoded;
|
38524
|
-
[decoded, o] = new
|
37532
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38525
37533
|
const amount = decoded;
|
38526
37534
|
[decoded, o] = new B256Coder().decode(data, o);
|
38527
37535
|
const nonce = decoded;
|
@@ -38561,9 +37569,9 @@ spurious results.`);
|
|
38561
37569
|
const parts = [];
|
38562
37570
|
parts.push(new B256Coder().encode(value.subId));
|
38563
37571
|
parts.push(new B256Coder().encode(value.contractId));
|
38564
|
-
parts.push(new
|
38565
|
-
parts.push(new
|
38566
|
-
parts.push(new
|
37572
|
+
parts.push(new BigNumberCoder("u64").encode(value.val));
|
37573
|
+
parts.push(new BigNumberCoder("u64").encode(value.pc));
|
37574
|
+
parts.push(new BigNumberCoder("u64").encode(value.is));
|
38567
37575
|
return concat(parts);
|
38568
37576
|
}
|
38569
37577
|
decode(data, offset) {
|
@@ -38573,11 +37581,11 @@ spurious results.`);
|
|
38573
37581
|
const subId = decoded;
|
38574
37582
|
[decoded, o] = new B256Coder().decode(data, o);
|
38575
37583
|
const contractId = decoded;
|
38576
|
-
[decoded, o] = new
|
37584
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38577
37585
|
const val = decoded;
|
38578
|
-
[decoded, o] = new
|
37586
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38579
37587
|
const pc = decoded;
|
38580
|
-
[decoded, o] = new
|
37588
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38581
37589
|
const is = decoded;
|
38582
37590
|
const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
|
38583
37591
|
const receiptMint = {
|
@@ -38603,9 +37611,9 @@ spurious results.`);
|
|
38603
37611
|
const parts = [];
|
38604
37612
|
parts.push(new B256Coder().encode(value.subId));
|
38605
37613
|
parts.push(new B256Coder().encode(value.contractId));
|
38606
|
-
parts.push(new
|
38607
|
-
parts.push(new
|
38608
|
-
parts.push(new
|
37614
|
+
parts.push(new BigNumberCoder("u64").encode(value.val));
|
37615
|
+
parts.push(new BigNumberCoder("u64").encode(value.pc));
|
37616
|
+
parts.push(new BigNumberCoder("u64").encode(value.is));
|
38609
37617
|
return concat(parts);
|
38610
37618
|
}
|
38611
37619
|
decode(data, offset) {
|
@@ -38615,11 +37623,11 @@ spurious results.`);
|
|
38615
37623
|
const subId = decoded;
|
38616
37624
|
[decoded, o] = new B256Coder().decode(data, o);
|
38617
37625
|
const contractId = decoded;
|
38618
|
-
[decoded, o] = new
|
37626
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38619
37627
|
const val = decoded;
|
38620
|
-
[decoded, o] = new
|
37628
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38621
37629
|
const pc = decoded;
|
38622
|
-
[decoded, o] = new
|
37630
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38623
37631
|
const is = decoded;
|
38624
37632
|
const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
|
38625
37633
|
const receiptBurn = {
|
@@ -38685,7 +37693,7 @@ spurious results.`);
|
|
38685
37693
|
}
|
38686
37694
|
encode(value) {
|
38687
37695
|
const parts = [];
|
38688
|
-
parts.push(new
|
37696
|
+
parts.push(new BigNumberCoder("u64").encode(value.scriptGasLimit));
|
38689
37697
|
parts.push(new NumberCoder("u32").encode(value.scriptLength));
|
38690
37698
|
parts.push(new NumberCoder("u32").encode(value.scriptDataLength));
|
38691
37699
|
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
@@ -38704,7 +37712,7 @@ spurious results.`);
|
|
38704
37712
|
decode(data, offset) {
|
38705
37713
|
let decoded;
|
38706
37714
|
let o = offset;
|
38707
|
-
[decoded, o] = new
|
37715
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38708
37716
|
const scriptGasLimit = decoded;
|
38709
37717
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38710
37718
|
const scriptLength = decoded;
|
@@ -38836,7 +37844,7 @@ spurious results.`);
|
|
38836
37844
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
38837
37845
|
parts.push(new InputContractCoder().encode(value.inputContract));
|
38838
37846
|
parts.push(new OutputContractCoder().encode(value.outputContract));
|
38839
|
-
parts.push(new
|
37847
|
+
parts.push(new BigNumberCoder("u64").encode(value.mintAmount));
|
38840
37848
|
parts.push(new B256Coder().encode(value.mintAssetId));
|
38841
37849
|
return concat(parts);
|
38842
37850
|
}
|
@@ -38849,7 +37857,7 @@ spurious results.`);
|
|
38849
37857
|
const inputContract = decoded;
|
38850
37858
|
[decoded, o] = new OutputContractCoder().decode(data, o);
|
38851
37859
|
const outputContract = decoded;
|
38852
|
-
[decoded, o] = new
|
37860
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38853
37861
|
const mintAmount = decoded;
|
38854
37862
|
[decoded, o] = new B256Coder().decode(data, o);
|
38855
37863
|
const mintAssetId = decoded;
|
@@ -43845,9 +42853,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
43845
42853
|
});
|
43846
42854
|
}
|
43847
42855
|
|
43848
|
-
// src/providers/utils/time.ts
|
43849
|
-
var fromUnixToTai64 = (unixTimestampMs) => (BigInt(unixTimestampMs) + BigInt(2 ** 62) + BigInt(10)).toString();
|
43850
|
-
|
43851
42856
|
// src/providers/transaction-request/errors.ts
|
43852
42857
|
var NoWitnessAtIndexError = class extends Error {
|
43853
42858
|
constructor(index) {
|
@@ -44820,13 +43825,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
44820
43825
|
};
|
44821
43826
|
};
|
44822
43827
|
|
44823
|
-
// src/providers/transaction-summary/date.ts
|
44824
|
-
var import_tai64 = __toESM(require_lib2());
|
44825
|
-
var fromTai64ToDate = (tai64Timestamp) => {
|
44826
|
-
const timestamp = import_tai64.TAI64.fromString(tai64Timestamp, 10).toUnix();
|
44827
|
-
return new Date(timestamp * 1e3);
|
44828
|
-
};
|
44829
|
-
|
44830
43828
|
// src/providers/transaction-summary/call.ts
|
44831
43829
|
var getFunctionCall = ({ abi, receipt, rawPayload, maxInputs }) => {
|
44832
43830
|
const abiInterface = new Interface(abi);
|
@@ -45407,7 +44405,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
45407
44405
|
const burnedAssets = extractBurnedAssetsFromReceipts(receipts);
|
45408
44406
|
let date;
|
45409
44407
|
if (time) {
|
45410
|
-
date =
|
44408
|
+
date = DateTime.fromTai64(time);
|
45411
44409
|
}
|
45412
44410
|
const transactionSummary = {
|
45413
44411
|
id,
|
@@ -46511,13 +45509,13 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
46511
45509
|
* Lets you produce blocks with custom timestamps and the block number of the last block produced.
|
46512
45510
|
*
|
46513
45511
|
* @param amount - The amount of blocks to produce
|
46514
|
-
* @param startTime - The UNIX timestamp to set for the first produced block
|
45512
|
+
* @param startTime - The UNIX timestamp (milliseconds) to set for the first produced block
|
46515
45513
|
* @returns A promise that resolves to the block number of the last produced block.
|
46516
45514
|
*/
|
46517
45515
|
async produceBlocks(amount, startTime) {
|
46518
45516
|
const { produceBlocks: latestBlockHeight } = await this.operations.produceBlocks({
|
46519
45517
|
blocksToProduce: bn(amount).toString(10),
|
46520
|
-
startTimestamp: startTime ?
|
45518
|
+
startTimestamp: startTime ? DateTime.fromUnixMilliseconds(startTime).toTai64() : void 0
|
46521
45519
|
});
|
46522
45520
|
return bn(latestBlockHeight);
|
46523
45521
|
}
|
@@ -46590,7 +45588,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
46590
45588
|
var asm = __toESM(require_node());
|
46591
45589
|
var formatTransferToContractScriptData = (params) => {
|
46592
45590
|
const { assetId, amountToTransfer, hexlifiedContractId } = params;
|
46593
|
-
const numberCoder = new
|
45591
|
+
const numberCoder = new BigNumberCoder("u64");
|
46594
45592
|
const encoded = numberCoder.encode(new BN(amountToTransfer).toNumber());
|
46595
45593
|
const scriptData = Uint8Array.from([
|
46596
45594
|
...arrayify(hexlifiedContractId),
|