@trustwallet/wallet-core 4.0.19 → 4.0.21
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.
@@ -8798,6 +8798,7 @@ export namespace TW {
|
|
8798
8798
|
enum InputSelector {
|
8799
8799
|
SelectAscending = 0,
|
8800
8800
|
SelectInOrder = 1,
|
8801
|
+
SelectDescending = 2,
|
8801
8802
|
UseAll = 10
|
8802
8803
|
}
|
8803
8804
|
|
@@ -13615,6 +13616,104 @@ export namespace TW {
|
|
13615
13616
|
Protobuf = 1
|
13616
13617
|
}
|
13617
13618
|
|
13619
|
+
/** TxHasher enum. */
|
13620
|
+
enum TxHasher {
|
13621
|
+
UseDefault = 0,
|
13622
|
+
Sha256 = 1,
|
13623
|
+
Keccak256 = 2
|
13624
|
+
}
|
13625
|
+
|
13626
|
+
/** SignerPublicKeyType enum. */
|
13627
|
+
enum SignerPublicKeyType {
|
13628
|
+
Secp256k1 = 0,
|
13629
|
+
Secp256k1Extended = 1
|
13630
|
+
}
|
13631
|
+
|
13632
|
+
/** Properties of a SignerInfo. */
|
13633
|
+
interface ISignerInfo {
|
13634
|
+
|
13635
|
+
/** SignerInfo publicKeyType */
|
13636
|
+
publicKeyType?: (TW.Cosmos.Proto.SignerPublicKeyType|null);
|
13637
|
+
|
13638
|
+
/** SignerInfo jsonType */
|
13639
|
+
jsonType?: (string|null);
|
13640
|
+
|
13641
|
+
/** SignerInfo protobufType */
|
13642
|
+
protobufType?: (string|null);
|
13643
|
+
}
|
13644
|
+
|
13645
|
+
/** Represents a SignerInfo. */
|
13646
|
+
class SignerInfo implements ISignerInfo {
|
13647
|
+
|
13648
|
+
/**
|
13649
|
+
* Constructs a new SignerInfo.
|
13650
|
+
* @param [properties] Properties to set
|
13651
|
+
*/
|
13652
|
+
constructor(properties?: TW.Cosmos.Proto.ISignerInfo);
|
13653
|
+
|
13654
|
+
/** SignerInfo publicKeyType. */
|
13655
|
+
public publicKeyType: TW.Cosmos.Proto.SignerPublicKeyType;
|
13656
|
+
|
13657
|
+
/** SignerInfo jsonType. */
|
13658
|
+
public jsonType: string;
|
13659
|
+
|
13660
|
+
/** SignerInfo protobufType. */
|
13661
|
+
public protobufType: string;
|
13662
|
+
|
13663
|
+
/**
|
13664
|
+
* Creates a new SignerInfo instance using the specified properties.
|
13665
|
+
* @param [properties] Properties to set
|
13666
|
+
* @returns SignerInfo instance
|
13667
|
+
*/
|
13668
|
+
public static create(properties?: TW.Cosmos.Proto.ISignerInfo): TW.Cosmos.Proto.SignerInfo;
|
13669
|
+
|
13670
|
+
/**
|
13671
|
+
* Encodes the specified SignerInfo message. Does not implicitly {@link TW.Cosmos.Proto.SignerInfo.verify|verify} messages.
|
13672
|
+
* @param message SignerInfo message or plain object to encode
|
13673
|
+
* @param [writer] Writer to encode to
|
13674
|
+
* @returns Writer
|
13675
|
+
*/
|
13676
|
+
public static encode(message: TW.Cosmos.Proto.ISignerInfo, writer?: $protobuf.Writer): $protobuf.Writer;
|
13677
|
+
|
13678
|
+
/**
|
13679
|
+
* Decodes a SignerInfo message from the specified reader or buffer.
|
13680
|
+
* @param reader Reader or buffer to decode from
|
13681
|
+
* @param [length] Message length if known beforehand
|
13682
|
+
* @returns SignerInfo
|
13683
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
13684
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
13685
|
+
*/
|
13686
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cosmos.Proto.SignerInfo;
|
13687
|
+
|
13688
|
+
/**
|
13689
|
+
* Verifies a SignerInfo message.
|
13690
|
+
* @param message Plain object to verify
|
13691
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
13692
|
+
*/
|
13693
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
13694
|
+
|
13695
|
+
/**
|
13696
|
+
* Creates a SignerInfo message from a plain object. Also converts values to their respective internal types.
|
13697
|
+
* @param object Plain object
|
13698
|
+
* @returns SignerInfo
|
13699
|
+
*/
|
13700
|
+
public static fromObject(object: { [k: string]: any }): TW.Cosmos.Proto.SignerInfo;
|
13701
|
+
|
13702
|
+
/**
|
13703
|
+
* Creates a plain object from a SignerInfo message. Also converts values to other types if specified.
|
13704
|
+
* @param message SignerInfo
|
13705
|
+
* @param [options] Conversion options
|
13706
|
+
* @returns Plain object
|
13707
|
+
*/
|
13708
|
+
public static toObject(message: TW.Cosmos.Proto.SignerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
13709
|
+
|
13710
|
+
/**
|
13711
|
+
* Converts this SignerInfo to JSON.
|
13712
|
+
* @returns JSON object
|
13713
|
+
*/
|
13714
|
+
public toJSON(): { [k: string]: any };
|
13715
|
+
}
|
13716
|
+
|
13618
13717
|
/** Properties of a SigningInput. */
|
13619
13718
|
interface ISigningInput {
|
13620
13719
|
|
@@ -13647,6 +13746,12 @@ export namespace TW {
|
|
13647
13746
|
|
13648
13747
|
/** SigningInput publicKey */
|
13649
13748
|
publicKey?: (Uint8Array|null);
|
13749
|
+
|
13750
|
+
/** SigningInput txHasher */
|
13751
|
+
txHasher?: (TW.Cosmos.Proto.TxHasher|null);
|
13752
|
+
|
13753
|
+
/** SigningInput signerInfo */
|
13754
|
+
signerInfo?: (TW.Cosmos.Proto.ISignerInfo|null);
|
13650
13755
|
}
|
13651
13756
|
|
13652
13757
|
/** Represents a SigningInput. */
|
@@ -13688,6 +13793,12 @@ export namespace TW {
|
|
13688
13793
|
/** SigningInput publicKey. */
|
13689
13794
|
public publicKey: Uint8Array;
|
13690
13795
|
|
13796
|
+
/** SigningInput txHasher. */
|
13797
|
+
public txHasher: TW.Cosmos.Proto.TxHasher;
|
13798
|
+
|
13799
|
+
/** SigningInput signerInfo. */
|
13800
|
+
public signerInfo?: (TW.Cosmos.Proto.ISignerInfo|null);
|
13801
|
+
|
13691
13802
|
/**
|
13692
13803
|
* Creates a new SigningInput instance using the specified properties.
|
13693
13804
|
* @param [properties] Properties to set
|
@@ -19340,6 +19340,7 @@
|
|
19340
19340
|
return "inputSelector: enum value expected";
|
19341
19341
|
case 0:
|
19342
19342
|
case 1:
|
19343
|
+
case 2:
|
19343
19344
|
case 10:
|
19344
19345
|
break;
|
19345
19346
|
}
|
@@ -19413,6 +19414,10 @@
|
|
19413
19414
|
case 1:
|
19414
19415
|
message.inputSelector = 1;
|
19415
19416
|
break;
|
19417
|
+
case "SelectDescending":
|
19418
|
+
case 2:
|
19419
|
+
message.inputSelector = 2;
|
19420
|
+
break;
|
19416
19421
|
case "UseAll":
|
19417
19422
|
case 10:
|
19418
19423
|
message.inputSelector = 10;
|
@@ -26018,6 +26023,7 @@
|
|
26018
26023
|
return "inputSelector: enum value expected";
|
26019
26024
|
case 0:
|
26020
26025
|
case 1:
|
26026
|
+
case 2:
|
26021
26027
|
case 10:
|
26022
26028
|
break;
|
26023
26029
|
}
|
@@ -26081,6 +26087,10 @@
|
|
26081
26087
|
case 1:
|
26082
26088
|
message.inputSelector = 1;
|
26083
26089
|
break;
|
26090
|
+
case "SelectDescending":
|
26091
|
+
case 2:
|
26092
|
+
message.inputSelector = 2;
|
26093
|
+
break;
|
26084
26094
|
case "UseAll":
|
26085
26095
|
case 10:
|
26086
26096
|
message.inputSelector = 10;
|
@@ -27128,6 +27138,7 @@
|
|
27128
27138
|
return "inputSelector: enum value expected";
|
27129
27139
|
case 0:
|
27130
27140
|
case 1:
|
27141
|
+
case 2:
|
27131
27142
|
case 10:
|
27132
27143
|
break;
|
27133
27144
|
}
|
@@ -27191,6 +27202,10 @@
|
|
27191
27202
|
case 1:
|
27192
27203
|
message.inputSelector = 1;
|
27193
27204
|
break;
|
27205
|
+
case "SelectDescending":
|
27206
|
+
case 2:
|
27207
|
+
message.inputSelector = 2;
|
27208
|
+
break;
|
27194
27209
|
case "UseAll":
|
27195
27210
|
case 10:
|
27196
27211
|
message.inputSelector = 10;
|
@@ -27298,12 +27313,14 @@
|
|
27298
27313
|
* @enum {number}
|
27299
27314
|
* @property {number} SelectAscending=0 SelectAscending value
|
27300
27315
|
* @property {number} SelectInOrder=1 SelectInOrder value
|
27316
|
+
* @property {number} SelectDescending=2 SelectDescending value
|
27301
27317
|
* @property {number} UseAll=10 UseAll value
|
27302
27318
|
*/
|
27303
27319
|
Proto.InputSelector = (function() {
|
27304
27320
|
var valuesById = {}, values = Object.create(valuesById);
|
27305
27321
|
values[valuesById[0] = "SelectAscending"] = 0;
|
27306
27322
|
values[valuesById[1] = "SelectInOrder"] = 1;
|
27323
|
+
values[valuesById[2] = "SelectDescending"] = 2;
|
27307
27324
|
values[valuesById[10] = "UseAll"] = 10;
|
27308
27325
|
return values;
|
27309
27326
|
})();
|
@@ -41463,6 +41480,252 @@
|
|
41463
41480
|
return values;
|
41464
41481
|
})();
|
41465
41482
|
|
41483
|
+
/**
|
41484
|
+
* TxHasher enum.
|
41485
|
+
* @name TW.Cosmos.Proto.TxHasher
|
41486
|
+
* @enum {number}
|
41487
|
+
* @property {number} UseDefault=0 UseDefault value
|
41488
|
+
* @property {number} Sha256=1 Sha256 value
|
41489
|
+
* @property {number} Keccak256=2 Keccak256 value
|
41490
|
+
*/
|
41491
|
+
Proto.TxHasher = (function() {
|
41492
|
+
var valuesById = {}, values = Object.create(valuesById);
|
41493
|
+
values[valuesById[0] = "UseDefault"] = 0;
|
41494
|
+
values[valuesById[1] = "Sha256"] = 1;
|
41495
|
+
values[valuesById[2] = "Keccak256"] = 2;
|
41496
|
+
return values;
|
41497
|
+
})();
|
41498
|
+
|
41499
|
+
/**
|
41500
|
+
* SignerPublicKeyType enum.
|
41501
|
+
* @name TW.Cosmos.Proto.SignerPublicKeyType
|
41502
|
+
* @enum {number}
|
41503
|
+
* @property {number} Secp256k1=0 Secp256k1 value
|
41504
|
+
* @property {number} Secp256k1Extended=1 Secp256k1Extended value
|
41505
|
+
*/
|
41506
|
+
Proto.SignerPublicKeyType = (function() {
|
41507
|
+
var valuesById = {}, values = Object.create(valuesById);
|
41508
|
+
values[valuesById[0] = "Secp256k1"] = 0;
|
41509
|
+
values[valuesById[1] = "Secp256k1Extended"] = 1;
|
41510
|
+
return values;
|
41511
|
+
})();
|
41512
|
+
|
41513
|
+
Proto.SignerInfo = (function() {
|
41514
|
+
|
41515
|
+
/**
|
41516
|
+
* Properties of a SignerInfo.
|
41517
|
+
* @memberof TW.Cosmos.Proto
|
41518
|
+
* @interface ISignerInfo
|
41519
|
+
* @property {TW.Cosmos.Proto.SignerPublicKeyType|null} [publicKeyType] SignerInfo publicKeyType
|
41520
|
+
* @property {string|null} [jsonType] SignerInfo jsonType
|
41521
|
+
* @property {string|null} [protobufType] SignerInfo protobufType
|
41522
|
+
*/
|
41523
|
+
|
41524
|
+
/**
|
41525
|
+
* Constructs a new SignerInfo.
|
41526
|
+
* @memberof TW.Cosmos.Proto
|
41527
|
+
* @classdesc Represents a SignerInfo.
|
41528
|
+
* @implements ISignerInfo
|
41529
|
+
* @constructor
|
41530
|
+
* @param {TW.Cosmos.Proto.ISignerInfo=} [properties] Properties to set
|
41531
|
+
*/
|
41532
|
+
function SignerInfo(properties) {
|
41533
|
+
if (properties)
|
41534
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
41535
|
+
if (properties[keys[i]] != null)
|
41536
|
+
this[keys[i]] = properties[keys[i]];
|
41537
|
+
}
|
41538
|
+
|
41539
|
+
/**
|
41540
|
+
* SignerInfo publicKeyType.
|
41541
|
+
* @member {TW.Cosmos.Proto.SignerPublicKeyType} publicKeyType
|
41542
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41543
|
+
* @instance
|
41544
|
+
*/
|
41545
|
+
SignerInfo.prototype.publicKeyType = 0;
|
41546
|
+
|
41547
|
+
/**
|
41548
|
+
* SignerInfo jsonType.
|
41549
|
+
* @member {string} jsonType
|
41550
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41551
|
+
* @instance
|
41552
|
+
*/
|
41553
|
+
SignerInfo.prototype.jsonType = "";
|
41554
|
+
|
41555
|
+
/**
|
41556
|
+
* SignerInfo protobufType.
|
41557
|
+
* @member {string} protobufType
|
41558
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41559
|
+
* @instance
|
41560
|
+
*/
|
41561
|
+
SignerInfo.prototype.protobufType = "";
|
41562
|
+
|
41563
|
+
/**
|
41564
|
+
* Creates a new SignerInfo instance using the specified properties.
|
41565
|
+
* @function create
|
41566
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41567
|
+
* @static
|
41568
|
+
* @param {TW.Cosmos.Proto.ISignerInfo=} [properties] Properties to set
|
41569
|
+
* @returns {TW.Cosmos.Proto.SignerInfo} SignerInfo instance
|
41570
|
+
*/
|
41571
|
+
SignerInfo.create = function create(properties) {
|
41572
|
+
return new SignerInfo(properties);
|
41573
|
+
};
|
41574
|
+
|
41575
|
+
/**
|
41576
|
+
* Encodes the specified SignerInfo message. Does not implicitly {@link TW.Cosmos.Proto.SignerInfo.verify|verify} messages.
|
41577
|
+
* @function encode
|
41578
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41579
|
+
* @static
|
41580
|
+
* @param {TW.Cosmos.Proto.ISignerInfo} message SignerInfo message or plain object to encode
|
41581
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
41582
|
+
* @returns {$protobuf.Writer} Writer
|
41583
|
+
*/
|
41584
|
+
SignerInfo.encode = function encode(message, writer) {
|
41585
|
+
if (!writer)
|
41586
|
+
writer = $Writer.create();
|
41587
|
+
if (message.publicKeyType != null && Object.hasOwnProperty.call(message, "publicKeyType"))
|
41588
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.publicKeyType);
|
41589
|
+
if (message.jsonType != null && Object.hasOwnProperty.call(message, "jsonType"))
|
41590
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.jsonType);
|
41591
|
+
if (message.protobufType != null && Object.hasOwnProperty.call(message, "protobufType"))
|
41592
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.protobufType);
|
41593
|
+
return writer;
|
41594
|
+
};
|
41595
|
+
|
41596
|
+
/**
|
41597
|
+
* Decodes a SignerInfo message from the specified reader or buffer.
|
41598
|
+
* @function decode
|
41599
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41600
|
+
* @static
|
41601
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41602
|
+
* @param {number} [length] Message length if known beforehand
|
41603
|
+
* @returns {TW.Cosmos.Proto.SignerInfo} SignerInfo
|
41604
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
41605
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41606
|
+
*/
|
41607
|
+
SignerInfo.decode = function decode(reader, length) {
|
41608
|
+
if (!(reader instanceof $Reader))
|
41609
|
+
reader = $Reader.create(reader);
|
41610
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Cosmos.Proto.SignerInfo();
|
41611
|
+
while (reader.pos < end) {
|
41612
|
+
var tag = reader.uint32();
|
41613
|
+
switch (tag >>> 3) {
|
41614
|
+
case 1:
|
41615
|
+
message.publicKeyType = reader.int32();
|
41616
|
+
break;
|
41617
|
+
case 2:
|
41618
|
+
message.jsonType = reader.string();
|
41619
|
+
break;
|
41620
|
+
case 3:
|
41621
|
+
message.protobufType = reader.string();
|
41622
|
+
break;
|
41623
|
+
default:
|
41624
|
+
reader.skipType(tag & 7);
|
41625
|
+
break;
|
41626
|
+
}
|
41627
|
+
}
|
41628
|
+
return message;
|
41629
|
+
};
|
41630
|
+
|
41631
|
+
/**
|
41632
|
+
* Verifies a SignerInfo message.
|
41633
|
+
* @function verify
|
41634
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41635
|
+
* @static
|
41636
|
+
* @param {Object.<string,*>} message Plain object to verify
|
41637
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
41638
|
+
*/
|
41639
|
+
SignerInfo.verify = function verify(message) {
|
41640
|
+
if (typeof message !== "object" || message === null)
|
41641
|
+
return "object expected";
|
41642
|
+
if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType"))
|
41643
|
+
switch (message.publicKeyType) {
|
41644
|
+
default:
|
41645
|
+
return "publicKeyType: enum value expected";
|
41646
|
+
case 0:
|
41647
|
+
case 1:
|
41648
|
+
break;
|
41649
|
+
}
|
41650
|
+
if (message.jsonType != null && message.hasOwnProperty("jsonType"))
|
41651
|
+
if (!$util.isString(message.jsonType))
|
41652
|
+
return "jsonType: string expected";
|
41653
|
+
if (message.protobufType != null && message.hasOwnProperty("protobufType"))
|
41654
|
+
if (!$util.isString(message.protobufType))
|
41655
|
+
return "protobufType: string expected";
|
41656
|
+
return null;
|
41657
|
+
};
|
41658
|
+
|
41659
|
+
/**
|
41660
|
+
* Creates a SignerInfo message from a plain object. Also converts values to their respective internal types.
|
41661
|
+
* @function fromObject
|
41662
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41663
|
+
* @static
|
41664
|
+
* @param {Object.<string,*>} object Plain object
|
41665
|
+
* @returns {TW.Cosmos.Proto.SignerInfo} SignerInfo
|
41666
|
+
*/
|
41667
|
+
SignerInfo.fromObject = function fromObject(object) {
|
41668
|
+
if (object instanceof $root.TW.Cosmos.Proto.SignerInfo)
|
41669
|
+
return object;
|
41670
|
+
var message = new $root.TW.Cosmos.Proto.SignerInfo();
|
41671
|
+
switch (object.publicKeyType) {
|
41672
|
+
case "Secp256k1":
|
41673
|
+
case 0:
|
41674
|
+
message.publicKeyType = 0;
|
41675
|
+
break;
|
41676
|
+
case "Secp256k1Extended":
|
41677
|
+
case 1:
|
41678
|
+
message.publicKeyType = 1;
|
41679
|
+
break;
|
41680
|
+
}
|
41681
|
+
if (object.jsonType != null)
|
41682
|
+
message.jsonType = String(object.jsonType);
|
41683
|
+
if (object.protobufType != null)
|
41684
|
+
message.protobufType = String(object.protobufType);
|
41685
|
+
return message;
|
41686
|
+
};
|
41687
|
+
|
41688
|
+
/**
|
41689
|
+
* Creates a plain object from a SignerInfo message. Also converts values to other types if specified.
|
41690
|
+
* @function toObject
|
41691
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41692
|
+
* @static
|
41693
|
+
* @param {TW.Cosmos.Proto.SignerInfo} message SignerInfo
|
41694
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
41695
|
+
* @returns {Object.<string,*>} Plain object
|
41696
|
+
*/
|
41697
|
+
SignerInfo.toObject = function toObject(message, options) {
|
41698
|
+
if (!options)
|
41699
|
+
options = {};
|
41700
|
+
var object = {};
|
41701
|
+
if (options.defaults) {
|
41702
|
+
object.publicKeyType = options.enums === String ? "Secp256k1" : 0;
|
41703
|
+
object.jsonType = "";
|
41704
|
+
object.protobufType = "";
|
41705
|
+
}
|
41706
|
+
if (message.publicKeyType != null && message.hasOwnProperty("publicKeyType"))
|
41707
|
+
object.publicKeyType = options.enums === String ? $root.TW.Cosmos.Proto.SignerPublicKeyType[message.publicKeyType] : message.publicKeyType;
|
41708
|
+
if (message.jsonType != null && message.hasOwnProperty("jsonType"))
|
41709
|
+
object.jsonType = message.jsonType;
|
41710
|
+
if (message.protobufType != null && message.hasOwnProperty("protobufType"))
|
41711
|
+
object.protobufType = message.protobufType;
|
41712
|
+
return object;
|
41713
|
+
};
|
41714
|
+
|
41715
|
+
/**
|
41716
|
+
* Converts this SignerInfo to JSON.
|
41717
|
+
* @function toJSON
|
41718
|
+
* @memberof TW.Cosmos.Proto.SignerInfo
|
41719
|
+
* @instance
|
41720
|
+
* @returns {Object.<string,*>} JSON object
|
41721
|
+
*/
|
41722
|
+
SignerInfo.prototype.toJSON = function toJSON() {
|
41723
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
41724
|
+
};
|
41725
|
+
|
41726
|
+
return SignerInfo;
|
41727
|
+
})();
|
41728
|
+
|
41466
41729
|
Proto.SigningInput = (function() {
|
41467
41730
|
|
41468
41731
|
/**
|
@@ -41479,6 +41742,8 @@
|
|
41479
41742
|
* @property {Array.<TW.Cosmos.Proto.IMessage>|null} [messages] SigningInput messages
|
41480
41743
|
* @property {TW.Cosmos.Proto.BroadcastMode|null} [mode] SigningInput mode
|
41481
41744
|
* @property {Uint8Array|null} [publicKey] SigningInput publicKey
|
41745
|
+
* @property {TW.Cosmos.Proto.TxHasher|null} [txHasher] SigningInput txHasher
|
41746
|
+
* @property {TW.Cosmos.Proto.ISignerInfo|null} [signerInfo] SigningInput signerInfo
|
41482
41747
|
*/
|
41483
41748
|
|
41484
41749
|
/**
|
@@ -41577,6 +41842,22 @@
|
|
41577
41842
|
*/
|
41578
41843
|
SigningInput.prototype.publicKey = $util.newBuffer([]);
|
41579
41844
|
|
41845
|
+
/**
|
41846
|
+
* SigningInput txHasher.
|
41847
|
+
* @member {TW.Cosmos.Proto.TxHasher} txHasher
|
41848
|
+
* @memberof TW.Cosmos.Proto.SigningInput
|
41849
|
+
* @instance
|
41850
|
+
*/
|
41851
|
+
SigningInput.prototype.txHasher = 0;
|
41852
|
+
|
41853
|
+
/**
|
41854
|
+
* SigningInput signerInfo.
|
41855
|
+
* @member {TW.Cosmos.Proto.ISignerInfo|null|undefined} signerInfo
|
41856
|
+
* @memberof TW.Cosmos.Proto.SigningInput
|
41857
|
+
* @instance
|
41858
|
+
*/
|
41859
|
+
SigningInput.prototype.signerInfo = null;
|
41860
|
+
|
41580
41861
|
/**
|
41581
41862
|
* Creates a new SigningInput instance using the specified properties.
|
41582
41863
|
* @function create
|
@@ -41622,6 +41903,10 @@
|
|
41622
41903
|
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.mode);
|
41623
41904
|
if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
|
41624
41905
|
writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.publicKey);
|
41906
|
+
if (message.txHasher != null && Object.hasOwnProperty.call(message, "txHasher"))
|
41907
|
+
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.txHasher);
|
41908
|
+
if (message.signerInfo != null && Object.hasOwnProperty.call(message, "signerInfo"))
|
41909
|
+
$root.TW.Cosmos.Proto.SignerInfo.encode(message.signerInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
41625
41910
|
return writer;
|
41626
41911
|
};
|
41627
41912
|
|
@@ -41675,6 +41960,12 @@
|
|
41675
41960
|
case 10:
|
41676
41961
|
message.publicKey = reader.bytes();
|
41677
41962
|
break;
|
41963
|
+
case 11:
|
41964
|
+
message.txHasher = reader.int32();
|
41965
|
+
break;
|
41966
|
+
case 12:
|
41967
|
+
message.signerInfo = $root.TW.Cosmos.Proto.SignerInfo.decode(reader, reader.uint32());
|
41968
|
+
break;
|
41678
41969
|
default:
|
41679
41970
|
reader.skipType(tag & 7);
|
41680
41971
|
break;
|
@@ -41743,6 +42034,20 @@
|
|
41743
42034
|
if (message.publicKey != null && message.hasOwnProperty("publicKey"))
|
41744
42035
|
if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
|
41745
42036
|
return "publicKey: buffer expected";
|
42037
|
+
if (message.txHasher != null && message.hasOwnProperty("txHasher"))
|
42038
|
+
switch (message.txHasher) {
|
42039
|
+
default:
|
42040
|
+
return "txHasher: enum value expected";
|
42041
|
+
case 0:
|
42042
|
+
case 1:
|
42043
|
+
case 2:
|
42044
|
+
break;
|
42045
|
+
}
|
42046
|
+
if (message.signerInfo != null && message.hasOwnProperty("signerInfo")) {
|
42047
|
+
var error = $root.TW.Cosmos.Proto.SignerInfo.verify(message.signerInfo);
|
42048
|
+
if (error)
|
42049
|
+
return "signerInfo." + error;
|
42050
|
+
}
|
41746
42051
|
return null;
|
41747
42052
|
};
|
41748
42053
|
|
@@ -41829,6 +42134,25 @@
|
|
41829
42134
|
$util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
|
41830
42135
|
else if (object.publicKey.length)
|
41831
42136
|
message.publicKey = object.publicKey;
|
42137
|
+
switch (object.txHasher) {
|
42138
|
+
case "UseDefault":
|
42139
|
+
case 0:
|
42140
|
+
message.txHasher = 0;
|
42141
|
+
break;
|
42142
|
+
case "Sha256":
|
42143
|
+
case 1:
|
42144
|
+
message.txHasher = 1;
|
42145
|
+
break;
|
42146
|
+
case "Keccak256":
|
42147
|
+
case 2:
|
42148
|
+
message.txHasher = 2;
|
42149
|
+
break;
|
42150
|
+
}
|
42151
|
+
if (object.signerInfo != null) {
|
42152
|
+
if (typeof object.signerInfo !== "object")
|
42153
|
+
throw TypeError(".TW.Cosmos.Proto.SigningInput.signerInfo: object expected");
|
42154
|
+
message.signerInfo = $root.TW.Cosmos.Proto.SignerInfo.fromObject(object.signerInfo);
|
42155
|
+
}
|
41832
42156
|
return message;
|
41833
42157
|
};
|
41834
42158
|
|
@@ -41877,6 +42201,8 @@
|
|
41877
42201
|
if (options.bytes !== Array)
|
41878
42202
|
object.publicKey = $util.newBuffer(object.publicKey);
|
41879
42203
|
}
|
42204
|
+
object.txHasher = options.enums === String ? "UseDefault" : 0;
|
42205
|
+
object.signerInfo = null;
|
41880
42206
|
}
|
41881
42207
|
if (message.signingMode != null && message.hasOwnProperty("signingMode"))
|
41882
42208
|
object.signingMode = options.enums === String ? $root.TW.Cosmos.Proto.SigningMode[message.signingMode] : message.signingMode;
|
@@ -41907,6 +42233,10 @@
|
|
41907
42233
|
object.mode = options.enums === String ? $root.TW.Cosmos.Proto.BroadcastMode[message.mode] : message.mode;
|
41908
42234
|
if (message.publicKey != null && message.hasOwnProperty("publicKey"))
|
41909
42235
|
object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey;
|
42236
|
+
if (message.txHasher != null && message.hasOwnProperty("txHasher"))
|
42237
|
+
object.txHasher = options.enums === String ? $root.TW.Cosmos.Proto.TxHasher[message.txHasher] : message.txHasher;
|
42238
|
+
if (message.signerInfo != null && message.hasOwnProperty("signerInfo"))
|
42239
|
+
object.signerInfo = $root.TW.Cosmos.Proto.SignerInfo.toObject(message.signerInfo, options);
|
41910
42240
|
return object;
|
41911
42241
|
};
|
41912
42242
|
|
package/dist/lib/wallet-core.js
CHANGED
@@ -34,7 +34,7 @@ function Ua(){Qa++;g.monitorRunDependencies&&g.monitorRunDependencies(Qa);assert
|
|
34
34
|
function Va(){return G.startsWith("data:application/octet-stream;base64,")}function ma(a){return a.startsWith("file://")}function H(a){return function(){var b=g.asm;assert(Oa,"native function `"+a+"` called before runtime initialization");b[a]||assert(b[a],"exported native function `"+a+"` not found");return b[a].apply(null,arguments)}}var G;G="wallet-core.wasm";if(!Va()){var Wa=G;G=g.locateFile?g.locateFile(Wa,w):w+Wa}
|
35
35
|
function Xa(){var a=G;try{if(a==G&&qa)return new Uint8Array(qa);if(ka)return ka(a);throw"both async and sync fetching of the wasm failed";}catch(b){p(b)}}
|
36
36
|
function Ya(){if(!qa&&(ea||fa)){if("function"==typeof fetch&&!ma(G))return fetch(G,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+G+"'";return a.arrayBuffer()}).catch(function(){return Xa()});if(ja)return new Promise(function(a,b){ja(G,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return Xa()})}
|
37
|
-
var Za,$a,ab={
|
37
|
+
var Za,$a,ab={2175636:()=>{if(void 0===g.ea)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.ea=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.ea=a}catch(e){throw"No secure random number generator found";}}},2176358:()=>g.ea()};function bb(a){for(;0<a.length;)a.shift()(g)}
|
38
38
|
function va(a){assert("number"===typeof a);return"0x"+a.toString(16).padStart(8,"0")}function pa(a){cb||(cb={});cb[a]||(cb[a]=1,v&&(a="warning: "+a),y(a))}var cb,db=0;
|
39
39
|
function eb(a){this.l=a-24;this.Ta=function(b){F[this.l+4>>2]=b};this.Da=function(){return F[this.l+4>>2]};this.Ja=function(b){F[this.l+8>>2]=b};this.Ka=function(){D[this.l>>2]=0};this.Ia=function(){B[this.l+12>>0]=0};this.Na=function(){B[this.l+13>>0]=0};this.Ea=function(b,c){this.F(0);this.Ta(b);this.Ja(c);this.Ka();this.Ia();this.Na()};this.F=function(b){F[this.l+16>>2]=b}}
|
40
40
|
var fb=0,gb=(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},hb=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=gb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},ib=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},jb=
|
@@ -158,7 +158,7 @@ g.dynCall_iiiiij=H("dynCall_iiiiij");g.dynCall_iiiij=H("dynCall_iiiij");var ue=g
|
|
158
158
|
var xe=g.dynCall_jj=H("dynCall_jj"),ye=g.dynCall_vij=H("dynCall_vij"),ze=g.dynCall_iijii=H("dynCall_iijii"),Ae=g.dynCall_iij=H("dynCall_iij"),Be=g.dynCall_iijj=H("dynCall_iijj"),Ce=g.dynCall_viiiiiji=H("dynCall_viiiiiji"),De=g.dynCall_viiijii=H("dynCall_viiijii"),Ee=g.dynCall_viij=H("dynCall_viij"),Fe=g.dynCall_jjji=H("dynCall_jjji");g.dynCall_viji=H("dynCall_viji");g.dynCall_jiji=H("dynCall_jiji");g.dynCall_iiiiijj=H("dynCall_iiiiijj");g.dynCall_iiiiiijj=H("dynCall_iiiiiijj");
|
159
159
|
function ge(a,b,c){var d=Y();try{U(a)(b,c)}catch(e){Z(d);if(e!==e+0)throw e;X(1,0)}}function fe(a,b){var c=Y();try{U(a)(b)}catch(d){Z(c);if(d!==d+0)throw d;X(1,0)}}function he(a,b,c,d){var e=Y();try{U(a)(b,c,d)}catch(f){Z(e);if(f!==f+0)throw f;X(1,0)}}function je(a,b,c,d,e,f){var h=Y();try{U(a)(b,c,d,e,f)}catch(l){Z(h);if(l!==l+0)throw l;X(1,0)}}function ee(a){var b=Y();try{U(a)()}catch(c){Z(b);if(c!==c+0)throw c;X(1,0)}}
|
160
160
|
function Td(a,b,c){var d=Y();try{return U(a)(b,c)}catch(e){Z(d);if(e!==e+0)throw e;X(1,0)}}function ie(a,b,c,d,e){var f=Y();try{U(a)(b,c,d,e)}catch(h){Z(f);if(h!==h+0)throw h;X(1,0)}}function Qd(a){var b=Y();try{return U(a)()}catch(c){Z(b);if(c!==c+0)throw c;X(1,0)}}function Rd(a,b){var c=Y();try{return U(a)(b)}catch(d){Z(c);if(d!==d+0)throw d;X(1,0)}}function Ud(a,b,c,d){var e=Y();try{return U(a)(b,c,d)}catch(f){Z(e);if(f!==f+0)throw f;X(1,0)}}
|
161
|
-
function
|
161
|
+
function ke(a,b,c,d,e,f,h){var l=Y();try{U(a)(b,c,d,e,f,h)}catch(n){Z(l);if(n!==n+0)throw n;X(1,0)}}function Vd(a,b,c,d,e){var f=Y();try{return U(a)(b,c,d,e)}catch(h){Z(f);if(h!==h+0)throw h;X(1,0)}}function Sd(a,b,c){var d=Y();try{return U(a)(b,c)}catch(e){Z(d);if(e!==e+0)throw e;X(1,0)}}function le(a,b,c,d,e,f,h,l){var n=Y();try{U(a)(b,c,d,e,f,h,l)}catch(m){Z(n);if(m!==m+0)throw m;X(1,0)}}function Wd(a,b,c,d,e,f){var h=Y();try{return U(a)(b,c,d,e,f)}catch(l){Z(h);if(l!==l+0)throw l;X(1,0)}}
|
162
162
|
function Xd(a,b,c,d,e,f,h){var l=Y();try{return U(a)(b,c,d,e,f,h)}catch(n){Z(l);if(n!==n+0)throw n;X(1,0)}}function me(a,b,c,d,e,f,h,l,n){var m=Y();try{U(a)(b,c,d,e,f,h,l,n)}catch(q){Z(m);if(q!==q+0)throw q;X(1,0)}}function ce(a,b,c){var d=Y();try{return xe(a,b,c)}catch(e){Z(d);if(e!==e+0)throw e;X(1,0)}}function re(a,b,c,d){var e=Y();try{ye(a,b,c,d)}catch(f){Z(e);if(f!==f+0)throw f;X(1,0)}}function ae(a,b,c){var d=Y();try{return ue(a,b,c)}catch(e){Z(d);if(e!==e+0)throw e;X(1,0)}}
|
163
163
|
function Zd(a,b,c,d,e,f){var h=Y();try{return ze(a,b,c,d,e,f)}catch(l){Z(h);if(l!==l+0)throw l;X(1,0)}}function Yd(a,b,c,d){var e=Y();try{return Ae(a,b,c,d)}catch(f){Z(e);if(f!==f+0)throw f;X(1,0)}}function $d(a,b,c,d,e,f){var h=Y();try{return Be(a,b,c,d,e,f)}catch(l){Z(h);if(l!==l+0)throw l;X(1,0)}}function ne(a,b,c,d,e,f,h,l,n){var m=Y();try{Ce(a,b,c,d,e,f,h,l,n)}catch(q){Z(m);if(q!==q+0)throw q;X(1,0)}}
|
164
164
|
function be(a,b,c,d){var e=Y();try{return ve(a,b,c,d)}catch(f){Z(e);if(f!==f+0)throw f;X(1,0)}}function qe(a,b,c,d,e,f,h){var l=Y();try{we(a,b,c,d,e,f,h)}catch(n){Z(l);if(n!==n+0)throw n;X(1,0)}}function oe(a,b,c,d,e,f,h,l){var n=Y();try{De(a,b,c,d,e,f,h,l)}catch(m){Z(n);if(m!==m+0)throw m;X(1,0)}}function pe(a,b,c,d,e){var f=Y();try{Ee(a,b,c,d,e)}catch(h){Z(f);if(h!==h+0)throw h;X(1,0)}}function de(a,b,c,d,e,f){var h=Y();try{return Fe(a,b,c,d,e,f)}catch(l){Z(h);if(l!==l+0)throw l;X(1,0)}}
|
Binary file
|
@@ -384,6 +384,9 @@ export class CoinType {
|
|
384
384
|
static internetComputer: CoinType;
|
385
385
|
static tia: CoinType;
|
386
386
|
static mantaPacific: CoinType;
|
387
|
+
static nativeZetaChain: CoinType;
|
388
|
+
static zetaEVM: CoinType;
|
389
|
+
static dydx: CoinType;
|
387
390
|
}
|
388
391
|
export class CoinTypeConfiguration {
|
389
392
|
static getSymbol(type: CoinType): string;
|
@@ -565,6 +568,7 @@ export class EthereumChainID {
|
|
565
568
|
static arbitrumnova: EthereumChainID;
|
566
569
|
static arbitrum: EthereumChainID;
|
567
570
|
static smartchain: EthereumChainID;
|
571
|
+
static zetaevm: EthereumChainID;
|
568
572
|
static neon: EthereumChainID;
|
569
573
|
static aurora: EthereumChainID;
|
570
574
|
}
|
@@ -688,6 +692,7 @@ export class HRP {
|
|
688
692
|
static osmosis: HRP;
|
689
693
|
static terraV2: HRP;
|
690
694
|
static coreum: HRP;
|
695
|
+
static nativeZetaChain: HRP;
|
691
696
|
static nativeCanto: HRP;
|
692
697
|
static sommelier: HRP;
|
693
698
|
static fetchAI: HRP;
|
@@ -701,6 +706,7 @@ export class HRP {
|
|
701
706
|
static stargaze: HRP;
|
702
707
|
static nativeEvmos: HRP;
|
703
708
|
static tia: HRP;
|
709
|
+
static dydx: HRP;
|
704
710
|
static juno: HRP;
|
705
711
|
static tbinance: HRP;
|
706
712
|
static stride: HRP;
|