@trustwallet/wallet-core 4.3.5 → 4.3.7
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 +111 -81
- package/dist/generated/core_proto.js +348 -201
- package/dist/lib/wallet-core.js +1 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +4 -1
- package/package.json +1 -1
@@ -1353,79 +1353,6 @@ export namespace TW {
|
|
1353
1353
|
public toJSON(): { [k: string]: any };
|
1354
1354
|
}
|
1355
1355
|
|
1356
|
-
/** Properties of a ManagedTokensRegisterMessage. */
|
1357
|
-
interface IManagedTokensRegisterMessage {
|
1358
|
-
|
1359
|
-
/** ManagedTokensRegisterMessage function */
|
1360
|
-
"function"?: (TW.Aptos.Proto.IStructTag|null);
|
1361
|
-
}
|
1362
|
-
|
1363
|
-
/** Represents a ManagedTokensRegisterMessage. */
|
1364
|
-
class ManagedTokensRegisterMessage implements IManagedTokensRegisterMessage {
|
1365
|
-
|
1366
|
-
/**
|
1367
|
-
* Constructs a new ManagedTokensRegisterMessage.
|
1368
|
-
* @param [properties] Properties to set
|
1369
|
-
*/
|
1370
|
-
constructor(properties?: TW.Aptos.Proto.IManagedTokensRegisterMessage);
|
1371
|
-
|
1372
|
-
/** ManagedTokensRegisterMessage function. */
|
1373
|
-
public function?: (TW.Aptos.Proto.IStructTag|null);
|
1374
|
-
|
1375
|
-
/**
|
1376
|
-
* Creates a new ManagedTokensRegisterMessage instance using the specified properties.
|
1377
|
-
* @param [properties] Properties to set
|
1378
|
-
* @returns ManagedTokensRegisterMessage instance
|
1379
|
-
*/
|
1380
|
-
public static create(properties?: TW.Aptos.Proto.IManagedTokensRegisterMessage): TW.Aptos.Proto.ManagedTokensRegisterMessage;
|
1381
|
-
|
1382
|
-
/**
|
1383
|
-
* Encodes the specified ManagedTokensRegisterMessage message. Does not implicitly {@link TW.Aptos.Proto.ManagedTokensRegisterMessage.verify|verify} messages.
|
1384
|
-
* @param message ManagedTokensRegisterMessage message or plain object to encode
|
1385
|
-
* @param [writer] Writer to encode to
|
1386
|
-
* @returns Writer
|
1387
|
-
*/
|
1388
|
-
public static encode(message: TW.Aptos.Proto.IManagedTokensRegisterMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
1389
|
-
|
1390
|
-
/**
|
1391
|
-
* Decodes a ManagedTokensRegisterMessage message from the specified reader or buffer.
|
1392
|
-
* @param reader Reader or buffer to decode from
|
1393
|
-
* @param [length] Message length if known beforehand
|
1394
|
-
* @returns ManagedTokensRegisterMessage
|
1395
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
1396
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1397
|
-
*/
|
1398
|
-
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Aptos.Proto.ManagedTokensRegisterMessage;
|
1399
|
-
|
1400
|
-
/**
|
1401
|
-
* Verifies a ManagedTokensRegisterMessage message.
|
1402
|
-
* @param message Plain object to verify
|
1403
|
-
* @returns `null` if valid, otherwise the reason why it is not
|
1404
|
-
*/
|
1405
|
-
public static verify(message: { [k: string]: any }): (string|null);
|
1406
|
-
|
1407
|
-
/**
|
1408
|
-
* Creates a ManagedTokensRegisterMessage message from a plain object. Also converts values to their respective internal types.
|
1409
|
-
* @param object Plain object
|
1410
|
-
* @returns ManagedTokensRegisterMessage
|
1411
|
-
*/
|
1412
|
-
public static fromObject(object: { [k: string]: any }): TW.Aptos.Proto.ManagedTokensRegisterMessage;
|
1413
|
-
|
1414
|
-
/**
|
1415
|
-
* Creates a plain object from a ManagedTokensRegisterMessage message. Also converts values to other types if specified.
|
1416
|
-
* @param message ManagedTokensRegisterMessage
|
1417
|
-
* @param [options] Conversion options
|
1418
|
-
* @returns Plain object
|
1419
|
-
*/
|
1420
|
-
public static toObject(message: TW.Aptos.Proto.ManagedTokensRegisterMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
1421
|
-
|
1422
|
-
/**
|
1423
|
-
* Converts this ManagedTokensRegisterMessage to JSON.
|
1424
|
-
* @returns JSON object
|
1425
|
-
*/
|
1426
|
-
public toJSON(): { [k: string]: any };
|
1427
|
-
}
|
1428
|
-
|
1429
1356
|
/** Properties of a CreateAccountMessage. */
|
1430
1357
|
interface ICreateAccountMessage {
|
1431
1358
|
|
@@ -2236,9 +2163,6 @@ export namespace TW {
|
|
2236
2163
|
/** SigningInput nftMessage */
|
2237
2164
|
nftMessage?: (TW.Aptos.Proto.INftMessage|null);
|
2238
2165
|
|
2239
|
-
/** SigningInput registerToken */
|
2240
|
-
registerToken?: (TW.Aptos.Proto.IManagedTokensRegisterMessage|null);
|
2241
|
-
|
2242
2166
|
/** SigningInput liquidStakingMessage */
|
2243
2167
|
liquidStakingMessage?: (TW.Aptos.Proto.ILiquidStaking|null);
|
2244
2168
|
|
@@ -2297,9 +2221,6 @@ export namespace TW {
|
|
2297
2221
|
/** SigningInput nftMessage. */
|
2298
2222
|
public nftMessage?: (TW.Aptos.Proto.INftMessage|null);
|
2299
2223
|
|
2300
|
-
/** SigningInput registerToken. */
|
2301
|
-
public registerToken?: (TW.Aptos.Proto.IManagedTokensRegisterMessage|null);
|
2302
|
-
|
2303
2224
|
/** SigningInput liquidStakingMessage. */
|
2304
2225
|
public liquidStakingMessage?: (TW.Aptos.Proto.ILiquidStaking|null);
|
2305
2226
|
|
@@ -2313,7 +2234,7 @@ export namespace TW {
|
|
2313
2234
|
public abi: string;
|
2314
2235
|
|
2315
2236
|
/** SigningInput transactionPayload. */
|
2316
|
-
public transactionPayload?: ("transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"
|
2237
|
+
public transactionPayload?: ("transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"liquidStakingMessage"|"tokenTransferCoins"|"fungibleAssetTransfer");
|
2317
2238
|
|
2318
2239
|
/**
|
2319
2240
|
* Creates a new SigningInput instance using the specified properties.
|
@@ -35617,6 +35538,9 @@ export namespace TW {
|
|
35617
35538
|
|
35618
35539
|
/** Staking rebond */
|
35619
35540
|
rebond?: (TW.Polkadot.Proto.Staking.IRebond|null);
|
35541
|
+
|
35542
|
+
/** Staking bondExtraAndNominate */
|
35543
|
+
bondExtraAndNominate?: (TW.Polkadot.Proto.Staking.IBondExtraAndNominate|null);
|
35620
35544
|
}
|
35621
35545
|
|
35622
35546
|
/** Represents a Staking. */
|
@@ -35655,8 +35579,11 @@ export namespace TW {
|
|
35655
35579
|
/** Staking rebond. */
|
35656
35580
|
public rebond?: (TW.Polkadot.Proto.Staking.IRebond|null);
|
35657
35581
|
|
35582
|
+
/** Staking bondExtraAndNominate. */
|
35583
|
+
public bondExtraAndNominate?: (TW.Polkadot.Proto.Staking.IBondExtraAndNominate|null);
|
35584
|
+
|
35658
35585
|
/** Staking messageOneof. */
|
35659
|
-
public messageOneof?: ("bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond"|"rebond");
|
35586
|
+
public messageOneof?: ("bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond"|"rebond"|"bondExtraAndNominate");
|
35660
35587
|
|
35661
35588
|
/**
|
35662
35589
|
* Creates a new Staking instance using the specified properties.
|
@@ -35914,6 +35841,103 @@ export namespace TW {
|
|
35914
35841
|
public toJSON(): { [k: string]: any };
|
35915
35842
|
}
|
35916
35843
|
|
35844
|
+
/** Properties of a BondExtraAndNominate. */
|
35845
|
+
interface IBondExtraAndNominate {
|
35846
|
+
|
35847
|
+
/** BondExtraAndNominate value */
|
35848
|
+
value?: (Uint8Array|null);
|
35849
|
+
|
35850
|
+
/** BondExtraAndNominate nominators */
|
35851
|
+
nominators?: (string[]|null);
|
35852
|
+
|
35853
|
+
/** BondExtraAndNominate callIndices */
|
35854
|
+
callIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35855
|
+
|
35856
|
+
/** BondExtraAndNominate bondExtraCallIndices */
|
35857
|
+
bondExtraCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35858
|
+
|
35859
|
+
/** BondExtraAndNominate nominateCallIndices */
|
35860
|
+
nominateCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35861
|
+
}
|
35862
|
+
|
35863
|
+
/** Represents a BondExtraAndNominate. */
|
35864
|
+
class BondExtraAndNominate implements IBondExtraAndNominate {
|
35865
|
+
|
35866
|
+
/**
|
35867
|
+
* Constructs a new BondExtraAndNominate.
|
35868
|
+
* @param [properties] Properties to set
|
35869
|
+
*/
|
35870
|
+
constructor(properties?: TW.Polkadot.Proto.Staking.IBondExtraAndNominate);
|
35871
|
+
|
35872
|
+
/** BondExtraAndNominate value. */
|
35873
|
+
public value: Uint8Array;
|
35874
|
+
|
35875
|
+
/** BondExtraAndNominate nominators. */
|
35876
|
+
public nominators: string[];
|
35877
|
+
|
35878
|
+
/** BondExtraAndNominate callIndices. */
|
35879
|
+
public callIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35880
|
+
|
35881
|
+
/** BondExtraAndNominate bondExtraCallIndices. */
|
35882
|
+
public bondExtraCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35883
|
+
|
35884
|
+
/** BondExtraAndNominate nominateCallIndices. */
|
35885
|
+
public nominateCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
|
35886
|
+
|
35887
|
+
/**
|
35888
|
+
* Creates a new BondExtraAndNominate instance using the specified properties.
|
35889
|
+
* @param [properties] Properties to set
|
35890
|
+
* @returns BondExtraAndNominate instance
|
35891
|
+
*/
|
35892
|
+
public static create(properties?: TW.Polkadot.Proto.Staking.IBondExtraAndNominate): TW.Polkadot.Proto.Staking.BondExtraAndNominate;
|
35893
|
+
|
35894
|
+
/**
|
35895
|
+
* Encodes the specified BondExtraAndNominate message. Does not implicitly {@link TW.Polkadot.Proto.Staking.BondExtraAndNominate.verify|verify} messages.
|
35896
|
+
* @param message BondExtraAndNominate message or plain object to encode
|
35897
|
+
* @param [writer] Writer to encode to
|
35898
|
+
* @returns Writer
|
35899
|
+
*/
|
35900
|
+
public static encode(message: TW.Polkadot.Proto.Staking.IBondExtraAndNominate, writer?: $protobuf.Writer): $protobuf.Writer;
|
35901
|
+
|
35902
|
+
/**
|
35903
|
+
* Decodes a BondExtraAndNominate message from the specified reader or buffer.
|
35904
|
+
* @param reader Reader or buffer to decode from
|
35905
|
+
* @param [length] Message length if known beforehand
|
35906
|
+
* @returns BondExtraAndNominate
|
35907
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
35908
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
35909
|
+
*/
|
35910
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Polkadot.Proto.Staking.BondExtraAndNominate;
|
35911
|
+
|
35912
|
+
/**
|
35913
|
+
* Verifies a BondExtraAndNominate message.
|
35914
|
+
* @param message Plain object to verify
|
35915
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
35916
|
+
*/
|
35917
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
35918
|
+
|
35919
|
+
/**
|
35920
|
+
* Creates a BondExtraAndNominate message from a plain object. Also converts values to their respective internal types.
|
35921
|
+
* @param object Plain object
|
35922
|
+
* @returns BondExtraAndNominate
|
35923
|
+
*/
|
35924
|
+
public static fromObject(object: { [k: string]: any }): TW.Polkadot.Proto.Staking.BondExtraAndNominate;
|
35925
|
+
|
35926
|
+
/**
|
35927
|
+
* Creates a plain object from a BondExtraAndNominate message. Also converts values to other types if specified.
|
35928
|
+
* @param message BondExtraAndNominate
|
35929
|
+
* @param [options] Conversion options
|
35930
|
+
* @returns Plain object
|
35931
|
+
*/
|
35932
|
+
public static toObject(message: TW.Polkadot.Proto.Staking.BondExtraAndNominate, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
35933
|
+
|
35934
|
+
/**
|
35935
|
+
* Converts this BondExtraAndNominate to JSON.
|
35936
|
+
* @returns JSON object
|
35937
|
+
*/
|
35938
|
+
public toJSON(): { [k: string]: any };
|
35939
|
+
}
|
35940
|
+
|
35917
35941
|
/** Properties of a BondExtra. */
|
35918
35942
|
interface IBondExtra {
|
35919
35943
|
|
@@ -49193,6 +49217,9 @@ export namespace TW {
|
|
49193
49217
|
|
49194
49218
|
/** SigningInput txId */
|
49195
49219
|
txId?: (string|null);
|
49220
|
+
|
49221
|
+
/** SigningInput rawJson */
|
49222
|
+
rawJson?: (string|null);
|
49196
49223
|
}
|
49197
49224
|
|
49198
49225
|
/** Represents a SigningInput. */
|
@@ -49213,6 +49240,9 @@ export namespace TW {
|
|
49213
49240
|
/** SigningInput txId. */
|
49214
49241
|
public txId: string;
|
49215
49242
|
|
49243
|
+
/** SigningInput rawJson. */
|
49244
|
+
public rawJson: string;
|
49245
|
+
|
49216
49246
|
/**
|
49217
49247
|
* Creates a new SigningInput instance using the specified properties.
|
49218
49248
|
* @param [properties] Properties to set
|
@@ -4037,169 +4037,6 @@
|
|
4037
4037
|
return FungibleAssetTransferMessage;
|
4038
4038
|
})();
|
4039
4039
|
|
4040
|
-
Proto.ManagedTokensRegisterMessage = (function() {
|
4041
|
-
|
4042
|
-
/**
|
4043
|
-
* Properties of a ManagedTokensRegisterMessage.
|
4044
|
-
* @memberof TW.Aptos.Proto
|
4045
|
-
* @interface IManagedTokensRegisterMessage
|
4046
|
-
* @property {TW.Aptos.Proto.IStructTag|null} ["function"] ManagedTokensRegisterMessage function
|
4047
|
-
*/
|
4048
|
-
|
4049
|
-
/**
|
4050
|
-
* Constructs a new ManagedTokensRegisterMessage.
|
4051
|
-
* @memberof TW.Aptos.Proto
|
4052
|
-
* @classdesc Represents a ManagedTokensRegisterMessage.
|
4053
|
-
* @implements IManagedTokensRegisterMessage
|
4054
|
-
* @constructor
|
4055
|
-
* @param {TW.Aptos.Proto.IManagedTokensRegisterMessage=} [properties] Properties to set
|
4056
|
-
*/
|
4057
|
-
function ManagedTokensRegisterMessage(properties) {
|
4058
|
-
if (properties)
|
4059
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
4060
|
-
if (properties[keys[i]] != null)
|
4061
|
-
this[keys[i]] = properties[keys[i]];
|
4062
|
-
}
|
4063
|
-
|
4064
|
-
/**
|
4065
|
-
* ManagedTokensRegisterMessage function.
|
4066
|
-
* @member {TW.Aptos.Proto.IStructTag|null|undefined} function
|
4067
|
-
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
4068
|
-
* @instance
|
4069
|
-
*/
|
4070
|
-
ManagedTokensRegisterMessage.prototype["function"] = null;
|
4071
|
-
|
4072
|
-
/**
|
4073
|
-
* Creates a new ManagedTokensRegisterMessage instance using the specified properties.
|
4074
|
-
* @function create
|
4075
|
-
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
4076
|
-
* @static
|
4077
|
-
* @param {TW.Aptos.Proto.IManagedTokensRegisterMessage=} [properties] Properties to set
|
4078
|
-
* @returns {TW.Aptos.Proto.ManagedTokensRegisterMessage} ManagedTokensRegisterMessage instance
|
4079
|
-
*/
|
4080
|
-
ManagedTokensRegisterMessage.create = function create(properties) {
|
4081
|
-
return new ManagedTokensRegisterMessage(properties);
|
4082
|
-
};
|
4083
|
-
|
4084
|
-
/**
|
4085
|
-
* Encodes the specified ManagedTokensRegisterMessage message. Does not implicitly {@link TW.Aptos.Proto.ManagedTokensRegisterMessage.verify|verify} messages.
|
4086
|
-
* @function encode
|
4087
|
-
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
4088
|
-
* @static
|
4089
|
-
* @param {TW.Aptos.Proto.IManagedTokensRegisterMessage} message ManagedTokensRegisterMessage message or plain object to encode
|
4090
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
4091
|
-
* @returns {$protobuf.Writer} Writer
|
4092
|
-
*/
|
4093
|
-
ManagedTokensRegisterMessage.encode = function encode(message, writer) {
|
4094
|
-
if (!writer)
|
4095
|
-
writer = $Writer.create();
|
4096
|
-
if (message["function"] != null && Object.hasOwnProperty.call(message, "function"))
|
4097
|
-
$root.TW.Aptos.Proto.StructTag.encode(message["function"], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
4098
|
-
return writer;
|
4099
|
-
};
|
4100
|
-
|
4101
|
-
/**
|
4102
|
-
* Decodes a ManagedTokensRegisterMessage message from the specified reader or buffer.
|
4103
|
-
* @function decode
|
4104
|
-
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
4105
|
-
* @static
|
4106
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4107
|
-
* @param {number} [length] Message length if known beforehand
|
4108
|
-
* @returns {TW.Aptos.Proto.ManagedTokensRegisterMessage} ManagedTokensRegisterMessage
|
4109
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
4110
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4111
|
-
*/
|
4112
|
-
ManagedTokensRegisterMessage.decode = function decode(reader, length) {
|
4113
|
-
if (!(reader instanceof $Reader))
|
4114
|
-
reader = $Reader.create(reader);
|
4115
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.ManagedTokensRegisterMessage();
|
4116
|
-
while (reader.pos < end) {
|
4117
|
-
var tag = reader.uint32();
|
4118
|
-
switch (tag >>> 3) {
|
4119
|
-
case 1:
|
4120
|
-
message["function"] = $root.TW.Aptos.Proto.StructTag.decode(reader, reader.uint32());
|
4121
|
-
break;
|
4122
|
-
default:
|
4123
|
-
reader.skipType(tag & 7);
|
4124
|
-
break;
|
4125
|
-
}
|
4126
|
-
}
|
4127
|
-
return message;
|
4128
|
-
};
|
4129
|
-
|
4130
|
-
/**
|
4131
|
-
* Verifies a ManagedTokensRegisterMessage message.
|
4132
|
-
* @function verify
|
4133
|
-
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
4134
|
-
* @static
|
4135
|
-
* @param {Object.<string,*>} message Plain object to verify
|
4136
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
4137
|
-
*/
|
4138
|
-
ManagedTokensRegisterMessage.verify = function verify(message) {
|
4139
|
-
if (typeof message !== "object" || message === null)
|
4140
|
-
return "object expected";
|
4141
|
-
if (message["function"] != null && message.hasOwnProperty("function")) {
|
4142
|
-
var error = $root.TW.Aptos.Proto.StructTag.verify(message["function"]);
|
4143
|
-
if (error)
|
4144
|
-
return "function." + error;
|
4145
|
-
}
|
4146
|
-
return null;
|
4147
|
-
};
|
4148
|
-
|
4149
|
-
/**
|
4150
|
-
* Creates a ManagedTokensRegisterMessage message from a plain object. Also converts values to their respective internal types.
|
4151
|
-
* @function fromObject
|
4152
|
-
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
4153
|
-
* @static
|
4154
|
-
* @param {Object.<string,*>} object Plain object
|
4155
|
-
* @returns {TW.Aptos.Proto.ManagedTokensRegisterMessage} ManagedTokensRegisterMessage
|
4156
|
-
*/
|
4157
|
-
ManagedTokensRegisterMessage.fromObject = function fromObject(object) {
|
4158
|
-
if (object instanceof $root.TW.Aptos.Proto.ManagedTokensRegisterMessage)
|
4159
|
-
return object;
|
4160
|
-
var message = new $root.TW.Aptos.Proto.ManagedTokensRegisterMessage();
|
4161
|
-
if (object["function"] != null) {
|
4162
|
-
if (typeof object["function"] !== "object")
|
4163
|
-
throw TypeError(".TW.Aptos.Proto.ManagedTokensRegisterMessage.function: object expected");
|
4164
|
-
message["function"] = $root.TW.Aptos.Proto.StructTag.fromObject(object["function"]);
|
4165
|
-
}
|
4166
|
-
return message;
|
4167
|
-
};
|
4168
|
-
|
4169
|
-
/**
|
4170
|
-
* Creates a plain object from a ManagedTokensRegisterMessage message. Also converts values to other types if specified.
|
4171
|
-
* @function toObject
|
4172
|
-
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
4173
|
-
* @static
|
4174
|
-
* @param {TW.Aptos.Proto.ManagedTokensRegisterMessage} message ManagedTokensRegisterMessage
|
4175
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
4176
|
-
* @returns {Object.<string,*>} Plain object
|
4177
|
-
*/
|
4178
|
-
ManagedTokensRegisterMessage.toObject = function toObject(message, options) {
|
4179
|
-
if (!options)
|
4180
|
-
options = {};
|
4181
|
-
var object = {};
|
4182
|
-
if (options.defaults)
|
4183
|
-
object["function"] = null;
|
4184
|
-
if (message["function"] != null && message.hasOwnProperty("function"))
|
4185
|
-
object["function"] = $root.TW.Aptos.Proto.StructTag.toObject(message["function"], options);
|
4186
|
-
return object;
|
4187
|
-
};
|
4188
|
-
|
4189
|
-
/**
|
4190
|
-
* Converts this ManagedTokensRegisterMessage to JSON.
|
4191
|
-
* @function toJSON
|
4192
|
-
* @memberof TW.Aptos.Proto.ManagedTokensRegisterMessage
|
4193
|
-
* @instance
|
4194
|
-
* @returns {Object.<string,*>} JSON object
|
4195
|
-
*/
|
4196
|
-
ManagedTokensRegisterMessage.prototype.toJSON = function toJSON() {
|
4197
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
4198
|
-
};
|
4199
|
-
|
4200
|
-
return ManagedTokensRegisterMessage;
|
4201
|
-
})();
|
4202
|
-
|
4203
4040
|
Proto.CreateAccountMessage = (function() {
|
4204
4041
|
|
4205
4042
|
/**
|
@@ -6234,7 +6071,6 @@
|
|
6234
6071
|
* @property {TW.Aptos.Proto.ITokenTransferMessage|null} [tokenTransfer] SigningInput tokenTransfer
|
6235
6072
|
* @property {TW.Aptos.Proto.ICreateAccountMessage|null} [createAccount] SigningInput createAccount
|
6236
6073
|
* @property {TW.Aptos.Proto.INftMessage|null} [nftMessage] SigningInput nftMessage
|
6237
|
-
* @property {TW.Aptos.Proto.IManagedTokensRegisterMessage|null} [registerToken] SigningInput registerToken
|
6238
6074
|
* @property {TW.Aptos.Proto.ILiquidStaking|null} [liquidStakingMessage] SigningInput liquidStakingMessage
|
6239
6075
|
* @property {TW.Aptos.Proto.ITokenTransferCoinsMessage|null} [tokenTransferCoins] SigningInput tokenTransferCoins
|
6240
6076
|
* @property {TW.Aptos.Proto.IFungibleAssetTransferMessage|null} [fungibleAssetTransfer] SigningInput fungibleAssetTransfer
|
@@ -6352,14 +6188,6 @@
|
|
6352
6188
|
*/
|
6353
6189
|
SigningInput.prototype.nftMessage = null;
|
6354
6190
|
|
6355
|
-
/**
|
6356
|
-
* SigningInput registerToken.
|
6357
|
-
* @member {TW.Aptos.Proto.IManagedTokensRegisterMessage|null|undefined} registerToken
|
6358
|
-
* @memberof TW.Aptos.Proto.SigningInput
|
6359
|
-
* @instance
|
6360
|
-
*/
|
6361
|
-
SigningInput.prototype.registerToken = null;
|
6362
|
-
|
6363
6191
|
/**
|
6364
6192
|
* SigningInput liquidStakingMessage.
|
6365
6193
|
* @member {TW.Aptos.Proto.ILiquidStaking|null|undefined} liquidStakingMessage
|
@@ -6397,12 +6225,12 @@
|
|
6397
6225
|
|
6398
6226
|
/**
|
6399
6227
|
* SigningInput transactionPayload.
|
6400
|
-
* @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"
|
6228
|
+
* @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"liquidStakingMessage"|"tokenTransferCoins"|"fungibleAssetTransfer"|undefined} transactionPayload
|
6401
6229
|
* @memberof TW.Aptos.Proto.SigningInput
|
6402
6230
|
* @instance
|
6403
6231
|
*/
|
6404
6232
|
Object.defineProperty(SigningInput.prototype, "transactionPayload", {
|
6405
|
-
get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage", "
|
6233
|
+
get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage", "liquidStakingMessage", "tokenTransferCoins", "fungibleAssetTransfer"]),
|
6406
6234
|
set: $util.oneOfSetter($oneOfFields)
|
6407
6235
|
});
|
6408
6236
|
|
@@ -6454,8 +6282,6 @@
|
|
6454
6282
|
$root.TW.Aptos.Proto.CreateAccountMessage.encode(message.createAccount, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
6455
6283
|
if (message.nftMessage != null && Object.hasOwnProperty.call(message, "nftMessage"))
|
6456
6284
|
$root.TW.Aptos.Proto.NftMessage.encode(message.nftMessage, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
6457
|
-
if (message.registerToken != null && Object.hasOwnProperty.call(message, "registerToken"))
|
6458
|
-
$root.TW.Aptos.Proto.ManagedTokensRegisterMessage.encode(message.registerToken, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
6459
6285
|
if (message.liquidStakingMessage != null && Object.hasOwnProperty.call(message, "liquidStakingMessage"))
|
6460
6286
|
$root.TW.Aptos.Proto.LiquidStaking.encode(message.liquidStakingMessage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
|
6461
6287
|
if (message.tokenTransferCoins != null && Object.hasOwnProperty.call(message, "tokenTransferCoins"))
|
@@ -6521,9 +6347,6 @@
|
|
6521
6347
|
case 12:
|
6522
6348
|
message.nftMessage = $root.TW.Aptos.Proto.NftMessage.decode(reader, reader.uint32());
|
6523
6349
|
break;
|
6524
|
-
case 13:
|
6525
|
-
message.registerToken = $root.TW.Aptos.Proto.ManagedTokensRegisterMessage.decode(reader, reader.uint32());
|
6526
|
-
break;
|
6527
6350
|
case 14:
|
6528
6351
|
message.liquidStakingMessage = $root.TW.Aptos.Proto.LiquidStaking.decode(reader, reader.uint32());
|
6529
6352
|
break;
|
@@ -6618,16 +6441,6 @@
|
|
6618
6441
|
return "nftMessage." + error;
|
6619
6442
|
}
|
6620
6443
|
}
|
6621
|
-
if (message.registerToken != null && message.hasOwnProperty("registerToken")) {
|
6622
|
-
if (properties.transactionPayload === 1)
|
6623
|
-
return "transactionPayload: multiple values";
|
6624
|
-
properties.transactionPayload = 1;
|
6625
|
-
{
|
6626
|
-
var error = $root.TW.Aptos.Proto.ManagedTokensRegisterMessage.verify(message.registerToken);
|
6627
|
-
if (error)
|
6628
|
-
return "registerToken." + error;
|
6629
|
-
}
|
6630
|
-
}
|
6631
6444
|
if (message.liquidStakingMessage != null && message.hasOwnProperty("liquidStakingMessage")) {
|
6632
6445
|
if (properties.transactionPayload === 1)
|
6633
6446
|
return "transactionPayload: multiple values";
|
@@ -6743,11 +6556,6 @@
|
|
6743
6556
|
throw TypeError(".TW.Aptos.Proto.SigningInput.nftMessage: object expected");
|
6744
6557
|
message.nftMessage = $root.TW.Aptos.Proto.NftMessage.fromObject(object.nftMessage);
|
6745
6558
|
}
|
6746
|
-
if (object.registerToken != null) {
|
6747
|
-
if (typeof object.registerToken !== "object")
|
6748
|
-
throw TypeError(".TW.Aptos.Proto.SigningInput.registerToken: object expected");
|
6749
|
-
message.registerToken = $root.TW.Aptos.Proto.ManagedTokensRegisterMessage.fromObject(object.registerToken);
|
6750
|
-
}
|
6751
6559
|
if (object.liquidStakingMessage != null) {
|
6752
6560
|
if (typeof object.liquidStakingMessage !== "object")
|
6753
6561
|
throw TypeError(".TW.Aptos.Proto.SigningInput.liquidStakingMessage: object expected");
|
@@ -6862,11 +6670,6 @@
|
|
6862
6670
|
if (options.oneofs)
|
6863
6671
|
object.transactionPayload = "nftMessage";
|
6864
6672
|
}
|
6865
|
-
if (message.registerToken != null && message.hasOwnProperty("registerToken")) {
|
6866
|
-
object.registerToken = $root.TW.Aptos.Proto.ManagedTokensRegisterMessage.toObject(message.registerToken, options);
|
6867
|
-
if (options.oneofs)
|
6868
|
-
object.transactionPayload = "registerToken";
|
6869
|
-
}
|
6870
6673
|
if (message.liquidStakingMessage != null && message.hasOwnProperty("liquidStakingMessage")) {
|
6871
6674
|
object.liquidStakingMessage = $root.TW.Aptos.Proto.LiquidStaking.toObject(message.liquidStakingMessage, options);
|
6872
6675
|
if (options.oneofs)
|
@@ -105526,6 +105329,7 @@
|
|
105526
105329
|
* @property {TW.Polkadot.Proto.Staking.IChill|null} [chill] Staking chill
|
105527
105330
|
* @property {TW.Polkadot.Proto.Staking.IChillAndUnbond|null} [chillAndUnbond] Staking chillAndUnbond
|
105528
105331
|
* @property {TW.Polkadot.Proto.Staking.IRebond|null} [rebond] Staking rebond
|
105332
|
+
* @property {TW.Polkadot.Proto.Staking.IBondExtraAndNominate|null} [bondExtraAndNominate] Staking bondExtraAndNominate
|
105529
105333
|
*/
|
105530
105334
|
|
105531
105335
|
/**
|
@@ -105615,17 +105419,25 @@
|
|
105615
105419
|
*/
|
105616
105420
|
Staking.prototype.rebond = null;
|
105617
105421
|
|
105422
|
+
/**
|
105423
|
+
* Staking bondExtraAndNominate.
|
105424
|
+
* @member {TW.Polkadot.Proto.Staking.IBondExtraAndNominate|null|undefined} bondExtraAndNominate
|
105425
|
+
* @memberof TW.Polkadot.Proto.Staking
|
105426
|
+
* @instance
|
105427
|
+
*/
|
105428
|
+
Staking.prototype.bondExtraAndNominate = null;
|
105429
|
+
|
105618
105430
|
// OneOf field names bound to virtual getters and setters
|
105619
105431
|
var $oneOfFields;
|
105620
105432
|
|
105621
105433
|
/**
|
105622
105434
|
* Staking messageOneof.
|
105623
|
-
* @member {"bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond"|"rebond"|undefined} messageOneof
|
105435
|
+
* @member {"bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond"|"rebond"|"bondExtraAndNominate"|undefined} messageOneof
|
105624
105436
|
* @memberof TW.Polkadot.Proto.Staking
|
105625
105437
|
* @instance
|
105626
105438
|
*/
|
105627
105439
|
Object.defineProperty(Staking.prototype, "messageOneof", {
|
105628
|
-
get: $util.oneOfGetter($oneOfFields = ["bond", "bondAndNominate", "bondExtra", "unbond", "withdrawUnbonded", "nominate", "chill", "chillAndUnbond", "rebond"]),
|
105440
|
+
get: $util.oneOfGetter($oneOfFields = ["bond", "bondAndNominate", "bondExtra", "unbond", "withdrawUnbonded", "nominate", "chill", "chillAndUnbond", "rebond", "bondExtraAndNominate"]),
|
105629
105441
|
set: $util.oneOfSetter($oneOfFields)
|
105630
105442
|
});
|
105631
105443
|
|
@@ -105671,6 +105483,8 @@
|
|
105671
105483
|
$root.TW.Polkadot.Proto.Staking.ChillAndUnbond.encode(message.chillAndUnbond, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
105672
105484
|
if (message.rebond != null && Object.hasOwnProperty.call(message, "rebond"))
|
105673
105485
|
$root.TW.Polkadot.Proto.Staking.Rebond.encode(message.rebond, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
105486
|
+
if (message.bondExtraAndNominate != null && Object.hasOwnProperty.call(message, "bondExtraAndNominate"))
|
105487
|
+
$root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.encode(message.bondExtraAndNominate, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
105674
105488
|
return writer;
|
105675
105489
|
};
|
105676
105490
|
|
@@ -105719,6 +105533,9 @@
|
|
105719
105533
|
case 9:
|
105720
105534
|
message.rebond = $root.TW.Polkadot.Proto.Staking.Rebond.decode(reader, reader.uint32());
|
105721
105535
|
break;
|
105536
|
+
case 10:
|
105537
|
+
message.bondExtraAndNominate = $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.decode(reader, reader.uint32());
|
105538
|
+
break;
|
105722
105539
|
default:
|
105723
105540
|
reader.skipType(tag & 7);
|
105724
105541
|
break;
|
@@ -105827,6 +105644,16 @@
|
|
105827
105644
|
return "rebond." + error;
|
105828
105645
|
}
|
105829
105646
|
}
|
105647
|
+
if (message.bondExtraAndNominate != null && message.hasOwnProperty("bondExtraAndNominate")) {
|
105648
|
+
if (properties.messageOneof === 1)
|
105649
|
+
return "messageOneof: multiple values";
|
105650
|
+
properties.messageOneof = 1;
|
105651
|
+
{
|
105652
|
+
var error = $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.verify(message.bondExtraAndNominate);
|
105653
|
+
if (error)
|
105654
|
+
return "bondExtraAndNominate." + error;
|
105655
|
+
}
|
105656
|
+
}
|
105830
105657
|
return null;
|
105831
105658
|
};
|
105832
105659
|
|
@@ -105887,6 +105714,11 @@
|
|
105887
105714
|
throw TypeError(".TW.Polkadot.Proto.Staking.rebond: object expected");
|
105888
105715
|
message.rebond = $root.TW.Polkadot.Proto.Staking.Rebond.fromObject(object.rebond);
|
105889
105716
|
}
|
105717
|
+
if (object.bondExtraAndNominate != null) {
|
105718
|
+
if (typeof object.bondExtraAndNominate !== "object")
|
105719
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.bondExtraAndNominate: object expected");
|
105720
|
+
message.bondExtraAndNominate = $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.fromObject(object.bondExtraAndNominate);
|
105721
|
+
}
|
105890
105722
|
return message;
|
105891
105723
|
};
|
105892
105724
|
|
@@ -105948,6 +105780,11 @@
|
|
105948
105780
|
if (options.oneofs)
|
105949
105781
|
object.messageOneof = "rebond";
|
105950
105782
|
}
|
105783
|
+
if (message.bondExtraAndNominate != null && message.hasOwnProperty("bondExtraAndNominate")) {
|
105784
|
+
object.bondExtraAndNominate = $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate.toObject(message.bondExtraAndNominate, options);
|
105785
|
+
if (options.oneofs)
|
105786
|
+
object.messageOneof = "bondExtraAndNominate";
|
105787
|
+
}
|
105951
105788
|
return object;
|
105952
105789
|
};
|
105953
105790
|
|
@@ -106569,6 +106406,294 @@
|
|
106569
106406
|
return BondAndNominate;
|
106570
106407
|
})();
|
106571
106408
|
|
106409
|
+
Staking.BondExtraAndNominate = (function() {
|
106410
|
+
|
106411
|
+
/**
|
106412
|
+
* Properties of a BondExtraAndNominate.
|
106413
|
+
* @memberof TW.Polkadot.Proto.Staking
|
106414
|
+
* @interface IBondExtraAndNominate
|
106415
|
+
* @property {Uint8Array|null} [value] BondExtraAndNominate value
|
106416
|
+
* @property {Array.<string>|null} [nominators] BondExtraAndNominate nominators
|
106417
|
+
* @property {TW.Polkadot.Proto.ICallIndices|null} [callIndices] BondExtraAndNominate callIndices
|
106418
|
+
* @property {TW.Polkadot.Proto.ICallIndices|null} [bondExtraCallIndices] BondExtraAndNominate bondExtraCallIndices
|
106419
|
+
* @property {TW.Polkadot.Proto.ICallIndices|null} [nominateCallIndices] BondExtraAndNominate nominateCallIndices
|
106420
|
+
*/
|
106421
|
+
|
106422
|
+
/**
|
106423
|
+
* Constructs a new BondExtraAndNominate.
|
106424
|
+
* @memberof TW.Polkadot.Proto.Staking
|
106425
|
+
* @classdesc Represents a BondExtraAndNominate.
|
106426
|
+
* @implements IBondExtraAndNominate
|
106427
|
+
* @constructor
|
106428
|
+
* @param {TW.Polkadot.Proto.Staking.IBondExtraAndNominate=} [properties] Properties to set
|
106429
|
+
*/
|
106430
|
+
function BondExtraAndNominate(properties) {
|
106431
|
+
this.nominators = [];
|
106432
|
+
if (properties)
|
106433
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
106434
|
+
if (properties[keys[i]] != null)
|
106435
|
+
this[keys[i]] = properties[keys[i]];
|
106436
|
+
}
|
106437
|
+
|
106438
|
+
/**
|
106439
|
+
* BondExtraAndNominate value.
|
106440
|
+
* @member {Uint8Array} value
|
106441
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106442
|
+
* @instance
|
106443
|
+
*/
|
106444
|
+
BondExtraAndNominate.prototype.value = $util.newBuffer([]);
|
106445
|
+
|
106446
|
+
/**
|
106447
|
+
* BondExtraAndNominate nominators.
|
106448
|
+
* @member {Array.<string>} nominators
|
106449
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106450
|
+
* @instance
|
106451
|
+
*/
|
106452
|
+
BondExtraAndNominate.prototype.nominators = $util.emptyArray;
|
106453
|
+
|
106454
|
+
/**
|
106455
|
+
* BondExtraAndNominate callIndices.
|
106456
|
+
* @member {TW.Polkadot.Proto.ICallIndices|null|undefined} callIndices
|
106457
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106458
|
+
* @instance
|
106459
|
+
*/
|
106460
|
+
BondExtraAndNominate.prototype.callIndices = null;
|
106461
|
+
|
106462
|
+
/**
|
106463
|
+
* BondExtraAndNominate bondExtraCallIndices.
|
106464
|
+
* @member {TW.Polkadot.Proto.ICallIndices|null|undefined} bondExtraCallIndices
|
106465
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106466
|
+
* @instance
|
106467
|
+
*/
|
106468
|
+
BondExtraAndNominate.prototype.bondExtraCallIndices = null;
|
106469
|
+
|
106470
|
+
/**
|
106471
|
+
* BondExtraAndNominate nominateCallIndices.
|
106472
|
+
* @member {TW.Polkadot.Proto.ICallIndices|null|undefined} nominateCallIndices
|
106473
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106474
|
+
* @instance
|
106475
|
+
*/
|
106476
|
+
BondExtraAndNominate.prototype.nominateCallIndices = null;
|
106477
|
+
|
106478
|
+
/**
|
106479
|
+
* Creates a new BondExtraAndNominate instance using the specified properties.
|
106480
|
+
* @function create
|
106481
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106482
|
+
* @static
|
106483
|
+
* @param {TW.Polkadot.Proto.Staking.IBondExtraAndNominate=} [properties] Properties to set
|
106484
|
+
* @returns {TW.Polkadot.Proto.Staking.BondExtraAndNominate} BondExtraAndNominate instance
|
106485
|
+
*/
|
106486
|
+
BondExtraAndNominate.create = function create(properties) {
|
106487
|
+
return new BondExtraAndNominate(properties);
|
106488
|
+
};
|
106489
|
+
|
106490
|
+
/**
|
106491
|
+
* Encodes the specified BondExtraAndNominate message. Does not implicitly {@link TW.Polkadot.Proto.Staking.BondExtraAndNominate.verify|verify} messages.
|
106492
|
+
* @function encode
|
106493
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106494
|
+
* @static
|
106495
|
+
* @param {TW.Polkadot.Proto.Staking.IBondExtraAndNominate} message BondExtraAndNominate message or plain object to encode
|
106496
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
106497
|
+
* @returns {$protobuf.Writer} Writer
|
106498
|
+
*/
|
106499
|
+
BondExtraAndNominate.encode = function encode(message, writer) {
|
106500
|
+
if (!writer)
|
106501
|
+
writer = $Writer.create();
|
106502
|
+
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
106503
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
|
106504
|
+
if (message.nominators != null && message.nominators.length)
|
106505
|
+
for (var i = 0; i < message.nominators.length; ++i)
|
106506
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.nominators[i]);
|
106507
|
+
if (message.callIndices != null && Object.hasOwnProperty.call(message, "callIndices"))
|
106508
|
+
$root.TW.Polkadot.Proto.CallIndices.encode(message.callIndices, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
106509
|
+
if (message.bondExtraCallIndices != null && Object.hasOwnProperty.call(message, "bondExtraCallIndices"))
|
106510
|
+
$root.TW.Polkadot.Proto.CallIndices.encode(message.bondExtraCallIndices, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
106511
|
+
if (message.nominateCallIndices != null && Object.hasOwnProperty.call(message, "nominateCallIndices"))
|
106512
|
+
$root.TW.Polkadot.Proto.CallIndices.encode(message.nominateCallIndices, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
106513
|
+
return writer;
|
106514
|
+
};
|
106515
|
+
|
106516
|
+
/**
|
106517
|
+
* Decodes a BondExtraAndNominate message from the specified reader or buffer.
|
106518
|
+
* @function decode
|
106519
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106520
|
+
* @static
|
106521
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
106522
|
+
* @param {number} [length] Message length if known beforehand
|
106523
|
+
* @returns {TW.Polkadot.Proto.Staking.BondExtraAndNominate} BondExtraAndNominate
|
106524
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
106525
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
106526
|
+
*/
|
106527
|
+
BondExtraAndNominate.decode = function decode(reader, length) {
|
106528
|
+
if (!(reader instanceof $Reader))
|
106529
|
+
reader = $Reader.create(reader);
|
106530
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate();
|
106531
|
+
while (reader.pos < end) {
|
106532
|
+
var tag = reader.uint32();
|
106533
|
+
switch (tag >>> 3) {
|
106534
|
+
case 1:
|
106535
|
+
message.value = reader.bytes();
|
106536
|
+
break;
|
106537
|
+
case 2:
|
106538
|
+
if (!(message.nominators && message.nominators.length))
|
106539
|
+
message.nominators = [];
|
106540
|
+
message.nominators.push(reader.string());
|
106541
|
+
break;
|
106542
|
+
case 3:
|
106543
|
+
message.callIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
|
106544
|
+
break;
|
106545
|
+
case 4:
|
106546
|
+
message.bondExtraCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
|
106547
|
+
break;
|
106548
|
+
case 5:
|
106549
|
+
message.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
|
106550
|
+
break;
|
106551
|
+
default:
|
106552
|
+
reader.skipType(tag & 7);
|
106553
|
+
break;
|
106554
|
+
}
|
106555
|
+
}
|
106556
|
+
return message;
|
106557
|
+
};
|
106558
|
+
|
106559
|
+
/**
|
106560
|
+
* Verifies a BondExtraAndNominate message.
|
106561
|
+
* @function verify
|
106562
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106563
|
+
* @static
|
106564
|
+
* @param {Object.<string,*>} message Plain object to verify
|
106565
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
106566
|
+
*/
|
106567
|
+
BondExtraAndNominate.verify = function verify(message) {
|
106568
|
+
if (typeof message !== "object" || message === null)
|
106569
|
+
return "object expected";
|
106570
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
106571
|
+
if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
|
106572
|
+
return "value: buffer expected";
|
106573
|
+
if (message.nominators != null && message.hasOwnProperty("nominators")) {
|
106574
|
+
if (!Array.isArray(message.nominators))
|
106575
|
+
return "nominators: array expected";
|
106576
|
+
for (var i = 0; i < message.nominators.length; ++i)
|
106577
|
+
if (!$util.isString(message.nominators[i]))
|
106578
|
+
return "nominators: string[] expected";
|
106579
|
+
}
|
106580
|
+
if (message.callIndices != null && message.hasOwnProperty("callIndices")) {
|
106581
|
+
var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.callIndices);
|
106582
|
+
if (error)
|
106583
|
+
return "callIndices." + error;
|
106584
|
+
}
|
106585
|
+
if (message.bondExtraCallIndices != null && message.hasOwnProperty("bondExtraCallIndices")) {
|
106586
|
+
var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.bondExtraCallIndices);
|
106587
|
+
if (error)
|
106588
|
+
return "bondExtraCallIndices." + error;
|
106589
|
+
}
|
106590
|
+
if (message.nominateCallIndices != null && message.hasOwnProperty("nominateCallIndices")) {
|
106591
|
+
var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.nominateCallIndices);
|
106592
|
+
if (error)
|
106593
|
+
return "nominateCallIndices." + error;
|
106594
|
+
}
|
106595
|
+
return null;
|
106596
|
+
};
|
106597
|
+
|
106598
|
+
/**
|
106599
|
+
* Creates a BondExtraAndNominate message from a plain object. Also converts values to their respective internal types.
|
106600
|
+
* @function fromObject
|
106601
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106602
|
+
* @static
|
106603
|
+
* @param {Object.<string,*>} object Plain object
|
106604
|
+
* @returns {TW.Polkadot.Proto.Staking.BondExtraAndNominate} BondExtraAndNominate
|
106605
|
+
*/
|
106606
|
+
BondExtraAndNominate.fromObject = function fromObject(object) {
|
106607
|
+
if (object instanceof $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate)
|
106608
|
+
return object;
|
106609
|
+
var message = new $root.TW.Polkadot.Proto.Staking.BondExtraAndNominate();
|
106610
|
+
if (object.value != null)
|
106611
|
+
if (typeof object.value === "string")
|
106612
|
+
$util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
|
106613
|
+
else if (object.value.length)
|
106614
|
+
message.value = object.value;
|
106615
|
+
if (object.nominators) {
|
106616
|
+
if (!Array.isArray(object.nominators))
|
106617
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.BondExtraAndNominate.nominators: array expected");
|
106618
|
+
message.nominators = [];
|
106619
|
+
for (var i = 0; i < object.nominators.length; ++i)
|
106620
|
+
message.nominators[i] = String(object.nominators[i]);
|
106621
|
+
}
|
106622
|
+
if (object.callIndices != null) {
|
106623
|
+
if (typeof object.callIndices !== "object")
|
106624
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.BondExtraAndNominate.callIndices: object expected");
|
106625
|
+
message.callIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.callIndices);
|
106626
|
+
}
|
106627
|
+
if (object.bondExtraCallIndices != null) {
|
106628
|
+
if (typeof object.bondExtraCallIndices !== "object")
|
106629
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.BondExtraAndNominate.bondExtraCallIndices: object expected");
|
106630
|
+
message.bondExtraCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.bondExtraCallIndices);
|
106631
|
+
}
|
106632
|
+
if (object.nominateCallIndices != null) {
|
106633
|
+
if (typeof object.nominateCallIndices !== "object")
|
106634
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.BondExtraAndNominate.nominateCallIndices: object expected");
|
106635
|
+
message.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.nominateCallIndices);
|
106636
|
+
}
|
106637
|
+
return message;
|
106638
|
+
};
|
106639
|
+
|
106640
|
+
/**
|
106641
|
+
* Creates a plain object from a BondExtraAndNominate message. Also converts values to other types if specified.
|
106642
|
+
* @function toObject
|
106643
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106644
|
+
* @static
|
106645
|
+
* @param {TW.Polkadot.Proto.Staking.BondExtraAndNominate} message BondExtraAndNominate
|
106646
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
106647
|
+
* @returns {Object.<string,*>} Plain object
|
106648
|
+
*/
|
106649
|
+
BondExtraAndNominate.toObject = function toObject(message, options) {
|
106650
|
+
if (!options)
|
106651
|
+
options = {};
|
106652
|
+
var object = {};
|
106653
|
+
if (options.arrays || options.defaults)
|
106654
|
+
object.nominators = [];
|
106655
|
+
if (options.defaults) {
|
106656
|
+
if (options.bytes === String)
|
106657
|
+
object.value = "";
|
106658
|
+
else {
|
106659
|
+
object.value = [];
|
106660
|
+
if (options.bytes !== Array)
|
106661
|
+
object.value = $util.newBuffer(object.value);
|
106662
|
+
}
|
106663
|
+
object.callIndices = null;
|
106664
|
+
object.bondExtraCallIndices = null;
|
106665
|
+
object.nominateCallIndices = null;
|
106666
|
+
}
|
106667
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
106668
|
+
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;
|
106669
|
+
if (message.nominators && message.nominators.length) {
|
106670
|
+
object.nominators = [];
|
106671
|
+
for (var j = 0; j < message.nominators.length; ++j)
|
106672
|
+
object.nominators[j] = message.nominators[j];
|
106673
|
+
}
|
106674
|
+
if (message.callIndices != null && message.hasOwnProperty("callIndices"))
|
106675
|
+
object.callIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.callIndices, options);
|
106676
|
+
if (message.bondExtraCallIndices != null && message.hasOwnProperty("bondExtraCallIndices"))
|
106677
|
+
object.bondExtraCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.bondExtraCallIndices, options);
|
106678
|
+
if (message.nominateCallIndices != null && message.hasOwnProperty("nominateCallIndices"))
|
106679
|
+
object.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.nominateCallIndices, options);
|
106680
|
+
return object;
|
106681
|
+
};
|
106682
|
+
|
106683
|
+
/**
|
106684
|
+
* Converts this BondExtraAndNominate to JSON.
|
106685
|
+
* @function toJSON
|
106686
|
+
* @memberof TW.Polkadot.Proto.Staking.BondExtraAndNominate
|
106687
|
+
* @instance
|
106688
|
+
* @returns {Object.<string,*>} JSON object
|
106689
|
+
*/
|
106690
|
+
BondExtraAndNominate.prototype.toJSON = function toJSON() {
|
106691
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
106692
|
+
};
|
106693
|
+
|
106694
|
+
return BondExtraAndNominate;
|
106695
|
+
})();
|
106696
|
+
|
106572
106697
|
Staking.BondExtra = (function() {
|
106573
106698
|
|
106574
106699
|
/**
|
@@ -144734,6 +144859,7 @@
|
|
144734
144859
|
* @property {TW.Tron.Proto.ITransaction|null} [transaction] SigningInput transaction
|
144735
144860
|
* @property {Uint8Array|null} [privateKey] SigningInput privateKey
|
144736
144861
|
* @property {string|null} [txId] SigningInput txId
|
144862
|
+
* @property {string|null} [rawJson] SigningInput rawJson
|
144737
144863
|
*/
|
144738
144864
|
|
144739
144865
|
/**
|
@@ -144775,6 +144901,14 @@
|
|
144775
144901
|
*/
|
144776
144902
|
SigningInput.prototype.txId = "";
|
144777
144903
|
|
144904
|
+
/**
|
144905
|
+
* SigningInput rawJson.
|
144906
|
+
* @member {string} rawJson
|
144907
|
+
* @memberof TW.Tron.Proto.SigningInput
|
144908
|
+
* @instance
|
144909
|
+
*/
|
144910
|
+
SigningInput.prototype.rawJson = "";
|
144911
|
+
|
144778
144912
|
/**
|
144779
144913
|
* Creates a new SigningInput instance using the specified properties.
|
144780
144914
|
* @function create
|
@@ -144805,6 +144939,8 @@
|
|
144805
144939
|
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.privateKey);
|
144806
144940
|
if (message.txId != null && Object.hasOwnProperty.call(message, "txId"))
|
144807
144941
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.txId);
|
144942
|
+
if (message.rawJson != null && Object.hasOwnProperty.call(message, "rawJson"))
|
144943
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.rawJson);
|
144808
144944
|
return writer;
|
144809
144945
|
};
|
144810
144946
|
|
@@ -144835,6 +144971,9 @@
|
|
144835
144971
|
case 3:
|
144836
144972
|
message.txId = reader.string();
|
144837
144973
|
break;
|
144974
|
+
case 4:
|
144975
|
+
message.rawJson = reader.string();
|
144976
|
+
break;
|
144838
144977
|
default:
|
144839
144978
|
reader.skipType(tag & 7);
|
144840
144979
|
break;
|
@@ -144865,6 +145004,9 @@
|
|
144865
145004
|
if (message.txId != null && message.hasOwnProperty("txId"))
|
144866
145005
|
if (!$util.isString(message.txId))
|
144867
145006
|
return "txId: string expected";
|
145007
|
+
if (message.rawJson != null && message.hasOwnProperty("rawJson"))
|
145008
|
+
if (!$util.isString(message.rawJson))
|
145009
|
+
return "rawJson: string expected";
|
144868
145010
|
return null;
|
144869
145011
|
};
|
144870
145012
|
|
@@ -144892,6 +145034,8 @@
|
|
144892
145034
|
message.privateKey = object.privateKey;
|
144893
145035
|
if (object.txId != null)
|
144894
145036
|
message.txId = String(object.txId);
|
145037
|
+
if (object.rawJson != null)
|
145038
|
+
message.rawJson = String(object.rawJson);
|
144895
145039
|
return message;
|
144896
145040
|
};
|
144897
145041
|
|
@@ -144918,6 +145062,7 @@
|
|
144918
145062
|
object.privateKey = $util.newBuffer(object.privateKey);
|
144919
145063
|
}
|
144920
145064
|
object.txId = "";
|
145065
|
+
object.rawJson = "";
|
144921
145066
|
}
|
144922
145067
|
if (message.transaction != null && message.hasOwnProperty("transaction"))
|
144923
145068
|
object.transaction = $root.TW.Tron.Proto.Transaction.toObject(message.transaction, options);
|
@@ -144925,6 +145070,8 @@
|
|
144925
145070
|
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;
|
144926
145071
|
if (message.txId != null && message.hasOwnProperty("txId"))
|
144927
145072
|
object.txId = message.txId;
|
145073
|
+
if (message.rawJson != null && message.hasOwnProperty("rawJson"))
|
145074
|
+
object.rawJson = message.rawJson;
|
144928
145075
|
return object;
|
144929
145076
|
};
|
144930
145077
|
|
package/dist/lib/wallet-core.js
CHANGED
@@ -36,7 +36,7 @@ function $a(a,b){var c=M;return sa||"function"!=typeof WebAssembly.instantiateSt
|
|
36
36
|
function z(a,b){Object.getOwnPropertyDescriptor(g,a)||Object.defineProperty(g,a,{configurable:!0,get:function(){n("Module."+a+" has been replaced with plain "+b+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}
|
37
37
|
function cb(a){return"FS_createPath"===a||"FS_createDataFile"===a||"FS_createPreloadedFile"===a||"FS_unlink"===a||"addRunDependency"===a||"FS_createLazyFile"===a||"FS_createDevice"===a||"removeRunDependency"===a}(function(a,b){"undefined"!==typeof globalThis&&Object.defineProperty(globalThis,a,{configurable:!0,get:function(){ya("`"+a+"` is not longer defined by emscripten. "+b)}})})("buffer","Please use HEAP8.buffer or wasmMemory.buffer");
|
38
38
|
function db(a){Object.getOwnPropertyDescriptor(g,a)||Object.defineProperty(g,a,{configurable:!0,get:function(){var b="'"+a+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";cb(a)&&(b+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");n(b)}})}
|
39
|
-
var eb={
|
39
|
+
var eb={2189556:()=>{if(void 0===g.fa)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.fa=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.fa=a}catch(e){throw"No secure random number generator found";}}},2190278:()=>g.fa()};
|
40
40
|
function qa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function fb(a){for(;0<a.length;)a.shift()(g)}function za(a){assert("number"===typeof a);return"0x"+a.toString(16).padStart(8,"0")}function ya(a){gb||(gb={});gb[a]||(gb[a]=1,w&&(a="warning: "+a),y(a))}var gb,hb=[];function ib(a){var b=hb[a];b||(a>=hb.length&&(hb.length=a+1),hb[a]=b=Ha.get(a));assert(Ha.get(a)==b,"JavaScript-side Wasm function table mirror is out of date!");return b}
|
41
41
|
function jb(a){this.l=a-24;this.Oa=function(b){G[this.l+4>>2]=b};this.Ja=function(b){G[this.l+8>>2]=b};this.Ka=function(){F[this.l>>2]=0};this.Ea=function(){D[this.l+12>>0]=0};this.La=function(){D[this.l+13>>0]=0};this.I=function(b,c){this.Da();this.Oa(b);this.Ja(c);this.Ka();this.Ea();this.La()};this.Da=function(){G[this.l+16>>2]=0}}
|
42
42
|
var kb=0,lb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},mb=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=lb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},nb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},ob=
|
Binary file
|
@@ -93,7 +93,7 @@ export class AsnParser {
|
|
93
93
|
export class Barz {
|
94
94
|
static getCounterfactualAddress(input: Uint8Array | Buffer): string;
|
95
95
|
static getInitCode(factory: string, publicKey: PublicKey, verificationFacet: string, salt: number): Uint8Array;
|
96
|
-
static getFormattedSignature(signature: Uint8Array | Buffer, challenge: Uint8Array | Buffer, authenticatorData: Uint8Array | Buffer,
|
96
|
+
static getFormattedSignature(signature: Uint8Array | Buffer, challenge: Uint8Array | Buffer, authenticatorData: Uint8Array | Buffer, clientDataJson: string): Uint8Array;
|
97
97
|
static getPrefixedMsgHash(msgHash: Uint8Array | Buffer, barzAddress: string, chainId: number): Uint8Array;
|
98
98
|
static getDiamondCutCode(input: Uint8Array | Buffer): Uint8Array;
|
99
99
|
static getAuthorizationHash(chainId: Uint8Array | Buffer, contractAddress: string, nonce: Uint8Array | Buffer): Uint8Array;
|
@@ -490,7 +490,10 @@ export class DerivationPathIndex {
|
|
490
490
|
delete(): void;
|
491
491
|
}
|
492
492
|
export class Ethereum {
|
493
|
+
static addressChecksummed(address: string): string;
|
493
494
|
static eip2645GetPath(ethAddress: string, layer: string, application: string, index: string): string;
|
495
|
+
static eip1014Create2Address(from: string, salt: Uint8Array | Buffer, initCodeHash: Uint8Array | Buffer): string;
|
496
|
+
static eip1967ProxyInitCode(logicAddress: string, data: Uint8Array | Buffer): Uint8Array;
|
494
497
|
}
|
495
498
|
export class EthereumAbi {
|
496
499
|
static decodeContractCall(coin: CoinType, input: Uint8Array | Buffer): Uint8Array;
|