@trustwallet/wallet-core 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64635,21 +64635,1371 @@
64635
64635
  */
64636
64636
  var Proto = {};
64637
64637
 
64638
+ Proto.CurrencyAmount = (function() {
64639
+
64640
+ /**
64641
+ * Properties of a CurrencyAmount.
64642
+ * @memberof TW.Ripple.Proto
64643
+ * @interface ICurrencyAmount
64644
+ * @property {string|null} [currency] CurrencyAmount currency
64645
+ * @property {string|null} [value] CurrencyAmount value
64646
+ * @property {string|null} [issuer] CurrencyAmount issuer
64647
+ */
64648
+
64649
+ /**
64650
+ * Constructs a new CurrencyAmount.
64651
+ * @memberof TW.Ripple.Proto
64652
+ * @classdesc Represents a CurrencyAmount.
64653
+ * @implements ICurrencyAmount
64654
+ * @constructor
64655
+ * @param {TW.Ripple.Proto.ICurrencyAmount=} [properties] Properties to set
64656
+ */
64657
+ function CurrencyAmount(properties) {
64658
+ if (properties)
64659
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
64660
+ if (properties[keys[i]] != null)
64661
+ this[keys[i]] = properties[keys[i]];
64662
+ }
64663
+
64664
+ /**
64665
+ * CurrencyAmount currency.
64666
+ * @member {string} currency
64667
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64668
+ * @instance
64669
+ */
64670
+ CurrencyAmount.prototype.currency = "";
64671
+
64672
+ /**
64673
+ * CurrencyAmount value.
64674
+ * @member {string} value
64675
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64676
+ * @instance
64677
+ */
64678
+ CurrencyAmount.prototype.value = "";
64679
+
64680
+ /**
64681
+ * CurrencyAmount issuer.
64682
+ * @member {string} issuer
64683
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64684
+ * @instance
64685
+ */
64686
+ CurrencyAmount.prototype.issuer = "";
64687
+
64688
+ /**
64689
+ * Creates a new CurrencyAmount instance using the specified properties.
64690
+ * @function create
64691
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64692
+ * @static
64693
+ * @param {TW.Ripple.Proto.ICurrencyAmount=} [properties] Properties to set
64694
+ * @returns {TW.Ripple.Proto.CurrencyAmount} CurrencyAmount instance
64695
+ */
64696
+ CurrencyAmount.create = function create(properties) {
64697
+ return new CurrencyAmount(properties);
64698
+ };
64699
+
64700
+ /**
64701
+ * Encodes the specified CurrencyAmount message. Does not implicitly {@link TW.Ripple.Proto.CurrencyAmount.verify|verify} messages.
64702
+ * @function encode
64703
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64704
+ * @static
64705
+ * @param {TW.Ripple.Proto.ICurrencyAmount} message CurrencyAmount message or plain object to encode
64706
+ * @param {$protobuf.Writer} [writer] Writer to encode to
64707
+ * @returns {$protobuf.Writer} Writer
64708
+ */
64709
+ CurrencyAmount.encode = function encode(message, writer) {
64710
+ if (!writer)
64711
+ writer = $Writer.create();
64712
+ if (message.currency != null && Object.hasOwnProperty.call(message, "currency"))
64713
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.currency);
64714
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
64715
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
64716
+ if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer"))
64717
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.issuer);
64718
+ return writer;
64719
+ };
64720
+
64721
+ /**
64722
+ * Decodes a CurrencyAmount message from the specified reader or buffer.
64723
+ * @function decode
64724
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64725
+ * @static
64726
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
64727
+ * @param {number} [length] Message length if known beforehand
64728
+ * @returns {TW.Ripple.Proto.CurrencyAmount} CurrencyAmount
64729
+ * @throws {Error} If the payload is not a reader or valid buffer
64730
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
64731
+ */
64732
+ CurrencyAmount.decode = function decode(reader, length) {
64733
+ if (!(reader instanceof $Reader))
64734
+ reader = $Reader.create(reader);
64735
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ripple.Proto.CurrencyAmount();
64736
+ while (reader.pos < end) {
64737
+ var tag = reader.uint32();
64738
+ switch (tag >>> 3) {
64739
+ case 1:
64740
+ message.currency = reader.string();
64741
+ break;
64742
+ case 2:
64743
+ message.value = reader.string();
64744
+ break;
64745
+ case 3:
64746
+ message.issuer = reader.string();
64747
+ break;
64748
+ default:
64749
+ reader.skipType(tag & 7);
64750
+ break;
64751
+ }
64752
+ }
64753
+ return message;
64754
+ };
64755
+
64756
+ /**
64757
+ * Verifies a CurrencyAmount message.
64758
+ * @function verify
64759
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64760
+ * @static
64761
+ * @param {Object.<string,*>} message Plain object to verify
64762
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
64763
+ */
64764
+ CurrencyAmount.verify = function verify(message) {
64765
+ if (typeof message !== "object" || message === null)
64766
+ return "object expected";
64767
+ if (message.currency != null && message.hasOwnProperty("currency"))
64768
+ if (!$util.isString(message.currency))
64769
+ return "currency: string expected";
64770
+ if (message.value != null && message.hasOwnProperty("value"))
64771
+ if (!$util.isString(message.value))
64772
+ return "value: string expected";
64773
+ if (message.issuer != null && message.hasOwnProperty("issuer"))
64774
+ if (!$util.isString(message.issuer))
64775
+ return "issuer: string expected";
64776
+ return null;
64777
+ };
64778
+
64779
+ /**
64780
+ * Creates a CurrencyAmount message from a plain object. Also converts values to their respective internal types.
64781
+ * @function fromObject
64782
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64783
+ * @static
64784
+ * @param {Object.<string,*>} object Plain object
64785
+ * @returns {TW.Ripple.Proto.CurrencyAmount} CurrencyAmount
64786
+ */
64787
+ CurrencyAmount.fromObject = function fromObject(object) {
64788
+ if (object instanceof $root.TW.Ripple.Proto.CurrencyAmount)
64789
+ return object;
64790
+ var message = new $root.TW.Ripple.Proto.CurrencyAmount();
64791
+ if (object.currency != null)
64792
+ message.currency = String(object.currency);
64793
+ if (object.value != null)
64794
+ message.value = String(object.value);
64795
+ if (object.issuer != null)
64796
+ message.issuer = String(object.issuer);
64797
+ return message;
64798
+ };
64799
+
64800
+ /**
64801
+ * Creates a plain object from a CurrencyAmount message. Also converts values to other types if specified.
64802
+ * @function toObject
64803
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64804
+ * @static
64805
+ * @param {TW.Ripple.Proto.CurrencyAmount} message CurrencyAmount
64806
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
64807
+ * @returns {Object.<string,*>} Plain object
64808
+ */
64809
+ CurrencyAmount.toObject = function toObject(message, options) {
64810
+ if (!options)
64811
+ options = {};
64812
+ var object = {};
64813
+ if (options.defaults) {
64814
+ object.currency = "";
64815
+ object.value = "";
64816
+ object.issuer = "";
64817
+ }
64818
+ if (message.currency != null && message.hasOwnProperty("currency"))
64819
+ object.currency = message.currency;
64820
+ if (message.value != null && message.hasOwnProperty("value"))
64821
+ object.value = message.value;
64822
+ if (message.issuer != null && message.hasOwnProperty("issuer"))
64823
+ object.issuer = message.issuer;
64824
+ return object;
64825
+ };
64826
+
64827
+ /**
64828
+ * Converts this CurrencyAmount to JSON.
64829
+ * @function toJSON
64830
+ * @memberof TW.Ripple.Proto.CurrencyAmount
64831
+ * @instance
64832
+ * @returns {Object.<string,*>} JSON object
64833
+ */
64834
+ CurrencyAmount.prototype.toJSON = function toJSON() {
64835
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
64836
+ };
64837
+
64838
+ return CurrencyAmount;
64839
+ })();
64840
+
64841
+ Proto.OperationTrustSet = (function() {
64842
+
64843
+ /**
64844
+ * Properties of an OperationTrustSet.
64845
+ * @memberof TW.Ripple.Proto
64846
+ * @interface IOperationTrustSet
64847
+ * @property {TW.Ripple.Proto.ICurrencyAmount|null} [limitAmount] OperationTrustSet limitAmount
64848
+ */
64849
+
64850
+ /**
64851
+ * Constructs a new OperationTrustSet.
64852
+ * @memberof TW.Ripple.Proto
64853
+ * @classdesc Represents an OperationTrustSet.
64854
+ * @implements IOperationTrustSet
64855
+ * @constructor
64856
+ * @param {TW.Ripple.Proto.IOperationTrustSet=} [properties] Properties to set
64857
+ */
64858
+ function OperationTrustSet(properties) {
64859
+ if (properties)
64860
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
64861
+ if (properties[keys[i]] != null)
64862
+ this[keys[i]] = properties[keys[i]];
64863
+ }
64864
+
64865
+ /**
64866
+ * OperationTrustSet limitAmount.
64867
+ * @member {TW.Ripple.Proto.ICurrencyAmount|null|undefined} limitAmount
64868
+ * @memberof TW.Ripple.Proto.OperationTrustSet
64869
+ * @instance
64870
+ */
64871
+ OperationTrustSet.prototype.limitAmount = null;
64872
+
64873
+ /**
64874
+ * Creates a new OperationTrustSet instance using the specified properties.
64875
+ * @function create
64876
+ * @memberof TW.Ripple.Proto.OperationTrustSet
64877
+ * @static
64878
+ * @param {TW.Ripple.Proto.IOperationTrustSet=} [properties] Properties to set
64879
+ * @returns {TW.Ripple.Proto.OperationTrustSet} OperationTrustSet instance
64880
+ */
64881
+ OperationTrustSet.create = function create(properties) {
64882
+ return new OperationTrustSet(properties);
64883
+ };
64884
+
64885
+ /**
64886
+ * Encodes the specified OperationTrustSet message. Does not implicitly {@link TW.Ripple.Proto.OperationTrustSet.verify|verify} messages.
64887
+ * @function encode
64888
+ * @memberof TW.Ripple.Proto.OperationTrustSet
64889
+ * @static
64890
+ * @param {TW.Ripple.Proto.IOperationTrustSet} message OperationTrustSet message or plain object to encode
64891
+ * @param {$protobuf.Writer} [writer] Writer to encode to
64892
+ * @returns {$protobuf.Writer} Writer
64893
+ */
64894
+ OperationTrustSet.encode = function encode(message, writer) {
64895
+ if (!writer)
64896
+ writer = $Writer.create();
64897
+ if (message.limitAmount != null && Object.hasOwnProperty.call(message, "limitAmount"))
64898
+ $root.TW.Ripple.Proto.CurrencyAmount.encode(message.limitAmount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
64899
+ return writer;
64900
+ };
64901
+
64902
+ /**
64903
+ * Decodes an OperationTrustSet message from the specified reader or buffer.
64904
+ * @function decode
64905
+ * @memberof TW.Ripple.Proto.OperationTrustSet
64906
+ * @static
64907
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
64908
+ * @param {number} [length] Message length if known beforehand
64909
+ * @returns {TW.Ripple.Proto.OperationTrustSet} OperationTrustSet
64910
+ * @throws {Error} If the payload is not a reader or valid buffer
64911
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
64912
+ */
64913
+ OperationTrustSet.decode = function decode(reader, length) {
64914
+ if (!(reader instanceof $Reader))
64915
+ reader = $Reader.create(reader);
64916
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ripple.Proto.OperationTrustSet();
64917
+ while (reader.pos < end) {
64918
+ var tag = reader.uint32();
64919
+ switch (tag >>> 3) {
64920
+ case 1:
64921
+ message.limitAmount = $root.TW.Ripple.Proto.CurrencyAmount.decode(reader, reader.uint32());
64922
+ break;
64923
+ default:
64924
+ reader.skipType(tag & 7);
64925
+ break;
64926
+ }
64927
+ }
64928
+ return message;
64929
+ };
64930
+
64931
+ /**
64932
+ * Verifies an OperationTrustSet message.
64933
+ * @function verify
64934
+ * @memberof TW.Ripple.Proto.OperationTrustSet
64935
+ * @static
64936
+ * @param {Object.<string,*>} message Plain object to verify
64937
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
64938
+ */
64939
+ OperationTrustSet.verify = function verify(message) {
64940
+ if (typeof message !== "object" || message === null)
64941
+ return "object expected";
64942
+ if (message.limitAmount != null && message.hasOwnProperty("limitAmount")) {
64943
+ var error = $root.TW.Ripple.Proto.CurrencyAmount.verify(message.limitAmount);
64944
+ if (error)
64945
+ return "limitAmount." + error;
64946
+ }
64947
+ return null;
64948
+ };
64949
+
64950
+ /**
64951
+ * Creates an OperationTrustSet message from a plain object. Also converts values to their respective internal types.
64952
+ * @function fromObject
64953
+ * @memberof TW.Ripple.Proto.OperationTrustSet
64954
+ * @static
64955
+ * @param {Object.<string,*>} object Plain object
64956
+ * @returns {TW.Ripple.Proto.OperationTrustSet} OperationTrustSet
64957
+ */
64958
+ OperationTrustSet.fromObject = function fromObject(object) {
64959
+ if (object instanceof $root.TW.Ripple.Proto.OperationTrustSet)
64960
+ return object;
64961
+ var message = new $root.TW.Ripple.Proto.OperationTrustSet();
64962
+ if (object.limitAmount != null) {
64963
+ if (typeof object.limitAmount !== "object")
64964
+ throw TypeError(".TW.Ripple.Proto.OperationTrustSet.limitAmount: object expected");
64965
+ message.limitAmount = $root.TW.Ripple.Proto.CurrencyAmount.fromObject(object.limitAmount);
64966
+ }
64967
+ return message;
64968
+ };
64969
+
64970
+ /**
64971
+ * Creates a plain object from an OperationTrustSet message. Also converts values to other types if specified.
64972
+ * @function toObject
64973
+ * @memberof TW.Ripple.Proto.OperationTrustSet
64974
+ * @static
64975
+ * @param {TW.Ripple.Proto.OperationTrustSet} message OperationTrustSet
64976
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
64977
+ * @returns {Object.<string,*>} Plain object
64978
+ */
64979
+ OperationTrustSet.toObject = function toObject(message, options) {
64980
+ if (!options)
64981
+ options = {};
64982
+ var object = {};
64983
+ if (options.defaults)
64984
+ object.limitAmount = null;
64985
+ if (message.limitAmount != null && message.hasOwnProperty("limitAmount"))
64986
+ object.limitAmount = $root.TW.Ripple.Proto.CurrencyAmount.toObject(message.limitAmount, options);
64987
+ return object;
64988
+ };
64989
+
64990
+ /**
64991
+ * Converts this OperationTrustSet to JSON.
64992
+ * @function toJSON
64993
+ * @memberof TW.Ripple.Proto.OperationTrustSet
64994
+ * @instance
64995
+ * @returns {Object.<string,*>} JSON object
64996
+ */
64997
+ OperationTrustSet.prototype.toJSON = function toJSON() {
64998
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
64999
+ };
65000
+
65001
+ return OperationTrustSet;
65002
+ })();
65003
+
65004
+ Proto.OperationPayment = (function() {
65005
+
65006
+ /**
65007
+ * Properties of an OperationPayment.
65008
+ * @memberof TW.Ripple.Proto
65009
+ * @interface IOperationPayment
65010
+ * @property {Long|null} [amount] OperationPayment amount
65011
+ * @property {TW.Ripple.Proto.ICurrencyAmount|null} [currencyAmount] OperationPayment currencyAmount
65012
+ * @property {string|null} [destination] OperationPayment destination
65013
+ * @property {Long|null} [destinationTag] OperationPayment destinationTag
65014
+ */
65015
+
65016
+ /**
65017
+ * Constructs a new OperationPayment.
65018
+ * @memberof TW.Ripple.Proto
65019
+ * @classdesc Represents an OperationPayment.
65020
+ * @implements IOperationPayment
65021
+ * @constructor
65022
+ * @param {TW.Ripple.Proto.IOperationPayment=} [properties] Properties to set
65023
+ */
65024
+ function OperationPayment(properties) {
65025
+ if (properties)
65026
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
65027
+ if (properties[keys[i]] != null)
65028
+ this[keys[i]] = properties[keys[i]];
65029
+ }
65030
+
65031
+ /**
65032
+ * OperationPayment amount.
65033
+ * @member {Long|null|undefined} amount
65034
+ * @memberof TW.Ripple.Proto.OperationPayment
65035
+ * @instance
65036
+ */
65037
+ OperationPayment.prototype.amount = null;
65038
+
65039
+ /**
65040
+ * OperationPayment currencyAmount.
65041
+ * @member {TW.Ripple.Proto.ICurrencyAmount|null|undefined} currencyAmount
65042
+ * @memberof TW.Ripple.Proto.OperationPayment
65043
+ * @instance
65044
+ */
65045
+ OperationPayment.prototype.currencyAmount = null;
65046
+
65047
+ /**
65048
+ * OperationPayment destination.
65049
+ * @member {string} destination
65050
+ * @memberof TW.Ripple.Proto.OperationPayment
65051
+ * @instance
65052
+ */
65053
+ OperationPayment.prototype.destination = "";
65054
+
65055
+ /**
65056
+ * OperationPayment destinationTag.
65057
+ * @member {Long} destinationTag
65058
+ * @memberof TW.Ripple.Proto.OperationPayment
65059
+ * @instance
65060
+ */
65061
+ OperationPayment.prototype.destinationTag = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
65062
+
65063
+ // OneOf field names bound to virtual getters and setters
65064
+ var $oneOfFields;
65065
+
65066
+ /**
65067
+ * OperationPayment amountOneof.
65068
+ * @member {"amount"|"currencyAmount"|undefined} amountOneof
65069
+ * @memberof TW.Ripple.Proto.OperationPayment
65070
+ * @instance
65071
+ */
65072
+ Object.defineProperty(OperationPayment.prototype, "amountOneof", {
65073
+ get: $util.oneOfGetter($oneOfFields = ["amount", "currencyAmount"]),
65074
+ set: $util.oneOfSetter($oneOfFields)
65075
+ });
65076
+
65077
+ /**
65078
+ * Creates a new OperationPayment instance using the specified properties.
65079
+ * @function create
65080
+ * @memberof TW.Ripple.Proto.OperationPayment
65081
+ * @static
65082
+ * @param {TW.Ripple.Proto.IOperationPayment=} [properties] Properties to set
65083
+ * @returns {TW.Ripple.Proto.OperationPayment} OperationPayment instance
65084
+ */
65085
+ OperationPayment.create = function create(properties) {
65086
+ return new OperationPayment(properties);
65087
+ };
65088
+
65089
+ /**
65090
+ * Encodes the specified OperationPayment message. Does not implicitly {@link TW.Ripple.Proto.OperationPayment.verify|verify} messages.
65091
+ * @function encode
65092
+ * @memberof TW.Ripple.Proto.OperationPayment
65093
+ * @static
65094
+ * @param {TW.Ripple.Proto.IOperationPayment} message OperationPayment message or plain object to encode
65095
+ * @param {$protobuf.Writer} [writer] Writer to encode to
65096
+ * @returns {$protobuf.Writer} Writer
65097
+ */
65098
+ OperationPayment.encode = function encode(message, writer) {
65099
+ if (!writer)
65100
+ writer = $Writer.create();
65101
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
65102
+ writer.uint32(/* id 1, wireType 0 =*/8).int64(message.amount);
65103
+ if (message.currencyAmount != null && Object.hasOwnProperty.call(message, "currencyAmount"))
65104
+ $root.TW.Ripple.Proto.CurrencyAmount.encode(message.currencyAmount, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
65105
+ if (message.destination != null && Object.hasOwnProperty.call(message, "destination"))
65106
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.destination);
65107
+ if (message.destinationTag != null && Object.hasOwnProperty.call(message, "destinationTag"))
65108
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.destinationTag);
65109
+ return writer;
65110
+ };
65111
+
65112
+ /**
65113
+ * Decodes an OperationPayment message from the specified reader or buffer.
65114
+ * @function decode
65115
+ * @memberof TW.Ripple.Proto.OperationPayment
65116
+ * @static
65117
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
65118
+ * @param {number} [length] Message length if known beforehand
65119
+ * @returns {TW.Ripple.Proto.OperationPayment} OperationPayment
65120
+ * @throws {Error} If the payload is not a reader or valid buffer
65121
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
65122
+ */
65123
+ OperationPayment.decode = function decode(reader, length) {
65124
+ if (!(reader instanceof $Reader))
65125
+ reader = $Reader.create(reader);
65126
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ripple.Proto.OperationPayment();
65127
+ while (reader.pos < end) {
65128
+ var tag = reader.uint32();
65129
+ switch (tag >>> 3) {
65130
+ case 1:
65131
+ message.amount = reader.int64();
65132
+ break;
65133
+ case 2:
65134
+ message.currencyAmount = $root.TW.Ripple.Proto.CurrencyAmount.decode(reader, reader.uint32());
65135
+ break;
65136
+ case 3:
65137
+ message.destination = reader.string();
65138
+ break;
65139
+ case 4:
65140
+ message.destinationTag = reader.int64();
65141
+ break;
65142
+ default:
65143
+ reader.skipType(tag & 7);
65144
+ break;
65145
+ }
65146
+ }
65147
+ return message;
65148
+ };
65149
+
65150
+ /**
65151
+ * Verifies an OperationPayment message.
65152
+ * @function verify
65153
+ * @memberof TW.Ripple.Proto.OperationPayment
65154
+ * @static
65155
+ * @param {Object.<string,*>} message Plain object to verify
65156
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
65157
+ */
65158
+ OperationPayment.verify = function verify(message) {
65159
+ if (typeof message !== "object" || message === null)
65160
+ return "object expected";
65161
+ var properties = {};
65162
+ if (message.amount != null && message.hasOwnProperty("amount")) {
65163
+ properties.amountOneof = 1;
65164
+ if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
65165
+ return "amount: integer|Long expected";
65166
+ }
65167
+ if (message.currencyAmount != null && message.hasOwnProperty("currencyAmount")) {
65168
+ if (properties.amountOneof === 1)
65169
+ return "amountOneof: multiple values";
65170
+ properties.amountOneof = 1;
65171
+ {
65172
+ var error = $root.TW.Ripple.Proto.CurrencyAmount.verify(message.currencyAmount);
65173
+ if (error)
65174
+ return "currencyAmount." + error;
65175
+ }
65176
+ }
65177
+ if (message.destination != null && message.hasOwnProperty("destination"))
65178
+ if (!$util.isString(message.destination))
65179
+ return "destination: string expected";
65180
+ if (message.destinationTag != null && message.hasOwnProperty("destinationTag"))
65181
+ if (!$util.isInteger(message.destinationTag) && !(message.destinationTag && $util.isInteger(message.destinationTag.low) && $util.isInteger(message.destinationTag.high)))
65182
+ return "destinationTag: integer|Long expected";
65183
+ return null;
65184
+ };
65185
+
65186
+ /**
65187
+ * Creates an OperationPayment message from a plain object. Also converts values to their respective internal types.
65188
+ * @function fromObject
65189
+ * @memberof TW.Ripple.Proto.OperationPayment
65190
+ * @static
65191
+ * @param {Object.<string,*>} object Plain object
65192
+ * @returns {TW.Ripple.Proto.OperationPayment} OperationPayment
65193
+ */
65194
+ OperationPayment.fromObject = function fromObject(object) {
65195
+ if (object instanceof $root.TW.Ripple.Proto.OperationPayment)
65196
+ return object;
65197
+ var message = new $root.TW.Ripple.Proto.OperationPayment();
65198
+ if (object.amount != null)
65199
+ if ($util.Long)
65200
+ (message.amount = $util.Long.fromValue(object.amount)).unsigned = false;
65201
+ else if (typeof object.amount === "string")
65202
+ message.amount = parseInt(object.amount, 10);
65203
+ else if (typeof object.amount === "number")
65204
+ message.amount = object.amount;
65205
+ else if (typeof object.amount === "object")
65206
+ message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber();
65207
+ if (object.currencyAmount != null) {
65208
+ if (typeof object.currencyAmount !== "object")
65209
+ throw TypeError(".TW.Ripple.Proto.OperationPayment.currencyAmount: object expected");
65210
+ message.currencyAmount = $root.TW.Ripple.Proto.CurrencyAmount.fromObject(object.currencyAmount);
65211
+ }
65212
+ if (object.destination != null)
65213
+ message.destination = String(object.destination);
65214
+ if (object.destinationTag != null)
65215
+ if ($util.Long)
65216
+ (message.destinationTag = $util.Long.fromValue(object.destinationTag)).unsigned = false;
65217
+ else if (typeof object.destinationTag === "string")
65218
+ message.destinationTag = parseInt(object.destinationTag, 10);
65219
+ else if (typeof object.destinationTag === "number")
65220
+ message.destinationTag = object.destinationTag;
65221
+ else if (typeof object.destinationTag === "object")
65222
+ message.destinationTag = new $util.LongBits(object.destinationTag.low >>> 0, object.destinationTag.high >>> 0).toNumber();
65223
+ return message;
65224
+ };
65225
+
65226
+ /**
65227
+ * Creates a plain object from an OperationPayment message. Also converts values to other types if specified.
65228
+ * @function toObject
65229
+ * @memberof TW.Ripple.Proto.OperationPayment
65230
+ * @static
65231
+ * @param {TW.Ripple.Proto.OperationPayment} message OperationPayment
65232
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
65233
+ * @returns {Object.<string,*>} Plain object
65234
+ */
65235
+ OperationPayment.toObject = function toObject(message, options) {
65236
+ if (!options)
65237
+ options = {};
65238
+ var object = {};
65239
+ if (options.defaults) {
65240
+ object.destination = "";
65241
+ if ($util.Long) {
65242
+ var long = new $util.Long(0, 0, false);
65243
+ object.destinationTag = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
65244
+ } else
65245
+ object.destinationTag = options.longs === String ? "0" : 0;
65246
+ }
65247
+ if (message.amount != null && message.hasOwnProperty("amount")) {
65248
+ if (typeof message.amount === "number")
65249
+ object.amount = options.longs === String ? String(message.amount) : message.amount;
65250
+ else
65251
+ 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() : message.amount;
65252
+ if (options.oneofs)
65253
+ object.amountOneof = "amount";
65254
+ }
65255
+ if (message.currencyAmount != null && message.hasOwnProperty("currencyAmount")) {
65256
+ object.currencyAmount = $root.TW.Ripple.Proto.CurrencyAmount.toObject(message.currencyAmount, options);
65257
+ if (options.oneofs)
65258
+ object.amountOneof = "currencyAmount";
65259
+ }
65260
+ if (message.destination != null && message.hasOwnProperty("destination"))
65261
+ object.destination = message.destination;
65262
+ if (message.destinationTag != null && message.hasOwnProperty("destinationTag"))
65263
+ if (typeof message.destinationTag === "number")
65264
+ object.destinationTag = options.longs === String ? String(message.destinationTag) : message.destinationTag;
65265
+ else
65266
+ object.destinationTag = options.longs === String ? $util.Long.prototype.toString.call(message.destinationTag) : options.longs === Number ? new $util.LongBits(message.destinationTag.low >>> 0, message.destinationTag.high >>> 0).toNumber() : message.destinationTag;
65267
+ return object;
65268
+ };
65269
+
65270
+ /**
65271
+ * Converts this OperationPayment to JSON.
65272
+ * @function toJSON
65273
+ * @memberof TW.Ripple.Proto.OperationPayment
65274
+ * @instance
65275
+ * @returns {Object.<string,*>} JSON object
65276
+ */
65277
+ OperationPayment.prototype.toJSON = function toJSON() {
65278
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
65279
+ };
65280
+
65281
+ return OperationPayment;
65282
+ })();
65283
+
65284
+ Proto.OperationNFTokenBurn = (function() {
65285
+
65286
+ /**
65287
+ * Properties of an OperationNFTokenBurn.
65288
+ * @memberof TW.Ripple.Proto
65289
+ * @interface IOperationNFTokenBurn
65290
+ * @property {Uint8Array|null} [nftokenId] OperationNFTokenBurn nftokenId
65291
+ */
65292
+
65293
+ /**
65294
+ * Constructs a new OperationNFTokenBurn.
65295
+ * @memberof TW.Ripple.Proto
65296
+ * @classdesc Represents an OperationNFTokenBurn.
65297
+ * @implements IOperationNFTokenBurn
65298
+ * @constructor
65299
+ * @param {TW.Ripple.Proto.IOperationNFTokenBurn=} [properties] Properties to set
65300
+ */
65301
+ function OperationNFTokenBurn(properties) {
65302
+ if (properties)
65303
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
65304
+ if (properties[keys[i]] != null)
65305
+ this[keys[i]] = properties[keys[i]];
65306
+ }
65307
+
65308
+ /**
65309
+ * OperationNFTokenBurn nftokenId.
65310
+ * @member {Uint8Array} nftokenId
65311
+ * @memberof TW.Ripple.Proto.OperationNFTokenBurn
65312
+ * @instance
65313
+ */
65314
+ OperationNFTokenBurn.prototype.nftokenId = $util.newBuffer([]);
65315
+
65316
+ /**
65317
+ * Creates a new OperationNFTokenBurn instance using the specified properties.
65318
+ * @function create
65319
+ * @memberof TW.Ripple.Proto.OperationNFTokenBurn
65320
+ * @static
65321
+ * @param {TW.Ripple.Proto.IOperationNFTokenBurn=} [properties] Properties to set
65322
+ * @returns {TW.Ripple.Proto.OperationNFTokenBurn} OperationNFTokenBurn instance
65323
+ */
65324
+ OperationNFTokenBurn.create = function create(properties) {
65325
+ return new OperationNFTokenBurn(properties);
65326
+ };
65327
+
65328
+ /**
65329
+ * Encodes the specified OperationNFTokenBurn message. Does not implicitly {@link TW.Ripple.Proto.OperationNFTokenBurn.verify|verify} messages.
65330
+ * @function encode
65331
+ * @memberof TW.Ripple.Proto.OperationNFTokenBurn
65332
+ * @static
65333
+ * @param {TW.Ripple.Proto.IOperationNFTokenBurn} message OperationNFTokenBurn message or plain object to encode
65334
+ * @param {$protobuf.Writer} [writer] Writer to encode to
65335
+ * @returns {$protobuf.Writer} Writer
65336
+ */
65337
+ OperationNFTokenBurn.encode = function encode(message, writer) {
65338
+ if (!writer)
65339
+ writer = $Writer.create();
65340
+ if (message.nftokenId != null && Object.hasOwnProperty.call(message, "nftokenId"))
65341
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.nftokenId);
65342
+ return writer;
65343
+ };
65344
+
65345
+ /**
65346
+ * Decodes an OperationNFTokenBurn message from the specified reader or buffer.
65347
+ * @function decode
65348
+ * @memberof TW.Ripple.Proto.OperationNFTokenBurn
65349
+ * @static
65350
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
65351
+ * @param {number} [length] Message length if known beforehand
65352
+ * @returns {TW.Ripple.Proto.OperationNFTokenBurn} OperationNFTokenBurn
65353
+ * @throws {Error} If the payload is not a reader or valid buffer
65354
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
65355
+ */
65356
+ OperationNFTokenBurn.decode = function decode(reader, length) {
65357
+ if (!(reader instanceof $Reader))
65358
+ reader = $Reader.create(reader);
65359
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ripple.Proto.OperationNFTokenBurn();
65360
+ while (reader.pos < end) {
65361
+ var tag = reader.uint32();
65362
+ switch (tag >>> 3) {
65363
+ case 1:
65364
+ message.nftokenId = reader.bytes();
65365
+ break;
65366
+ default:
65367
+ reader.skipType(tag & 7);
65368
+ break;
65369
+ }
65370
+ }
65371
+ return message;
65372
+ };
65373
+
65374
+ /**
65375
+ * Verifies an OperationNFTokenBurn message.
65376
+ * @function verify
65377
+ * @memberof TW.Ripple.Proto.OperationNFTokenBurn
65378
+ * @static
65379
+ * @param {Object.<string,*>} message Plain object to verify
65380
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
65381
+ */
65382
+ OperationNFTokenBurn.verify = function verify(message) {
65383
+ if (typeof message !== "object" || message === null)
65384
+ return "object expected";
65385
+ if (message.nftokenId != null && message.hasOwnProperty("nftokenId"))
65386
+ if (!(message.nftokenId && typeof message.nftokenId.length === "number" || $util.isString(message.nftokenId)))
65387
+ return "nftokenId: buffer expected";
65388
+ return null;
65389
+ };
65390
+
65391
+ /**
65392
+ * Creates an OperationNFTokenBurn message from a plain object. Also converts values to their respective internal types.
65393
+ * @function fromObject
65394
+ * @memberof TW.Ripple.Proto.OperationNFTokenBurn
65395
+ * @static
65396
+ * @param {Object.<string,*>} object Plain object
65397
+ * @returns {TW.Ripple.Proto.OperationNFTokenBurn} OperationNFTokenBurn
65398
+ */
65399
+ OperationNFTokenBurn.fromObject = function fromObject(object) {
65400
+ if (object instanceof $root.TW.Ripple.Proto.OperationNFTokenBurn)
65401
+ return object;
65402
+ var message = new $root.TW.Ripple.Proto.OperationNFTokenBurn();
65403
+ if (object.nftokenId != null)
65404
+ if (typeof object.nftokenId === "string")
65405
+ $util.base64.decode(object.nftokenId, message.nftokenId = $util.newBuffer($util.base64.length(object.nftokenId)), 0);
65406
+ else if (object.nftokenId.length)
65407
+ message.nftokenId = object.nftokenId;
65408
+ return message;
65409
+ };
65410
+
65411
+ /**
65412
+ * Creates a plain object from an OperationNFTokenBurn message. Also converts values to other types if specified.
65413
+ * @function toObject
65414
+ * @memberof TW.Ripple.Proto.OperationNFTokenBurn
65415
+ * @static
65416
+ * @param {TW.Ripple.Proto.OperationNFTokenBurn} message OperationNFTokenBurn
65417
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
65418
+ * @returns {Object.<string,*>} Plain object
65419
+ */
65420
+ OperationNFTokenBurn.toObject = function toObject(message, options) {
65421
+ if (!options)
65422
+ options = {};
65423
+ var object = {};
65424
+ if (options.defaults)
65425
+ if (options.bytes === String)
65426
+ object.nftokenId = "";
65427
+ else {
65428
+ object.nftokenId = [];
65429
+ if (options.bytes !== Array)
65430
+ object.nftokenId = $util.newBuffer(object.nftokenId);
65431
+ }
65432
+ if (message.nftokenId != null && message.hasOwnProperty("nftokenId"))
65433
+ object.nftokenId = options.bytes === String ? $util.base64.encode(message.nftokenId, 0, message.nftokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.nftokenId) : message.nftokenId;
65434
+ return object;
65435
+ };
65436
+
65437
+ /**
65438
+ * Converts this OperationNFTokenBurn to JSON.
65439
+ * @function toJSON
65440
+ * @memberof TW.Ripple.Proto.OperationNFTokenBurn
65441
+ * @instance
65442
+ * @returns {Object.<string,*>} JSON object
65443
+ */
65444
+ OperationNFTokenBurn.prototype.toJSON = function toJSON() {
65445
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
65446
+ };
65447
+
65448
+ return OperationNFTokenBurn;
65449
+ })();
65450
+
65451
+ Proto.OperationNFTokenCreateOffer = (function() {
65452
+
65453
+ /**
65454
+ * Properties of an OperationNFTokenCreateOffer.
65455
+ * @memberof TW.Ripple.Proto
65456
+ * @interface IOperationNFTokenCreateOffer
65457
+ * @property {Uint8Array|null} [nftokenId] OperationNFTokenCreateOffer nftokenId
65458
+ * @property {string|null} [destination] OperationNFTokenCreateOffer destination
65459
+ */
65460
+
65461
+ /**
65462
+ * Constructs a new OperationNFTokenCreateOffer.
65463
+ * @memberof TW.Ripple.Proto
65464
+ * @classdesc Represents an OperationNFTokenCreateOffer.
65465
+ * @implements IOperationNFTokenCreateOffer
65466
+ * @constructor
65467
+ * @param {TW.Ripple.Proto.IOperationNFTokenCreateOffer=} [properties] Properties to set
65468
+ */
65469
+ function OperationNFTokenCreateOffer(properties) {
65470
+ if (properties)
65471
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
65472
+ if (properties[keys[i]] != null)
65473
+ this[keys[i]] = properties[keys[i]];
65474
+ }
65475
+
65476
+ /**
65477
+ * OperationNFTokenCreateOffer nftokenId.
65478
+ * @member {Uint8Array} nftokenId
65479
+ * @memberof TW.Ripple.Proto.OperationNFTokenCreateOffer
65480
+ * @instance
65481
+ */
65482
+ OperationNFTokenCreateOffer.prototype.nftokenId = $util.newBuffer([]);
65483
+
65484
+ /**
65485
+ * OperationNFTokenCreateOffer destination.
65486
+ * @member {string} destination
65487
+ * @memberof TW.Ripple.Proto.OperationNFTokenCreateOffer
65488
+ * @instance
65489
+ */
65490
+ OperationNFTokenCreateOffer.prototype.destination = "";
65491
+
65492
+ /**
65493
+ * Creates a new OperationNFTokenCreateOffer instance using the specified properties.
65494
+ * @function create
65495
+ * @memberof TW.Ripple.Proto.OperationNFTokenCreateOffer
65496
+ * @static
65497
+ * @param {TW.Ripple.Proto.IOperationNFTokenCreateOffer=} [properties] Properties to set
65498
+ * @returns {TW.Ripple.Proto.OperationNFTokenCreateOffer} OperationNFTokenCreateOffer instance
65499
+ */
65500
+ OperationNFTokenCreateOffer.create = function create(properties) {
65501
+ return new OperationNFTokenCreateOffer(properties);
65502
+ };
65503
+
65504
+ /**
65505
+ * Encodes the specified OperationNFTokenCreateOffer message. Does not implicitly {@link TW.Ripple.Proto.OperationNFTokenCreateOffer.verify|verify} messages.
65506
+ * @function encode
65507
+ * @memberof TW.Ripple.Proto.OperationNFTokenCreateOffer
65508
+ * @static
65509
+ * @param {TW.Ripple.Proto.IOperationNFTokenCreateOffer} message OperationNFTokenCreateOffer message or plain object to encode
65510
+ * @param {$protobuf.Writer} [writer] Writer to encode to
65511
+ * @returns {$protobuf.Writer} Writer
65512
+ */
65513
+ OperationNFTokenCreateOffer.encode = function encode(message, writer) {
65514
+ if (!writer)
65515
+ writer = $Writer.create();
65516
+ if (message.nftokenId != null && Object.hasOwnProperty.call(message, "nftokenId"))
65517
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.nftokenId);
65518
+ if (message.destination != null && Object.hasOwnProperty.call(message, "destination"))
65519
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.destination);
65520
+ return writer;
65521
+ };
65522
+
65523
+ /**
65524
+ * Decodes an OperationNFTokenCreateOffer message from the specified reader or buffer.
65525
+ * @function decode
65526
+ * @memberof TW.Ripple.Proto.OperationNFTokenCreateOffer
65527
+ * @static
65528
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
65529
+ * @param {number} [length] Message length if known beforehand
65530
+ * @returns {TW.Ripple.Proto.OperationNFTokenCreateOffer} OperationNFTokenCreateOffer
65531
+ * @throws {Error} If the payload is not a reader or valid buffer
65532
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
65533
+ */
65534
+ OperationNFTokenCreateOffer.decode = function decode(reader, length) {
65535
+ if (!(reader instanceof $Reader))
65536
+ reader = $Reader.create(reader);
65537
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ripple.Proto.OperationNFTokenCreateOffer();
65538
+ while (reader.pos < end) {
65539
+ var tag = reader.uint32();
65540
+ switch (tag >>> 3) {
65541
+ case 1:
65542
+ message.nftokenId = reader.bytes();
65543
+ break;
65544
+ case 2:
65545
+ message.destination = reader.string();
65546
+ break;
65547
+ default:
65548
+ reader.skipType(tag & 7);
65549
+ break;
65550
+ }
65551
+ }
65552
+ return message;
65553
+ };
65554
+
65555
+ /**
65556
+ * Verifies an OperationNFTokenCreateOffer message.
65557
+ * @function verify
65558
+ * @memberof TW.Ripple.Proto.OperationNFTokenCreateOffer
65559
+ * @static
65560
+ * @param {Object.<string,*>} message Plain object to verify
65561
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
65562
+ */
65563
+ OperationNFTokenCreateOffer.verify = function verify(message) {
65564
+ if (typeof message !== "object" || message === null)
65565
+ return "object expected";
65566
+ if (message.nftokenId != null && message.hasOwnProperty("nftokenId"))
65567
+ if (!(message.nftokenId && typeof message.nftokenId.length === "number" || $util.isString(message.nftokenId)))
65568
+ return "nftokenId: buffer expected";
65569
+ if (message.destination != null && message.hasOwnProperty("destination"))
65570
+ if (!$util.isString(message.destination))
65571
+ return "destination: string expected";
65572
+ return null;
65573
+ };
65574
+
65575
+ /**
65576
+ * Creates an OperationNFTokenCreateOffer message from a plain object. Also converts values to their respective internal types.
65577
+ * @function fromObject
65578
+ * @memberof TW.Ripple.Proto.OperationNFTokenCreateOffer
65579
+ * @static
65580
+ * @param {Object.<string,*>} object Plain object
65581
+ * @returns {TW.Ripple.Proto.OperationNFTokenCreateOffer} OperationNFTokenCreateOffer
65582
+ */
65583
+ OperationNFTokenCreateOffer.fromObject = function fromObject(object) {
65584
+ if (object instanceof $root.TW.Ripple.Proto.OperationNFTokenCreateOffer)
65585
+ return object;
65586
+ var message = new $root.TW.Ripple.Proto.OperationNFTokenCreateOffer();
65587
+ if (object.nftokenId != null)
65588
+ if (typeof object.nftokenId === "string")
65589
+ $util.base64.decode(object.nftokenId, message.nftokenId = $util.newBuffer($util.base64.length(object.nftokenId)), 0);
65590
+ else if (object.nftokenId.length)
65591
+ message.nftokenId = object.nftokenId;
65592
+ if (object.destination != null)
65593
+ message.destination = String(object.destination);
65594
+ return message;
65595
+ };
65596
+
65597
+ /**
65598
+ * Creates a plain object from an OperationNFTokenCreateOffer message. Also converts values to other types if specified.
65599
+ * @function toObject
65600
+ * @memberof TW.Ripple.Proto.OperationNFTokenCreateOffer
65601
+ * @static
65602
+ * @param {TW.Ripple.Proto.OperationNFTokenCreateOffer} message OperationNFTokenCreateOffer
65603
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
65604
+ * @returns {Object.<string,*>} Plain object
65605
+ */
65606
+ OperationNFTokenCreateOffer.toObject = function toObject(message, options) {
65607
+ if (!options)
65608
+ options = {};
65609
+ var object = {};
65610
+ if (options.defaults) {
65611
+ if (options.bytes === String)
65612
+ object.nftokenId = "";
65613
+ else {
65614
+ object.nftokenId = [];
65615
+ if (options.bytes !== Array)
65616
+ object.nftokenId = $util.newBuffer(object.nftokenId);
65617
+ }
65618
+ object.destination = "";
65619
+ }
65620
+ if (message.nftokenId != null && message.hasOwnProperty("nftokenId"))
65621
+ object.nftokenId = options.bytes === String ? $util.base64.encode(message.nftokenId, 0, message.nftokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.nftokenId) : message.nftokenId;
65622
+ if (message.destination != null && message.hasOwnProperty("destination"))
65623
+ object.destination = message.destination;
65624
+ return object;
65625
+ };
65626
+
65627
+ /**
65628
+ * Converts this OperationNFTokenCreateOffer to JSON.
65629
+ * @function toJSON
65630
+ * @memberof TW.Ripple.Proto.OperationNFTokenCreateOffer
65631
+ * @instance
65632
+ * @returns {Object.<string,*>} JSON object
65633
+ */
65634
+ OperationNFTokenCreateOffer.prototype.toJSON = function toJSON() {
65635
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
65636
+ };
65637
+
65638
+ return OperationNFTokenCreateOffer;
65639
+ })();
65640
+
65641
+ Proto.OperationNFTokenAcceptOffer = (function() {
65642
+
65643
+ /**
65644
+ * Properties of an OperationNFTokenAcceptOffer.
65645
+ * @memberof TW.Ripple.Proto
65646
+ * @interface IOperationNFTokenAcceptOffer
65647
+ * @property {Uint8Array|null} [sellOffer] OperationNFTokenAcceptOffer sellOffer
65648
+ */
65649
+
65650
+ /**
65651
+ * Constructs a new OperationNFTokenAcceptOffer.
65652
+ * @memberof TW.Ripple.Proto
65653
+ * @classdesc Represents an OperationNFTokenAcceptOffer.
65654
+ * @implements IOperationNFTokenAcceptOffer
65655
+ * @constructor
65656
+ * @param {TW.Ripple.Proto.IOperationNFTokenAcceptOffer=} [properties] Properties to set
65657
+ */
65658
+ function OperationNFTokenAcceptOffer(properties) {
65659
+ if (properties)
65660
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
65661
+ if (properties[keys[i]] != null)
65662
+ this[keys[i]] = properties[keys[i]];
65663
+ }
65664
+
65665
+ /**
65666
+ * OperationNFTokenAcceptOffer sellOffer.
65667
+ * @member {Uint8Array} sellOffer
65668
+ * @memberof TW.Ripple.Proto.OperationNFTokenAcceptOffer
65669
+ * @instance
65670
+ */
65671
+ OperationNFTokenAcceptOffer.prototype.sellOffer = $util.newBuffer([]);
65672
+
65673
+ /**
65674
+ * Creates a new OperationNFTokenAcceptOffer instance using the specified properties.
65675
+ * @function create
65676
+ * @memberof TW.Ripple.Proto.OperationNFTokenAcceptOffer
65677
+ * @static
65678
+ * @param {TW.Ripple.Proto.IOperationNFTokenAcceptOffer=} [properties] Properties to set
65679
+ * @returns {TW.Ripple.Proto.OperationNFTokenAcceptOffer} OperationNFTokenAcceptOffer instance
65680
+ */
65681
+ OperationNFTokenAcceptOffer.create = function create(properties) {
65682
+ return new OperationNFTokenAcceptOffer(properties);
65683
+ };
65684
+
65685
+ /**
65686
+ * Encodes the specified OperationNFTokenAcceptOffer message. Does not implicitly {@link TW.Ripple.Proto.OperationNFTokenAcceptOffer.verify|verify} messages.
65687
+ * @function encode
65688
+ * @memberof TW.Ripple.Proto.OperationNFTokenAcceptOffer
65689
+ * @static
65690
+ * @param {TW.Ripple.Proto.IOperationNFTokenAcceptOffer} message OperationNFTokenAcceptOffer message or plain object to encode
65691
+ * @param {$protobuf.Writer} [writer] Writer to encode to
65692
+ * @returns {$protobuf.Writer} Writer
65693
+ */
65694
+ OperationNFTokenAcceptOffer.encode = function encode(message, writer) {
65695
+ if (!writer)
65696
+ writer = $Writer.create();
65697
+ if (message.sellOffer != null && Object.hasOwnProperty.call(message, "sellOffer"))
65698
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sellOffer);
65699
+ return writer;
65700
+ };
65701
+
65702
+ /**
65703
+ * Decodes an OperationNFTokenAcceptOffer message from the specified reader or buffer.
65704
+ * @function decode
65705
+ * @memberof TW.Ripple.Proto.OperationNFTokenAcceptOffer
65706
+ * @static
65707
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
65708
+ * @param {number} [length] Message length if known beforehand
65709
+ * @returns {TW.Ripple.Proto.OperationNFTokenAcceptOffer} OperationNFTokenAcceptOffer
65710
+ * @throws {Error} If the payload is not a reader or valid buffer
65711
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
65712
+ */
65713
+ OperationNFTokenAcceptOffer.decode = function decode(reader, length) {
65714
+ if (!(reader instanceof $Reader))
65715
+ reader = $Reader.create(reader);
65716
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ripple.Proto.OperationNFTokenAcceptOffer();
65717
+ while (reader.pos < end) {
65718
+ var tag = reader.uint32();
65719
+ switch (tag >>> 3) {
65720
+ case 1:
65721
+ message.sellOffer = reader.bytes();
65722
+ break;
65723
+ default:
65724
+ reader.skipType(tag & 7);
65725
+ break;
65726
+ }
65727
+ }
65728
+ return message;
65729
+ };
65730
+
65731
+ /**
65732
+ * Verifies an OperationNFTokenAcceptOffer message.
65733
+ * @function verify
65734
+ * @memberof TW.Ripple.Proto.OperationNFTokenAcceptOffer
65735
+ * @static
65736
+ * @param {Object.<string,*>} message Plain object to verify
65737
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
65738
+ */
65739
+ OperationNFTokenAcceptOffer.verify = function verify(message) {
65740
+ if (typeof message !== "object" || message === null)
65741
+ return "object expected";
65742
+ if (message.sellOffer != null && message.hasOwnProperty("sellOffer"))
65743
+ if (!(message.sellOffer && typeof message.sellOffer.length === "number" || $util.isString(message.sellOffer)))
65744
+ return "sellOffer: buffer expected";
65745
+ return null;
65746
+ };
65747
+
65748
+ /**
65749
+ * Creates an OperationNFTokenAcceptOffer message from a plain object. Also converts values to their respective internal types.
65750
+ * @function fromObject
65751
+ * @memberof TW.Ripple.Proto.OperationNFTokenAcceptOffer
65752
+ * @static
65753
+ * @param {Object.<string,*>} object Plain object
65754
+ * @returns {TW.Ripple.Proto.OperationNFTokenAcceptOffer} OperationNFTokenAcceptOffer
65755
+ */
65756
+ OperationNFTokenAcceptOffer.fromObject = function fromObject(object) {
65757
+ if (object instanceof $root.TW.Ripple.Proto.OperationNFTokenAcceptOffer)
65758
+ return object;
65759
+ var message = new $root.TW.Ripple.Proto.OperationNFTokenAcceptOffer();
65760
+ if (object.sellOffer != null)
65761
+ if (typeof object.sellOffer === "string")
65762
+ $util.base64.decode(object.sellOffer, message.sellOffer = $util.newBuffer($util.base64.length(object.sellOffer)), 0);
65763
+ else if (object.sellOffer.length)
65764
+ message.sellOffer = object.sellOffer;
65765
+ return message;
65766
+ };
65767
+
65768
+ /**
65769
+ * Creates a plain object from an OperationNFTokenAcceptOffer message. Also converts values to other types if specified.
65770
+ * @function toObject
65771
+ * @memberof TW.Ripple.Proto.OperationNFTokenAcceptOffer
65772
+ * @static
65773
+ * @param {TW.Ripple.Proto.OperationNFTokenAcceptOffer} message OperationNFTokenAcceptOffer
65774
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
65775
+ * @returns {Object.<string,*>} Plain object
65776
+ */
65777
+ OperationNFTokenAcceptOffer.toObject = function toObject(message, options) {
65778
+ if (!options)
65779
+ options = {};
65780
+ var object = {};
65781
+ if (options.defaults)
65782
+ if (options.bytes === String)
65783
+ object.sellOffer = "";
65784
+ else {
65785
+ object.sellOffer = [];
65786
+ if (options.bytes !== Array)
65787
+ object.sellOffer = $util.newBuffer(object.sellOffer);
65788
+ }
65789
+ if (message.sellOffer != null && message.hasOwnProperty("sellOffer"))
65790
+ object.sellOffer = options.bytes === String ? $util.base64.encode(message.sellOffer, 0, message.sellOffer.length) : options.bytes === Array ? Array.prototype.slice.call(message.sellOffer) : message.sellOffer;
65791
+ return object;
65792
+ };
65793
+
65794
+ /**
65795
+ * Converts this OperationNFTokenAcceptOffer to JSON.
65796
+ * @function toJSON
65797
+ * @memberof TW.Ripple.Proto.OperationNFTokenAcceptOffer
65798
+ * @instance
65799
+ * @returns {Object.<string,*>} JSON object
65800
+ */
65801
+ OperationNFTokenAcceptOffer.prototype.toJSON = function toJSON() {
65802
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
65803
+ };
65804
+
65805
+ return OperationNFTokenAcceptOffer;
65806
+ })();
65807
+
65808
+ Proto.OperationNFTokenCancelOffer = (function() {
65809
+
65810
+ /**
65811
+ * Properties of an OperationNFTokenCancelOffer.
65812
+ * @memberof TW.Ripple.Proto
65813
+ * @interface IOperationNFTokenCancelOffer
65814
+ * @property {Array.<Uint8Array>|null} [tokenOffers] OperationNFTokenCancelOffer tokenOffers
65815
+ */
65816
+
65817
+ /**
65818
+ * Constructs a new OperationNFTokenCancelOffer.
65819
+ * @memberof TW.Ripple.Proto
65820
+ * @classdesc Represents an OperationNFTokenCancelOffer.
65821
+ * @implements IOperationNFTokenCancelOffer
65822
+ * @constructor
65823
+ * @param {TW.Ripple.Proto.IOperationNFTokenCancelOffer=} [properties] Properties to set
65824
+ */
65825
+ function OperationNFTokenCancelOffer(properties) {
65826
+ this.tokenOffers = [];
65827
+ if (properties)
65828
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
65829
+ if (properties[keys[i]] != null)
65830
+ this[keys[i]] = properties[keys[i]];
65831
+ }
65832
+
65833
+ /**
65834
+ * OperationNFTokenCancelOffer tokenOffers.
65835
+ * @member {Array.<Uint8Array>} tokenOffers
65836
+ * @memberof TW.Ripple.Proto.OperationNFTokenCancelOffer
65837
+ * @instance
65838
+ */
65839
+ OperationNFTokenCancelOffer.prototype.tokenOffers = $util.emptyArray;
65840
+
65841
+ /**
65842
+ * Creates a new OperationNFTokenCancelOffer instance using the specified properties.
65843
+ * @function create
65844
+ * @memberof TW.Ripple.Proto.OperationNFTokenCancelOffer
65845
+ * @static
65846
+ * @param {TW.Ripple.Proto.IOperationNFTokenCancelOffer=} [properties] Properties to set
65847
+ * @returns {TW.Ripple.Proto.OperationNFTokenCancelOffer} OperationNFTokenCancelOffer instance
65848
+ */
65849
+ OperationNFTokenCancelOffer.create = function create(properties) {
65850
+ return new OperationNFTokenCancelOffer(properties);
65851
+ };
65852
+
65853
+ /**
65854
+ * Encodes the specified OperationNFTokenCancelOffer message. Does not implicitly {@link TW.Ripple.Proto.OperationNFTokenCancelOffer.verify|verify} messages.
65855
+ * @function encode
65856
+ * @memberof TW.Ripple.Proto.OperationNFTokenCancelOffer
65857
+ * @static
65858
+ * @param {TW.Ripple.Proto.IOperationNFTokenCancelOffer} message OperationNFTokenCancelOffer message or plain object to encode
65859
+ * @param {$protobuf.Writer} [writer] Writer to encode to
65860
+ * @returns {$protobuf.Writer} Writer
65861
+ */
65862
+ OperationNFTokenCancelOffer.encode = function encode(message, writer) {
65863
+ if (!writer)
65864
+ writer = $Writer.create();
65865
+ if (message.tokenOffers != null && message.tokenOffers.length)
65866
+ for (var i = 0; i < message.tokenOffers.length; ++i)
65867
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenOffers[i]);
65868
+ return writer;
65869
+ };
65870
+
65871
+ /**
65872
+ * Decodes an OperationNFTokenCancelOffer message from the specified reader or buffer.
65873
+ * @function decode
65874
+ * @memberof TW.Ripple.Proto.OperationNFTokenCancelOffer
65875
+ * @static
65876
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
65877
+ * @param {number} [length] Message length if known beforehand
65878
+ * @returns {TW.Ripple.Proto.OperationNFTokenCancelOffer} OperationNFTokenCancelOffer
65879
+ * @throws {Error} If the payload is not a reader or valid buffer
65880
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
65881
+ */
65882
+ OperationNFTokenCancelOffer.decode = function decode(reader, length) {
65883
+ if (!(reader instanceof $Reader))
65884
+ reader = $Reader.create(reader);
65885
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ripple.Proto.OperationNFTokenCancelOffer();
65886
+ while (reader.pos < end) {
65887
+ var tag = reader.uint32();
65888
+ switch (tag >>> 3) {
65889
+ case 1:
65890
+ if (!(message.tokenOffers && message.tokenOffers.length))
65891
+ message.tokenOffers = [];
65892
+ message.tokenOffers.push(reader.bytes());
65893
+ break;
65894
+ default:
65895
+ reader.skipType(tag & 7);
65896
+ break;
65897
+ }
65898
+ }
65899
+ return message;
65900
+ };
65901
+
65902
+ /**
65903
+ * Verifies an OperationNFTokenCancelOffer message.
65904
+ * @function verify
65905
+ * @memberof TW.Ripple.Proto.OperationNFTokenCancelOffer
65906
+ * @static
65907
+ * @param {Object.<string,*>} message Plain object to verify
65908
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
65909
+ */
65910
+ OperationNFTokenCancelOffer.verify = function verify(message) {
65911
+ if (typeof message !== "object" || message === null)
65912
+ return "object expected";
65913
+ if (message.tokenOffers != null && message.hasOwnProperty("tokenOffers")) {
65914
+ if (!Array.isArray(message.tokenOffers))
65915
+ return "tokenOffers: array expected";
65916
+ for (var i = 0; i < message.tokenOffers.length; ++i)
65917
+ if (!(message.tokenOffers[i] && typeof message.tokenOffers[i].length === "number" || $util.isString(message.tokenOffers[i])))
65918
+ return "tokenOffers: buffer[] expected";
65919
+ }
65920
+ return null;
65921
+ };
65922
+
65923
+ /**
65924
+ * Creates an OperationNFTokenCancelOffer message from a plain object. Also converts values to their respective internal types.
65925
+ * @function fromObject
65926
+ * @memberof TW.Ripple.Proto.OperationNFTokenCancelOffer
65927
+ * @static
65928
+ * @param {Object.<string,*>} object Plain object
65929
+ * @returns {TW.Ripple.Proto.OperationNFTokenCancelOffer} OperationNFTokenCancelOffer
65930
+ */
65931
+ OperationNFTokenCancelOffer.fromObject = function fromObject(object) {
65932
+ if (object instanceof $root.TW.Ripple.Proto.OperationNFTokenCancelOffer)
65933
+ return object;
65934
+ var message = new $root.TW.Ripple.Proto.OperationNFTokenCancelOffer();
65935
+ if (object.tokenOffers) {
65936
+ if (!Array.isArray(object.tokenOffers))
65937
+ throw TypeError(".TW.Ripple.Proto.OperationNFTokenCancelOffer.tokenOffers: array expected");
65938
+ message.tokenOffers = [];
65939
+ for (var i = 0; i < object.tokenOffers.length; ++i)
65940
+ if (typeof object.tokenOffers[i] === "string")
65941
+ $util.base64.decode(object.tokenOffers[i], message.tokenOffers[i] = $util.newBuffer($util.base64.length(object.tokenOffers[i])), 0);
65942
+ else if (object.tokenOffers[i].length)
65943
+ message.tokenOffers[i] = object.tokenOffers[i];
65944
+ }
65945
+ return message;
65946
+ };
65947
+
65948
+ /**
65949
+ * Creates a plain object from an OperationNFTokenCancelOffer message. Also converts values to other types if specified.
65950
+ * @function toObject
65951
+ * @memberof TW.Ripple.Proto.OperationNFTokenCancelOffer
65952
+ * @static
65953
+ * @param {TW.Ripple.Proto.OperationNFTokenCancelOffer} message OperationNFTokenCancelOffer
65954
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
65955
+ * @returns {Object.<string,*>} Plain object
65956
+ */
65957
+ OperationNFTokenCancelOffer.toObject = function toObject(message, options) {
65958
+ if (!options)
65959
+ options = {};
65960
+ var object = {};
65961
+ if (options.arrays || options.defaults)
65962
+ object.tokenOffers = [];
65963
+ if (message.tokenOffers && message.tokenOffers.length) {
65964
+ object.tokenOffers = [];
65965
+ for (var j = 0; j < message.tokenOffers.length; ++j)
65966
+ object.tokenOffers[j] = options.bytes === String ? $util.base64.encode(message.tokenOffers[j], 0, message.tokenOffers[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenOffers[j]) : message.tokenOffers[j];
65967
+ }
65968
+ return object;
65969
+ };
65970
+
65971
+ /**
65972
+ * Converts this OperationNFTokenCancelOffer to JSON.
65973
+ * @function toJSON
65974
+ * @memberof TW.Ripple.Proto.OperationNFTokenCancelOffer
65975
+ * @instance
65976
+ * @returns {Object.<string,*>} JSON object
65977
+ */
65978
+ OperationNFTokenCancelOffer.prototype.toJSON = function toJSON() {
65979
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
65980
+ };
65981
+
65982
+ return OperationNFTokenCancelOffer;
65983
+ })();
65984
+
64638
65985
  Proto.SigningInput = (function() {
64639
65986
 
64640
65987
  /**
64641
65988
  * Properties of a SigningInput.
64642
65989
  * @memberof TW.Ripple.Proto
64643
65990
  * @interface ISigningInput
64644
- * @property {Long|null} [amount] SigningInput amount
64645
65991
  * @property {Long|null} [fee] SigningInput fee
64646
65992
  * @property {number|null} [sequence] SigningInput sequence
64647
65993
  * @property {number|null} [lastLedgerSequence] SigningInput lastLedgerSequence
64648
65994
  * @property {string|null} [account] SigningInput account
64649
- * @property {string|null} [destination] SigningInput destination
64650
- * @property {Long|null} [destinationTag] SigningInput destinationTag
64651
65995
  * @property {Long|null} [flags] SigningInput flags
64652
65996
  * @property {Uint8Array|null} [privateKey] SigningInput privateKey
65997
+ * @property {TW.Ripple.Proto.IOperationTrustSet|null} [opTrustSet] SigningInput opTrustSet
65998
+ * @property {TW.Ripple.Proto.IOperationPayment|null} [opPayment] SigningInput opPayment
65999
+ * @property {TW.Ripple.Proto.IOperationNFTokenBurn|null} [opNftokenBurn] SigningInput opNftokenBurn
66000
+ * @property {TW.Ripple.Proto.IOperationNFTokenCreateOffer|null} [opNftokenCreateOffer] SigningInput opNftokenCreateOffer
66001
+ * @property {TW.Ripple.Proto.IOperationNFTokenAcceptOffer|null} [opNftokenAcceptOffer] SigningInput opNftokenAcceptOffer
66002
+ * @property {TW.Ripple.Proto.IOperationNFTokenCancelOffer|null} [opNftokenCancelOffer] SigningInput opNftokenCancelOffer
64653
66003
  */
64654
66004
 
64655
66005
  /**
@@ -64667,14 +66017,6 @@
64667
66017
  this[keys[i]] = properties[keys[i]];
64668
66018
  }
64669
66019
 
64670
- /**
64671
- * SigningInput amount.
64672
- * @member {Long} amount
64673
- * @memberof TW.Ripple.Proto.SigningInput
64674
- * @instance
64675
- */
64676
- SigningInput.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
64677
-
64678
66020
  /**
64679
66021
  * SigningInput fee.
64680
66022
  * @member {Long} fee
@@ -64708,36 +66050,82 @@
64708
66050
  SigningInput.prototype.account = "";
64709
66051
 
64710
66052
  /**
64711
- * SigningInput destination.
64712
- * @member {string} destination
66053
+ * SigningInput flags.
66054
+ * @member {Long} flags
64713
66055
  * @memberof TW.Ripple.Proto.SigningInput
64714
66056
  * @instance
64715
66057
  */
64716
- SigningInput.prototype.destination = "";
66058
+ SigningInput.prototype.flags = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
64717
66059
 
64718
66060
  /**
64719
- * SigningInput destinationTag.
64720
- * @member {Long} destinationTag
66061
+ * SigningInput privateKey.
66062
+ * @member {Uint8Array} privateKey
64721
66063
  * @memberof TW.Ripple.Proto.SigningInput
64722
66064
  * @instance
64723
66065
  */
64724
- SigningInput.prototype.destinationTag = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
66066
+ SigningInput.prototype.privateKey = $util.newBuffer([]);
64725
66067
 
64726
66068
  /**
64727
- * SigningInput flags.
64728
- * @member {Long} flags
66069
+ * SigningInput opTrustSet.
66070
+ * @member {TW.Ripple.Proto.IOperationTrustSet|null|undefined} opTrustSet
64729
66071
  * @memberof TW.Ripple.Proto.SigningInput
64730
66072
  * @instance
64731
66073
  */
64732
- SigningInput.prototype.flags = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
66074
+ SigningInput.prototype.opTrustSet = null;
64733
66075
 
64734
66076
  /**
64735
- * SigningInput privateKey.
64736
- * @member {Uint8Array} privateKey
66077
+ * SigningInput opPayment.
66078
+ * @member {TW.Ripple.Proto.IOperationPayment|null|undefined} opPayment
64737
66079
  * @memberof TW.Ripple.Proto.SigningInput
64738
66080
  * @instance
64739
66081
  */
64740
- SigningInput.prototype.privateKey = $util.newBuffer([]);
66082
+ SigningInput.prototype.opPayment = null;
66083
+
66084
+ /**
66085
+ * SigningInput opNftokenBurn.
66086
+ * @member {TW.Ripple.Proto.IOperationNFTokenBurn|null|undefined} opNftokenBurn
66087
+ * @memberof TW.Ripple.Proto.SigningInput
66088
+ * @instance
66089
+ */
66090
+ SigningInput.prototype.opNftokenBurn = null;
66091
+
66092
+ /**
66093
+ * SigningInput opNftokenCreateOffer.
66094
+ * @member {TW.Ripple.Proto.IOperationNFTokenCreateOffer|null|undefined} opNftokenCreateOffer
66095
+ * @memberof TW.Ripple.Proto.SigningInput
66096
+ * @instance
66097
+ */
66098
+ SigningInput.prototype.opNftokenCreateOffer = null;
66099
+
66100
+ /**
66101
+ * SigningInput opNftokenAcceptOffer.
66102
+ * @member {TW.Ripple.Proto.IOperationNFTokenAcceptOffer|null|undefined} opNftokenAcceptOffer
66103
+ * @memberof TW.Ripple.Proto.SigningInput
66104
+ * @instance
66105
+ */
66106
+ SigningInput.prototype.opNftokenAcceptOffer = null;
66107
+
66108
+ /**
66109
+ * SigningInput opNftokenCancelOffer.
66110
+ * @member {TW.Ripple.Proto.IOperationNFTokenCancelOffer|null|undefined} opNftokenCancelOffer
66111
+ * @memberof TW.Ripple.Proto.SigningInput
66112
+ * @instance
66113
+ */
66114
+ SigningInput.prototype.opNftokenCancelOffer = null;
66115
+
66116
+ // OneOf field names bound to virtual getters and setters
66117
+ var $oneOfFields;
66118
+
66119
+ /**
66120
+ * SigningInput operationOneof.
66121
+ * @member {"opTrustSet"|"opPayment"|"opNftokenBurn"|"opNftokenCreateOffer"|"opNftokenAcceptOffer"|"opNftokenCancelOffer"|undefined} operationOneof
66122
+ * @memberof TW.Ripple.Proto.SigningInput
66123
+ * @instance
66124
+ */
66125
+ Object.defineProperty(SigningInput.prototype, "operationOneof", {
66126
+ get: $util.oneOfGetter($oneOfFields = ["opTrustSet", "opPayment", "opNftokenBurn", "opNftokenCreateOffer", "opNftokenAcceptOffer", "opNftokenCancelOffer"]),
66127
+ set: $util.oneOfSetter($oneOfFields)
66128
+ });
64741
66129
 
64742
66130
  /**
64743
66131
  * Creates a new SigningInput instance using the specified properties.
@@ -64763,24 +66151,30 @@
64763
66151
  SigningInput.encode = function encode(message, writer) {
64764
66152
  if (!writer)
64765
66153
  writer = $Writer.create();
64766
- if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
64767
- writer.uint32(/* id 1, wireType 0 =*/8).int64(message.amount);
64768
66154
  if (message.fee != null && Object.hasOwnProperty.call(message, "fee"))
64769
- writer.uint32(/* id 2, wireType 0 =*/16).int64(message.fee);
66155
+ writer.uint32(/* id 1, wireType 0 =*/8).int64(message.fee);
64770
66156
  if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence"))
64771
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sequence);
66157
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sequence);
64772
66158
  if (message.lastLedgerSequence != null && Object.hasOwnProperty.call(message, "lastLedgerSequence"))
64773
- writer.uint32(/* id 4, wireType 0 =*/32).int32(message.lastLedgerSequence);
66159
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.lastLedgerSequence);
64774
66160
  if (message.account != null && Object.hasOwnProperty.call(message, "account"))
64775
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.account);
64776
- if (message.destination != null && Object.hasOwnProperty.call(message, "destination"))
64777
- writer.uint32(/* id 6, wireType 2 =*/50).string(message.destination);
64778
- if (message.destinationTag != null && Object.hasOwnProperty.call(message, "destinationTag"))
64779
- writer.uint32(/* id 7, wireType 0 =*/56).int64(message.destinationTag);
66161
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.account);
64780
66162
  if (message.flags != null && Object.hasOwnProperty.call(message, "flags"))
64781
- writer.uint32(/* id 8, wireType 0 =*/64).int64(message.flags);
66163
+ writer.uint32(/* id 5, wireType 0 =*/40).int64(message.flags);
64782
66164
  if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
64783
- writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.privateKey);
66165
+ writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.privateKey);
66166
+ if (message.opTrustSet != null && Object.hasOwnProperty.call(message, "opTrustSet"))
66167
+ $root.TW.Ripple.Proto.OperationTrustSet.encode(message.opTrustSet, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
66168
+ if (message.opPayment != null && Object.hasOwnProperty.call(message, "opPayment"))
66169
+ $root.TW.Ripple.Proto.OperationPayment.encode(message.opPayment, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
66170
+ if (message.opNftokenBurn != null && Object.hasOwnProperty.call(message, "opNftokenBurn"))
66171
+ $root.TW.Ripple.Proto.OperationNFTokenBurn.encode(message.opNftokenBurn, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
66172
+ if (message.opNftokenCreateOffer != null && Object.hasOwnProperty.call(message, "opNftokenCreateOffer"))
66173
+ $root.TW.Ripple.Proto.OperationNFTokenCreateOffer.encode(message.opNftokenCreateOffer, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
66174
+ if (message.opNftokenAcceptOffer != null && Object.hasOwnProperty.call(message, "opNftokenAcceptOffer"))
66175
+ $root.TW.Ripple.Proto.OperationNFTokenAcceptOffer.encode(message.opNftokenAcceptOffer, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
66176
+ if (message.opNftokenCancelOffer != null && Object.hasOwnProperty.call(message, "opNftokenCancelOffer"))
66177
+ $root.TW.Ripple.Proto.OperationNFTokenCancelOffer.encode(message.opNftokenCancelOffer, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
64784
66178
  return writer;
64785
66179
  };
64786
66180
 
@@ -64803,31 +66197,40 @@
64803
66197
  var tag = reader.uint32();
64804
66198
  switch (tag >>> 3) {
64805
66199
  case 1:
64806
- message.amount = reader.int64();
66200
+ message.fee = reader.int64();
64807
66201
  break;
64808
66202
  case 2:
64809
- message.fee = reader.int64();
66203
+ message.sequence = reader.int32();
64810
66204
  break;
64811
66205
  case 3:
64812
- message.sequence = reader.int32();
66206
+ message.lastLedgerSequence = reader.int32();
64813
66207
  break;
64814
66208
  case 4:
64815
- message.lastLedgerSequence = reader.int32();
66209
+ message.account = reader.string();
64816
66210
  break;
64817
66211
  case 5:
64818
- message.account = reader.string();
66212
+ message.flags = reader.int64();
64819
66213
  break;
64820
66214
  case 6:
64821
- message.destination = reader.string();
66215
+ message.privateKey = reader.bytes();
64822
66216
  break;
64823
66217
  case 7:
64824
- message.destinationTag = reader.int64();
66218
+ message.opTrustSet = $root.TW.Ripple.Proto.OperationTrustSet.decode(reader, reader.uint32());
64825
66219
  break;
64826
66220
  case 8:
64827
- message.flags = reader.int64();
66221
+ message.opPayment = $root.TW.Ripple.Proto.OperationPayment.decode(reader, reader.uint32());
64828
66222
  break;
64829
66223
  case 9:
64830
- message.privateKey = reader.bytes();
66224
+ message.opNftokenBurn = $root.TW.Ripple.Proto.OperationNFTokenBurn.decode(reader, reader.uint32());
66225
+ break;
66226
+ case 10:
66227
+ message.opNftokenCreateOffer = $root.TW.Ripple.Proto.OperationNFTokenCreateOffer.decode(reader, reader.uint32());
66228
+ break;
66229
+ case 11:
66230
+ message.opNftokenAcceptOffer = $root.TW.Ripple.Proto.OperationNFTokenAcceptOffer.decode(reader, reader.uint32());
66231
+ break;
66232
+ case 12:
66233
+ message.opNftokenCancelOffer = $root.TW.Ripple.Proto.OperationNFTokenCancelOffer.decode(reader, reader.uint32());
64831
66234
  break;
64832
66235
  default:
64833
66236
  reader.skipType(tag & 7);
@@ -64848,9 +66251,7 @@
64848
66251
  SigningInput.verify = function verify(message) {
64849
66252
  if (typeof message !== "object" || message === null)
64850
66253
  return "object expected";
64851
- if (message.amount != null && message.hasOwnProperty("amount"))
64852
- if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
64853
- return "amount: integer|Long expected";
66254
+ var properties = {};
64854
66255
  if (message.fee != null && message.hasOwnProperty("fee"))
64855
66256
  if (!$util.isInteger(message.fee) && !(message.fee && $util.isInteger(message.fee.low) && $util.isInteger(message.fee.high)))
64856
66257
  return "fee: integer|Long expected";
@@ -64863,18 +66264,70 @@
64863
66264
  if (message.account != null && message.hasOwnProperty("account"))
64864
66265
  if (!$util.isString(message.account))
64865
66266
  return "account: string expected";
64866
- if (message.destination != null && message.hasOwnProperty("destination"))
64867
- if (!$util.isString(message.destination))
64868
- return "destination: string expected";
64869
- if (message.destinationTag != null && message.hasOwnProperty("destinationTag"))
64870
- if (!$util.isInteger(message.destinationTag) && !(message.destinationTag && $util.isInteger(message.destinationTag.low) && $util.isInteger(message.destinationTag.high)))
64871
- return "destinationTag: integer|Long expected";
64872
66267
  if (message.flags != null && message.hasOwnProperty("flags"))
64873
66268
  if (!$util.isInteger(message.flags) && !(message.flags && $util.isInteger(message.flags.low) && $util.isInteger(message.flags.high)))
64874
66269
  return "flags: integer|Long expected";
64875
66270
  if (message.privateKey != null && message.hasOwnProperty("privateKey"))
64876
66271
  if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
64877
66272
  return "privateKey: buffer expected";
66273
+ if (message.opTrustSet != null && message.hasOwnProperty("opTrustSet")) {
66274
+ properties.operationOneof = 1;
66275
+ {
66276
+ var error = $root.TW.Ripple.Proto.OperationTrustSet.verify(message.opTrustSet);
66277
+ if (error)
66278
+ return "opTrustSet." + error;
66279
+ }
66280
+ }
66281
+ if (message.opPayment != null && message.hasOwnProperty("opPayment")) {
66282
+ if (properties.operationOneof === 1)
66283
+ return "operationOneof: multiple values";
66284
+ properties.operationOneof = 1;
66285
+ {
66286
+ var error = $root.TW.Ripple.Proto.OperationPayment.verify(message.opPayment);
66287
+ if (error)
66288
+ return "opPayment." + error;
66289
+ }
66290
+ }
66291
+ if (message.opNftokenBurn != null && message.hasOwnProperty("opNftokenBurn")) {
66292
+ if (properties.operationOneof === 1)
66293
+ return "operationOneof: multiple values";
66294
+ properties.operationOneof = 1;
66295
+ {
66296
+ var error = $root.TW.Ripple.Proto.OperationNFTokenBurn.verify(message.opNftokenBurn);
66297
+ if (error)
66298
+ return "opNftokenBurn." + error;
66299
+ }
66300
+ }
66301
+ if (message.opNftokenCreateOffer != null && message.hasOwnProperty("opNftokenCreateOffer")) {
66302
+ if (properties.operationOneof === 1)
66303
+ return "operationOneof: multiple values";
66304
+ properties.operationOneof = 1;
66305
+ {
66306
+ var error = $root.TW.Ripple.Proto.OperationNFTokenCreateOffer.verify(message.opNftokenCreateOffer);
66307
+ if (error)
66308
+ return "opNftokenCreateOffer." + error;
66309
+ }
66310
+ }
66311
+ if (message.opNftokenAcceptOffer != null && message.hasOwnProperty("opNftokenAcceptOffer")) {
66312
+ if (properties.operationOneof === 1)
66313
+ return "operationOneof: multiple values";
66314
+ properties.operationOneof = 1;
66315
+ {
66316
+ var error = $root.TW.Ripple.Proto.OperationNFTokenAcceptOffer.verify(message.opNftokenAcceptOffer);
66317
+ if (error)
66318
+ return "opNftokenAcceptOffer." + error;
66319
+ }
66320
+ }
66321
+ if (message.opNftokenCancelOffer != null && message.hasOwnProperty("opNftokenCancelOffer")) {
66322
+ if (properties.operationOneof === 1)
66323
+ return "operationOneof: multiple values";
66324
+ properties.operationOneof = 1;
66325
+ {
66326
+ var error = $root.TW.Ripple.Proto.OperationNFTokenCancelOffer.verify(message.opNftokenCancelOffer);
66327
+ if (error)
66328
+ return "opNftokenCancelOffer." + error;
66329
+ }
66330
+ }
64878
66331
  return null;
64879
66332
  };
64880
66333
 
@@ -64890,15 +66343,6 @@
64890
66343
  if (object instanceof $root.TW.Ripple.Proto.SigningInput)
64891
66344
  return object;
64892
66345
  var message = new $root.TW.Ripple.Proto.SigningInput();
64893
- if (object.amount != null)
64894
- if ($util.Long)
64895
- (message.amount = $util.Long.fromValue(object.amount)).unsigned = false;
64896
- else if (typeof object.amount === "string")
64897
- message.amount = parseInt(object.amount, 10);
64898
- else if (typeof object.amount === "number")
64899
- message.amount = object.amount;
64900
- else if (typeof object.amount === "object")
64901
- message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber();
64902
66346
  if (object.fee != null)
64903
66347
  if ($util.Long)
64904
66348
  (message.fee = $util.Long.fromValue(object.fee)).unsigned = false;
@@ -64914,17 +66358,6 @@
64914
66358
  message.lastLedgerSequence = object.lastLedgerSequence | 0;
64915
66359
  if (object.account != null)
64916
66360
  message.account = String(object.account);
64917
- if (object.destination != null)
64918
- message.destination = String(object.destination);
64919
- if (object.destinationTag != null)
64920
- if ($util.Long)
64921
- (message.destinationTag = $util.Long.fromValue(object.destinationTag)).unsigned = false;
64922
- else if (typeof object.destinationTag === "string")
64923
- message.destinationTag = parseInt(object.destinationTag, 10);
64924
- else if (typeof object.destinationTag === "number")
64925
- message.destinationTag = object.destinationTag;
64926
- else if (typeof object.destinationTag === "object")
64927
- message.destinationTag = new $util.LongBits(object.destinationTag.low >>> 0, object.destinationTag.high >>> 0).toNumber();
64928
66361
  if (object.flags != null)
64929
66362
  if ($util.Long)
64930
66363
  (message.flags = $util.Long.fromValue(object.flags)).unsigned = false;
@@ -64939,6 +66372,36 @@
64939
66372
  $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
64940
66373
  else if (object.privateKey.length)
64941
66374
  message.privateKey = object.privateKey;
66375
+ if (object.opTrustSet != null) {
66376
+ if (typeof object.opTrustSet !== "object")
66377
+ throw TypeError(".TW.Ripple.Proto.SigningInput.opTrustSet: object expected");
66378
+ message.opTrustSet = $root.TW.Ripple.Proto.OperationTrustSet.fromObject(object.opTrustSet);
66379
+ }
66380
+ if (object.opPayment != null) {
66381
+ if (typeof object.opPayment !== "object")
66382
+ throw TypeError(".TW.Ripple.Proto.SigningInput.opPayment: object expected");
66383
+ message.opPayment = $root.TW.Ripple.Proto.OperationPayment.fromObject(object.opPayment);
66384
+ }
66385
+ if (object.opNftokenBurn != null) {
66386
+ if (typeof object.opNftokenBurn !== "object")
66387
+ throw TypeError(".TW.Ripple.Proto.SigningInput.opNftokenBurn: object expected");
66388
+ message.opNftokenBurn = $root.TW.Ripple.Proto.OperationNFTokenBurn.fromObject(object.opNftokenBurn);
66389
+ }
66390
+ if (object.opNftokenCreateOffer != null) {
66391
+ if (typeof object.opNftokenCreateOffer !== "object")
66392
+ throw TypeError(".TW.Ripple.Proto.SigningInput.opNftokenCreateOffer: object expected");
66393
+ message.opNftokenCreateOffer = $root.TW.Ripple.Proto.OperationNFTokenCreateOffer.fromObject(object.opNftokenCreateOffer);
66394
+ }
66395
+ if (object.opNftokenAcceptOffer != null) {
66396
+ if (typeof object.opNftokenAcceptOffer !== "object")
66397
+ throw TypeError(".TW.Ripple.Proto.SigningInput.opNftokenAcceptOffer: object expected");
66398
+ message.opNftokenAcceptOffer = $root.TW.Ripple.Proto.OperationNFTokenAcceptOffer.fromObject(object.opNftokenAcceptOffer);
66399
+ }
66400
+ if (object.opNftokenCancelOffer != null) {
66401
+ if (typeof object.opNftokenCancelOffer !== "object")
66402
+ throw TypeError(".TW.Ripple.Proto.SigningInput.opNftokenCancelOffer: object expected");
66403
+ message.opNftokenCancelOffer = $root.TW.Ripple.Proto.OperationNFTokenCancelOffer.fromObject(object.opNftokenCancelOffer);
66404
+ }
64942
66405
  return message;
64943
66406
  };
64944
66407
 
@@ -64956,11 +66419,6 @@
64956
66419
  options = {};
64957
66420
  var object = {};
64958
66421
  if (options.defaults) {
64959
- if ($util.Long) {
64960
- var long = new $util.Long(0, 0, false);
64961
- object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
64962
- } else
64963
- object.amount = options.longs === String ? "0" : 0;
64964
66422
  if ($util.Long) {
64965
66423
  var long = new $util.Long(0, 0, false);
64966
66424
  object.fee = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
@@ -64969,12 +66427,6 @@
64969
66427
  object.sequence = 0;
64970
66428
  object.lastLedgerSequence = 0;
64971
66429
  object.account = "";
64972
- object.destination = "";
64973
- if ($util.Long) {
64974
- var long = new $util.Long(0, 0, false);
64975
- object.destinationTag = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
64976
- } else
64977
- object.destinationTag = options.longs === String ? "0" : 0;
64978
66430
  if ($util.Long) {
64979
66431
  var long = new $util.Long(0, 0, false);
64980
66432
  object.flags = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
@@ -64988,11 +66440,6 @@
64988
66440
  object.privateKey = $util.newBuffer(object.privateKey);
64989
66441
  }
64990
66442
  }
64991
- if (message.amount != null && message.hasOwnProperty("amount"))
64992
- if (typeof message.amount === "number")
64993
- object.amount = options.longs === String ? String(message.amount) : message.amount;
64994
- else
64995
- 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() : message.amount;
64996
66443
  if (message.fee != null && message.hasOwnProperty("fee"))
64997
66444
  if (typeof message.fee === "number")
64998
66445
  object.fee = options.longs === String ? String(message.fee) : message.fee;
@@ -65004,13 +66451,6 @@
65004
66451
  object.lastLedgerSequence = message.lastLedgerSequence;
65005
66452
  if (message.account != null && message.hasOwnProperty("account"))
65006
66453
  object.account = message.account;
65007
- if (message.destination != null && message.hasOwnProperty("destination"))
65008
- object.destination = message.destination;
65009
- if (message.destinationTag != null && message.hasOwnProperty("destinationTag"))
65010
- if (typeof message.destinationTag === "number")
65011
- object.destinationTag = options.longs === String ? String(message.destinationTag) : message.destinationTag;
65012
- else
65013
- object.destinationTag = options.longs === String ? $util.Long.prototype.toString.call(message.destinationTag) : options.longs === Number ? new $util.LongBits(message.destinationTag.low >>> 0, message.destinationTag.high >>> 0).toNumber() : message.destinationTag;
65014
66454
  if (message.flags != null && message.hasOwnProperty("flags"))
65015
66455
  if (typeof message.flags === "number")
65016
66456
  object.flags = options.longs === String ? String(message.flags) : message.flags;
@@ -65018,6 +66458,36 @@
65018
66458
  object.flags = options.longs === String ? $util.Long.prototype.toString.call(message.flags) : options.longs === Number ? new $util.LongBits(message.flags.low >>> 0, message.flags.high >>> 0).toNumber() : message.flags;
65019
66459
  if (message.privateKey != null && message.hasOwnProperty("privateKey"))
65020
66460
  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;
66461
+ if (message.opTrustSet != null && message.hasOwnProperty("opTrustSet")) {
66462
+ object.opTrustSet = $root.TW.Ripple.Proto.OperationTrustSet.toObject(message.opTrustSet, options);
66463
+ if (options.oneofs)
66464
+ object.operationOneof = "opTrustSet";
66465
+ }
66466
+ if (message.opPayment != null && message.hasOwnProperty("opPayment")) {
66467
+ object.opPayment = $root.TW.Ripple.Proto.OperationPayment.toObject(message.opPayment, options);
66468
+ if (options.oneofs)
66469
+ object.operationOneof = "opPayment";
66470
+ }
66471
+ if (message.opNftokenBurn != null && message.hasOwnProperty("opNftokenBurn")) {
66472
+ object.opNftokenBurn = $root.TW.Ripple.Proto.OperationNFTokenBurn.toObject(message.opNftokenBurn, options);
66473
+ if (options.oneofs)
66474
+ object.operationOneof = "opNftokenBurn";
66475
+ }
66476
+ if (message.opNftokenCreateOffer != null && message.hasOwnProperty("opNftokenCreateOffer")) {
66477
+ object.opNftokenCreateOffer = $root.TW.Ripple.Proto.OperationNFTokenCreateOffer.toObject(message.opNftokenCreateOffer, options);
66478
+ if (options.oneofs)
66479
+ object.operationOneof = "opNftokenCreateOffer";
66480
+ }
66481
+ if (message.opNftokenAcceptOffer != null && message.hasOwnProperty("opNftokenAcceptOffer")) {
66482
+ object.opNftokenAcceptOffer = $root.TW.Ripple.Proto.OperationNFTokenAcceptOffer.toObject(message.opNftokenAcceptOffer, options);
66483
+ if (options.oneofs)
66484
+ object.operationOneof = "opNftokenAcceptOffer";
66485
+ }
66486
+ if (message.opNftokenCancelOffer != null && message.hasOwnProperty("opNftokenCancelOffer")) {
66487
+ object.opNftokenCancelOffer = $root.TW.Ripple.Proto.OperationNFTokenCancelOffer.toObject(message.opNftokenCancelOffer, options);
66488
+ if (options.oneofs)
66489
+ object.operationOneof = "opNftokenCancelOffer";
66490
+ }
65021
66491
  return object;
65022
66492
  };
65023
66493