@trustwallet/wallet-core 3.1.22 → 3.1.23
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.
@@ -784,6 +784,9 @@ export namespace TW {
|
|
784
784
|
|
785
785
|
/** SigningOutput encoded */
|
786
786
|
encoded?: (Uint8Array|null);
|
787
|
+
|
788
|
+
/** SigningOutput signature */
|
789
|
+
signature?: (string|null);
|
787
790
|
}
|
788
791
|
|
789
792
|
/** Represents a SigningOutput. */
|
@@ -798,6 +801,9 @@ export namespace TW {
|
|
798
801
|
/** SigningOutput encoded. */
|
799
802
|
public encoded: Uint8Array;
|
800
803
|
|
804
|
+
/** SigningOutput signature. */
|
805
|
+
public signature: string;
|
806
|
+
|
801
807
|
/**
|
802
808
|
* Creates a new SigningOutput instance using the specified properties.
|
803
809
|
* @param [properties] Properties to set
|
@@ -2300,6 +2300,7 @@
|
|
2300
2300
|
* @memberof TW.Algorand.Proto
|
2301
2301
|
* @interface ISigningOutput
|
2302
2302
|
* @property {Uint8Array|null} [encoded] SigningOutput encoded
|
2303
|
+
* @property {string|null} [signature] SigningOutput signature
|
2303
2304
|
*/
|
2304
2305
|
|
2305
2306
|
/**
|
@@ -2325,6 +2326,14 @@
|
|
2325
2326
|
*/
|
2326
2327
|
SigningOutput.prototype.encoded = $util.newBuffer([]);
|
2327
2328
|
|
2329
|
+
/**
|
2330
|
+
* SigningOutput signature.
|
2331
|
+
* @member {string} signature
|
2332
|
+
* @memberof TW.Algorand.Proto.SigningOutput
|
2333
|
+
* @instance
|
2334
|
+
*/
|
2335
|
+
SigningOutput.prototype.signature = "";
|
2336
|
+
|
2328
2337
|
/**
|
2329
2338
|
* Creates a new SigningOutput instance using the specified properties.
|
2330
2339
|
* @function create
|
@@ -2351,6 +2360,8 @@
|
|
2351
2360
|
writer = $Writer.create();
|
2352
2361
|
if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
|
2353
2362
|
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encoded);
|
2363
|
+
if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
|
2364
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.signature);
|
2354
2365
|
return writer;
|
2355
2366
|
};
|
2356
2367
|
|
@@ -2375,6 +2386,9 @@
|
|
2375
2386
|
case 1:
|
2376
2387
|
message.encoded = reader.bytes();
|
2377
2388
|
break;
|
2389
|
+
case 2:
|
2390
|
+
message.signature = reader.string();
|
2391
|
+
break;
|
2378
2392
|
default:
|
2379
2393
|
reader.skipType(tag & 7);
|
2380
2394
|
break;
|
@@ -2397,6 +2411,9 @@
|
|
2397
2411
|
if (message.encoded != null && message.hasOwnProperty("encoded"))
|
2398
2412
|
if (!(message.encoded && typeof message.encoded.length === "number" || $util.isString(message.encoded)))
|
2399
2413
|
return "encoded: buffer expected";
|
2414
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
2415
|
+
if (!$util.isString(message.signature))
|
2416
|
+
return "signature: string expected";
|
2400
2417
|
return null;
|
2401
2418
|
};
|
2402
2419
|
|
@@ -2417,6 +2434,8 @@
|
|
2417
2434
|
$util.base64.decode(object.encoded, message.encoded = $util.newBuffer($util.base64.length(object.encoded)), 0);
|
2418
2435
|
else if (object.encoded.length)
|
2419
2436
|
message.encoded = object.encoded;
|
2437
|
+
if (object.signature != null)
|
2438
|
+
message.signature = String(object.signature);
|
2420
2439
|
return message;
|
2421
2440
|
};
|
2422
2441
|
|
@@ -2433,7 +2452,7 @@
|
|
2433
2452
|
if (!options)
|
2434
2453
|
options = {};
|
2435
2454
|
var object = {};
|
2436
|
-
if (options.defaults)
|
2455
|
+
if (options.defaults) {
|
2437
2456
|
if (options.bytes === String)
|
2438
2457
|
object.encoded = "";
|
2439
2458
|
else {
|
@@ -2441,8 +2460,12 @@
|
|
2441
2460
|
if (options.bytes !== Array)
|
2442
2461
|
object.encoded = $util.newBuffer(object.encoded);
|
2443
2462
|
}
|
2463
|
+
object.signature = "";
|
2464
|
+
}
|
2444
2465
|
if (message.encoded != null && message.hasOwnProperty("encoded"))
|
2445
2466
|
object.encoded = options.bytes === String ? $util.base64.encode(message.encoded, 0, message.encoded.length) : options.bytes === Array ? Array.prototype.slice.call(message.encoded) : message.encoded;
|
2467
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
2468
|
+
object.signature = message.signature;
|
2446
2469
|
return object;
|
2447
2470
|
};
|
2448
2471
|
|
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){n(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={653924:()=>{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";}}},654646:()=>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.Sa=function(b){F[this.l+4>>2]=b};this.Ca=function(){return F[this.l+4>>2]};this.Ia=function(b){F[this.l+8>>2]=b};this.Ja=function(){E[this.l>>2]=0};this.Ha=function(){C[this.l+12>>0]=0};this.Ma=function(){C[this.l+13>>0]=0};this.Da=function(b,c){this.F(0);this.Sa(b);this.Ia(c);this.Ja();this.Ha();this.Ma()};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=
|
Binary file
|