@trustwallet/wallet-core 3.0.6 → 3.0.8
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.
- package/dist/generated/core_proto.d.ts +205 -26
- package/dist/generated/core_proto.js +616 -120
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +3 -0
- package/package.json +1 -1
@@ -1109,6 +1109,79 @@ export namespace TW {
|
|
1109
1109
|
public toJSON(): { [k: string]: any };
|
1110
1110
|
}
|
1111
1111
|
|
1112
|
+
/** Properties of a ManagedTokensRegisterMessage. */
|
1113
|
+
interface IManagedTokensRegisterMessage {
|
1114
|
+
|
1115
|
+
/** ManagedTokensRegisterMessage function */
|
1116
|
+
"function"?: (TW.Aptos.Proto.IStructTag|null);
|
1117
|
+
}
|
1118
|
+
|
1119
|
+
/** Represents a ManagedTokensRegisterMessage. */
|
1120
|
+
class ManagedTokensRegisterMessage implements IManagedTokensRegisterMessage {
|
1121
|
+
|
1122
|
+
/**
|
1123
|
+
* Constructs a new ManagedTokensRegisterMessage.
|
1124
|
+
* @param [properties] Properties to set
|
1125
|
+
*/
|
1126
|
+
constructor(properties?: TW.Aptos.Proto.IManagedTokensRegisterMessage);
|
1127
|
+
|
1128
|
+
/** ManagedTokensRegisterMessage function. */
|
1129
|
+
public function?: (TW.Aptos.Proto.IStructTag|null);
|
1130
|
+
|
1131
|
+
/**
|
1132
|
+
* Creates a new ManagedTokensRegisterMessage instance using the specified properties.
|
1133
|
+
* @param [properties] Properties to set
|
1134
|
+
* @returns ManagedTokensRegisterMessage instance
|
1135
|
+
*/
|
1136
|
+
public static create(properties?: TW.Aptos.Proto.IManagedTokensRegisterMessage): TW.Aptos.Proto.ManagedTokensRegisterMessage;
|
1137
|
+
|
1138
|
+
/**
|
1139
|
+
* Encodes the specified ManagedTokensRegisterMessage message. Does not implicitly {@link TW.Aptos.Proto.ManagedTokensRegisterMessage.verify|verify} messages.
|
1140
|
+
* @param message ManagedTokensRegisterMessage message or plain object to encode
|
1141
|
+
* @param [writer] Writer to encode to
|
1142
|
+
* @returns Writer
|
1143
|
+
*/
|
1144
|
+
public static encode(message: TW.Aptos.Proto.IManagedTokensRegisterMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
1145
|
+
|
1146
|
+
/**
|
1147
|
+
* Decodes a ManagedTokensRegisterMessage message from the specified reader or buffer.
|
1148
|
+
* @param reader Reader or buffer to decode from
|
1149
|
+
* @param [length] Message length if known beforehand
|
1150
|
+
* @returns ManagedTokensRegisterMessage
|
1151
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
1152
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1153
|
+
*/
|
1154
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Aptos.Proto.ManagedTokensRegisterMessage;
|
1155
|
+
|
1156
|
+
/**
|
1157
|
+
* Verifies a ManagedTokensRegisterMessage message.
|
1158
|
+
* @param message Plain object to verify
|
1159
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
1160
|
+
*/
|
1161
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
1162
|
+
|
1163
|
+
/**
|
1164
|
+
* Creates a ManagedTokensRegisterMessage message from a plain object. Also converts values to their respective internal types.
|
1165
|
+
* @param object Plain object
|
1166
|
+
* @returns ManagedTokensRegisterMessage
|
1167
|
+
*/
|
1168
|
+
public static fromObject(object: { [k: string]: any }): TW.Aptos.Proto.ManagedTokensRegisterMessage;
|
1169
|
+
|
1170
|
+
/**
|
1171
|
+
* Creates a plain object from a ManagedTokensRegisterMessage message. Also converts values to other types if specified.
|
1172
|
+
* @param message ManagedTokensRegisterMessage
|
1173
|
+
* @param [options] Conversion options
|
1174
|
+
* @returns Plain object
|
1175
|
+
*/
|
1176
|
+
public static toObject(message: TW.Aptos.Proto.ManagedTokensRegisterMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
1177
|
+
|
1178
|
+
/**
|
1179
|
+
* Converts this ManagedTokensRegisterMessage to JSON.
|
1180
|
+
* @returns JSON object
|
1181
|
+
*/
|
1182
|
+
public toJSON(): { [k: string]: any };
|
1183
|
+
}
|
1184
|
+
|
1112
1185
|
/** Properties of a CreateAccountMessage. */
|
1113
1186
|
interface ICreateAccountMessage {
|
1114
1187
|
|
@@ -1576,18 +1649,6 @@ export namespace TW {
|
|
1576
1649
|
/** SigningInput sequenceNumber */
|
1577
1650
|
sequenceNumber?: (Long|null);
|
1578
1651
|
|
1579
|
-
/** SigningInput transfer */
|
1580
|
-
transfer?: (TW.Aptos.Proto.ITransferMessage|null);
|
1581
|
-
|
1582
|
-
/** SigningInput tokenTransfer */
|
1583
|
-
tokenTransfer?: (TW.Aptos.Proto.ITokenTransferMessage|null);
|
1584
|
-
|
1585
|
-
/** SigningInput createAccount */
|
1586
|
-
createAccount?: (TW.Aptos.Proto.ICreateAccountMessage|null);
|
1587
|
-
|
1588
|
-
/** SigningInput nftMessage */
|
1589
|
-
nftMessage?: (TW.Aptos.Proto.INftMessage|null);
|
1590
|
-
|
1591
1652
|
/** SigningInput maxGasAmount */
|
1592
1653
|
maxGasAmount?: (Long|null);
|
1593
1654
|
|
@@ -1605,6 +1666,21 @@ export namespace TW {
|
|
1605
1666
|
|
1606
1667
|
/** SigningInput anyEncoded */
|
1607
1668
|
anyEncoded?: (string|null);
|
1669
|
+
|
1670
|
+
/** SigningInput transfer */
|
1671
|
+
transfer?: (TW.Aptos.Proto.ITransferMessage|null);
|
1672
|
+
|
1673
|
+
/** SigningInput tokenTransfer */
|
1674
|
+
tokenTransfer?: (TW.Aptos.Proto.ITokenTransferMessage|null);
|
1675
|
+
|
1676
|
+
/** SigningInput createAccount */
|
1677
|
+
createAccount?: (TW.Aptos.Proto.ICreateAccountMessage|null);
|
1678
|
+
|
1679
|
+
/** SigningInput nftMessage */
|
1680
|
+
nftMessage?: (TW.Aptos.Proto.INftMessage|null);
|
1681
|
+
|
1682
|
+
/** SigningInput registerToken */
|
1683
|
+
registerToken?: (TW.Aptos.Proto.IManagedTokensRegisterMessage|null);
|
1608
1684
|
}
|
1609
1685
|
|
1610
1686
|
/** Represents a SigningInput. */
|
@@ -1622,18 +1698,6 @@ export namespace TW {
|
|
1622
1698
|
/** SigningInput sequenceNumber. */
|
1623
1699
|
public sequenceNumber: Long;
|
1624
1700
|
|
1625
|
-
/** SigningInput transfer. */
|
1626
|
-
public transfer?: (TW.Aptos.Proto.ITransferMessage|null);
|
1627
|
-
|
1628
|
-
/** SigningInput tokenTransfer. */
|
1629
|
-
public tokenTransfer?: (TW.Aptos.Proto.ITokenTransferMessage|null);
|
1630
|
-
|
1631
|
-
/** SigningInput createAccount. */
|
1632
|
-
public createAccount?: (TW.Aptos.Proto.ICreateAccountMessage|null);
|
1633
|
-
|
1634
|
-
/** SigningInput nftMessage. */
|
1635
|
-
public nftMessage?: (TW.Aptos.Proto.INftMessage|null);
|
1636
|
-
|
1637
1701
|
/** SigningInput maxGasAmount. */
|
1638
1702
|
public maxGasAmount: Long;
|
1639
1703
|
|
@@ -1652,8 +1716,23 @@ export namespace TW {
|
|
1652
1716
|
/** SigningInput anyEncoded. */
|
1653
1717
|
public anyEncoded: string;
|
1654
1718
|
|
1719
|
+
/** SigningInput transfer. */
|
1720
|
+
public transfer?: (TW.Aptos.Proto.ITransferMessage|null);
|
1721
|
+
|
1722
|
+
/** SigningInput tokenTransfer. */
|
1723
|
+
public tokenTransfer?: (TW.Aptos.Proto.ITokenTransferMessage|null);
|
1724
|
+
|
1725
|
+
/** SigningInput createAccount. */
|
1726
|
+
public createAccount?: (TW.Aptos.Proto.ICreateAccountMessage|null);
|
1727
|
+
|
1728
|
+
/** SigningInput nftMessage. */
|
1729
|
+
public nftMessage?: (TW.Aptos.Proto.INftMessage|null);
|
1730
|
+
|
1731
|
+
/** SigningInput registerToken. */
|
1732
|
+
public registerToken?: (TW.Aptos.Proto.IManagedTokensRegisterMessage|null);
|
1733
|
+
|
1655
1734
|
/** SigningInput transactionPayload. */
|
1656
|
-
public transactionPayload?: ("transfer"|"tokenTransfer"|"createAccount"|"nftMessage");
|
1735
|
+
public transactionPayload?: ("transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"registerToken");
|
1657
1736
|
|
1658
1737
|
/**
|
1659
1738
|
* Creates a new SigningInput instance using the specified properties.
|
@@ -6829,6 +6908,9 @@ export namespace TW {
|
|
6829
6908
|
|
6830
6909
|
/** Message authRevoke */
|
6831
6910
|
authRevoke?: (TW.Cosmos.Proto.Message.IAuthRevoke|null);
|
6911
|
+
|
6912
|
+
/** Message msgVote */
|
6913
|
+
msgVote?: (TW.Cosmos.Proto.Message.IMsgVote|null);
|
6832
6914
|
}
|
6833
6915
|
|
6834
6916
|
/** Represents a Message. */
|
@@ -6891,8 +6973,11 @@ export namespace TW {
|
|
6891
6973
|
/** Message authRevoke. */
|
6892
6974
|
public authRevoke?: (TW.Cosmos.Proto.Message.IAuthRevoke|null);
|
6893
6975
|
|
6976
|
+
/** Message msgVote. */
|
6977
|
+
public msgVote?: (TW.Cosmos.Proto.Message.IMsgVote|null);
|
6978
|
+
|
6894
6979
|
/** Message messageOneof. */
|
6895
|
-
public messageOneof?: ("sendCoinsMessage"|"transferTokensMessage"|"stakeMessage"|"unstakeMessage"|"restakeMessage"|"withdrawStakeRewardMessage"|"rawJsonMessage"|"wasmTerraExecuteContractTransferMessage"|"wasmTerraExecuteContractSendMessage"|"thorchainSendMessage"|"wasmTerraExecuteContractGeneric"|"wasmExecuteContractTransferMessage"|"wasmExecuteContractSendMessage"|"wasmExecuteContractGeneric"|"signDirectMessage"|"authGrant"|"authRevoke");
|
6980
|
+
public messageOneof?: ("sendCoinsMessage"|"transferTokensMessage"|"stakeMessage"|"unstakeMessage"|"restakeMessage"|"withdrawStakeRewardMessage"|"rawJsonMessage"|"wasmTerraExecuteContractTransferMessage"|"wasmTerraExecuteContractSendMessage"|"thorchainSendMessage"|"wasmTerraExecuteContractGeneric"|"wasmExecuteContractTransferMessage"|"wasmExecuteContractSendMessage"|"wasmExecuteContractGeneric"|"signDirectMessage"|"authGrant"|"authRevoke"|"msgVote");
|
6896
6981
|
|
6897
6982
|
/**
|
6898
6983
|
* Creates a new Message instance using the specified properties.
|
@@ -8683,6 +8768,100 @@ export namespace TW {
|
|
8683
8768
|
*/
|
8684
8769
|
public toJSON(): { [k: string]: any };
|
8685
8770
|
}
|
8771
|
+
|
8772
|
+
/** VoteOption enum. */
|
8773
|
+
enum VoteOption {
|
8774
|
+
_UNSPECIFIED = 0,
|
8775
|
+
YES = 1,
|
8776
|
+
ABSTAIN = 2,
|
8777
|
+
NO = 3,
|
8778
|
+
NO_WITH_VETO = 4
|
8779
|
+
}
|
8780
|
+
|
8781
|
+
/** Properties of a MsgVote. */
|
8782
|
+
interface IMsgVote {
|
8783
|
+
|
8784
|
+
/** MsgVote proposalId */
|
8785
|
+
proposalId?: (Long|null);
|
8786
|
+
|
8787
|
+
/** MsgVote voter */
|
8788
|
+
voter?: (string|null);
|
8789
|
+
|
8790
|
+
/** MsgVote option */
|
8791
|
+
option?: (TW.Cosmos.Proto.Message.VoteOption|null);
|
8792
|
+
}
|
8793
|
+
|
8794
|
+
/** Represents a MsgVote. */
|
8795
|
+
class MsgVote implements IMsgVote {
|
8796
|
+
|
8797
|
+
/**
|
8798
|
+
* Constructs a new MsgVote.
|
8799
|
+
* @param [properties] Properties to set
|
8800
|
+
*/
|
8801
|
+
constructor(properties?: TW.Cosmos.Proto.Message.IMsgVote);
|
8802
|
+
|
8803
|
+
/** MsgVote proposalId. */
|
8804
|
+
public proposalId: Long;
|
8805
|
+
|
8806
|
+
/** MsgVote voter. */
|
8807
|
+
public voter: string;
|
8808
|
+
|
8809
|
+
/** MsgVote option. */
|
8810
|
+
public option: TW.Cosmos.Proto.Message.VoteOption;
|
8811
|
+
|
8812
|
+
/**
|
8813
|
+
* Creates a new MsgVote instance using the specified properties.
|
8814
|
+
* @param [properties] Properties to set
|
8815
|
+
* @returns MsgVote instance
|
8816
|
+
*/
|
8817
|
+
public static create(properties?: TW.Cosmos.Proto.Message.IMsgVote): TW.Cosmos.Proto.Message.MsgVote;
|
8818
|
+
|
8819
|
+
/**
|
8820
|
+
* Encodes the specified MsgVote message. Does not implicitly {@link TW.Cosmos.Proto.Message.MsgVote.verify|verify} messages.
|
8821
|
+
* @param message MsgVote message or plain object to encode
|
8822
|
+
* @param [writer] Writer to encode to
|
8823
|
+
* @returns Writer
|
8824
|
+
*/
|
8825
|
+
public static encode(message: TW.Cosmos.Proto.Message.IMsgVote, writer?: $protobuf.Writer): $protobuf.Writer;
|
8826
|
+
|
8827
|
+
/**
|
8828
|
+
* Decodes a MsgVote message from the specified reader or buffer.
|
8829
|
+
* @param reader Reader or buffer to decode from
|
8830
|
+
* @param [length] Message length if known beforehand
|
8831
|
+
* @returns MsgVote
|
8832
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
8833
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8834
|
+
*/
|
8835
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cosmos.Proto.Message.MsgVote;
|
8836
|
+
|
8837
|
+
/**
|
8838
|
+
* Verifies a MsgVote message.
|
8839
|
+
* @param message Plain object to verify
|
8840
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
8841
|
+
*/
|
8842
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
8843
|
+
|
8844
|
+
/**
|
8845
|
+
* Creates a MsgVote message from a plain object. Also converts values to their respective internal types.
|
8846
|
+
* @param object Plain object
|
8847
|
+
* @returns MsgVote
|
8848
|
+
*/
|
8849
|
+
public static fromObject(object: { [k: string]: any }): TW.Cosmos.Proto.Message.MsgVote;
|
8850
|
+
|
8851
|
+
/**
|
8852
|
+
* Creates a plain object from a MsgVote message. Also converts values to other types if specified.
|
8853
|
+
* @param message MsgVote
|
8854
|
+
* @param [options] Conversion options
|
8855
|
+
* @returns Plain object
|
8856
|
+
*/
|
8857
|
+
public static toObject(message: TW.Cosmos.Proto.Message.MsgVote, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
8858
|
+
|
8859
|
+
/**
|
8860
|
+
* Converts this MsgVote to JSON.
|
8861
|
+
* @returns JSON object
|
8862
|
+
*/
|
8863
|
+
public toJSON(): { [k: string]: any };
|
8864
|
+
}
|
8686
8865
|
}
|
8687
8866
|
|
8688
8867
|
/** SigningMode enum. */
|
@@ -3104,6 +3104,169 @@
|
|
3104
3104
|
return TokenTransferMessage;
|
3105
3105
|
})();
|
3106
3106
|
|
3107
|
+
Proto.ManagedTokensRegisterMessage = (function() {
|
3108
|
+
|
3109
|
+
/**
|
3110
|
+
* Properties of a ManagedTokensRegisterMessage.
|
3111
|
+
* @memberof TW.Aptos.Proto
|
3112
|
+
* @interface IManagedTokensRegisterMessage
|
3113
|
+
* @property {TW.Aptos.Proto.IStructTag|null} ["function"] ManagedTokensRegisterMessage function
|
3114
|
+
*/
|
3115
|
+
|
3116
|
+
/**
|
3117
|
+
* Constructs a new ManagedTokensRegisterMessage.
|
3118
|
+
* @memberof TW.Aptos.Proto
|
3119
|
+
* @classdesc Represents a ManagedTokensRegisterMessage.
|
3120
|
+
* @implements IManagedTokensRegisterMessage
|
3121
|
+
* @constructor
|
3122
|
+
* @param {TW.Aptos.Proto.IManagedTokensRegisterMessage=} [properties] Properties to set
|
3123
|
+
*/
|
3124
|
+
function ManagedTokensRegisterMessage(properties) {
|
3125
|
+
if (properties)
|
3126
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
3127
|
+
if (properties[keys[i]] != null)
|
3128
|
+
this[keys[i]] = properties[keys[i]];
|
3129
|
+
}
|
3130
|
+
|
3131
|
+
/**
|
3132
|
+
* ManagedTokensRegisterMessage function.
|
3133
|
+
* @member {TW.Aptos.Proto.IStructTag|null|undefined} function
|
3134
|
+
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
3135
|
+
* @instance
|
3136
|
+
*/
|
3137
|
+
ManagedTokensRegisterMessage.prototype["function"] = null;
|
3138
|
+
|
3139
|
+
/**
|
3140
|
+
* Creates a new ManagedTokensRegisterMessage instance using the specified properties.
|
3141
|
+
* @function create
|
3142
|
+
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
3143
|
+
* @static
|
3144
|
+
* @param {TW.Aptos.Proto.IManagedTokensRegisterMessage=} [properties] Properties to set
|
3145
|
+
* @returns {TW.Aptos.Proto.ManagedTokensRegisterMessage} ManagedTokensRegisterMessage instance
|
3146
|
+
*/
|
3147
|
+
ManagedTokensRegisterMessage.create = function create(properties) {
|
3148
|
+
return new ManagedTokensRegisterMessage(properties);
|
3149
|
+
};
|
3150
|
+
|
3151
|
+
/**
|
3152
|
+
* Encodes the specified ManagedTokensRegisterMessage message. Does not implicitly {@link TW.Aptos.Proto.ManagedTokensRegisterMessage.verify|verify} messages.
|
3153
|
+
* @function encode
|
3154
|
+
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
3155
|
+
* @static
|
3156
|
+
* @param {TW.Aptos.Proto.IManagedTokensRegisterMessage} message ManagedTokensRegisterMessage message or plain object to encode
|
3157
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
3158
|
+
* @returns {$protobuf.Writer} Writer
|
3159
|
+
*/
|
3160
|
+
ManagedTokensRegisterMessage.encode = function encode(message, writer) {
|
3161
|
+
if (!writer)
|
3162
|
+
writer = $Writer.create();
|
3163
|
+
if (message["function"] != null && Object.hasOwnProperty.call(message, "function"))
|
3164
|
+
$root.TW.Aptos.Proto.StructTag.encode(message["function"], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
3165
|
+
return writer;
|
3166
|
+
};
|
3167
|
+
|
3168
|
+
/**
|
3169
|
+
* Decodes a ManagedTokensRegisterMessage message from the specified reader or buffer.
|
3170
|
+
* @function decode
|
3171
|
+
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
3172
|
+
* @static
|
3173
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3174
|
+
* @param {number} [length] Message length if known beforehand
|
3175
|
+
* @returns {TW.Aptos.Proto.ManagedTokensRegisterMessage} ManagedTokensRegisterMessage
|
3176
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
3177
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3178
|
+
*/
|
3179
|
+
ManagedTokensRegisterMessage.decode = function decode(reader, length) {
|
3180
|
+
if (!(reader instanceof $Reader))
|
3181
|
+
reader = $Reader.create(reader);
|
3182
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.ManagedTokensRegisterMessage();
|
3183
|
+
while (reader.pos < end) {
|
3184
|
+
var tag = reader.uint32();
|
3185
|
+
switch (tag >>> 3) {
|
3186
|
+
case 1:
|
3187
|
+
message["function"] = $root.TW.Aptos.Proto.StructTag.decode(reader, reader.uint32());
|
3188
|
+
break;
|
3189
|
+
default:
|
3190
|
+
reader.skipType(tag & 7);
|
3191
|
+
break;
|
3192
|
+
}
|
3193
|
+
}
|
3194
|
+
return message;
|
3195
|
+
};
|
3196
|
+
|
3197
|
+
/**
|
3198
|
+
* Verifies a ManagedTokensRegisterMessage message.
|
3199
|
+
* @function verify
|
3200
|
+
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
3201
|
+
* @static
|
3202
|
+
* @param {Object.<string,*>} message Plain object to verify
|
3203
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
3204
|
+
*/
|
3205
|
+
ManagedTokensRegisterMessage.verify = function verify(message) {
|
3206
|
+
if (typeof message !== "object" || message === null)
|
3207
|
+
return "object expected";
|
3208
|
+
if (message["function"] != null && message.hasOwnProperty("function")) {
|
3209
|
+
var error = $root.TW.Aptos.Proto.StructTag.verify(message["function"]);
|
3210
|
+
if (error)
|
3211
|
+
return "function." + error;
|
3212
|
+
}
|
3213
|
+
return null;
|
3214
|
+
};
|
3215
|
+
|
3216
|
+
/**
|
3217
|
+
* Creates a ManagedTokensRegisterMessage message from a plain object. Also converts values to their respective internal types.
|
3218
|
+
* @function fromObject
|
3219
|
+
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
3220
|
+
* @static
|
3221
|
+
* @param {Object.<string,*>} object Plain object
|
3222
|
+
* @returns {TW.Aptos.Proto.ManagedTokensRegisterMessage} ManagedTokensRegisterMessage
|
3223
|
+
*/
|
3224
|
+
ManagedTokensRegisterMessage.fromObject = function fromObject(object) {
|
3225
|
+
if (object instanceof $root.TW.Aptos.Proto.ManagedTokensRegisterMessage)
|
3226
|
+
return object;
|
3227
|
+
var message = new $root.TW.Aptos.Proto.ManagedTokensRegisterMessage();
|
3228
|
+
if (object["function"] != null) {
|
3229
|
+
if (typeof object["function"] !== "object")
|
3230
|
+
throw TypeError(".TW.Aptos.Proto.ManagedTokensRegisterMessage.function: object expected");
|
3231
|
+
message["function"] = $root.TW.Aptos.Proto.StructTag.fromObject(object["function"]);
|
3232
|
+
}
|
3233
|
+
return message;
|
3234
|
+
};
|
3235
|
+
|
3236
|
+
/**
|
3237
|
+
* Creates a plain object from a ManagedTokensRegisterMessage message. Also converts values to other types if specified.
|
3238
|
+
* @function toObject
|
3239
|
+
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
3240
|
+
* @static
|
3241
|
+
* @param {TW.Aptos.Proto.ManagedTokensRegisterMessage} message ManagedTokensRegisterMessage
|
3242
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
3243
|
+
* @returns {Object.<string,*>} Plain object
|
3244
|
+
*/
|
3245
|
+
ManagedTokensRegisterMessage.toObject = function toObject(message, options) {
|
3246
|
+
if (!options)
|
3247
|
+
options = {};
|
3248
|
+
var object = {};
|
3249
|
+
if (options.defaults)
|
3250
|
+
object["function"] = null;
|
3251
|
+
if (message["function"] != null && message.hasOwnProperty("function"))
|
3252
|
+
object["function"] = $root.TW.Aptos.Proto.StructTag.toObject(message["function"], options);
|
3253
|
+
return object;
|
3254
|
+
};
|
3255
|
+
|
3256
|
+
/**
|
3257
|
+
* Converts this ManagedTokensRegisterMessage to JSON.
|
3258
|
+
* @function toJSON
|
3259
|
+
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
3260
|
+
* @instance
|
3261
|
+
* @returns {Object.<string,*>} JSON object
|
3262
|
+
*/
|
3263
|
+
ManagedTokensRegisterMessage.prototype.toJSON = function toJSON() {
|
3264
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
3265
|
+
};
|
3266
|
+
|
3267
|
+
return ManagedTokensRegisterMessage;
|
3268
|
+
})();
|
3269
|
+
|
3107
3270
|
Proto.CreateAccountMessage = (function() {
|
3108
3271
|
|
3109
3272
|
/**
|
@@ -4339,16 +4502,17 @@
|
|
4339
4502
|
* @interface ISigningInput
|
4340
4503
|
* @property {string|null} [sender] SigningInput sender
|
4341
4504
|
* @property {Long|null} [sequenceNumber] SigningInput sequenceNumber
|
4342
|
-
* @property {TW.Aptos.Proto.ITransferMessage|null} [transfer] SigningInput transfer
|
4343
|
-
* @property {TW.Aptos.Proto.ITokenTransferMessage|null} [tokenTransfer] SigningInput tokenTransfer
|
4344
|
-
* @property {TW.Aptos.Proto.ICreateAccountMessage|null} [createAccount] SigningInput createAccount
|
4345
|
-
* @property {TW.Aptos.Proto.INftMessage|null} [nftMessage] SigningInput nftMessage
|
4346
4505
|
* @property {Long|null} [maxGasAmount] SigningInput maxGasAmount
|
4347
4506
|
* @property {Long|null} [gasUnitPrice] SigningInput gasUnitPrice
|
4348
4507
|
* @property {Long|null} [expirationTimestampSecs] SigningInput expirationTimestampSecs
|
4349
4508
|
* @property {number|null} [chainId] SigningInput chainId
|
4350
4509
|
* @property {Uint8Array|null} [privateKey] SigningInput privateKey
|
4351
4510
|
* @property {string|null} [anyEncoded] SigningInput anyEncoded
|
4511
|
+
* @property {TW.Aptos.Proto.ITransferMessage|null} [transfer] SigningInput transfer
|
4512
|
+
* @property {TW.Aptos.Proto.ITokenTransferMessage|null} [tokenTransfer] SigningInput tokenTransfer
|
4513
|
+
* @property {TW.Aptos.Proto.ICreateAccountMessage|null} [createAccount] SigningInput createAccount
|
4514
|
+
* @property {TW.Aptos.Proto.INftMessage|null} [nftMessage] SigningInput nftMessage
|
4515
|
+
* @property {TW.Aptos.Proto.IManagedTokensRegisterMessage|null} [registerToken] SigningInput registerToken
|
4352
4516
|
*/
|
4353
4517
|
|
4354
4518
|
/**
|
@@ -4383,96 +4547,104 @@
|
|
4383
4547
|
SigningInput.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
4384
4548
|
|
4385
4549
|
/**
|
4386
|
-
* SigningInput
|
4387
|
-
* @member {
|
4550
|
+
* SigningInput maxGasAmount.
|
4551
|
+
* @member {Long} maxGasAmount
|
4388
4552
|
* @memberof TW.Aptos.Proto.SigningInput
|
4389
4553
|
* @instance
|
4390
4554
|
*/
|
4391
|
-
SigningInput.prototype.
|
4555
|
+
SigningInput.prototype.maxGasAmount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
4392
4556
|
|
4393
4557
|
/**
|
4394
|
-
* SigningInput
|
4395
|
-
* @member {
|
4558
|
+
* SigningInput gasUnitPrice.
|
4559
|
+
* @member {Long} gasUnitPrice
|
4396
4560
|
* @memberof TW.Aptos.Proto.SigningInput
|
4397
4561
|
* @instance
|
4398
4562
|
*/
|
4399
|
-
SigningInput.prototype.
|
4563
|
+
SigningInput.prototype.gasUnitPrice = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
4400
4564
|
|
4401
4565
|
/**
|
4402
|
-
* SigningInput
|
4403
|
-
* @member {
|
4566
|
+
* SigningInput expirationTimestampSecs.
|
4567
|
+
* @member {Long} expirationTimestampSecs
|
4404
4568
|
* @memberof TW.Aptos.Proto.SigningInput
|
4405
4569
|
* @instance
|
4406
4570
|
*/
|
4407
|
-
SigningInput.prototype.
|
4571
|
+
SigningInput.prototype.expirationTimestampSecs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
4408
4572
|
|
4409
4573
|
/**
|
4410
|
-
* SigningInput
|
4411
|
-
* @member {
|
4574
|
+
* SigningInput chainId.
|
4575
|
+
* @member {number} chainId
|
4412
4576
|
* @memberof TW.Aptos.Proto.SigningInput
|
4413
4577
|
* @instance
|
4414
4578
|
*/
|
4415
|
-
SigningInput.prototype.
|
4579
|
+
SigningInput.prototype.chainId = 0;
|
4416
4580
|
|
4417
4581
|
/**
|
4418
|
-
* SigningInput
|
4419
|
-
* @member {
|
4582
|
+
* SigningInput privateKey.
|
4583
|
+
* @member {Uint8Array} privateKey
|
4420
4584
|
* @memberof TW.Aptos.Proto.SigningInput
|
4421
4585
|
* @instance
|
4422
4586
|
*/
|
4423
|
-
SigningInput.prototype.
|
4587
|
+
SigningInput.prototype.privateKey = $util.newBuffer([]);
|
4424
4588
|
|
4425
4589
|
/**
|
4426
|
-
* SigningInput
|
4427
|
-
* @member {
|
4590
|
+
* SigningInput anyEncoded.
|
4591
|
+
* @member {string} anyEncoded
|
4428
4592
|
* @memberof TW.Aptos.Proto.SigningInput
|
4429
4593
|
* @instance
|
4430
4594
|
*/
|
4431
|
-
SigningInput.prototype.
|
4595
|
+
SigningInput.prototype.anyEncoded = "";
|
4432
4596
|
|
4433
4597
|
/**
|
4434
|
-
* SigningInput
|
4435
|
-
* @member {
|
4598
|
+
* SigningInput transfer.
|
4599
|
+
* @member {TW.Aptos.Proto.ITransferMessage|null|undefined} transfer
|
4436
4600
|
* @memberof TW.Aptos.Proto.SigningInput
|
4437
4601
|
* @instance
|
4438
4602
|
*/
|
4439
|
-
SigningInput.prototype.
|
4603
|
+
SigningInput.prototype.transfer = null;
|
4440
4604
|
|
4441
4605
|
/**
|
4442
|
-
* SigningInput
|
4443
|
-
* @member {
|
4606
|
+
* SigningInput tokenTransfer.
|
4607
|
+
* @member {TW.Aptos.Proto.ITokenTransferMessage|null|undefined} tokenTransfer
|
4444
4608
|
* @memberof TW.Aptos.Proto.SigningInput
|
4445
4609
|
* @instance
|
4446
4610
|
*/
|
4447
|
-
SigningInput.prototype.
|
4611
|
+
SigningInput.prototype.tokenTransfer = null;
|
4448
4612
|
|
4449
4613
|
/**
|
4450
|
-
* SigningInput
|
4451
|
-
* @member {
|
4614
|
+
* SigningInput createAccount.
|
4615
|
+
* @member {TW.Aptos.Proto.ICreateAccountMessage|null|undefined} createAccount
|
4452
4616
|
* @memberof TW.Aptos.Proto.SigningInput
|
4453
4617
|
* @instance
|
4454
4618
|
*/
|
4455
|
-
SigningInput.prototype.
|
4619
|
+
SigningInput.prototype.createAccount = null;
|
4456
4620
|
|
4457
4621
|
/**
|
4458
|
-
* SigningInput
|
4459
|
-
* @member {
|
4622
|
+
* SigningInput nftMessage.
|
4623
|
+
* @member {TW.Aptos.Proto.INftMessage|null|undefined} nftMessage
|
4460
4624
|
* @memberof TW.Aptos.Proto.SigningInput
|
4461
4625
|
* @instance
|
4462
4626
|
*/
|
4463
|
-
SigningInput.prototype.
|
4627
|
+
SigningInput.prototype.nftMessage = null;
|
4628
|
+
|
4629
|
+
/**
|
4630
|
+
* SigningInput registerToken.
|
4631
|
+
* @member {TW.Aptos.Proto.IManagedTokensRegisterMessage|null|undefined} registerToken
|
4632
|
+
* @memberof TW.Aptos.Proto.SigningInput
|
4633
|
+
* @instance
|
4634
|
+
*/
|
4635
|
+
SigningInput.prototype.registerToken = null;
|
4464
4636
|
|
4465
4637
|
// OneOf field names bound to virtual getters and setters
|
4466
4638
|
var $oneOfFields;
|
4467
4639
|
|
4468
4640
|
/**
|
4469
4641
|
* SigningInput transactionPayload.
|
4470
|
-
* @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|undefined} transactionPayload
|
4642
|
+
* @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"registerToken"|undefined} transactionPayload
|
4471
4643
|
* @memberof TW.Aptos.Proto.SigningInput
|
4472
4644
|
* @instance
|
4473
4645
|
*/
|
4474
4646
|
Object.defineProperty(SigningInput.prototype, "transactionPayload", {
|
4475
|
-
get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage"]),
|
4647
|
+
get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage", "registerToken"]),
|
4476
4648
|
set: $util.oneOfSetter($oneOfFields)
|
4477
4649
|
});
|
4478
4650
|
|
@@ -4504,26 +4676,28 @@
|
|
4504
4676
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender);
|
4505
4677
|
if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber"))
|
4506
4678
|
writer.uint32(/* id 2, wireType 0 =*/16).int64(message.sequenceNumber);
|
4507
|
-
if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer"))
|
4508
|
-
$root.TW.Aptos.Proto.TransferMessage.encode(message.transfer, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
4509
|
-
if (message.tokenTransfer != null && Object.hasOwnProperty.call(message, "tokenTransfer"))
|
4510
|
-
$root.TW.Aptos.Proto.TokenTransferMessage.encode(message.tokenTransfer, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
4511
|
-
if (message.createAccount != null && Object.hasOwnProperty.call(message, "createAccount"))
|
4512
|
-
$root.TW.Aptos.Proto.CreateAccountMessage.encode(message.createAccount, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
4513
|
-
if (message.nftMessage != null && Object.hasOwnProperty.call(message, "nftMessage"))
|
4514
|
-
$root.TW.Aptos.Proto.NftMessage.encode(message.nftMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
4515
4679
|
if (message.maxGasAmount != null && Object.hasOwnProperty.call(message, "maxGasAmount"))
|
4516
|
-
writer.uint32(/* id
|
4680
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.maxGasAmount);
|
4517
4681
|
if (message.gasUnitPrice != null && Object.hasOwnProperty.call(message, "gasUnitPrice"))
|
4518
|
-
writer.uint32(/* id
|
4682
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.gasUnitPrice);
|
4519
4683
|
if (message.expirationTimestampSecs != null && Object.hasOwnProperty.call(message, "expirationTimestampSecs"))
|
4520
|
-
writer.uint32(/* id
|
4684
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.expirationTimestampSecs);
|
4521
4685
|
if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId"))
|
4522
|
-
writer.uint32(/* id
|
4686
|
+
writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.chainId);
|
4523
4687
|
if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
|
4524
|
-
writer.uint32(/* id
|
4688
|
+
writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.privateKey);
|
4525
4689
|
if (message.anyEncoded != null && Object.hasOwnProperty.call(message, "anyEncoded"))
|
4526
|
-
writer.uint32(/* id
|
4690
|
+
writer.uint32(/* id 8, wireType 2 =*/66).string(message.anyEncoded);
|
4691
|
+
if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer"))
|
4692
|
+
$root.TW.Aptos.Proto.TransferMessage.encode(message.transfer, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
4693
|
+
if (message.tokenTransfer != null && Object.hasOwnProperty.call(message, "tokenTransfer"))
|
4694
|
+
$root.TW.Aptos.Proto.TokenTransferMessage.encode(message.tokenTransfer, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
4695
|
+
if (message.createAccount != null && Object.hasOwnProperty.call(message, "createAccount"))
|
4696
|
+
$root.TW.Aptos.Proto.CreateAccountMessage.encode(message.createAccount, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
4697
|
+
if (message.nftMessage != null && Object.hasOwnProperty.call(message, "nftMessage"))
|
4698
|
+
$root.TW.Aptos.Proto.NftMessage.encode(message.nftMessage, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
4699
|
+
if (message.registerToken != null && Object.hasOwnProperty.call(message, "registerToken"))
|
4700
|
+
$root.TW.Aptos.Proto.ManagedTokensRegisterMessage.encode(message.registerToken, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
4527
4701
|
return writer;
|
4528
4702
|
};
|
4529
4703
|
|
@@ -4552,34 +4726,37 @@
|
|
4552
4726
|
message.sequenceNumber = reader.int64();
|
4553
4727
|
break;
|
4554
4728
|
case 3:
|
4555
|
-
message.
|
4729
|
+
message.maxGasAmount = reader.uint64();
|
4556
4730
|
break;
|
4557
4731
|
case 4:
|
4558
|
-
message.
|
4732
|
+
message.gasUnitPrice = reader.uint64();
|
4559
4733
|
break;
|
4560
4734
|
case 5:
|
4561
|
-
message.
|
4735
|
+
message.expirationTimestampSecs = reader.uint64();
|
4562
4736
|
break;
|
4563
4737
|
case 6:
|
4564
|
-
message.
|
4738
|
+
message.chainId = reader.uint32();
|
4565
4739
|
break;
|
4566
4740
|
case 7:
|
4567
|
-
message.
|
4741
|
+
message.privateKey = reader.bytes();
|
4568
4742
|
break;
|
4569
4743
|
case 8:
|
4570
|
-
message.
|
4744
|
+
message.anyEncoded = reader.string();
|
4571
4745
|
break;
|
4572
4746
|
case 9:
|
4573
|
-
message.
|
4747
|
+
message.transfer = $root.TW.Aptos.Proto.TransferMessage.decode(reader, reader.uint32());
|
4574
4748
|
break;
|
4575
4749
|
case 10:
|
4576
|
-
message.
|
4750
|
+
message.tokenTransfer = $root.TW.Aptos.Proto.TokenTransferMessage.decode(reader, reader.uint32());
|
4577
4751
|
break;
|
4578
4752
|
case 11:
|
4579
|
-
message.
|
4753
|
+
message.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.decode(reader, reader.uint32());
|
4580
4754
|
break;
|
4581
4755
|
case 12:
|
4582
|
-
message.
|
4756
|
+
message.nftMessage = $root.TW.Aptos.Proto.NftMessage.decode(reader, reader.uint32());
|
4757
|
+
break;
|
4758
|
+
case 13:
|
4759
|
+
message.registerToken = $root.TW.Aptos.Proto.ManagedTokensRegisterMessage.decode(reader, reader.uint32());
|
4583
4760
|
break;
|
4584
4761
|
default:
|
4585
4762
|
reader.skipType(tag & 7);
|
@@ -4607,6 +4784,24 @@
|
|
4607
4784
|
if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
|
4608
4785
|
if (!$util.isInteger(message.sequenceNumber) && !(message.sequenceNumber && $util.isInteger(message.sequenceNumber.low) && $util.isInteger(message.sequenceNumber.high)))
|
4609
4786
|
return "sequenceNumber: integer|Long expected";
|
4787
|
+
if (message.maxGasAmount != null && message.hasOwnProperty("maxGasAmount"))
|
4788
|
+
if (!$util.isInteger(message.maxGasAmount) && !(message.maxGasAmount && $util.isInteger(message.maxGasAmount.low) && $util.isInteger(message.maxGasAmount.high)))
|
4789
|
+
return "maxGasAmount: integer|Long expected";
|
4790
|
+
if (message.gasUnitPrice != null && message.hasOwnProperty("gasUnitPrice"))
|
4791
|
+
if (!$util.isInteger(message.gasUnitPrice) && !(message.gasUnitPrice && $util.isInteger(message.gasUnitPrice.low) && $util.isInteger(message.gasUnitPrice.high)))
|
4792
|
+
return "gasUnitPrice: integer|Long expected";
|
4793
|
+
if (message.expirationTimestampSecs != null && message.hasOwnProperty("expirationTimestampSecs"))
|
4794
|
+
if (!$util.isInteger(message.expirationTimestampSecs) && !(message.expirationTimestampSecs && $util.isInteger(message.expirationTimestampSecs.low) && $util.isInteger(message.expirationTimestampSecs.high)))
|
4795
|
+
return "expirationTimestampSecs: integer|Long expected";
|
4796
|
+
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
4797
|
+
if (!$util.isInteger(message.chainId))
|
4798
|
+
return "chainId: integer expected";
|
4799
|
+
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
4800
|
+
if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
|
4801
|
+
return "privateKey: buffer expected";
|
4802
|
+
if (message.anyEncoded != null && message.hasOwnProperty("anyEncoded"))
|
4803
|
+
if (!$util.isString(message.anyEncoded))
|
4804
|
+
return "anyEncoded: string expected";
|
4610
4805
|
if (message.transfer != null && message.hasOwnProperty("transfer")) {
|
4611
4806
|
properties.transactionPayload = 1;
|
4612
4807
|
{
|
@@ -4645,24 +4840,16 @@
|
|
4645
4840
|
return "nftMessage." + error;
|
4646
4841
|
}
|
4647
4842
|
}
|
4648
|
-
if (message.
|
4649
|
-
if (
|
4650
|
-
return "
|
4651
|
-
|
4652
|
-
|
4653
|
-
|
4654
|
-
|
4655
|
-
|
4656
|
-
|
4657
|
-
|
4658
|
-
if (!$util.isInteger(message.chainId))
|
4659
|
-
return "chainId: integer expected";
|
4660
|
-
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
4661
|
-
if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
|
4662
|
-
return "privateKey: buffer expected";
|
4663
|
-
if (message.anyEncoded != null && message.hasOwnProperty("anyEncoded"))
|
4664
|
-
if (!$util.isString(message.anyEncoded))
|
4665
|
-
return "anyEncoded: string expected";
|
4843
|
+
if (message.registerToken != null && message.hasOwnProperty("registerToken")) {
|
4844
|
+
if (properties.transactionPayload === 1)
|
4845
|
+
return "transactionPayload: multiple values";
|
4846
|
+
properties.transactionPayload = 1;
|
4847
|
+
{
|
4848
|
+
var error = $root.TW.Aptos.Proto.ManagedTokensRegisterMessage.verify(message.registerToken);
|
4849
|
+
if (error)
|
4850
|
+
return "registerToken." + error;
|
4851
|
+
}
|
4852
|
+
}
|
4666
4853
|
return null;
|
4667
4854
|
};
|
4668
4855
|
|
@@ -4689,26 +4876,6 @@
|
|
4689
4876
|
message.sequenceNumber = object.sequenceNumber;
|
4690
4877
|
else if (typeof object.sequenceNumber === "object")
|
4691
4878
|
message.sequenceNumber = new $util.LongBits(object.sequenceNumber.low >>> 0, object.sequenceNumber.high >>> 0).toNumber();
|
4692
|
-
if (object.transfer != null) {
|
4693
|
-
if (typeof object.transfer !== "object")
|
4694
|
-
throw TypeError(".TW.Aptos.Proto.SigningInput.transfer: object expected");
|
4695
|
-
message.transfer = $root.TW.Aptos.Proto.TransferMessage.fromObject(object.transfer);
|
4696
|
-
}
|
4697
|
-
if (object.tokenTransfer != null) {
|
4698
|
-
if (typeof object.tokenTransfer !== "object")
|
4699
|
-
throw TypeError(".TW.Aptos.Proto.SigningInput.tokenTransfer: object expected");
|
4700
|
-
message.tokenTransfer = $root.TW.Aptos.Proto.TokenTransferMessage.fromObject(object.tokenTransfer);
|
4701
|
-
}
|
4702
|
-
if (object.createAccount != null) {
|
4703
|
-
if (typeof object.createAccount !== "object")
|
4704
|
-
throw TypeError(".TW.Aptos.Proto.SigningInput.createAccount: object expected");
|
4705
|
-
message.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.fromObject(object.createAccount);
|
4706
|
-
}
|
4707
|
-
if (object.nftMessage != null) {
|
4708
|
-
if (typeof object.nftMessage !== "object")
|
4709
|
-
throw TypeError(".TW.Aptos.Proto.SigningInput.nftMessage: object expected");
|
4710
|
-
message.nftMessage = $root.TW.Aptos.Proto.NftMessage.fromObject(object.nftMessage);
|
4711
|
-
}
|
4712
4879
|
if (object.maxGasAmount != null)
|
4713
4880
|
if ($util.Long)
|
4714
4881
|
(message.maxGasAmount = $util.Long.fromValue(object.maxGasAmount)).unsigned = true;
|
@@ -4745,6 +4912,31 @@
|
|
4745
4912
|
message.privateKey = object.privateKey;
|
4746
4913
|
if (object.anyEncoded != null)
|
4747
4914
|
message.anyEncoded = String(object.anyEncoded);
|
4915
|
+
if (object.transfer != null) {
|
4916
|
+
if (typeof object.transfer !== "object")
|
4917
|
+
throw TypeError(".TW.Aptos.Proto.SigningInput.transfer: object expected");
|
4918
|
+
message.transfer = $root.TW.Aptos.Proto.TransferMessage.fromObject(object.transfer);
|
4919
|
+
}
|
4920
|
+
if (object.tokenTransfer != null) {
|
4921
|
+
if (typeof object.tokenTransfer !== "object")
|
4922
|
+
throw TypeError(".TW.Aptos.Proto.SigningInput.tokenTransfer: object expected");
|
4923
|
+
message.tokenTransfer = $root.TW.Aptos.Proto.TokenTransferMessage.fromObject(object.tokenTransfer);
|
4924
|
+
}
|
4925
|
+
if (object.createAccount != null) {
|
4926
|
+
if (typeof object.createAccount !== "object")
|
4927
|
+
throw TypeError(".TW.Aptos.Proto.SigningInput.createAccount: object expected");
|
4928
|
+
message.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.fromObject(object.createAccount);
|
4929
|
+
}
|
4930
|
+
if (object.nftMessage != null) {
|
4931
|
+
if (typeof object.nftMessage !== "object")
|
4932
|
+
throw TypeError(".TW.Aptos.Proto.SigningInput.nftMessage: object expected");
|
4933
|
+
message.nftMessage = $root.TW.Aptos.Proto.NftMessage.fromObject(object.nftMessage);
|
4934
|
+
}
|
4935
|
+
if (object.registerToken != null) {
|
4936
|
+
if (typeof object.registerToken !== "object")
|
4937
|
+
throw TypeError(".TW.Aptos.Proto.SigningInput.registerToken: object expected");
|
4938
|
+
message.registerToken = $root.TW.Aptos.Proto.ManagedTokensRegisterMessage.fromObject(object.registerToken);
|
4939
|
+
}
|
4748
4940
|
return message;
|
4749
4941
|
};
|
4750
4942
|
|
@@ -4800,26 +4992,6 @@
|
|
4800
4992
|
object.sequenceNumber = options.longs === String ? String(message.sequenceNumber) : message.sequenceNumber;
|
4801
4993
|
else
|
4802
4994
|
object.sequenceNumber = options.longs === String ? $util.Long.prototype.toString.call(message.sequenceNumber) : options.longs === Number ? new $util.LongBits(message.sequenceNumber.low >>> 0, message.sequenceNumber.high >>> 0).toNumber() : message.sequenceNumber;
|
4803
|
-
if (message.transfer != null && message.hasOwnProperty("transfer")) {
|
4804
|
-
object.transfer = $root.TW.Aptos.Proto.TransferMessage.toObject(message.transfer, options);
|
4805
|
-
if (options.oneofs)
|
4806
|
-
object.transactionPayload = "transfer";
|
4807
|
-
}
|
4808
|
-
if (message.tokenTransfer != null && message.hasOwnProperty("tokenTransfer")) {
|
4809
|
-
object.tokenTransfer = $root.TW.Aptos.Proto.TokenTransferMessage.toObject(message.tokenTransfer, options);
|
4810
|
-
if (options.oneofs)
|
4811
|
-
object.transactionPayload = "tokenTransfer";
|
4812
|
-
}
|
4813
|
-
if (message.createAccount != null && message.hasOwnProperty("createAccount")) {
|
4814
|
-
object.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.toObject(message.createAccount, options);
|
4815
|
-
if (options.oneofs)
|
4816
|
-
object.transactionPayload = "createAccount";
|
4817
|
-
}
|
4818
|
-
if (message.nftMessage != null && message.hasOwnProperty("nftMessage")) {
|
4819
|
-
object.nftMessage = $root.TW.Aptos.Proto.NftMessage.toObject(message.nftMessage, options);
|
4820
|
-
if (options.oneofs)
|
4821
|
-
object.transactionPayload = "nftMessage";
|
4822
|
-
}
|
4823
4995
|
if (message.maxGasAmount != null && message.hasOwnProperty("maxGasAmount"))
|
4824
4996
|
if (typeof message.maxGasAmount === "number")
|
4825
4997
|
object.maxGasAmount = options.longs === String ? String(message.maxGasAmount) : message.maxGasAmount;
|
@@ -4841,6 +5013,31 @@
|
|
4841
5013
|
object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey;
|
4842
5014
|
if (message.anyEncoded != null && message.hasOwnProperty("anyEncoded"))
|
4843
5015
|
object.anyEncoded = message.anyEncoded;
|
5016
|
+
if (message.transfer != null && message.hasOwnProperty("transfer")) {
|
5017
|
+
object.transfer = $root.TW.Aptos.Proto.TransferMessage.toObject(message.transfer, options);
|
5018
|
+
if (options.oneofs)
|
5019
|
+
object.transactionPayload = "transfer";
|
5020
|
+
}
|
5021
|
+
if (message.tokenTransfer != null && message.hasOwnProperty("tokenTransfer")) {
|
5022
|
+
object.tokenTransfer = $root.TW.Aptos.Proto.TokenTransferMessage.toObject(message.tokenTransfer, options);
|
5023
|
+
if (options.oneofs)
|
5024
|
+
object.transactionPayload = "tokenTransfer";
|
5025
|
+
}
|
5026
|
+
if (message.createAccount != null && message.hasOwnProperty("createAccount")) {
|
5027
|
+
object.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.toObject(message.createAccount, options);
|
5028
|
+
if (options.oneofs)
|
5029
|
+
object.transactionPayload = "createAccount";
|
5030
|
+
}
|
5031
|
+
if (message.nftMessage != null && message.hasOwnProperty("nftMessage")) {
|
5032
|
+
object.nftMessage = $root.TW.Aptos.Proto.NftMessage.toObject(message.nftMessage, options);
|
5033
|
+
if (options.oneofs)
|
5034
|
+
object.transactionPayload = "nftMessage";
|
5035
|
+
}
|
5036
|
+
if (message.registerToken != null && message.hasOwnProperty("registerToken")) {
|
5037
|
+
object.registerToken = $root.TW.Aptos.Proto.ManagedTokensRegisterMessage.toObject(message.registerToken, options);
|
5038
|
+
if (options.oneofs)
|
5039
|
+
object.transactionPayload = "registerToken";
|
5040
|
+
}
|
4844
5041
|
return object;
|
4845
5042
|
};
|
4846
5043
|
|
@@ -20356,6 +20553,7 @@
|
|
20356
20553
|
* @property {TW.Cosmos.Proto.Message.ISignDirect|null} [signDirectMessage] Message signDirectMessage
|
20357
20554
|
* @property {TW.Cosmos.Proto.Message.IAuthGrant|null} [authGrant] Message authGrant
|
20358
20555
|
* @property {TW.Cosmos.Proto.Message.IAuthRevoke|null} [authRevoke] Message authRevoke
|
20556
|
+
* @property {TW.Cosmos.Proto.Message.IMsgVote|null} [msgVote] Message msgVote
|
20359
20557
|
*/
|
20360
20558
|
|
20361
20559
|
/**
|
@@ -20509,17 +20707,25 @@
|
|
20509
20707
|
*/
|
20510
20708
|
Message.prototype.authRevoke = null;
|
20511
20709
|
|
20710
|
+
/**
|
20711
|
+
* Message msgVote.
|
20712
|
+
* @member {TW.Cosmos.Proto.Message.IMsgVote|null|undefined} msgVote
|
20713
|
+
* @memberof TW.Cosmos.Proto.Message
|
20714
|
+
* @instance
|
20715
|
+
*/
|
20716
|
+
Message.prototype.msgVote = null;
|
20717
|
+
|
20512
20718
|
// OneOf field names bound to virtual getters and setters
|
20513
20719
|
var $oneOfFields;
|
20514
20720
|
|
20515
20721
|
/**
|
20516
20722
|
* Message messageOneof.
|
20517
|
-
* @member {"sendCoinsMessage"|"transferTokensMessage"|"stakeMessage"|"unstakeMessage"|"restakeMessage"|"withdrawStakeRewardMessage"|"rawJsonMessage"|"wasmTerraExecuteContractTransferMessage"|"wasmTerraExecuteContractSendMessage"|"thorchainSendMessage"|"wasmTerraExecuteContractGeneric"|"wasmExecuteContractTransferMessage"|"wasmExecuteContractSendMessage"|"wasmExecuteContractGeneric"|"signDirectMessage"|"authGrant"|"authRevoke"|undefined} messageOneof
|
20723
|
+
* @member {"sendCoinsMessage"|"transferTokensMessage"|"stakeMessage"|"unstakeMessage"|"restakeMessage"|"withdrawStakeRewardMessage"|"rawJsonMessage"|"wasmTerraExecuteContractTransferMessage"|"wasmTerraExecuteContractSendMessage"|"thorchainSendMessage"|"wasmTerraExecuteContractGeneric"|"wasmExecuteContractTransferMessage"|"wasmExecuteContractSendMessage"|"wasmExecuteContractGeneric"|"signDirectMessage"|"authGrant"|"authRevoke"|"msgVote"|undefined} messageOneof
|
20518
20724
|
* @memberof TW.Cosmos.Proto.Message
|
20519
20725
|
* @instance
|
20520
20726
|
*/
|
20521
20727
|
Object.defineProperty(Message.prototype, "messageOneof", {
|
20522
|
-
get: $util.oneOfGetter($oneOfFields = ["sendCoinsMessage", "transferTokensMessage", "stakeMessage", "unstakeMessage", "restakeMessage", "withdrawStakeRewardMessage", "rawJsonMessage", "wasmTerraExecuteContractTransferMessage", "wasmTerraExecuteContractSendMessage", "thorchainSendMessage", "wasmTerraExecuteContractGeneric", "wasmExecuteContractTransferMessage", "wasmExecuteContractSendMessage", "wasmExecuteContractGeneric", "signDirectMessage", "authGrant", "authRevoke"]),
|
20728
|
+
get: $util.oneOfGetter($oneOfFields = ["sendCoinsMessage", "transferTokensMessage", "stakeMessage", "unstakeMessage", "restakeMessage", "withdrawStakeRewardMessage", "rawJsonMessage", "wasmTerraExecuteContractTransferMessage", "wasmTerraExecuteContractSendMessage", "thorchainSendMessage", "wasmTerraExecuteContractGeneric", "wasmExecuteContractTransferMessage", "wasmExecuteContractSendMessage", "wasmExecuteContractGeneric", "signDirectMessage", "authGrant", "authRevoke", "msgVote"]),
|
20523
20729
|
set: $util.oneOfSetter($oneOfFields)
|
20524
20730
|
});
|
20525
20731
|
|
@@ -20581,6 +20787,8 @@
|
|
20581
20787
|
$root.TW.Cosmos.Proto.Message.AuthGrant.encode(message.authGrant, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
|
20582
20788
|
if (message.authRevoke != null && Object.hasOwnProperty.call(message, "authRevoke"))
|
20583
20789
|
$root.TW.Cosmos.Proto.Message.AuthRevoke.encode(message.authRevoke, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
|
20790
|
+
if (message.msgVote != null && Object.hasOwnProperty.call(message, "msgVote"))
|
20791
|
+
$root.TW.Cosmos.Proto.Message.MsgVote.encode(message.msgVote, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
|
20584
20792
|
return writer;
|
20585
20793
|
};
|
20586
20794
|
|
@@ -20653,6 +20861,9 @@
|
|
20653
20861
|
case 17:
|
20654
20862
|
message.authRevoke = $root.TW.Cosmos.Proto.Message.AuthRevoke.decode(reader, reader.uint32());
|
20655
20863
|
break;
|
20864
|
+
case 18:
|
20865
|
+
message.msgVote = $root.TW.Cosmos.Proto.Message.MsgVote.decode(reader, reader.uint32());
|
20866
|
+
break;
|
20656
20867
|
default:
|
20657
20868
|
reader.skipType(tag & 7);
|
20658
20869
|
break;
|
@@ -20841,6 +21052,16 @@
|
|
20841
21052
|
return "authRevoke." + error;
|
20842
21053
|
}
|
20843
21054
|
}
|
21055
|
+
if (message.msgVote != null && message.hasOwnProperty("msgVote")) {
|
21056
|
+
if (properties.messageOneof === 1)
|
21057
|
+
return "messageOneof: multiple values";
|
21058
|
+
properties.messageOneof = 1;
|
21059
|
+
{
|
21060
|
+
var error = $root.TW.Cosmos.Proto.Message.MsgVote.verify(message.msgVote);
|
21061
|
+
if (error)
|
21062
|
+
return "msgVote." + error;
|
21063
|
+
}
|
21064
|
+
}
|
20844
21065
|
return null;
|
20845
21066
|
};
|
20846
21067
|
|
@@ -20941,6 +21162,11 @@
|
|
20941
21162
|
throw TypeError(".TW.Cosmos.Proto.Message.authRevoke: object expected");
|
20942
21163
|
message.authRevoke = $root.TW.Cosmos.Proto.Message.AuthRevoke.fromObject(object.authRevoke);
|
20943
21164
|
}
|
21165
|
+
if (object.msgVote != null) {
|
21166
|
+
if (typeof object.msgVote !== "object")
|
21167
|
+
throw TypeError(".TW.Cosmos.Proto.Message.msgVote: object expected");
|
21168
|
+
message.msgVote = $root.TW.Cosmos.Proto.Message.MsgVote.fromObject(object.msgVote);
|
21169
|
+
}
|
20944
21170
|
return message;
|
20945
21171
|
};
|
20946
21172
|
|
@@ -21042,6 +21268,11 @@
|
|
21042
21268
|
if (options.oneofs)
|
21043
21269
|
object.messageOneof = "authRevoke";
|
21044
21270
|
}
|
21271
|
+
if (message.msgVote != null && message.hasOwnProperty("msgVote")) {
|
21272
|
+
object.msgVote = $root.TW.Cosmos.Proto.Message.MsgVote.toObject(message.msgVote, options);
|
21273
|
+
if (options.oneofs)
|
21274
|
+
object.messageOneof = "msgVote";
|
21275
|
+
}
|
21045
21276
|
return object;
|
21046
21277
|
};
|
21047
21278
|
|
@@ -25657,6 +25888,271 @@
|
|
25657
25888
|
return AuthRevoke;
|
25658
25889
|
})();
|
25659
25890
|
|
25891
|
+
/**
|
25892
|
+
* VoteOption enum.
|
25893
|
+
* @name TW.Cosmos.Proto.Message.VoteOption
|
25894
|
+
* @enum {number}
|
25895
|
+
* @property {number} _UNSPECIFIED=0 _UNSPECIFIED value
|
25896
|
+
* @property {number} YES=1 YES value
|
25897
|
+
* @property {number} ABSTAIN=2 ABSTAIN value
|
25898
|
+
* @property {number} NO=3 NO value
|
25899
|
+
* @property {number} NO_WITH_VETO=4 NO_WITH_VETO value
|
25900
|
+
*/
|
25901
|
+
Message.VoteOption = (function() {
|
25902
|
+
var valuesById = {}, values = Object.create(valuesById);
|
25903
|
+
values[valuesById[0] = "_UNSPECIFIED"] = 0;
|
25904
|
+
values[valuesById[1] = "YES"] = 1;
|
25905
|
+
values[valuesById[2] = "ABSTAIN"] = 2;
|
25906
|
+
values[valuesById[3] = "NO"] = 3;
|
25907
|
+
values[valuesById[4] = "NO_WITH_VETO"] = 4;
|
25908
|
+
return values;
|
25909
|
+
})();
|
25910
|
+
|
25911
|
+
Message.MsgVote = (function() {
|
25912
|
+
|
25913
|
+
/**
|
25914
|
+
* Properties of a MsgVote.
|
25915
|
+
* @memberof TW.Cosmos.Proto.Message
|
25916
|
+
* @interface IMsgVote
|
25917
|
+
* @property {Long|null} [proposalId] MsgVote proposalId
|
25918
|
+
* @property {string|null} [voter] MsgVote voter
|
25919
|
+
* @property {TW.Cosmos.Proto.Message.VoteOption|null} [option] MsgVote option
|
25920
|
+
*/
|
25921
|
+
|
25922
|
+
/**
|
25923
|
+
* Constructs a new MsgVote.
|
25924
|
+
* @memberof TW.Cosmos.Proto.Message
|
25925
|
+
* @classdesc Represents a MsgVote.
|
25926
|
+
* @implements IMsgVote
|
25927
|
+
* @constructor
|
25928
|
+
* @param {TW.Cosmos.Proto.Message.IMsgVote=} [properties] Properties to set
|
25929
|
+
*/
|
25930
|
+
function MsgVote(properties) {
|
25931
|
+
if (properties)
|
25932
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
25933
|
+
if (properties[keys[i]] != null)
|
25934
|
+
this[keys[i]] = properties[keys[i]];
|
25935
|
+
}
|
25936
|
+
|
25937
|
+
/**
|
25938
|
+
* MsgVote proposalId.
|
25939
|
+
* @member {Long} proposalId
|
25940
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
25941
|
+
* @instance
|
25942
|
+
*/
|
25943
|
+
MsgVote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
25944
|
+
|
25945
|
+
/**
|
25946
|
+
* MsgVote voter.
|
25947
|
+
* @member {string} voter
|
25948
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
25949
|
+
* @instance
|
25950
|
+
*/
|
25951
|
+
MsgVote.prototype.voter = "";
|
25952
|
+
|
25953
|
+
/**
|
25954
|
+
* MsgVote option.
|
25955
|
+
* @member {TW.Cosmos.Proto.Message.VoteOption} option
|
25956
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
25957
|
+
* @instance
|
25958
|
+
*/
|
25959
|
+
MsgVote.prototype.option = 0;
|
25960
|
+
|
25961
|
+
/**
|
25962
|
+
* Creates a new MsgVote instance using the specified properties.
|
25963
|
+
* @function create
|
25964
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
25965
|
+
* @static
|
25966
|
+
* @param {TW.Cosmos.Proto.Message.IMsgVote=} [properties] Properties to set
|
25967
|
+
* @returns {TW.Cosmos.Proto.Message.MsgVote} MsgVote instance
|
25968
|
+
*/
|
25969
|
+
MsgVote.create = function create(properties) {
|
25970
|
+
return new MsgVote(properties);
|
25971
|
+
};
|
25972
|
+
|
25973
|
+
/**
|
25974
|
+
* Encodes the specified MsgVote message. Does not implicitly {@link TW.Cosmos.Proto.Message.MsgVote.verify|verify} messages.
|
25975
|
+
* @function encode
|
25976
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
25977
|
+
* @static
|
25978
|
+
* @param {TW.Cosmos.Proto.Message.IMsgVote} message MsgVote message or plain object to encode
|
25979
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
25980
|
+
* @returns {$protobuf.Writer} Writer
|
25981
|
+
*/
|
25982
|
+
MsgVote.encode = function encode(message, writer) {
|
25983
|
+
if (!writer)
|
25984
|
+
writer = $Writer.create();
|
25985
|
+
if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId"))
|
25986
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId);
|
25987
|
+
if (message.voter != null && Object.hasOwnProperty.call(message, "voter"))
|
25988
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter);
|
25989
|
+
if (message.option != null && Object.hasOwnProperty.call(message, "option"))
|
25990
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option);
|
25991
|
+
return writer;
|
25992
|
+
};
|
25993
|
+
|
25994
|
+
/**
|
25995
|
+
* Decodes a MsgVote message from the specified reader or buffer.
|
25996
|
+
* @function decode
|
25997
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
25998
|
+
* @static
|
25999
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
26000
|
+
* @param {number} [length] Message length if known beforehand
|
26001
|
+
* @returns {TW.Cosmos.Proto.Message.MsgVote} MsgVote
|
26002
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
26003
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
26004
|
+
*/
|
26005
|
+
MsgVote.decode = function decode(reader, length) {
|
26006
|
+
if (!(reader instanceof $Reader))
|
26007
|
+
reader = $Reader.create(reader);
|
26008
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Cosmos.Proto.Message.MsgVote();
|
26009
|
+
while (reader.pos < end) {
|
26010
|
+
var tag = reader.uint32();
|
26011
|
+
switch (tag >>> 3) {
|
26012
|
+
case 1:
|
26013
|
+
message.proposalId = reader.uint64();
|
26014
|
+
break;
|
26015
|
+
case 2:
|
26016
|
+
message.voter = reader.string();
|
26017
|
+
break;
|
26018
|
+
case 3:
|
26019
|
+
message.option = reader.int32();
|
26020
|
+
break;
|
26021
|
+
default:
|
26022
|
+
reader.skipType(tag & 7);
|
26023
|
+
break;
|
26024
|
+
}
|
26025
|
+
}
|
26026
|
+
return message;
|
26027
|
+
};
|
26028
|
+
|
26029
|
+
/**
|
26030
|
+
* Verifies a MsgVote message.
|
26031
|
+
* @function verify
|
26032
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
26033
|
+
* @static
|
26034
|
+
* @param {Object.<string,*>} message Plain object to verify
|
26035
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
26036
|
+
*/
|
26037
|
+
MsgVote.verify = function verify(message) {
|
26038
|
+
if (typeof message !== "object" || message === null)
|
26039
|
+
return "object expected";
|
26040
|
+
if (message.proposalId != null && message.hasOwnProperty("proposalId"))
|
26041
|
+
if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high)))
|
26042
|
+
return "proposalId: integer|Long expected";
|
26043
|
+
if (message.voter != null && message.hasOwnProperty("voter"))
|
26044
|
+
if (!$util.isString(message.voter))
|
26045
|
+
return "voter: string expected";
|
26046
|
+
if (message.option != null && message.hasOwnProperty("option"))
|
26047
|
+
switch (message.option) {
|
26048
|
+
default:
|
26049
|
+
return "option: enum value expected";
|
26050
|
+
case 0:
|
26051
|
+
case 1:
|
26052
|
+
case 2:
|
26053
|
+
case 3:
|
26054
|
+
case 4:
|
26055
|
+
break;
|
26056
|
+
}
|
26057
|
+
return null;
|
26058
|
+
};
|
26059
|
+
|
26060
|
+
/**
|
26061
|
+
* Creates a MsgVote message from a plain object. Also converts values to their respective internal types.
|
26062
|
+
* @function fromObject
|
26063
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
26064
|
+
* @static
|
26065
|
+
* @param {Object.<string,*>} object Plain object
|
26066
|
+
* @returns {TW.Cosmos.Proto.Message.MsgVote} MsgVote
|
26067
|
+
*/
|
26068
|
+
MsgVote.fromObject = function fromObject(object) {
|
26069
|
+
if (object instanceof $root.TW.Cosmos.Proto.Message.MsgVote)
|
26070
|
+
return object;
|
26071
|
+
var message = new $root.TW.Cosmos.Proto.Message.MsgVote();
|
26072
|
+
if (object.proposalId != null)
|
26073
|
+
if ($util.Long)
|
26074
|
+
(message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true;
|
26075
|
+
else if (typeof object.proposalId === "string")
|
26076
|
+
message.proposalId = parseInt(object.proposalId, 10);
|
26077
|
+
else if (typeof object.proposalId === "number")
|
26078
|
+
message.proposalId = object.proposalId;
|
26079
|
+
else if (typeof object.proposalId === "object")
|
26080
|
+
message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true);
|
26081
|
+
if (object.voter != null)
|
26082
|
+
message.voter = String(object.voter);
|
26083
|
+
switch (object.option) {
|
26084
|
+
case "_UNSPECIFIED":
|
26085
|
+
case 0:
|
26086
|
+
message.option = 0;
|
26087
|
+
break;
|
26088
|
+
case "YES":
|
26089
|
+
case 1:
|
26090
|
+
message.option = 1;
|
26091
|
+
break;
|
26092
|
+
case "ABSTAIN":
|
26093
|
+
case 2:
|
26094
|
+
message.option = 2;
|
26095
|
+
break;
|
26096
|
+
case "NO":
|
26097
|
+
case 3:
|
26098
|
+
message.option = 3;
|
26099
|
+
break;
|
26100
|
+
case "NO_WITH_VETO":
|
26101
|
+
case 4:
|
26102
|
+
message.option = 4;
|
26103
|
+
break;
|
26104
|
+
}
|
26105
|
+
return message;
|
26106
|
+
};
|
26107
|
+
|
26108
|
+
/**
|
26109
|
+
* Creates a plain object from a MsgVote message. Also converts values to other types if specified.
|
26110
|
+
* @function toObject
|
26111
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
26112
|
+
* @static
|
26113
|
+
* @param {TW.Cosmos.Proto.Message.MsgVote} message MsgVote
|
26114
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
26115
|
+
* @returns {Object.<string,*>} Plain object
|
26116
|
+
*/
|
26117
|
+
MsgVote.toObject = function toObject(message, options) {
|
26118
|
+
if (!options)
|
26119
|
+
options = {};
|
26120
|
+
var object = {};
|
26121
|
+
if (options.defaults) {
|
26122
|
+
if ($util.Long) {
|
26123
|
+
var long = new $util.Long(0, 0, true);
|
26124
|
+
object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
26125
|
+
} else
|
26126
|
+
object.proposalId = options.longs === String ? "0" : 0;
|
26127
|
+
object.voter = "";
|
26128
|
+
object.option = options.enums === String ? "_UNSPECIFIED" : 0;
|
26129
|
+
}
|
26130
|
+
if (message.proposalId != null && message.hasOwnProperty("proposalId"))
|
26131
|
+
if (typeof message.proposalId === "number")
|
26132
|
+
object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId;
|
26133
|
+
else
|
26134
|
+
object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId;
|
26135
|
+
if (message.voter != null && message.hasOwnProperty("voter"))
|
26136
|
+
object.voter = message.voter;
|
26137
|
+
if (message.option != null && message.hasOwnProperty("option"))
|
26138
|
+
object.option = options.enums === String ? $root.TW.Cosmos.Proto.Message.VoteOption[message.option] : message.option;
|
26139
|
+
return object;
|
26140
|
+
};
|
26141
|
+
|
26142
|
+
/**
|
26143
|
+
* Converts this MsgVote to JSON.
|
26144
|
+
* @function toJSON
|
26145
|
+
* @memberof TW.Cosmos.Proto.Message.MsgVote
|
26146
|
+
* @instance
|
26147
|
+
* @returns {Object.<string,*>} JSON object
|
26148
|
+
*/
|
26149
|
+
MsgVote.prototype.toJSON = function toJSON() {
|
26150
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
26151
|
+
};
|
26152
|
+
|
26153
|
+
return MsgVote;
|
26154
|
+
})();
|
26155
|
+
|
25660
26156
|
return Message;
|
25661
26157
|
})();
|
25662
26158
|
|
Binary file
|
@@ -609,8 +609,11 @@ export class SS58AddressType {
|
|
609
609
|
export class AnyAddress {
|
610
610
|
static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
|
611
611
|
static isValid(string: string, coin: CoinType): boolean;
|
612
|
+
static isValidBech32(string: string, coin: CoinType, hrp: string): boolean;
|
612
613
|
static createWithString(string: string, coin: CoinType): AnyAddress;
|
614
|
+
static createBech32(string: string, coin: CoinType, hrp: string): AnyAddress;
|
613
615
|
static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
|
616
|
+
static createBech32WithPublicKey(publicKey: PublicKey, coin: CoinType, hrp: string): AnyAddress;
|
614
617
|
description(): string;
|
615
618
|
coin(): CoinType;
|
616
619
|
data(): Uint8Array;
|