@trustwallet/wallet-core 3.1.17 → 3.1.18
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.
@@ -25605,6 +25605,9 @@ export namespace TW {
|
|
25605
25605
|
/** SigningInput operationList */
|
25606
25606
|
operationList?: (TW.Tezos.Proto.IOperationList|null);
|
25607
25607
|
|
25608
|
+
/** SigningInput encodedOperations */
|
25609
|
+
encodedOperations?: (Uint8Array|null);
|
25610
|
+
|
25608
25611
|
/** SigningInput privateKey */
|
25609
25612
|
privateKey?: (Uint8Array|null);
|
25610
25613
|
}
|
@@ -25621,6 +25624,9 @@ export namespace TW {
|
|
25621
25624
|
/** SigningInput operationList. */
|
25622
25625
|
public operationList?: (TW.Tezos.Proto.IOperationList|null);
|
25623
25626
|
|
25627
|
+
/** SigningInput encodedOperations. */
|
25628
|
+
public encodedOperations: Uint8Array;
|
25629
|
+
|
25624
25630
|
/** SigningInput privateKey. */
|
25625
25631
|
public privateKey: Uint8Array;
|
25626
25632
|
|
@@ -73631,6 +73631,7 @@
|
|
73631
73631
|
* @memberof TW.Tezos.Proto
|
73632
73632
|
* @interface ISigningInput
|
73633
73633
|
* @property {TW.Tezos.Proto.IOperationList|null} [operationList] SigningInput operationList
|
73634
|
+
* @property {Uint8Array|null} [encodedOperations] SigningInput encodedOperations
|
73634
73635
|
* @property {Uint8Array|null} [privateKey] SigningInput privateKey
|
73635
73636
|
*/
|
73636
73637
|
|
@@ -73657,6 +73658,14 @@
|
|
73657
73658
|
*/
|
73658
73659
|
SigningInput.prototype.operationList = null;
|
73659
73660
|
|
73661
|
+
/**
|
73662
|
+
* SigningInput encodedOperations.
|
73663
|
+
* @member {Uint8Array} encodedOperations
|
73664
|
+
* @memberof TW.Tezos.Proto.SigningInput
|
73665
|
+
* @instance
|
73666
|
+
*/
|
73667
|
+
SigningInput.prototype.encodedOperations = $util.newBuffer([]);
|
73668
|
+
|
73660
73669
|
/**
|
73661
73670
|
* SigningInput privateKey.
|
73662
73671
|
* @member {Uint8Array} privateKey
|
@@ -73691,8 +73700,10 @@
|
|
73691
73700
|
writer = $Writer.create();
|
73692
73701
|
if (message.operationList != null && Object.hasOwnProperty.call(message, "operationList"))
|
73693
73702
|
$root.TW.Tezos.Proto.OperationList.encode(message.operationList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
73703
|
+
if (message.encodedOperations != null && Object.hasOwnProperty.call(message, "encodedOperations"))
|
73704
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encodedOperations);
|
73694
73705
|
if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
|
73695
|
-
writer.uint32(/* id
|
73706
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.privateKey);
|
73696
73707
|
return writer;
|
73697
73708
|
};
|
73698
73709
|
|
@@ -73718,6 +73729,9 @@
|
|
73718
73729
|
message.operationList = $root.TW.Tezos.Proto.OperationList.decode(reader, reader.uint32());
|
73719
73730
|
break;
|
73720
73731
|
case 2:
|
73732
|
+
message.encodedOperations = reader.bytes();
|
73733
|
+
break;
|
73734
|
+
case 3:
|
73721
73735
|
message.privateKey = reader.bytes();
|
73722
73736
|
break;
|
73723
73737
|
default:
|
@@ -73744,6 +73758,9 @@
|
|
73744
73758
|
if (error)
|
73745
73759
|
return "operationList." + error;
|
73746
73760
|
}
|
73761
|
+
if (message.encodedOperations != null && message.hasOwnProperty("encodedOperations"))
|
73762
|
+
if (!(message.encodedOperations && typeof message.encodedOperations.length === "number" || $util.isString(message.encodedOperations)))
|
73763
|
+
return "encodedOperations: buffer expected";
|
73747
73764
|
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
73748
73765
|
if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
|
73749
73766
|
return "privateKey: buffer expected";
|
@@ -73767,6 +73784,11 @@
|
|
73767
73784
|
throw TypeError(".TW.Tezos.Proto.SigningInput.operationList: object expected");
|
73768
73785
|
message.operationList = $root.TW.Tezos.Proto.OperationList.fromObject(object.operationList);
|
73769
73786
|
}
|
73787
|
+
if (object.encodedOperations != null)
|
73788
|
+
if (typeof object.encodedOperations === "string")
|
73789
|
+
$util.base64.decode(object.encodedOperations, message.encodedOperations = $util.newBuffer($util.base64.length(object.encodedOperations)), 0);
|
73790
|
+
else if (object.encodedOperations.length)
|
73791
|
+
message.encodedOperations = object.encodedOperations;
|
73770
73792
|
if (object.privateKey != null)
|
73771
73793
|
if (typeof object.privateKey === "string")
|
73772
73794
|
$util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
|
@@ -73790,6 +73812,13 @@
|
|
73790
73812
|
var object = {};
|
73791
73813
|
if (options.defaults) {
|
73792
73814
|
object.operationList = null;
|
73815
|
+
if (options.bytes === String)
|
73816
|
+
object.encodedOperations = "";
|
73817
|
+
else {
|
73818
|
+
object.encodedOperations = [];
|
73819
|
+
if (options.bytes !== Array)
|
73820
|
+
object.encodedOperations = $util.newBuffer(object.encodedOperations);
|
73821
|
+
}
|
73793
73822
|
if (options.bytes === String)
|
73794
73823
|
object.privateKey = "";
|
73795
73824
|
else {
|
@@ -73800,6 +73829,8 @@
|
|
73800
73829
|
}
|
73801
73830
|
if (message.operationList != null && message.hasOwnProperty("operationList"))
|
73802
73831
|
object.operationList = $root.TW.Tezos.Proto.OperationList.toObject(message.operationList, options);
|
73832
|
+
if (message.encodedOperations != null && message.hasOwnProperty("encodedOperations"))
|
73833
|
+
object.encodedOperations = options.bytes === String ? $util.base64.encode(message.encodedOperations, 0, message.encodedOperations.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedOperations) : message.encodedOperations;
|
73803
73834
|
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
73804
73835
|
object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey;
|
73805
73836
|
return object;
|
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,x):x+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={628580:()=>{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";}}},629302:()=>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
|