@trustwallet/wallet-core 4.3.0 → 4.3.2
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 +120 -29
- package/dist/generated/core_proto.js +311 -62
- package/dist/lib/wallet-core.js +1 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/package.json +1 -1
@@ -17001,74 +17001,165 @@ export namespace TW {
|
|
17001
17001
|
public toJSON(): { [k: string]: any };
|
17002
17002
|
}
|
17003
17003
|
|
17004
|
-
/** Properties of an
|
17005
|
-
interface
|
17004
|
+
/** Properties of an Authorization. */
|
17005
|
+
interface IAuthorization {
|
17006
17006
|
|
17007
|
-
/**
|
17007
|
+
/** Authorization address */
|
17008
17008
|
address?: (string|null);
|
17009
|
+
|
17010
|
+
/** Authorization customSignature */
|
17011
|
+
customSignature?: (TW.Ethereum.Proto.IAuthorizationCustomSignature|null);
|
17009
17012
|
}
|
17010
17013
|
|
17011
|
-
/** Represents an
|
17012
|
-
class
|
17014
|
+
/** Represents an Authorization. */
|
17015
|
+
class Authorization implements IAuthorization {
|
17013
17016
|
|
17014
17017
|
/**
|
17015
|
-
* Constructs a new
|
17018
|
+
* Constructs a new Authorization.
|
17016
17019
|
* @param [properties] Properties to set
|
17017
17020
|
*/
|
17018
|
-
constructor(properties?: TW.Ethereum.Proto.
|
17021
|
+
constructor(properties?: TW.Ethereum.Proto.IAuthorization);
|
17019
17022
|
|
17020
|
-
/**
|
17023
|
+
/** Authorization address. */
|
17021
17024
|
public address: string;
|
17022
17025
|
|
17026
|
+
/** Authorization customSignature. */
|
17027
|
+
public customSignature?: (TW.Ethereum.Proto.IAuthorizationCustomSignature|null);
|
17028
|
+
|
17029
|
+
/**
|
17030
|
+
* Creates a new Authorization instance using the specified properties.
|
17031
|
+
* @param [properties] Properties to set
|
17032
|
+
* @returns Authorization instance
|
17033
|
+
*/
|
17034
|
+
public static create(properties?: TW.Ethereum.Proto.IAuthorization): TW.Ethereum.Proto.Authorization;
|
17035
|
+
|
17036
|
+
/**
|
17037
|
+
* Encodes the specified Authorization message. Does not implicitly {@link TW.Ethereum.Proto.Authorization.verify|verify} messages.
|
17038
|
+
* @param message Authorization message or plain object to encode
|
17039
|
+
* @param [writer] Writer to encode to
|
17040
|
+
* @returns Writer
|
17041
|
+
*/
|
17042
|
+
public static encode(message: TW.Ethereum.Proto.IAuthorization, writer?: $protobuf.Writer): $protobuf.Writer;
|
17043
|
+
|
17044
|
+
/**
|
17045
|
+
* Decodes an Authorization message from the specified reader or buffer.
|
17046
|
+
* @param reader Reader or buffer to decode from
|
17047
|
+
* @param [length] Message length if known beforehand
|
17048
|
+
* @returns Authorization
|
17049
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
17050
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17051
|
+
*/
|
17052
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Ethereum.Proto.Authorization;
|
17053
|
+
|
17054
|
+
/**
|
17055
|
+
* Verifies an Authorization message.
|
17056
|
+
* @param message Plain object to verify
|
17057
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
17058
|
+
*/
|
17059
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
17060
|
+
|
17061
|
+
/**
|
17062
|
+
* Creates an Authorization message from a plain object. Also converts values to their respective internal types.
|
17063
|
+
* @param object Plain object
|
17064
|
+
* @returns Authorization
|
17065
|
+
*/
|
17066
|
+
public static fromObject(object: { [k: string]: any }): TW.Ethereum.Proto.Authorization;
|
17067
|
+
|
17068
|
+
/**
|
17069
|
+
* Creates a plain object from an Authorization message. Also converts values to other types if specified.
|
17070
|
+
* @param message Authorization
|
17071
|
+
* @param [options] Conversion options
|
17072
|
+
* @returns Plain object
|
17073
|
+
*/
|
17074
|
+
public static toObject(message: TW.Ethereum.Proto.Authorization, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
17075
|
+
|
17076
|
+
/**
|
17077
|
+
* Converts this Authorization to JSON.
|
17078
|
+
* @returns JSON object
|
17079
|
+
*/
|
17080
|
+
public toJSON(): { [k: string]: any };
|
17081
|
+
}
|
17082
|
+
|
17083
|
+
/** Properties of an AuthorizationCustomSignature. */
|
17084
|
+
interface IAuthorizationCustomSignature {
|
17085
|
+
|
17086
|
+
/** AuthorizationCustomSignature chainId */
|
17087
|
+
chainId?: (Uint8Array|null);
|
17088
|
+
|
17089
|
+
/** AuthorizationCustomSignature nonce */
|
17090
|
+
nonce?: (Uint8Array|null);
|
17091
|
+
|
17092
|
+
/** AuthorizationCustomSignature signature */
|
17093
|
+
signature?: (string|null);
|
17094
|
+
}
|
17095
|
+
|
17096
|
+
/** Represents an AuthorizationCustomSignature. */
|
17097
|
+
class AuthorizationCustomSignature implements IAuthorizationCustomSignature {
|
17098
|
+
|
17099
|
+
/**
|
17100
|
+
* Constructs a new AuthorizationCustomSignature.
|
17101
|
+
* @param [properties] Properties to set
|
17102
|
+
*/
|
17103
|
+
constructor(properties?: TW.Ethereum.Proto.IAuthorizationCustomSignature);
|
17104
|
+
|
17105
|
+
/** AuthorizationCustomSignature chainId. */
|
17106
|
+
public chainId: Uint8Array;
|
17107
|
+
|
17108
|
+
/** AuthorizationCustomSignature nonce. */
|
17109
|
+
public nonce: Uint8Array;
|
17110
|
+
|
17111
|
+
/** AuthorizationCustomSignature signature. */
|
17112
|
+
public signature: string;
|
17113
|
+
|
17023
17114
|
/**
|
17024
|
-
* Creates a new
|
17115
|
+
* Creates a new AuthorizationCustomSignature instance using the specified properties.
|
17025
17116
|
* @param [properties] Properties to set
|
17026
|
-
* @returns
|
17117
|
+
* @returns AuthorizationCustomSignature instance
|
17027
17118
|
*/
|
17028
|
-
public static create(properties?: TW.Ethereum.Proto.
|
17119
|
+
public static create(properties?: TW.Ethereum.Proto.IAuthorizationCustomSignature): TW.Ethereum.Proto.AuthorizationCustomSignature;
|
17029
17120
|
|
17030
17121
|
/**
|
17031
|
-
* Encodes the specified
|
17032
|
-
* @param message
|
17122
|
+
* Encodes the specified AuthorizationCustomSignature message. Does not implicitly {@link TW.Ethereum.Proto.AuthorizationCustomSignature.verify|verify} messages.
|
17123
|
+
* @param message AuthorizationCustomSignature message or plain object to encode
|
17033
17124
|
* @param [writer] Writer to encode to
|
17034
17125
|
* @returns Writer
|
17035
17126
|
*/
|
17036
|
-
public static encode(message: TW.Ethereum.Proto.
|
17127
|
+
public static encode(message: TW.Ethereum.Proto.IAuthorizationCustomSignature, writer?: $protobuf.Writer): $protobuf.Writer;
|
17037
17128
|
|
17038
17129
|
/**
|
17039
|
-
* Decodes an
|
17130
|
+
* Decodes an AuthorizationCustomSignature message from the specified reader or buffer.
|
17040
17131
|
* @param reader Reader or buffer to decode from
|
17041
17132
|
* @param [length] Message length if known beforehand
|
17042
|
-
* @returns
|
17133
|
+
* @returns AuthorizationCustomSignature
|
17043
17134
|
* @throws {Error} If the payload is not a reader or valid buffer
|
17044
17135
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17045
17136
|
*/
|
17046
|
-
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Ethereum.Proto.
|
17137
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Ethereum.Proto.AuthorizationCustomSignature;
|
17047
17138
|
|
17048
17139
|
/**
|
17049
|
-
* Verifies an
|
17140
|
+
* Verifies an AuthorizationCustomSignature message.
|
17050
17141
|
* @param message Plain object to verify
|
17051
17142
|
* @returns `null` if valid, otherwise the reason why it is not
|
17052
17143
|
*/
|
17053
17144
|
public static verify(message: { [k: string]: any }): (string|null);
|
17054
17145
|
|
17055
17146
|
/**
|
17056
|
-
* Creates an
|
17147
|
+
* Creates an AuthorizationCustomSignature message from a plain object. Also converts values to their respective internal types.
|
17057
17148
|
* @param object Plain object
|
17058
|
-
* @returns
|
17149
|
+
* @returns AuthorizationCustomSignature
|
17059
17150
|
*/
|
17060
|
-
public static fromObject(object: { [k: string]: any }): TW.Ethereum.Proto.
|
17151
|
+
public static fromObject(object: { [k: string]: any }): TW.Ethereum.Proto.AuthorizationCustomSignature;
|
17061
17152
|
|
17062
17153
|
/**
|
17063
|
-
* Creates a plain object from an
|
17064
|
-
* @param message
|
17154
|
+
* Creates a plain object from an AuthorizationCustomSignature message. Also converts values to other types if specified.
|
17155
|
+
* @param message AuthorizationCustomSignature
|
17065
17156
|
* @param [options] Conversion options
|
17066
17157
|
* @returns Plain object
|
17067
17158
|
*/
|
17068
|
-
public static toObject(message: TW.Ethereum.Proto.
|
17159
|
+
public static toObject(message: TW.Ethereum.Proto.AuthorizationCustomSignature, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
17069
17160
|
|
17070
17161
|
/**
|
17071
|
-
* Converts this
|
17162
|
+
* Converts this AuthorizationCustomSignature to JSON.
|
17072
17163
|
* @returns JSON object
|
17073
17164
|
*/
|
17074
17165
|
public toJSON(): { [k: string]: any };
|
@@ -17123,8 +17214,8 @@ export namespace TW {
|
|
17123
17214
|
/** SigningInput accessList */
|
17124
17215
|
accessList?: (TW.Ethereum.Proto.IAccess[]|null);
|
17125
17216
|
|
17126
|
-
/** SigningInput
|
17127
|
-
|
17217
|
+
/** SigningInput eip7702Authorization */
|
17218
|
+
eip7702Authorization?: (TW.Ethereum.Proto.IAuthorization|null);
|
17128
17219
|
}
|
17129
17220
|
|
17130
17221
|
/** Represents a SigningInput. */
|
@@ -17175,8 +17266,8 @@ export namespace TW {
|
|
17175
17266
|
/** SigningInput accessList. */
|
17176
17267
|
public accessList: TW.Ethereum.Proto.IAccess[];
|
17177
17268
|
|
17178
|
-
/** SigningInput
|
17179
|
-
public
|
17269
|
+
/** SigningInput eip7702Authorization. */
|
17270
|
+
public eip7702Authorization?: (TW.Ethereum.Proto.IAuthorization|null);
|
17180
17271
|
|
17181
17272
|
/** SigningInput userOperationOneof. */
|
17182
17273
|
public userOperationOneof?: ("userOperation"|"userOperationV0_7");
|
@@ -50466,24 +50466,25 @@
|
|
50466
50466
|
return Access;
|
50467
50467
|
})();
|
50468
50468
|
|
50469
|
-
Proto.
|
50469
|
+
Proto.Authorization = (function() {
|
50470
50470
|
|
50471
50471
|
/**
|
50472
|
-
* Properties of an
|
50472
|
+
* Properties of an Authorization.
|
50473
50473
|
* @memberof TW.Ethereum.Proto
|
50474
|
-
* @interface
|
50475
|
-
* @property {string|null} [address]
|
50474
|
+
* @interface IAuthorization
|
50475
|
+
* @property {string|null} [address] Authorization address
|
50476
|
+
* @property {TW.Ethereum.Proto.IAuthorizationCustomSignature|null} [customSignature] Authorization customSignature
|
50476
50477
|
*/
|
50477
50478
|
|
50478
50479
|
/**
|
50479
|
-
* Constructs a new
|
50480
|
+
* Constructs a new Authorization.
|
50480
50481
|
* @memberof TW.Ethereum.Proto
|
50481
|
-
* @classdesc Represents an
|
50482
|
-
* @implements
|
50482
|
+
* @classdesc Represents an Authorization.
|
50483
|
+
* @implements IAuthorization
|
50483
50484
|
* @constructor
|
50484
|
-
* @param {TW.Ethereum.Proto.
|
50485
|
+
* @param {TW.Ethereum.Proto.IAuthorization=} [properties] Properties to set
|
50485
50486
|
*/
|
50486
|
-
function
|
50487
|
+
function Authorization(properties) {
|
50487
50488
|
if (properties)
|
50488
50489
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
50489
50490
|
if (properties[keys[i]] != null)
|
@@ -50491,63 +50492,76 @@
|
|
50491
50492
|
}
|
50492
50493
|
|
50493
50494
|
/**
|
50494
|
-
*
|
50495
|
+
* Authorization address.
|
50495
50496
|
* @member {string} address
|
50496
|
-
* @memberof TW.Ethereum.Proto.
|
50497
|
+
* @memberof TW.Ethereum.Proto.Authorization
|
50497
50498
|
* @instance
|
50498
50499
|
*/
|
50499
|
-
|
50500
|
+
Authorization.prototype.address = "";
|
50500
50501
|
|
50501
50502
|
/**
|
50502
|
-
*
|
50503
|
+
* Authorization customSignature.
|
50504
|
+
* @member {TW.Ethereum.Proto.IAuthorizationCustomSignature|null|undefined} customSignature
|
50505
|
+
* @memberof TW.Ethereum.Proto.Authorization
|
50506
|
+
* @instance
|
50507
|
+
*/
|
50508
|
+
Authorization.prototype.customSignature = null;
|
50509
|
+
|
50510
|
+
/**
|
50511
|
+
* Creates a new Authorization instance using the specified properties.
|
50503
50512
|
* @function create
|
50504
|
-
* @memberof TW.Ethereum.Proto.
|
50513
|
+
* @memberof TW.Ethereum.Proto.Authorization
|
50505
50514
|
* @static
|
50506
|
-
* @param {TW.Ethereum.Proto.
|
50507
|
-
* @returns {TW.Ethereum.Proto.
|
50515
|
+
* @param {TW.Ethereum.Proto.IAuthorization=} [properties] Properties to set
|
50516
|
+
* @returns {TW.Ethereum.Proto.Authorization} Authorization instance
|
50508
50517
|
*/
|
50509
|
-
|
50510
|
-
return new
|
50518
|
+
Authorization.create = function create(properties) {
|
50519
|
+
return new Authorization(properties);
|
50511
50520
|
};
|
50512
50521
|
|
50513
50522
|
/**
|
50514
|
-
* Encodes the specified
|
50523
|
+
* Encodes the specified Authorization message. Does not implicitly {@link TW.Ethereum.Proto.Authorization.verify|verify} messages.
|
50515
50524
|
* @function encode
|
50516
|
-
* @memberof TW.Ethereum.Proto.
|
50525
|
+
* @memberof TW.Ethereum.Proto.Authorization
|
50517
50526
|
* @static
|
50518
|
-
* @param {TW.Ethereum.Proto.
|
50527
|
+
* @param {TW.Ethereum.Proto.IAuthorization} message Authorization message or plain object to encode
|
50519
50528
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
50520
50529
|
* @returns {$protobuf.Writer} Writer
|
50521
50530
|
*/
|
50522
|
-
|
50531
|
+
Authorization.encode = function encode(message, writer) {
|
50523
50532
|
if (!writer)
|
50524
50533
|
writer = $Writer.create();
|
50525
50534
|
if (message.address != null && Object.hasOwnProperty.call(message, "address"))
|
50526
50535
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.address);
|
50536
|
+
if (message.customSignature != null && Object.hasOwnProperty.call(message, "customSignature"))
|
50537
|
+
$root.TW.Ethereum.Proto.AuthorizationCustomSignature.encode(message.customSignature, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
50527
50538
|
return writer;
|
50528
50539
|
};
|
50529
50540
|
|
50530
50541
|
/**
|
50531
|
-
* Decodes an
|
50542
|
+
* Decodes an Authorization message from the specified reader or buffer.
|
50532
50543
|
* @function decode
|
50533
|
-
* @memberof TW.Ethereum.Proto.
|
50544
|
+
* @memberof TW.Ethereum.Proto.Authorization
|
50534
50545
|
* @static
|
50535
50546
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
50536
50547
|
* @param {number} [length] Message length if known beforehand
|
50537
|
-
* @returns {TW.Ethereum.Proto.
|
50548
|
+
* @returns {TW.Ethereum.Proto.Authorization} Authorization
|
50538
50549
|
* @throws {Error} If the payload is not a reader or valid buffer
|
50539
50550
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
50540
50551
|
*/
|
50541
|
-
|
50552
|
+
Authorization.decode = function decode(reader, length) {
|
50542
50553
|
if (!(reader instanceof $Reader))
|
50543
50554
|
reader = $Reader.create(reader);
|
50544
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ethereum.Proto.
|
50555
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ethereum.Proto.Authorization();
|
50545
50556
|
while (reader.pos < end) {
|
50546
50557
|
var tag = reader.uint32();
|
50547
50558
|
switch (tag >>> 3) {
|
50548
50559
|
case 2:
|
50549
50560
|
message.address = reader.string();
|
50550
50561
|
break;
|
50562
|
+
case 3:
|
50563
|
+
message.customSignature = $root.TW.Ethereum.Proto.AuthorizationCustomSignature.decode(reader, reader.uint32());
|
50564
|
+
break;
|
50551
50565
|
default:
|
50552
50566
|
reader.skipType(tag & 7);
|
50553
50567
|
break;
|
@@ -50557,71 +50571,306 @@
|
|
50557
50571
|
};
|
50558
50572
|
|
50559
50573
|
/**
|
50560
|
-
* Verifies an
|
50574
|
+
* Verifies an Authorization message.
|
50561
50575
|
* @function verify
|
50562
|
-
* @memberof TW.Ethereum.Proto.
|
50576
|
+
* @memberof TW.Ethereum.Proto.Authorization
|
50563
50577
|
* @static
|
50564
50578
|
* @param {Object.<string,*>} message Plain object to verify
|
50565
50579
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
50566
50580
|
*/
|
50567
|
-
|
50581
|
+
Authorization.verify = function verify(message) {
|
50568
50582
|
if (typeof message !== "object" || message === null)
|
50569
50583
|
return "object expected";
|
50570
50584
|
if (message.address != null && message.hasOwnProperty("address"))
|
50571
50585
|
if (!$util.isString(message.address))
|
50572
50586
|
return "address: string expected";
|
50587
|
+
if (message.customSignature != null && message.hasOwnProperty("customSignature")) {
|
50588
|
+
var error = $root.TW.Ethereum.Proto.AuthorizationCustomSignature.verify(message.customSignature);
|
50589
|
+
if (error)
|
50590
|
+
return "customSignature." + error;
|
50591
|
+
}
|
50573
50592
|
return null;
|
50574
50593
|
};
|
50575
50594
|
|
50576
50595
|
/**
|
50577
|
-
* Creates an
|
50596
|
+
* Creates an Authorization message from a plain object. Also converts values to their respective internal types.
|
50578
50597
|
* @function fromObject
|
50579
|
-
* @memberof TW.Ethereum.Proto.
|
50598
|
+
* @memberof TW.Ethereum.Proto.Authorization
|
50580
50599
|
* @static
|
50581
50600
|
* @param {Object.<string,*>} object Plain object
|
50582
|
-
* @returns {TW.Ethereum.Proto.
|
50601
|
+
* @returns {TW.Ethereum.Proto.Authorization} Authorization
|
50583
50602
|
*/
|
50584
|
-
|
50585
|
-
if (object instanceof $root.TW.Ethereum.Proto.
|
50603
|
+
Authorization.fromObject = function fromObject(object) {
|
50604
|
+
if (object instanceof $root.TW.Ethereum.Proto.Authorization)
|
50586
50605
|
return object;
|
50587
|
-
var message = new $root.TW.Ethereum.Proto.
|
50606
|
+
var message = new $root.TW.Ethereum.Proto.Authorization();
|
50588
50607
|
if (object.address != null)
|
50589
50608
|
message.address = String(object.address);
|
50609
|
+
if (object.customSignature != null) {
|
50610
|
+
if (typeof object.customSignature !== "object")
|
50611
|
+
throw TypeError(".TW.Ethereum.Proto.Authorization.customSignature: object expected");
|
50612
|
+
message.customSignature = $root.TW.Ethereum.Proto.AuthorizationCustomSignature.fromObject(object.customSignature);
|
50613
|
+
}
|
50590
50614
|
return message;
|
50591
50615
|
};
|
50592
50616
|
|
50593
50617
|
/**
|
50594
|
-
* Creates a plain object from an
|
50618
|
+
* Creates a plain object from an Authorization message. Also converts values to other types if specified.
|
50595
50619
|
* @function toObject
|
50596
|
-
* @memberof TW.Ethereum.Proto.
|
50620
|
+
* @memberof TW.Ethereum.Proto.Authorization
|
50597
50621
|
* @static
|
50598
|
-
* @param {TW.Ethereum.Proto.
|
50622
|
+
* @param {TW.Ethereum.Proto.Authorization} message Authorization
|
50599
50623
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
50600
50624
|
* @returns {Object.<string,*>} Plain object
|
50601
50625
|
*/
|
50602
|
-
|
50626
|
+
Authorization.toObject = function toObject(message, options) {
|
50603
50627
|
if (!options)
|
50604
50628
|
options = {};
|
50605
50629
|
var object = {};
|
50606
|
-
if (options.defaults)
|
50630
|
+
if (options.defaults) {
|
50607
50631
|
object.address = "";
|
50632
|
+
object.customSignature = null;
|
50633
|
+
}
|
50608
50634
|
if (message.address != null && message.hasOwnProperty("address"))
|
50609
50635
|
object.address = message.address;
|
50636
|
+
if (message.customSignature != null && message.hasOwnProperty("customSignature"))
|
50637
|
+
object.customSignature = $root.TW.Ethereum.Proto.AuthorizationCustomSignature.toObject(message.customSignature, options);
|
50638
|
+
return object;
|
50639
|
+
};
|
50640
|
+
|
50641
|
+
/**
|
50642
|
+
* Converts this Authorization to JSON.
|
50643
|
+
* @function toJSON
|
50644
|
+
* @memberof TW.Ethereum.Proto.Authorization
|
50645
|
+
* @instance
|
50646
|
+
* @returns {Object.<string,*>} JSON object
|
50647
|
+
*/
|
50648
|
+
Authorization.prototype.toJSON = function toJSON() {
|
50649
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
50650
|
+
};
|
50651
|
+
|
50652
|
+
return Authorization;
|
50653
|
+
})();
|
50654
|
+
|
50655
|
+
Proto.AuthorizationCustomSignature = (function() {
|
50656
|
+
|
50657
|
+
/**
|
50658
|
+
* Properties of an AuthorizationCustomSignature.
|
50659
|
+
* @memberof TW.Ethereum.Proto
|
50660
|
+
* @interface IAuthorizationCustomSignature
|
50661
|
+
* @property {Uint8Array|null} [chainId] AuthorizationCustomSignature chainId
|
50662
|
+
* @property {Uint8Array|null} [nonce] AuthorizationCustomSignature nonce
|
50663
|
+
* @property {string|null} [signature] AuthorizationCustomSignature signature
|
50664
|
+
*/
|
50665
|
+
|
50666
|
+
/**
|
50667
|
+
* Constructs a new AuthorizationCustomSignature.
|
50668
|
+
* @memberof TW.Ethereum.Proto
|
50669
|
+
* @classdesc Represents an AuthorizationCustomSignature.
|
50670
|
+
* @implements IAuthorizationCustomSignature
|
50671
|
+
* @constructor
|
50672
|
+
* @param {TW.Ethereum.Proto.IAuthorizationCustomSignature=} [properties] Properties to set
|
50673
|
+
*/
|
50674
|
+
function AuthorizationCustomSignature(properties) {
|
50675
|
+
if (properties)
|
50676
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
50677
|
+
if (properties[keys[i]] != null)
|
50678
|
+
this[keys[i]] = properties[keys[i]];
|
50679
|
+
}
|
50680
|
+
|
50681
|
+
/**
|
50682
|
+
* AuthorizationCustomSignature chainId.
|
50683
|
+
* @member {Uint8Array} chainId
|
50684
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50685
|
+
* @instance
|
50686
|
+
*/
|
50687
|
+
AuthorizationCustomSignature.prototype.chainId = $util.newBuffer([]);
|
50688
|
+
|
50689
|
+
/**
|
50690
|
+
* AuthorizationCustomSignature nonce.
|
50691
|
+
* @member {Uint8Array} nonce
|
50692
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50693
|
+
* @instance
|
50694
|
+
*/
|
50695
|
+
AuthorizationCustomSignature.prototype.nonce = $util.newBuffer([]);
|
50696
|
+
|
50697
|
+
/**
|
50698
|
+
* AuthorizationCustomSignature signature.
|
50699
|
+
* @member {string} signature
|
50700
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50701
|
+
* @instance
|
50702
|
+
*/
|
50703
|
+
AuthorizationCustomSignature.prototype.signature = "";
|
50704
|
+
|
50705
|
+
/**
|
50706
|
+
* Creates a new AuthorizationCustomSignature instance using the specified properties.
|
50707
|
+
* @function create
|
50708
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50709
|
+
* @static
|
50710
|
+
* @param {TW.Ethereum.Proto.IAuthorizationCustomSignature=} [properties] Properties to set
|
50711
|
+
* @returns {TW.Ethereum.Proto.AuthorizationCustomSignature} AuthorizationCustomSignature instance
|
50712
|
+
*/
|
50713
|
+
AuthorizationCustomSignature.create = function create(properties) {
|
50714
|
+
return new AuthorizationCustomSignature(properties);
|
50715
|
+
};
|
50716
|
+
|
50717
|
+
/**
|
50718
|
+
* Encodes the specified AuthorizationCustomSignature message. Does not implicitly {@link TW.Ethereum.Proto.AuthorizationCustomSignature.verify|verify} messages.
|
50719
|
+
* @function encode
|
50720
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50721
|
+
* @static
|
50722
|
+
* @param {TW.Ethereum.Proto.IAuthorizationCustomSignature} message AuthorizationCustomSignature message or plain object to encode
|
50723
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
50724
|
+
* @returns {$protobuf.Writer} Writer
|
50725
|
+
*/
|
50726
|
+
AuthorizationCustomSignature.encode = function encode(message, writer) {
|
50727
|
+
if (!writer)
|
50728
|
+
writer = $Writer.create();
|
50729
|
+
if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId"))
|
50730
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.chainId);
|
50731
|
+
if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce"))
|
50732
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.nonce);
|
50733
|
+
if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
|
50734
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.signature);
|
50735
|
+
return writer;
|
50736
|
+
};
|
50737
|
+
|
50738
|
+
/**
|
50739
|
+
* Decodes an AuthorizationCustomSignature message from the specified reader or buffer.
|
50740
|
+
* @function decode
|
50741
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50742
|
+
* @static
|
50743
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
50744
|
+
* @param {number} [length] Message length if known beforehand
|
50745
|
+
* @returns {TW.Ethereum.Proto.AuthorizationCustomSignature} AuthorizationCustomSignature
|
50746
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
50747
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
50748
|
+
*/
|
50749
|
+
AuthorizationCustomSignature.decode = function decode(reader, length) {
|
50750
|
+
if (!(reader instanceof $Reader))
|
50751
|
+
reader = $Reader.create(reader);
|
50752
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Ethereum.Proto.AuthorizationCustomSignature();
|
50753
|
+
while (reader.pos < end) {
|
50754
|
+
var tag = reader.uint32();
|
50755
|
+
switch (tag >>> 3) {
|
50756
|
+
case 1:
|
50757
|
+
message.chainId = reader.bytes();
|
50758
|
+
break;
|
50759
|
+
case 2:
|
50760
|
+
message.nonce = reader.bytes();
|
50761
|
+
break;
|
50762
|
+
case 3:
|
50763
|
+
message.signature = reader.string();
|
50764
|
+
break;
|
50765
|
+
default:
|
50766
|
+
reader.skipType(tag & 7);
|
50767
|
+
break;
|
50768
|
+
}
|
50769
|
+
}
|
50770
|
+
return message;
|
50771
|
+
};
|
50772
|
+
|
50773
|
+
/**
|
50774
|
+
* Verifies an AuthorizationCustomSignature message.
|
50775
|
+
* @function verify
|
50776
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50777
|
+
* @static
|
50778
|
+
* @param {Object.<string,*>} message Plain object to verify
|
50779
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
50780
|
+
*/
|
50781
|
+
AuthorizationCustomSignature.verify = function verify(message) {
|
50782
|
+
if (typeof message !== "object" || message === null)
|
50783
|
+
return "object expected";
|
50784
|
+
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
50785
|
+
if (!(message.chainId && typeof message.chainId.length === "number" || $util.isString(message.chainId)))
|
50786
|
+
return "chainId: buffer expected";
|
50787
|
+
if (message.nonce != null && message.hasOwnProperty("nonce"))
|
50788
|
+
if (!(message.nonce && typeof message.nonce.length === "number" || $util.isString(message.nonce)))
|
50789
|
+
return "nonce: buffer expected";
|
50790
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
50791
|
+
if (!$util.isString(message.signature))
|
50792
|
+
return "signature: string expected";
|
50793
|
+
return null;
|
50794
|
+
};
|
50795
|
+
|
50796
|
+
/**
|
50797
|
+
* Creates an AuthorizationCustomSignature message from a plain object. Also converts values to their respective internal types.
|
50798
|
+
* @function fromObject
|
50799
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50800
|
+
* @static
|
50801
|
+
* @param {Object.<string,*>} object Plain object
|
50802
|
+
* @returns {TW.Ethereum.Proto.AuthorizationCustomSignature} AuthorizationCustomSignature
|
50803
|
+
*/
|
50804
|
+
AuthorizationCustomSignature.fromObject = function fromObject(object) {
|
50805
|
+
if (object instanceof $root.TW.Ethereum.Proto.AuthorizationCustomSignature)
|
50806
|
+
return object;
|
50807
|
+
var message = new $root.TW.Ethereum.Proto.AuthorizationCustomSignature();
|
50808
|
+
if (object.chainId != null)
|
50809
|
+
if (typeof object.chainId === "string")
|
50810
|
+
$util.base64.decode(object.chainId, message.chainId = $util.newBuffer($util.base64.length(object.chainId)), 0);
|
50811
|
+
else if (object.chainId.length)
|
50812
|
+
message.chainId = object.chainId;
|
50813
|
+
if (object.nonce != null)
|
50814
|
+
if (typeof object.nonce === "string")
|
50815
|
+
$util.base64.decode(object.nonce, message.nonce = $util.newBuffer($util.base64.length(object.nonce)), 0);
|
50816
|
+
else if (object.nonce.length)
|
50817
|
+
message.nonce = object.nonce;
|
50818
|
+
if (object.signature != null)
|
50819
|
+
message.signature = String(object.signature);
|
50820
|
+
return message;
|
50821
|
+
};
|
50822
|
+
|
50823
|
+
/**
|
50824
|
+
* Creates a plain object from an AuthorizationCustomSignature message. Also converts values to other types if specified.
|
50825
|
+
* @function toObject
|
50826
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50827
|
+
* @static
|
50828
|
+
* @param {TW.Ethereum.Proto.AuthorizationCustomSignature} message AuthorizationCustomSignature
|
50829
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
50830
|
+
* @returns {Object.<string,*>} Plain object
|
50831
|
+
*/
|
50832
|
+
AuthorizationCustomSignature.toObject = function toObject(message, options) {
|
50833
|
+
if (!options)
|
50834
|
+
options = {};
|
50835
|
+
var object = {};
|
50836
|
+
if (options.defaults) {
|
50837
|
+
if (options.bytes === String)
|
50838
|
+
object.chainId = "";
|
50839
|
+
else {
|
50840
|
+
object.chainId = [];
|
50841
|
+
if (options.bytes !== Array)
|
50842
|
+
object.chainId = $util.newBuffer(object.chainId);
|
50843
|
+
}
|
50844
|
+
if (options.bytes === String)
|
50845
|
+
object.nonce = "";
|
50846
|
+
else {
|
50847
|
+
object.nonce = [];
|
50848
|
+
if (options.bytes !== Array)
|
50849
|
+
object.nonce = $util.newBuffer(object.nonce);
|
50850
|
+
}
|
50851
|
+
object.signature = "";
|
50852
|
+
}
|
50853
|
+
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
50854
|
+
object.chainId = options.bytes === String ? $util.base64.encode(message.chainId, 0, message.chainId.length) : options.bytes === Array ? Array.prototype.slice.call(message.chainId) : message.chainId;
|
50855
|
+
if (message.nonce != null && message.hasOwnProperty("nonce"))
|
50856
|
+
object.nonce = options.bytes === String ? $util.base64.encode(message.nonce, 0, message.nonce.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonce) : message.nonce;
|
50857
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
50858
|
+
object.signature = message.signature;
|
50610
50859
|
return object;
|
50611
50860
|
};
|
50612
50861
|
|
50613
50862
|
/**
|
50614
|
-
* Converts this
|
50863
|
+
* Converts this AuthorizationCustomSignature to JSON.
|
50615
50864
|
* @function toJSON
|
50616
|
-
* @memberof TW.Ethereum.Proto.
|
50865
|
+
* @memberof TW.Ethereum.Proto.AuthorizationCustomSignature
|
50617
50866
|
* @instance
|
50618
50867
|
* @returns {Object.<string,*>} JSON object
|
50619
50868
|
*/
|
50620
|
-
|
50869
|
+
AuthorizationCustomSignature.prototype.toJSON = function toJSON() {
|
50621
50870
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
50622
50871
|
};
|
50623
50872
|
|
50624
|
-
return
|
50873
|
+
return AuthorizationCustomSignature;
|
50625
50874
|
})();
|
50626
50875
|
|
50627
50876
|
/**
|
@@ -50659,7 +50908,7 @@
|
|
50659
50908
|
* @property {TW.Ethereum.Proto.IUserOperation|null} [userOperation] SigningInput userOperation
|
50660
50909
|
* @property {TW.Ethereum.Proto.IUserOperationV0_7|null} [userOperationV0_7] SigningInput userOperationV0_7
|
50661
50910
|
* @property {Array.<TW.Ethereum.Proto.IAccess>|null} [accessList] SigningInput accessList
|
50662
|
-
* @property {TW.Ethereum.Proto.
|
50911
|
+
* @property {TW.Ethereum.Proto.IAuthorization|null} [eip7702Authorization] SigningInput eip7702Authorization
|
50663
50912
|
*/
|
50664
50913
|
|
50665
50914
|
/**
|
@@ -50783,12 +51032,12 @@
|
|
50783
51032
|
SigningInput.prototype.accessList = $util.emptyArray;
|
50784
51033
|
|
50785
51034
|
/**
|
50786
|
-
* SigningInput
|
50787
|
-
* @member {TW.Ethereum.Proto.
|
51035
|
+
* SigningInput eip7702Authorization.
|
51036
|
+
* @member {TW.Ethereum.Proto.IAuthorization|null|undefined} eip7702Authorization
|
50788
51037
|
* @memberof TW.Ethereum.Proto.SigningInput
|
50789
51038
|
* @instance
|
50790
51039
|
*/
|
50791
|
-
SigningInput.prototype.
|
51040
|
+
SigningInput.prototype.eip7702Authorization = null;
|
50792
51041
|
|
50793
51042
|
// OneOf field names bound to virtual getters and setters
|
50794
51043
|
var $oneOfFields;
|
@@ -50855,8 +51104,8 @@
|
|
50855
51104
|
$root.TW.Ethereum.Proto.Access.encode(message.accessList[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
50856
51105
|
if (message.userOperationV0_7 != null && Object.hasOwnProperty.call(message, "userOperationV0_7"))
|
50857
51106
|
$root.TW.Ethereum.Proto.UserOperationV0_7.encode(message.userOperationV0_7, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
50858
|
-
if (message.
|
50859
|
-
$root.TW.Ethereum.Proto.
|
51107
|
+
if (message.eip7702Authorization != null && Object.hasOwnProperty.call(message, "eip7702Authorization"))
|
51108
|
+
$root.TW.Ethereum.Proto.Authorization.encode(message.eip7702Authorization, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
|
50860
51109
|
return writer;
|
50861
51110
|
};
|
50862
51111
|
|
@@ -50920,7 +51169,7 @@
|
|
50920
51169
|
message.accessList.push($root.TW.Ethereum.Proto.Access.decode(reader, reader.uint32()));
|
50921
51170
|
break;
|
50922
51171
|
case 15:
|
50923
|
-
message.
|
51172
|
+
message.eip7702Authorization = $root.TW.Ethereum.Proto.Authorization.decode(reader, reader.uint32());
|
50924
51173
|
break;
|
50925
51174
|
default:
|
50926
51175
|
reader.skipType(tag & 7);
|
@@ -51008,10 +51257,10 @@
|
|
51008
51257
|
return "accessList." + error;
|
51009
51258
|
}
|
51010
51259
|
}
|
51011
|
-
if (message.
|
51012
|
-
var error = $root.TW.Ethereum.Proto.
|
51260
|
+
if (message.eip7702Authorization != null && message.hasOwnProperty("eip7702Authorization")) {
|
51261
|
+
var error = $root.TW.Ethereum.Proto.Authorization.verify(message.eip7702Authorization);
|
51013
51262
|
if (error)
|
51014
|
-
return "
|
51263
|
+
return "eip7702Authorization." + error;
|
51015
51264
|
}
|
51016
51265
|
return null;
|
51017
51266
|
};
|
@@ -51108,10 +51357,10 @@
|
|
51108
51357
|
message.accessList[i] = $root.TW.Ethereum.Proto.Access.fromObject(object.accessList[i]);
|
51109
51358
|
}
|
51110
51359
|
}
|
51111
|
-
if (object.
|
51112
|
-
if (typeof object.
|
51113
|
-
throw TypeError(".TW.Ethereum.Proto.SigningInput.
|
51114
|
-
message.
|
51360
|
+
if (object.eip7702Authorization != null) {
|
51361
|
+
if (typeof object.eip7702Authorization !== "object")
|
51362
|
+
throw TypeError(".TW.Ethereum.Proto.SigningInput.eip7702Authorization: object expected");
|
51363
|
+
message.eip7702Authorization = $root.TW.Ethereum.Proto.Authorization.fromObject(object.eip7702Authorization);
|
51115
51364
|
}
|
51116
51365
|
return message;
|
51117
51366
|
};
|
@@ -51184,7 +51433,7 @@
|
|
51184
51433
|
object.privateKey = $util.newBuffer(object.privateKey);
|
51185
51434
|
}
|
51186
51435
|
object.transaction = null;
|
51187
|
-
object.
|
51436
|
+
object.eip7702Authorization = null;
|
51188
51437
|
}
|
51189
51438
|
if (message.chainId != null && message.hasOwnProperty("chainId"))
|
51190
51439
|
object.chainId = options.bytes === String ? $util.base64.encode(message.chainId, 0, message.chainId.length) : options.bytes === Array ? Array.prototype.slice.call(message.chainId) : message.chainId;
|
@@ -51221,8 +51470,8 @@
|
|
51221
51470
|
if (options.oneofs)
|
51222
51471
|
object.userOperationOneof = "userOperationV0_7";
|
51223
51472
|
}
|
51224
|
-
if (message.
|
51225
|
-
object.
|
51473
|
+
if (message.eip7702Authorization != null && message.hasOwnProperty("eip7702Authorization"))
|
51474
|
+
object.eip7702Authorization = $root.TW.Ethereum.Proto.Authorization.toObject(message.eip7702Authorization, options);
|
51226
51475
|
return object;
|
51227
51476
|
};
|
51228
51477
|
|
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={2183988:()=>{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";}}},2184710:()=>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
|