@waves/js-test-env
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -8,2 +8,3 @@ /** | ||
export declare let context: any; | ||
export declare const accounts: Record<string, string>; | ||
/** | ||
@@ -10,0 +11,0 @@ * Creates alias transaction or signs already formed one. Creates alias for address. |
@@ -10,2 +10,3 @@ "use strict"; | ||
exports.context = global; | ||
exports.accounts = {}; | ||
function withDefaults(options = {}) { | ||
@@ -310,2 +311,4 @@ return { | ||
async function setupAccounts(balances, options) { | ||
if (!exports.context.accounts) | ||
exports.context.accounts = {}; | ||
const getNonce = () => [].map.call(wt.libs.crypto.randomUint8Array(4), (n) => n.toString(16)) | ||
@@ -320,3 +323,3 @@ .join(''); | ||
const addr = address(seed, exports.context.env.CHAIN_ID); | ||
exports.context.env.accounts[name] = seed; | ||
exports.context.accounts[name] = seed; | ||
exports.context.console.log(`Account generated: ${seed} - ${addr}`); | ||
@@ -323,0 +326,0 @@ transfers.push({ |
{ | ||
"name": "@waves/js-test-env", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20863
525