@trustwallet/wallet-core 3.0.4 → 3.0.6

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.
@@ -2466,6 +2466,2851 @@
2466
2466
  return Algorand;
2467
2467
  })();
2468
2468
 
2469
+ TW.Aptos = (function() {
2470
+
2471
+ /**
2472
+ * Namespace Aptos.
2473
+ * @memberof TW
2474
+ * @namespace
2475
+ */
2476
+ var Aptos = {};
2477
+
2478
+ Aptos.Proto = (function() {
2479
+
2480
+ /**
2481
+ * Namespace Proto.
2482
+ * @memberof TW.Aptos
2483
+ * @namespace
2484
+ */
2485
+ var Proto = {};
2486
+
2487
+ Proto.TransferMessage = (function() {
2488
+
2489
+ /**
2490
+ * Properties of a TransferMessage.
2491
+ * @memberof TW.Aptos.Proto
2492
+ * @interface ITransferMessage
2493
+ * @property {string|null} [to] TransferMessage to
2494
+ * @property {Long|null} [amount] TransferMessage amount
2495
+ */
2496
+
2497
+ /**
2498
+ * Constructs a new TransferMessage.
2499
+ * @memberof TW.Aptos.Proto
2500
+ * @classdesc Represents a TransferMessage.
2501
+ * @implements ITransferMessage
2502
+ * @constructor
2503
+ * @param {TW.Aptos.Proto.ITransferMessage=} [properties] Properties to set
2504
+ */
2505
+ function TransferMessage(properties) {
2506
+ if (properties)
2507
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2508
+ if (properties[keys[i]] != null)
2509
+ this[keys[i]] = properties[keys[i]];
2510
+ }
2511
+
2512
+ /**
2513
+ * TransferMessage to.
2514
+ * @member {string} to
2515
+ * @memberof TW.Aptos.Proto.TransferMessage
2516
+ * @instance
2517
+ */
2518
+ TransferMessage.prototype.to = "";
2519
+
2520
+ /**
2521
+ * TransferMessage amount.
2522
+ * @member {Long} amount
2523
+ * @memberof TW.Aptos.Proto.TransferMessage
2524
+ * @instance
2525
+ */
2526
+ TransferMessage.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
2527
+
2528
+ /**
2529
+ * Creates a new TransferMessage instance using the specified properties.
2530
+ * @function create
2531
+ * @memberof TW.Aptos.Proto.TransferMessage
2532
+ * @static
2533
+ * @param {TW.Aptos.Proto.ITransferMessage=} [properties] Properties to set
2534
+ * @returns {TW.Aptos.Proto.TransferMessage} TransferMessage instance
2535
+ */
2536
+ TransferMessage.create = function create(properties) {
2537
+ return new TransferMessage(properties);
2538
+ };
2539
+
2540
+ /**
2541
+ * Encodes the specified TransferMessage message. Does not implicitly {@link TW.Aptos.Proto.TransferMessage.verify|verify} messages.
2542
+ * @function encode
2543
+ * @memberof TW.Aptos.Proto.TransferMessage
2544
+ * @static
2545
+ * @param {TW.Aptos.Proto.ITransferMessage} message TransferMessage message or plain object to encode
2546
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2547
+ * @returns {$protobuf.Writer} Writer
2548
+ */
2549
+ TransferMessage.encode = function encode(message, writer) {
2550
+ if (!writer)
2551
+ writer = $Writer.create();
2552
+ if (message.to != null && Object.hasOwnProperty.call(message, "to"))
2553
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.to);
2554
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
2555
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount);
2556
+ return writer;
2557
+ };
2558
+
2559
+ /**
2560
+ * Decodes a TransferMessage message from the specified reader or buffer.
2561
+ * @function decode
2562
+ * @memberof TW.Aptos.Proto.TransferMessage
2563
+ * @static
2564
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2565
+ * @param {number} [length] Message length if known beforehand
2566
+ * @returns {TW.Aptos.Proto.TransferMessage} TransferMessage
2567
+ * @throws {Error} If the payload is not a reader or valid buffer
2568
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2569
+ */
2570
+ TransferMessage.decode = function decode(reader, length) {
2571
+ if (!(reader instanceof $Reader))
2572
+ reader = $Reader.create(reader);
2573
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.TransferMessage();
2574
+ while (reader.pos < end) {
2575
+ var tag = reader.uint32();
2576
+ switch (tag >>> 3) {
2577
+ case 1:
2578
+ message.to = reader.string();
2579
+ break;
2580
+ case 2:
2581
+ message.amount = reader.uint64();
2582
+ break;
2583
+ default:
2584
+ reader.skipType(tag & 7);
2585
+ break;
2586
+ }
2587
+ }
2588
+ return message;
2589
+ };
2590
+
2591
+ /**
2592
+ * Verifies a TransferMessage message.
2593
+ * @function verify
2594
+ * @memberof TW.Aptos.Proto.TransferMessage
2595
+ * @static
2596
+ * @param {Object.<string,*>} message Plain object to verify
2597
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2598
+ */
2599
+ TransferMessage.verify = function verify(message) {
2600
+ if (typeof message !== "object" || message === null)
2601
+ return "object expected";
2602
+ if (message.to != null && message.hasOwnProperty("to"))
2603
+ if (!$util.isString(message.to))
2604
+ return "to: string expected";
2605
+ if (message.amount != null && message.hasOwnProperty("amount"))
2606
+ if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
2607
+ return "amount: integer|Long expected";
2608
+ return null;
2609
+ };
2610
+
2611
+ /**
2612
+ * Creates a TransferMessage message from a plain object. Also converts values to their respective internal types.
2613
+ * @function fromObject
2614
+ * @memberof TW.Aptos.Proto.TransferMessage
2615
+ * @static
2616
+ * @param {Object.<string,*>} object Plain object
2617
+ * @returns {TW.Aptos.Proto.TransferMessage} TransferMessage
2618
+ */
2619
+ TransferMessage.fromObject = function fromObject(object) {
2620
+ if (object instanceof $root.TW.Aptos.Proto.TransferMessage)
2621
+ return object;
2622
+ var message = new $root.TW.Aptos.Proto.TransferMessage();
2623
+ if (object.to != null)
2624
+ message.to = String(object.to);
2625
+ if (object.amount != null)
2626
+ if ($util.Long)
2627
+ (message.amount = $util.Long.fromValue(object.amount)).unsigned = true;
2628
+ else if (typeof object.amount === "string")
2629
+ message.amount = parseInt(object.amount, 10);
2630
+ else if (typeof object.amount === "number")
2631
+ message.amount = object.amount;
2632
+ else if (typeof object.amount === "object")
2633
+ message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
2634
+ return message;
2635
+ };
2636
+
2637
+ /**
2638
+ * Creates a plain object from a TransferMessage message. Also converts values to other types if specified.
2639
+ * @function toObject
2640
+ * @memberof TW.Aptos.Proto.TransferMessage
2641
+ * @static
2642
+ * @param {TW.Aptos.Proto.TransferMessage} message TransferMessage
2643
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2644
+ * @returns {Object.<string,*>} Plain object
2645
+ */
2646
+ TransferMessage.toObject = function toObject(message, options) {
2647
+ if (!options)
2648
+ options = {};
2649
+ var object = {};
2650
+ if (options.defaults) {
2651
+ object.to = "";
2652
+ if ($util.Long) {
2653
+ var long = new $util.Long(0, 0, true);
2654
+ object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
2655
+ } else
2656
+ object.amount = options.longs === String ? "0" : 0;
2657
+ }
2658
+ if (message.to != null && message.hasOwnProperty("to"))
2659
+ object.to = message.to;
2660
+ if (message.amount != null && message.hasOwnProperty("amount"))
2661
+ if (typeof message.amount === "number")
2662
+ object.amount = options.longs === String ? String(message.amount) : message.amount;
2663
+ else
2664
+ object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount;
2665
+ return object;
2666
+ };
2667
+
2668
+ /**
2669
+ * Converts this TransferMessage to JSON.
2670
+ * @function toJSON
2671
+ * @memberof TW.Aptos.Proto.TransferMessage
2672
+ * @instance
2673
+ * @returns {Object.<string,*>} JSON object
2674
+ */
2675
+ TransferMessage.prototype.toJSON = function toJSON() {
2676
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2677
+ };
2678
+
2679
+ return TransferMessage;
2680
+ })();
2681
+
2682
+ Proto.StructTag = (function() {
2683
+
2684
+ /**
2685
+ * Properties of a StructTag.
2686
+ * @memberof TW.Aptos.Proto
2687
+ * @interface IStructTag
2688
+ * @property {string|null} [accountAddress] StructTag accountAddress
2689
+ * @property {string|null} [module] StructTag module
2690
+ * @property {string|null} [name] StructTag name
2691
+ */
2692
+
2693
+ /**
2694
+ * Constructs a new StructTag.
2695
+ * @memberof TW.Aptos.Proto
2696
+ * @classdesc Represents a StructTag.
2697
+ * @implements IStructTag
2698
+ * @constructor
2699
+ * @param {TW.Aptos.Proto.IStructTag=} [properties] Properties to set
2700
+ */
2701
+ function StructTag(properties) {
2702
+ if (properties)
2703
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2704
+ if (properties[keys[i]] != null)
2705
+ this[keys[i]] = properties[keys[i]];
2706
+ }
2707
+
2708
+ /**
2709
+ * StructTag accountAddress.
2710
+ * @member {string} accountAddress
2711
+ * @memberof TW.Aptos.Proto.StructTag
2712
+ * @instance
2713
+ */
2714
+ StructTag.prototype.accountAddress = "";
2715
+
2716
+ /**
2717
+ * StructTag module.
2718
+ * @member {string} module
2719
+ * @memberof TW.Aptos.Proto.StructTag
2720
+ * @instance
2721
+ */
2722
+ StructTag.prototype.module = "";
2723
+
2724
+ /**
2725
+ * StructTag name.
2726
+ * @member {string} name
2727
+ * @memberof TW.Aptos.Proto.StructTag
2728
+ * @instance
2729
+ */
2730
+ StructTag.prototype.name = "";
2731
+
2732
+ /**
2733
+ * Creates a new StructTag instance using the specified properties.
2734
+ * @function create
2735
+ * @memberof TW.Aptos.Proto.StructTag
2736
+ * @static
2737
+ * @param {TW.Aptos.Proto.IStructTag=} [properties] Properties to set
2738
+ * @returns {TW.Aptos.Proto.StructTag} StructTag instance
2739
+ */
2740
+ StructTag.create = function create(properties) {
2741
+ return new StructTag(properties);
2742
+ };
2743
+
2744
+ /**
2745
+ * Encodes the specified StructTag message. Does not implicitly {@link TW.Aptos.Proto.StructTag.verify|verify} messages.
2746
+ * @function encode
2747
+ * @memberof TW.Aptos.Proto.StructTag
2748
+ * @static
2749
+ * @param {TW.Aptos.Proto.IStructTag} message StructTag message or plain object to encode
2750
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2751
+ * @returns {$protobuf.Writer} Writer
2752
+ */
2753
+ StructTag.encode = function encode(message, writer) {
2754
+ if (!writer)
2755
+ writer = $Writer.create();
2756
+ if (message.accountAddress != null && Object.hasOwnProperty.call(message, "accountAddress"))
2757
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountAddress);
2758
+ if (message.module != null && Object.hasOwnProperty.call(message, "module"))
2759
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.module);
2760
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
2761
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
2762
+ return writer;
2763
+ };
2764
+
2765
+ /**
2766
+ * Decodes a StructTag message from the specified reader or buffer.
2767
+ * @function decode
2768
+ * @memberof TW.Aptos.Proto.StructTag
2769
+ * @static
2770
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2771
+ * @param {number} [length] Message length if known beforehand
2772
+ * @returns {TW.Aptos.Proto.StructTag} StructTag
2773
+ * @throws {Error} If the payload is not a reader or valid buffer
2774
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2775
+ */
2776
+ StructTag.decode = function decode(reader, length) {
2777
+ if (!(reader instanceof $Reader))
2778
+ reader = $Reader.create(reader);
2779
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.StructTag();
2780
+ while (reader.pos < end) {
2781
+ var tag = reader.uint32();
2782
+ switch (tag >>> 3) {
2783
+ case 1:
2784
+ message.accountAddress = reader.string();
2785
+ break;
2786
+ case 2:
2787
+ message.module = reader.string();
2788
+ break;
2789
+ case 3:
2790
+ message.name = reader.string();
2791
+ break;
2792
+ default:
2793
+ reader.skipType(tag & 7);
2794
+ break;
2795
+ }
2796
+ }
2797
+ return message;
2798
+ };
2799
+
2800
+ /**
2801
+ * Verifies a StructTag message.
2802
+ * @function verify
2803
+ * @memberof TW.Aptos.Proto.StructTag
2804
+ * @static
2805
+ * @param {Object.<string,*>} message Plain object to verify
2806
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2807
+ */
2808
+ StructTag.verify = function verify(message) {
2809
+ if (typeof message !== "object" || message === null)
2810
+ return "object expected";
2811
+ if (message.accountAddress != null && message.hasOwnProperty("accountAddress"))
2812
+ if (!$util.isString(message.accountAddress))
2813
+ return "accountAddress: string expected";
2814
+ if (message.module != null && message.hasOwnProperty("module"))
2815
+ if (!$util.isString(message.module))
2816
+ return "module: string expected";
2817
+ if (message.name != null && message.hasOwnProperty("name"))
2818
+ if (!$util.isString(message.name))
2819
+ return "name: string expected";
2820
+ return null;
2821
+ };
2822
+
2823
+ /**
2824
+ * Creates a StructTag message from a plain object. Also converts values to their respective internal types.
2825
+ * @function fromObject
2826
+ * @memberof TW.Aptos.Proto.StructTag
2827
+ * @static
2828
+ * @param {Object.<string,*>} object Plain object
2829
+ * @returns {TW.Aptos.Proto.StructTag} StructTag
2830
+ */
2831
+ StructTag.fromObject = function fromObject(object) {
2832
+ if (object instanceof $root.TW.Aptos.Proto.StructTag)
2833
+ return object;
2834
+ var message = new $root.TW.Aptos.Proto.StructTag();
2835
+ if (object.accountAddress != null)
2836
+ message.accountAddress = String(object.accountAddress);
2837
+ if (object.module != null)
2838
+ message.module = String(object.module);
2839
+ if (object.name != null)
2840
+ message.name = String(object.name);
2841
+ return message;
2842
+ };
2843
+
2844
+ /**
2845
+ * Creates a plain object from a StructTag message. Also converts values to other types if specified.
2846
+ * @function toObject
2847
+ * @memberof TW.Aptos.Proto.StructTag
2848
+ * @static
2849
+ * @param {TW.Aptos.Proto.StructTag} message StructTag
2850
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2851
+ * @returns {Object.<string,*>} Plain object
2852
+ */
2853
+ StructTag.toObject = function toObject(message, options) {
2854
+ if (!options)
2855
+ options = {};
2856
+ var object = {};
2857
+ if (options.defaults) {
2858
+ object.accountAddress = "";
2859
+ object.module = "";
2860
+ object.name = "";
2861
+ }
2862
+ if (message.accountAddress != null && message.hasOwnProperty("accountAddress"))
2863
+ object.accountAddress = message.accountAddress;
2864
+ if (message.module != null && message.hasOwnProperty("module"))
2865
+ object.module = message.module;
2866
+ if (message.name != null && message.hasOwnProperty("name"))
2867
+ object.name = message.name;
2868
+ return object;
2869
+ };
2870
+
2871
+ /**
2872
+ * Converts this StructTag to JSON.
2873
+ * @function toJSON
2874
+ * @memberof TW.Aptos.Proto.StructTag
2875
+ * @instance
2876
+ * @returns {Object.<string,*>} JSON object
2877
+ */
2878
+ StructTag.prototype.toJSON = function toJSON() {
2879
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2880
+ };
2881
+
2882
+ return StructTag;
2883
+ })();
2884
+
2885
+ Proto.TokenTransferMessage = (function() {
2886
+
2887
+ /**
2888
+ * Properties of a TokenTransferMessage.
2889
+ * @memberof TW.Aptos.Proto
2890
+ * @interface ITokenTransferMessage
2891
+ * @property {string|null} [to] TokenTransferMessage to
2892
+ * @property {Long|null} [amount] TokenTransferMessage amount
2893
+ * @property {TW.Aptos.Proto.IStructTag|null} ["function"] TokenTransferMessage function
2894
+ */
2895
+
2896
+ /**
2897
+ * Constructs a new TokenTransferMessage.
2898
+ * @memberof TW.Aptos.Proto
2899
+ * @classdesc Represents a TokenTransferMessage.
2900
+ * @implements ITokenTransferMessage
2901
+ * @constructor
2902
+ * @param {TW.Aptos.Proto.ITokenTransferMessage=} [properties] Properties to set
2903
+ */
2904
+ function TokenTransferMessage(properties) {
2905
+ if (properties)
2906
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2907
+ if (properties[keys[i]] != null)
2908
+ this[keys[i]] = properties[keys[i]];
2909
+ }
2910
+
2911
+ /**
2912
+ * TokenTransferMessage to.
2913
+ * @member {string} to
2914
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
2915
+ * @instance
2916
+ */
2917
+ TokenTransferMessage.prototype.to = "";
2918
+
2919
+ /**
2920
+ * TokenTransferMessage amount.
2921
+ * @member {Long} amount
2922
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
2923
+ * @instance
2924
+ */
2925
+ TokenTransferMessage.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
2926
+
2927
+ /**
2928
+ * TokenTransferMessage function.
2929
+ * @member {TW.Aptos.Proto.IStructTag|null|undefined} function
2930
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
2931
+ * @instance
2932
+ */
2933
+ TokenTransferMessage.prototype["function"] = null;
2934
+
2935
+ /**
2936
+ * Creates a new TokenTransferMessage instance using the specified properties.
2937
+ * @function create
2938
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
2939
+ * @static
2940
+ * @param {TW.Aptos.Proto.ITokenTransferMessage=} [properties] Properties to set
2941
+ * @returns {TW.Aptos.Proto.TokenTransferMessage} TokenTransferMessage instance
2942
+ */
2943
+ TokenTransferMessage.create = function create(properties) {
2944
+ return new TokenTransferMessage(properties);
2945
+ };
2946
+
2947
+ /**
2948
+ * Encodes the specified TokenTransferMessage message. Does not implicitly {@link TW.Aptos.Proto.TokenTransferMessage.verify|verify} messages.
2949
+ * @function encode
2950
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
2951
+ * @static
2952
+ * @param {TW.Aptos.Proto.ITokenTransferMessage} message TokenTransferMessage message or plain object to encode
2953
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2954
+ * @returns {$protobuf.Writer} Writer
2955
+ */
2956
+ TokenTransferMessage.encode = function encode(message, writer) {
2957
+ if (!writer)
2958
+ writer = $Writer.create();
2959
+ if (message.to != null && Object.hasOwnProperty.call(message, "to"))
2960
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.to);
2961
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
2962
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount);
2963
+ if (message["function"] != null && Object.hasOwnProperty.call(message, "function"))
2964
+ $root.TW.Aptos.Proto.StructTag.encode(message["function"], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
2965
+ return writer;
2966
+ };
2967
+
2968
+ /**
2969
+ * Decodes a TokenTransferMessage message from the specified reader or buffer.
2970
+ * @function decode
2971
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
2972
+ * @static
2973
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2974
+ * @param {number} [length] Message length if known beforehand
2975
+ * @returns {TW.Aptos.Proto.TokenTransferMessage} TokenTransferMessage
2976
+ * @throws {Error} If the payload is not a reader or valid buffer
2977
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2978
+ */
2979
+ TokenTransferMessage.decode = function decode(reader, length) {
2980
+ if (!(reader instanceof $Reader))
2981
+ reader = $Reader.create(reader);
2982
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.TokenTransferMessage();
2983
+ while (reader.pos < end) {
2984
+ var tag = reader.uint32();
2985
+ switch (tag >>> 3) {
2986
+ case 1:
2987
+ message.to = reader.string();
2988
+ break;
2989
+ case 2:
2990
+ message.amount = reader.uint64();
2991
+ break;
2992
+ case 3:
2993
+ message["function"] = $root.TW.Aptos.Proto.StructTag.decode(reader, reader.uint32());
2994
+ break;
2995
+ default:
2996
+ reader.skipType(tag & 7);
2997
+ break;
2998
+ }
2999
+ }
3000
+ return message;
3001
+ };
3002
+
3003
+ /**
3004
+ * Verifies a TokenTransferMessage message.
3005
+ * @function verify
3006
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
3007
+ * @static
3008
+ * @param {Object.<string,*>} message Plain object to verify
3009
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3010
+ */
3011
+ TokenTransferMessage.verify = function verify(message) {
3012
+ if (typeof message !== "object" || message === null)
3013
+ return "object expected";
3014
+ if (message.to != null && message.hasOwnProperty("to"))
3015
+ if (!$util.isString(message.to))
3016
+ return "to: string expected";
3017
+ if (message.amount != null && message.hasOwnProperty("amount"))
3018
+ if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
3019
+ return "amount: integer|Long expected";
3020
+ if (message["function"] != null && message.hasOwnProperty("function")) {
3021
+ var error = $root.TW.Aptos.Proto.StructTag.verify(message["function"]);
3022
+ if (error)
3023
+ return "function." + error;
3024
+ }
3025
+ return null;
3026
+ };
3027
+
3028
+ /**
3029
+ * Creates a TokenTransferMessage message from a plain object. Also converts values to their respective internal types.
3030
+ * @function fromObject
3031
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
3032
+ * @static
3033
+ * @param {Object.<string,*>} object Plain object
3034
+ * @returns {TW.Aptos.Proto.TokenTransferMessage} TokenTransferMessage
3035
+ */
3036
+ TokenTransferMessage.fromObject = function fromObject(object) {
3037
+ if (object instanceof $root.TW.Aptos.Proto.TokenTransferMessage)
3038
+ return object;
3039
+ var message = new $root.TW.Aptos.Proto.TokenTransferMessage();
3040
+ if (object.to != null)
3041
+ message.to = String(object.to);
3042
+ if (object.amount != null)
3043
+ if ($util.Long)
3044
+ (message.amount = $util.Long.fromValue(object.amount)).unsigned = true;
3045
+ else if (typeof object.amount === "string")
3046
+ message.amount = parseInt(object.amount, 10);
3047
+ else if (typeof object.amount === "number")
3048
+ message.amount = object.amount;
3049
+ else if (typeof object.amount === "object")
3050
+ message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
3051
+ if (object["function"] != null) {
3052
+ if (typeof object["function"] !== "object")
3053
+ throw TypeError(".TW.Aptos.Proto.TokenTransferMessage.function: object expected");
3054
+ message["function"] = $root.TW.Aptos.Proto.StructTag.fromObject(object["function"]);
3055
+ }
3056
+ return message;
3057
+ };
3058
+
3059
+ /**
3060
+ * Creates a plain object from a TokenTransferMessage message. Also converts values to other types if specified.
3061
+ * @function toObject
3062
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
3063
+ * @static
3064
+ * @param {TW.Aptos.Proto.TokenTransferMessage} message TokenTransferMessage
3065
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3066
+ * @returns {Object.<string,*>} Plain object
3067
+ */
3068
+ TokenTransferMessage.toObject = function toObject(message, options) {
3069
+ if (!options)
3070
+ options = {};
3071
+ var object = {};
3072
+ if (options.defaults) {
3073
+ object.to = "";
3074
+ if ($util.Long) {
3075
+ var long = new $util.Long(0, 0, true);
3076
+ object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3077
+ } else
3078
+ object.amount = options.longs === String ? "0" : 0;
3079
+ object["function"] = null;
3080
+ }
3081
+ if (message.to != null && message.hasOwnProperty("to"))
3082
+ object.to = message.to;
3083
+ if (message.amount != null && message.hasOwnProperty("amount"))
3084
+ if (typeof message.amount === "number")
3085
+ object.amount = options.longs === String ? String(message.amount) : message.amount;
3086
+ else
3087
+ object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount;
3088
+ if (message["function"] != null && message.hasOwnProperty("function"))
3089
+ object["function"] = $root.TW.Aptos.Proto.StructTag.toObject(message["function"], options);
3090
+ return object;
3091
+ };
3092
+
3093
+ /**
3094
+ * Converts this TokenTransferMessage to JSON.
3095
+ * @function toJSON
3096
+ * @memberof TW.Aptos.Proto.TokenTransferMessage
3097
+ * @instance
3098
+ * @returns {Object.<string,*>} JSON object
3099
+ */
3100
+ TokenTransferMessage.prototype.toJSON = function toJSON() {
3101
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3102
+ };
3103
+
3104
+ return TokenTransferMessage;
3105
+ })();
3106
+
3107
+ Proto.CreateAccountMessage = (function() {
3108
+
3109
+ /**
3110
+ * Properties of a CreateAccountMessage.
3111
+ * @memberof TW.Aptos.Proto
3112
+ * @interface ICreateAccountMessage
3113
+ * @property {string|null} [authKey] CreateAccountMessage authKey
3114
+ */
3115
+
3116
+ /**
3117
+ * Constructs a new CreateAccountMessage.
3118
+ * @memberof TW.Aptos.Proto
3119
+ * @classdesc Represents a CreateAccountMessage.
3120
+ * @implements ICreateAccountMessage
3121
+ * @constructor
3122
+ * @param {TW.Aptos.Proto.ICreateAccountMessage=} [properties] Properties to set
3123
+ */
3124
+ function CreateAccountMessage(properties) {
3125
+ if (properties)
3126
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3127
+ if (properties[keys[i]] != null)
3128
+ this[keys[i]] = properties[keys[i]];
3129
+ }
3130
+
3131
+ /**
3132
+ * CreateAccountMessage authKey.
3133
+ * @member {string} authKey
3134
+ * @memberof TW.Aptos.Proto.CreateAccountMessage
3135
+ * @instance
3136
+ */
3137
+ CreateAccountMessage.prototype.authKey = "";
3138
+
3139
+ /**
3140
+ * Creates a new CreateAccountMessage instance using the specified properties.
3141
+ * @function create
3142
+ * @memberof TW.Aptos.Proto.CreateAccountMessage
3143
+ * @static
3144
+ * @param {TW.Aptos.Proto.ICreateAccountMessage=} [properties] Properties to set
3145
+ * @returns {TW.Aptos.Proto.CreateAccountMessage} CreateAccountMessage instance
3146
+ */
3147
+ CreateAccountMessage.create = function create(properties) {
3148
+ return new CreateAccountMessage(properties);
3149
+ };
3150
+
3151
+ /**
3152
+ * Encodes the specified CreateAccountMessage message. Does not implicitly {@link TW.Aptos.Proto.CreateAccountMessage.verify|verify} messages.
3153
+ * @function encode
3154
+ * @memberof TW.Aptos.Proto.CreateAccountMessage
3155
+ * @static
3156
+ * @param {TW.Aptos.Proto.ICreateAccountMessage} message CreateAccountMessage message or plain object to encode
3157
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3158
+ * @returns {$protobuf.Writer} Writer
3159
+ */
3160
+ CreateAccountMessage.encode = function encode(message, writer) {
3161
+ if (!writer)
3162
+ writer = $Writer.create();
3163
+ if (message.authKey != null && Object.hasOwnProperty.call(message, "authKey"))
3164
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.authKey);
3165
+ return writer;
3166
+ };
3167
+
3168
+ /**
3169
+ * Decodes a CreateAccountMessage message from the specified reader or buffer.
3170
+ * @function decode
3171
+ * @memberof TW.Aptos.Proto.CreateAccountMessage
3172
+ * @static
3173
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3174
+ * @param {number} [length] Message length if known beforehand
3175
+ * @returns {TW.Aptos.Proto.CreateAccountMessage} CreateAccountMessage
3176
+ * @throws {Error} If the payload is not a reader or valid buffer
3177
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3178
+ */
3179
+ CreateAccountMessage.decode = function decode(reader, length) {
3180
+ if (!(reader instanceof $Reader))
3181
+ reader = $Reader.create(reader);
3182
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.CreateAccountMessage();
3183
+ while (reader.pos < end) {
3184
+ var tag = reader.uint32();
3185
+ switch (tag >>> 3) {
3186
+ case 1:
3187
+ message.authKey = reader.string();
3188
+ break;
3189
+ default:
3190
+ reader.skipType(tag & 7);
3191
+ break;
3192
+ }
3193
+ }
3194
+ return message;
3195
+ };
3196
+
3197
+ /**
3198
+ * Verifies a CreateAccountMessage message.
3199
+ * @function verify
3200
+ * @memberof TW.Aptos.Proto.CreateAccountMessage
3201
+ * @static
3202
+ * @param {Object.<string,*>} message Plain object to verify
3203
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3204
+ */
3205
+ CreateAccountMessage.verify = function verify(message) {
3206
+ if (typeof message !== "object" || message === null)
3207
+ return "object expected";
3208
+ if (message.authKey != null && message.hasOwnProperty("authKey"))
3209
+ if (!$util.isString(message.authKey))
3210
+ return "authKey: string expected";
3211
+ return null;
3212
+ };
3213
+
3214
+ /**
3215
+ * Creates a CreateAccountMessage message from a plain object. Also converts values to their respective internal types.
3216
+ * @function fromObject
3217
+ * @memberof TW.Aptos.Proto.CreateAccountMessage
3218
+ * @static
3219
+ * @param {Object.<string,*>} object Plain object
3220
+ * @returns {TW.Aptos.Proto.CreateAccountMessage} CreateAccountMessage
3221
+ */
3222
+ CreateAccountMessage.fromObject = function fromObject(object) {
3223
+ if (object instanceof $root.TW.Aptos.Proto.CreateAccountMessage)
3224
+ return object;
3225
+ var message = new $root.TW.Aptos.Proto.CreateAccountMessage();
3226
+ if (object.authKey != null)
3227
+ message.authKey = String(object.authKey);
3228
+ return message;
3229
+ };
3230
+
3231
+ /**
3232
+ * Creates a plain object from a CreateAccountMessage message. Also converts values to other types if specified.
3233
+ * @function toObject
3234
+ * @memberof TW.Aptos.Proto.CreateAccountMessage
3235
+ * @static
3236
+ * @param {TW.Aptos.Proto.CreateAccountMessage} message CreateAccountMessage
3237
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3238
+ * @returns {Object.<string,*>} Plain object
3239
+ */
3240
+ CreateAccountMessage.toObject = function toObject(message, options) {
3241
+ if (!options)
3242
+ options = {};
3243
+ var object = {};
3244
+ if (options.defaults)
3245
+ object.authKey = "";
3246
+ if (message.authKey != null && message.hasOwnProperty("authKey"))
3247
+ object.authKey = message.authKey;
3248
+ return object;
3249
+ };
3250
+
3251
+ /**
3252
+ * Converts this CreateAccountMessage to JSON.
3253
+ * @function toJSON
3254
+ * @memberof TW.Aptos.Proto.CreateAccountMessage
3255
+ * @instance
3256
+ * @returns {Object.<string,*>} JSON object
3257
+ */
3258
+ CreateAccountMessage.prototype.toJSON = function toJSON() {
3259
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3260
+ };
3261
+
3262
+ return CreateAccountMessage;
3263
+ })();
3264
+
3265
+ Proto.OfferNftMessage = (function() {
3266
+
3267
+ /**
3268
+ * Properties of an OfferNftMessage.
3269
+ * @memberof TW.Aptos.Proto
3270
+ * @interface IOfferNftMessage
3271
+ * @property {string|null} [receiver] OfferNftMessage receiver
3272
+ * @property {string|null} [creator] OfferNftMessage creator
3273
+ * @property {string|null} [collectionName] OfferNftMessage collectionName
3274
+ * @property {string|null} [name] OfferNftMessage name
3275
+ * @property {Long|null} [propertyVersion] OfferNftMessage propertyVersion
3276
+ * @property {Long|null} [amount] OfferNftMessage amount
3277
+ */
3278
+
3279
+ /**
3280
+ * Constructs a new OfferNftMessage.
3281
+ * @memberof TW.Aptos.Proto
3282
+ * @classdesc Represents an OfferNftMessage.
3283
+ * @implements IOfferNftMessage
3284
+ * @constructor
3285
+ * @param {TW.Aptos.Proto.IOfferNftMessage=} [properties] Properties to set
3286
+ */
3287
+ function OfferNftMessage(properties) {
3288
+ if (properties)
3289
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3290
+ if (properties[keys[i]] != null)
3291
+ this[keys[i]] = properties[keys[i]];
3292
+ }
3293
+
3294
+ /**
3295
+ * OfferNftMessage receiver.
3296
+ * @member {string} receiver
3297
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3298
+ * @instance
3299
+ */
3300
+ OfferNftMessage.prototype.receiver = "";
3301
+
3302
+ /**
3303
+ * OfferNftMessage creator.
3304
+ * @member {string} creator
3305
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3306
+ * @instance
3307
+ */
3308
+ OfferNftMessage.prototype.creator = "";
3309
+
3310
+ /**
3311
+ * OfferNftMessage collectionName.
3312
+ * @member {string} collectionName
3313
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3314
+ * @instance
3315
+ */
3316
+ OfferNftMessage.prototype.collectionName = "";
3317
+
3318
+ /**
3319
+ * OfferNftMessage name.
3320
+ * @member {string} name
3321
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3322
+ * @instance
3323
+ */
3324
+ OfferNftMessage.prototype.name = "";
3325
+
3326
+ /**
3327
+ * OfferNftMessage propertyVersion.
3328
+ * @member {Long} propertyVersion
3329
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3330
+ * @instance
3331
+ */
3332
+ OfferNftMessage.prototype.propertyVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3333
+
3334
+ /**
3335
+ * OfferNftMessage amount.
3336
+ * @member {Long} amount
3337
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3338
+ * @instance
3339
+ */
3340
+ OfferNftMessage.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3341
+
3342
+ /**
3343
+ * Creates a new OfferNftMessage instance using the specified properties.
3344
+ * @function create
3345
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3346
+ * @static
3347
+ * @param {TW.Aptos.Proto.IOfferNftMessage=} [properties] Properties to set
3348
+ * @returns {TW.Aptos.Proto.OfferNftMessage} OfferNftMessage instance
3349
+ */
3350
+ OfferNftMessage.create = function create(properties) {
3351
+ return new OfferNftMessage(properties);
3352
+ };
3353
+
3354
+ /**
3355
+ * Encodes the specified OfferNftMessage message. Does not implicitly {@link TW.Aptos.Proto.OfferNftMessage.verify|verify} messages.
3356
+ * @function encode
3357
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3358
+ * @static
3359
+ * @param {TW.Aptos.Proto.IOfferNftMessage} message OfferNftMessage message or plain object to encode
3360
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3361
+ * @returns {$protobuf.Writer} Writer
3362
+ */
3363
+ OfferNftMessage.encode = function encode(message, writer) {
3364
+ if (!writer)
3365
+ writer = $Writer.create();
3366
+ if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver"))
3367
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.receiver);
3368
+ if (message.creator != null && Object.hasOwnProperty.call(message, "creator"))
3369
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.creator);
3370
+ if (message.collectionName != null && Object.hasOwnProperty.call(message, "collectionName"))
3371
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionName);
3372
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
3373
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
3374
+ if (message.propertyVersion != null && Object.hasOwnProperty.call(message, "propertyVersion"))
3375
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.propertyVersion);
3376
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
3377
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.amount);
3378
+ return writer;
3379
+ };
3380
+
3381
+ /**
3382
+ * Decodes an OfferNftMessage message from the specified reader or buffer.
3383
+ * @function decode
3384
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3385
+ * @static
3386
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3387
+ * @param {number} [length] Message length if known beforehand
3388
+ * @returns {TW.Aptos.Proto.OfferNftMessage} OfferNftMessage
3389
+ * @throws {Error} If the payload is not a reader or valid buffer
3390
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3391
+ */
3392
+ OfferNftMessage.decode = function decode(reader, length) {
3393
+ if (!(reader instanceof $Reader))
3394
+ reader = $Reader.create(reader);
3395
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.OfferNftMessage();
3396
+ while (reader.pos < end) {
3397
+ var tag = reader.uint32();
3398
+ switch (tag >>> 3) {
3399
+ case 1:
3400
+ message.receiver = reader.string();
3401
+ break;
3402
+ case 2:
3403
+ message.creator = reader.string();
3404
+ break;
3405
+ case 3:
3406
+ message.collectionName = reader.string();
3407
+ break;
3408
+ case 4:
3409
+ message.name = reader.string();
3410
+ break;
3411
+ case 5:
3412
+ message.propertyVersion = reader.uint64();
3413
+ break;
3414
+ case 6:
3415
+ message.amount = reader.uint64();
3416
+ break;
3417
+ default:
3418
+ reader.skipType(tag & 7);
3419
+ break;
3420
+ }
3421
+ }
3422
+ return message;
3423
+ };
3424
+
3425
+ /**
3426
+ * Verifies an OfferNftMessage message.
3427
+ * @function verify
3428
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3429
+ * @static
3430
+ * @param {Object.<string,*>} message Plain object to verify
3431
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3432
+ */
3433
+ OfferNftMessage.verify = function verify(message) {
3434
+ if (typeof message !== "object" || message === null)
3435
+ return "object expected";
3436
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
3437
+ if (!$util.isString(message.receiver))
3438
+ return "receiver: string expected";
3439
+ if (message.creator != null && message.hasOwnProperty("creator"))
3440
+ if (!$util.isString(message.creator))
3441
+ return "creator: string expected";
3442
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3443
+ if (!$util.isString(message.collectionName))
3444
+ return "collectionName: string expected";
3445
+ if (message.name != null && message.hasOwnProperty("name"))
3446
+ if (!$util.isString(message.name))
3447
+ return "name: string expected";
3448
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3449
+ if (!$util.isInteger(message.propertyVersion) && !(message.propertyVersion && $util.isInteger(message.propertyVersion.low) && $util.isInteger(message.propertyVersion.high)))
3450
+ return "propertyVersion: integer|Long expected";
3451
+ if (message.amount != null && message.hasOwnProperty("amount"))
3452
+ if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
3453
+ return "amount: integer|Long expected";
3454
+ return null;
3455
+ };
3456
+
3457
+ /**
3458
+ * Creates an OfferNftMessage message from a plain object. Also converts values to their respective internal types.
3459
+ * @function fromObject
3460
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3461
+ * @static
3462
+ * @param {Object.<string,*>} object Plain object
3463
+ * @returns {TW.Aptos.Proto.OfferNftMessage} OfferNftMessage
3464
+ */
3465
+ OfferNftMessage.fromObject = function fromObject(object) {
3466
+ if (object instanceof $root.TW.Aptos.Proto.OfferNftMessage)
3467
+ return object;
3468
+ var message = new $root.TW.Aptos.Proto.OfferNftMessage();
3469
+ if (object.receiver != null)
3470
+ message.receiver = String(object.receiver);
3471
+ if (object.creator != null)
3472
+ message.creator = String(object.creator);
3473
+ if (object.collectionName != null)
3474
+ message.collectionName = String(object.collectionName);
3475
+ if (object.name != null)
3476
+ message.name = String(object.name);
3477
+ if (object.propertyVersion != null)
3478
+ if ($util.Long)
3479
+ (message.propertyVersion = $util.Long.fromValue(object.propertyVersion)).unsigned = true;
3480
+ else if (typeof object.propertyVersion === "string")
3481
+ message.propertyVersion = parseInt(object.propertyVersion, 10);
3482
+ else if (typeof object.propertyVersion === "number")
3483
+ message.propertyVersion = object.propertyVersion;
3484
+ else if (typeof object.propertyVersion === "object")
3485
+ message.propertyVersion = new $util.LongBits(object.propertyVersion.low >>> 0, object.propertyVersion.high >>> 0).toNumber(true);
3486
+ if (object.amount != null)
3487
+ if ($util.Long)
3488
+ (message.amount = $util.Long.fromValue(object.amount)).unsigned = true;
3489
+ else if (typeof object.amount === "string")
3490
+ message.amount = parseInt(object.amount, 10);
3491
+ else if (typeof object.amount === "number")
3492
+ message.amount = object.amount;
3493
+ else if (typeof object.amount === "object")
3494
+ message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
3495
+ return message;
3496
+ };
3497
+
3498
+ /**
3499
+ * Creates a plain object from an OfferNftMessage message. Also converts values to other types if specified.
3500
+ * @function toObject
3501
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3502
+ * @static
3503
+ * @param {TW.Aptos.Proto.OfferNftMessage} message OfferNftMessage
3504
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3505
+ * @returns {Object.<string,*>} Plain object
3506
+ */
3507
+ OfferNftMessage.toObject = function toObject(message, options) {
3508
+ if (!options)
3509
+ options = {};
3510
+ var object = {};
3511
+ if (options.defaults) {
3512
+ object.receiver = "";
3513
+ object.creator = "";
3514
+ object.collectionName = "";
3515
+ object.name = "";
3516
+ if ($util.Long) {
3517
+ var long = new $util.Long(0, 0, true);
3518
+ object.propertyVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3519
+ } else
3520
+ object.propertyVersion = options.longs === String ? "0" : 0;
3521
+ if ($util.Long) {
3522
+ var long = new $util.Long(0, 0, true);
3523
+ object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3524
+ } else
3525
+ object.amount = options.longs === String ? "0" : 0;
3526
+ }
3527
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
3528
+ object.receiver = message.receiver;
3529
+ if (message.creator != null && message.hasOwnProperty("creator"))
3530
+ object.creator = message.creator;
3531
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3532
+ object.collectionName = message.collectionName;
3533
+ if (message.name != null && message.hasOwnProperty("name"))
3534
+ object.name = message.name;
3535
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3536
+ if (typeof message.propertyVersion === "number")
3537
+ object.propertyVersion = options.longs === String ? String(message.propertyVersion) : message.propertyVersion;
3538
+ else
3539
+ object.propertyVersion = options.longs === String ? $util.Long.prototype.toString.call(message.propertyVersion) : options.longs === Number ? new $util.LongBits(message.propertyVersion.low >>> 0, message.propertyVersion.high >>> 0).toNumber(true) : message.propertyVersion;
3540
+ if (message.amount != null && message.hasOwnProperty("amount"))
3541
+ if (typeof message.amount === "number")
3542
+ object.amount = options.longs === String ? String(message.amount) : message.amount;
3543
+ else
3544
+ object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount;
3545
+ return object;
3546
+ };
3547
+
3548
+ /**
3549
+ * Converts this OfferNftMessage to JSON.
3550
+ * @function toJSON
3551
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3552
+ * @instance
3553
+ * @returns {Object.<string,*>} JSON object
3554
+ */
3555
+ OfferNftMessage.prototype.toJSON = function toJSON() {
3556
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3557
+ };
3558
+
3559
+ return OfferNftMessage;
3560
+ })();
3561
+
3562
+ Proto.CancelOfferNftMessage = (function() {
3563
+
3564
+ /**
3565
+ * Properties of a CancelOfferNftMessage.
3566
+ * @memberof TW.Aptos.Proto
3567
+ * @interface ICancelOfferNftMessage
3568
+ * @property {string|null} [receiver] CancelOfferNftMessage receiver
3569
+ * @property {string|null} [creator] CancelOfferNftMessage creator
3570
+ * @property {string|null} [collectionName] CancelOfferNftMessage collectionName
3571
+ * @property {string|null} [name] CancelOfferNftMessage name
3572
+ * @property {Long|null} [propertyVersion] CancelOfferNftMessage propertyVersion
3573
+ */
3574
+
3575
+ /**
3576
+ * Constructs a new CancelOfferNftMessage.
3577
+ * @memberof TW.Aptos.Proto
3578
+ * @classdesc Represents a CancelOfferNftMessage.
3579
+ * @implements ICancelOfferNftMessage
3580
+ * @constructor
3581
+ * @param {TW.Aptos.Proto.ICancelOfferNftMessage=} [properties] Properties to set
3582
+ */
3583
+ function CancelOfferNftMessage(properties) {
3584
+ if (properties)
3585
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3586
+ if (properties[keys[i]] != null)
3587
+ this[keys[i]] = properties[keys[i]];
3588
+ }
3589
+
3590
+ /**
3591
+ * CancelOfferNftMessage receiver.
3592
+ * @member {string} receiver
3593
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3594
+ * @instance
3595
+ */
3596
+ CancelOfferNftMessage.prototype.receiver = "";
3597
+
3598
+ /**
3599
+ * CancelOfferNftMessage creator.
3600
+ * @member {string} creator
3601
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3602
+ * @instance
3603
+ */
3604
+ CancelOfferNftMessage.prototype.creator = "";
3605
+
3606
+ /**
3607
+ * CancelOfferNftMessage collectionName.
3608
+ * @member {string} collectionName
3609
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3610
+ * @instance
3611
+ */
3612
+ CancelOfferNftMessage.prototype.collectionName = "";
3613
+
3614
+ /**
3615
+ * CancelOfferNftMessage name.
3616
+ * @member {string} name
3617
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3618
+ * @instance
3619
+ */
3620
+ CancelOfferNftMessage.prototype.name = "";
3621
+
3622
+ /**
3623
+ * CancelOfferNftMessage propertyVersion.
3624
+ * @member {Long} propertyVersion
3625
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3626
+ * @instance
3627
+ */
3628
+ CancelOfferNftMessage.prototype.propertyVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3629
+
3630
+ /**
3631
+ * Creates a new CancelOfferNftMessage instance using the specified properties.
3632
+ * @function create
3633
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3634
+ * @static
3635
+ * @param {TW.Aptos.Proto.ICancelOfferNftMessage=} [properties] Properties to set
3636
+ * @returns {TW.Aptos.Proto.CancelOfferNftMessage} CancelOfferNftMessage instance
3637
+ */
3638
+ CancelOfferNftMessage.create = function create(properties) {
3639
+ return new CancelOfferNftMessage(properties);
3640
+ };
3641
+
3642
+ /**
3643
+ * Encodes the specified CancelOfferNftMessage message. Does not implicitly {@link TW.Aptos.Proto.CancelOfferNftMessage.verify|verify} messages.
3644
+ * @function encode
3645
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3646
+ * @static
3647
+ * @param {TW.Aptos.Proto.ICancelOfferNftMessage} message CancelOfferNftMessage message or plain object to encode
3648
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3649
+ * @returns {$protobuf.Writer} Writer
3650
+ */
3651
+ CancelOfferNftMessage.encode = function encode(message, writer) {
3652
+ if (!writer)
3653
+ writer = $Writer.create();
3654
+ if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver"))
3655
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.receiver);
3656
+ if (message.creator != null && Object.hasOwnProperty.call(message, "creator"))
3657
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.creator);
3658
+ if (message.collectionName != null && Object.hasOwnProperty.call(message, "collectionName"))
3659
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionName);
3660
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
3661
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
3662
+ if (message.propertyVersion != null && Object.hasOwnProperty.call(message, "propertyVersion"))
3663
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.propertyVersion);
3664
+ return writer;
3665
+ };
3666
+
3667
+ /**
3668
+ * Decodes a CancelOfferNftMessage message from the specified reader or buffer.
3669
+ * @function decode
3670
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3671
+ * @static
3672
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3673
+ * @param {number} [length] Message length if known beforehand
3674
+ * @returns {TW.Aptos.Proto.CancelOfferNftMessage} CancelOfferNftMessage
3675
+ * @throws {Error} If the payload is not a reader or valid buffer
3676
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3677
+ */
3678
+ CancelOfferNftMessage.decode = function decode(reader, length) {
3679
+ if (!(reader instanceof $Reader))
3680
+ reader = $Reader.create(reader);
3681
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.CancelOfferNftMessage();
3682
+ while (reader.pos < end) {
3683
+ var tag = reader.uint32();
3684
+ switch (tag >>> 3) {
3685
+ case 1:
3686
+ message.receiver = reader.string();
3687
+ break;
3688
+ case 2:
3689
+ message.creator = reader.string();
3690
+ break;
3691
+ case 3:
3692
+ message.collectionName = reader.string();
3693
+ break;
3694
+ case 4:
3695
+ message.name = reader.string();
3696
+ break;
3697
+ case 5:
3698
+ message.propertyVersion = reader.uint64();
3699
+ break;
3700
+ default:
3701
+ reader.skipType(tag & 7);
3702
+ break;
3703
+ }
3704
+ }
3705
+ return message;
3706
+ };
3707
+
3708
+ /**
3709
+ * Verifies a CancelOfferNftMessage message.
3710
+ * @function verify
3711
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3712
+ * @static
3713
+ * @param {Object.<string,*>} message Plain object to verify
3714
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3715
+ */
3716
+ CancelOfferNftMessage.verify = function verify(message) {
3717
+ if (typeof message !== "object" || message === null)
3718
+ return "object expected";
3719
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
3720
+ if (!$util.isString(message.receiver))
3721
+ return "receiver: string expected";
3722
+ if (message.creator != null && message.hasOwnProperty("creator"))
3723
+ if (!$util.isString(message.creator))
3724
+ return "creator: string expected";
3725
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3726
+ if (!$util.isString(message.collectionName))
3727
+ return "collectionName: string expected";
3728
+ if (message.name != null && message.hasOwnProperty("name"))
3729
+ if (!$util.isString(message.name))
3730
+ return "name: string expected";
3731
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3732
+ if (!$util.isInteger(message.propertyVersion) && !(message.propertyVersion && $util.isInteger(message.propertyVersion.low) && $util.isInteger(message.propertyVersion.high)))
3733
+ return "propertyVersion: integer|Long expected";
3734
+ return null;
3735
+ };
3736
+
3737
+ /**
3738
+ * Creates a CancelOfferNftMessage message from a plain object. Also converts values to their respective internal types.
3739
+ * @function fromObject
3740
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3741
+ * @static
3742
+ * @param {Object.<string,*>} object Plain object
3743
+ * @returns {TW.Aptos.Proto.CancelOfferNftMessage} CancelOfferNftMessage
3744
+ */
3745
+ CancelOfferNftMessage.fromObject = function fromObject(object) {
3746
+ if (object instanceof $root.TW.Aptos.Proto.CancelOfferNftMessage)
3747
+ return object;
3748
+ var message = new $root.TW.Aptos.Proto.CancelOfferNftMessage();
3749
+ if (object.receiver != null)
3750
+ message.receiver = String(object.receiver);
3751
+ if (object.creator != null)
3752
+ message.creator = String(object.creator);
3753
+ if (object.collectionName != null)
3754
+ message.collectionName = String(object.collectionName);
3755
+ if (object.name != null)
3756
+ message.name = String(object.name);
3757
+ if (object.propertyVersion != null)
3758
+ if ($util.Long)
3759
+ (message.propertyVersion = $util.Long.fromValue(object.propertyVersion)).unsigned = true;
3760
+ else if (typeof object.propertyVersion === "string")
3761
+ message.propertyVersion = parseInt(object.propertyVersion, 10);
3762
+ else if (typeof object.propertyVersion === "number")
3763
+ message.propertyVersion = object.propertyVersion;
3764
+ else if (typeof object.propertyVersion === "object")
3765
+ message.propertyVersion = new $util.LongBits(object.propertyVersion.low >>> 0, object.propertyVersion.high >>> 0).toNumber(true);
3766
+ return message;
3767
+ };
3768
+
3769
+ /**
3770
+ * Creates a plain object from a CancelOfferNftMessage message. Also converts values to other types if specified.
3771
+ * @function toObject
3772
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3773
+ * @static
3774
+ * @param {TW.Aptos.Proto.CancelOfferNftMessage} message CancelOfferNftMessage
3775
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3776
+ * @returns {Object.<string,*>} Plain object
3777
+ */
3778
+ CancelOfferNftMessage.toObject = function toObject(message, options) {
3779
+ if (!options)
3780
+ options = {};
3781
+ var object = {};
3782
+ if (options.defaults) {
3783
+ object.receiver = "";
3784
+ object.creator = "";
3785
+ object.collectionName = "";
3786
+ object.name = "";
3787
+ if ($util.Long) {
3788
+ var long = new $util.Long(0, 0, true);
3789
+ object.propertyVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3790
+ } else
3791
+ object.propertyVersion = options.longs === String ? "0" : 0;
3792
+ }
3793
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
3794
+ object.receiver = message.receiver;
3795
+ if (message.creator != null && message.hasOwnProperty("creator"))
3796
+ object.creator = message.creator;
3797
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3798
+ object.collectionName = message.collectionName;
3799
+ if (message.name != null && message.hasOwnProperty("name"))
3800
+ object.name = message.name;
3801
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3802
+ if (typeof message.propertyVersion === "number")
3803
+ object.propertyVersion = options.longs === String ? String(message.propertyVersion) : message.propertyVersion;
3804
+ else
3805
+ object.propertyVersion = options.longs === String ? $util.Long.prototype.toString.call(message.propertyVersion) : options.longs === Number ? new $util.LongBits(message.propertyVersion.low >>> 0, message.propertyVersion.high >>> 0).toNumber(true) : message.propertyVersion;
3806
+ return object;
3807
+ };
3808
+
3809
+ /**
3810
+ * Converts this CancelOfferNftMessage to JSON.
3811
+ * @function toJSON
3812
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3813
+ * @instance
3814
+ * @returns {Object.<string,*>} JSON object
3815
+ */
3816
+ CancelOfferNftMessage.prototype.toJSON = function toJSON() {
3817
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3818
+ };
3819
+
3820
+ return CancelOfferNftMessage;
3821
+ })();
3822
+
3823
+ Proto.ClaimNftMessage = (function() {
3824
+
3825
+ /**
3826
+ * Properties of a ClaimNftMessage.
3827
+ * @memberof TW.Aptos.Proto
3828
+ * @interface IClaimNftMessage
3829
+ * @property {string|null} [sender] ClaimNftMessage sender
3830
+ * @property {string|null} [creator] ClaimNftMessage creator
3831
+ * @property {string|null} [collectionName] ClaimNftMessage collectionName
3832
+ * @property {string|null} [name] ClaimNftMessage name
3833
+ * @property {Long|null} [propertyVersion] ClaimNftMessage propertyVersion
3834
+ */
3835
+
3836
+ /**
3837
+ * Constructs a new ClaimNftMessage.
3838
+ * @memberof TW.Aptos.Proto
3839
+ * @classdesc Represents a ClaimNftMessage.
3840
+ * @implements IClaimNftMessage
3841
+ * @constructor
3842
+ * @param {TW.Aptos.Proto.IClaimNftMessage=} [properties] Properties to set
3843
+ */
3844
+ function ClaimNftMessage(properties) {
3845
+ if (properties)
3846
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3847
+ if (properties[keys[i]] != null)
3848
+ this[keys[i]] = properties[keys[i]];
3849
+ }
3850
+
3851
+ /**
3852
+ * ClaimNftMessage sender.
3853
+ * @member {string} sender
3854
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3855
+ * @instance
3856
+ */
3857
+ ClaimNftMessage.prototype.sender = "";
3858
+
3859
+ /**
3860
+ * ClaimNftMessage creator.
3861
+ * @member {string} creator
3862
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3863
+ * @instance
3864
+ */
3865
+ ClaimNftMessage.prototype.creator = "";
3866
+
3867
+ /**
3868
+ * ClaimNftMessage collectionName.
3869
+ * @member {string} collectionName
3870
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3871
+ * @instance
3872
+ */
3873
+ ClaimNftMessage.prototype.collectionName = "";
3874
+
3875
+ /**
3876
+ * ClaimNftMessage name.
3877
+ * @member {string} name
3878
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3879
+ * @instance
3880
+ */
3881
+ ClaimNftMessage.prototype.name = "";
3882
+
3883
+ /**
3884
+ * ClaimNftMessage propertyVersion.
3885
+ * @member {Long} propertyVersion
3886
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3887
+ * @instance
3888
+ */
3889
+ ClaimNftMessage.prototype.propertyVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3890
+
3891
+ /**
3892
+ * Creates a new ClaimNftMessage instance using the specified properties.
3893
+ * @function create
3894
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3895
+ * @static
3896
+ * @param {TW.Aptos.Proto.IClaimNftMessage=} [properties] Properties to set
3897
+ * @returns {TW.Aptos.Proto.ClaimNftMessage} ClaimNftMessage instance
3898
+ */
3899
+ ClaimNftMessage.create = function create(properties) {
3900
+ return new ClaimNftMessage(properties);
3901
+ };
3902
+
3903
+ /**
3904
+ * Encodes the specified ClaimNftMessage message. Does not implicitly {@link TW.Aptos.Proto.ClaimNftMessage.verify|verify} messages.
3905
+ * @function encode
3906
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3907
+ * @static
3908
+ * @param {TW.Aptos.Proto.IClaimNftMessage} message ClaimNftMessage message or plain object to encode
3909
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3910
+ * @returns {$protobuf.Writer} Writer
3911
+ */
3912
+ ClaimNftMessage.encode = function encode(message, writer) {
3913
+ if (!writer)
3914
+ writer = $Writer.create();
3915
+ if (message.sender != null && Object.hasOwnProperty.call(message, "sender"))
3916
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender);
3917
+ if (message.creator != null && Object.hasOwnProperty.call(message, "creator"))
3918
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.creator);
3919
+ if (message.collectionName != null && Object.hasOwnProperty.call(message, "collectionName"))
3920
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionName);
3921
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
3922
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
3923
+ if (message.propertyVersion != null && Object.hasOwnProperty.call(message, "propertyVersion"))
3924
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.propertyVersion);
3925
+ return writer;
3926
+ };
3927
+
3928
+ /**
3929
+ * Decodes a ClaimNftMessage message from the specified reader or buffer.
3930
+ * @function decode
3931
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3932
+ * @static
3933
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3934
+ * @param {number} [length] Message length if known beforehand
3935
+ * @returns {TW.Aptos.Proto.ClaimNftMessage} ClaimNftMessage
3936
+ * @throws {Error} If the payload is not a reader or valid buffer
3937
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3938
+ */
3939
+ ClaimNftMessage.decode = function decode(reader, length) {
3940
+ if (!(reader instanceof $Reader))
3941
+ reader = $Reader.create(reader);
3942
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.ClaimNftMessage();
3943
+ while (reader.pos < end) {
3944
+ var tag = reader.uint32();
3945
+ switch (tag >>> 3) {
3946
+ case 1:
3947
+ message.sender = reader.string();
3948
+ break;
3949
+ case 2:
3950
+ message.creator = reader.string();
3951
+ break;
3952
+ case 3:
3953
+ message.collectionName = reader.string();
3954
+ break;
3955
+ case 4:
3956
+ message.name = reader.string();
3957
+ break;
3958
+ case 5:
3959
+ message.propertyVersion = reader.uint64();
3960
+ break;
3961
+ default:
3962
+ reader.skipType(tag & 7);
3963
+ break;
3964
+ }
3965
+ }
3966
+ return message;
3967
+ };
3968
+
3969
+ /**
3970
+ * Verifies a ClaimNftMessage message.
3971
+ * @function verify
3972
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3973
+ * @static
3974
+ * @param {Object.<string,*>} message Plain object to verify
3975
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3976
+ */
3977
+ ClaimNftMessage.verify = function verify(message) {
3978
+ if (typeof message !== "object" || message === null)
3979
+ return "object expected";
3980
+ if (message.sender != null && message.hasOwnProperty("sender"))
3981
+ if (!$util.isString(message.sender))
3982
+ return "sender: string expected";
3983
+ if (message.creator != null && message.hasOwnProperty("creator"))
3984
+ if (!$util.isString(message.creator))
3985
+ return "creator: string expected";
3986
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3987
+ if (!$util.isString(message.collectionName))
3988
+ return "collectionName: string expected";
3989
+ if (message.name != null && message.hasOwnProperty("name"))
3990
+ if (!$util.isString(message.name))
3991
+ return "name: string expected";
3992
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3993
+ if (!$util.isInteger(message.propertyVersion) && !(message.propertyVersion && $util.isInteger(message.propertyVersion.low) && $util.isInteger(message.propertyVersion.high)))
3994
+ return "propertyVersion: integer|Long expected";
3995
+ return null;
3996
+ };
3997
+
3998
+ /**
3999
+ * Creates a ClaimNftMessage message from a plain object. Also converts values to their respective internal types.
4000
+ * @function fromObject
4001
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
4002
+ * @static
4003
+ * @param {Object.<string,*>} object Plain object
4004
+ * @returns {TW.Aptos.Proto.ClaimNftMessage} ClaimNftMessage
4005
+ */
4006
+ ClaimNftMessage.fromObject = function fromObject(object) {
4007
+ if (object instanceof $root.TW.Aptos.Proto.ClaimNftMessage)
4008
+ return object;
4009
+ var message = new $root.TW.Aptos.Proto.ClaimNftMessage();
4010
+ if (object.sender != null)
4011
+ message.sender = String(object.sender);
4012
+ if (object.creator != null)
4013
+ message.creator = String(object.creator);
4014
+ if (object.collectionName != null)
4015
+ message.collectionName = String(object.collectionName);
4016
+ if (object.name != null)
4017
+ message.name = String(object.name);
4018
+ if (object.propertyVersion != null)
4019
+ if ($util.Long)
4020
+ (message.propertyVersion = $util.Long.fromValue(object.propertyVersion)).unsigned = true;
4021
+ else if (typeof object.propertyVersion === "string")
4022
+ message.propertyVersion = parseInt(object.propertyVersion, 10);
4023
+ else if (typeof object.propertyVersion === "number")
4024
+ message.propertyVersion = object.propertyVersion;
4025
+ else if (typeof object.propertyVersion === "object")
4026
+ message.propertyVersion = new $util.LongBits(object.propertyVersion.low >>> 0, object.propertyVersion.high >>> 0).toNumber(true);
4027
+ return message;
4028
+ };
4029
+
4030
+ /**
4031
+ * Creates a plain object from a ClaimNftMessage message. Also converts values to other types if specified.
4032
+ * @function toObject
4033
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
4034
+ * @static
4035
+ * @param {TW.Aptos.Proto.ClaimNftMessage} message ClaimNftMessage
4036
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4037
+ * @returns {Object.<string,*>} Plain object
4038
+ */
4039
+ ClaimNftMessage.toObject = function toObject(message, options) {
4040
+ if (!options)
4041
+ options = {};
4042
+ var object = {};
4043
+ if (options.defaults) {
4044
+ object.sender = "";
4045
+ object.creator = "";
4046
+ object.collectionName = "";
4047
+ object.name = "";
4048
+ if ($util.Long) {
4049
+ var long = new $util.Long(0, 0, true);
4050
+ object.propertyVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4051
+ } else
4052
+ object.propertyVersion = options.longs === String ? "0" : 0;
4053
+ }
4054
+ if (message.sender != null && message.hasOwnProperty("sender"))
4055
+ object.sender = message.sender;
4056
+ if (message.creator != null && message.hasOwnProperty("creator"))
4057
+ object.creator = message.creator;
4058
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
4059
+ object.collectionName = message.collectionName;
4060
+ if (message.name != null && message.hasOwnProperty("name"))
4061
+ object.name = message.name;
4062
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
4063
+ if (typeof message.propertyVersion === "number")
4064
+ object.propertyVersion = options.longs === String ? String(message.propertyVersion) : message.propertyVersion;
4065
+ else
4066
+ object.propertyVersion = options.longs === String ? $util.Long.prototype.toString.call(message.propertyVersion) : options.longs === Number ? new $util.LongBits(message.propertyVersion.low >>> 0, message.propertyVersion.high >>> 0).toNumber(true) : message.propertyVersion;
4067
+ return object;
4068
+ };
4069
+
4070
+ /**
4071
+ * Converts this ClaimNftMessage to JSON.
4072
+ * @function toJSON
4073
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
4074
+ * @instance
4075
+ * @returns {Object.<string,*>} JSON object
4076
+ */
4077
+ ClaimNftMessage.prototype.toJSON = function toJSON() {
4078
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4079
+ };
4080
+
4081
+ return ClaimNftMessage;
4082
+ })();
4083
+
4084
+ Proto.NftMessage = (function() {
4085
+
4086
+ /**
4087
+ * Properties of a NftMessage.
4088
+ * @memberof TW.Aptos.Proto
4089
+ * @interface INftMessage
4090
+ * @property {TW.Aptos.Proto.IOfferNftMessage|null} [offerNft] NftMessage offerNft
4091
+ * @property {TW.Aptos.Proto.ICancelOfferNftMessage|null} [cancelOfferNft] NftMessage cancelOfferNft
4092
+ * @property {TW.Aptos.Proto.IClaimNftMessage|null} [claimNft] NftMessage claimNft
4093
+ */
4094
+
4095
+ /**
4096
+ * Constructs a new NftMessage.
4097
+ * @memberof TW.Aptos.Proto
4098
+ * @classdesc Represents a NftMessage.
4099
+ * @implements INftMessage
4100
+ * @constructor
4101
+ * @param {TW.Aptos.Proto.INftMessage=} [properties] Properties to set
4102
+ */
4103
+ function NftMessage(properties) {
4104
+ if (properties)
4105
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4106
+ if (properties[keys[i]] != null)
4107
+ this[keys[i]] = properties[keys[i]];
4108
+ }
4109
+
4110
+ /**
4111
+ * NftMessage offerNft.
4112
+ * @member {TW.Aptos.Proto.IOfferNftMessage|null|undefined} offerNft
4113
+ * @memberof TW.Aptos.Proto.NftMessage
4114
+ * @instance
4115
+ */
4116
+ NftMessage.prototype.offerNft = null;
4117
+
4118
+ /**
4119
+ * NftMessage cancelOfferNft.
4120
+ * @member {TW.Aptos.Proto.ICancelOfferNftMessage|null|undefined} cancelOfferNft
4121
+ * @memberof TW.Aptos.Proto.NftMessage
4122
+ * @instance
4123
+ */
4124
+ NftMessage.prototype.cancelOfferNft = null;
4125
+
4126
+ /**
4127
+ * NftMessage claimNft.
4128
+ * @member {TW.Aptos.Proto.IClaimNftMessage|null|undefined} claimNft
4129
+ * @memberof TW.Aptos.Proto.NftMessage
4130
+ * @instance
4131
+ */
4132
+ NftMessage.prototype.claimNft = null;
4133
+
4134
+ // OneOf field names bound to virtual getters and setters
4135
+ var $oneOfFields;
4136
+
4137
+ /**
4138
+ * NftMessage nftTransactionPayload.
4139
+ * @member {"offerNft"|"cancelOfferNft"|"claimNft"|undefined} nftTransactionPayload
4140
+ * @memberof TW.Aptos.Proto.NftMessage
4141
+ * @instance
4142
+ */
4143
+ Object.defineProperty(NftMessage.prototype, "nftTransactionPayload", {
4144
+ get: $util.oneOfGetter($oneOfFields = ["offerNft", "cancelOfferNft", "claimNft"]),
4145
+ set: $util.oneOfSetter($oneOfFields)
4146
+ });
4147
+
4148
+ /**
4149
+ * Creates a new NftMessage instance using the specified properties.
4150
+ * @function create
4151
+ * @memberof TW.Aptos.Proto.NftMessage
4152
+ * @static
4153
+ * @param {TW.Aptos.Proto.INftMessage=} [properties] Properties to set
4154
+ * @returns {TW.Aptos.Proto.NftMessage} NftMessage instance
4155
+ */
4156
+ NftMessage.create = function create(properties) {
4157
+ return new NftMessage(properties);
4158
+ };
4159
+
4160
+ /**
4161
+ * Encodes the specified NftMessage message. Does not implicitly {@link TW.Aptos.Proto.NftMessage.verify|verify} messages.
4162
+ * @function encode
4163
+ * @memberof TW.Aptos.Proto.NftMessage
4164
+ * @static
4165
+ * @param {TW.Aptos.Proto.INftMessage} message NftMessage message or plain object to encode
4166
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4167
+ * @returns {$protobuf.Writer} Writer
4168
+ */
4169
+ NftMessage.encode = function encode(message, writer) {
4170
+ if (!writer)
4171
+ writer = $Writer.create();
4172
+ if (message.offerNft != null && Object.hasOwnProperty.call(message, "offerNft"))
4173
+ $root.TW.Aptos.Proto.OfferNftMessage.encode(message.offerNft, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
4174
+ if (message.cancelOfferNft != null && Object.hasOwnProperty.call(message, "cancelOfferNft"))
4175
+ $root.TW.Aptos.Proto.CancelOfferNftMessage.encode(message.cancelOfferNft, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
4176
+ if (message.claimNft != null && Object.hasOwnProperty.call(message, "claimNft"))
4177
+ $root.TW.Aptos.Proto.ClaimNftMessage.encode(message.claimNft, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
4178
+ return writer;
4179
+ };
4180
+
4181
+ /**
4182
+ * Decodes a NftMessage message from the specified reader or buffer.
4183
+ * @function decode
4184
+ * @memberof TW.Aptos.Proto.NftMessage
4185
+ * @static
4186
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4187
+ * @param {number} [length] Message length if known beforehand
4188
+ * @returns {TW.Aptos.Proto.NftMessage} NftMessage
4189
+ * @throws {Error} If the payload is not a reader or valid buffer
4190
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4191
+ */
4192
+ NftMessage.decode = function decode(reader, length) {
4193
+ if (!(reader instanceof $Reader))
4194
+ reader = $Reader.create(reader);
4195
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.NftMessage();
4196
+ while (reader.pos < end) {
4197
+ var tag = reader.uint32();
4198
+ switch (tag >>> 3) {
4199
+ case 1:
4200
+ message.offerNft = $root.TW.Aptos.Proto.OfferNftMessage.decode(reader, reader.uint32());
4201
+ break;
4202
+ case 2:
4203
+ message.cancelOfferNft = $root.TW.Aptos.Proto.CancelOfferNftMessage.decode(reader, reader.uint32());
4204
+ break;
4205
+ case 3:
4206
+ message.claimNft = $root.TW.Aptos.Proto.ClaimNftMessage.decode(reader, reader.uint32());
4207
+ break;
4208
+ default:
4209
+ reader.skipType(tag & 7);
4210
+ break;
4211
+ }
4212
+ }
4213
+ return message;
4214
+ };
4215
+
4216
+ /**
4217
+ * Verifies a NftMessage message.
4218
+ * @function verify
4219
+ * @memberof TW.Aptos.Proto.NftMessage
4220
+ * @static
4221
+ * @param {Object.<string,*>} message Plain object to verify
4222
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4223
+ */
4224
+ NftMessage.verify = function verify(message) {
4225
+ if (typeof message !== "object" || message === null)
4226
+ return "object expected";
4227
+ var properties = {};
4228
+ if (message.offerNft != null && message.hasOwnProperty("offerNft")) {
4229
+ properties.nftTransactionPayload = 1;
4230
+ {
4231
+ var error = $root.TW.Aptos.Proto.OfferNftMessage.verify(message.offerNft);
4232
+ if (error)
4233
+ return "offerNft." + error;
4234
+ }
4235
+ }
4236
+ if (message.cancelOfferNft != null && message.hasOwnProperty("cancelOfferNft")) {
4237
+ if (properties.nftTransactionPayload === 1)
4238
+ return "nftTransactionPayload: multiple values";
4239
+ properties.nftTransactionPayload = 1;
4240
+ {
4241
+ var error = $root.TW.Aptos.Proto.CancelOfferNftMessage.verify(message.cancelOfferNft);
4242
+ if (error)
4243
+ return "cancelOfferNft." + error;
4244
+ }
4245
+ }
4246
+ if (message.claimNft != null && message.hasOwnProperty("claimNft")) {
4247
+ if (properties.nftTransactionPayload === 1)
4248
+ return "nftTransactionPayload: multiple values";
4249
+ properties.nftTransactionPayload = 1;
4250
+ {
4251
+ var error = $root.TW.Aptos.Proto.ClaimNftMessage.verify(message.claimNft);
4252
+ if (error)
4253
+ return "claimNft." + error;
4254
+ }
4255
+ }
4256
+ return null;
4257
+ };
4258
+
4259
+ /**
4260
+ * Creates a NftMessage message from a plain object. Also converts values to their respective internal types.
4261
+ * @function fromObject
4262
+ * @memberof TW.Aptos.Proto.NftMessage
4263
+ * @static
4264
+ * @param {Object.<string,*>} object Plain object
4265
+ * @returns {TW.Aptos.Proto.NftMessage} NftMessage
4266
+ */
4267
+ NftMessage.fromObject = function fromObject(object) {
4268
+ if (object instanceof $root.TW.Aptos.Proto.NftMessage)
4269
+ return object;
4270
+ var message = new $root.TW.Aptos.Proto.NftMessage();
4271
+ if (object.offerNft != null) {
4272
+ if (typeof object.offerNft !== "object")
4273
+ throw TypeError(".TW.Aptos.Proto.NftMessage.offerNft: object expected");
4274
+ message.offerNft = $root.TW.Aptos.Proto.OfferNftMessage.fromObject(object.offerNft);
4275
+ }
4276
+ if (object.cancelOfferNft != null) {
4277
+ if (typeof object.cancelOfferNft !== "object")
4278
+ throw TypeError(".TW.Aptos.Proto.NftMessage.cancelOfferNft: object expected");
4279
+ message.cancelOfferNft = $root.TW.Aptos.Proto.CancelOfferNftMessage.fromObject(object.cancelOfferNft);
4280
+ }
4281
+ if (object.claimNft != null) {
4282
+ if (typeof object.claimNft !== "object")
4283
+ throw TypeError(".TW.Aptos.Proto.NftMessage.claimNft: object expected");
4284
+ message.claimNft = $root.TW.Aptos.Proto.ClaimNftMessage.fromObject(object.claimNft);
4285
+ }
4286
+ return message;
4287
+ };
4288
+
4289
+ /**
4290
+ * Creates a plain object from a NftMessage message. Also converts values to other types if specified.
4291
+ * @function toObject
4292
+ * @memberof TW.Aptos.Proto.NftMessage
4293
+ * @static
4294
+ * @param {TW.Aptos.Proto.NftMessage} message NftMessage
4295
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4296
+ * @returns {Object.<string,*>} Plain object
4297
+ */
4298
+ NftMessage.toObject = function toObject(message, options) {
4299
+ if (!options)
4300
+ options = {};
4301
+ var object = {};
4302
+ if (message.offerNft != null && message.hasOwnProperty("offerNft")) {
4303
+ object.offerNft = $root.TW.Aptos.Proto.OfferNftMessage.toObject(message.offerNft, options);
4304
+ if (options.oneofs)
4305
+ object.nftTransactionPayload = "offerNft";
4306
+ }
4307
+ if (message.cancelOfferNft != null && message.hasOwnProperty("cancelOfferNft")) {
4308
+ object.cancelOfferNft = $root.TW.Aptos.Proto.CancelOfferNftMessage.toObject(message.cancelOfferNft, options);
4309
+ if (options.oneofs)
4310
+ object.nftTransactionPayload = "cancelOfferNft";
4311
+ }
4312
+ if (message.claimNft != null && message.hasOwnProperty("claimNft")) {
4313
+ object.claimNft = $root.TW.Aptos.Proto.ClaimNftMessage.toObject(message.claimNft, options);
4314
+ if (options.oneofs)
4315
+ object.nftTransactionPayload = "claimNft";
4316
+ }
4317
+ return object;
4318
+ };
4319
+
4320
+ /**
4321
+ * Converts this NftMessage to JSON.
4322
+ * @function toJSON
4323
+ * @memberof TW.Aptos.Proto.NftMessage
4324
+ * @instance
4325
+ * @returns {Object.<string,*>} JSON object
4326
+ */
4327
+ NftMessage.prototype.toJSON = function toJSON() {
4328
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4329
+ };
4330
+
4331
+ return NftMessage;
4332
+ })();
4333
+
4334
+ Proto.SigningInput = (function() {
4335
+
4336
+ /**
4337
+ * Properties of a SigningInput.
4338
+ * @memberof TW.Aptos.Proto
4339
+ * @interface ISigningInput
4340
+ * @property {string|null} [sender] SigningInput sender
4341
+ * @property {Long|null} [sequenceNumber] SigningInput sequenceNumber
4342
+ * @property {TW.Aptos.Proto.ITransferMessage|null} [transfer] SigningInput transfer
4343
+ * @property {TW.Aptos.Proto.ITokenTransferMessage|null} [tokenTransfer] SigningInput tokenTransfer
4344
+ * @property {TW.Aptos.Proto.ICreateAccountMessage|null} [createAccount] SigningInput createAccount
4345
+ * @property {TW.Aptos.Proto.INftMessage|null} [nftMessage] SigningInput nftMessage
4346
+ * @property {Long|null} [maxGasAmount] SigningInput maxGasAmount
4347
+ * @property {Long|null} [gasUnitPrice] SigningInput gasUnitPrice
4348
+ * @property {Long|null} [expirationTimestampSecs] SigningInput expirationTimestampSecs
4349
+ * @property {number|null} [chainId] SigningInput chainId
4350
+ * @property {Uint8Array|null} [privateKey] SigningInput privateKey
4351
+ * @property {string|null} [anyEncoded] SigningInput anyEncoded
4352
+ */
4353
+
4354
+ /**
4355
+ * Constructs a new SigningInput.
4356
+ * @memberof TW.Aptos.Proto
4357
+ * @classdesc Represents a SigningInput.
4358
+ * @implements ISigningInput
4359
+ * @constructor
4360
+ * @param {TW.Aptos.Proto.ISigningInput=} [properties] Properties to set
4361
+ */
4362
+ function SigningInput(properties) {
4363
+ if (properties)
4364
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4365
+ if (properties[keys[i]] != null)
4366
+ this[keys[i]] = properties[keys[i]];
4367
+ }
4368
+
4369
+ /**
4370
+ * SigningInput sender.
4371
+ * @member {string} sender
4372
+ * @memberof TW.Aptos.Proto.SigningInput
4373
+ * @instance
4374
+ */
4375
+ SigningInput.prototype.sender = "";
4376
+
4377
+ /**
4378
+ * SigningInput sequenceNumber.
4379
+ * @member {Long} sequenceNumber
4380
+ * @memberof TW.Aptos.Proto.SigningInput
4381
+ * @instance
4382
+ */
4383
+ SigningInput.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
4384
+
4385
+ /**
4386
+ * SigningInput transfer.
4387
+ * @member {TW.Aptos.Proto.ITransferMessage|null|undefined} transfer
4388
+ * @memberof TW.Aptos.Proto.SigningInput
4389
+ * @instance
4390
+ */
4391
+ SigningInput.prototype.transfer = null;
4392
+
4393
+ /**
4394
+ * SigningInput tokenTransfer.
4395
+ * @member {TW.Aptos.Proto.ITokenTransferMessage|null|undefined} tokenTransfer
4396
+ * @memberof TW.Aptos.Proto.SigningInput
4397
+ * @instance
4398
+ */
4399
+ SigningInput.prototype.tokenTransfer = null;
4400
+
4401
+ /**
4402
+ * SigningInput createAccount.
4403
+ * @member {TW.Aptos.Proto.ICreateAccountMessage|null|undefined} createAccount
4404
+ * @memberof TW.Aptos.Proto.SigningInput
4405
+ * @instance
4406
+ */
4407
+ SigningInput.prototype.createAccount = null;
4408
+
4409
+ /**
4410
+ * SigningInput nftMessage.
4411
+ * @member {TW.Aptos.Proto.INftMessage|null|undefined} nftMessage
4412
+ * @memberof TW.Aptos.Proto.SigningInput
4413
+ * @instance
4414
+ */
4415
+ SigningInput.prototype.nftMessage = null;
4416
+
4417
+ /**
4418
+ * SigningInput maxGasAmount.
4419
+ * @member {Long} maxGasAmount
4420
+ * @memberof TW.Aptos.Proto.SigningInput
4421
+ * @instance
4422
+ */
4423
+ SigningInput.prototype.maxGasAmount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4424
+
4425
+ /**
4426
+ * SigningInput gasUnitPrice.
4427
+ * @member {Long} gasUnitPrice
4428
+ * @memberof TW.Aptos.Proto.SigningInput
4429
+ * @instance
4430
+ */
4431
+ SigningInput.prototype.gasUnitPrice = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4432
+
4433
+ /**
4434
+ * SigningInput expirationTimestampSecs.
4435
+ * @member {Long} expirationTimestampSecs
4436
+ * @memberof TW.Aptos.Proto.SigningInput
4437
+ * @instance
4438
+ */
4439
+ SigningInput.prototype.expirationTimestampSecs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4440
+
4441
+ /**
4442
+ * SigningInput chainId.
4443
+ * @member {number} chainId
4444
+ * @memberof TW.Aptos.Proto.SigningInput
4445
+ * @instance
4446
+ */
4447
+ SigningInput.prototype.chainId = 0;
4448
+
4449
+ /**
4450
+ * SigningInput privateKey.
4451
+ * @member {Uint8Array} privateKey
4452
+ * @memberof TW.Aptos.Proto.SigningInput
4453
+ * @instance
4454
+ */
4455
+ SigningInput.prototype.privateKey = $util.newBuffer([]);
4456
+
4457
+ /**
4458
+ * SigningInput anyEncoded.
4459
+ * @member {string} anyEncoded
4460
+ * @memberof TW.Aptos.Proto.SigningInput
4461
+ * @instance
4462
+ */
4463
+ SigningInput.prototype.anyEncoded = "";
4464
+
4465
+ // OneOf field names bound to virtual getters and setters
4466
+ var $oneOfFields;
4467
+
4468
+ /**
4469
+ * SigningInput transactionPayload.
4470
+ * @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|undefined} transactionPayload
4471
+ * @memberof TW.Aptos.Proto.SigningInput
4472
+ * @instance
4473
+ */
4474
+ Object.defineProperty(SigningInput.prototype, "transactionPayload", {
4475
+ get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage"]),
4476
+ set: $util.oneOfSetter($oneOfFields)
4477
+ });
4478
+
4479
+ /**
4480
+ * Creates a new SigningInput instance using the specified properties.
4481
+ * @function create
4482
+ * @memberof TW.Aptos.Proto.SigningInput
4483
+ * @static
4484
+ * @param {TW.Aptos.Proto.ISigningInput=} [properties] Properties to set
4485
+ * @returns {TW.Aptos.Proto.SigningInput} SigningInput instance
4486
+ */
4487
+ SigningInput.create = function create(properties) {
4488
+ return new SigningInput(properties);
4489
+ };
4490
+
4491
+ /**
4492
+ * Encodes the specified SigningInput message. Does not implicitly {@link TW.Aptos.Proto.SigningInput.verify|verify} messages.
4493
+ * @function encode
4494
+ * @memberof TW.Aptos.Proto.SigningInput
4495
+ * @static
4496
+ * @param {TW.Aptos.Proto.ISigningInput} message SigningInput message or plain object to encode
4497
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4498
+ * @returns {$protobuf.Writer} Writer
4499
+ */
4500
+ SigningInput.encode = function encode(message, writer) {
4501
+ if (!writer)
4502
+ writer = $Writer.create();
4503
+ if (message.sender != null && Object.hasOwnProperty.call(message, "sender"))
4504
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender);
4505
+ if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber"))
4506
+ writer.uint32(/* id 2, wireType 0 =*/16).int64(message.sequenceNumber);
4507
+ if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer"))
4508
+ $root.TW.Aptos.Proto.TransferMessage.encode(message.transfer, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
4509
+ if (message.tokenTransfer != null && Object.hasOwnProperty.call(message, "tokenTransfer"))
4510
+ $root.TW.Aptos.Proto.TokenTransferMessage.encode(message.tokenTransfer, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
4511
+ if (message.createAccount != null && Object.hasOwnProperty.call(message, "createAccount"))
4512
+ $root.TW.Aptos.Proto.CreateAccountMessage.encode(message.createAccount, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
4513
+ if (message.nftMessage != null && Object.hasOwnProperty.call(message, "nftMessage"))
4514
+ $root.TW.Aptos.Proto.NftMessage.encode(message.nftMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
4515
+ if (message.maxGasAmount != null && Object.hasOwnProperty.call(message, "maxGasAmount"))
4516
+ writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.maxGasAmount);
4517
+ if (message.gasUnitPrice != null && Object.hasOwnProperty.call(message, "gasUnitPrice"))
4518
+ writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.gasUnitPrice);
4519
+ if (message.expirationTimestampSecs != null && Object.hasOwnProperty.call(message, "expirationTimestampSecs"))
4520
+ writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.expirationTimestampSecs);
4521
+ if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId"))
4522
+ writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.chainId);
4523
+ if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
4524
+ writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.privateKey);
4525
+ if (message.anyEncoded != null && Object.hasOwnProperty.call(message, "anyEncoded"))
4526
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.anyEncoded);
4527
+ return writer;
4528
+ };
4529
+
4530
+ /**
4531
+ * Decodes a SigningInput message from the specified reader or buffer.
4532
+ * @function decode
4533
+ * @memberof TW.Aptos.Proto.SigningInput
4534
+ * @static
4535
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4536
+ * @param {number} [length] Message length if known beforehand
4537
+ * @returns {TW.Aptos.Proto.SigningInput} SigningInput
4538
+ * @throws {Error} If the payload is not a reader or valid buffer
4539
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4540
+ */
4541
+ SigningInput.decode = function decode(reader, length) {
4542
+ if (!(reader instanceof $Reader))
4543
+ reader = $Reader.create(reader);
4544
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.SigningInput();
4545
+ while (reader.pos < end) {
4546
+ var tag = reader.uint32();
4547
+ switch (tag >>> 3) {
4548
+ case 1:
4549
+ message.sender = reader.string();
4550
+ break;
4551
+ case 2:
4552
+ message.sequenceNumber = reader.int64();
4553
+ break;
4554
+ case 3:
4555
+ message.transfer = $root.TW.Aptos.Proto.TransferMessage.decode(reader, reader.uint32());
4556
+ break;
4557
+ case 4:
4558
+ message.tokenTransfer = $root.TW.Aptos.Proto.TokenTransferMessage.decode(reader, reader.uint32());
4559
+ break;
4560
+ case 5:
4561
+ message.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.decode(reader, reader.uint32());
4562
+ break;
4563
+ case 6:
4564
+ message.nftMessage = $root.TW.Aptos.Proto.NftMessage.decode(reader, reader.uint32());
4565
+ break;
4566
+ case 7:
4567
+ message.maxGasAmount = reader.uint64();
4568
+ break;
4569
+ case 8:
4570
+ message.gasUnitPrice = reader.uint64();
4571
+ break;
4572
+ case 9:
4573
+ message.expirationTimestampSecs = reader.uint64();
4574
+ break;
4575
+ case 10:
4576
+ message.chainId = reader.uint32();
4577
+ break;
4578
+ case 11:
4579
+ message.privateKey = reader.bytes();
4580
+ break;
4581
+ case 12:
4582
+ message.anyEncoded = reader.string();
4583
+ break;
4584
+ default:
4585
+ reader.skipType(tag & 7);
4586
+ break;
4587
+ }
4588
+ }
4589
+ return message;
4590
+ };
4591
+
4592
+ /**
4593
+ * Verifies a SigningInput message.
4594
+ * @function verify
4595
+ * @memberof TW.Aptos.Proto.SigningInput
4596
+ * @static
4597
+ * @param {Object.<string,*>} message Plain object to verify
4598
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4599
+ */
4600
+ SigningInput.verify = function verify(message) {
4601
+ if (typeof message !== "object" || message === null)
4602
+ return "object expected";
4603
+ var properties = {};
4604
+ if (message.sender != null && message.hasOwnProperty("sender"))
4605
+ if (!$util.isString(message.sender))
4606
+ return "sender: string expected";
4607
+ if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
4608
+ if (!$util.isInteger(message.sequenceNumber) && !(message.sequenceNumber && $util.isInteger(message.sequenceNumber.low) && $util.isInteger(message.sequenceNumber.high)))
4609
+ return "sequenceNumber: integer|Long expected";
4610
+ if (message.transfer != null && message.hasOwnProperty("transfer")) {
4611
+ properties.transactionPayload = 1;
4612
+ {
4613
+ var error = $root.TW.Aptos.Proto.TransferMessage.verify(message.transfer);
4614
+ if (error)
4615
+ return "transfer." + error;
4616
+ }
4617
+ }
4618
+ if (message.tokenTransfer != null && message.hasOwnProperty("tokenTransfer")) {
4619
+ if (properties.transactionPayload === 1)
4620
+ return "transactionPayload: multiple values";
4621
+ properties.transactionPayload = 1;
4622
+ {
4623
+ var error = $root.TW.Aptos.Proto.TokenTransferMessage.verify(message.tokenTransfer);
4624
+ if (error)
4625
+ return "tokenTransfer." + error;
4626
+ }
4627
+ }
4628
+ if (message.createAccount != null && message.hasOwnProperty("createAccount")) {
4629
+ if (properties.transactionPayload === 1)
4630
+ return "transactionPayload: multiple values";
4631
+ properties.transactionPayload = 1;
4632
+ {
4633
+ var error = $root.TW.Aptos.Proto.CreateAccountMessage.verify(message.createAccount);
4634
+ if (error)
4635
+ return "createAccount." + error;
4636
+ }
4637
+ }
4638
+ if (message.nftMessage != null && message.hasOwnProperty("nftMessage")) {
4639
+ if (properties.transactionPayload === 1)
4640
+ return "transactionPayload: multiple values";
4641
+ properties.transactionPayload = 1;
4642
+ {
4643
+ var error = $root.TW.Aptos.Proto.NftMessage.verify(message.nftMessage);
4644
+ if (error)
4645
+ return "nftMessage." + error;
4646
+ }
4647
+ }
4648
+ if (message.maxGasAmount != null && message.hasOwnProperty("maxGasAmount"))
4649
+ if (!$util.isInteger(message.maxGasAmount) && !(message.maxGasAmount && $util.isInteger(message.maxGasAmount.low) && $util.isInteger(message.maxGasAmount.high)))
4650
+ return "maxGasAmount: integer|Long expected";
4651
+ if (message.gasUnitPrice != null && message.hasOwnProperty("gasUnitPrice"))
4652
+ if (!$util.isInteger(message.gasUnitPrice) && !(message.gasUnitPrice && $util.isInteger(message.gasUnitPrice.low) && $util.isInteger(message.gasUnitPrice.high)))
4653
+ return "gasUnitPrice: integer|Long expected";
4654
+ if (message.expirationTimestampSecs != null && message.hasOwnProperty("expirationTimestampSecs"))
4655
+ if (!$util.isInteger(message.expirationTimestampSecs) && !(message.expirationTimestampSecs && $util.isInteger(message.expirationTimestampSecs.low) && $util.isInteger(message.expirationTimestampSecs.high)))
4656
+ return "expirationTimestampSecs: integer|Long expected";
4657
+ if (message.chainId != null && message.hasOwnProperty("chainId"))
4658
+ if (!$util.isInteger(message.chainId))
4659
+ return "chainId: integer expected";
4660
+ if (message.privateKey != null && message.hasOwnProperty("privateKey"))
4661
+ if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
4662
+ return "privateKey: buffer expected";
4663
+ if (message.anyEncoded != null && message.hasOwnProperty("anyEncoded"))
4664
+ if (!$util.isString(message.anyEncoded))
4665
+ return "anyEncoded: string expected";
4666
+ return null;
4667
+ };
4668
+
4669
+ /**
4670
+ * Creates a SigningInput message from a plain object. Also converts values to their respective internal types.
4671
+ * @function fromObject
4672
+ * @memberof TW.Aptos.Proto.SigningInput
4673
+ * @static
4674
+ * @param {Object.<string,*>} object Plain object
4675
+ * @returns {TW.Aptos.Proto.SigningInput} SigningInput
4676
+ */
4677
+ SigningInput.fromObject = function fromObject(object) {
4678
+ if (object instanceof $root.TW.Aptos.Proto.SigningInput)
4679
+ return object;
4680
+ var message = new $root.TW.Aptos.Proto.SigningInput();
4681
+ if (object.sender != null)
4682
+ message.sender = String(object.sender);
4683
+ if (object.sequenceNumber != null)
4684
+ if ($util.Long)
4685
+ (message.sequenceNumber = $util.Long.fromValue(object.sequenceNumber)).unsigned = false;
4686
+ else if (typeof object.sequenceNumber === "string")
4687
+ message.sequenceNumber = parseInt(object.sequenceNumber, 10);
4688
+ else if (typeof object.sequenceNumber === "number")
4689
+ message.sequenceNumber = object.sequenceNumber;
4690
+ else if (typeof object.sequenceNumber === "object")
4691
+ message.sequenceNumber = new $util.LongBits(object.sequenceNumber.low >>> 0, object.sequenceNumber.high >>> 0).toNumber();
4692
+ if (object.transfer != null) {
4693
+ if (typeof object.transfer !== "object")
4694
+ throw TypeError(".TW.Aptos.Proto.SigningInput.transfer: object expected");
4695
+ message.transfer = $root.TW.Aptos.Proto.TransferMessage.fromObject(object.transfer);
4696
+ }
4697
+ if (object.tokenTransfer != null) {
4698
+ if (typeof object.tokenTransfer !== "object")
4699
+ throw TypeError(".TW.Aptos.Proto.SigningInput.tokenTransfer: object expected");
4700
+ message.tokenTransfer = $root.TW.Aptos.Proto.TokenTransferMessage.fromObject(object.tokenTransfer);
4701
+ }
4702
+ if (object.createAccount != null) {
4703
+ if (typeof object.createAccount !== "object")
4704
+ throw TypeError(".TW.Aptos.Proto.SigningInput.createAccount: object expected");
4705
+ message.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.fromObject(object.createAccount);
4706
+ }
4707
+ if (object.nftMessage != null) {
4708
+ if (typeof object.nftMessage !== "object")
4709
+ throw TypeError(".TW.Aptos.Proto.SigningInput.nftMessage: object expected");
4710
+ message.nftMessage = $root.TW.Aptos.Proto.NftMessage.fromObject(object.nftMessage);
4711
+ }
4712
+ if (object.maxGasAmount != null)
4713
+ if ($util.Long)
4714
+ (message.maxGasAmount = $util.Long.fromValue(object.maxGasAmount)).unsigned = true;
4715
+ else if (typeof object.maxGasAmount === "string")
4716
+ message.maxGasAmount = parseInt(object.maxGasAmount, 10);
4717
+ else if (typeof object.maxGasAmount === "number")
4718
+ message.maxGasAmount = object.maxGasAmount;
4719
+ else if (typeof object.maxGasAmount === "object")
4720
+ message.maxGasAmount = new $util.LongBits(object.maxGasAmount.low >>> 0, object.maxGasAmount.high >>> 0).toNumber(true);
4721
+ if (object.gasUnitPrice != null)
4722
+ if ($util.Long)
4723
+ (message.gasUnitPrice = $util.Long.fromValue(object.gasUnitPrice)).unsigned = true;
4724
+ else if (typeof object.gasUnitPrice === "string")
4725
+ message.gasUnitPrice = parseInt(object.gasUnitPrice, 10);
4726
+ else if (typeof object.gasUnitPrice === "number")
4727
+ message.gasUnitPrice = object.gasUnitPrice;
4728
+ else if (typeof object.gasUnitPrice === "object")
4729
+ message.gasUnitPrice = new $util.LongBits(object.gasUnitPrice.low >>> 0, object.gasUnitPrice.high >>> 0).toNumber(true);
4730
+ if (object.expirationTimestampSecs != null)
4731
+ if ($util.Long)
4732
+ (message.expirationTimestampSecs = $util.Long.fromValue(object.expirationTimestampSecs)).unsigned = true;
4733
+ else if (typeof object.expirationTimestampSecs === "string")
4734
+ message.expirationTimestampSecs = parseInt(object.expirationTimestampSecs, 10);
4735
+ else if (typeof object.expirationTimestampSecs === "number")
4736
+ message.expirationTimestampSecs = object.expirationTimestampSecs;
4737
+ else if (typeof object.expirationTimestampSecs === "object")
4738
+ message.expirationTimestampSecs = new $util.LongBits(object.expirationTimestampSecs.low >>> 0, object.expirationTimestampSecs.high >>> 0).toNumber(true);
4739
+ if (object.chainId != null)
4740
+ message.chainId = object.chainId >>> 0;
4741
+ if (object.privateKey != null)
4742
+ if (typeof object.privateKey === "string")
4743
+ $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
4744
+ else if (object.privateKey.length)
4745
+ message.privateKey = object.privateKey;
4746
+ if (object.anyEncoded != null)
4747
+ message.anyEncoded = String(object.anyEncoded);
4748
+ return message;
4749
+ };
4750
+
4751
+ /**
4752
+ * Creates a plain object from a SigningInput message. Also converts values to other types if specified.
4753
+ * @function toObject
4754
+ * @memberof TW.Aptos.Proto.SigningInput
4755
+ * @static
4756
+ * @param {TW.Aptos.Proto.SigningInput} message SigningInput
4757
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4758
+ * @returns {Object.<string,*>} Plain object
4759
+ */
4760
+ SigningInput.toObject = function toObject(message, options) {
4761
+ if (!options)
4762
+ options = {};
4763
+ var object = {};
4764
+ if (options.defaults) {
4765
+ object.sender = "";
4766
+ if ($util.Long) {
4767
+ var long = new $util.Long(0, 0, false);
4768
+ object.sequenceNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4769
+ } else
4770
+ object.sequenceNumber = options.longs === String ? "0" : 0;
4771
+ if ($util.Long) {
4772
+ var long = new $util.Long(0, 0, true);
4773
+ object.maxGasAmount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4774
+ } else
4775
+ object.maxGasAmount = options.longs === String ? "0" : 0;
4776
+ if ($util.Long) {
4777
+ var long = new $util.Long(0, 0, true);
4778
+ object.gasUnitPrice = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4779
+ } else
4780
+ object.gasUnitPrice = options.longs === String ? "0" : 0;
4781
+ if ($util.Long) {
4782
+ var long = new $util.Long(0, 0, true);
4783
+ object.expirationTimestampSecs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4784
+ } else
4785
+ object.expirationTimestampSecs = options.longs === String ? "0" : 0;
4786
+ object.chainId = 0;
4787
+ if (options.bytes === String)
4788
+ object.privateKey = "";
4789
+ else {
4790
+ object.privateKey = [];
4791
+ if (options.bytes !== Array)
4792
+ object.privateKey = $util.newBuffer(object.privateKey);
4793
+ }
4794
+ object.anyEncoded = "";
4795
+ }
4796
+ if (message.sender != null && message.hasOwnProperty("sender"))
4797
+ object.sender = message.sender;
4798
+ if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
4799
+ if (typeof message.sequenceNumber === "number")
4800
+ object.sequenceNumber = options.longs === String ? String(message.sequenceNumber) : message.sequenceNumber;
4801
+ else
4802
+ object.sequenceNumber = options.longs === String ? $util.Long.prototype.toString.call(message.sequenceNumber) : options.longs === Number ? new $util.LongBits(message.sequenceNumber.low >>> 0, message.sequenceNumber.high >>> 0).toNumber() : message.sequenceNumber;
4803
+ if (message.transfer != null && message.hasOwnProperty("transfer")) {
4804
+ object.transfer = $root.TW.Aptos.Proto.TransferMessage.toObject(message.transfer, options);
4805
+ if (options.oneofs)
4806
+ object.transactionPayload = "transfer";
4807
+ }
4808
+ if (message.tokenTransfer != null && message.hasOwnProperty("tokenTransfer")) {
4809
+ object.tokenTransfer = $root.TW.Aptos.Proto.TokenTransferMessage.toObject(message.tokenTransfer, options);
4810
+ if (options.oneofs)
4811
+ object.transactionPayload = "tokenTransfer";
4812
+ }
4813
+ if (message.createAccount != null && message.hasOwnProperty("createAccount")) {
4814
+ object.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.toObject(message.createAccount, options);
4815
+ if (options.oneofs)
4816
+ object.transactionPayload = "createAccount";
4817
+ }
4818
+ if (message.nftMessage != null && message.hasOwnProperty("nftMessage")) {
4819
+ object.nftMessage = $root.TW.Aptos.Proto.NftMessage.toObject(message.nftMessage, options);
4820
+ if (options.oneofs)
4821
+ object.transactionPayload = "nftMessage";
4822
+ }
4823
+ if (message.maxGasAmount != null && message.hasOwnProperty("maxGasAmount"))
4824
+ if (typeof message.maxGasAmount === "number")
4825
+ object.maxGasAmount = options.longs === String ? String(message.maxGasAmount) : message.maxGasAmount;
4826
+ else
4827
+ object.maxGasAmount = options.longs === String ? $util.Long.prototype.toString.call(message.maxGasAmount) : options.longs === Number ? new $util.LongBits(message.maxGasAmount.low >>> 0, message.maxGasAmount.high >>> 0).toNumber(true) : message.maxGasAmount;
4828
+ if (message.gasUnitPrice != null && message.hasOwnProperty("gasUnitPrice"))
4829
+ if (typeof message.gasUnitPrice === "number")
4830
+ object.gasUnitPrice = options.longs === String ? String(message.gasUnitPrice) : message.gasUnitPrice;
4831
+ else
4832
+ object.gasUnitPrice = options.longs === String ? $util.Long.prototype.toString.call(message.gasUnitPrice) : options.longs === Number ? new $util.LongBits(message.gasUnitPrice.low >>> 0, message.gasUnitPrice.high >>> 0).toNumber(true) : message.gasUnitPrice;
4833
+ if (message.expirationTimestampSecs != null && message.hasOwnProperty("expirationTimestampSecs"))
4834
+ if (typeof message.expirationTimestampSecs === "number")
4835
+ object.expirationTimestampSecs = options.longs === String ? String(message.expirationTimestampSecs) : message.expirationTimestampSecs;
4836
+ else
4837
+ object.expirationTimestampSecs = options.longs === String ? $util.Long.prototype.toString.call(message.expirationTimestampSecs) : options.longs === Number ? new $util.LongBits(message.expirationTimestampSecs.low >>> 0, message.expirationTimestampSecs.high >>> 0).toNumber(true) : message.expirationTimestampSecs;
4838
+ if (message.chainId != null && message.hasOwnProperty("chainId"))
4839
+ object.chainId = message.chainId;
4840
+ if (message.privateKey != null && message.hasOwnProperty("privateKey"))
4841
+ object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey;
4842
+ if (message.anyEncoded != null && message.hasOwnProperty("anyEncoded"))
4843
+ object.anyEncoded = message.anyEncoded;
4844
+ return object;
4845
+ };
4846
+
4847
+ /**
4848
+ * Converts this SigningInput to JSON.
4849
+ * @function toJSON
4850
+ * @memberof TW.Aptos.Proto.SigningInput
4851
+ * @instance
4852
+ * @returns {Object.<string,*>} JSON object
4853
+ */
4854
+ SigningInput.prototype.toJSON = function toJSON() {
4855
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4856
+ };
4857
+
4858
+ return SigningInput;
4859
+ })();
4860
+
4861
+ Proto.TransactionAuthenticator = (function() {
4862
+
4863
+ /**
4864
+ * Properties of a TransactionAuthenticator.
4865
+ * @memberof TW.Aptos.Proto
4866
+ * @interface ITransactionAuthenticator
4867
+ * @property {Uint8Array|null} [signature] TransactionAuthenticator signature
4868
+ * @property {Uint8Array|null} [publicKey] TransactionAuthenticator publicKey
4869
+ */
4870
+
4871
+ /**
4872
+ * Constructs a new TransactionAuthenticator.
4873
+ * @memberof TW.Aptos.Proto
4874
+ * @classdesc Represents a TransactionAuthenticator.
4875
+ * @implements ITransactionAuthenticator
4876
+ * @constructor
4877
+ * @param {TW.Aptos.Proto.ITransactionAuthenticator=} [properties] Properties to set
4878
+ */
4879
+ function TransactionAuthenticator(properties) {
4880
+ if (properties)
4881
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4882
+ if (properties[keys[i]] != null)
4883
+ this[keys[i]] = properties[keys[i]];
4884
+ }
4885
+
4886
+ /**
4887
+ * TransactionAuthenticator signature.
4888
+ * @member {Uint8Array} signature
4889
+ * @memberof TW.Aptos.Proto.TransactionAuthenticator
4890
+ * @instance
4891
+ */
4892
+ TransactionAuthenticator.prototype.signature = $util.newBuffer([]);
4893
+
4894
+ /**
4895
+ * TransactionAuthenticator publicKey.
4896
+ * @member {Uint8Array} publicKey
4897
+ * @memberof TW.Aptos.Proto.TransactionAuthenticator
4898
+ * @instance
4899
+ */
4900
+ TransactionAuthenticator.prototype.publicKey = $util.newBuffer([]);
4901
+
4902
+ /**
4903
+ * Creates a new TransactionAuthenticator instance using the specified properties.
4904
+ * @function create
4905
+ * @memberof TW.Aptos.Proto.TransactionAuthenticator
4906
+ * @static
4907
+ * @param {TW.Aptos.Proto.ITransactionAuthenticator=} [properties] Properties to set
4908
+ * @returns {TW.Aptos.Proto.TransactionAuthenticator} TransactionAuthenticator instance
4909
+ */
4910
+ TransactionAuthenticator.create = function create(properties) {
4911
+ return new TransactionAuthenticator(properties);
4912
+ };
4913
+
4914
+ /**
4915
+ * Encodes the specified TransactionAuthenticator message. Does not implicitly {@link TW.Aptos.Proto.TransactionAuthenticator.verify|verify} messages.
4916
+ * @function encode
4917
+ * @memberof TW.Aptos.Proto.TransactionAuthenticator
4918
+ * @static
4919
+ * @param {TW.Aptos.Proto.ITransactionAuthenticator} message TransactionAuthenticator message or plain object to encode
4920
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4921
+ * @returns {$protobuf.Writer} Writer
4922
+ */
4923
+ TransactionAuthenticator.encode = function encode(message, writer) {
4924
+ if (!writer)
4925
+ writer = $Writer.create();
4926
+ if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
4927
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature);
4928
+ if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
4929
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.publicKey);
4930
+ return writer;
4931
+ };
4932
+
4933
+ /**
4934
+ * Decodes a TransactionAuthenticator message from the specified reader or buffer.
4935
+ * @function decode
4936
+ * @memberof TW.Aptos.Proto.TransactionAuthenticator
4937
+ * @static
4938
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4939
+ * @param {number} [length] Message length if known beforehand
4940
+ * @returns {TW.Aptos.Proto.TransactionAuthenticator} TransactionAuthenticator
4941
+ * @throws {Error} If the payload is not a reader or valid buffer
4942
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4943
+ */
4944
+ TransactionAuthenticator.decode = function decode(reader, length) {
4945
+ if (!(reader instanceof $Reader))
4946
+ reader = $Reader.create(reader);
4947
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.TransactionAuthenticator();
4948
+ while (reader.pos < end) {
4949
+ var tag = reader.uint32();
4950
+ switch (tag >>> 3) {
4951
+ case 1:
4952
+ message.signature = reader.bytes();
4953
+ break;
4954
+ case 2:
4955
+ message.publicKey = reader.bytes();
4956
+ break;
4957
+ default:
4958
+ reader.skipType(tag & 7);
4959
+ break;
4960
+ }
4961
+ }
4962
+ return message;
4963
+ };
4964
+
4965
+ /**
4966
+ * Verifies a TransactionAuthenticator message.
4967
+ * @function verify
4968
+ * @memberof TW.Aptos.Proto.TransactionAuthenticator
4969
+ * @static
4970
+ * @param {Object.<string,*>} message Plain object to verify
4971
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4972
+ */
4973
+ TransactionAuthenticator.verify = function verify(message) {
4974
+ if (typeof message !== "object" || message === null)
4975
+ return "object expected";
4976
+ if (message.signature != null && message.hasOwnProperty("signature"))
4977
+ if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature)))
4978
+ return "signature: buffer expected";
4979
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
4980
+ if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
4981
+ return "publicKey: buffer expected";
4982
+ return null;
4983
+ };
4984
+
4985
+ /**
4986
+ * Creates a TransactionAuthenticator message from a plain object. Also converts values to their respective internal types.
4987
+ * @function fromObject
4988
+ * @memberof TW.Aptos.Proto.TransactionAuthenticator
4989
+ * @static
4990
+ * @param {Object.<string,*>} object Plain object
4991
+ * @returns {TW.Aptos.Proto.TransactionAuthenticator} TransactionAuthenticator
4992
+ */
4993
+ TransactionAuthenticator.fromObject = function fromObject(object) {
4994
+ if (object instanceof $root.TW.Aptos.Proto.TransactionAuthenticator)
4995
+ return object;
4996
+ var message = new $root.TW.Aptos.Proto.TransactionAuthenticator();
4997
+ if (object.signature != null)
4998
+ if (typeof object.signature === "string")
4999
+ $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0);
5000
+ else if (object.signature.length)
5001
+ message.signature = object.signature;
5002
+ if (object.publicKey != null)
5003
+ if (typeof object.publicKey === "string")
5004
+ $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
5005
+ else if (object.publicKey.length)
5006
+ message.publicKey = object.publicKey;
5007
+ return message;
5008
+ };
5009
+
5010
+ /**
5011
+ * Creates a plain object from a TransactionAuthenticator message. Also converts values to other types if specified.
5012
+ * @function toObject
5013
+ * @memberof TW.Aptos.Proto.TransactionAuthenticator
5014
+ * @static
5015
+ * @param {TW.Aptos.Proto.TransactionAuthenticator} message TransactionAuthenticator
5016
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
5017
+ * @returns {Object.<string,*>} Plain object
5018
+ */
5019
+ TransactionAuthenticator.toObject = function toObject(message, options) {
5020
+ if (!options)
5021
+ options = {};
5022
+ var object = {};
5023
+ if (options.defaults) {
5024
+ if (options.bytes === String)
5025
+ object.signature = "";
5026
+ else {
5027
+ object.signature = [];
5028
+ if (options.bytes !== Array)
5029
+ object.signature = $util.newBuffer(object.signature);
5030
+ }
5031
+ if (options.bytes === String)
5032
+ object.publicKey = "";
5033
+ else {
5034
+ object.publicKey = [];
5035
+ if (options.bytes !== Array)
5036
+ object.publicKey = $util.newBuffer(object.publicKey);
5037
+ }
5038
+ }
5039
+ if (message.signature != null && message.hasOwnProperty("signature"))
5040
+ object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature;
5041
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
5042
+ object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey;
5043
+ return object;
5044
+ };
5045
+
5046
+ /**
5047
+ * Converts this TransactionAuthenticator to JSON.
5048
+ * @function toJSON
5049
+ * @memberof TW.Aptos.Proto.TransactionAuthenticator
5050
+ * @instance
5051
+ * @returns {Object.<string,*>} JSON object
5052
+ */
5053
+ TransactionAuthenticator.prototype.toJSON = function toJSON() {
5054
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5055
+ };
5056
+
5057
+ return TransactionAuthenticator;
5058
+ })();
5059
+
5060
+ Proto.SigningOutput = (function() {
5061
+
5062
+ /**
5063
+ * Properties of a SigningOutput.
5064
+ * @memberof TW.Aptos.Proto
5065
+ * @interface ISigningOutput
5066
+ * @property {Uint8Array|null} [rawTxn] The raw transaction (bytes)
5067
+ * @property {TW.Aptos.Proto.ITransactionAuthenticator|null} [authenticator] Public key and signature to authenticate
5068
+ * @property {Uint8Array|null} [encoded] Signed and encoded transaction bytes.
5069
+ * @property {string|null} [json] SigningOutput json
5070
+ */
5071
+
5072
+ /**
5073
+ * Constructs a new SigningOutput.
5074
+ * @memberof TW.Aptos.Proto
5075
+ * @classdesc Represents a SigningOutput.
5076
+ * @implements ISigningOutput
5077
+ * @constructor
5078
+ * @param {TW.Aptos.Proto.ISigningOutput=} [properties] Properties to set
5079
+ */
5080
+ function SigningOutput(properties) {
5081
+ if (properties)
5082
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
5083
+ if (properties[keys[i]] != null)
5084
+ this[keys[i]] = properties[keys[i]];
5085
+ }
5086
+
5087
+ /**
5088
+ * The raw transaction (bytes)
5089
+ * @member {Uint8Array} rawTxn
5090
+ * @memberof TW.Aptos.Proto.SigningOutput
5091
+ * @instance
5092
+ */
5093
+ SigningOutput.prototype.rawTxn = $util.newBuffer([]);
5094
+
5095
+ /**
5096
+ * Public key and signature to authenticate
5097
+ * @member {TW.Aptos.Proto.ITransactionAuthenticator|null|undefined} authenticator
5098
+ * @memberof TW.Aptos.Proto.SigningOutput
5099
+ * @instance
5100
+ */
5101
+ SigningOutput.prototype.authenticator = null;
5102
+
5103
+ /**
5104
+ * Signed and encoded transaction bytes.
5105
+ * @member {Uint8Array} encoded
5106
+ * @memberof TW.Aptos.Proto.SigningOutput
5107
+ * @instance
5108
+ */
5109
+ SigningOutput.prototype.encoded = $util.newBuffer([]);
5110
+
5111
+ /**
5112
+ * SigningOutput json.
5113
+ * @member {string} json
5114
+ * @memberof TW.Aptos.Proto.SigningOutput
5115
+ * @instance
5116
+ */
5117
+ SigningOutput.prototype.json = "";
5118
+
5119
+ /**
5120
+ * Creates a new SigningOutput instance using the specified properties.
5121
+ * @function create
5122
+ * @memberof TW.Aptos.Proto.SigningOutput
5123
+ * @static
5124
+ * @param {TW.Aptos.Proto.ISigningOutput=} [properties] Properties to set
5125
+ * @returns {TW.Aptos.Proto.SigningOutput} SigningOutput instance
5126
+ */
5127
+ SigningOutput.create = function create(properties) {
5128
+ return new SigningOutput(properties);
5129
+ };
5130
+
5131
+ /**
5132
+ * Encodes the specified SigningOutput message. Does not implicitly {@link TW.Aptos.Proto.SigningOutput.verify|verify} messages.
5133
+ * @function encode
5134
+ * @memberof TW.Aptos.Proto.SigningOutput
5135
+ * @static
5136
+ * @param {TW.Aptos.Proto.ISigningOutput} message SigningOutput message or plain object to encode
5137
+ * @param {$protobuf.Writer} [writer] Writer to encode to
5138
+ * @returns {$protobuf.Writer} Writer
5139
+ */
5140
+ SigningOutput.encode = function encode(message, writer) {
5141
+ if (!writer)
5142
+ writer = $Writer.create();
5143
+ if (message.rawTxn != null && Object.hasOwnProperty.call(message, "rawTxn"))
5144
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rawTxn);
5145
+ if (message.authenticator != null && Object.hasOwnProperty.call(message, "authenticator"))
5146
+ $root.TW.Aptos.Proto.TransactionAuthenticator.encode(message.authenticator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
5147
+ if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
5148
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encoded);
5149
+ if (message.json != null && Object.hasOwnProperty.call(message, "json"))
5150
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.json);
5151
+ return writer;
5152
+ };
5153
+
5154
+ /**
5155
+ * Decodes a SigningOutput message from the specified reader or buffer.
5156
+ * @function decode
5157
+ * @memberof TW.Aptos.Proto.SigningOutput
5158
+ * @static
5159
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
5160
+ * @param {number} [length] Message length if known beforehand
5161
+ * @returns {TW.Aptos.Proto.SigningOutput} SigningOutput
5162
+ * @throws {Error} If the payload is not a reader or valid buffer
5163
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
5164
+ */
5165
+ SigningOutput.decode = function decode(reader, length) {
5166
+ if (!(reader instanceof $Reader))
5167
+ reader = $Reader.create(reader);
5168
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.SigningOutput();
5169
+ while (reader.pos < end) {
5170
+ var tag = reader.uint32();
5171
+ switch (tag >>> 3) {
5172
+ case 1:
5173
+ message.rawTxn = reader.bytes();
5174
+ break;
5175
+ case 2:
5176
+ message.authenticator = $root.TW.Aptos.Proto.TransactionAuthenticator.decode(reader, reader.uint32());
5177
+ break;
5178
+ case 3:
5179
+ message.encoded = reader.bytes();
5180
+ break;
5181
+ case 4:
5182
+ message.json = reader.string();
5183
+ break;
5184
+ default:
5185
+ reader.skipType(tag & 7);
5186
+ break;
5187
+ }
5188
+ }
5189
+ return message;
5190
+ };
5191
+
5192
+ /**
5193
+ * Verifies a SigningOutput message.
5194
+ * @function verify
5195
+ * @memberof TW.Aptos.Proto.SigningOutput
5196
+ * @static
5197
+ * @param {Object.<string,*>} message Plain object to verify
5198
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
5199
+ */
5200
+ SigningOutput.verify = function verify(message) {
5201
+ if (typeof message !== "object" || message === null)
5202
+ return "object expected";
5203
+ if (message.rawTxn != null && message.hasOwnProperty("rawTxn"))
5204
+ if (!(message.rawTxn && typeof message.rawTxn.length === "number" || $util.isString(message.rawTxn)))
5205
+ return "rawTxn: buffer expected";
5206
+ if (message.authenticator != null && message.hasOwnProperty("authenticator")) {
5207
+ var error = $root.TW.Aptos.Proto.TransactionAuthenticator.verify(message.authenticator);
5208
+ if (error)
5209
+ return "authenticator." + error;
5210
+ }
5211
+ if (message.encoded != null && message.hasOwnProperty("encoded"))
5212
+ if (!(message.encoded && typeof message.encoded.length === "number" || $util.isString(message.encoded)))
5213
+ return "encoded: buffer expected";
5214
+ if (message.json != null && message.hasOwnProperty("json"))
5215
+ if (!$util.isString(message.json))
5216
+ return "json: string expected";
5217
+ return null;
5218
+ };
5219
+
5220
+ /**
5221
+ * Creates a SigningOutput message from a plain object. Also converts values to their respective internal types.
5222
+ * @function fromObject
5223
+ * @memberof TW.Aptos.Proto.SigningOutput
5224
+ * @static
5225
+ * @param {Object.<string,*>} object Plain object
5226
+ * @returns {TW.Aptos.Proto.SigningOutput} SigningOutput
5227
+ */
5228
+ SigningOutput.fromObject = function fromObject(object) {
5229
+ if (object instanceof $root.TW.Aptos.Proto.SigningOutput)
5230
+ return object;
5231
+ var message = new $root.TW.Aptos.Proto.SigningOutput();
5232
+ if (object.rawTxn != null)
5233
+ if (typeof object.rawTxn === "string")
5234
+ $util.base64.decode(object.rawTxn, message.rawTxn = $util.newBuffer($util.base64.length(object.rawTxn)), 0);
5235
+ else if (object.rawTxn.length)
5236
+ message.rawTxn = object.rawTxn;
5237
+ if (object.authenticator != null) {
5238
+ if (typeof object.authenticator !== "object")
5239
+ throw TypeError(".TW.Aptos.Proto.SigningOutput.authenticator: object expected");
5240
+ message.authenticator = $root.TW.Aptos.Proto.TransactionAuthenticator.fromObject(object.authenticator);
5241
+ }
5242
+ if (object.encoded != null)
5243
+ if (typeof object.encoded === "string")
5244
+ $util.base64.decode(object.encoded, message.encoded = $util.newBuffer($util.base64.length(object.encoded)), 0);
5245
+ else if (object.encoded.length)
5246
+ message.encoded = object.encoded;
5247
+ if (object.json != null)
5248
+ message.json = String(object.json);
5249
+ return message;
5250
+ };
5251
+
5252
+ /**
5253
+ * Creates a plain object from a SigningOutput message. Also converts values to other types if specified.
5254
+ * @function toObject
5255
+ * @memberof TW.Aptos.Proto.SigningOutput
5256
+ * @static
5257
+ * @param {TW.Aptos.Proto.SigningOutput} message SigningOutput
5258
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
5259
+ * @returns {Object.<string,*>} Plain object
5260
+ */
5261
+ SigningOutput.toObject = function toObject(message, options) {
5262
+ if (!options)
5263
+ options = {};
5264
+ var object = {};
5265
+ if (options.defaults) {
5266
+ if (options.bytes === String)
5267
+ object.rawTxn = "";
5268
+ else {
5269
+ object.rawTxn = [];
5270
+ if (options.bytes !== Array)
5271
+ object.rawTxn = $util.newBuffer(object.rawTxn);
5272
+ }
5273
+ object.authenticator = null;
5274
+ if (options.bytes === String)
5275
+ object.encoded = "";
5276
+ else {
5277
+ object.encoded = [];
5278
+ if (options.bytes !== Array)
5279
+ object.encoded = $util.newBuffer(object.encoded);
5280
+ }
5281
+ object.json = "";
5282
+ }
5283
+ if (message.rawTxn != null && message.hasOwnProperty("rawTxn"))
5284
+ object.rawTxn = options.bytes === String ? $util.base64.encode(message.rawTxn, 0, message.rawTxn.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawTxn) : message.rawTxn;
5285
+ if (message.authenticator != null && message.hasOwnProperty("authenticator"))
5286
+ object.authenticator = $root.TW.Aptos.Proto.TransactionAuthenticator.toObject(message.authenticator, options);
5287
+ if (message.encoded != null && message.hasOwnProperty("encoded"))
5288
+ object.encoded = options.bytes === String ? $util.base64.encode(message.encoded, 0, message.encoded.length) : options.bytes === Array ? Array.prototype.slice.call(message.encoded) : message.encoded;
5289
+ if (message.json != null && message.hasOwnProperty("json"))
5290
+ object.json = message.json;
5291
+ return object;
5292
+ };
5293
+
5294
+ /**
5295
+ * Converts this SigningOutput to JSON.
5296
+ * @function toJSON
5297
+ * @memberof TW.Aptos.Proto.SigningOutput
5298
+ * @instance
5299
+ * @returns {Object.<string,*>} JSON object
5300
+ */
5301
+ SigningOutput.prototype.toJSON = function toJSON() {
5302
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5303
+ };
5304
+
5305
+ return SigningOutput;
5306
+ })();
5307
+
5308
+ return Proto;
5309
+ })();
5310
+
5311
+ return Aptos;
5312
+ })();
5313
+
2469
5314
  TW.Binance = (function() {
2470
5315
 
2471
5316
  /**
@@ -3062,137 +5907,6 @@
3062
5907
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3063
5908
  };
3064
5909
 
3065
- Signature.PubKey = (function() {
3066
-
3067
- /**
3068
- * Properties of a PubKey.
3069
- * @memberof TW.Binance.Proto.Signature
3070
- * @interface IPubKey
3071
- */
3072
-
3073
- /**
3074
- * Constructs a new PubKey.
3075
- * @memberof TW.Binance.Proto.Signature
3076
- * @classdesc Represents a PubKey.
3077
- * @implements IPubKey
3078
- * @constructor
3079
- * @param {TW.Binance.Proto.Signature.IPubKey=} [properties] Properties to set
3080
- */
3081
- function PubKey(properties) {
3082
- if (properties)
3083
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3084
- if (properties[keys[i]] != null)
3085
- this[keys[i]] = properties[keys[i]];
3086
- }
3087
-
3088
- /**
3089
- * Creates a new PubKey instance using the specified properties.
3090
- * @function create
3091
- * @memberof TW.Binance.Proto.Signature.PubKey
3092
- * @static
3093
- * @param {TW.Binance.Proto.Signature.IPubKey=} [properties] Properties to set
3094
- * @returns {TW.Binance.Proto.Signature.PubKey} PubKey instance
3095
- */
3096
- PubKey.create = function create(properties) {
3097
- return new PubKey(properties);
3098
- };
3099
-
3100
- /**
3101
- * Encodes the specified PubKey message. Does not implicitly {@link TW.Binance.Proto.Signature.PubKey.verify|verify} messages.
3102
- * @function encode
3103
- * @memberof TW.Binance.Proto.Signature.PubKey
3104
- * @static
3105
- * @param {TW.Binance.Proto.Signature.IPubKey} message PubKey message or plain object to encode
3106
- * @param {$protobuf.Writer} [writer] Writer to encode to
3107
- * @returns {$protobuf.Writer} Writer
3108
- */
3109
- PubKey.encode = function encode(message, writer) {
3110
- if (!writer)
3111
- writer = $Writer.create();
3112
- return writer;
3113
- };
3114
-
3115
- /**
3116
- * Decodes a PubKey message from the specified reader or buffer.
3117
- * @function decode
3118
- * @memberof TW.Binance.Proto.Signature.PubKey
3119
- * @static
3120
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3121
- * @param {number} [length] Message length if known beforehand
3122
- * @returns {TW.Binance.Proto.Signature.PubKey} PubKey
3123
- * @throws {Error} If the payload is not a reader or valid buffer
3124
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3125
- */
3126
- PubKey.decode = function decode(reader, length) {
3127
- if (!(reader instanceof $Reader))
3128
- reader = $Reader.create(reader);
3129
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Binance.Proto.Signature.PubKey();
3130
- while (reader.pos < end) {
3131
- var tag = reader.uint32();
3132
- switch (tag >>> 3) {
3133
- default:
3134
- reader.skipType(tag & 7);
3135
- break;
3136
- }
3137
- }
3138
- return message;
3139
- };
3140
-
3141
- /**
3142
- * Verifies a PubKey message.
3143
- * @function verify
3144
- * @memberof TW.Binance.Proto.Signature.PubKey
3145
- * @static
3146
- * @param {Object.<string,*>} message Plain object to verify
3147
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
3148
- */
3149
- PubKey.verify = function verify(message) {
3150
- if (typeof message !== "object" || message === null)
3151
- return "object expected";
3152
- return null;
3153
- };
3154
-
3155
- /**
3156
- * Creates a PubKey message from a plain object. Also converts values to their respective internal types.
3157
- * @function fromObject
3158
- * @memberof TW.Binance.Proto.Signature.PubKey
3159
- * @static
3160
- * @param {Object.<string,*>} object Plain object
3161
- * @returns {TW.Binance.Proto.Signature.PubKey} PubKey
3162
- */
3163
- PubKey.fromObject = function fromObject(object) {
3164
- if (object instanceof $root.TW.Binance.Proto.Signature.PubKey)
3165
- return object;
3166
- return new $root.TW.Binance.Proto.Signature.PubKey();
3167
- };
3168
-
3169
- /**
3170
- * Creates a plain object from a PubKey message. Also converts values to other types if specified.
3171
- * @function toObject
3172
- * @memberof TW.Binance.Proto.Signature.PubKey
3173
- * @static
3174
- * @param {TW.Binance.Proto.Signature.PubKey} message PubKey
3175
- * @param {$protobuf.IConversionOptions} [options] Conversion options
3176
- * @returns {Object.<string,*>} Plain object
3177
- */
3178
- PubKey.toObject = function toObject() {
3179
- return {};
3180
- };
3181
-
3182
- /**
3183
- * Converts this PubKey to JSON.
3184
- * @function toJSON
3185
- * @memberof TW.Binance.Proto.Signature.PubKey
3186
- * @instance
3187
- * @returns {Object.<string,*>} JSON object
3188
- */
3189
- PubKey.prototype.toJSON = function toJSON() {
3190
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3191
- };
3192
-
3193
- return PubKey;
3194
- })();
3195
-
3196
5910
  return Signature;
3197
5911
  })();
3198
5912
 
@@ -9723,8 +12437,8 @@
9723
12437
  * @memberof TW.Binance.Proto
9724
12438
  * @interface ISigningOutput
9725
12439
  * @property {Uint8Array|null} [encoded] SigningOutput encoded
9726
- * @property {TW.Common.Proto.SigningError|null} [error] error code, 0 is ok, other codes will be treated as errors
9727
- * @property {string|null} [errorMessage] error description
12440
+ * @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
12441
+ * @property {string|null} [errorMessage] SigningOutput errorMessage
9728
12442
  */
9729
12443
 
9730
12444
  /**
@@ -9751,7 +12465,7 @@
9751
12465
  SigningOutput.prototype.encoded = $util.newBuffer([]);
9752
12466
 
9753
12467
  /**
9754
- * error code, 0 is ok, other codes will be treated as errors
12468
+ * SigningOutput error.
9755
12469
  * @member {TW.Common.Proto.SigningError} error
9756
12470
  * @memberof TW.Binance.Proto.SigningOutput
9757
12471
  * @instance
@@ -9759,7 +12473,7 @@
9759
12473
  SigningOutput.prototype.error = 0;
9760
12474
 
9761
12475
  /**
9762
- * error description
12476
+ * SigningOutput errorMessage.
9763
12477
  * @member {string} errorMessage
9764
12478
  * @memberof TW.Binance.Proto.SigningOutput
9765
12479
  * @instance
@@ -12765,7 +15479,7 @@
12765
15479
  /**
12766
15480
  * Constructs a new HashPublicKey.
12767
15481
  * @memberof TW.Bitcoin.Proto
12768
- * @classdesc Represents a HashPublicKey.
15482
+ * @classdesc Pre-image hash to be used for signing
12769
15483
  * @implements IHashPublicKey
12770
15484
  * @constructor
12771
15485
  * @param {TW.Bitcoin.Proto.IHashPublicKey=} [properties] Properties to set
@@ -23676,12 +26390,12 @@
23676
26390
  * Properties of a Transaction.
23677
26391
  * @memberof TW.Decred.Proto
23678
26392
  * @interface ITransaction
23679
- * @property {number|null} [serializeType] Serialization format
23680
- * @property {number|null} [version] Transaction data format version
26393
+ * @property {number|null} [serializeType] Transaction serializeType
26394
+ * @property {number|null} [version] Transaction version
23681
26395
  * @property {Array.<TW.Decred.Proto.ITransactionInput>|null} [inputs] Transaction inputs
23682
26396
  * @property {Array.<TW.Decred.Proto.ITransactionOutput>|null} [outputs] Transaction outputs
23683
- * @property {number|null} [lockTime] The time when a transaction can be spent (usually zero, in which case it has no effect).
23684
- * @property {number|null} [expiry] The block height at which the transaction expires and is no longer valid.
26397
+ * @property {number|null} [lockTime] Transaction lockTime
26398
+ * @property {number|null} [expiry] Transaction expiry
23685
26399
  */
23686
26400
 
23687
26401
  /**
@@ -23702,7 +26416,7 @@
23702
26416
  }
23703
26417
 
23704
26418
  /**
23705
- * Serialization format
26419
+ * Transaction serializeType.
23706
26420
  * @member {number} serializeType
23707
26421
  * @memberof TW.Decred.Proto.Transaction
23708
26422
  * @instance
@@ -23710,7 +26424,7 @@
23710
26424
  Transaction.prototype.serializeType = 0;
23711
26425
 
23712
26426
  /**
23713
- * Transaction data format version
26427
+ * Transaction version.
23714
26428
  * @member {number} version
23715
26429
  * @memberof TW.Decred.Proto.Transaction
23716
26430
  * @instance
@@ -23734,7 +26448,7 @@
23734
26448
  Transaction.prototype.outputs = $util.emptyArray;
23735
26449
 
23736
26450
  /**
23737
- * The time when a transaction can be spent (usually zero, in which case it has no effect).
26451
+ * Transaction lockTime.
23738
26452
  * @member {number} lockTime
23739
26453
  * @memberof TW.Decred.Proto.Transaction
23740
26454
  * @instance
@@ -23742,7 +26456,7 @@
23742
26456
  Transaction.prototype.lockTime = 0;
23743
26457
 
23744
26458
  /**
23745
- * The block height at which the transaction expires and is no longer valid.
26459
+ * Transaction expiry.
23746
26460
  * @member {number} expiry
23747
26461
  * @memberof TW.Decred.Proto.Transaction
23748
26462
  * @instance
@@ -24287,7 +27001,7 @@
24287
27001
  * @memberof TW.Decred.Proto
24288
27002
  * @interface ITransactionOutput
24289
27003
  * @property {Long|null} [value] TransactionOutput value
24290
- * @property {number|null} [version] Transaction output version.
27004
+ * @property {number|null} [version] TransactionOutput version
24291
27005
  * @property {Uint8Array|null} [script] TransactionOutput script
24292
27006
  */
24293
27007
 
@@ -24315,7 +27029,7 @@
24315
27029
  TransactionOutput.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
24316
27030
 
24317
27031
  /**
24318
- * Transaction output version.
27032
+ * TransactionOutput version.
24319
27033
  * @member {number} version
24320
27034
  * @memberof TW.Decred.Proto.TransactionOutput
24321
27035
  * @instance
@@ -29706,8 +32420,8 @@
29706
32420
  * @property {Uint8Array|null} [r] SigningOutput r
29707
32421
  * @property {Uint8Array|null} [s] SigningOutput s
29708
32422
  * @property {Uint8Array|null} [data] SigningOutput data
29709
- * @property {TW.Common.Proto.SigningError|null} [error] error code, 0 is ok, other codes will be treated as errors
29710
- * @property {string|null} [errorMessage] error code description
32423
+ * @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
32424
+ * @property {string|null} [errorMessage] SigningOutput errorMessage
29711
32425
  */
29712
32426
 
29713
32427
  /**
@@ -29766,7 +32480,7 @@
29766
32480
  SigningOutput.prototype.data = $util.newBuffer([]);
29767
32481
 
29768
32482
  /**
29769
- * error code, 0 is ok, other codes will be treated as errors
32483
+ * SigningOutput error.
29770
32484
  * @member {TW.Common.Proto.SigningError} error
29771
32485
  * @memberof TW.Ethereum.Proto.SigningOutput
29772
32486
  * @instance
@@ -29774,7 +32488,7 @@
29774
32488
  SigningOutput.prototype.error = 0;
29775
32489
 
29776
32490
  /**
29777
- * error code description
32491
+ * SigningOutput errorMessage.
29778
32492
  * @member {string} errorMessage
29779
32493
  * @memberof TW.Ethereum.Proto.SigningOutput
29780
32494
  * @instance
@@ -69292,11 +72006,11 @@
69292
72006
  * @interface ISigningInput
69293
72007
  * @property {string|null} [chainId] Chain ID string, mainnet, testnet and privatenet
69294
72008
  * @property {string|null} [toAddress] Recipient address
69295
- * @property {Uint8Array|null} [thetaAmount] Theta token amount to send in wei (256-bit number)
69296
- * @property {Uint8Array|null} [tfuelAmount] TFuel token amount to send in wei (256-bit number)
72009
+ * @property {Uint8Array|null} [thetaAmount] Theta token amount to send in wei (uint256, serialized little endian)
72010
+ * @property {Uint8Array|null} [tfuelAmount] TFuel token amount to send in wei (uint256, serialized little endian)
69297
72011
  * @property {Long|null} [sequence] Sequence number of the transaction for the sender address
69298
- * @property {Uint8Array|null} [fee] Fee amount in TFuel wei for the transaction (256-bit number)
69299
- * @property {Uint8Array|null} [privateKey] Private key
72012
+ * @property {Uint8Array|null} [fee] Fee amount in TFuel wei for the transaction (uint256, serialized little endian)
72013
+ * @property {Uint8Array|null} [privateKey] The secret private key used for signing (32 bytes).
69300
72014
  */
69301
72015
 
69302
72016
  /**
@@ -69331,7 +72045,7 @@
69331
72045
  SigningInput.prototype.toAddress = "";
69332
72046
 
69333
72047
  /**
69334
- * Theta token amount to send in wei (256-bit number)
72048
+ * Theta token amount to send in wei (uint256, serialized little endian)
69335
72049
  * @member {Uint8Array} thetaAmount
69336
72050
  * @memberof TW.Theta.Proto.SigningInput
69337
72051
  * @instance
@@ -69339,7 +72053,7 @@
69339
72053
  SigningInput.prototype.thetaAmount = $util.newBuffer([]);
69340
72054
 
69341
72055
  /**
69342
- * TFuel token amount to send in wei (256-bit number)
72056
+ * TFuel token amount to send in wei (uint256, serialized little endian)
69343
72057
  * @member {Uint8Array} tfuelAmount
69344
72058
  * @memberof TW.Theta.Proto.SigningInput
69345
72059
  * @instance
@@ -69355,7 +72069,7 @@
69355
72069
  SigningInput.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
69356
72070
 
69357
72071
  /**
69358
- * Fee amount in TFuel wei for the transaction (256-bit number)
72072
+ * Fee amount in TFuel wei for the transaction (uint256, serialized little endian)
69359
72073
  * @member {Uint8Array} fee
69360
72074
  * @memberof TW.Theta.Proto.SigningInput
69361
72075
  * @instance
@@ -69363,7 +72077,7 @@
69363
72077
  SigningInput.prototype.fee = $util.newBuffer([]);
69364
72078
 
69365
72079
  /**
69366
- * Private key
72080
+ * The secret private key used for signing (32 bytes).
69367
72081
  * @member {Uint8Array} privateKey
69368
72082
  * @memberof TW.Theta.Proto.SigningInput
69369
72083
  * @instance
@@ -69638,7 +72352,7 @@
69638
72352
  /**
69639
72353
  * Constructs a new SigningOutput.
69640
72354
  * @memberof TW.Theta.Proto
69641
- * @classdesc Transaction signing output
72355
+ * @classdesc Represents a SigningOutput.
69642
72356
  * @implements ISigningOutput
69643
72357
  * @constructor
69644
72358
  * @param {TW.Theta.Proto.ISigningOutput=} [properties] Properties to set
@@ -75397,7 +78111,7 @@
75397
78111
  * @memberof TW.VeChain.Proto
75398
78112
  * @interface IClause
75399
78113
  * @property {string|null} [to] Recipient address.
75400
- * @property {Uint8Array|null} [value] Transaction amount.
78114
+ * @property {Uint8Array|null} [value] Transaction amount (uint256, serialized little endian)
75401
78115
  * @property {Uint8Array|null} [data] Payload data.
75402
78116
  */
75403
78117
 
@@ -75425,7 +78139,7 @@
75425
78139
  Clause.prototype.to = "";
75426
78140
 
75427
78141
  /**
75428
- * Transaction amount.
78142
+ * Transaction amount (uint256, serialized little endian)
75429
78143
  * @member {Uint8Array} value
75430
78144
  * @memberof TW.VeChain.Proto.Clause
75431
78145
  * @instance
@@ -75625,7 +78339,7 @@
75625
78339
  * @property {Long|null} [gas] Maximum amount of gas allowed to pay for the transaction.
75626
78340
  * @property {Uint8Array|null} [dependsOn] ID of the transaction on which the current transaction depends.
75627
78341
  * @property {Long|null} [nonce] Number set by user.
75628
- * @property {Uint8Array|null} [privateKey] SigningInput privateKey
78342
+ * @property {Uint8Array|null} [privateKey] The secret private key used for signing (32 bytes).
75629
78343
  */
75630
78344
 
75631
78345
  /**
@@ -75709,7 +78423,7 @@
75709
78423
  SigningInput.prototype.nonce = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
75710
78424
 
75711
78425
  /**
75712
- * SigningInput privateKey.
78426
+ * The secret private key used for signing (32 bytes).
75713
78427
  * @member {Uint8Array} privateKey
75714
78428
  * @memberof TW.VeChain.Proto.SigningInput
75715
78429
  * @instance