@trustwallet/wallet-core 4.3.5 → 4.3.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.
@@ -35617,6 +35617,9 @@ export namespace TW {
|
|
35617
35617
|
|
35618
35618
|
/** Staking rebond */
|
35619
35619
|
rebond?: (TW.Polkadot.Proto.Staking.IRebond|null);
|
35620
|
+
|
35621
|
+
/** Staking bondExtraAndNominate */
|
35622
|
+
bondExtraAndNominate?: (TW.Polkadot.Proto.Staking.IBondExtraAndNominate|null);
|
35620
35623
|
}
|
35621
35624
|
|
35622
35625
|
/** Represents a Staking. */
|
@@ -35655,8 +35658,11 @@ export namespace TW {
|
|
35655
35658
|
/** Staking rebond. */
|
35656
35659
|
public rebond?: (TW.Polkadot.Proto.Staking.IRebond|null);
|
35657
35660
|
|
35661
|
+
/** Staking bondExtraAndNominate. */
|
35662
|
+
public bondExtraAndNominate?: (TW.Polkadot.Proto.Staking.IBondExtraAndNominate|null);
|
35663
|
+
|
35658
35664
|
/** Staking messageOneof. */
|
35659
|
-
public messageOneof?: ("bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond"|"rebond");
|
35665
|
+
public messageOneof?: ("bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond"|"rebond"|"bondExtraAndNominate");
|
35660
35666
|
|
35661
35667
|
/**
|
35662
35668
|
* Creates a new Staking instance using the specified properties.
|
@@ -35914,6 +35920,103 @@ export namespace TW {
|
|
35914
35920
|
public toJSON(): { [k: string]: any };
|
35915
35921
|
}
|
35916
35922
|
|
35923
|
+
/** Properties of a BondExtraAndNominate. */
|
35924
|
+
interface IBondExtraAndNominate {
|
35925
|
+
|
35926
|
+
/** BondExtraAndNominate value */
|
35927
|
+
value?: (Uint8Array|null);
|
35928
|
+
|
35929
|
+
/** BondExtraAndNominate nominators */
|
35930
|
+
nominators?: (string[]|null);
|
35931
|
+
|
35932
|
+
/** BondExtraAndNominate callIndices */
|
35933
|
+
callIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35934
|
+
|
35935
|
+
/** BondExtraAndNominate bondExtraCallIndices */
|
35936
|
+
bondExtraCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35937
|
+
|
35938
|
+
/** BondExtraAndNominate nominateCallIndices */
|
35939
|
+
nominateCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35940
|
+
}
|
35941
|
+
|
35942
|
+
/** Represents a BondExtraAndNominate. */
|
35943
|
+
class BondExtraAndNominate implements IBondExtraAndNominate {
|
35944
|
+
|
35945
|
+
/**
|
35946
|
+
* Constructs a new BondExtraAndNominate.
|
35947
|
+
* @param [properties] Properties to set
|
35948
|
+
*/
|
35949
|
+
constructor(properties?: TW.Polkadot.Proto.Staking.IBondExtraAndNominate);
|
35950
|
+
|
35951
|
+
/** BondExtraAndNominate value. */
|
35952
|
+
public value: Uint8Array;
|
35953
|
+
|
35954
|
+
/** BondExtraAndNominate nominators. */
|
35955
|
+
public nominators: string[];
|
35956
|
+
|
35957
|
+
/** BondExtraAndNominate callIndices. */
|
35958
|
+
public callIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35959
|
+
|
35960
|
+
/** BondExtraAndNominate bondExtraCallIndices. */
|
35961
|
+
public bondExtraCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35962
|
+
|
35963
|
+
/** BondExtraAndNominate nominateCallIndices. */
|
35964
|
+
public nominateCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35965
|
+
|
35966
|
+
/**
|
35967
|
+
* Creates a new BondExtraAndNominate instance using the specified properties.
|
35968
|
+
* @param [properties] Properties to set
|
35969
|
+
* @returns BondExtraAndNominate instance
|
35970
|
+
*/
|
35971
|
+
public static create(properties?: TW.Polkadot.Proto.Staking.IBondExtraAndNominate): TW.Polkadot.Proto.Staking.BondExtraAndNominate;
|
35972
|
+
|
35973
|
+
/**
|
35974
|
+
* Encodes the specified BondExtraAndNominate message. Does not implicitly {@link TW.Polkadot.Proto.Staking.BondExtraAndNominate.verify|verify} messages.
|
35975
|
+
* @param message BondExtraAndNominate message or plain object to encode
|
35976
|
+
* @param [writer] Writer to encode to
|
35977
|
+
* @returns Writer
|
35978
|
+
*/
|
35979
|
+
public static encode(message: TW.Polkadot.Proto.Staking.IBondExtraAndNominate, writer?: $protobuf.Writer): $protobuf.Writer;
|
35980
|
+
|
35981
|
+
/**
|
35982
|
+
* Decodes a BondExtraAndNominate message from the specified reader or buffer.
|
35983
|
+
* @param reader Reader or buffer to decode from
|
35984
|
+
* @param [length] Message length if known beforehand
|
35985
|
+
* @returns BondExtraAndNominate
|
35986
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
35987
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
35988
|
+
*/
|
35989
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Polkadot.Proto.Staking.BondExtraAndNominate;
|
35990
|
+
|
35991
|
+
/**
|
35992
|
+
* Verifies a BondExtraAndNominate message.
|
35993
|
+
* @param message Plain object to verify
|
35994
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
35995
|
+
*/
|
35996
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
35997
|
+
|
35998
|
+
/**
|
35999
|
+
* Creates a BondExtraAndNominate message from a plain object. Also converts values to their respective internal types.
|
36000
|
+
* @param object Plain object
|
36001
|
+
* @returns BondExtraAndNominate
|
36002
|
+
*/
|
36003
|
+
public static fromObject(object: { [k: string]: any }): TW.Polkadot.Proto.Staking.BondExtraAndNominate;
|
36004
|
+
|
36005
|
+
/**
|
36006
|
+
* Creates a plain object from a BondExtraAndNominate message. Also converts values to other types if specified.
|
36007
|
+
* @param message BondExtraAndNominate
|
36008
|
+
* @param [options] Conversion options
|
36009
|
+
* @returns Plain object
|
36010
|
+
*/
|
36011
|
+
public static toObject(message: TW.Polkadot.Proto.Staking.BondExtraAndNominate, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
36012
|
+
|
36013
|
+
/**
|
36014
|
+
* Converts this BondExtraAndNominate to JSON.
|
36015
|
+
* @returns JSON object
|
36016
|
+
*/
|
36017
|
+
public toJSON(): { [k: string]: any };
|
36018
|
+
}
|
36019
|
+
|
35917
36020
|
/** Properties of a BondExtra. */
|
35918
36021
|
interface IBondExtra {
|
35919
36022
|
|
@@ -105526,6 +105526,7 @@
|
|
105526
105526
|
* @property {TW.Polkadot.Proto.Staking.IChill|null} [chill] Staking chill
|
105527
105527
|
* @property {TW.Polkadot.Proto.Staking.IChillAndUnbond|null} [chillAndUnbond] Staking chillAndUnbond
|
105528
105528
|
* @property {TW.Polkadot.Proto.Staking.IRebond|null} [rebond] Staking rebond
|
105529
|
+
* @property {TW.Polkadot.Proto.Staking.IBondExtraAndNominate|null} [bondExtraAndNominate] Staking bondExtraAndNominate
|
105529
105530
|
*/
|
105530
105531
|
|
105531
105532
|
/**
|
@@ -105615,17 +105616,25 @@
|
|
105615
105616
|
*/
|
105616
105617
|
Staking.prototype.rebond = null;
|
105617
105618
|
|
105619
|
+
/**
|
105620
|
+
* Staking bondExtraAndNominate.
|
105621
|
+
* @member {TW.Polkadot.Proto.Staking.IBondExtraAndNominate|null|undefined} bondExtraAndNominate
|
105622
|
+
* @memberof TW.Polkadot.Proto.Staking
|
105623
|
+
* @instance
|
105624
|
+
*/
|
105625
|
+
Staking.prototype.bondExtraAndNominate = null;
|
105626
|
+
|
105618
105627
|
// OneOf field names bound to virtual getters and setters
|
105619
105628
|
var $oneOfFields;
|
105620
105629
|
|
105621
105630
|
/**
|
105622
105631
|
* Staking messageOneof.
|
105623
|
-
* @member {"bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond"|"rebond"|undefined} messageOneof
|
105632
|
+
* @member {"bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond"|"rebond"|"bondExtraAndNominate"|undefined} messageOneof
|
105624
105633
|
* @memberof TW.Polkadot.Proto.Staking
|
105625
105634
|
* @instance
|
105626
105635
|
*/
|
105627
105636
|
Object.defineProperty(Staking.prototype, "messageOneof", {
|
105628
|
-
get: $util.oneOfGetter($oneOfFields = ["bond", "bondAndNominate", "bondExtra", "unbond", "withdrawUnbonded", "nominate", "chill", "chillAndUnbond", "rebond"]),
|
105637
|
+
get: $util.oneOfGetter($oneOfFields = ["bond", "bondAndNominate", "bondExtra", "unbond", "withdrawUnbonded", "nominate", "chill", "chillAndUnbond", "rebond", "bondExtraAndNominate"]),
|
105629
105638
|
set: $util.oneOfSetter($oneOfFields)
|
105630
105639
|
});
|
105631
105640
|
|
@@ -105671,6 +105680,8 @@
|
|
105671
105680
|
$root.TW.Polkadot.Proto.Staking.ChillAndUnbond.encode(message.chillAndUnbond, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
105672
105681
|
if (message.rebond != null && Object.hasOwnProperty.call(message, "rebond"))
|
105673
105682
|
$root.TW.Polkadot.Proto.Staking.Rebond.encode(message.rebond, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
105683
|
+
if (message.bondExtraAndNominate != null && Object.hasOwnProperty.call(message, "bondExtraAndNominate"))
|
105684
|
+
$root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.encode(message.bondExtraAndNominate, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
105674
105685
|
return writer;
|
105675
105686
|
};
|
105676
105687
|
|
@@ -105719,6 +105730,9 @@
|
|
105719
105730
|
case 9:
|
105720
105731
|
message.rebond = $root.TW.Polkadot.Proto.Staking.Rebond.decode(reader, reader.uint32());
|
105721
105732
|
break;
|
105733
|
+
case 10:
|
105734
|
+
message.bondExtraAndNominate = $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.decode(reader, reader.uint32());
|
105735
|
+
break;
|
105722
105736
|
default:
|
105723
105737
|
reader.skipType(tag & 7);
|
105724
105738
|
break;
|
@@ -105827,6 +105841,16 @@
|
|
105827
105841
|
return "rebond." + error;
|
105828
105842
|
}
|
105829
105843
|
}
|
105844
|
+
if (message.bondExtraAndNominate != null && message.hasOwnProperty("bondExtraAndNominate")) {
|
105845
|
+
if (properties.messageOneof === 1)
|
105846
|
+
return "messageOneof: multiple values";
|
105847
|
+
properties.messageOneof = 1;
|
105848
|
+
{
|
105849
|
+
var error = $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.verify(message.bondExtraAndNominate);
|
105850
|
+
if (error)
|
105851
|
+
return "bondExtraAndNominate." + error;
|
105852
|
+
}
|
105853
|
+
}
|
105830
105854
|
return null;
|
105831
105855
|
};
|
105832
105856
|
|
@@ -105887,6 +105911,11 @@
|
|
105887
105911
|
throw TypeError(".TW.Polkadot.Proto.Staking.rebond: object expected");
|
105888
105912
|
message.rebond = $root.TW.Polkadot.Proto.Staking.Rebond.fromObject(object.rebond);
|
105889
105913
|
}
|
105914
|
+
if (object.bondExtraAndNominate != null) {
|
105915
|
+
if (typeof object.bondExtraAndNominate !== "object")
|
105916
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.bondExtraAndNominate: object expected");
|
105917
|
+
message.bondExtraAndNominate = $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.fromObject(object.bondExtraAndNominate);
|
105918
|
+
}
|
105890
105919
|
return message;
|
105891
105920
|
};
|
105892
105921
|
|
@@ -105948,6 +105977,11 @@
|
|
105948
105977
|
if (options.oneofs)
|
105949
105978
|
object.messageOneof = "rebond";
|
105950
105979
|
}
|
105980
|
+
if (message.bondExtraAndNominate != null && message.hasOwnProperty("bondExtraAndNominate")) {
|
105981
|
+
object.bondExtraAndNominate = $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.toObject(message.bondExtraAndNominate, options);
|
105982
|
+
if (options.oneofs)
|
105983
|
+
object.messageOneof = "bondExtraAndNominate";
|
105984
|
+
}
|
105951
105985
|
return object;
|
105952
105986
|
};
|
105953
105987
|
|
@@ -106569,6 +106603,294 @@
|
|
106569
106603
|
return BondAndNominate;
|
106570
106604
|
})();
|
106571
106605
|
|
106606
|
+
Staking.BondExtraAndNominate = (function() {
|
106607
|
+
|
106608
|
+
/**
|
106609
|
+
* Properties of a BondExtraAndNominate.
|
106610
|
+
* @memberof TW.Polkadot.Proto.Staking
|
106611
|
+
* @interface IBondExtraAndNominate
|
106612
|
+
* @property {Uint8Array|null} [value] BondExtraAndNominate value
|
106613
|
+
* @property {Array.<string>|null} [nominators] BondExtraAndNominate nominators
|
106614
|
+
* @property {TW.Polkadot.Proto.ICallIndices|null} [callIndices] BondExtraAndNominate callIndices
|
106615
|
+
* @property {TW.Polkadot.Proto.ICallIndices|null} [bondExtraCallIndices] BondExtraAndNominate bondExtraCallIndices
|
106616
|
+
* @property {TW.Polkadot.Proto.ICallIndices|null} [nominateCallIndices] BondExtraAndNominate nominateCallIndices
|
106617
|
+
*/
|
106618
|
+
|
106619
|
+
/**
|
106620
|
+
* Constructs a new BondExtraAndNominate.
|
106621
|
+
* @memberof TW.Polkadot.Proto.Staking
|
106622
|
+
* @classdesc Represents a BondExtraAndNominate.
|
106623
|
+
* @implements IBondExtraAndNominate
|
106624
|
+
* @constructor
|
106625
|
+
* @param {TW.Polkadot.Proto.Staking.IBondExtraAndNominate=} [properties] Properties to set
|
106626
|
+
*/
|
106627
|
+
function BondExtraAndNominate(properties) {
|
106628
|
+
this.nominators = [];
|
106629
|
+
if (properties)
|
106630
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
106631
|
+
if (properties[keys[i]] != null)
|
106632
|
+
this[keys[i]] = properties[keys[i]];
|
106633
|
+
}
|
106634
|
+
|
106635
|
+
/**
|
106636
|
+
* BondExtraAndNominate value.
|
106637
|
+
* @member {Uint8Array} value
|
106638
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106639
|
+
* @instance
|
106640
|
+
*/
|
106641
|
+
BondExtraAndNominate.prototype.value = $util.newBuffer([]);
|
106642
|
+
|
106643
|
+
/**
|
106644
|
+
* BondExtraAndNominate nominators.
|
106645
|
+
* @member {Array.<string>} nominators
|
106646
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106647
|
+
* @instance
|
106648
|
+
*/
|
106649
|
+
BondExtraAndNominate.prototype.nominators = $util.emptyArray;
|
106650
|
+
|
106651
|
+
/**
|
106652
|
+
* BondExtraAndNominate callIndices.
|
106653
|
+
* @member {TW.Polkadot.Proto.ICallIndices|null|undefined} callIndices
|
106654
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106655
|
+
* @instance
|
106656
|
+
*/
|
106657
|
+
BondExtraAndNominate.prototype.callIndices = null;
|
106658
|
+
|
106659
|
+
/**
|
106660
|
+
* BondExtraAndNominate bondExtraCallIndices.
|
106661
|
+
* @member {TW.Polkadot.Proto.ICallIndices|null|undefined} bondExtraCallIndices
|
106662
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106663
|
+
* @instance
|
106664
|
+
*/
|
106665
|
+
BondExtraAndNominate.prototype.bondExtraCallIndices = null;
|
106666
|
+
|
106667
|
+
/**
|
106668
|
+
* BondExtraAndNominate nominateCallIndices.
|
106669
|
+
* @member {TW.Polkadot.Proto.ICallIndices|null|undefined} nominateCallIndices
|
106670
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106671
|
+
* @instance
|
106672
|
+
*/
|
106673
|
+
BondExtraAndNominate.prototype.nominateCallIndices = null;
|
106674
|
+
|
106675
|
+
/**
|
106676
|
+
* Creates a new BondExtraAndNominate instance using the specified properties.
|
106677
|
+
* @function create
|
106678
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106679
|
+
* @static
|
106680
|
+
* @param {TW.Polkadot.Proto.Staking.IBondExtraAndNominate=} [properties] Properties to set
|
106681
|
+
* @returns {TW.Polkadot.Proto.Staking.BondExtraAndNominate} BondExtraAndNominate instance
|
106682
|
+
*/
|
106683
|
+
BondExtraAndNominate.create = function create(properties) {
|
106684
|
+
return new BondExtraAndNominate(properties);
|
106685
|
+
};
|
106686
|
+
|
106687
|
+
/**
|
106688
|
+
* Encodes the specified BondExtraAndNominate message. Does not implicitly {@link TW.Polkadot.Proto.Staking.BondExtraAndNominate.verify|verify} messages.
|
106689
|
+
* @function encode
|
106690
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106691
|
+
* @static
|
106692
|
+
* @param {TW.Polkadot.Proto.Staking.IBondExtraAndNominate} message BondExtraAndNominate message or plain object to encode
|
106693
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
106694
|
+
* @returns {$protobuf.Writer} Writer
|
106695
|
+
*/
|
106696
|
+
BondExtraAndNominate.encode = function encode(message, writer) {
|
106697
|
+
if (!writer)
|
106698
|
+
writer = $Writer.create();
|
106699
|
+
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
106700
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
|
106701
|
+
if (message.nominators != null && message.nominators.length)
|
106702
|
+
for (var i = 0; i < message.nominators.length; ++i)
|
106703
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.nominators[i]);
|
106704
|
+
if (message.callIndices != null && Object.hasOwnProperty.call(message, "callIndices"))
|
106705
|
+
$root.TW.Polkadot.Proto.CallIndices.encode(message.callIndices, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
106706
|
+
if (message.bondExtraCallIndices != null && Object.hasOwnProperty.call(message, "bondExtraCallIndices"))
|
106707
|
+
$root.TW.Polkadot.Proto.CallIndices.encode(message.bondExtraCallIndices, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
106708
|
+
if (message.nominateCallIndices != null && Object.hasOwnProperty.call(message, "nominateCallIndices"))
|
106709
|
+
$root.TW.Polkadot.Proto.CallIndices.encode(message.nominateCallIndices, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
106710
|
+
return writer;
|
106711
|
+
};
|
106712
|
+
|
106713
|
+
/**
|
106714
|
+
* Decodes a BondExtraAndNominate message from the specified reader or buffer.
|
106715
|
+
* @function decode
|
106716
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106717
|
+
* @static
|
106718
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
106719
|
+
* @param {number} [length] Message length if known beforehand
|
106720
|
+
* @returns {TW.Polkadot.Proto.Staking.BondExtraAndNominate} BondExtraAndNominate
|
106721
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
106722
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
106723
|
+
*/
|
106724
|
+
BondExtraAndNominate.decode = function decode(reader, length) {
|
106725
|
+
if (!(reader instanceof $Reader))
|
106726
|
+
reader = $Reader.create(reader);
|
106727
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate();
|
106728
|
+
while (reader.pos < end) {
|
106729
|
+
var tag = reader.uint32();
|
106730
|
+
switch (tag >>> 3) {
|
106731
|
+
case 1:
|
106732
|
+
message.value = reader.bytes();
|
106733
|
+
break;
|
106734
|
+
case 2:
|
106735
|
+
if (!(message.nominators && message.nominators.length))
|
106736
|
+
message.nominators = [];
|
106737
|
+
message.nominators.push(reader.string());
|
106738
|
+
break;
|
106739
|
+
case 3:
|
106740
|
+
message.callIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
|
106741
|
+
break;
|
106742
|
+
case 4:
|
106743
|
+
message.bondExtraCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
|
106744
|
+
break;
|
106745
|
+
case 5:
|
106746
|
+
message.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
|
106747
|
+
break;
|
106748
|
+
default:
|
106749
|
+
reader.skipType(tag & 7);
|
106750
|
+
break;
|
106751
|
+
}
|
106752
|
+
}
|
106753
|
+
return message;
|
106754
|
+
};
|
106755
|
+
|
106756
|
+
/**
|
106757
|
+
* Verifies a BondExtraAndNominate message.
|
106758
|
+
* @function verify
|
106759
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106760
|
+
* @static
|
106761
|
+
* @param {Object.<string,*>} message Plain object to verify
|
106762
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
106763
|
+
*/
|
106764
|
+
BondExtraAndNominate.verify = function verify(message) {
|
106765
|
+
if (typeof message !== "object" || message === null)
|
106766
|
+
return "object expected";
|
106767
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
106768
|
+
if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
|
106769
|
+
return "value: buffer expected";
|
106770
|
+
if (message.nominators != null && message.hasOwnProperty("nominators")) {
|
106771
|
+
if (!Array.isArray(message.nominators))
|
106772
|
+
return "nominators: array expected";
|
106773
|
+
for (var i = 0; i < message.nominators.length; ++i)
|
106774
|
+
if (!$util.isString(message.nominators[i]))
|
106775
|
+
return "nominators: string[] expected";
|
106776
|
+
}
|
106777
|
+
if (message.callIndices != null && message.hasOwnProperty("callIndices")) {
|
106778
|
+
var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.callIndices);
|
106779
|
+
if (error)
|
106780
|
+
return "callIndices." + error;
|
106781
|
+
}
|
106782
|
+
if (message.bondExtraCallIndices != null && message.hasOwnProperty("bondExtraCallIndices")) {
|
106783
|
+
var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.bondExtraCallIndices);
|
106784
|
+
if (error)
|
106785
|
+
return "bondExtraCallIndices." + error;
|
106786
|
+
}
|
106787
|
+
if (message.nominateCallIndices != null && message.hasOwnProperty("nominateCallIndices")) {
|
106788
|
+
var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.nominateCallIndices);
|
106789
|
+
if (error)
|
106790
|
+
return "nominateCallIndices." + error;
|
106791
|
+
}
|
106792
|
+
return null;
|
106793
|
+
};
|
106794
|
+
|
106795
|
+
/**
|
106796
|
+
* Creates a BondExtraAndNominate message from a plain object. Also converts values to their respective internal types.
|
106797
|
+
* @function fromObject
|
106798
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106799
|
+
* @static
|
106800
|
+
* @param {Object.<string,*>} object Plain object
|
106801
|
+
* @returns {TW.Polkadot.Proto.Staking.BondExtraAndNominate} BondExtraAndNominate
|
106802
|
+
*/
|
106803
|
+
BondExtraAndNominate.fromObject = function fromObject(object) {
|
106804
|
+
if (object instanceof $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate)
|
106805
|
+
return object;
|
106806
|
+
var message = new $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate();
|
106807
|
+
if (object.value != null)
|
106808
|
+
if (typeof object.value === "string")
|
106809
|
+
$util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
|
106810
|
+
else if (object.value.length)
|
106811
|
+
message.value = object.value;
|
106812
|
+
if (object.nominators) {
|
106813
|
+
if (!Array.isArray(object.nominators))
|
106814
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.BondExtraAndNominate.nominators: array expected");
|
106815
|
+
message.nominators = [];
|
106816
|
+
for (var i = 0; i < object.nominators.length; ++i)
|
106817
|
+
message.nominators[i] = String(object.nominators[i]);
|
106818
|
+
}
|
106819
|
+
if (object.callIndices != null) {
|
106820
|
+
if (typeof object.callIndices !== "object")
|
106821
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.BondExtraAndNominate.callIndices: object expected");
|
106822
|
+
message.callIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.callIndices);
|
106823
|
+
}
|
106824
|
+
if (object.bondExtraCallIndices != null) {
|
106825
|
+
if (typeof object.bondExtraCallIndices !== "object")
|
106826
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.BondExtraAndNominate.bondExtraCallIndices: object expected");
|
106827
|
+
message.bondExtraCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.bondExtraCallIndices);
|
106828
|
+
}
|
106829
|
+
if (object.nominateCallIndices != null) {
|
106830
|
+
if (typeof object.nominateCallIndices !== "object")
|
106831
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.BondExtraAndNominate.nominateCallIndices: object expected");
|
106832
|
+
message.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.nominateCallIndices);
|
106833
|
+
}
|
106834
|
+
return message;
|
106835
|
+
};
|
106836
|
+
|
106837
|
+
/**
|
106838
|
+
* Creates a plain object from a BondExtraAndNominate message. Also converts values to other types if specified.
|
106839
|
+
* @function toObject
|
106840
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106841
|
+
* @static
|
106842
|
+
* @param {TW.Polkadot.Proto.Staking.BondExtraAndNominate} message BondExtraAndNominate
|
106843
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
106844
|
+
* @returns {Object.<string,*>} Plain object
|
106845
|
+
*/
|
106846
|
+
BondExtraAndNominate.toObject = function toObject(message, options) {
|
106847
|
+
if (!options)
|
106848
|
+
options = {};
|
106849
|
+
var object = {};
|
106850
|
+
if (options.arrays || options.defaults)
|
106851
|
+
object.nominators = [];
|
106852
|
+
if (options.defaults) {
|
106853
|
+
if (options.bytes === String)
|
106854
|
+
object.value = "";
|
106855
|
+
else {
|
106856
|
+
object.value = [];
|
106857
|
+
if (options.bytes !== Array)
|
106858
|
+
object.value = $util.newBuffer(object.value);
|
106859
|
+
}
|
106860
|
+
object.callIndices = null;
|
106861
|
+
object.bondExtraCallIndices = null;
|
106862
|
+
object.nominateCallIndices = null;
|
106863
|
+
}
|
106864
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
106865
|
+
object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
|
106866
|
+
if (message.nominators && message.nominators.length) {
|
106867
|
+
object.nominators = [];
|
106868
|
+
for (var j = 0; j < message.nominators.length; ++j)
|
106869
|
+
object.nominators[j] = message.nominators[j];
|
106870
|
+
}
|
106871
|
+
if (message.callIndices != null && message.hasOwnProperty("callIndices"))
|
106872
|
+
object.callIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.callIndices, options);
|
106873
|
+
if (message.bondExtraCallIndices != null && message.hasOwnProperty("bondExtraCallIndices"))
|
106874
|
+
object.bondExtraCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.bondExtraCallIndices, options);
|
106875
|
+
if (message.nominateCallIndices != null && message.hasOwnProperty("nominateCallIndices"))
|
106876
|
+
object.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.nominateCallIndices, options);
|
106877
|
+
return object;
|
106878
|
+
};
|
106879
|
+
|
106880
|
+
/**
|
106881
|
+
* Converts this BondExtraAndNominate to JSON.
|
106882
|
+
* @function toJSON
|
106883
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106884
|
+
* @instance
|
106885
|
+
* @returns {Object.<string,*>} JSON object
|
106886
|
+
*/
|
106887
|
+
BondExtraAndNominate.prototype.toJSON = function toJSON() {
|
106888
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
106889
|
+
};
|
106890
|
+
|
106891
|
+
return BondExtraAndNominate;
|
106892
|
+
})();
|
106893
|
+
|
106572
106894
|
Staking.BondExtra = (function() {
|
106573
106895
|
|
106574
106896
|
/**
|
Binary file
|