X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fjs%2Fstellar-util.js;h=d576a36c1b3d6041edeba0d7d67982f5354cbec7;hb=5b689bd6e77f047eff37e43f0ffa487cb59edc45;hp=a7032df331cc0e98b7067576e844690a03162122;hpb=8e3b890d2684b034f3d9c99c1df7668a97c41dd6;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/src/js/stellar-util.js b/src/js/stellar-util.js index a7032df..d576a36 100644 --- a/src/js/stellar-util.js +++ b/src/js/stellar-util.js @@ -13146,7 +13146,7 @@ Cursor.prototype.fill = function(value, length) { length = this.buffer().length - this.tell(); } - + this.buffer().fill(value, this.tell(), this.tell() + length); this.seek('+', length); @@ -42404,13 +42404,13 @@ Script.prototype.runInContext = function (context) { if (!(context instanceof Context)) { throw new TypeError("needs a 'context' argument."); } - + var iframe = document.createElement('iframe'); if (!iframe.style) iframe.style = {}; iframe.style.display = 'none'; - + document.body.appendChild(iframe); - + var win = iframe.contentWindow; var wEval = win.eval, wExecScript = win.execScript; @@ -42419,7 +42419,7 @@ Script.prototype.runInContext = function (context) { wExecScript.call(win, 'null'); wEval = win.eval; } - + forEach(Object_keys(context), function (key) { win[key] = context[key]; }); @@ -42428,11 +42428,11 @@ Script.prototype.runInContext = function (context) { win[key] = context[key]; } }); - + var winKeys = Object_keys(win); var res = wEval.call(win, this.code); - + forEach(Object_keys(win), function (key) { // Avoid copying circular objects like `top` and `window` by only // updating existing context properties or new properties in the `win` @@ -42447,9 +42447,9 @@ Script.prototype.runInContext = function (context) { defineProp(context, key, win[key]); } }); - + document.body.removeChild(iframe); - + return res; }; @@ -42503,7 +42503,14 @@ window.stellarUtil = { getKeypair: function (path, seed) { const result = edHd.derivePath(path, seed); return StellarBase.Keypair.fromRawEd25519Seed(result.key); - } + }, + dummyNetwork: { + bip32: {public: 0, private: 0}, + messagePrefix: '', + pubKeyHash: 0, + scriptHash: 0, + wif: 0, + }, } },{"ed25519-hd-key":84,"stellar-base":412}]},{},[445]);