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

@@ -20389,1075 +20389,6 @@ spurious results.`);
20389
20389
  }
20390
20390
  });
20391
20391
 
20392
- // ../../node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js
20393
- var require_long = __commonJS({
20394
- "../../node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js"(exports, module2) {
20395
- module2.exports = Long;
20396
- var wasm = null;
20397
- try {
20398
- wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
20399
- 0,
20400
- 97,
20401
- 115,
20402
- 109,
20403
- 1,
20404
- 0,
20405
- 0,
20406
- 0,
20407
- 1,
20408
- 13,
20409
- 2,
20410
- 96,
20411
- 0,
20412
- 1,
20413
- 127,
20414
- 96,
20415
- 4,
20416
- 127,
20417
- 127,
20418
- 127,
20419
- 127,
20420
- 1,
20421
- 127,
20422
- 3,
20423
- 7,
20424
- 6,
20425
- 0,
20426
- 1,
20427
- 1,
20428
- 1,
20429
- 1,
20430
- 1,
20431
- 6,
20432
- 6,
20433
- 1,
20434
- 127,
20435
- 1,
20436
- 65,
20437
- 0,
20438
- 11,
20439
- 7,
20440
- 50,
20441
- 6,
20442
- 3,
20443
- 109,
20444
- 117,
20445
- 108,
20446
- 0,
20447
- 1,
20448
- 5,
20449
- 100,
20450
- 105,
20451
- 118,
20452
- 95,
20453
- 115,
20454
- 0,
20455
- 2,
20456
- 5,
20457
- 100,
20458
- 105,
20459
- 118,
20460
- 95,
20461
- 117,
20462
- 0,
20463
- 3,
20464
- 5,
20465
- 114,
20466
- 101,
20467
- 109,
20468
- 95,
20469
- 115,
20470
- 0,
20471
- 4,
20472
- 5,
20473
- 114,
20474
- 101,
20475
- 109,
20476
- 95,
20477
- 117,
20478
- 0,
20479
- 5,
20480
- 8,
20481
- 103,
20482
- 101,
20483
- 116,
20484
- 95,
20485
- 104,
20486
- 105,
20487
- 103,
20488
- 104,
20489
- 0,
20490
- 0,
20491
- 10,
20492
- 191,
20493
- 1,
20494
- 6,
20495
- 4,
20496
- 0,
20497
- 35,
20498
- 0,
20499
- 11,
20500
- 36,
20501
- 1,
20502
- 1,
20503
- 126,
20504
- 32,
20505
- 0,
20506
- 173,
20507
- 32,
20508
- 1,
20509
- 173,
20510
- 66,
20511
- 32,
20512
- 134,
20513
- 132,
20514
- 32,
20515
- 2,
20516
- 173,
20517
- 32,
20518
- 3,
20519
- 173,
20520
- 66,
20521
- 32,
20522
- 134,
20523
- 132,
20524
- 126,
20525
- 34,
20526
- 4,
20527
- 66,
20528
- 32,
20529
- 135,
20530
- 167,
20531
- 36,
20532
- 0,
20533
- 32,
20534
- 4,
20535
- 167,
20536
- 11,
20537
- 36,
20538
- 1,
20539
- 1,
20540
- 126,
20541
- 32,
20542
- 0,
20543
- 173,
20544
- 32,
20545
- 1,
20546
- 173,
20547
- 66,
20548
- 32,
20549
- 134,
20550
- 132,
20551
- 32,
20552
- 2,
20553
- 173,
20554
- 32,
20555
- 3,
20556
- 173,
20557
- 66,
20558
- 32,
20559
- 134,
20560
- 132,
20561
- 127,
20562
- 34,
20563
- 4,
20564
- 66,
20565
- 32,
20566
- 135,
20567
- 167,
20568
- 36,
20569
- 0,
20570
- 32,
20571
- 4,
20572
- 167,
20573
- 11,
20574
- 36,
20575
- 1,
20576
- 1,
20577
- 126,
20578
- 32,
20579
- 0,
20580
- 173,
20581
- 32,
20582
- 1,
20583
- 173,
20584
- 66,
20585
- 32,
20586
- 134,
20587
- 132,
20588
- 32,
20589
- 2,
20590
- 173,
20591
- 32,
20592
- 3,
20593
- 173,
20594
- 66,
20595
- 32,
20596
- 134,
20597
- 132,
20598
- 128,
20599
- 34,
20600
- 4,
20601
- 66,
20602
- 32,
20603
- 135,
20604
- 167,
20605
- 36,
20606
- 0,
20607
- 32,
20608
- 4,
20609
- 167,
20610
- 11,
20611
- 36,
20612
- 1,
20613
- 1,
20614
- 126,
20615
- 32,
20616
- 0,
20617
- 173,
20618
- 32,
20619
- 1,
20620
- 173,
20621
- 66,
20622
- 32,
20623
- 134,
20624
- 132,
20625
- 32,
20626
- 2,
20627
- 173,
20628
- 32,
20629
- 3,
20630
- 173,
20631
- 66,
20632
- 32,
20633
- 134,
20634
- 132,
20635
- 129,
20636
- 34,
20637
- 4,
20638
- 66,
20639
- 32,
20640
- 135,
20641
- 167,
20642
- 36,
20643
- 0,
20644
- 32,
20645
- 4,
20646
- 167,
20647
- 11,
20648
- 36,
20649
- 1,
20650
- 1,
20651
- 126,
20652
- 32,
20653
- 0,
20654
- 173,
20655
- 32,
20656
- 1,
20657
- 173,
20658
- 66,
20659
- 32,
20660
- 134,
20661
- 132,
20662
- 32,
20663
- 2,
20664
- 173,
20665
- 32,
20666
- 3,
20667
- 173,
20668
- 66,
20669
- 32,
20670
- 134,
20671
- 132,
20672
- 130,
20673
- 34,
20674
- 4,
20675
- 66,
20676
- 32,
20677
- 135,
20678
- 167,
20679
- 36,
20680
- 0,
20681
- 32,
20682
- 4,
20683
- 167,
20684
- 11
20685
- ])), {}).exports;
20686
- } catch (e) {
20687
- }
20688
- function Long(low, high, unsigned) {
20689
- this.low = low | 0;
20690
- this.high = high | 0;
20691
- this.unsigned = !!unsigned;
20692
- }
20693
- Long.prototype.__isLong__;
20694
- Object.defineProperty(Long.prototype, "__isLong__", { value: true });
20695
- function isLong(obj) {
20696
- return (obj && obj["__isLong__"]) === true;
20697
- }
20698
- Long.isLong = isLong;
20699
- var INT_CACHE = {};
20700
- var UINT_CACHE = {};
20701
- function fromInt(value, unsigned) {
20702
- var obj, cachedObj, cache2;
20703
- if (unsigned) {
20704
- value >>>= 0;
20705
- if (cache2 = 0 <= value && value < 256) {
20706
- cachedObj = UINT_CACHE[value];
20707
- if (cachedObj)
20708
- return cachedObj;
20709
- }
20710
- obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
20711
- if (cache2)
20712
- UINT_CACHE[value] = obj;
20713
- return obj;
20714
- } else {
20715
- value |= 0;
20716
- if (cache2 = -128 <= value && value < 128) {
20717
- cachedObj = INT_CACHE[value];
20718
- if (cachedObj)
20719
- return cachedObj;
20720
- }
20721
- obj = fromBits(value, value < 0 ? -1 : 0, false);
20722
- if (cache2)
20723
- INT_CACHE[value] = obj;
20724
- return obj;
20725
- }
20726
- }
20727
- Long.fromInt = fromInt;
20728
- function fromNumber(value, unsigned) {
20729
- if (isNaN(value))
20730
- return unsigned ? UZERO : ZERO;
20731
- if (unsigned) {
20732
- if (value < 0)
20733
- return UZERO;
20734
- if (value >= TWO_PWR_64_DBL)
20735
- return MAX_UNSIGNED_VALUE;
20736
- } else {
20737
- if (value <= -TWO_PWR_63_DBL)
20738
- return MIN_VALUE;
20739
- if (value + 1 >= TWO_PWR_63_DBL)
20740
- return MAX_VALUE;
20741
- }
20742
- if (value < 0)
20743
- return fromNumber(-value, unsigned).neg();
20744
- return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);
20745
- }
20746
- Long.fromNumber = fromNumber;
20747
- function fromBits(lowBits, highBits, unsigned) {
20748
- return new Long(lowBits, highBits, unsigned);
20749
- }
20750
- Long.fromBits = fromBits;
20751
- var pow_dbl = Math.pow;
20752
- function fromString(str, unsigned, radix) {
20753
- if (str.length === 0)
20754
- throw Error("empty string");
20755
- if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
20756
- return ZERO;
20757
- if (typeof unsigned === "number") {
20758
- radix = unsigned, unsigned = false;
20759
- } else {
20760
- unsigned = !!unsigned;
20761
- }
20762
- radix = radix || 10;
20763
- if (radix < 2 || 36 < radix)
20764
- throw RangeError("radix");
20765
- var p;
20766
- if ((p = str.indexOf("-")) > 0)
20767
- throw Error("interior hyphen");
20768
- else if (p === 0) {
20769
- return fromString(str.substring(1), unsigned, radix).neg();
20770
- }
20771
- var radixToPower = fromNumber(pow_dbl(radix, 8));
20772
- var result = ZERO;
20773
- for (var i = 0; i < str.length; i += 8) {
20774
- var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
20775
- if (size < 8) {
20776
- var power = fromNumber(pow_dbl(radix, size));
20777
- result = result.mul(power).add(fromNumber(value));
20778
- } else {
20779
- result = result.mul(radixToPower);
20780
- result = result.add(fromNumber(value));
20781
- }
20782
- }
20783
- result.unsigned = unsigned;
20784
- return result;
20785
- }
20786
- Long.fromString = fromString;
20787
- function fromValue(val, unsigned) {
20788
- if (typeof val === "number")
20789
- return fromNumber(val, unsigned);
20790
- if (typeof val === "string")
20791
- return fromString(val, unsigned);
20792
- return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned);
20793
- }
20794
- Long.fromValue = fromValue;
20795
- var TWO_PWR_16_DBL = 1 << 16;
20796
- var TWO_PWR_24_DBL = 1 << 24;
20797
- var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
20798
- var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
20799
- var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
20800
- var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
20801
- var ZERO = fromInt(0);
20802
- Long.ZERO = ZERO;
20803
- var UZERO = fromInt(0, true);
20804
- Long.UZERO = UZERO;
20805
- var ONE = fromInt(1);
20806
- Long.ONE = ONE;
20807
- var UONE = fromInt(1, true);
20808
- Long.UONE = UONE;
20809
- var NEG_ONE = fromInt(-1);
20810
- Long.NEG_ONE = NEG_ONE;
20811
- var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
20812
- Long.MAX_VALUE = MAX_VALUE;
20813
- var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
20814
- Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
20815
- var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
20816
- Long.MIN_VALUE = MIN_VALUE;
20817
- var LongPrototype = Long.prototype;
20818
- LongPrototype.toInt = function toInt() {
20819
- return this.unsigned ? this.low >>> 0 : this.low;
20820
- };
20821
- LongPrototype.toNumber = function toNumber3() {
20822
- if (this.unsigned)
20823
- return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
20824
- return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
20825
- };
20826
- LongPrototype.toString = function toString(radix) {
20827
- radix = radix || 10;
20828
- if (radix < 2 || 36 < radix)
20829
- throw RangeError("radix");
20830
- if (this.isZero())
20831
- return "0";
20832
- if (this.isNegative()) {
20833
- if (this.eq(MIN_VALUE)) {
20834
- var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
20835
- return div.toString(radix) + rem1.toInt().toString(radix);
20836
- } else
20837
- return "-" + this.neg().toString(radix);
20838
- }
20839
- var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
20840
- var result = "";
20841
- while (true) {
20842
- var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
20843
- rem = remDiv;
20844
- if (rem.isZero())
20845
- return digits + result;
20846
- else {
20847
- while (digits.length < 6)
20848
- digits = "0" + digits;
20849
- result = "" + digits + result;
20850
- }
20851
- }
20852
- };
20853
- LongPrototype.getHighBits = function getHighBits() {
20854
- return this.high;
20855
- };
20856
- LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
20857
- return this.high >>> 0;
20858
- };
20859
- LongPrototype.getLowBits = function getLowBits() {
20860
- return this.low;
20861
- };
20862
- LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
20863
- return this.low >>> 0;
20864
- };
20865
- LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
20866
- if (this.isNegative())
20867
- return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
20868
- var val = this.high != 0 ? this.high : this.low;
20869
- for (var bit = 31; bit > 0; bit--)
20870
- if ((val & 1 << bit) != 0)
20871
- break;
20872
- return this.high != 0 ? bit + 33 : bit + 1;
20873
- };
20874
- LongPrototype.isZero = function isZero() {
20875
- return this.high === 0 && this.low === 0;
20876
- };
20877
- LongPrototype.eqz = LongPrototype.isZero;
20878
- LongPrototype.isNegative = function isNegative() {
20879
- return !this.unsigned && this.high < 0;
20880
- };
20881
- LongPrototype.isPositive = function isPositive() {
20882
- return this.unsigned || this.high >= 0;
20883
- };
20884
- LongPrototype.isOdd = function isOdd() {
20885
- return (this.low & 1) === 1;
20886
- };
20887
- LongPrototype.isEven = function isEven() {
20888
- return (this.low & 1) === 0;
20889
- };
20890
- LongPrototype.equals = function equals(other) {
20891
- if (!isLong(other))
20892
- other = fromValue(other);
20893
- if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
20894
- return false;
20895
- return this.high === other.high && this.low === other.low;
20896
- };
20897
- LongPrototype.eq = LongPrototype.equals;
20898
- LongPrototype.notEquals = function notEquals(other) {
20899
- return !this.eq(
20900
- /* validates */
20901
- other
20902
- );
20903
- };
20904
- LongPrototype.neq = LongPrototype.notEquals;
20905
- LongPrototype.ne = LongPrototype.notEquals;
20906
- LongPrototype.lessThan = function lessThan(other) {
20907
- return this.comp(
20908
- /* validates */
20909
- other
20910
- ) < 0;
20911
- };
20912
- LongPrototype.lt = LongPrototype.lessThan;
20913
- LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
20914
- return this.comp(
20915
- /* validates */
20916
- other
20917
- ) <= 0;
20918
- };
20919
- LongPrototype.lte = LongPrototype.lessThanOrEqual;
20920
- LongPrototype.le = LongPrototype.lessThanOrEqual;
20921
- LongPrototype.greaterThan = function greaterThan(other) {
20922
- return this.comp(
20923
- /* validates */
20924
- other
20925
- ) > 0;
20926
- };
20927
- LongPrototype.gt = LongPrototype.greaterThan;
20928
- LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
20929
- return this.comp(
20930
- /* validates */
20931
- other
20932
- ) >= 0;
20933
- };
20934
- LongPrototype.gte = LongPrototype.greaterThanOrEqual;
20935
- LongPrototype.ge = LongPrototype.greaterThanOrEqual;
20936
- LongPrototype.compare = function compare(other) {
20937
- if (!isLong(other))
20938
- other = fromValue(other);
20939
- if (this.eq(other))
20940
- return 0;
20941
- var thisNeg = this.isNegative(), otherNeg = other.isNegative();
20942
- if (thisNeg && !otherNeg)
20943
- return -1;
20944
- if (!thisNeg && otherNeg)
20945
- return 1;
20946
- if (!this.unsigned)
20947
- return this.sub(other).isNegative() ? -1 : 1;
20948
- return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
20949
- };
20950
- LongPrototype.comp = LongPrototype.compare;
20951
- LongPrototype.negate = function negate() {
20952
- if (!this.unsigned && this.eq(MIN_VALUE))
20953
- return MIN_VALUE;
20954
- return this.not().add(ONE);
20955
- };
20956
- LongPrototype.neg = LongPrototype.negate;
20957
- LongPrototype.add = function add3(addend) {
20958
- if (!isLong(addend))
20959
- addend = fromValue(addend);
20960
- var a48 = this.high >>> 16;
20961
- var a32 = this.high & 65535;
20962
- var a16 = this.low >>> 16;
20963
- var a00 = this.low & 65535;
20964
- var b48 = addend.high >>> 16;
20965
- var b32 = addend.high & 65535;
20966
- var b16 = addend.low >>> 16;
20967
- var b00 = addend.low & 65535;
20968
- var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
20969
- c00 += a00 + b00;
20970
- c16 += c00 >>> 16;
20971
- c00 &= 65535;
20972
- c16 += a16 + b16;
20973
- c32 += c16 >>> 16;
20974
- c16 &= 65535;
20975
- c32 += a32 + b32;
20976
- c48 += c32 >>> 16;
20977
- c32 &= 65535;
20978
- c48 += a48 + b48;
20979
- c48 &= 65535;
20980
- return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
20981
- };
20982
- LongPrototype.subtract = function subtract(subtrahend) {
20983
- if (!isLong(subtrahend))
20984
- subtrahend = fromValue(subtrahend);
20985
- return this.add(subtrahend.neg());
20986
- };
20987
- LongPrototype.sub = LongPrototype.subtract;
20988
- LongPrototype.multiply = function multiply(multiplier) {
20989
- if (this.isZero())
20990
- return ZERO;
20991
- if (!isLong(multiplier))
20992
- multiplier = fromValue(multiplier);
20993
- if (wasm) {
20994
- var low = wasm.mul(
20995
- this.low,
20996
- this.high,
20997
- multiplier.low,
20998
- multiplier.high
20999
- );
21000
- return fromBits(low, wasm.get_high(), this.unsigned);
21001
- }
21002
- if (multiplier.isZero())
21003
- return ZERO;
21004
- if (this.eq(MIN_VALUE))
21005
- return multiplier.isOdd() ? MIN_VALUE : ZERO;
21006
- if (multiplier.eq(MIN_VALUE))
21007
- return this.isOdd() ? MIN_VALUE : ZERO;
21008
- if (this.isNegative()) {
21009
- if (multiplier.isNegative())
21010
- return this.neg().mul(multiplier.neg());
21011
- else
21012
- return this.neg().mul(multiplier).neg();
21013
- } else if (multiplier.isNegative())
21014
- return this.mul(multiplier.neg()).neg();
21015
- if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
21016
- return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
21017
- var a48 = this.high >>> 16;
21018
- var a32 = this.high & 65535;
21019
- var a16 = this.low >>> 16;
21020
- var a00 = this.low & 65535;
21021
- var b48 = multiplier.high >>> 16;
21022
- var b32 = multiplier.high & 65535;
21023
- var b16 = multiplier.low >>> 16;
21024
- var b00 = multiplier.low & 65535;
21025
- var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
21026
- c00 += a00 * b00;
21027
- c16 += c00 >>> 16;
21028
- c00 &= 65535;
21029
- c16 += a16 * b00;
21030
- c32 += c16 >>> 16;
21031
- c16 &= 65535;
21032
- c16 += a00 * b16;
21033
- c32 += c16 >>> 16;
21034
- c16 &= 65535;
21035
- c32 += a32 * b00;
21036
- c48 += c32 >>> 16;
21037
- c32 &= 65535;
21038
- c32 += a16 * b16;
21039
- c48 += c32 >>> 16;
21040
- c32 &= 65535;
21041
- c32 += a00 * b32;
21042
- c48 += c32 >>> 16;
21043
- c32 &= 65535;
21044
- c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
21045
- c48 &= 65535;
21046
- return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
21047
- };
21048
- LongPrototype.mul = LongPrototype.multiply;
21049
- LongPrototype.divide = function divide(divisor) {
21050
- if (!isLong(divisor))
21051
- divisor = fromValue(divisor);
21052
- if (divisor.isZero())
21053
- throw Error("division by zero");
21054
- if (wasm) {
21055
- if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
21056
- return this;
21057
- }
21058
- var low = (this.unsigned ? wasm.div_u : wasm.div_s)(
21059
- this.low,
21060
- this.high,
21061
- divisor.low,
21062
- divisor.high
21063
- );
21064
- return fromBits(low, wasm.get_high(), this.unsigned);
21065
- }
21066
- if (this.isZero())
21067
- return this.unsigned ? UZERO : ZERO;
21068
- var approx, rem, res;
21069
- if (!this.unsigned) {
21070
- if (this.eq(MIN_VALUE)) {
21071
- if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
21072
- return MIN_VALUE;
21073
- else if (divisor.eq(MIN_VALUE))
21074
- return ONE;
21075
- else {
21076
- var halfThis = this.shr(1);
21077
- approx = halfThis.div(divisor).shl(1);
21078
- if (approx.eq(ZERO)) {
21079
- return divisor.isNegative() ? ONE : NEG_ONE;
21080
- } else {
21081
- rem = this.sub(divisor.mul(approx));
21082
- res = approx.add(rem.div(divisor));
21083
- return res;
21084
- }
21085
- }
21086
- } else if (divisor.eq(MIN_VALUE))
21087
- return this.unsigned ? UZERO : ZERO;
21088
- if (this.isNegative()) {
21089
- if (divisor.isNegative())
21090
- return this.neg().div(divisor.neg());
21091
- return this.neg().div(divisor).neg();
21092
- } else if (divisor.isNegative())
21093
- return this.div(divisor.neg()).neg();
21094
- res = ZERO;
21095
- } else {
21096
- if (!divisor.unsigned)
21097
- divisor = divisor.toUnsigned();
21098
- if (divisor.gt(this))
21099
- return UZERO;
21100
- if (divisor.gt(this.shru(1)))
21101
- return UONE;
21102
- res = UZERO;
21103
- }
21104
- rem = this;
21105
- while (rem.gte(divisor)) {
21106
- approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
21107
- 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);
21108
- while (approxRem.isNegative() || approxRem.gt(rem)) {
21109
- approx -= delta;
21110
- approxRes = fromNumber(approx, this.unsigned);
21111
- approxRem = approxRes.mul(divisor);
21112
- }
21113
- if (approxRes.isZero())
21114
- approxRes = ONE;
21115
- res = res.add(approxRes);
21116
- rem = rem.sub(approxRem);
21117
- }
21118
- return res;
21119
- };
21120
- LongPrototype.div = LongPrototype.divide;
21121
- LongPrototype.modulo = function modulo(divisor) {
21122
- if (!isLong(divisor))
21123
- divisor = fromValue(divisor);
21124
- if (wasm) {
21125
- var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(
21126
- this.low,
21127
- this.high,
21128
- divisor.low,
21129
- divisor.high
21130
- );
21131
- return fromBits(low, wasm.get_high(), this.unsigned);
21132
- }
21133
- return this.sub(this.div(divisor).mul(divisor));
21134
- };
21135
- LongPrototype.mod = LongPrototype.modulo;
21136
- LongPrototype.rem = LongPrototype.modulo;
21137
- LongPrototype.not = function not() {
21138
- return fromBits(~this.low, ~this.high, this.unsigned);
21139
- };
21140
- LongPrototype.and = function and(other) {
21141
- if (!isLong(other))
21142
- other = fromValue(other);
21143
- return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
21144
- };
21145
- LongPrototype.or = function or(other) {
21146
- if (!isLong(other))
21147
- other = fromValue(other);
21148
- return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
21149
- };
21150
- LongPrototype.xor = function xor(other) {
21151
- if (!isLong(other))
21152
- other = fromValue(other);
21153
- return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
21154
- };
21155
- LongPrototype.shiftLeft = function shiftLeft(numBits) {
21156
- if (isLong(numBits))
21157
- numBits = numBits.toInt();
21158
- if ((numBits &= 63) === 0)
21159
- return this;
21160
- else if (numBits < 32)
21161
- return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);
21162
- else
21163
- return fromBits(0, this.low << numBits - 32, this.unsigned);
21164
- };
21165
- LongPrototype.shl = LongPrototype.shiftLeft;
21166
- LongPrototype.shiftRight = function shiftRight(numBits) {
21167
- if (isLong(numBits))
21168
- numBits = numBits.toInt();
21169
- if ((numBits &= 63) === 0)
21170
- return this;
21171
- else if (numBits < 32)
21172
- return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);
21173
- else
21174
- return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);
21175
- };
21176
- LongPrototype.shr = LongPrototype.shiftRight;
21177
- LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
21178
- if (isLong(numBits))
21179
- numBits = numBits.toInt();
21180
- numBits &= 63;
21181
- if (numBits === 0)
21182
- return this;
21183
- else {
21184
- var high = this.high;
21185
- if (numBits < 32) {
21186
- var low = this.low;
21187
- return fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits, this.unsigned);
21188
- } else if (numBits === 32)
21189
- return fromBits(high, 0, this.unsigned);
21190
- else
21191
- return fromBits(high >>> numBits - 32, 0, this.unsigned);
21192
- }
21193
- };
21194
- LongPrototype.shru = LongPrototype.shiftRightUnsigned;
21195
- LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
21196
- LongPrototype.toSigned = function toSigned() {
21197
- if (!this.unsigned)
21198
- return this;
21199
- return fromBits(this.low, this.high, false);
21200
- };
21201
- LongPrototype.toUnsigned = function toUnsigned() {
21202
- if (this.unsigned)
21203
- return this;
21204
- return fromBits(this.low, this.high, true);
21205
- };
21206
- LongPrototype.toBytes = function toBytes5(le) {
21207
- return le ? this.toBytesLE() : this.toBytesBE();
21208
- };
21209
- LongPrototype.toBytesLE = function toBytesLE() {
21210
- var hi = this.high, lo = this.low;
21211
- return [
21212
- lo & 255,
21213
- lo >>> 8 & 255,
21214
- lo >>> 16 & 255,
21215
- lo >>> 24,
21216
- hi & 255,
21217
- hi >>> 8 & 255,
21218
- hi >>> 16 & 255,
21219
- hi >>> 24
21220
- ];
21221
- };
21222
- LongPrototype.toBytesBE = function toBytesBE() {
21223
- var hi = this.high, lo = this.low;
21224
- return [
21225
- hi >>> 24,
21226
- hi >>> 16 & 255,
21227
- hi >>> 8 & 255,
21228
- hi & 255,
21229
- lo >>> 24,
21230
- lo >>> 16 & 255,
21231
- lo >>> 8 & 255,
21232
- lo & 255
21233
- ];
21234
- };
21235
- Long.fromBytes = function fromBytes(bytes4, unsigned, le) {
21236
- return le ? Long.fromBytesLE(bytes4, unsigned) : Long.fromBytesBE(bytes4, unsigned);
21237
- };
21238
- Long.fromBytesLE = function fromBytesLE(bytes4, unsigned) {
21239
- return new Long(
21240
- bytes4[0] | bytes4[1] << 8 | bytes4[2] << 16 | bytes4[3] << 24,
21241
- bytes4[4] | bytes4[5] << 8 | bytes4[6] << 16 | bytes4[7] << 24,
21242
- unsigned
21243
- );
21244
- };
21245
- Long.fromBytesBE = function fromBytesBE(bytes4, unsigned) {
21246
- return new Long(
21247
- bytes4[4] << 24 | bytes4[5] << 16 | bytes4[6] << 8 | bytes4[7],
21248
- bytes4[0] << 24 | bytes4[1] << 16 | bytes4[2] << 8 | bytes4[3],
21249
- unsigned
21250
- );
21251
- };
21252
- }
21253
- });
21254
-
21255
- // ../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/leapSeconds.js
21256
- var require_leapSeconds = __commonJS({
21257
- "../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/leapSeconds.js"(exports) {
21258
- "use strict";
21259
- Object.defineProperty(exports, "__esModule", { value: true });
21260
- var leapSeconds = [
21261
- [1483228800, 37],
21262
- [1435708800, 36],
21263
- [1341100800, 35],
21264
- [1230768e3, 34],
21265
- [1136073600, 33],
21266
- [915148800, 32],
21267
- [867715200, 31],
21268
- [820454400, 30],
21269
- [773020800, 29],
21270
- [741484800, 28],
21271
- [709948800, 27],
21272
- [662688e3, 26],
21273
- [631152e3, 25],
21274
- [567993600, 24],
21275
- [489024e3, 23],
21276
- [425865600, 22],
21277
- [394329600, 21],
21278
- [362793600, 20],
21279
- [315532800, 19],
21280
- [283996800, 18],
21281
- [252460800, 17],
21282
- [220924800, 16],
21283
- [189302400, 15],
21284
- [157766400, 14],
21285
- [126230400, 13],
21286
- [94694400, 12],
21287
- [78796800, 11],
21288
- [63072e3, 10]
21289
- ];
21290
- var addLeapSeconds = (timestamp) => {
21291
- const leapSecond = leapSeconds.find(([ts]) => timestamp >= ts);
21292
- return timestamp + (leapSecond ? leapSecond[1] : 0);
21293
- };
21294
- exports.addLeapSeconds = addLeapSeconds;
21295
- var removeLeapSeconds = (timestamp) => {
21296
- const leapSecond = leapSeconds.find(([ts, offset]) => timestamp - offset >= ts);
21297
- return timestamp - (leapSecond ? leapSecond[1] : 0);
21298
- };
21299
- exports.removeLeapSeconds = removeLeapSeconds;
21300
- }
21301
- });
21302
-
21303
- // ../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/TAI64.js
21304
- var require_TAI64 = __commonJS({
21305
- "../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/TAI64.js"(exports) {
21306
- "use strict";
21307
- var __importDefault = exports && exports.__importDefault || function(mod2) {
21308
- return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
21309
- };
21310
- Object.defineProperty(exports, "__esModule", { value: true });
21311
- var long_1 = __importDefault(require_long());
21312
- var leapSeconds_1 = require_leapSeconds();
21313
- var TAI642 = class {
21314
- /**
21315
- * Construct an instance of TAI64.
21316
- *
21317
- * @param label - The TAI64 label between 0 and 2^63-1, inclusive
21318
- * @returns An instance of TAI64
21319
- * @throws RangeError if the given label is not between 0 and 2^63-1, inclusive
21320
- */
21321
- constructor(label) {
21322
- this.label = label;
21323
- if (label.lt(long_1.default.ZERO) || label.gte(long_1.default.MAX_VALUE)) {
21324
- throw new RangeError("Label must be an integer between 0 and 2^63-1, inclusive");
21325
- }
21326
- }
21327
- /**
21328
- * Return a TAI64 the current number of seconds elapsed since 1970 TAI.
21329
- *
21330
- * @returns An instance of TAI64
21331
- */
21332
- static now() {
21333
- const unixTimestamp = Math.floor(Date.now() / 1e3);
21334
- return TAI642.fromUnix(unixTimestamp);
21335
- }
21336
- /**
21337
- * Return a TAI64 corresponding to the given UNIX timestamp.
21338
- *
21339
- * @param timestamp - The UNIX timestamp in seconds
21340
- * @returns An instance of TAI64
21341
- */
21342
- static fromUnix(timestamp) {
21343
- const seconds = leapSeconds_1.addLeapSeconds(timestamp);
21344
- const label = TAI642.EPOCH.label.add(seconds);
21345
- return new TAI642(label);
21346
- }
21347
- /**
21348
- * Return a TAI64 corresponding to the given hexadecimal string representing a TAI64. This method
21349
- * is an alias for `TAI64#fromString()` method.
21350
- *
21351
- * @param hexString - The hexadecimal string
21352
- * @returns An instance of TAI64
21353
- */
21354
- static fromHexString(hexString) {
21355
- return TAI642.fromString(hexString);
21356
- }
21357
- /**
21358
- * Return a TAI64 corresponding to the given string representing a TAI64 in the given radix.
21359
- *
21360
- * @param str - The string
21361
- * @param radix - An integer that represents the radix (the base in mathematical numeral systems), defaults to `16`
21362
- * @returns An instance of TAI64
21363
- */
21364
- static fromString(str, radix = 16) {
21365
- const label = long_1.default.fromString(str, false, radix);
21366
- return new TAI642(label);
21367
- }
21368
- /**
21369
- * Return a TAI64 corresponding to the given byte array representing a TAI64.
21370
- *
21371
- * @param bytes - The byte array
21372
- * @returns An instance of TAI64
21373
- */
21374
- static fromByteArray(bytes4) {
21375
- const label = long_1.default.fromBytes(bytes4, false);
21376
- return new TAI642(label);
21377
- }
21378
- /**
21379
- * Return if this TAI64 is after the given TAI64.
21380
- *
21381
- * @param other - The other TAI64 to compare
21382
- * @returns `true` if this TAI64 is after the given TAI64, `false` otherwise
21383
- */
21384
- isAfter(other) {
21385
- return this.compareTo(other) > 0;
21386
- }
21387
- /**
21388
- * Return if this TAI64 is before the given TAI64.
21389
- *
21390
- * @param other - The other TAI64 to compare
21391
- * @returns `true` if this TAI64 is before the given TAI64, `false` otherwise
21392
- */
21393
- isBefore(other) {
21394
- return this.compareTo(other) < 0;
21395
- }
21396
- /**
21397
- * Return if this TAI64 is equal to the given TAI64.
21398
- *
21399
- * @param other - The other TAI64 to compare
21400
- * @returns `true` if this TAI64 is equal to the given TAI64, `false` otherwise
21401
- */
21402
- isEqual(other) {
21403
- return this.compareTo(other) === 0;
21404
- }
21405
- /**
21406
- * Compare this TAI64 to the given TAI64.
21407
- *
21408
- * @param other - The other TAI64 to compare
21409
- * @returns
21410
- * - `1` if this TAI64 is before the given TAI64
21411
- * - `-1` if this TAI64 is before the given TAI64
21412
- * - `0` if this TAI64 is equal to the given TAI64
21413
- */
21414
- compareTo(other) {
21415
- return this.label.compare(other.label);
21416
- }
21417
- /**
21418
- * Return a byte array representation of this TAI64.
21419
- */
21420
- toByteArray() {
21421
- return this.label.toBytes();
21422
- }
21423
- /**
21424
- * Return an hexadecimal string representation of this TAI64. This method
21425
- * is an alias for `TAI64#toString()` method.
21426
- */
21427
- toHexString() {
21428
- return this.toString();
21429
- }
21430
- /**
21431
- * Return a string representation of this TAI64.
21432
- *
21433
- * @param radix - An integer that represents the radix (the base in mathematical numeral systems), defaults to `16`
21434
- */
21435
- toString(radix = 16) {
21436
- return this.label.toString(radix);
21437
- }
21438
- /**
21439
- * Return a UNIX timestamp corresponding to this TAI64.
21440
- */
21441
- toUnix() {
21442
- const elapsedSeconds = this.label.sub(TAI642.EPOCH.label);
21443
- return leapSeconds_1.removeLeapSeconds(elapsedSeconds.toNumber());
21444
- }
21445
- };
21446
- TAI642.EPOCH = new TAI642(long_1.default.MAX_VALUE.shiftRight(1).add(1));
21447
- exports.TAI64 = TAI642;
21448
- }
21449
- });
21450
-
21451
- // ../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/index.js
21452
- var require_lib2 = __commonJS({
21453
- "../../node_modules/.pnpm/tai64@1.0.0/node_modules/tai64/lib/index.js"(exports) {
21454
- "use strict";
21455
- Object.defineProperty(exports, "__esModule", { value: true });
21456
- var TAI64_1 = require_TAI64();
21457
- exports.TAI64 = TAI64_1.TAI64;
21458
- }
21459
- });
21460
-
21461
20392
  // ../../node_modules/.pnpm/@fuels+vm-asm@0.42.1/node_modules/@fuels/vm-asm/dist/node/index.cjs
21462
20393
  var require_node = __commonJS({
21463
20394
  "../../node_modules/.pnpm/@fuels+vm-asm@0.42.1/node_modules/@fuels/vm-asm/dist/node/index.cjs"(exports) {
@@ -30102,9 +29033,9 @@ spurious results.`);
30102
29033
  // ../versions/dist/index.mjs
30103
29034
  function getBuiltinVersions() {
30104
29035
  return {
30105
- FORC: "0.50.0",
29036
+ FORC: "0.51.1",
30106
29037
  FUEL_CORE: "0.22.1",
30107
- FUELS: "0.75.0"
29038
+ FUELS: "0.76.0"
30108
29039
  };
30109
29040
  }
30110
29041
  function parseVersion(version2) {
@@ -30262,6 +29193,12 @@ spurious results.`);
30262
29193
  __publicField2(FuelError, "CODES", ErrorCode);
30263
29194
 
30264
29195
  // ../utils/dist/index.mjs
29196
+ var __defProp3 = Object.defineProperty;
29197
+ var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
29198
+ var __publicField3 = (obj, key, value) => {
29199
+ __defNormalProp3(obj, typeof key !== "symbol" ? key + "" : key, value);
29200
+ return value;
29201
+ };
30265
29202
  var chunkAndPadBytes = (bytes4, chunkSize) => {
30266
29203
  const chunks = [];
30267
29204
  for (let offset = 0; offset < bytes4.length; offset += chunkSize) {
@@ -30320,6 +29257,66 @@ spurious results.`);
30320
29257
  }
30321
29258
  return result;
30322
29259
  }
29260
+ var TAI64_LEAP_SECONDS = 37;
29261
+ var TAI64_UNIX_OFFSET = BigInt(2 ** 62) + BigInt(TAI64_LEAP_SECONDS);
29262
+ var msToSeconds = (ms) => Math.floor(ms / 1e3);
29263
+ var secondsToMs = (seconds) => seconds * 1e3;
29264
+ var tai64ToUnixSeconds = (tai64) => Number(BigInt(tai64) - TAI64_UNIX_OFFSET);
29265
+ var unixSecondsToTai64 = (unixSeconds) => String(BigInt(unixSeconds) + TAI64_UNIX_OFFSET);
29266
+ var tai64ToUnixMilliseconds = (tai64) => secondsToMs(tai64ToUnixSeconds(tai64));
29267
+ var _DateTime = class extends Date {
29268
+ /**
29269
+ * Generates a new DateTime instance from a Tai64 timestamp.
29270
+ *
29271
+ * @param tai64 - Tai64 timestamp
29272
+ * @returns a new DateTime instance
29273
+ */
29274
+ static fromTai64(tai64) {
29275
+ return new _DateTime(tai64ToUnixMilliseconds(tai64));
29276
+ }
29277
+ /**
29278
+ * @param unixMilliseconds - unix milliseconds timestamp
29279
+ * @returns a new DateTime instance
29280
+ */
29281
+ static fromUnixMilliseconds(unixMilliseconds) {
29282
+ return new _DateTime(unixMilliseconds);
29283
+ }
29284
+ /**
29285
+ * @param unixSeconds - unix seconds timestamp
29286
+ * @returns a new DateTime instance
29287
+ */
29288
+ static fromUnixSeconds(unixSeconds) {
29289
+ return new _DateTime(secondsToMs(unixSeconds));
29290
+ }
29291
+ /**
29292
+ * Hide the constructor to prevent direct instantiation.
29293
+ */
29294
+ constructor(date) {
29295
+ super(date);
29296
+ }
29297
+ /**
29298
+ * Returns the Tai64 timestamp.
29299
+ *
29300
+ * @returns the Tai64 timestamp
29301
+ */
29302
+ toTai64() {
29303
+ return unixSecondsToTai64(this.toUnixSeconds());
29304
+ }
29305
+ /**
29306
+ * @returns the unix milliseconds timestamp
29307
+ */
29308
+ toUnixMilliseconds() {
29309
+ return this.getTime();
29310
+ }
29311
+ /**
29312
+ * @returns the unix seconds timestamp
29313
+ */
29314
+ toUnixSeconds() {
29315
+ return msToSeconds(this.getTime());
29316
+ }
29317
+ };
29318
+ var DateTime = _DateTime;
29319
+ __publicField3(DateTime, "TAI64_NULL", "");
30323
29320
 
30324
29321
  // ../crypto/dist/index.mjs
30325
29322
  var import_crypto9 = __toESM(__require("crypto"), 1);
@@ -32652,10 +31649,10 @@ spurious results.`);
32652
31649
  };
32653
31650
 
32654
31651
  // ../abi-coder/dist/index.mjs
32655
- var __defProp3 = Object.defineProperty;
32656
- var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32657
- var __publicField3 = (obj, key, value) => {
32658
- __defNormalProp3(obj, typeof key !== "symbol" ? key + "" : key, value);
31652
+ var __defProp4 = Object.defineProperty;
31653
+ var __defNormalProp4 = (obj, key, value) => key in obj ? __defProp4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
31654
+ var __publicField4 = (obj, key, value) => {
31655
+ __defNormalProp4(obj, typeof key !== "symbol" ? key + "" : key, value);
32659
31656
  return value;
32660
31657
  };
32661
31658
  var __accessCheck2 = (obj, member, msg) => {
@@ -32685,6 +31682,7 @@ spurious results.`);
32685
31682
  var U16_CODER_TYPE = "u16";
32686
31683
  var U32_CODER_TYPE = "u32";
32687
31684
  var U64_CODER_TYPE = "u64";
31685
+ var U256_CODER_TYPE = "u256";
32688
31686
  var RAW_PTR_CODER_TYPE = "raw untyped ptr";
32689
31687
  var RAW_SLICE_CODER_TYPE = "raw untyped slice";
32690
31688
  var BOOL_CODER_TYPE = "bool";
@@ -32746,14 +31744,18 @@ spurious results.`);
32746
31744
  WORD_SIZE + // Predicate size
32747
31745
  WORD_SIZE + // Predicate data size
32748
31746
  WORD_SIZE;
32749
- var U64Coder = class extends Coder {
32750
- constructor() {
32751
- super("u64", "u64", WORD_SIZE);
31747
+ var encodedLengths = {
31748
+ u64: WORD_SIZE,
31749
+ u256: WORD_SIZE * 4
31750
+ };
31751
+ var BigNumberCoder = class extends Coder {
31752
+ constructor(baseType) {
31753
+ super("bigNumber", baseType, encodedLengths[baseType]);
32752
31754
  }
32753
31755
  encode(value) {
32754
31756
  let bytes4;
32755
31757
  try {
32756
- bytes4 = toBytes3(value, WORD_SIZE);
31758
+ bytes4 = toBytes3(value, this.encodedLength);
32757
31759
  } catch (error) {
32758
31760
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Invalid ${this.type}.`);
32759
31761
  }
@@ -32763,12 +31765,12 @@ spurious results.`);
32763
31765
  if (data.length < this.encodedLength) {
32764
31766
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid ${this.type} data size.`);
32765
31767
  }
32766
- let bytes4 = data.slice(offset, offset + WORD_SIZE);
32767
- bytes4 = bytes4.slice(0, WORD_SIZE);
31768
+ let bytes4 = data.slice(offset, offset + this.encodedLength);
31769
+ bytes4 = bytes4.slice(0, this.encodedLength);
32768
31770
  if (bytes4.length !== this.encodedLength) {
32769
31771
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid ${this.type} byte data size.`);
32770
31772
  }
32771
- return [bn(bytes4), offset + WORD_SIZE];
31773
+ return [bn(bytes4), offset + this.encodedLength];
32772
31774
  }
32773
31775
  };
32774
31776
  var VEC_PROPERTY_SPACE = 3;
@@ -32808,7 +31810,7 @@ spurious results.`);
32808
31810
  let updatedResults = results;
32809
31811
  Object.entries(results.dynamicData).forEach(([pointerIndex, vData]) => {
32810
31812
  const pointerOffset = parseInt(pointerIndex, 10) * WORD_SIZE;
32811
- const adjustedValue = new U64Coder().encode(
31813
+ const adjustedValue = new BigNumberCoder("u64").encode(
32812
31814
  dataOffset + baseOffset + cumulativeDynamicByteLength
32813
31815
  );
32814
31816
  updatedResults.set(adjustedValue, pointerOffset);
@@ -33016,14 +32018,14 @@ spurious results.`);
33016
32018
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
33017
32019
  }
33018
32020
  const parts = [];
33019
- const pointer = new U64Coder().encode(BASE_VECTOR_OFFSET);
32021
+ const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
33020
32022
  const data = __privateMethod2(this, _getPaddedData, getPaddedData_fn).call(this, value);
33021
32023
  pointer.dynamicData = {
33022
32024
  0: concatWithDynamicData([data])
33023
32025
  };
33024
32026
  parts.push(pointer);
33025
- parts.push(new U64Coder().encode(data.byteLength));
33026
- parts.push(new U64Coder().encode(value.length));
32027
+ parts.push(new BigNumberCoder("u64").encode(data.byteLength));
32028
+ parts.push(new BigNumberCoder("u64").encode(value.length));
33027
32029
  return concatWithDynamicData(parts);
33028
32030
  }
33029
32031
  decode(data, offset) {
@@ -33031,7 +32033,7 @@ spurious results.`);
33031
32033
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid byte data size.`);
33032
32034
  }
33033
32035
  const len = data.slice(16, 24);
33034
- const encodedLength = bn(new U64Coder().decode(len, 0)[0]).toNumber();
32036
+ const encodedLength = bn(new BigNumberCoder("u64").decode(len, 0)[0]).toNumber();
33035
32037
  const byteData = data.slice(BASE_VECTOR_OFFSET, BASE_VECTOR_OFFSET + encodedLength);
33036
32038
  if (byteData.length !== encodedLength) {
33037
32039
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid bytes byte data size.`);
@@ -33048,7 +32050,7 @@ spurious results.`);
33048
32050
  }
33049
32051
  return concat(data);
33050
32052
  };
33051
- __publicField3(ByteCoder, "memorySize", 1);
32053
+ __publicField4(ByteCoder, "memorySize", 1);
33052
32054
  var isFullyNativeEnum = (enumCoders) => Object.values(enumCoders).every(
33053
32055
  // @ts-expect-error complicated types
33054
32056
  ({ type: type3, coders }) => type3 === "()" && JSON.stringify(coders) === JSON.stringify([])
@@ -33059,7 +32061,7 @@ spurious results.`);
33059
32061
  #caseIndexCoder;
33060
32062
  #encodedValueSize;
33061
32063
  constructor(name, coders) {
33062
- const caseIndexCoder = new U64Coder();
32064
+ const caseIndexCoder = new BigNumberCoder("u64");
33063
32065
  const encodedValueSize = Object.values(coders).reduce(
33064
32066
  (max2, coder) => Math.max(max2, coder.encodedLength),
33065
32067
  0
@@ -33103,7 +32105,7 @@ spurious results.`);
33103
32105
  }
33104
32106
  let newOffset = offset;
33105
32107
  let decoded;
33106
- [decoded, newOffset] = new U64Coder().decode(data, newOffset);
32108
+ [decoded, newOffset] = new BigNumberCoder("u64").decode(data, newOffset);
33107
32109
  const caseIndex = toNumber2(decoded);
33108
32110
  const caseKey = Object.keys(this.coders)[caseIndex];
33109
32111
  if (!caseKey) {
@@ -33227,12 +32229,14 @@ spurious results.`);
33227
32229
  }
33228
32230
  const parts = [];
33229
32231
  const coder = new NumberCoder("u8", { isSmallBytes: true });
33230
- const pointer = new U64Coder().encode(BASE_RAW_SLICE_OFFSET);
32232
+ const pointer = new BigNumberCoder("u64").encode(
32233
+ BASE_RAW_SLICE_OFFSET
32234
+ );
33231
32235
  pointer.dynamicData = {
33232
32236
  0: concatWithDynamicData(value.map((v) => coder.encode(v)))
33233
32237
  };
33234
32238
  parts.push(pointer);
33235
- parts.push(new U64Coder().encode(value.length));
32239
+ parts.push(new BigNumberCoder("u64").encode(value.length));
33236
32240
  return concatWithDynamicData(parts);
33237
32241
  }
33238
32242
  decode(data, offset) {
@@ -33254,14 +32258,14 @@ spurious results.`);
33254
32258
  }
33255
32259
  encode(value) {
33256
32260
  const parts = [];
33257
- const pointer = new U64Coder().encode(BASE_VECTOR_OFFSET);
32261
+ const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
33258
32262
  const data = __privateMethod2(this, _getPaddedData2, getPaddedData_fn2).call(this, value);
33259
32263
  pointer.dynamicData = {
33260
32264
  0: concatWithDynamicData([data])
33261
32265
  };
33262
32266
  parts.push(pointer);
33263
- parts.push(new U64Coder().encode(data.byteLength));
33264
- parts.push(new U64Coder().encode(value.length));
32267
+ parts.push(new BigNumberCoder("u64").encode(data.byteLength));
32268
+ parts.push(new BigNumberCoder("u64").encode(value.length));
33265
32269
  return concatWithDynamicData(parts);
33266
32270
  }
33267
32271
  decode(data, offset) {
@@ -33269,7 +32273,7 @@ spurious results.`);
33269
32273
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid std string data size.`);
33270
32274
  }
33271
32275
  const len = data.slice(16, 24);
33272
- const encodedLength = bn(new U64Coder().decode(len, 0)[0]).toNumber();
32276
+ const encodedLength = bn(new BigNumberCoder("u64").decode(len, 0)[0]).toNumber();
33273
32277
  const byteData = data.slice(BASE_VECTOR_OFFSET, BASE_VECTOR_OFFSET + encodedLength);
33274
32278
  if (byteData.length !== encodedLength) {
33275
32279
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid std string byte data size.`);
@@ -33287,7 +32291,7 @@ spurious results.`);
33287
32291
  }
33288
32292
  return concat(data);
33289
32293
  };
33290
- __publicField3(StdStringCoder, "memorySize", 1);
32294
+ __publicField4(StdStringCoder, "memorySize", 1);
33291
32295
  var StringCoder = class extends Coder {
33292
32296
  length;
33293
32297
  #paddingLength;
@@ -33415,13 +32419,13 @@ spurious results.`);
33415
32419
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
33416
32420
  }
33417
32421
  const parts = [];
33418
- const pointer = new U64Coder().encode(BASE_VECTOR_OFFSET);
32422
+ const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
33419
32423
  pointer.dynamicData = {
33420
32424
  0: concatWithDynamicData(Array.from(value).map((v) => this.coder.encode(v)))
33421
32425
  };
33422
32426
  parts.push(pointer);
33423
- parts.push(new U64Coder().encode(value.length));
33424
- parts.push(new U64Coder().encode(value.length));
32427
+ parts.push(new BigNumberCoder("u64").encode(value.length));
32428
+ parts.push(new BigNumberCoder("u64").encode(value.length));
33425
32429
  return concatWithDynamicData(parts);
33426
32430
  }
33427
32431
  decode(data, offset) {
@@ -33429,7 +32433,7 @@ spurious results.`);
33429
32433
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid vec data size.`);
33430
32434
  }
33431
32435
  const len = data.slice(16, 24);
33432
- const encodedLength = bn(new U64Coder().decode(len, 0)[0]).toNumber();
32436
+ const encodedLength = bn(new BigNumberCoder("u64").decode(len, 0)[0]).toNumber();
33433
32437
  const vectorRawDataLength = encodedLength * this.coder.encodedLength;
33434
32438
  const vectorRawData = data.slice(BASE_VECTOR_OFFSET, BASE_VECTOR_OFFSET + vectorRawDataLength);
33435
32439
  if (vectorRawData.length !== vectorRawDataLength) {
@@ -33604,7 +32608,9 @@ spurious results.`);
33604
32608
  return new NumberCoder(resolvedAbiType.type, options);
33605
32609
  case U64_CODER_TYPE:
33606
32610
  case RAW_PTR_CODER_TYPE:
33607
- return new U64Coder();
32611
+ return new BigNumberCoder("u64");
32612
+ case U256_CODER_TYPE:
32613
+ return new BigNumberCoder("u256");
33608
32614
  case RAW_SLICE_CODER_TYPE:
33609
32615
  return new RawSliceCoder();
33610
32616
  case BOOL_CODER_TYPE:
@@ -33717,7 +32723,7 @@ spurious results.`);
33717
32723
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
33718
32724
  }
33719
32725
  const bytes4 = new Uint8Array(value);
33720
- const lengthBytes = new U64Coder().encode(value.length);
32726
+ const lengthBytes = new BigNumberCoder("u64").encode(value.length);
33721
32727
  return new Uint8Array([...lengthBytes, ...bytes4]);
33722
32728
  }
33723
32729
  decode(data, offset) {
@@ -33726,7 +32732,7 @@ spurious results.`);
33726
32732
  }
33727
32733
  const offsetAndLength = offset + WORD_SIZE;
33728
32734
  const lengthBytes = data.slice(offset, offsetAndLength);
33729
- const length = bn(new U64Coder().decode(lengthBytes, 0)[0]).toNumber();
32735
+ const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
33730
32736
  const dataBytes = data.slice(offsetAndLength, offsetAndLength + length);
33731
32737
  if (dataBytes.length !== length) {
33732
32738
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid bytes byte data size.`);
@@ -33734,7 +32740,7 @@ spurious results.`);
33734
32740
  return [dataBytes, offsetAndLength + length];
33735
32741
  }
33736
32742
  };
33737
- __publicField3(ByteCoder2, "memorySize", 1);
32743
+ __publicField4(ByteCoder2, "memorySize", 1);
33738
32744
  var isFullyNativeEnum2 = (enumCoders) => Object.values(enumCoders).every(
33739
32745
  // @ts-expect-error complicated types
33740
32746
  ({ type: type3, coders }) => type3 === "()" && JSON.stringify(coders) === JSON.stringify([])
@@ -33745,7 +32751,7 @@ spurious results.`);
33745
32751
  #caseIndexCoder;
33746
32752
  #encodedValueSize;
33747
32753
  constructor(name, coders) {
33748
- const caseIndexCoder = new U64Coder();
32754
+ const caseIndexCoder = new BigNumberCoder("u64");
33749
32755
  const encodedValueSize = Object.values(coders).reduce(
33750
32756
  (max2, coder) => Math.max(max2, coder.encodedLength),
33751
32757
  0
@@ -33786,7 +32792,7 @@ spurious results.`);
33786
32792
  if (data.length < this.#encodedValueSize) {
33787
32793
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid enum data size.`);
33788
32794
  }
33789
- const caseBytes = new U64Coder().decode(data, offset)[0];
32795
+ const caseBytes = new BigNumberCoder("u64").decode(data, offset)[0];
33790
32796
  const caseIndex = toNumber2(caseBytes);
33791
32797
  const caseKey = Object.keys(this.coders)[caseIndex];
33792
32798
  if (!caseKey) {
@@ -33858,7 +32864,7 @@ spurious results.`);
33858
32864
  }
33859
32865
  const internalCoder = new ArrayCoder(new NumberCoder2("u8"), value.length);
33860
32866
  const bytes4 = internalCoder.encode(value);
33861
- const lengthBytes = new U64Coder().encode(bytes4.length);
32867
+ const lengthBytes = new BigNumberCoder("u64").encode(bytes4.length);
33862
32868
  return new Uint8Array([...lengthBytes, ...bytes4]);
33863
32869
  }
33864
32870
  decode(data, offset) {
@@ -33867,7 +32873,7 @@ spurious results.`);
33867
32873
  }
33868
32874
  const offsetAndLength = offset + WORD_SIZE;
33869
32875
  const lengthBytes = data.slice(offset, offsetAndLength);
33870
- const length = bn(new U64Coder().decode(lengthBytes, 0)[0]).toNumber();
32876
+ const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
33871
32877
  const dataBytes = data.slice(offsetAndLength, offsetAndLength + length);
33872
32878
  if (dataBytes.length !== length) {
33873
32879
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid raw slice byte data size.`);
@@ -33883,7 +32889,7 @@ spurious results.`);
33883
32889
  }
33884
32890
  encode(value) {
33885
32891
  const bytes4 = toUtf8Bytes(value);
33886
- const lengthBytes = new U64Coder().encode(value.length);
32892
+ const lengthBytes = new BigNumberCoder("u64").encode(value.length);
33887
32893
  return new Uint8Array([...lengthBytes, ...bytes4]);
33888
32894
  }
33889
32895
  decode(data, offset) {
@@ -33892,7 +32898,7 @@ spurious results.`);
33892
32898
  }
33893
32899
  const offsetAndLength = offset + WORD_SIZE;
33894
32900
  const lengthBytes = data.slice(offset, offsetAndLength);
33895
- const length = bn(new U64Coder().decode(lengthBytes, 0)[0]).toNumber();
32901
+ const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
33896
32902
  const dataBytes = data.slice(offsetAndLength, offsetAndLength + length);
33897
32903
  if (dataBytes.length !== length) {
33898
32904
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid std string byte data size.`);
@@ -33900,7 +32906,7 @@ spurious results.`);
33900
32906
  return [toUtf8String(dataBytes), offsetAndLength + length];
33901
32907
  }
33902
32908
  };
33903
- __publicField3(StdStringCoder2, "memorySize", 1);
32909
+ __publicField4(StdStringCoder2, "memorySize", 1);
33904
32910
  var StringCoder2 = class extends Coder {
33905
32911
  constructor(length) {
33906
32912
  super("string", `str[${length}]`, length);
@@ -34001,7 +33007,7 @@ spurious results.`);
34001
33007
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
34002
33008
  }
34003
33009
  const bytes4 = value.map((v) => this.coder.encode(v));
34004
- const lengthBytes = new U64Coder().encode(value.length);
33010
+ const lengthBytes = new BigNumberCoder("u64").encode(value.length);
34005
33011
  return new Uint8Array([...lengthBytes, ...concatBytes2(bytes4)]);
34006
33012
  }
34007
33013
  decode(data, offset) {
@@ -34010,7 +33016,7 @@ spurious results.`);
34010
33016
  }
34011
33017
  const offsetAndLength = offset + WORD_SIZE;
34012
33018
  const lengthBytes = data.slice(offset, offsetAndLength);
34013
- const length = bn(new U64Coder().decode(lengthBytes, 0)[0]).toNumber();
33019
+ const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
34014
33020
  const dataLength2 = length * this.coder.encodedLength;
34015
33021
  const dataBytes = data.slice(offsetAndLength, offsetAndLength + dataLength2);
34016
33022
  if (dataBytes.length !== dataLength2) {
@@ -34032,7 +33038,9 @@ spurious results.`);
34032
33038
  return new NumberCoder2(resolvedAbiType.type);
34033
33039
  case U64_CODER_TYPE:
34034
33040
  case RAW_PTR_CODER_TYPE:
34035
- return new U64Coder();
33041
+ return new BigNumberCoder("u64");
33042
+ case U256_CODER_TYPE:
33043
+ return new BigNumberCoder("u256");
34036
33044
  case RAW_SLICE_CODER_TYPE:
34037
33045
  return new RawSliceCoder2();
34038
33046
  case BOOL_CODER_TYPE:
@@ -34441,12 +33449,12 @@ spurious results.`);
34441
33449
  parts.push(new B256Coder().encode(value.txID));
34442
33450
  parts.push(new NumberCoder("u8").encode(value.outputIndex));
34443
33451
  parts.push(new B256Coder().encode(value.owner));
34444
- parts.push(new U64Coder().encode(value.amount));
33452
+ parts.push(new BigNumberCoder("u64").encode(value.amount));
34445
33453
  parts.push(new B256Coder().encode(value.assetId));
34446
33454
  parts.push(new TxPointerCoder().encode(value.txPointer));
34447
33455
  parts.push(new NumberCoder("u8").encode(value.witnessIndex));
34448
33456
  parts.push(new NumberCoder("u32").encode(value.maturity));
34449
- parts.push(new U64Coder().encode(value.predicateGasUsed));
33457
+ parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
34450
33458
  parts.push(new NumberCoder("u32").encode(value.predicateLength));
34451
33459
  parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
34452
33460
  parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
@@ -34462,7 +33470,7 @@ spurious results.`);
34462
33470
  const outputIndex = decoded;
34463
33471
  [decoded, o] = new B256Coder().decode(data, o);
34464
33472
  const owner = decoded;
34465
- [decoded, o] = new U64Coder().decode(data, o);
33473
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
34466
33474
  const amount = decoded;
34467
33475
  [decoded, o] = new B256Coder().decode(data, o);
34468
33476
  const assetId = decoded;
@@ -34472,7 +33480,7 @@ spurious results.`);
34472
33480
  const witnessIndex = Number(decoded);
34473
33481
  [decoded, o] = new NumberCoder("u32").decode(data, o);
34474
33482
  const maturity = decoded;
34475
- [decoded, o] = new U64Coder().decode(data, o);
33483
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
34476
33484
  const predicateGasUsed = decoded;
34477
33485
  [decoded, o] = new NumberCoder("u32").decode(data, o);
34478
33486
  const predicateLength = decoded;
@@ -34555,7 +33563,7 @@ spurious results.`);
34555
33563
  parts.push(new ByteArrayCoder(32).encode(value.sender));
34556
33564
  parts.push(new ByteArrayCoder(32).encode(value.recipient));
34557
33565
  parts.push(new ByteArrayCoder(32).encode(value.nonce));
34558
- parts.push(new U64Coder().encode(value.amount));
33566
+ parts.push(new BigNumberCoder("u64").encode(value.amount));
34559
33567
  parts.push(arrayify(value.data || "0x"));
34560
33568
  return sha2562(concat(parts));
34561
33569
  }
@@ -34569,10 +33577,10 @@ spurious results.`);
34569
33577
  const data = InputMessageCoder.encodeData(value.data);
34570
33578
  parts.push(new ByteArrayCoder(32).encode(value.sender));
34571
33579
  parts.push(new ByteArrayCoder(32).encode(value.recipient));
34572
- parts.push(new U64Coder().encode(value.amount));
33580
+ parts.push(new BigNumberCoder("u64").encode(value.amount));
34573
33581
  parts.push(new ByteArrayCoder(32).encode(value.nonce));
34574
33582
  parts.push(new NumberCoder("u8").encode(value.witnessIndex));
34575
- parts.push(new U64Coder().encode(value.predicateGasUsed));
33583
+ parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
34576
33584
  parts.push(new NumberCoder("u32").encode(data.length));
34577
33585
  parts.push(new NumberCoder("u32").encode(value.predicateLength));
34578
33586
  parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
@@ -34594,13 +33602,13 @@ spurious results.`);
34594
33602
  const sender = decoded;
34595
33603
  [decoded, o] = new B256Coder().decode(data, o);
34596
33604
  const recipient = decoded;
34597
- [decoded, o] = new U64Coder().decode(data, o);
33605
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
34598
33606
  const amount = decoded;
34599
33607
  [decoded, o] = new B256Coder().decode(data, o);
34600
33608
  const nonce = decoded;
34601
33609
  [decoded, o] = new NumberCoder("u8").decode(data, o);
34602
33610
  const witnessIndex = Number(decoded);
34603
- [decoded, o] = new U64Coder().decode(data, o);
33611
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
34604
33612
  const predicateGasUsed = decoded;
34605
33613
  [decoded, o] = new NumberCoder("u32").decode(data, o);
34606
33614
  const dataLength2 = decoded;
@@ -34706,7 +33714,7 @@ spurious results.`);
34706
33714
  encode(value) {
34707
33715
  const parts = [];
34708
33716
  parts.push(new B256Coder().encode(value.to));
34709
- parts.push(new U64Coder().encode(value.amount));
33717
+ parts.push(new BigNumberCoder("u64").encode(value.amount));
34710
33718
  parts.push(new B256Coder().encode(value.assetId));
34711
33719
  return concat(parts);
34712
33720
  }
@@ -34715,7 +33723,7 @@ spurious results.`);
34715
33723
  let o = offset;
34716
33724
  [decoded, o] = new B256Coder().decode(data, o);
34717
33725
  const to = decoded;
34718
- [decoded, o] = new U64Coder().decode(data, o);
33726
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
34719
33727
  const amount = decoded;
34720
33728
  [decoded, o] = new B256Coder().decode(data, o);
34721
33729
  const assetId = decoded;
@@ -34768,7 +33776,7 @@ spurious results.`);
34768
33776
  encode(value) {
34769
33777
  const parts = [];
34770
33778
  parts.push(new B256Coder().encode(value.to));
34771
- parts.push(new U64Coder().encode(value.amount));
33779
+ parts.push(new BigNumberCoder("u64").encode(value.amount));
34772
33780
  parts.push(new B256Coder().encode(value.assetId));
34773
33781
  return concat(parts);
34774
33782
  }
@@ -34777,7 +33785,7 @@ spurious results.`);
34777
33785
  let o = offset;
34778
33786
  [decoded, o] = new B256Coder().decode(data, o);
34779
33787
  const to = decoded;
34780
- [decoded, o] = new U64Coder().decode(data, o);
33788
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
34781
33789
  const amount = decoded;
34782
33790
  [decoded, o] = new B256Coder().decode(data, o);
34783
33791
  const assetId = decoded;
@@ -34799,7 +33807,7 @@ spurious results.`);
34799
33807
  encode(value) {
34800
33808
  const parts = [];
34801
33809
  parts.push(new B256Coder().encode(value.to));
34802
- parts.push(new U64Coder().encode(value.amount));
33810
+ parts.push(new BigNumberCoder("u64").encode(value.amount));
34803
33811
  parts.push(new B256Coder().encode(value.assetId));
34804
33812
  return concat(parts);
34805
33813
  }
@@ -34808,7 +33816,7 @@ spurious results.`);
34808
33816
  let o = offset;
34809
33817
  [decoded, o] = new B256Coder().decode(data, o);
34810
33818
  const to = decoded;
34811
- [decoded, o] = new U64Coder().decode(data, o);
33819
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
34812
33820
  const amount = decoded;
34813
33821
  [decoded, o] = new B256Coder().decode(data, o);
34814
33822
  const assetId = decoded;
@@ -34956,7 +33964,7 @@ spurious results.`);
34956
33964
  case 8:
34957
33965
  case 1:
34958
33966
  case 2:
34959
- parts.push(new U64Coder().encode(data));
33967
+ parts.push(new BigNumberCoder("u64").encode(data));
34960
33968
  break;
34961
33969
  case 4:
34962
33970
  parts.push(new NumberCoder("u32").encode(data));
@@ -34972,12 +33980,12 @@ spurious results.`);
34972
33980
  let o = offset;
34973
33981
  const policies = [];
34974
33982
  if (policyTypes & 1) {
34975
- const [gasPrice, nextOffset] = new U64Coder().decode(data, o);
33983
+ const [gasPrice, nextOffset] = new BigNumberCoder("u64").decode(data, o);
34976
33984
  o = nextOffset;
34977
33985
  policies.push({ type: 1, data: gasPrice });
34978
33986
  }
34979
33987
  if (policyTypes & 2) {
34980
- const [witnessLimit, nextOffset] = new U64Coder().decode(data, o);
33988
+ const [witnessLimit, nextOffset] = new BigNumberCoder("u64").decode(data, o);
34981
33989
  o = nextOffset;
34982
33990
  policies.push({ type: 2, data: witnessLimit });
34983
33991
  }
@@ -34987,7 +33995,7 @@ spurious results.`);
34987
33995
  policies.push({ type: 4, data: maturity });
34988
33996
  }
34989
33997
  if (policyTypes & 8) {
34990
- const [maxFee, nextOffset] = new U64Coder().decode(data, o);
33998
+ const [maxFee, nextOffset] = new BigNumberCoder("u64").decode(data, o);
34991
33999
  o = nextOffset;
34992
34000
  policies.push({ type: 8, data: maxFee });
34993
34001
  }
@@ -35019,7 +34027,7 @@ spurious results.`);
35019
34027
  parts.push(new ByteArrayCoder(32).encode(value.sender));
35020
34028
  parts.push(new ByteArrayCoder(32).encode(value.recipient));
35021
34029
  parts.push(new ByteArrayCoder(32).encode(value.nonce));
35022
- parts.push(new U64Coder().encode(value.amount));
34030
+ parts.push(new BigNumberCoder("u64").encode(value.amount));
35023
34031
  parts.push(arrayify(value.data || "0x"));
35024
34032
  return sha2562(concat(parts));
35025
34033
  }
@@ -35027,7 +34035,7 @@ spurious results.`);
35027
34035
  const parts = [];
35028
34036
  parts.push(new B256Coder().encode(value.sender));
35029
34037
  parts.push(new B256Coder().encode(value.recipient));
35030
- parts.push(new U64Coder().encode(value.amount));
34038
+ parts.push(new BigNumberCoder("u64").encode(value.amount));
35031
34039
  parts.push(new B256Coder().encode(value.nonce));
35032
34040
  parts.push(new NumberCoder("u16").encode(value.data.length));
35033
34041
  parts.push(new B256Coder().encode(value.digest));
@@ -35041,7 +34049,7 @@ spurious results.`);
35041
34049
  const sender = decoded;
35042
34050
  [decoded, o] = new B256Coder().decode(data, o);
35043
34051
  const recipient = decoded;
35044
- [decoded, o] = new U64Coder().decode(data, o);
34052
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
35045
34053
  const amount = decoded;
35046
34054
  [decoded, o] = new B256Coder().decode(data, o);
35047
34055
  const nonce = decoded;
@@ -35081,9 +34089,9 @@ spurious results.`);
35081
34089
  const parts = [];
35082
34090
  parts.push(new B256Coder().encode(value.subId));
35083
34091
  parts.push(new B256Coder().encode(value.contractId));
35084
- parts.push(new U64Coder().encode(value.val));
35085
- parts.push(new U64Coder().encode(value.pc));
35086
- parts.push(new U64Coder().encode(value.is));
34092
+ parts.push(new BigNumberCoder("u64").encode(value.val));
34093
+ parts.push(new BigNumberCoder("u64").encode(value.pc));
34094
+ parts.push(new BigNumberCoder("u64").encode(value.is));
35087
34095
  return concat(parts);
35088
34096
  }
35089
34097
  decode(data, offset) {
@@ -35093,11 +34101,11 @@ spurious results.`);
35093
34101
  const subId = decoded;
35094
34102
  [decoded, o] = new B256Coder().decode(data, o);
35095
34103
  const contractId = decoded;
35096
- [decoded, o] = new U64Coder().decode(data, o);
34104
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
35097
34105
  const val = decoded;
35098
- [decoded, o] = new U64Coder().decode(data, o);
34106
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
35099
34107
  const pc = decoded;
35100
- [decoded, o] = new U64Coder().decode(data, o);
34108
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
35101
34109
  const is = decoded;
35102
34110
  const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
35103
34111
  const receiptMint = {
@@ -35123,9 +34131,9 @@ spurious results.`);
35123
34131
  const parts = [];
35124
34132
  parts.push(new B256Coder().encode(value.subId));
35125
34133
  parts.push(new B256Coder().encode(value.contractId));
35126
- parts.push(new U64Coder().encode(value.val));
35127
- parts.push(new U64Coder().encode(value.pc));
35128
- parts.push(new U64Coder().encode(value.is));
34134
+ parts.push(new BigNumberCoder("u64").encode(value.val));
34135
+ parts.push(new BigNumberCoder("u64").encode(value.pc));
34136
+ parts.push(new BigNumberCoder("u64").encode(value.is));
35129
34137
  return concat(parts);
35130
34138
  }
35131
34139
  decode(data, offset) {
@@ -35135,11 +34143,11 @@ spurious results.`);
35135
34143
  const subId = decoded;
35136
34144
  [decoded, o] = new B256Coder().decode(data, o);
35137
34145
  const contractId = decoded;
35138
- [decoded, o] = new U64Coder().decode(data, o);
34146
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
35139
34147
  const val = decoded;
35140
- [decoded, o] = new U64Coder().decode(data, o);
34148
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
35141
34149
  const pc = decoded;
35142
- [decoded, o] = new U64Coder().decode(data, o);
34150
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
35143
34151
  const is = decoded;
35144
34152
  const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
35145
34153
  const receiptBurn = {
@@ -35205,7 +34213,7 @@ spurious results.`);
35205
34213
  }
35206
34214
  encode(value) {
35207
34215
  const parts = [];
35208
- parts.push(new U64Coder().encode(value.scriptGasLimit));
34216
+ parts.push(new BigNumberCoder("u64").encode(value.scriptGasLimit));
35209
34217
  parts.push(new NumberCoder("u32").encode(value.scriptLength));
35210
34218
  parts.push(new NumberCoder("u32").encode(value.scriptDataLength));
35211
34219
  parts.push(new NumberCoder("u32").encode(value.policyTypes));
@@ -35224,7 +34232,7 @@ spurious results.`);
35224
34232
  decode(data, offset) {
35225
34233
  let decoded;
35226
34234
  let o = offset;
35227
- [decoded, o] = new U64Coder().decode(data, o);
34235
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
35228
34236
  const scriptGasLimit = decoded;
35229
34237
  [decoded, o] = new NumberCoder("u32").decode(data, o);
35230
34238
  const scriptLength = decoded;
@@ -35356,7 +34364,7 @@ spurious results.`);
35356
34364
  parts.push(new TxPointerCoder().encode(value.txPointer));
35357
34365
  parts.push(new InputContractCoder().encode(value.inputContract));
35358
34366
  parts.push(new OutputContractCoder().encode(value.outputContract));
35359
- parts.push(new U64Coder().encode(value.mintAmount));
34367
+ parts.push(new BigNumberCoder("u64").encode(value.mintAmount));
35360
34368
  parts.push(new B256Coder().encode(value.mintAssetId));
35361
34369
  return concat(parts);
35362
34370
  }
@@ -35369,7 +34377,7 @@ spurious results.`);
35369
34377
  const inputContract = decoded;
35370
34378
  [decoded, o] = new OutputContractCoder().decode(data, o);
35371
34379
  const outputContract = decoded;
35372
- [decoded, o] = new U64Coder().decode(data, o);
34380
+ [decoded, o] = new BigNumberCoder("u64").decode(data, o);
35373
34381
  const mintAmount = decoded;
35374
34382
  [decoded, o] = new B256Coder().decode(data, o);
35375
34383
  const mintAssetId = decoded;
@@ -40429,10 +39437,6 @@ ${MessageCoinFragmentFragmentDoc}`;
40429
39437
  });
40430
39438
  }
40431
39439
 
40432
- // src/providers/utils/time.ts
40433
- var fromTai64ToUnix = (tai64Timestamp) => Number(BigInt(tai64Timestamp) - BigInt(2 ** 62) - BigInt(10));
40434
- var fromUnixToTai64 = (unixTimestampMs) => (BigInt(unixTimestampMs) + BigInt(2 ** 62) + BigInt(10)).toString();
40435
-
40436
39440
  // src/providers/transaction-request/errors.ts
40437
39441
  var ChangeOutputCollisionError = class extends Error {
40438
39442
  name = "ChangeOutputCollisionError";
@@ -41432,14 +40436,6 @@ ${MessageCoinFragmentFragmentDoc}`;
41432
40436
  };
41433
40437
  };
41434
40438
 
41435
- // src/providers/transaction-summary/date.ts
41436
- var import_tai64 = __toESM(require_lib2());
41437
- var fromTai64ToDate = (tai64Timestamp) => {
41438
- const timestamp = import_tai64.TAI64.fromString(tai64Timestamp, 10).toUnix();
41439
- return new Date(timestamp * 1e3);
41440
- };
41441
- var fromDateToTai64 = (date) => import_tai64.TAI64.fromUnix(Math.floor(date.getTime() / 1e3)).toString(10);
41442
-
41443
40439
  // src/providers/transaction-summary/call.ts
41444
40440
  var getFunctionCall = ({ abi, receipt, rawPayload, maxInputs }) => {
41445
40441
  const abiInterface = new Interface(abi);
@@ -42067,7 +41063,7 @@ ${MessageCoinFragmentFragmentDoc}`;
42067
41063
  const burnedAssets = extractBurnedAssetsFromReceipts(receipts);
42068
41064
  let date;
42069
41065
  if (time) {
42070
- date = fromTai64ToDate(time);
41066
+ date = DateTime.fromTai64(time);
42071
41067
  }
42072
41068
  const transactionSummary = {
42073
41069
  id,
@@ -42246,7 +41242,9 @@ ${MessageCoinFragmentFragmentDoc}`;
42246
41242
  logs.push(abiInterface.decodeLog(r.data, r.val1.toNumber(), r.id)[0]);
42247
41243
  }
42248
41244
  if (r.type === ReceiptType.Log) {
42249
- logs.push(abiInterface.decodeLog(new U64Coder().encode(r.val0), r.val1.toNumber(), r.id)[0]);
41245
+ logs.push(
41246
+ abiInterface.decodeLog(new BigNumberCoder("u64").encode(r.val0), r.val1.toNumber(), r.id)[0]
41247
+ );
42250
41248
  }
42251
41249
  return logs;
42252
41250
  }, []);
@@ -43184,13 +42182,13 @@ ${MessageCoinFragmentFragmentDoc}`;
43184
42182
  * Lets you produce blocks with custom timestamps and the block number of the last block produced.
43185
42183
  *
43186
42184
  * @param amount - The amount of blocks to produce
43187
- * @param startTime - The UNIX timestamp to set for the first produced block
42185
+ * @param startTime - The UNIX timestamp (milliseconds) to set for the first produced block
43188
42186
  * @returns A promise that resolves to the block number of the last produced block.
43189
42187
  */
43190
42188
  async produceBlocks(amount, startTime) {
43191
42189
  const { produceBlocks: latestBlockHeight } = await this.operations.produceBlocks({
43192
42190
  blocksToProduce: bn(amount).toString(10),
43193
- startTimestamp: startTime ? fromUnixToTai64(startTime) : void 0
42191
+ startTimestamp: startTime ? DateTime.fromUnixMilliseconds(startTime).toTai64() : void 0
43194
42192
  });
43195
42193
  return bn(latestBlockHeight);
43196
42194
  }
@@ -43431,7 +42429,7 @@ ${MessageCoinFragmentFragmentDoc}`;
43431
42429
  var asm = __toESM(require_node());
43432
42430
  var formatTransferToContractScriptData = (params) => {
43433
42431
  const { assetId, amountToTransfer, hexlifiedContractId } = params;
43434
- const numberCoder = new U64Coder();
42432
+ const numberCoder = new BigNumberCoder("u64");
43435
42433
  const encoded = numberCoder.encode(new BN(amountToTransfer).toNumber());
43436
42434
  const scriptData = Uint8Array.from([
43437
42435
  ...arrayify(hexlifiedContractId),