@trustwallet/wallet-core 4.3.13 → 4.3.14

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.
@@ -10545,6 +10545,193 @@ export namespace TW {
10545
10545
  }
10546
10546
  }
10547
10547
 
10548
+ /** Namespace Biz. */
10549
+ namespace Biz {
10550
+
10551
+ /** Namespace Proto. */
10552
+ namespace Proto {
10553
+
10554
+ /** Properties of an ExecuteWithPasskeySessionInput. */
10555
+ interface IExecuteWithPasskeySessionInput {
10556
+
10557
+ /** ExecuteWithPasskeySessionInput executions */
10558
+ executions?: (TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution[]|null);
10559
+
10560
+ /** ExecuteWithPasskeySessionInput validAfter */
10561
+ validAfter?: (Long|null);
10562
+
10563
+ /** ExecuteWithPasskeySessionInput validUntil */
10564
+ validUntil?: (Long|null);
10565
+
10566
+ /** ExecuteWithPasskeySessionInput passkeySignature */
10567
+ passkeySignature?: (Uint8Array|null);
10568
+ }
10569
+
10570
+ /** Represents an ExecuteWithPasskeySessionInput. */
10571
+ class ExecuteWithPasskeySessionInput implements IExecuteWithPasskeySessionInput {
10572
+
10573
+ /**
10574
+ * Constructs a new ExecuteWithPasskeySessionInput.
10575
+ * @param [properties] Properties to set
10576
+ */
10577
+ constructor(properties?: TW.Biz.Proto.IExecuteWithPasskeySessionInput);
10578
+
10579
+ /** ExecuteWithPasskeySessionInput executions. */
10580
+ public executions: TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution[];
10581
+
10582
+ /** ExecuteWithPasskeySessionInput validAfter. */
10583
+ public validAfter: Long;
10584
+
10585
+ /** ExecuteWithPasskeySessionInput validUntil. */
10586
+ public validUntil: Long;
10587
+
10588
+ /** ExecuteWithPasskeySessionInput passkeySignature. */
10589
+ public passkeySignature: Uint8Array;
10590
+
10591
+ /**
10592
+ * Creates a new ExecuteWithPasskeySessionInput instance using the specified properties.
10593
+ * @param [properties] Properties to set
10594
+ * @returns ExecuteWithPasskeySessionInput instance
10595
+ */
10596
+ public static create(properties?: TW.Biz.Proto.IExecuteWithPasskeySessionInput): TW.Biz.Proto.ExecuteWithPasskeySessionInput;
10597
+
10598
+ /**
10599
+ * Encodes the specified ExecuteWithPasskeySessionInput message. Does not implicitly {@link TW.Biz.Proto.ExecuteWithPasskeySessionInput.verify|verify} messages.
10600
+ * @param message ExecuteWithPasskeySessionInput message or plain object to encode
10601
+ * @param [writer] Writer to encode to
10602
+ * @returns Writer
10603
+ */
10604
+ public static encode(message: TW.Biz.Proto.IExecuteWithPasskeySessionInput, writer?: $protobuf.Writer): $protobuf.Writer;
10605
+
10606
+ /**
10607
+ * Decodes an ExecuteWithPasskeySessionInput message from the specified reader or buffer.
10608
+ * @param reader Reader or buffer to decode from
10609
+ * @param [length] Message length if known beforehand
10610
+ * @returns ExecuteWithPasskeySessionInput
10611
+ * @throws {Error} If the payload is not a reader or valid buffer
10612
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10613
+ */
10614
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Biz.Proto.ExecuteWithPasskeySessionInput;
10615
+
10616
+ /**
10617
+ * Verifies an ExecuteWithPasskeySessionInput message.
10618
+ * @param message Plain object to verify
10619
+ * @returns `null` if valid, otherwise the reason why it is not
10620
+ */
10621
+ public static verify(message: { [k: string]: any }): (string|null);
10622
+
10623
+ /**
10624
+ * Creates an ExecuteWithPasskeySessionInput message from a plain object. Also converts values to their respective internal types.
10625
+ * @param object Plain object
10626
+ * @returns ExecuteWithPasskeySessionInput
10627
+ */
10628
+ public static fromObject(object: { [k: string]: any }): TW.Biz.Proto.ExecuteWithPasskeySessionInput;
10629
+
10630
+ /**
10631
+ * Creates a plain object from an ExecuteWithPasskeySessionInput message. Also converts values to other types if specified.
10632
+ * @param message ExecuteWithPasskeySessionInput
10633
+ * @param [options] Conversion options
10634
+ * @returns Plain object
10635
+ */
10636
+ public static toObject(message: TW.Biz.Proto.ExecuteWithPasskeySessionInput, options?: $protobuf.IConversionOptions): { [k: string]: any };
10637
+
10638
+ /**
10639
+ * Converts this ExecuteWithPasskeySessionInput to JSON.
10640
+ * @returns JSON object
10641
+ */
10642
+ public toJSON(): { [k: string]: any };
10643
+ }
10644
+
10645
+ namespace ExecuteWithPasskeySessionInput {
10646
+
10647
+ /** Properties of an Execution. */
10648
+ interface IExecution {
10649
+
10650
+ /** Execution address */
10651
+ address?: (string|null);
10652
+
10653
+ /** Execution amount */
10654
+ amount?: (Uint8Array|null);
10655
+
10656
+ /** Execution payload */
10657
+ payload?: (Uint8Array|null);
10658
+ }
10659
+
10660
+ /** Represents an Execution. */
10661
+ class Execution implements IExecution {
10662
+
10663
+ /**
10664
+ * Constructs a new Execution.
10665
+ * @param [properties] Properties to set
10666
+ */
10667
+ constructor(properties?: TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution);
10668
+
10669
+ /** Execution address. */
10670
+ public address: string;
10671
+
10672
+ /** Execution amount. */
10673
+ public amount: Uint8Array;
10674
+
10675
+ /** Execution payload. */
10676
+ public payload: Uint8Array;
10677
+
10678
+ /**
10679
+ * Creates a new Execution instance using the specified properties.
10680
+ * @param [properties] Properties to set
10681
+ * @returns Execution instance
10682
+ */
10683
+ public static create(properties?: TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution): TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution;
10684
+
10685
+ /**
10686
+ * Encodes the specified Execution message. Does not implicitly {@link TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution.verify|verify} messages.
10687
+ * @param message Execution message or plain object to encode
10688
+ * @param [writer] Writer to encode to
10689
+ * @returns Writer
10690
+ */
10691
+ public static encode(message: TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution, writer?: $protobuf.Writer): $protobuf.Writer;
10692
+
10693
+ /**
10694
+ * Decodes an Execution message from the specified reader or buffer.
10695
+ * @param reader Reader or buffer to decode from
10696
+ * @param [length] Message length if known beforehand
10697
+ * @returns Execution
10698
+ * @throws {Error} If the payload is not a reader or valid buffer
10699
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10700
+ */
10701
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution;
10702
+
10703
+ /**
10704
+ * Verifies an Execution message.
10705
+ * @param message Plain object to verify
10706
+ * @returns `null` if valid, otherwise the reason why it is not
10707
+ */
10708
+ public static verify(message: { [k: string]: any }): (string|null);
10709
+
10710
+ /**
10711
+ * Creates an Execution message from a plain object. Also converts values to their respective internal types.
10712
+ * @param object Plain object
10713
+ * @returns Execution
10714
+ */
10715
+ public static fromObject(object: { [k: string]: any }): TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution;
10716
+
10717
+ /**
10718
+ * Creates a plain object from an Execution message. Also converts values to other types if specified.
10719
+ * @param message Execution
10720
+ * @param [options] Conversion options
10721
+ * @returns Plain object
10722
+ */
10723
+ public static toObject(message: TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution, options?: $protobuf.IConversionOptions): { [k: string]: any };
10724
+
10725
+ /**
10726
+ * Converts this Execution to JSON.
10727
+ * @returns JSON object
10728
+ */
10729
+ public toJSON(): { [k: string]: any };
10730
+ }
10731
+ }
10732
+ }
10733
+ }
10734
+
10548
10735
  /** Namespace Cardano. */
10549
10736
  namespace Cardano {
10550
10737
 
@@ -31642,6 +31642,535 @@
31642
31642
  return Zcash;
31643
31643
  })();
31644
31644
 
31645
+ TW.Biz = (function() {
31646
+
31647
+ /**
31648
+ * Namespace Biz.
31649
+ * @memberof TW
31650
+ * @namespace
31651
+ */
31652
+ var Biz = {};
31653
+
31654
+ Biz.Proto = (function() {
31655
+
31656
+ /**
31657
+ * Namespace Proto.
31658
+ * @memberof TW.Biz
31659
+ * @namespace
31660
+ */
31661
+ var Proto = {};
31662
+
31663
+ Proto.ExecuteWithPasskeySessionInput = (function() {
31664
+
31665
+ /**
31666
+ * Properties of an ExecuteWithPasskeySessionInput.
31667
+ * @memberof TW.Biz.Proto
31668
+ * @interface IExecuteWithPasskeySessionInput
31669
+ * @property {Array.<TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution>|null} [executions] ExecuteWithPasskeySessionInput executions
31670
+ * @property {Long|null} [validAfter] ExecuteWithPasskeySessionInput validAfter
31671
+ * @property {Long|null} [validUntil] ExecuteWithPasskeySessionInput validUntil
31672
+ * @property {Uint8Array|null} [passkeySignature] ExecuteWithPasskeySessionInput passkeySignature
31673
+ */
31674
+
31675
+ /**
31676
+ * Constructs a new ExecuteWithPasskeySessionInput.
31677
+ * @memberof TW.Biz.Proto
31678
+ * @classdesc Represents an ExecuteWithPasskeySessionInput.
31679
+ * @implements IExecuteWithPasskeySessionInput
31680
+ * @constructor
31681
+ * @param {TW.Biz.Proto.IExecuteWithPasskeySessionInput=} [properties] Properties to set
31682
+ */
31683
+ function ExecuteWithPasskeySessionInput(properties) {
31684
+ this.executions = [];
31685
+ if (properties)
31686
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
31687
+ if (properties[keys[i]] != null)
31688
+ this[keys[i]] = properties[keys[i]];
31689
+ }
31690
+
31691
+ /**
31692
+ * ExecuteWithPasskeySessionInput executions.
31693
+ * @member {Array.<TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution>} executions
31694
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31695
+ * @instance
31696
+ */
31697
+ ExecuteWithPasskeySessionInput.prototype.executions = $util.emptyArray;
31698
+
31699
+ /**
31700
+ * ExecuteWithPasskeySessionInput validAfter.
31701
+ * @member {Long} validAfter
31702
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31703
+ * @instance
31704
+ */
31705
+ ExecuteWithPasskeySessionInput.prototype.validAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
31706
+
31707
+ /**
31708
+ * ExecuteWithPasskeySessionInput validUntil.
31709
+ * @member {Long} validUntil
31710
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31711
+ * @instance
31712
+ */
31713
+ ExecuteWithPasskeySessionInput.prototype.validUntil = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
31714
+
31715
+ /**
31716
+ * ExecuteWithPasskeySessionInput passkeySignature.
31717
+ * @member {Uint8Array} passkeySignature
31718
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31719
+ * @instance
31720
+ */
31721
+ ExecuteWithPasskeySessionInput.prototype.passkeySignature = $util.newBuffer([]);
31722
+
31723
+ /**
31724
+ * Creates a new ExecuteWithPasskeySessionInput instance using the specified properties.
31725
+ * @function create
31726
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31727
+ * @static
31728
+ * @param {TW.Biz.Proto.IExecuteWithPasskeySessionInput=} [properties] Properties to set
31729
+ * @returns {TW.Biz.Proto.ExecuteWithPasskeySessionInput} ExecuteWithPasskeySessionInput instance
31730
+ */
31731
+ ExecuteWithPasskeySessionInput.create = function create(properties) {
31732
+ return new ExecuteWithPasskeySessionInput(properties);
31733
+ };
31734
+
31735
+ /**
31736
+ * Encodes the specified ExecuteWithPasskeySessionInput message. Does not implicitly {@link TW.Biz.Proto.ExecuteWithPasskeySessionInput.verify|verify} messages.
31737
+ * @function encode
31738
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31739
+ * @static
31740
+ * @param {TW.Biz.Proto.IExecuteWithPasskeySessionInput} message ExecuteWithPasskeySessionInput message or plain object to encode
31741
+ * @param {$protobuf.Writer} [writer] Writer to encode to
31742
+ * @returns {$protobuf.Writer} Writer
31743
+ */
31744
+ ExecuteWithPasskeySessionInput.encode = function encode(message, writer) {
31745
+ if (!writer)
31746
+ writer = $Writer.create();
31747
+ if (message.executions != null && message.executions.length)
31748
+ for (var i = 0; i < message.executions.length; ++i)
31749
+ $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution.encode(message.executions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
31750
+ if (message.validAfter != null && Object.hasOwnProperty.call(message, "validAfter"))
31751
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.validAfter);
31752
+ if (message.validUntil != null && Object.hasOwnProperty.call(message, "validUntil"))
31753
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.validUntil);
31754
+ if (message.passkeySignature != null && Object.hasOwnProperty.call(message, "passkeySignature"))
31755
+ writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.passkeySignature);
31756
+ return writer;
31757
+ };
31758
+
31759
+ /**
31760
+ * Decodes an ExecuteWithPasskeySessionInput message from the specified reader or buffer.
31761
+ * @function decode
31762
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31763
+ * @static
31764
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
31765
+ * @param {number} [length] Message length if known beforehand
31766
+ * @returns {TW.Biz.Proto.ExecuteWithPasskeySessionInput} ExecuteWithPasskeySessionInput
31767
+ * @throws {Error} If the payload is not a reader or valid buffer
31768
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
31769
+ */
31770
+ ExecuteWithPasskeySessionInput.decode = function decode(reader, length) {
31771
+ if (!(reader instanceof $Reader))
31772
+ reader = $Reader.create(reader);
31773
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput();
31774
+ while (reader.pos < end) {
31775
+ var tag = reader.uint32();
31776
+ switch (tag >>> 3) {
31777
+ case 1:
31778
+ if (!(message.executions && message.executions.length))
31779
+ message.executions = [];
31780
+ message.executions.push($root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution.decode(reader, reader.uint32()));
31781
+ break;
31782
+ case 2:
31783
+ message.validAfter = reader.uint64();
31784
+ break;
31785
+ case 3:
31786
+ message.validUntil = reader.uint64();
31787
+ break;
31788
+ case 4:
31789
+ message.passkeySignature = reader.bytes();
31790
+ break;
31791
+ default:
31792
+ reader.skipType(tag & 7);
31793
+ break;
31794
+ }
31795
+ }
31796
+ return message;
31797
+ };
31798
+
31799
+ /**
31800
+ * Verifies an ExecuteWithPasskeySessionInput message.
31801
+ * @function verify
31802
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31803
+ * @static
31804
+ * @param {Object.<string,*>} message Plain object to verify
31805
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
31806
+ */
31807
+ ExecuteWithPasskeySessionInput.verify = function verify(message) {
31808
+ if (typeof message !== "object" || message === null)
31809
+ return "object expected";
31810
+ if (message.executions != null && message.hasOwnProperty("executions")) {
31811
+ if (!Array.isArray(message.executions))
31812
+ return "executions: array expected";
31813
+ for (var i = 0; i < message.executions.length; ++i) {
31814
+ var error = $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution.verify(message.executions[i]);
31815
+ if (error)
31816
+ return "executions." + error;
31817
+ }
31818
+ }
31819
+ if (message.validAfter != null && message.hasOwnProperty("validAfter"))
31820
+ if (!$util.isInteger(message.validAfter) && !(message.validAfter && $util.isInteger(message.validAfter.low) && $util.isInteger(message.validAfter.high)))
31821
+ return "validAfter: integer|Long expected";
31822
+ if (message.validUntil != null && message.hasOwnProperty("validUntil"))
31823
+ if (!$util.isInteger(message.validUntil) && !(message.validUntil && $util.isInteger(message.validUntil.low) && $util.isInteger(message.validUntil.high)))
31824
+ return "validUntil: integer|Long expected";
31825
+ if (message.passkeySignature != null && message.hasOwnProperty("passkeySignature"))
31826
+ if (!(message.passkeySignature && typeof message.passkeySignature.length === "number" || $util.isString(message.passkeySignature)))
31827
+ return "passkeySignature: buffer expected";
31828
+ return null;
31829
+ };
31830
+
31831
+ /**
31832
+ * Creates an ExecuteWithPasskeySessionInput message from a plain object. Also converts values to their respective internal types.
31833
+ * @function fromObject
31834
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31835
+ * @static
31836
+ * @param {Object.<string,*>} object Plain object
31837
+ * @returns {TW.Biz.Proto.ExecuteWithPasskeySessionInput} ExecuteWithPasskeySessionInput
31838
+ */
31839
+ ExecuteWithPasskeySessionInput.fromObject = function fromObject(object) {
31840
+ if (object instanceof $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput)
31841
+ return object;
31842
+ var message = new $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput();
31843
+ if (object.executions) {
31844
+ if (!Array.isArray(object.executions))
31845
+ throw TypeError(".TW.Biz.Proto.ExecuteWithPasskeySessionInput.executions: array expected");
31846
+ message.executions = [];
31847
+ for (var i = 0; i < object.executions.length; ++i) {
31848
+ if (typeof object.executions[i] !== "object")
31849
+ throw TypeError(".TW.Biz.Proto.ExecuteWithPasskeySessionInput.executions: object expected");
31850
+ message.executions[i] = $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution.fromObject(object.executions[i]);
31851
+ }
31852
+ }
31853
+ if (object.validAfter != null)
31854
+ if ($util.Long)
31855
+ (message.validAfter = $util.Long.fromValue(object.validAfter)).unsigned = true;
31856
+ else if (typeof object.validAfter === "string")
31857
+ message.validAfter = parseInt(object.validAfter, 10);
31858
+ else if (typeof object.validAfter === "number")
31859
+ message.validAfter = object.validAfter;
31860
+ else if (typeof object.validAfter === "object")
31861
+ message.validAfter = new $util.LongBits(object.validAfter.low >>> 0, object.validAfter.high >>> 0).toNumber(true);
31862
+ if (object.validUntil != null)
31863
+ if ($util.Long)
31864
+ (message.validUntil = $util.Long.fromValue(object.validUntil)).unsigned = true;
31865
+ else if (typeof object.validUntil === "string")
31866
+ message.validUntil = parseInt(object.validUntil, 10);
31867
+ else if (typeof object.validUntil === "number")
31868
+ message.validUntil = object.validUntil;
31869
+ else if (typeof object.validUntil === "object")
31870
+ message.validUntil = new $util.LongBits(object.validUntil.low >>> 0, object.validUntil.high >>> 0).toNumber(true);
31871
+ if (object.passkeySignature != null)
31872
+ if (typeof object.passkeySignature === "string")
31873
+ $util.base64.decode(object.passkeySignature, message.passkeySignature = $util.newBuffer($util.base64.length(object.passkeySignature)), 0);
31874
+ else if (object.passkeySignature.length)
31875
+ message.passkeySignature = object.passkeySignature;
31876
+ return message;
31877
+ };
31878
+
31879
+ /**
31880
+ * Creates a plain object from an ExecuteWithPasskeySessionInput message. Also converts values to other types if specified.
31881
+ * @function toObject
31882
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31883
+ * @static
31884
+ * @param {TW.Biz.Proto.ExecuteWithPasskeySessionInput} message ExecuteWithPasskeySessionInput
31885
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
31886
+ * @returns {Object.<string,*>} Plain object
31887
+ */
31888
+ ExecuteWithPasskeySessionInput.toObject = function toObject(message, options) {
31889
+ if (!options)
31890
+ options = {};
31891
+ var object = {};
31892
+ if (options.arrays || options.defaults)
31893
+ object.executions = [];
31894
+ if (options.defaults) {
31895
+ if ($util.Long) {
31896
+ var long = new $util.Long(0, 0, true);
31897
+ object.validAfter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
31898
+ } else
31899
+ object.validAfter = options.longs === String ? "0" : 0;
31900
+ if ($util.Long) {
31901
+ var long = new $util.Long(0, 0, true);
31902
+ object.validUntil = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
31903
+ } else
31904
+ object.validUntil = options.longs === String ? "0" : 0;
31905
+ if (options.bytes === String)
31906
+ object.passkeySignature = "";
31907
+ else {
31908
+ object.passkeySignature = [];
31909
+ if (options.bytes !== Array)
31910
+ object.passkeySignature = $util.newBuffer(object.passkeySignature);
31911
+ }
31912
+ }
31913
+ if (message.executions && message.executions.length) {
31914
+ object.executions = [];
31915
+ for (var j = 0; j < message.executions.length; ++j)
31916
+ object.executions[j] = $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution.toObject(message.executions[j], options);
31917
+ }
31918
+ if (message.validAfter != null && message.hasOwnProperty("validAfter"))
31919
+ if (typeof message.validAfter === "number")
31920
+ object.validAfter = options.longs === String ? String(message.validAfter) : message.validAfter;
31921
+ else
31922
+ object.validAfter = options.longs === String ? $util.Long.prototype.toString.call(message.validAfter) : options.longs === Number ? new $util.LongBits(message.validAfter.low >>> 0, message.validAfter.high >>> 0).toNumber(true) : message.validAfter;
31923
+ if (message.validUntil != null && message.hasOwnProperty("validUntil"))
31924
+ if (typeof message.validUntil === "number")
31925
+ object.validUntil = options.longs === String ? String(message.validUntil) : message.validUntil;
31926
+ else
31927
+ object.validUntil = options.longs === String ? $util.Long.prototype.toString.call(message.validUntil) : options.longs === Number ? new $util.LongBits(message.validUntil.low >>> 0, message.validUntil.high >>> 0).toNumber(true) : message.validUntil;
31928
+ if (message.passkeySignature != null && message.hasOwnProperty("passkeySignature"))
31929
+ object.passkeySignature = options.bytes === String ? $util.base64.encode(message.passkeySignature, 0, message.passkeySignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.passkeySignature) : message.passkeySignature;
31930
+ return object;
31931
+ };
31932
+
31933
+ /**
31934
+ * Converts this ExecuteWithPasskeySessionInput to JSON.
31935
+ * @function toJSON
31936
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31937
+ * @instance
31938
+ * @returns {Object.<string,*>} JSON object
31939
+ */
31940
+ ExecuteWithPasskeySessionInput.prototype.toJSON = function toJSON() {
31941
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
31942
+ };
31943
+
31944
+ ExecuteWithPasskeySessionInput.Execution = (function() {
31945
+
31946
+ /**
31947
+ * Properties of an Execution.
31948
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31949
+ * @interface IExecution
31950
+ * @property {string|null} [address] Execution address
31951
+ * @property {Uint8Array|null} [amount] Execution amount
31952
+ * @property {Uint8Array|null} [payload] Execution payload
31953
+ */
31954
+
31955
+ /**
31956
+ * Constructs a new Execution.
31957
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput
31958
+ * @classdesc Represents an Execution.
31959
+ * @implements IExecution
31960
+ * @constructor
31961
+ * @param {TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution=} [properties] Properties to set
31962
+ */
31963
+ function Execution(properties) {
31964
+ if (properties)
31965
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
31966
+ if (properties[keys[i]] != null)
31967
+ this[keys[i]] = properties[keys[i]];
31968
+ }
31969
+
31970
+ /**
31971
+ * Execution address.
31972
+ * @member {string} address
31973
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
31974
+ * @instance
31975
+ */
31976
+ Execution.prototype.address = "";
31977
+
31978
+ /**
31979
+ * Execution amount.
31980
+ * @member {Uint8Array} amount
31981
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
31982
+ * @instance
31983
+ */
31984
+ Execution.prototype.amount = $util.newBuffer([]);
31985
+
31986
+ /**
31987
+ * Execution payload.
31988
+ * @member {Uint8Array} payload
31989
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
31990
+ * @instance
31991
+ */
31992
+ Execution.prototype.payload = $util.newBuffer([]);
31993
+
31994
+ /**
31995
+ * Creates a new Execution instance using the specified properties.
31996
+ * @function create
31997
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
31998
+ * @static
31999
+ * @param {TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution=} [properties] Properties to set
32000
+ * @returns {TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution} Execution instance
32001
+ */
32002
+ Execution.create = function create(properties) {
32003
+ return new Execution(properties);
32004
+ };
32005
+
32006
+ /**
32007
+ * Encodes the specified Execution message. Does not implicitly {@link TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution.verify|verify} messages.
32008
+ * @function encode
32009
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
32010
+ * @static
32011
+ * @param {TW.Biz.Proto.ExecuteWithPasskeySessionInput.IExecution} message Execution message or plain object to encode
32012
+ * @param {$protobuf.Writer} [writer] Writer to encode to
32013
+ * @returns {$protobuf.Writer} Writer
32014
+ */
32015
+ Execution.encode = function encode(message, writer) {
32016
+ if (!writer)
32017
+ writer = $Writer.create();
32018
+ if (message.address != null && Object.hasOwnProperty.call(message, "address"))
32019
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.address);
32020
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
32021
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.amount);
32022
+ if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
32023
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload);
32024
+ return writer;
32025
+ };
32026
+
32027
+ /**
32028
+ * Decodes an Execution message from the specified reader or buffer.
32029
+ * @function decode
32030
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
32031
+ * @static
32032
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
32033
+ * @param {number} [length] Message length if known beforehand
32034
+ * @returns {TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution} Execution
32035
+ * @throws {Error} If the payload is not a reader or valid buffer
32036
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
32037
+ */
32038
+ Execution.decode = function decode(reader, length) {
32039
+ if (!(reader instanceof $Reader))
32040
+ reader = $Reader.create(reader);
32041
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution();
32042
+ while (reader.pos < end) {
32043
+ var tag = reader.uint32();
32044
+ switch (tag >>> 3) {
32045
+ case 1:
32046
+ message.address = reader.string();
32047
+ break;
32048
+ case 2:
32049
+ message.amount = reader.bytes();
32050
+ break;
32051
+ case 3:
32052
+ message.payload = reader.bytes();
32053
+ break;
32054
+ default:
32055
+ reader.skipType(tag & 7);
32056
+ break;
32057
+ }
32058
+ }
32059
+ return message;
32060
+ };
32061
+
32062
+ /**
32063
+ * Verifies an Execution message.
32064
+ * @function verify
32065
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
32066
+ * @static
32067
+ * @param {Object.<string,*>} message Plain object to verify
32068
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
32069
+ */
32070
+ Execution.verify = function verify(message) {
32071
+ if (typeof message !== "object" || message === null)
32072
+ return "object expected";
32073
+ if (message.address != null && message.hasOwnProperty("address"))
32074
+ if (!$util.isString(message.address))
32075
+ return "address: string expected";
32076
+ if (message.amount != null && message.hasOwnProperty("amount"))
32077
+ if (!(message.amount && typeof message.amount.length === "number" || $util.isString(message.amount)))
32078
+ return "amount: buffer expected";
32079
+ if (message.payload != null && message.hasOwnProperty("payload"))
32080
+ if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload)))
32081
+ return "payload: buffer expected";
32082
+ return null;
32083
+ };
32084
+
32085
+ /**
32086
+ * Creates an Execution message from a plain object. Also converts values to their respective internal types.
32087
+ * @function fromObject
32088
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
32089
+ * @static
32090
+ * @param {Object.<string,*>} object Plain object
32091
+ * @returns {TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution} Execution
32092
+ */
32093
+ Execution.fromObject = function fromObject(object) {
32094
+ if (object instanceof $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution)
32095
+ return object;
32096
+ var message = new $root.TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution();
32097
+ if (object.address != null)
32098
+ message.address = String(object.address);
32099
+ if (object.amount != null)
32100
+ if (typeof object.amount === "string")
32101
+ $util.base64.decode(object.amount, message.amount = $util.newBuffer($util.base64.length(object.amount)), 0);
32102
+ else if (object.amount.length)
32103
+ message.amount = object.amount;
32104
+ if (object.payload != null)
32105
+ if (typeof object.payload === "string")
32106
+ $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0);
32107
+ else if (object.payload.length)
32108
+ message.payload = object.payload;
32109
+ return message;
32110
+ };
32111
+
32112
+ /**
32113
+ * Creates a plain object from an Execution message. Also converts values to other types if specified.
32114
+ * @function toObject
32115
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
32116
+ * @static
32117
+ * @param {TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution} message Execution
32118
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
32119
+ * @returns {Object.<string,*>} Plain object
32120
+ */
32121
+ Execution.toObject = function toObject(message, options) {
32122
+ if (!options)
32123
+ options = {};
32124
+ var object = {};
32125
+ if (options.defaults) {
32126
+ object.address = "";
32127
+ if (options.bytes === String)
32128
+ object.amount = "";
32129
+ else {
32130
+ object.amount = [];
32131
+ if (options.bytes !== Array)
32132
+ object.amount = $util.newBuffer(object.amount);
32133
+ }
32134
+ if (options.bytes === String)
32135
+ object.payload = "";
32136
+ else {
32137
+ object.payload = [];
32138
+ if (options.bytes !== Array)
32139
+ object.payload = $util.newBuffer(object.payload);
32140
+ }
32141
+ }
32142
+ if (message.address != null && message.hasOwnProperty("address"))
32143
+ object.address = message.address;
32144
+ if (message.amount != null && message.hasOwnProperty("amount"))
32145
+ object.amount = options.bytes === String ? $util.base64.encode(message.amount, 0, message.amount.length) : options.bytes === Array ? Array.prototype.slice.call(message.amount) : message.amount;
32146
+ if (message.payload != null && message.hasOwnProperty("payload"))
32147
+ object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload;
32148
+ return object;
32149
+ };
32150
+
32151
+ /**
32152
+ * Converts this Execution to JSON.
32153
+ * @function toJSON
32154
+ * @memberof TW.Biz.Proto.ExecuteWithPasskeySessionInput.Execution
32155
+ * @instance
32156
+ * @returns {Object.<string,*>} JSON object
32157
+ */
32158
+ Execution.prototype.toJSON = function toJSON() {
32159
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
32160
+ };
32161
+
32162
+ return Execution;
32163
+ })();
32164
+
32165
+ return ExecuteWithPasskeySessionInput;
32166
+ })();
32167
+
32168
+ return Proto;
32169
+ })();
32170
+
32171
+ return Biz;
32172
+ })();
32173
+
31645
32174
  TW.Cardano = (function() {
31646
32175
 
31647
32176
  /**
@@ -36,7 +36,7 @@ function $a(a,b){var c=M;return sa||"function"!=typeof WebAssembly.instantiateSt
36
36
  function z(a,b){Object.getOwnPropertyDescriptor(g,a)||Object.defineProperty(g,a,{configurable:!0,get:function(){n("Module."+a+" has been replaced with plain "+b+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}
37
37
  function cb(a){return"FS_createPath"===a||"FS_createDataFile"===a||"FS_createPreloadedFile"===a||"FS_unlink"===a||"addRunDependency"===a||"FS_createLazyFile"===a||"FS_createDevice"===a||"removeRunDependency"===a}(function(a,b){"undefined"!==typeof globalThis&&Object.defineProperty(globalThis,a,{configurable:!0,get:function(){ya("`"+a+"` is not longer defined by emscripten. "+b)}})})("buffer","Please use HEAP8.buffer or wasmMemory.buffer");
38
38
  function db(a){Object.getOwnPropertyDescriptor(g,a)||Object.defineProperty(g,a,{configurable:!0,get:function(){var b="'"+a+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";cb(a)&&(b+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");n(b)}})}
39
- var eb={2191412:()=>{if(void 0===g.fa)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.fa=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.fa=a}catch(e){throw"No secure random number generator found";}}},2192134:()=>g.fa()};
39
+ var eb={2211508:()=>{if(void 0===g.fa)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.fa=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.fa=a}catch(e){throw"No secure random number generator found";}}},2212230:()=>g.fa()};
40
40
  function qa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function fb(a){for(;0<a.length;)a.shift()(g)}function za(a){assert("number"===typeof a);return"0x"+a.toString(16).padStart(8,"0")}function ya(a){gb||(gb={});gb[a]||(gb[a]=1,w&&(a="warning: "+a),y(a))}var gb,hb=[];function ib(a){var b=hb[a];b||(a>=hb.length&&(hb.length=a+1),hb[a]=b=Ha.get(a));assert(Ha.get(a)==b,"JavaScript-side Wasm function table mirror is out of date!");return b}
41
41
  function jb(a){this.l=a-24;this.Oa=function(b){G[this.l+4>>2]=b};this.Ja=function(b){G[this.l+8>>2]=b};this.Ka=function(){F[this.l>>2]=0};this.Ea=function(){D[this.l+12>>0]=0};this.La=function(){D[this.l+13>>0]=0};this.I=function(b,c){this.Da();this.Oa(b);this.Ja(c);this.Ka();this.Ea();this.La()};this.Da=function(){G[this.l+16>>2]=0}}
42
42
  var kb=0,lb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},mb=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=lb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},nb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},ob=
Binary file
@@ -96,10 +96,6 @@ export class Barz {
96
96
  static getFormattedSignature(signature: Uint8Array | Buffer, challenge: Uint8Array | Buffer, authenticatorData: Uint8Array | Buffer, clientDataJson: string): Uint8Array;
97
97
  static getPrefixedMsgHash(msgHash: Uint8Array | Buffer, barzAddress: string, chainId: number): Uint8Array;
98
98
  static getDiamondCutCode(input: Uint8Array | Buffer): Uint8Array;
99
- static getAuthorizationHash(chainId: Uint8Array | Buffer, contractAddress: string, nonce: Uint8Array | Buffer): Uint8Array;
100
- static signAuthorization(chainId: Uint8Array | Buffer, contractAddress: string, nonce: Uint8Array | Buffer, privateKey: string): string;
101
- static getEncodedHash(chainId: Uint8Array | Buffer, codeAddress: string, codeName: string, codeVersion: string, typeHash: string, domainSeparatorHash: string, sender: string, userOpHash: string): Uint8Array;
102
- static getSignedHash(hash: string, privateKey: string): Uint8Array;
103
99
  }
104
100
  export class Base32 {
105
101
  static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
@@ -177,6 +173,14 @@ export class BitcoinSigHashType {
177
173
  static fork: BitcoinSigHashType;
178
174
  static forkBTG: BitcoinSigHashType;
179
175
  }
176
+ export class Biz {
177
+ static getEncodedHash(chainId: Uint8Array | Buffer, codeAddress: string, codeName: string, codeVersion: string, typeHash: string, domainSeparatorHash: string, sender: string, userOpHash: string): Uint8Array;
178
+ static getSignedHash(hash: string, privateKey: string): Uint8Array;
179
+ static encodeRegisterSessionCall(sessionPasskeyPublicKey: PublicKey, validUntilTimestamp: Uint8Array | Buffer): Uint8Array;
180
+ static encodeRemoveSessionCall(sessionPasskeyPublicKey: PublicKey): Uint8Array;
181
+ static encodePasskeySessionNonce(nonce: Uint8Array | Buffer): Uint8Array;
182
+ static encodeExecuteWithPasskeySessionCall(input: Uint8Array | Buffer): Uint8Array;
183
+ }
180
184
  export class Blockchain {
181
185
  value: number;
182
186
  static bitcoin: Blockchain;
@@ -490,6 +494,10 @@ export class DerivationPathIndex {
490
494
  description(): string;
491
495
  delete(): void;
492
496
  }
497
+ export class Eip7702 {
498
+ static signAuthorization(chainId: Uint8Array | Buffer, contractAddress: string, nonce: Uint8Array | Buffer, privateKey: string): string;
499
+ static getAuthorizationHash(chainId: Uint8Array | Buffer, contractAddress: string, nonce: Uint8Array | Buffer): Uint8Array;
500
+ }
493
501
  export class Ethereum {
494
502
  static addressChecksummed(address: string): string;
495
503
  static eip2645GetPath(ethAddress: string, layer: string, application: string, index: string): string;
@@ -1046,6 +1054,10 @@ export class WebAuthn {
1046
1054
  static getRSValues(signature: Uint8Array | Buffer): Uint8Array;
1047
1055
  static reconstructOriginalMessage(authenticatorData: Uint8Array | Buffer, clientDataJSON: Uint8Array | Buffer): Uint8Array;
1048
1056
  }
1057
+ export class WebAuthnSolidity {
1058
+ static getMessageHash(authenticatorData: string, clientDataJson: string): Uint8Array;
1059
+ static getFormattedSignature(authenticatorData: string, clientDataJson: string, derSignature: Uint8Array | Buffer): Uint8Array;
1060
+ }
1049
1061
  export interface WalletCore {
1050
1062
  AnySigner: typeof AnySigner;
1051
1063
  HexCoding: typeof HexCoding;
@@ -1066,6 +1078,7 @@ export interface WalletCore {
1066
1078
  BitcoinMessageSigner: typeof BitcoinMessageSigner;
1067
1079
  BitcoinScript: typeof BitcoinScript;
1068
1080
  BitcoinSigHashType: typeof BitcoinSigHashType;
1081
+ Biz: typeof Biz;
1069
1082
  Blockchain: typeof Blockchain;
1070
1083
  Cardano: typeof Cardano;
1071
1084
  CoinType: typeof CoinType;
@@ -1078,6 +1091,7 @@ export interface WalletCore {
1078
1091
  Derivation: typeof Derivation;
1079
1092
  DerivationPath: typeof DerivationPath;
1080
1093
  DerivationPathIndex: typeof DerivationPathIndex;
1094
+ Eip7702: typeof Eip7702;
1081
1095
  Ethereum: typeof Ethereum;
1082
1096
  EthereumAbi: typeof EthereumAbi;
1083
1097
  EthereumAbiFunction: typeof EthereumAbiFunction;
@@ -1127,6 +1141,7 @@ export interface WalletCore {
1127
1141
  TronMessageSigner: typeof TronMessageSigner;
1128
1142
  WalletConnectRequest: typeof WalletConnectRequest;
1129
1143
  WebAuthn: typeof WebAuthn;
1144
+ WebAuthnSolidity: typeof WebAuthnSolidity;
1130
1145
  describeCurve: typeof describeCurve;
1131
1146
  describeHRP: typeof describeHRP;
1132
1147
  describeStellarPassphrase: typeof describeStellarPassphrase;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustwallet/wallet-core",
3
- "version": "4.3.13",
3
+ "version": "4.3.14",
4
4
  "description": "wallet core wasm and protobuf models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",