@trustwallet/wallet-core 2.9.2 → 2.9.5
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.
@@ -14452,6 +14452,9 @@ export namespace TW {
|
|
14452
14452
|
|
14453
14453
|
/** SigningOutput signedTransaction */
|
14454
14454
|
signedTransaction?: (Uint8Array|null);
|
14455
|
+
|
14456
|
+
/** SigningOutput hash */
|
14457
|
+
hash?: (Uint8Array|null);
|
14455
14458
|
}
|
14456
14459
|
|
14457
14460
|
/** Represents a SigningOutput. */
|
@@ -14466,6 +14469,9 @@ export namespace TW {
|
|
14466
14469
|
/** SigningOutput signedTransaction. */
|
14467
14470
|
public signedTransaction: Uint8Array;
|
14468
14471
|
|
14472
|
+
/** SigningOutput hash. */
|
14473
|
+
public hash: Uint8Array;
|
14474
|
+
|
14469
14475
|
/**
|
14470
14476
|
* Creates a new SigningOutput instance using the specified properties.
|
14471
14477
|
* @param [properties] Properties to set
|
@@ -17077,6 +17083,9 @@ export namespace TW {
|
|
17077
17083
|
|
17078
17084
|
/** Staking chill */
|
17079
17085
|
chill?: (TW.Polkadot.Proto.Staking.IChill|null);
|
17086
|
+
|
17087
|
+
/** Staking chillAndUnbond */
|
17088
|
+
chillAndUnbond?: (TW.Polkadot.Proto.Staking.IChillAndUnbond|null);
|
17080
17089
|
}
|
17081
17090
|
|
17082
17091
|
/** Represents a Staking. */
|
@@ -17109,8 +17118,11 @@ export namespace TW {
|
|
17109
17118
|
/** Staking chill. */
|
17110
17119
|
public chill?: (TW.Polkadot.Proto.Staking.IChill|null);
|
17111
17120
|
|
17121
|
+
/** Staking chillAndUnbond. */
|
17122
|
+
public chillAndUnbond?: (TW.Polkadot.Proto.Staking.IChillAndUnbond|null);
|
17123
|
+
|
17112
17124
|
/** Staking messageOneof. */
|
17113
|
-
public messageOneof?: ("bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill");
|
17125
|
+
public messageOneof?: ("bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond");
|
17114
17126
|
|
17115
17127
|
/**
|
17116
17128
|
* Creates a new Staking instance using the specified properties.
|
@@ -17636,6 +17648,79 @@ export namespace TW {
|
|
17636
17648
|
public toJSON(): { [k: string]: any };
|
17637
17649
|
}
|
17638
17650
|
|
17651
|
+
/** Properties of a ChillAndUnbond. */
|
17652
|
+
interface IChillAndUnbond {
|
17653
|
+
|
17654
|
+
/** ChillAndUnbond value */
|
17655
|
+
value?: (Uint8Array|null);
|
17656
|
+
}
|
17657
|
+
|
17658
|
+
/** Represents a ChillAndUnbond. */
|
17659
|
+
class ChillAndUnbond implements IChillAndUnbond {
|
17660
|
+
|
17661
|
+
/**
|
17662
|
+
* Constructs a new ChillAndUnbond.
|
17663
|
+
* @param [properties] Properties to set
|
17664
|
+
*/
|
17665
|
+
constructor(properties?: TW.Polkadot.Proto.Staking.IChillAndUnbond);
|
17666
|
+
|
17667
|
+
/** ChillAndUnbond value. */
|
17668
|
+
public value: Uint8Array;
|
17669
|
+
|
17670
|
+
/**
|
17671
|
+
* Creates a new ChillAndUnbond instance using the specified properties.
|
17672
|
+
* @param [properties] Properties to set
|
17673
|
+
* @returns ChillAndUnbond instance
|
17674
|
+
*/
|
17675
|
+
public static create(properties?: TW.Polkadot.Proto.Staking.IChillAndUnbond): TW.Polkadot.Proto.Staking.ChillAndUnbond;
|
17676
|
+
|
17677
|
+
/**
|
17678
|
+
* Encodes the specified ChillAndUnbond message. Does not implicitly {@link TW.Polkadot.Proto.Staking.ChillAndUnbond.verify|verify} messages.
|
17679
|
+
* @param message ChillAndUnbond message or plain object to encode
|
17680
|
+
* @param [writer] Writer to encode to
|
17681
|
+
* @returns Writer
|
17682
|
+
*/
|
17683
|
+
public static encode(message: TW.Polkadot.Proto.Staking.IChillAndUnbond, writer?: $protobuf.Writer): $protobuf.Writer;
|
17684
|
+
|
17685
|
+
/**
|
17686
|
+
* Decodes a ChillAndUnbond message from the specified reader or buffer.
|
17687
|
+
* @param reader Reader or buffer to decode from
|
17688
|
+
* @param [length] Message length if known beforehand
|
17689
|
+
* @returns ChillAndUnbond
|
17690
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
17691
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17692
|
+
*/
|
17693
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Polkadot.Proto.Staking.ChillAndUnbond;
|
17694
|
+
|
17695
|
+
/**
|
17696
|
+
* Verifies a ChillAndUnbond message.
|
17697
|
+
* @param message Plain object to verify
|
17698
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
17699
|
+
*/
|
17700
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
17701
|
+
|
17702
|
+
/**
|
17703
|
+
* Creates a ChillAndUnbond message from a plain object. Also converts values to their respective internal types.
|
17704
|
+
* @param object Plain object
|
17705
|
+
* @returns ChillAndUnbond
|
17706
|
+
*/
|
17707
|
+
public static fromObject(object: { [k: string]: any }): TW.Polkadot.Proto.Staking.ChillAndUnbond;
|
17708
|
+
|
17709
|
+
/**
|
17710
|
+
* Creates a plain object from a ChillAndUnbond message. Also converts values to other types if specified.
|
17711
|
+
* @param message ChillAndUnbond
|
17712
|
+
* @param [options] Conversion options
|
17713
|
+
* @returns Plain object
|
17714
|
+
*/
|
17715
|
+
public static toObject(message: TW.Polkadot.Proto.Staking.ChillAndUnbond, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
17716
|
+
|
17717
|
+
/**
|
17718
|
+
* Converts this ChillAndUnbond to JSON.
|
17719
|
+
* @returns JSON object
|
17720
|
+
*/
|
17721
|
+
public toJSON(): { [k: string]: any };
|
17722
|
+
}
|
17723
|
+
|
17639
17724
|
/** Properties of a Chill. */
|
17640
17725
|
interface IChill {
|
17641
17726
|
}
|
@@ -42351,6 +42351,7 @@
|
|
42351
42351
|
* @memberof TW.NEAR.Proto
|
42352
42352
|
* @interface ISigningOutput
|
42353
42353
|
* @property {Uint8Array|null} [signedTransaction] SigningOutput signedTransaction
|
42354
|
+
* @property {Uint8Array|null} [hash] SigningOutput hash
|
42354
42355
|
*/
|
42355
42356
|
|
42356
42357
|
/**
|
@@ -42376,6 +42377,14 @@
|
|
42376
42377
|
*/
|
42377
42378
|
SigningOutput.prototype.signedTransaction = $util.newBuffer([]);
|
42378
42379
|
|
42380
|
+
/**
|
42381
|
+
* SigningOutput hash.
|
42382
|
+
* @member {Uint8Array} hash
|
42383
|
+
* @memberof TW.NEAR.Proto.SigningOutput
|
42384
|
+
* @instance
|
42385
|
+
*/
|
42386
|
+
SigningOutput.prototype.hash = $util.newBuffer([]);
|
42387
|
+
|
42379
42388
|
/**
|
42380
42389
|
* Creates a new SigningOutput instance using the specified properties.
|
42381
42390
|
* @function create
|
@@ -42402,6 +42411,8 @@
|
|
42402
42411
|
writer = $Writer.create();
|
42403
42412
|
if (message.signedTransaction != null && Object.hasOwnProperty.call(message, "signedTransaction"))
|
42404
42413
|
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signedTransaction);
|
42414
|
+
if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
|
42415
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash);
|
42405
42416
|
return writer;
|
42406
42417
|
};
|
42407
42418
|
|
@@ -42426,6 +42437,9 @@
|
|
42426
42437
|
case 1:
|
42427
42438
|
message.signedTransaction = reader.bytes();
|
42428
42439
|
break;
|
42440
|
+
case 2:
|
42441
|
+
message.hash = reader.bytes();
|
42442
|
+
break;
|
42429
42443
|
default:
|
42430
42444
|
reader.skipType(tag & 7);
|
42431
42445
|
break;
|
@@ -42448,6 +42462,9 @@
|
|
42448
42462
|
if (message.signedTransaction != null && message.hasOwnProperty("signedTransaction"))
|
42449
42463
|
if (!(message.signedTransaction && typeof message.signedTransaction.length === "number" || $util.isString(message.signedTransaction)))
|
42450
42464
|
return "signedTransaction: buffer expected";
|
42465
|
+
if (message.hash != null && message.hasOwnProperty("hash"))
|
42466
|
+
if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash)))
|
42467
|
+
return "hash: buffer expected";
|
42451
42468
|
return null;
|
42452
42469
|
};
|
42453
42470
|
|
@@ -42468,6 +42485,11 @@
|
|
42468
42485
|
$util.base64.decode(object.signedTransaction, message.signedTransaction = $util.newBuffer($util.base64.length(object.signedTransaction)), 0);
|
42469
42486
|
else if (object.signedTransaction.length)
|
42470
42487
|
message.signedTransaction = object.signedTransaction;
|
42488
|
+
if (object.hash != null)
|
42489
|
+
if (typeof object.hash === "string")
|
42490
|
+
$util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0);
|
42491
|
+
else if (object.hash.length)
|
42492
|
+
message.hash = object.hash;
|
42471
42493
|
return message;
|
42472
42494
|
};
|
42473
42495
|
|
@@ -42484,7 +42506,7 @@
|
|
42484
42506
|
if (!options)
|
42485
42507
|
options = {};
|
42486
42508
|
var object = {};
|
42487
|
-
if (options.defaults)
|
42509
|
+
if (options.defaults) {
|
42488
42510
|
if (options.bytes === String)
|
42489
42511
|
object.signedTransaction = "";
|
42490
42512
|
else {
|
@@ -42492,8 +42514,18 @@
|
|
42492
42514
|
if (options.bytes !== Array)
|
42493
42515
|
object.signedTransaction = $util.newBuffer(object.signedTransaction);
|
42494
42516
|
}
|
42517
|
+
if (options.bytes === String)
|
42518
|
+
object.hash = "";
|
42519
|
+
else {
|
42520
|
+
object.hash = [];
|
42521
|
+
if (options.bytes !== Array)
|
42522
|
+
object.hash = $util.newBuffer(object.hash);
|
42523
|
+
}
|
42524
|
+
}
|
42495
42525
|
if (message.signedTransaction != null && message.hasOwnProperty("signedTransaction"))
|
42496
42526
|
object.signedTransaction = options.bytes === String ? $util.base64.encode(message.signedTransaction, 0, message.signedTransaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.signedTransaction) : message.signedTransaction;
|
42527
|
+
if (message.hash != null && message.hasOwnProperty("hash"))
|
42528
|
+
object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash;
|
42497
42529
|
return object;
|
42498
42530
|
};
|
42499
42531
|
|
@@ -49898,6 +49930,7 @@
|
|
49898
49930
|
* @property {TW.Polkadot.Proto.Staking.IWithdrawUnbonded|null} [withdrawUnbonded] Staking withdrawUnbonded
|
49899
49931
|
* @property {TW.Polkadot.Proto.Staking.INominate|null} [nominate] Staking nominate
|
49900
49932
|
* @property {TW.Polkadot.Proto.Staking.IChill|null} [chill] Staking chill
|
49933
|
+
* @property {TW.Polkadot.Proto.Staking.IChillAndUnbond|null} [chillAndUnbond] Staking chillAndUnbond
|
49901
49934
|
*/
|
49902
49935
|
|
49903
49936
|
/**
|
@@ -49971,17 +50004,25 @@
|
|
49971
50004
|
*/
|
49972
50005
|
Staking.prototype.chill = null;
|
49973
50006
|
|
50007
|
+
/**
|
50008
|
+
* Staking chillAndUnbond.
|
50009
|
+
* @member {TW.Polkadot.Proto.Staking.IChillAndUnbond|null|undefined} chillAndUnbond
|
50010
|
+
* @memberof TW.Polkadot.Proto.Staking
|
50011
|
+
* @instance
|
50012
|
+
*/
|
50013
|
+
Staking.prototype.chillAndUnbond = null;
|
50014
|
+
|
49974
50015
|
// OneOf field names bound to virtual getters and setters
|
49975
50016
|
var $oneOfFields;
|
49976
50017
|
|
49977
50018
|
/**
|
49978
50019
|
* Staking messageOneof.
|
49979
|
-
* @member {"bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|undefined} messageOneof
|
50020
|
+
* @member {"bond"|"bondAndNominate"|"bondExtra"|"unbond"|"withdrawUnbonded"|"nominate"|"chill"|"chillAndUnbond"|undefined} messageOneof
|
49980
50021
|
* @memberof TW.Polkadot.Proto.Staking
|
49981
50022
|
* @instance
|
49982
50023
|
*/
|
49983
50024
|
Object.defineProperty(Staking.prototype, "messageOneof", {
|
49984
|
-
get: $util.oneOfGetter($oneOfFields = ["bond", "bondAndNominate", "bondExtra", "unbond", "withdrawUnbonded", "nominate", "chill"]),
|
50025
|
+
get: $util.oneOfGetter($oneOfFields = ["bond", "bondAndNominate", "bondExtra", "unbond", "withdrawUnbonded", "nominate", "chill", "chillAndUnbond"]),
|
49985
50026
|
set: $util.oneOfSetter($oneOfFields)
|
49986
50027
|
});
|
49987
50028
|
|
@@ -50023,6 +50064,8 @@
|
|
50023
50064
|
$root.TW.Polkadot.Proto.Staking.Nominate.encode(message.nominate, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
50024
50065
|
if (message.chill != null && Object.hasOwnProperty.call(message, "chill"))
|
50025
50066
|
$root.TW.Polkadot.Proto.Staking.Chill.encode(message.chill, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
50067
|
+
if (message.chillAndUnbond != null && Object.hasOwnProperty.call(message, "chillAndUnbond"))
|
50068
|
+
$root.TW.Polkadot.Proto.Staking.ChillAndUnbond.encode(message.chillAndUnbond, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
50026
50069
|
return writer;
|
50027
50070
|
};
|
50028
50071
|
|
@@ -50065,6 +50108,9 @@
|
|
50065
50108
|
case 7:
|
50066
50109
|
message.chill = $root.TW.Polkadot.Proto.Staking.Chill.decode(reader, reader.uint32());
|
50067
50110
|
break;
|
50111
|
+
case 8:
|
50112
|
+
message.chillAndUnbond = $root.TW.Polkadot.Proto.Staking.ChillAndUnbond.decode(reader, reader.uint32());
|
50113
|
+
break;
|
50068
50114
|
default:
|
50069
50115
|
reader.skipType(tag & 7);
|
50070
50116
|
break;
|
@@ -50153,6 +50199,16 @@
|
|
50153
50199
|
return "chill." + error;
|
50154
50200
|
}
|
50155
50201
|
}
|
50202
|
+
if (message.chillAndUnbond != null && message.hasOwnProperty("chillAndUnbond")) {
|
50203
|
+
if (properties.messageOneof === 1)
|
50204
|
+
return "messageOneof: multiple values";
|
50205
|
+
properties.messageOneof = 1;
|
50206
|
+
{
|
50207
|
+
var error = $root.TW.Polkadot.Proto.Staking.ChillAndUnbond.verify(message.chillAndUnbond);
|
50208
|
+
if (error)
|
50209
|
+
return "chillAndUnbond." + error;
|
50210
|
+
}
|
50211
|
+
}
|
50156
50212
|
return null;
|
50157
50213
|
};
|
50158
50214
|
|
@@ -50203,6 +50259,11 @@
|
|
50203
50259
|
throw TypeError(".TW.Polkadot.Proto.Staking.chill: object expected");
|
50204
50260
|
message.chill = $root.TW.Polkadot.Proto.Staking.Chill.fromObject(object.chill);
|
50205
50261
|
}
|
50262
|
+
if (object.chillAndUnbond != null) {
|
50263
|
+
if (typeof object.chillAndUnbond !== "object")
|
50264
|
+
throw TypeError(".TW.Polkadot.Proto.Staking.chillAndUnbond: object expected");
|
50265
|
+
message.chillAndUnbond = $root.TW.Polkadot.Proto.Staking.ChillAndUnbond.fromObject(object.chillAndUnbond);
|
50266
|
+
}
|
50206
50267
|
return message;
|
50207
50268
|
};
|
50208
50269
|
|
@@ -50254,6 +50315,11 @@
|
|
50254
50315
|
if (options.oneofs)
|
50255
50316
|
object.messageOneof = "chill";
|
50256
50317
|
}
|
50318
|
+
if (message.chillAndUnbond != null && message.hasOwnProperty("chillAndUnbond")) {
|
50319
|
+
object.chillAndUnbond = $root.TW.Polkadot.Proto.Staking.ChillAndUnbond.toObject(message.chillAndUnbond, options);
|
50320
|
+
if (options.oneofs)
|
50321
|
+
object.messageOneof = "chillAndUnbond";
|
50322
|
+
}
|
50257
50323
|
return object;
|
50258
50324
|
};
|
50259
50325
|
|
@@ -51433,6 +51499,173 @@
|
|
51433
51499
|
return Nominate;
|
51434
51500
|
})();
|
51435
51501
|
|
51502
|
+
Staking.ChillAndUnbond = (function() {
|
51503
|
+
|
51504
|
+
/**
|
51505
|
+
* Properties of a ChillAndUnbond.
|
51506
|
+
* @memberof TW.Polkadot.Proto.Staking
|
51507
|
+
* @interface IChillAndUnbond
|
51508
|
+
* @property {Uint8Array|null} [value] ChillAndUnbond value
|
51509
|
+
*/
|
51510
|
+
|
51511
|
+
/**
|
51512
|
+
* Constructs a new ChillAndUnbond.
|
51513
|
+
* @memberof TW.Polkadot.Proto.Staking
|
51514
|
+
* @classdesc Represents a ChillAndUnbond.
|
51515
|
+
* @implements IChillAndUnbond
|
51516
|
+
* @constructor
|
51517
|
+
* @param {TW.Polkadot.Proto.Staking.IChillAndUnbond=} [properties] Properties to set
|
51518
|
+
*/
|
51519
|
+
function ChillAndUnbond(properties) {
|
51520
|
+
if (properties)
|
51521
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
51522
|
+
if (properties[keys[i]] != null)
|
51523
|
+
this[keys[i]] = properties[keys[i]];
|
51524
|
+
}
|
51525
|
+
|
51526
|
+
/**
|
51527
|
+
* ChillAndUnbond value.
|
51528
|
+
* @member {Uint8Array} value
|
51529
|
+
* @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
|
51530
|
+
* @instance
|
51531
|
+
*/
|
51532
|
+
ChillAndUnbond.prototype.value = $util.newBuffer([]);
|
51533
|
+
|
51534
|
+
/**
|
51535
|
+
* Creates a new ChillAndUnbond instance using the specified properties.
|
51536
|
+
* @function create
|
51537
|
+
* @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
|
51538
|
+
* @static
|
51539
|
+
* @param {TW.Polkadot.Proto.Staking.IChillAndUnbond=} [properties] Properties to set
|
51540
|
+
* @returns {TW.Polkadot.Proto.Staking.ChillAndUnbond} ChillAndUnbond instance
|
51541
|
+
*/
|
51542
|
+
ChillAndUnbond.create = function create(properties) {
|
51543
|
+
return new ChillAndUnbond(properties);
|
51544
|
+
};
|
51545
|
+
|
51546
|
+
/**
|
51547
|
+
* Encodes the specified ChillAndUnbond message. Does not implicitly {@link TW.Polkadot.Proto.Staking.ChillAndUnbond.verify|verify} messages.
|
51548
|
+
* @function encode
|
51549
|
+
* @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
|
51550
|
+
* @static
|
51551
|
+
* @param {TW.Polkadot.Proto.Staking.IChillAndUnbond} message ChillAndUnbond message or plain object to encode
|
51552
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
51553
|
+
* @returns {$protobuf.Writer} Writer
|
51554
|
+
*/
|
51555
|
+
ChillAndUnbond.encode = function encode(message, writer) {
|
51556
|
+
if (!writer)
|
51557
|
+
writer = $Writer.create();
|
51558
|
+
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
51559
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
|
51560
|
+
return writer;
|
51561
|
+
};
|
51562
|
+
|
51563
|
+
/**
|
51564
|
+
* Decodes a ChillAndUnbond message from the specified reader or buffer.
|
51565
|
+
* @function decode
|
51566
|
+
* @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
|
51567
|
+
* @static
|
51568
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
51569
|
+
* @param {number} [length] Message length if known beforehand
|
51570
|
+
* @returns {TW.Polkadot.Proto.Staking.ChillAndUnbond} ChillAndUnbond
|
51571
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
51572
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
51573
|
+
*/
|
51574
|
+
ChillAndUnbond.decode = function decode(reader, length) {
|
51575
|
+
if (!(reader instanceof $Reader))
|
51576
|
+
reader = $Reader.create(reader);
|
51577
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Polkadot.Proto.Staking.ChillAndUnbond();
|
51578
|
+
while (reader.pos < end) {
|
51579
|
+
var tag = reader.uint32();
|
51580
|
+
switch (tag >>> 3) {
|
51581
|
+
case 1:
|
51582
|
+
message.value = reader.bytes();
|
51583
|
+
break;
|
51584
|
+
default:
|
51585
|
+
reader.skipType(tag & 7);
|
51586
|
+
break;
|
51587
|
+
}
|
51588
|
+
}
|
51589
|
+
return message;
|
51590
|
+
};
|
51591
|
+
|
51592
|
+
/**
|
51593
|
+
* Verifies a ChillAndUnbond message.
|
51594
|
+
* @function verify
|
51595
|
+
* @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
|
51596
|
+
* @static
|
51597
|
+
* @param {Object.<string,*>} message Plain object to verify
|
51598
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
51599
|
+
*/
|
51600
|
+
ChillAndUnbond.verify = function verify(message) {
|
51601
|
+
if (typeof message !== "object" || message === null)
|
51602
|
+
return "object expected";
|
51603
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
51604
|
+
if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
|
51605
|
+
return "value: buffer expected";
|
51606
|
+
return null;
|
51607
|
+
};
|
51608
|
+
|
51609
|
+
/**
|
51610
|
+
* Creates a ChillAndUnbond message from a plain object. Also converts values to their respective internal types.
|
51611
|
+
* @function fromObject
|
51612
|
+
* @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
|
51613
|
+
* @static
|
51614
|
+
* @param {Object.<string,*>} object Plain object
|
51615
|
+
* @returns {TW.Polkadot.Proto.Staking.ChillAndUnbond} ChillAndUnbond
|
51616
|
+
*/
|
51617
|
+
ChillAndUnbond.fromObject = function fromObject(object) {
|
51618
|
+
if (object instanceof $root.TW.Polkadot.Proto.Staking.ChillAndUnbond)
|
51619
|
+
return object;
|
51620
|
+
var message = new $root.TW.Polkadot.Proto.Staking.ChillAndUnbond();
|
51621
|
+
if (object.value != null)
|
51622
|
+
if (typeof object.value === "string")
|
51623
|
+
$util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
|
51624
|
+
else if (object.value.length)
|
51625
|
+
message.value = object.value;
|
51626
|
+
return message;
|
51627
|
+
};
|
51628
|
+
|
51629
|
+
/**
|
51630
|
+
* Creates a plain object from a ChillAndUnbond message. Also converts values to other types if specified.
|
51631
|
+
* @function toObject
|
51632
|
+
* @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
|
51633
|
+
* @static
|
51634
|
+
* @param {TW.Polkadot.Proto.Staking.ChillAndUnbond} message ChillAndUnbond
|
51635
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
51636
|
+
* @returns {Object.<string,*>} Plain object
|
51637
|
+
*/
|
51638
|
+
ChillAndUnbond.toObject = function toObject(message, options) {
|
51639
|
+
if (!options)
|
51640
|
+
options = {};
|
51641
|
+
var object = {};
|
51642
|
+
if (options.defaults)
|
51643
|
+
if (options.bytes === String)
|
51644
|
+
object.value = "";
|
51645
|
+
else {
|
51646
|
+
object.value = [];
|
51647
|
+
if (options.bytes !== Array)
|
51648
|
+
object.value = $util.newBuffer(object.value);
|
51649
|
+
}
|
51650
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
51651
|
+
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;
|
51652
|
+
return object;
|
51653
|
+
};
|
51654
|
+
|
51655
|
+
/**
|
51656
|
+
* Converts this ChillAndUnbond to JSON.
|
51657
|
+
* @function toJSON
|
51658
|
+
* @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
|
51659
|
+
* @instance
|
51660
|
+
* @returns {Object.<string,*>} JSON object
|
51661
|
+
*/
|
51662
|
+
ChillAndUnbond.prototype.toJSON = function toJSON() {
|
51663
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
51664
|
+
};
|
51665
|
+
|
51666
|
+
return ChillAndUnbond;
|
51667
|
+
})();
|
51668
|
+
|
51436
51669
|
Staking.Chill = (function() {
|
51437
51670
|
|
51438
51671
|
/**
|
@@ -0,0 +1,638 @@
|
|
1
|
+
// Copyright © 2017-2022 Trust Wallet.
|
2
|
+
//
|
3
|
+
// This file is part of Trust. The full Trust copyright notice, including
|
4
|
+
// terms governing use, modification, and redistribution, is contained in the
|
5
|
+
// file LICENSE at the root of the source code distribution tree.
|
6
|
+
//
|
7
|
+
// This is a GENERATED FILE, changes made here WILL BE LOST.
|
8
|
+
//
|
9
|
+
export class AnySigner {
|
10
|
+
static sign(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
11
|
+
static plan(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
12
|
+
static supportsJSON(coin: CoinType): boolean;
|
13
|
+
}
|
14
|
+
export namespace HexCoding {
|
15
|
+
export function decode(hex: string): Uint8Array;
|
16
|
+
export function encode(buffer: Uint8Array | Buffer): string;
|
17
|
+
}
|
18
|
+
export class HDWallet {
|
19
|
+
static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
|
20
|
+
static create(strength: number, passphrase: string): HDWallet;
|
21
|
+
static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
|
22
|
+
static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
|
23
|
+
static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
|
24
|
+
seed(): Uint8Array;
|
25
|
+
mnemonic(): string;
|
26
|
+
entropy(): Uint8Array;
|
27
|
+
getMasterKey(curve: Curve): PrivateKey;
|
28
|
+
getKeyForCoin(coin: CoinType): PrivateKey;
|
29
|
+
getAddressForCoin(coin: CoinType): string;
|
30
|
+
getKey(coin: CoinType, derivationPath: string): PrivateKey;
|
31
|
+
getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
|
32
|
+
getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
33
|
+
getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
34
|
+
getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, version: HDVersion, account: number): string;
|
35
|
+
getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, version: HDVersion, account: number): string;
|
36
|
+
delete(): void;
|
37
|
+
}
|
38
|
+
export class SolanaAddress {
|
39
|
+
static createWithString(string: string): SolanaAddress;
|
40
|
+
description(): string;
|
41
|
+
defaultTokenAddress(tokenMintAddress: string): string;
|
42
|
+
delete(): void;
|
43
|
+
}
|
44
|
+
export class PrivateKey {
|
45
|
+
static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
|
46
|
+
static create(): PrivateKey;
|
47
|
+
static createWithData(data: Uint8Array | Buffer): PrivateKey;
|
48
|
+
static createCopy(key: PrivateKey): PrivateKey;
|
49
|
+
data(): Uint8Array;
|
50
|
+
getPublicKeySecp256k1(compressed: boolean): PublicKey;
|
51
|
+
getPublicKeyNist256p1(): PublicKey;
|
52
|
+
getPublicKeyEd25519(): PublicKey;
|
53
|
+
getPublicKeyEd25519Blake2b(): PublicKey;
|
54
|
+
getPublicKeyEd25519Extended(): PublicKey;
|
55
|
+
getPublicKeyCurve25519(): PublicKey;
|
56
|
+
getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
|
57
|
+
sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
58
|
+
signAsDER(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
59
|
+
signSchnorr(message: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
60
|
+
delete(): void;
|
61
|
+
}
|
62
|
+
export class BitcoinScript {
|
63
|
+
static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
|
64
|
+
static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
|
65
|
+
static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
66
|
+
static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
67
|
+
static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
68
|
+
static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
69
|
+
static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
|
70
|
+
static hashTypeForCoin(coinType: CoinType): number;
|
71
|
+
static create(): BitcoinScript;
|
72
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinScript;
|
73
|
+
static createCopy(script: BitcoinScript): BitcoinScript;
|
74
|
+
size(): number;
|
75
|
+
data(): Uint8Array;
|
76
|
+
scriptHash(): Uint8Array;
|
77
|
+
isPayToScriptHash(): boolean;
|
78
|
+
isPayToWitnessScriptHash(): boolean;
|
79
|
+
isPayToWitnessPublicKeyHash(): boolean;
|
80
|
+
isWitnessProgram(): boolean;
|
81
|
+
matchPayToPubkey(): Uint8Array;
|
82
|
+
matchPayToPubkeyHash(): Uint8Array;
|
83
|
+
matchPayToScriptHash(): Uint8Array;
|
84
|
+
matchPayToWitnessPublicKeyHash(): Uint8Array;
|
85
|
+
matchPayToWitnessScriptHash(): Uint8Array;
|
86
|
+
encode(): Uint8Array;
|
87
|
+
delete(): void;
|
88
|
+
}
|
89
|
+
export class Derivation {
|
90
|
+
value: number;
|
91
|
+
static default: Derivation;
|
92
|
+
static custom: Derivation;
|
93
|
+
static bitcoinSegwit: Derivation;
|
94
|
+
static bitcoinLegacy: Derivation;
|
95
|
+
static litecoinLegacy: Derivation;
|
96
|
+
static solanaSolana: Derivation;
|
97
|
+
}
|
98
|
+
export class AnyAddress {
|
99
|
+
static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
|
100
|
+
static isValid(string: string, coin: CoinType): boolean;
|
101
|
+
static createWithString(string: string, coin: CoinType): AnyAddress;
|
102
|
+
static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
|
103
|
+
description(): string;
|
104
|
+
coin(): CoinType;
|
105
|
+
data(): Uint8Array;
|
106
|
+
delete(): void;
|
107
|
+
}
|
108
|
+
export class Account {
|
109
|
+
static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
|
110
|
+
address(): string;
|
111
|
+
derivation(): Derivation;
|
112
|
+
derivationPath(): string;
|
113
|
+
publicKey(): string;
|
114
|
+
extendedPublicKey(): string;
|
115
|
+
coin(): CoinType;
|
116
|
+
delete(): void;
|
117
|
+
}
|
118
|
+
export class DataVector {
|
119
|
+
static create(): DataVector;
|
120
|
+
static createWithData(data: Uint8Array | Buffer): DataVector;
|
121
|
+
size(): number;
|
122
|
+
add(data: Uint8Array | Buffer): void;
|
123
|
+
get(index: number): Uint8Array;
|
124
|
+
delete(): void;
|
125
|
+
}
|
126
|
+
export class Curve {
|
127
|
+
value: number;
|
128
|
+
static secp256k1: Curve;
|
129
|
+
static ed25519: Curve;
|
130
|
+
static ed25519Blake2bNano: Curve;
|
131
|
+
static curve25519: Curve;
|
132
|
+
static nist256p1: Curve;
|
133
|
+
static ed25519Extended: Curve;
|
134
|
+
}
|
135
|
+
|
136
|
+
declare function describeCurve(value: Curve): string;
|
137
|
+
|
138
|
+
export class RippleXAddress {
|
139
|
+
static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
|
140
|
+
static isValidString(string: string): boolean;
|
141
|
+
static createWithString(string: string): RippleXAddress;
|
142
|
+
static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
|
143
|
+
description(): string;
|
144
|
+
tag(): number;
|
145
|
+
delete(): void;
|
146
|
+
}
|
147
|
+
export class EthereumAbiValue {
|
148
|
+
static encodeBool(value: boolean): Uint8Array;
|
149
|
+
static encodeInt32(value: number): Uint8Array;
|
150
|
+
static encodeUInt32(value: number): Uint8Array;
|
151
|
+
static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
|
152
|
+
static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
|
153
|
+
static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
|
154
|
+
static encodeString(value: string): Uint8Array;
|
155
|
+
static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
|
156
|
+
static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
|
157
|
+
static decodeUInt256(input: Uint8Array | Buffer): string;
|
158
|
+
static decodeValue(input: Uint8Array | Buffer, type: string): string;
|
159
|
+
static decodeArray(input: Uint8Array | Buffer, type: string): string;
|
160
|
+
}
|
161
|
+
export class TransactionCompiler {
|
162
|
+
static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
|
163
|
+
static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
|
164
|
+
static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
|
165
|
+
}
|
166
|
+
export class AESPaddingMode {
|
167
|
+
value: number;
|
168
|
+
static zero: AESPaddingMode;
|
169
|
+
static pkcs7: AESPaddingMode;
|
170
|
+
}
|
171
|
+
export class EthereumAbi {
|
172
|
+
static encode(fn: EthereumAbiFunction): Uint8Array;
|
173
|
+
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
174
|
+
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
175
|
+
static encodeTyped(messageJson: string): Uint8Array;
|
176
|
+
}
|
177
|
+
export class PBKDF2 {
|
178
|
+
static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
179
|
+
static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
180
|
+
}
|
181
|
+
export class FIOAccount {
|
182
|
+
static createWithString(string: string): FIOAccount;
|
183
|
+
description(): string;
|
184
|
+
delete(): void;
|
185
|
+
}
|
186
|
+
export class HRP {
|
187
|
+
value: number;
|
188
|
+
static unknown: HRP;
|
189
|
+
static bitcoin: HRP;
|
190
|
+
static litecoin: HRP;
|
191
|
+
static viacoin: HRP;
|
192
|
+
static groestlcoin: HRP;
|
193
|
+
static digiByte: HRP;
|
194
|
+
static monacoin: HRP;
|
195
|
+
static cosmos: HRP;
|
196
|
+
static bitcoinCash: HRP;
|
197
|
+
static bitcoinGold: HRP;
|
198
|
+
static ioTeX: HRP;
|
199
|
+
static zilliqa: HRP;
|
200
|
+
static terra: HRP;
|
201
|
+
static cryptoOrg: HRP;
|
202
|
+
static kava: HRP;
|
203
|
+
static oasis: HRP;
|
204
|
+
static bluzelle: HRP;
|
205
|
+
static bandChain: HRP;
|
206
|
+
static elrond: HRP;
|
207
|
+
static binance: HRP;
|
208
|
+
static ecash: HRP;
|
209
|
+
static thorchain: HRP;
|
210
|
+
static harmony: HRP;
|
211
|
+
static cardano: HRP;
|
212
|
+
static qtum: HRP;
|
213
|
+
static osmosis: HRP;
|
214
|
+
static nativeEvmos: HRP;
|
215
|
+
}
|
216
|
+
|
217
|
+
declare function describeHRP(value: HRP): string;
|
218
|
+
|
219
|
+
export class AES {
|
220
|
+
static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
221
|
+
static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
222
|
+
static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
223
|
+
static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
224
|
+
}
|
225
|
+
export class SS58AddressType {
|
226
|
+
value: number;
|
227
|
+
static polkadot: SS58AddressType;
|
228
|
+
static kusama: SS58AddressType;
|
229
|
+
}
|
230
|
+
export class THORChainSwap {
|
231
|
+
static buildSwap(input: Uint8Array | Buffer): Uint8Array;
|
232
|
+
}
|
233
|
+
export class Blockchain {
|
234
|
+
value: number;
|
235
|
+
static bitcoin: Blockchain;
|
236
|
+
static ethereum: Blockchain;
|
237
|
+
static vechain: Blockchain;
|
238
|
+
static tron: Blockchain;
|
239
|
+
static icon: Blockchain;
|
240
|
+
static binance: Blockchain;
|
241
|
+
static ripple: Blockchain;
|
242
|
+
static tezos: Blockchain;
|
243
|
+
static nimiq: Blockchain;
|
244
|
+
static stellar: Blockchain;
|
245
|
+
static aion: Blockchain;
|
246
|
+
static cosmos: Blockchain;
|
247
|
+
static theta: Blockchain;
|
248
|
+
static ontology: Blockchain;
|
249
|
+
static zilliqa: Blockchain;
|
250
|
+
static ioTeX: Blockchain;
|
251
|
+
static eos: Blockchain;
|
252
|
+
static nano: Blockchain;
|
253
|
+
static nuls: Blockchain;
|
254
|
+
static waves: Blockchain;
|
255
|
+
static aeternity: Blockchain;
|
256
|
+
static nebulas: Blockchain;
|
257
|
+
static fio: Blockchain;
|
258
|
+
static solana: Blockchain;
|
259
|
+
static harmony: Blockchain;
|
260
|
+
static near: Blockchain;
|
261
|
+
static algorand: Blockchain;
|
262
|
+
static polkadot: Blockchain;
|
263
|
+
static cardano: Blockchain;
|
264
|
+
static neo: Blockchain;
|
265
|
+
static filecoin: Blockchain;
|
266
|
+
static elrondNetwork: Blockchain;
|
267
|
+
static oasisNetwork: Blockchain;
|
268
|
+
static decred: Blockchain;
|
269
|
+
static zcash: Blockchain;
|
270
|
+
static groestlcoin: Blockchain;
|
271
|
+
static thorchain: Blockchain;
|
272
|
+
static ronin: Blockchain;
|
273
|
+
static kusama: Blockchain;
|
274
|
+
}
|
275
|
+
export class GroestlcoinAddress {
|
276
|
+
static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
|
277
|
+
static isValidString(string: string): boolean;
|
278
|
+
static createWithString(string: string): GroestlcoinAddress;
|
279
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
|
280
|
+
description(): string;
|
281
|
+
delete(): void;
|
282
|
+
}
|
283
|
+
export class HDVersion {
|
284
|
+
value: number;
|
285
|
+
static none: HDVersion;
|
286
|
+
static xpub: HDVersion;
|
287
|
+
static xprv: HDVersion;
|
288
|
+
static ypub: HDVersion;
|
289
|
+
static yprv: HDVersion;
|
290
|
+
static zpub: HDVersion;
|
291
|
+
static zprv: HDVersion;
|
292
|
+
static ltub: HDVersion;
|
293
|
+
static ltpv: HDVersion;
|
294
|
+
static mtub: HDVersion;
|
295
|
+
static mtpv: HDVersion;
|
296
|
+
static dpub: HDVersion;
|
297
|
+
static dprv: HDVersion;
|
298
|
+
static dgub: HDVersion;
|
299
|
+
static dgpv: HDVersion;
|
300
|
+
}
|
301
|
+
export class PublicKeyType {
|
302
|
+
value: number;
|
303
|
+
static secp256k1: PublicKeyType;
|
304
|
+
static secp256k1Extended: PublicKeyType;
|
305
|
+
static nist256p1: PublicKeyType;
|
306
|
+
static nist256p1Extended: PublicKeyType;
|
307
|
+
static ed25519: PublicKeyType;
|
308
|
+
static ed25519Blake2b: PublicKeyType;
|
309
|
+
static curve25519: PublicKeyType;
|
310
|
+
static ed25519Extended: PublicKeyType;
|
311
|
+
}
|
312
|
+
export class Hash {
|
313
|
+
static sha1(data: Uint8Array | Buffer): Uint8Array;
|
314
|
+
static sha256(data: Uint8Array | Buffer): Uint8Array;
|
315
|
+
static sha512(data: Uint8Array | Buffer): Uint8Array;
|
316
|
+
static sha512_256(data: Uint8Array | Buffer): Uint8Array;
|
317
|
+
static keccak256(data: Uint8Array | Buffer): Uint8Array;
|
318
|
+
static keccak512(data: Uint8Array | Buffer): Uint8Array;
|
319
|
+
static sha3_256(data: Uint8Array | Buffer): Uint8Array;
|
320
|
+
static sha3_512(data: Uint8Array | Buffer): Uint8Array;
|
321
|
+
static ripemd(data: Uint8Array | Buffer): Uint8Array;
|
322
|
+
static blake256(data: Uint8Array | Buffer): Uint8Array;
|
323
|
+
static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
|
324
|
+
static groestl512(data: Uint8Array | Buffer): Uint8Array;
|
325
|
+
static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
|
326
|
+
static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
327
|
+
static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
328
|
+
static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
|
329
|
+
static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
330
|
+
static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
|
331
|
+
}
|
332
|
+
export class Cardano {
|
333
|
+
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
334
|
+
}
|
335
|
+
export class StellarVersionByte {
|
336
|
+
value: number;
|
337
|
+
static accountID: StellarVersionByte;
|
338
|
+
static seed: StellarVersionByte;
|
339
|
+
static preAuthTX: StellarVersionByte;
|
340
|
+
static sha256Hash: StellarVersionByte;
|
341
|
+
}
|
342
|
+
export class StellarPassphrase {
|
343
|
+
value: number;
|
344
|
+
static stellar: StellarPassphrase;
|
345
|
+
static kin: StellarPassphrase;
|
346
|
+
}
|
347
|
+
|
348
|
+
declare function describeStellarPassphrase(value: StellarPassphrase): string;
|
349
|
+
|
350
|
+
export class CoinType {
|
351
|
+
value: number;
|
352
|
+
static aeternity: CoinType;
|
353
|
+
static aion: CoinType;
|
354
|
+
static binance: CoinType;
|
355
|
+
static bitcoin: CoinType;
|
356
|
+
static bitcoinCash: CoinType;
|
357
|
+
static bitcoinGold: CoinType;
|
358
|
+
static callisto: CoinType;
|
359
|
+
static cardano: CoinType;
|
360
|
+
static cosmos: CoinType;
|
361
|
+
static dash: CoinType;
|
362
|
+
static decred: CoinType;
|
363
|
+
static digiByte: CoinType;
|
364
|
+
static dogecoin: CoinType;
|
365
|
+
static eos: CoinType;
|
366
|
+
static ethereum: CoinType;
|
367
|
+
static ethereumClassic: CoinType;
|
368
|
+
static fio: CoinType;
|
369
|
+
static goChain: CoinType;
|
370
|
+
static groestlcoin: CoinType;
|
371
|
+
static icon: CoinType;
|
372
|
+
static ioTeX: CoinType;
|
373
|
+
static kava: CoinType;
|
374
|
+
static kin: CoinType;
|
375
|
+
static litecoin: CoinType;
|
376
|
+
static monacoin: CoinType;
|
377
|
+
static nebulas: CoinType;
|
378
|
+
static nuls: CoinType;
|
379
|
+
static nano: CoinType;
|
380
|
+
static near: CoinType;
|
381
|
+
static nimiq: CoinType;
|
382
|
+
static ontology: CoinType;
|
383
|
+
static poanetwork: CoinType;
|
384
|
+
static qtum: CoinType;
|
385
|
+
static xrp: CoinType;
|
386
|
+
static solana: CoinType;
|
387
|
+
static stellar: CoinType;
|
388
|
+
static tezos: CoinType;
|
389
|
+
static theta: CoinType;
|
390
|
+
static thunderToken: CoinType;
|
391
|
+
static neo: CoinType;
|
392
|
+
static tomoChain: CoinType;
|
393
|
+
static tron: CoinType;
|
394
|
+
static veChain: CoinType;
|
395
|
+
static viacoin: CoinType;
|
396
|
+
static wanchain: CoinType;
|
397
|
+
static zcash: CoinType;
|
398
|
+
static firo: CoinType;
|
399
|
+
static zilliqa: CoinType;
|
400
|
+
static zelcash: CoinType;
|
401
|
+
static ravencoin: CoinType;
|
402
|
+
static waves: CoinType;
|
403
|
+
static terra: CoinType;
|
404
|
+
static harmony: CoinType;
|
405
|
+
static algorand: CoinType;
|
406
|
+
static kusama: CoinType;
|
407
|
+
static polkadot: CoinType;
|
408
|
+
static filecoin: CoinType;
|
409
|
+
static elrond: CoinType;
|
410
|
+
static bandChain: CoinType;
|
411
|
+
static smartChainLegacy: CoinType;
|
412
|
+
static smartChain: CoinType;
|
413
|
+
static oasis: CoinType;
|
414
|
+
static polygon: CoinType;
|
415
|
+
static thorchain: CoinType;
|
416
|
+
static bluzelle: CoinType;
|
417
|
+
static optimism: CoinType;
|
418
|
+
static arbitrum: CoinType;
|
419
|
+
static ecochain: CoinType;
|
420
|
+
static avalancheCChain: CoinType;
|
421
|
+
static xdai: CoinType;
|
422
|
+
static fantom: CoinType;
|
423
|
+
static cryptoOrg: CoinType;
|
424
|
+
static celo: CoinType;
|
425
|
+
static ronin: CoinType;
|
426
|
+
static osmosis: CoinType;
|
427
|
+
static ecash: CoinType;
|
428
|
+
static cronosChain: CoinType;
|
429
|
+
static smartBitcoinCash: CoinType;
|
430
|
+
static kuCoinCommunityChain: CoinType;
|
431
|
+
static boba: CoinType;
|
432
|
+
static metis: CoinType;
|
433
|
+
static aurora: CoinType;
|
434
|
+
static evmos: CoinType;
|
435
|
+
static nativeEvmos: CoinType;
|
436
|
+
static moonriver: CoinType;
|
437
|
+
static moonbeam: CoinType;
|
438
|
+
static klaytn: CoinType;
|
439
|
+
}
|
440
|
+
export class StoredKeyEncryptionLevel {
|
441
|
+
value: number;
|
442
|
+
static default: StoredKeyEncryptionLevel;
|
443
|
+
static minimal: StoredKeyEncryptionLevel;
|
444
|
+
static weak: StoredKeyEncryptionLevel;
|
445
|
+
static standard: StoredKeyEncryptionLevel;
|
446
|
+
}
|
447
|
+
export class EthereumAbiFunction {
|
448
|
+
static createWithString(name: string): EthereumAbiFunction;
|
449
|
+
getType(): string;
|
450
|
+
addParamUInt8(val: number, isOutput: boolean): number;
|
451
|
+
addParamUInt16(val: number, isOutput: boolean): number;
|
452
|
+
addParamUInt32(val: number, isOutput: boolean): number;
|
453
|
+
addParamUInt64(val: number, isOutput: boolean): number;
|
454
|
+
addParamUInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
455
|
+
addParamUIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
456
|
+
addParamInt8(val: number, isOutput: boolean): number;
|
457
|
+
addParamInt16(val: number, isOutput: boolean): number;
|
458
|
+
addParamInt32(val: number, isOutput: boolean): number;
|
459
|
+
addParamInt64(val: number, isOutput: boolean): number;
|
460
|
+
addParamInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
461
|
+
addParamIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
462
|
+
addParamBool(val: boolean, isOutput: boolean): number;
|
463
|
+
addParamString(val: string, isOutput: boolean): number;
|
464
|
+
addParamAddress(val: Uint8Array | Buffer, isOutput: boolean): number;
|
465
|
+
addParamBytes(val: Uint8Array | Buffer, isOutput: boolean): number;
|
466
|
+
addParamBytesFix(size: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
467
|
+
addParamArray(isOutput: boolean): number;
|
468
|
+
getParamUInt8(idx: number, isOutput: boolean): number;
|
469
|
+
getParamUInt64(idx: number, isOutput: boolean): number;
|
470
|
+
getParamUInt256(idx: number, isOutput: boolean): Uint8Array;
|
471
|
+
getParamBool(idx: number, isOutput: boolean): boolean;
|
472
|
+
getParamString(idx: number, isOutput: boolean): string;
|
473
|
+
getParamAddress(idx: number, isOutput: boolean): Uint8Array;
|
474
|
+
addInArrayParamUInt8(arrayIdx: number, val: number): number;
|
475
|
+
addInArrayParamUInt16(arrayIdx: number, val: number): number;
|
476
|
+
addInArrayParamUInt32(arrayIdx: number, val: number): number;
|
477
|
+
addInArrayParamUInt64(arrayIdx: number, val: number): number;
|
478
|
+
addInArrayParamUInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
479
|
+
addInArrayParamUIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
480
|
+
addInArrayParamInt8(arrayIdx: number, val: number): number;
|
481
|
+
addInArrayParamInt16(arrayIdx: number, val: number): number;
|
482
|
+
addInArrayParamInt32(arrayIdx: number, val: number): number;
|
483
|
+
addInArrayParamInt64(arrayIdx: number, val: number): number;
|
484
|
+
addInArrayParamInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
485
|
+
addInArrayParamIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
486
|
+
addInArrayParamBool(arrayIdx: number, val: boolean): number;
|
487
|
+
addInArrayParamString(arrayIdx: number, val: string): number;
|
488
|
+
addInArrayParamAddress(arrayIdx: number, val: Uint8Array | Buffer): number;
|
489
|
+
addInArrayParamBytes(arrayIdx: number, val: Uint8Array | Buffer): number;
|
490
|
+
addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
|
491
|
+
delete(): void;
|
492
|
+
}
|
493
|
+
export class CoinTypeConfiguration {
|
494
|
+
static getSymbol(type: CoinType): string;
|
495
|
+
static getDecimals(type: CoinType): number;
|
496
|
+
static getTransactionURL(type: CoinType, transactionID: string): string;
|
497
|
+
static getAccountURL(type: CoinType, accountID: string): string;
|
498
|
+
static getID(type: CoinType): string;
|
499
|
+
static getName(type: CoinType): string;
|
500
|
+
}
|
501
|
+
export class BitcoinAddress {
|
502
|
+
static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
|
503
|
+
static isValid(data: Uint8Array | Buffer): boolean;
|
504
|
+
static isValidString(string: string): boolean;
|
505
|
+
static createWithString(string: string): BitcoinAddress;
|
506
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
|
507
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
|
508
|
+
description(): string;
|
509
|
+
prefix(): number;
|
510
|
+
keyhash(): Uint8Array;
|
511
|
+
delete(): void;
|
512
|
+
}
|
513
|
+
export class SegwitAddress {
|
514
|
+
static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
|
515
|
+
static isValidString(string: string): boolean;
|
516
|
+
static createWithString(string: string): SegwitAddress;
|
517
|
+
static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
|
518
|
+
description(): string;
|
519
|
+
hrp(): HRP;
|
520
|
+
witnessVersion(): number;
|
521
|
+
witnessProgram(): Uint8Array;
|
522
|
+
delete(): void;
|
523
|
+
}
|
524
|
+
export class StellarMemoType {
|
525
|
+
value: number;
|
526
|
+
static none: StellarMemoType;
|
527
|
+
static text: StellarMemoType;
|
528
|
+
static id: StellarMemoType;
|
529
|
+
static hash: StellarMemoType;
|
530
|
+
static return: StellarMemoType;
|
531
|
+
}
|
532
|
+
export class Mnemonic {
|
533
|
+
static isValid(mnemonic: string): boolean;
|
534
|
+
static isValidWord(word: string): boolean;
|
535
|
+
static suggest(prefix: string): string;
|
536
|
+
}
|
537
|
+
export class NEARAccount {
|
538
|
+
static createWithString(string: string): NEARAccount;
|
539
|
+
description(): string;
|
540
|
+
delete(): void;
|
541
|
+
}
|
542
|
+
export class StoredKey {
|
543
|
+
static load(path: string): StoredKey;
|
544
|
+
static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
545
|
+
static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
546
|
+
static importJSON(json: Uint8Array | Buffer): StoredKey;
|
547
|
+
static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
|
548
|
+
static create(name: string, password: Uint8Array | Buffer): StoredKey;
|
549
|
+
identifier(): string;
|
550
|
+
name(): string;
|
551
|
+
isMnemonic(): boolean;
|
552
|
+
accountCount(): number;
|
553
|
+
encryptionParameters(): string;
|
554
|
+
account(index: number): Account;
|
555
|
+
accountForCoin(coin: CoinType, wallet: HDWallet): Account;
|
556
|
+
accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
|
557
|
+
addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
558
|
+
addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
559
|
+
removeAccountForCoin(coin: CoinType): void;
|
560
|
+
removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
|
561
|
+
removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
|
562
|
+
store(path: string): boolean;
|
563
|
+
decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
|
564
|
+
decryptMnemonic(password: Uint8Array | Buffer): string;
|
565
|
+
privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
|
566
|
+
wallet(password: Uint8Array | Buffer): HDWallet;
|
567
|
+
exportJSON(): Uint8Array;
|
568
|
+
fixAddresses(password: Uint8Array | Buffer): boolean;
|
569
|
+
delete(): void;
|
570
|
+
}
|
571
|
+
export class PublicKey {
|
572
|
+
static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
|
573
|
+
static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
|
574
|
+
static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
|
575
|
+
isCompressed(): boolean;
|
576
|
+
compressed(): PublicKey;
|
577
|
+
uncompressed(): PublicKey;
|
578
|
+
data(): Uint8Array;
|
579
|
+
keyType(): PublicKeyType;
|
580
|
+
description(): string;
|
581
|
+
verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
582
|
+
verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
583
|
+
verifySchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
584
|
+
delete(): void;
|
585
|
+
}
|
586
|
+
export class EthereumChainID {
|
587
|
+
value: number;
|
588
|
+
static ethereum: EthereumChainID;
|
589
|
+
static classic: EthereumChainID;
|
590
|
+
static poa: EthereumChainID;
|
591
|
+
static vechain: EthereumChainID;
|
592
|
+
static callisto: EthereumChainID;
|
593
|
+
static tomochain: EthereumChainID;
|
594
|
+
static polygon: EthereumChainID;
|
595
|
+
static thundertoken: EthereumChainID;
|
596
|
+
static gochain: EthereumChainID;
|
597
|
+
static celo: EthereumChainID;
|
598
|
+
static wanchain: EthereumChainID;
|
599
|
+
static cronos: EthereumChainID;
|
600
|
+
static optimism: EthereumChainID;
|
601
|
+
static xdai: EthereumChainID;
|
602
|
+
static smartbch: EthereumChainID;
|
603
|
+
static fantom: EthereumChainID;
|
604
|
+
static boba: EthereumChainID;
|
605
|
+
static kcc: EthereumChainID;
|
606
|
+
static heco: EthereumChainID;
|
607
|
+
static metis: EthereumChainID;
|
608
|
+
static moonbeam: EthereumChainID;
|
609
|
+
static moonriver: EthereumChainID;
|
610
|
+
static ronin: EthereumChainID;
|
611
|
+
static klaytn: EthereumChainID;
|
612
|
+
static avalanchec: EthereumChainID;
|
613
|
+
static evmos: EthereumChainID;
|
614
|
+
static arbitrum: EthereumChainID;
|
615
|
+
static smartchain: EthereumChainID;
|
616
|
+
static aurora: EthereumChainID;
|
617
|
+
}
|
618
|
+
export class BitcoinSigHashType {
|
619
|
+
value: number;
|
620
|
+
static all: BitcoinSigHashType;
|
621
|
+
static none: BitcoinSigHashType;
|
622
|
+
static single: BitcoinSigHashType;
|
623
|
+
static fork: BitcoinSigHashType;
|
624
|
+
static forkBTG: BitcoinSigHashType;
|
625
|
+
}
|
626
|
+
export class Base58 {
|
627
|
+
static encode(data: Uint8Array | Buffer): string;
|
628
|
+
static encodeNoCheck(data: Uint8Array | Buffer): string;
|
629
|
+
static decode(string: string): Uint8Array;
|
630
|
+
static decodeNoCheck(string: string): Uint8Array;
|
631
|
+
}
|
632
|
+
export class Purpose {
|
633
|
+
value: number;
|
634
|
+
static bip44: Purpose;
|
635
|
+
static bip49: Purpose;
|
636
|
+
static bip84: Purpose;
|
637
|
+
static bip1852: Purpose;
|
638
|
+
}
|
package/dist/lib/wallet-core.js
CHANGED
@@ -101,7 +101,7 @@ var h="undefined"!=typeof t;if(!h)t=m.position;else if(!m.seekable)throw new J(7
|
|
101
101
|
0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[e>>2]=Ra[0];C[e+4>>2]=Ra[1];f.eb&&0===b&&0===d&&(f.eb=null);return 0}catch(k){if("undefined"==typeof O||!(k instanceof J))throw k;return k.Ia}},r:function(a,b,c,d){try{a:{var e=Q(a);a=b;for(var f=b=0;f<c;f++){var k=F[a>>2],l=F[a+4>>2];a+=8;var m=e,p=k,q=l,t=void 0,v=D;if(0>q||0>t)throw new J(28);if(null===m.fd)throw new J(8);if(0===(m.flags&2097155))throw new J(8);if(16384===(m.node.mode&61440))throw new J(31);if(!m.sa.write)throw new J(28);
|
102
102
|
m.seekable&&m.flags&1024&&Jb(m,0,2);var h="undefined"!=typeof t;if(!h)t=m.position;else if(!m.seekable)throw new J(70);var r=m.sa.write(m,v,p,q,t,void 0);h||(m.position+=r);var w=r;if(0>w){var A=-1;break a}b+=w}A=b}F[d>>2]=A;return 0}catch(E){if("undefined"==typeof O||!(E instanceof J))throw E;return E.Ia}},D:ad,m:function(){},E:function(a,b,c,d){return ed(a,b,c,d)}};
|
103
103
|
(function(){function a(e){g.asm=e.exports;oa=g.asm.R;Fa();Ga=g.asm.T;Ia.unshift(g.asm.S);G--;g.monitorRunDependencies&&g.monitorRunDependencies(G);0==G&&(null!==La&&(clearInterval(La),La=null),Ma&&(e=Ma,Ma=null,e()))}function b(e){a(e.instance)}function c(e){return Qa().then(function(f){return WebAssembly.instantiate(f,d)}).then(function(f){return f}).then(e,function(f){u("failed to asynchronously prepare wasm: "+f);x(f)})}var d={a:kd};G++;g.monitorRunDependencies&&g.monitorRunDependencies(G);if(g.instantiateWasm)try{return g.instantiateWasm(d,
|
104
|
-
a)}catch(e){return u("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return na||"function"!=typeof WebAssembly.instantiateStreaming||Na()||H.startsWith("file://")||"function"!=typeof fetch?c(b):fetch(H,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){u("wasm streaming compile failed: "+f);u("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();
|
104
|
+
a)}catch(e){return u("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return na||"function"!=typeof WebAssembly.instantiateStreaming||Na()||H.startsWith("file://")||fa||"function"!=typeof fetch?c(b):fetch(H,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){u("wasm streaming compile failed: "+f);u("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();
|
105
105
|
g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.S).apply(null,arguments)};var Y=g._free=function(){return(Y=g._free=g.asm.U).apply(null,arguments)},hd=g._malloc=function(){return(hd=g._malloc=g.asm.V).apply(null,arguments)},jd=g.___errno_location=function(){return(jd=g.___errno_location=g.asm.W).apply(null,arguments)},Bc=g.___getTypeName=function(){return(Bc=g.___getTypeName=g.asm.X).apply(null,arguments)};
|
106
106
|
g.___embind_register_native_and_builtin_types=function(){return(g.___embind_register_native_and_builtin_types=g.asm.Y).apply(null,arguments)};var nb=g._emscripten_builtin_memalign=function(){return(nb=g._emscripten_builtin_memalign=g.asm.Z).apply(null,arguments)};g.___cxa_is_pointer_type=function(){return(g.___cxa_is_pointer_type=g.asm._).apply(null,arguments)};g.dynCall_jii=function(){return(g.dynCall_jii=g.asm.$).apply(null,arguments)};
|
107
107
|
g.dynCall_ji=function(){return(g.dynCall_ji=g.asm.aa).apply(null,arguments)};g.dynCall_iiji=function(){return(g.dynCall_iiji=g.asm.ba).apply(null,arguments)};g.dynCall_iiiji=function(){return(g.dynCall_iiiji=g.asm.ca).apply(null,arguments)};g.dynCall_jiii=function(){return(g.dynCall_jiii=g.asm.da).apply(null,arguments)};g.dynCall_jiiii=function(){return(g.dynCall_jiiii=g.asm.ea).apply(null,arguments)};g.dynCall_iiij=function(){return(g.dynCall_iiij=g.asm.fa).apply(null,arguments)};
|
Binary file
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trustwallet/wallet-core",
|
3
|
-
"version": "2.9.
|
3
|
+
"version": "2.9.5",
|
4
4
|
"description": "wallet core wasm and protobuf models",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"dist"
|
28
28
|
],
|
29
29
|
"dependencies": {
|
30
|
-
"protobufjs": "
|
30
|
+
"protobufjs": ">=6.11.3"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
33
33
|
"@types/chai": "^4.3.0",
|