From d09ec2f2f1a6d7807d6bd45711c60d7c5b0f33dd Mon Sep 17 00:00:00 2001 From: Yasir Shariff Date: Mon, 8 Jan 2024 16:25:37 +0300 Subject: [PATCH 1/2] wip --- __tests__/08.custom-network.ava.ts | 32 +++++++++++++++ packages/js/dist/account/account-manager.js | 6 ++- .../js/dist/account/account-manager.js.map | 2 +- packages/js/dist/account/account.d.ts | 1 + packages/js/dist/account/account.d.ts.map | 2 +- packages/js/dist/account/account.js | 6 ++- packages/js/dist/account/account.js.map | 2 +- packages/js/dist/account/near-account.d.ts | 1 + .../js/dist/account/near-account.d.ts.map | 2 +- packages/js/dist/account/utils.d.ts | 2 +- packages/js/dist/account/utils.d.ts.map | 2 +- packages/js/dist/account/utils.js | 6 ++- packages/js/dist/account/utils.js.map | 2 +- packages/js/dist/index.js | 6 ++- packages/js/dist/index.js.map | 2 +- packages/js/dist/internal-utils.d.ts | 1 + packages/js/dist/internal-utils.d.ts.map | 2 +- packages/js/dist/internal-utils.js | 6 ++- packages/js/dist/internal-utils.js.map | 2 +- packages/js/dist/record/types.d.ts | 2 +- packages/js/dist/record/types.d.ts.map | 2 +- packages/js/dist/server/server.js | 6 ++- packages/js/dist/server/server.js.map | 2 +- packages/js/dist/transaction-result.d.ts | 2 +- packages/js/dist/transaction-result.d.ts.map | 2 +- packages/js/dist/transaction.d.ts | 1 + packages/js/dist/transaction.d.ts.map | 2 +- packages/js/dist/transaction.js | 6 ++- packages/js/dist/transaction.js.map | 2 +- packages/js/dist/types.d.ts | 9 +++-- packages/js/dist/types.d.ts.map | 2 +- packages/js/dist/types.js | 6 ++- packages/js/dist/types.js.map | 2 +- packages/js/dist/utils.d.ts | 2 +- packages/js/dist/utils.d.ts.map | 2 +- packages/js/dist/utils.js | 17 ++++++-- packages/js/dist/utils.js.map | 2 +- packages/js/dist/worker.d.ts | 7 ++++ packages/js/dist/worker.d.ts.map | 2 +- packages/js/dist/worker.js | 37 +++++++++++++++++- packages/js/dist/worker.js.map | 2 +- packages/js/src/types.ts | 3 +- packages/js/src/utils.ts | 14 ++++--- packages/js/src/worker.ts | 39 ++++++++++++++++++- 44 files changed, 209 insertions(+), 49 deletions(-) create mode 100644 __tests__/08.custom-network.ava.ts diff --git a/__tests__/08.custom-network.ava.ts b/__tests__/08.custom-network.ava.ts new file mode 100644 index 00000000..8f26b7b8 --- /dev/null +++ b/__tests__/08.custom-network.ava.ts @@ -0,0 +1,32 @@ +import process from 'process'; +import {Worker, getNetworkFromEnv} from 'near-workspaces'; +import anyTest, {TestFn} from 'ava'; + +// To run this test, you need to set the NEAR_RPC_API_KEY environment variable tied the Pagoda testnet network. +// And the NEAR_WORKSPACES_NETWORK environment variable to 'custom'. +if (getNetworkFromEnv() === 'custom' && process.env.NEAR_RPC_API_KEY !== '') { + const test = anyTest as TestFn<{ + worker: Worker; + }>; + + test.before(async t => { + const worker = await Worker.init({ + network: 'custom', + rpcAddr: 'https://near-testnet.api.pagoda.co/rpc/v1/', + apiKey: process.env.NEAR_RPC_API_KEY!, + }); + t.context.worker = worker; + }); + + test.after.always(async t => { + await t.context.worker.tearDown().catch(error => { + console.log('Failed to tear down the worker:', error); + }); + }); + + test('Ping network', async t => { + await t.context.worker.provider.block({finality: 'final'}); + console.log('Network is alive!'); + }); +} + diff --git a/packages/js/dist/account/account-manager.js b/packages/js/dist/account/account-manager.js index 21478934..c15230bd 100644 --- a/packages/js/dist/account/account-manager.js +++ b/packages/js/dist/account/account-manager.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/packages/js/dist/account/account-manager.js.map b/packages/js/dist/account/account-manager.js.map index 767fcf86..23c39fb9 100644 --- a/packages/js/dist/account/account-manager.js.map +++ b/packages/js/dist/account/account-manager.js.map @@ -1 +1 @@ -{"version":3,"file":"account-manager.js","sourceRoot":"","sources":["../../src/account/account-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,iDAAmC;AACnC,qDAAuC;AACvC,2CAAgC;AAChC,oCAAkE;AAClE,oCAAoJ;AACpJ,sDAAiD;AACjD,gDAA2C;AAC3C,wCAA2C;AAC3C,8DAAwD;AACxD,uCAAkC;AAElC,mCAAuC;AAGvC,MAAsB,cAAc;IAGlC,YACY,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAH1B,oBAAe,GAAgB,IAAI,GAAG,EAAE,CAAC;IAItC,CAAC;IAEJ,MAAM,CAAC,MAAM,CACX,MAAc;QAEd,MAAM,EAAC,OAAO,EAAC,GAAG,MAAM,CAAC;QACzB,QAAQ,OAAO,EAAE;YACf,KAAK,SAAS;gBACZ,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;YACpC,KAAK,SAAS;gBACZ,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;YACpC,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,oBAAoB,OAAiB,oCAAoC,CAAC,CAAC;SACrG;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,SAAiB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC9C,CAAC;IAED,UAAU,CAAC,SAAiB;QAC1B,OAAO,IAAI,iBAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,gBAAgB,CAAC,SAAiB;QAChC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACt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AAC,6BAA6B,CAClE,IAAI,CAAC,MAAM,CAAC,OAAO,CACpB,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;IAC9D,CAAC;CACF;AA3BD,wCA2BC;AAED,MAAa,kBAAmB,SAAQ,yBAAW;IAEjD,YAA6B,OAAuB,EAAE,MAA6B,EAAE,QAA+B;QAClH,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QADG,YAAO,GAAP,OAAO,CAAgB;QAD5C,WAAM,GAAG,KAAK,CAAC;IAGvB,CAAC;IAED,aAAa;QACX,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/D,OAAO,KAAK,CAAC,aAAa,EAAE,CAAC;IAC/B,CAAC;IAED,aAAa,CAAC,aAAqB;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAiB;QAC9B,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7E,IAAI,eAAe,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE;YAC5C,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC/C;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AA7BD,gDA6BC"} \ No newline at end of file +{"version":3,"file":"account-manager.js","sourceRoot":"","sources":["../../src/account/account-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,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,MAAa,kBAAmB,SAAQ,yBAAW;IAEjD,YAA6B,OAAuB,EAAE,MAA6B,EAAE,QAA+B;QAClH,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QADG,YAAO,GAAP,OAAO,CAAgB;QAD5C,WAAM,GAAG,KAAK,CAAC;IAGvB,CAAC;IAED,aAAa;QACX,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/D,OAAO,KAAK,CAAC,aAAa,EAAE,CAAC;IAC/B,CAAC;IAED,aAAa,CAAC,aAAqB;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAiB;QAC9B,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7E,IAAI,eAAe,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE;YAC5C,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC/C;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AA7BD,gDA6BC"} \ No newline at end of file diff --git a/packages/js/dist/account/account.d.ts b/packages/js/dist/account/account.d.ts index 0c4f63a8..59a35d70 100644 --- a/packages/js/dist/account/account.d.ts +++ b/packages/js/dist/account/account.d.ts @@ -1,4 +1,5 @@ /// +/// import { URL } from 'url'; import { Buffer } from 'buffer'; import BN from 'bn.js'; diff --git a/packages/js/dist/account/account.d.ts.map b/packages/js/dist/account/account.d.ts.map index 15ba9108..9c0ce4df 100644 --- a/packages/js/dist/account/account.d.ts.map +++ b/packages/js/dist/account/account.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"account.d.ts","sourceRo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AAW,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;IAIjE,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,EAAE,eAAe,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;IAInG,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAOvD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAMxE,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC;cAIhF,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,EACE,OAAO,EACP,cAAc,EACd,YAAY,GACb,GAAE;QAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAM,GAChF,OAAO,CAAC,WAAW,CAAC;YAUT,cAAc;IAI5B,OAAO,CAAC,aAAa;CAGtB"} \ No newline at end of file +{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/account/account.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAEhC,OAAO,EAEL,OAAO,EACP,SAAS,EACT,UAAU,EACV,cAAc,EACd,IAAI,EACJ,WAAW,EACX,KAAK,EACL,SAAS,EACT,aAAa,EACb,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,O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AAM,GAAG,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC;cAIhF,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,EACE,OAAO,EACP,cAAc,EACd,YAAY,GACb,GAAE;QAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAM,GAChF,OAAO,CAAC,WAAW,CAAC;YAUT,cAAc;IAI5B,OAAO,CAAC,aAAa;CAGtB"} \ No newline at end of file diff --git a/packages/js/dist/account/account.js b/packages/js/dist/account/account.js index 439c23dd..fd5f3402 100644 --- a/packages/js/dist/account/account.js +++ b/packages/js/dist/account/account.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/packages/js/dist/account/account.js.map b/packages/js/dist/account/account.js.map index cefc3843..27732b9e 100644 --- a/packages/js/dist/account/account.js.map +++ b/packages/js/dist/account/account.js.map @@ -1 +1 @@ -{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/account/account.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,mCAA8B;AAC9B,qCAA4B;AAG5B,6CAA+B;AAC/B,oCAYkB;AAElB,sDAAgD;AAChD,wCAA2C;AAC3C,oCAA0E;AAC1E,8DAA0E;AAC1E,sCAA6F;AAI7F,MAAa,OAAO;IAClB,YACmB,UAAkB,EAClB,OAA2B;QAD3B,eAAU,GAAV,UAAU,CAAQ;QAClB,YAAO,GAAP,OA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account.d.ts b/packages/js/dist/account/near-account.d.ts index c7fb84ba..23b1aa9e 100644 --- a/packages/js/dist/account/near-account.d.ts +++ b/packages/js/dist/account/near-account.d.ts @@ -1,4 +1,5 @@ /// +/// import { URL } from 'url'; import { Buffer } from 'buffer'; import BN from 'bn.js'; diff --git a/packages/js/dist/account/near-account.d.ts.map b/packages/js/dist/account/near-account.d.ts.map index 1a3f316c..fa52c4ff 100644 --- a/packages/js/dist/account/near-account.d.ts.map +++ b/packages/js/dist/account/near-account.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"near-account.d.ts","sourceRoot":"","sources":["../../src/account/near-account.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAChC,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AACpC,OAAO,EAAC,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAC5H,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,aAAa,EAAE,WAAW,EAAE,OAAO,EAAC,MAAM,WAAW,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAGpC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAElC,6CAA6C;IAC7C,OAAO,IAAI,OA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AC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAElE;;;;OAIG;IACH,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,EAAE,eAAe,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAEpG;;;;OAIG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAExD;;;;;;;OAOG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CAC3E"} \ No newline at end of file diff --git a/packages/js/dist/account/utils.d.ts b/packages/js/dist/account/utils.d.ts index b55fb5f5..0d80a678 100644 --- a/packages/js/dist/account/utils.d.ts +++ b/packages/js/dist/account/utils.d.ts @@ -8,7 +8,7 @@ export interface KeyFilePrivate { export interface KeyFileSecret { secret_key: string; } -export declare type KeyFile = KeyFilePrivate | KeyFileSecret; +export type KeyFile = KeyFilePrivate | KeyFileSecret; export declare function getKeyFromFile(filePath: string, create?: boolean): Promise; export declare function hashPathBase64(s: string): string; export declare function sanitize(s: string): string; diff --git a/packages/js/dist/account/utils.d.ts.map b/packages/js/dist/account/utils.d.ts.map index 5fd68cc5..6d9d7467 100644 --- a/packages/js/dist/account/utils.d.ts.map +++ b/packages/js/dist/account/utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/account/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAC;AACnC,OAAO,EAAC,OAAO,EAAiB,MAAM,UAAU,CAAC;AAEjD,wBAAgB,cAAc,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAMjD;AAED,wBAAgB,SAAS,IAAI,QAAQ,EAAE,CAMtC;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,oBAAY,OAAO,GAAG,cAAc,GAAG,aAAa,CAAC;AAErD,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBtF;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1C"} \ No newline at end of file +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/account/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAC;AACnC,OAAO,EAAC,OAAO,EAAiB,MAAM,UAAU,CAAC;AAEjD,wBAAgB,cAAc,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAMjD;AAED,wBAAgB,SAAS,IAAI,QAAQ,EAAE,CAMtC;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,aAAa,CAAC;AAErD,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBtF;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1C"} \ No newline at end of file diff --git a/packages/js/dist/account/utils.js b/packages/js/dist/account/utils.js index d794b215..c61a9f81 100644 --- a/packages/js/dist/account/utils.js +++ b/packages/js/dist/account/utils.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/packages/js/dist/account/utils.js.map b/packages/js/dist/account/utils.js.map index 38a49635..fde19482 100644 --- a/packages/js/dist/account/utils.js.map +++ b/packages/js/dist/account/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/account/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;AAClC,mCAA8B;AAC9B,0DAA+B;AAC/B,0DAAkC;AAElC,oCAAiD;AAEjD,SAAgB,cAAc;IAC5B,MAAM,KAAK,GAAe,SAAS,EAAE,CAAC;IACtC,MAAM,KAAK,GAAe,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7D,+BAA+B;IAC/B,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3B,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,EAAG,CAAC,CAAC;AAC9D,CAAC;AAND,wCAMC;AAED,SAAgB,SAAS;IACvB,MAAM,kBAAkB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACnD,KAAK,CAAC,iBAAiB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC;IAC9C,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,4CAA4C;IACvF,KAAK,CAAC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,CAAC;YAC1C,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE;SAC/B,CAAC,CAAC,CAAC;QACJ,OAAO,OAAO,CAAC;KAChB;AACH,CAAC;AAlBD,wCAkBC;AAED,SAAgB,cAAc,CAAC,CAAS;IACtC,qFAAqF;IACrF,MAAM,MAAM,GAAG,mBAAS,CAAC,MAAM,CAAC,eAAM,CAAC,IAAI,CAAC,mBAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,OAAO,MAAM,CAAC;AAChB,CAAC;AAJD,wCAIC;AAED,SAAgB,QAAQ,CAAC,CAAS;IAChC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC;AAFD,4BAEC"} \ No newline at end of file diff --git a/packages/js/dist/index.js b/packages/js/dist/index.js index bda74404..4974cfee 100644 --- a/packages/js/dist/index.js +++ b/packages/js/dist/index.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/packages/js/dist/index.js.map b/packages/js/dist/index.js.map index eb4a23ae..7dc771e3 100644 --- a/packages/js/dist/index.js.map +++ b/packages/js/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAEnC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE;IAChC,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC;CACnC;AAED,2CAAyB;AACzB,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,uDAAqC;AACrC,4CAA0B;AAC1B,6CAA2B"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAEnC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE;IAChC,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC;CACnC;AAED,2CAAyB;AACzB,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,uDAAqC;AACrC,4CAA0B;AAC1B,6CAA2B"} \ No newline at end of file diff --git a/packages/js/dist/internal-utils.d.ts b/packages/js/dist/internal-utils.d.ts index 87299c7c..a5190267 100644 --- a/packages/js/dist/internal-utils.d.ts +++ b/packages/js/dist/internal-utils.d.ts @@ -1,4 +1,5 @@ /// +/// import { PathLike } from 'fs'; import { spawn as _spawn } from 'child_process'; import { URL } from 'url'; diff --git a/packages/js/dist/internal-utils.d.ts.map b/packages/js/dist/internal-utils.d.ts.map index 2c4d6b37..01558148 100644 --- a/packages/js/dist/internal-utils.d.ts.map +++ b/packages/js/dist/internal-utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"internal-utils.d.ts","sourceRoot":"","sources":["../src/internal-utils.ts"],"names":[],"mappings":";AAEA,OAAO,EAAY,QAAQ,EAAC,MAAM,IAAI,CAAC;AAIvC,OAAO,EAAC,KAAK,IAAI,MAAM,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,EAAE,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Q,GAAG,OAAO,CAAC,OAAO,CAAC,CAW1D;AAED,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,mBAAmB,CAGpF;AAED,OAAO,EAAC,MAAM,IAAI,KAAK,EAAC,CAAC;AAEzB,wBAAgB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAI1C;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAIxC;AAED,eAAO,MAAM,OAAO,+CAA2B,CAAC;AAEhD,wBAAsB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAOpD;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,GAAG,GAAG,SAAS,IAAI,GAAG,GAAG,MAAM,CAEpE;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBpE"} \ No newline at end of file diff --git a/packages/js/dist/internal-utils.js b/packages/js/dist/internal-utils.js index 62257a4b..0b81fb38 100644 --- a/packages/js/dist/internal-utils.js +++ b/packages/js/dist/internal-utils.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/packages/js/dist/internal-utils.js.map b/packages/js/dist/internal-utils.js.map index 0b739e81..4bbc2904 100644 --- a/packages/js/dist/internal-utils.js.map +++ b/packages/js/dist/internal-utils.js.map @@ -1 +1 @@ -{"version":3,"file":"internal-utils.js","sourceRoot":"","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;YACnF,OAAO,YAAY,CAAC;SACrB;QAAC,MAAM,GAAE;KACX;IAED,MAAM,GAAG,GAAG,iBAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,YAAY,GAAG,IAAA,WAAI,EAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAC7C,IAAI;QACF,MAAM,IAAA,iBAAM,EAAC,YAAY,EAAE,cAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,OAAO,YAAY,CAAC;KACrB;IAAC,MAAM,GAAE;IAEV,MAAM,IAAI,KAAK,CAAC,mBAAmB,YAAY,0EAA0E,GAAG,GAAG,CAAC,CAAC;AACnI,CAAC;AAlBD,4BAkBC"} \ No newline at end of file diff --git a/packages/js/dist/record/types.d.ts b/packages/js/dist/record/types.d.ts index 226eec52..b4a63fc8 100644 --- a/packages/js/dist/record/types.d.ts +++ b/packages/js/dist/record/types.d.ts @@ -39,7 +39,7 @@ export interface Data { value: string; }; } -export declare type StateRecord = Data | Account | AccessKey | Contract; +export type StateRecord = Data | Account | AccessKey | Contract; export interface Records { records: StateRecord[]; } diff --git a/packages/js/dist/record/types.d.ts.map b/packages/js/dist/record/types.d.ts.map index c798ff3f..520042be 100644 --- a/packages/js/dist/record/types.d.ts.map +++ b/packages/js/dist/record/types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/record/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,0BAA0B,EAAC,MAAM,UAAU,CAAC;AAEpD,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,YAAY,GAAG,0BAA0B,CAAC;CACvD;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,WAAW,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,qBAAqB;QACrB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAGD,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;CAC7D;AAED,oBAAY,WAAW,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhE,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/record/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,0BAA0B,EAAC,MAAM,UAAU,CAAC;AAEpD,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,YAAY,GAAG,0BAA0B,CAAC;CACvD;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,WAAW,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,qBAAqB;QACrB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAGD,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;CAC7D;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhE,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED;;;;;;;;;;;;;;;GAeG"} \ No newline at end of file diff --git a/packages/js/dist/server/server.js b/packages/js/dist/server/server.js index b33fef00..c09a2a6c 100644 --- a/packages/js/dist/server/server.js +++ b/packages/js/dist/server/server.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/packages/js/dist/server/server.js.map b/packages/js/dist/server/server.js.map index 712235f5..6de93a12 100644 --- a/packages/js/dist/server/server.js.map +++ b/packages/js/dist/server/server.js.map @@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9B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB,IAAA,sBAAK,EAAC,oBAAoB,IAAI,CAAC,IAAI,iBAAiB,CAAC,CAAC;aACvD;QACH,CAAC,CAAC,CAAC;QACH,MAAM,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,KAAK;;QACT,IAAA,sBAAK,EAAC,iCAAiC,CAAC,CAAC;QACzC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACnC,OAAO,CAAC,KAAK,CACX,0CAA0C,MAAA,IAAI,CAAC,UAAU,CAAC,GAAG,mCAAI,WAAW,EAAE,CAC/E,CAAC;SACH;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;YAClB,MAAM,IAAA,mBAAE,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACxB;IACH,CAAC;IAEO,KAAK,CAAC,KAAK,CAAC,OAAe;QACjC,IAAA,sBAAK,EAAC,iCAAiC,CAAC,CAAC;QACzC,OAAO,IAAA,2BAAU,EAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;;AAnHH,sCAoHC;AAnHgB,sBAAQ,GAAW,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/js/dist/transaction-result.d.ts b/packages/js/dist/transaction-result.d.ts index 36c4b2d5..ddc62f2a 100644 --- a/packages/js/dist/transaction-result.d.ts +++ b/packages/js/dist/transaction-result.d.ts @@ -62,5 +62,5 @@ export declare class TransactionError extends Error { constructor(result: TransactionResult); parse(): ExecutionOutcome; } -export declare type TxResult = TransactionResult; +export type TxResult = TransactionResult; //# sourceMappingURL=transaction-result.d.ts.map \ No newline at end of file diff --git a/packages/js/dist/transaction-result.d.ts.map b/packages/js/dist/transaction-result.d.ts.map index 02bf35ea..88e97788 100644 --- a/packages/js/dist/transaction-result.d.ts.map +++ b/packages/js/dist/transaction-result.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"transaction-result.d.ts","sourceRoot":"","sources":["../src/transaction-result.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,YAAY,CAAC;AAC/B,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,SAAS,EACV,MAAM,SAAS,CAAC;AAmBjB,qBAAa,cAAc;IACN,OAAO,EAAE,gBAAgB;gBAAzB,OAAO,EAAE,gBAAgB;IAE5C,IAAI,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAE7C;IAED,IAAI,MAAM,IAAI,eAAe,GAAG,oBAAoB,CAEnD;IAED,IAAI,SAAS,IAAI,OAAO,CAMvB;IAED,IAAI,SAAS,IAAI,OAAO,CAMvB;IAED,IAAI,eAAe,IAAI,eAAe,CAErC;IAED,WAAW,IAAI,GAAG;IAQlB,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAMrC;IAED,IAAI,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAMjD;IAED,IAAI,cAAc,IAAI,MAAM,GAAG,SAAS,CAEvC;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,IAAI,IAAI,MAAM,EAAE,CAEnB;IAED,IAAI,SAAS,IAAI,GAAG,CAEnB;CACF;AAED,qBAAa,iBAAiB;aAEV,MAAM,EAAE,qBAAqB;aAC7B,OAAO,EAAE,MAAM;aACf,KAAK,EAAE,MAAM;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAHP,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,MAAM,E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M;CAGlB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,MAAM,EAAE,iBAAiB;IAIrC,KAAK,IAAI,gBAAgB;CAG1B;AAED,oBAAY,QAAQ,GAAG,iBAAiB,CAAC"} \ No newline at end of file +{"version":3,"file":"transaction-result.d.ts","sourceRoot":"","sources":["../src/transaction-result.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,YAAY,CAAC;AAC/B,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,SAAS,EACV,MAAM,SAAS,CAAC;AAmBjB,qBAAa,cAAc;IACN,OAAO,EAAE,gBAAgB;gBAAzB,OAAO,EAAE,gBAAgB;IAE5C,IAAI,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAE7C;IAED,IAAI,MAAM,IAAI,eAAe,GAAG,oBAAoB,CAEnD;IAED,IAAI,SAAS,IAAI,OAAO,CAMvB;IAED,IAAI,SAAS,IAAI,OAAO,CAMvB;IAED,IAAI,eAAe,IAAI,eAAe,CAErC;IAED,WAAW,IAAI,GAAG;IAQlB,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAMrC;IAED,IAAI,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAMjD;IAED,IAAI,cAAc,IAAI,MAAM,GAAG,SAAS,CAEvC;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SA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C;IAED,IAAI,oBAAoB,IAAI,MAAM,EAAE,CAEnC;IAED,IAAI,sBAAsB,IAAI,MAAM,EAAE,CAErC;IAED,IAAI,SAAS,IAAI,GAAG,CAGnB;IAED,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;IAIhE,WAAW,CAAC,CAAC,KAAK,CAAC;IAQnB,oBAAoB,IAAI,GAAG,EAAE;IAI7B,OAAO,IAAI,MAAM;CAGlB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,MAAM,EAAE,iBAAiB;IAIrC,KAAK,IAAI,gBAAgB;CAG1B;AAED,MAAM,MAAM,QAAQ,GAAG,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/js/dist/transaction.d.ts b/packages/js/dist/transaction.d.ts index 0a0cef86..38a789f4 100644 --- a/packages/js/dist/transaction.d.ts +++ b/packages/js/dist/transaction.d.ts @@ -1,4 +1,5 @@ /// +/// import { Buffer } from 'buffer'; import { URL } from 'url'; import { NEAR } from 'near-units'; diff --git a/packages/js/dist/transaction.d.ts.map b/packages/js/dist/transaction.d.ts.map index 64facd6c..772217b9 100644 --- a/packages/js/dist/transaction.d.ts.map +++ b/packages/js/dist/transaction.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY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,GAAG,OAAO,CAAC,WAAW,CAAC;IASxF,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI;IAK/C,YAAY,CACV,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,EAC1C,EAEE,GAA+B,EAC/B,eAA4B,GAC7B,GAAE;QAAC,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,EAAE,GAAG,MAAM,CAAA;KAAM,GACzD,IAAI;IAOP,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI;IAK/D,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,GAAG,IAAI;IAMnC,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED,IAAI,cAAc,IAAI,IAAI,CAEzB;IAED,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC;CACjE"} \ No newline at end of file diff --git a/packages/js/dist/transaction.js b/packages/js/dist/transaction.js index cd637814..77e595c3 100644 --- a/packages/js/dist/transaction.js +++ b/packages/js/dist/transaction.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/packages/js/dist/transaction.js.map b/packages/js/dist/transaction.js.map index 9d646493..93540a24 100644 --- a/packages/js/dist/transaction.js.map +++ b/packages/js/dist/transaction.js.map @@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AAC,OAAO,CAAC,IAAI,CAAC,IAAA,aAAK,EAAC,IAAI,UAAE,CAAC,MAAM,CAAC,EAAE,iBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,MAAmB;QAC1B,IAAI,CAAC,eAAe,GAAG,IAAA,iBAAS,EAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED,IAAI,cAAc;;QAChB,OAAO,MAAA,IAAI,CAAC,eAAe,mCAAI,iBAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;CAGF;AAvFD,kCAuFC"} \ No newline at end of file diff --git a/packages/js/dist/types.d.ts b/packages/js/dist/types.d.ts index 34bb3ed8..94e61dc7 100644 --- a/packages/js/dist/types.d.ts +++ b/packages/js/dist/types.d.ts @@ -16,7 +16,7 @@ export { DEFAULT_FUNCTION_CALL_GAS } from 'near-api-js/lib/constants'; export declare class BN extends _BN { toJSON(): string; } -export declare type Args = Record | Uint8Array; +export type Args = Record | Uint8Array; export interface NamedAccount { accountId: string; } @@ -25,19 +25,20 @@ export interface CallOptions { attachedDeposit?: string | BN; signWithKey?: KeyPair; } -export declare type ChildProcessPromise = Promise>; +export type ChildProcessPromise = Promise>; export interface AccountBalance { total: NEAR; stateStaked: NEAR; staked: NEAR; available: NEAR; } -export declare type Network = 'testnet' | 'mainnet' | 'sandbox'; +export type Network = 'testnet' | 'mainnet' | 'sandbox' | 'custom'; export interface ClientConfig { network: Network; rootAccountId?: string; testnetMasterAccountId?: string; rpcAddr: string; + apiKey?: string; helperUrl?: string; explorerUrl?: string; initialBalance?: string; @@ -58,5 +59,5 @@ export interface StateItem { value: string; proof: string[]; } -export declare type Empty = {}; +export type Empty = {}; //# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/js/dist/types.d.ts.map b/packages/js/dist/types.d.ts.map index acc14a9c..c442bc8e 100644 --- a/packages/js/dist/types.d.ts.map +++ b/packages/js/dist/types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAC3C,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AACpC,OAAO,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAChC,OAAO,EAAC,QAAQ,EAAC,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAC,OAAO,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAAO,EACL,MAAM,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,aAAa,EACb,aAAa,EACb,SAAS,GACV,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAC,eAAe,IAAI,OAAO,EAAC,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAC,QAAQ,EAAC,MAAM,4BAA4B,CAAC;AACpD,cAAc,oCAAoC,CAAC;AAEnD,OAAO,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AAEpE,qBAAa,EAAG,SAAQ,GAAG;IACzB,MAAM,IAAI,MAAM;CAGjB;AAED,oBAAY,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAA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KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,MAAM,KAAK,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/js/dist/types.js b/packages/js/dist/types.js index 578a38ef..5b47ab93 100644 --- a/packages/js/dist/types.js +++ b/packages/js/dist/types.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/packages/js/dist/types.js.map b/packages/js/dist/types.js.map index c3ba4fc8..7ed14faa 100644 --- a/packages/js/dist/types.js.map +++ b/packages/js/dist/types.js.map @@ -1 +1 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,kDAAwB;AAMxB,+DAA6D;AAArD,yGAAA,WAAW,OAAA;AACnB,2CAAgD;AAAxC,sGAAA,OAAO,OAAA;AAAE,yGAAA,UAAU,OAAA;AAC3B,+CAAgE;AAAxD,kGAAA,SAAS,OAAA;AAAE,uGAAA,cAAc,OAAA;AACjC,2DAYqC;AAXnC,qGAAA,MAAM,OAAA;AACN,4GAAA,aAAa,OAAA;AACb,6GAAA,cAAc,OAAA;AACd,2GAAA,YAAY,OAAA;AACZ,uGAAA,QAAQ,OAAA;AACR,oGAAA,KAAK,OAAA;AACL,qGAAA,MAAM,OAAA;AACN,wGAAA,SAAS,OAAA;AACT,4GAAA,aAAa,OAAA;AACb,4GAAA,aAAa,OAAA;AACb,wGAAA,SAAS,OAAA;AAGX,iFAAuF;AAA/E,4GAAA,eAAe,OAAW;AAClC,yDAAoD;A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of file diff --git a/packages/js/dist/utils.d.ts b/packages/js/dist/utils.d.ts index ff892a7c..baaad9a0 100644 --- a/packages/js/dist/utils.d.ts +++ b/packages/js/dist/utils.d.ts @@ -25,7 +25,7 @@ export declare const EMPTY_CONTRACT_HASH = "11111111111111111111111111111111"; * * @returns network to connect to. Default 'sandbox' */ -export declare function getNetworkFromEnv(): 'sandbox' | 'testnet'; +export declare function getNetworkFromEnv(): 'sandbox' | 'testnet' | 'custom'; export declare function homeKeyStore(): KeyStore; export declare function timeSuffix(prefix: string, length?: number): string; export declare function parseGas(s: string | BN): Gas; diff --git a/packages/js/dist/utils.d.ts.map b/packages/js/dist/utils.d.ts.map index 1cec7cd8..b4a8b579 100644 --- a/packages/js/dist/utils.d.ts.map +++ b/packages/js/dist/utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAO9B,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAC,MAAM,SAAS,CAAC;AAE1E,eAAO,MAAM,QAAQ,MAAmB,CAAC;AAEzC,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,UAQtC;AAGD,wBAAgB,eAAe,CAAC,MAAM,SAAS,EAAE,UAAU,SAAK,EAAE,YAAY,SAAK,GAAG,MAAM,CAG3F;AAED,wBAAgB,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,MAAM,CAEtD;AAED,eAAO,MAAM,UAAU,MAAe,CAAC;AAEvC,wBAAsB,YAAY,CAAC,EAAE,EAAE,MAAM,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AE,UAAU,SAAK,EAAE,YAAY,SAAK,GAAG,MAAM,CAG3F;AAED,wBAAgB,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,MAAM,CAEtD;AAED,eAAO,MAAM,UAAU,MAAe,CAAC;AAEvC,wBAAsB,YAAY,CAAC,EAAE,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAU1E;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE5D;AAsBD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAAG,YAAY,CAetF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAI9D;AAED,eAAO,MAAM,mBAAmB,qCAAqC,CAAC;AAEtE;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,GAAG,SAAS,GAAG,QAAQ,CAepE;AAED,wBAAgB,YAAY,IAAI,QAAQ,CAIvC;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAE7D;AAID,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,EAAE,GAAG,GAAG,CAM5C;AAID,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,EAAE,GAAG,IAAI,CAM9C"} \ No newline at end of file diff --git a/packages/js/dist/utils.js b/packages/js/dist/utils.js index e0b48ab0..03863c73 100644 --- a/packages/js/dist/utils.js +++ b/packages/js/dist/utils.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -82,6 +86,9 @@ function configFromDomain(network) { else if (network === 'testnet' && process.env.NEAR_CLI_TESTNET_RPC_SERVER_URL) { rpcAddr = process.env.NEAR_CLI_TESTNET_RPC_SERVER_URL; } + else if (network === 'custom' && process.env.NEAR_CLI_CUSTOM_RPC_SERVER_URL) { + rpcAddr = process.env.NEAR_CLI_CUSTOM_RPC_SERVER_URL; + } return { network, rpcAddr, @@ -100,9 +107,10 @@ function urlConfigFromNetwork(network) { rpcAddr: 'http://localhost', }; case 'testnet': - case 'mainnet': return configFromDomain(networkName); + case 'mainnet': + case 'custom': return configFromDomain(networkName); default: - throw new Error(`Got network ${networkName}, but only accept 'sandbox', 'testnet', and 'mainnet'`); + throw new Error(`Got network ${networkName}, but only accept 'sandbox', 'testnet', 'mainnet' and 'custom'`); } } exports.urlConfigFromNetwork = urlConfigFromNetwork; @@ -127,12 +135,13 @@ function getNetworkFromEnv() { switch (network) { case 'sandbox': case 'testnet': + case 'custom': return network; case undefined: return 'sandbox'; default: throw new Error(`environment variable NEAR_WORKSPACES_NETWORK=${network} invalid; ` - + 'use \'testnet\', or \'sandbox\' (the default)'); + + 'use \'testnet\', \'custom\', or \'sandbox\' (the default)'); } } exports.getNetworkFromEnv = getNetworkFromEnv; diff --git a/packages/js/dist/utils.js.map b/packages/js/dist/utils.js.map index 06fd15f1..b3134aa9 100644 --- a/packages/js/dist/utils.js.map +++ b/packages/js/dist/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA8B;AAC9B,iDAAmC;AACnC,uCAAyB;AACzB,2CAA6B;AAC7B,qDAAuC;AACvC,0DAA+B;AAC/B,gDAAwB;AACxB,2CAAqC;AA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AAM,uBAAuB,GAAG,QAAQ,CAAC;AAEzC,SAAgB,QAAQ,CAAC,CAAc;IACrC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QAC5D,OAAO,gBAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACrB;IAED,OAAO,gBAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAND,4BAMC;AAED,4FAA4F;AAC5F,cAAc;AACd,SAAgB,SAAS,CAAC,CAAc;IACtC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QAC5D,OAAO,iBAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACtB;IAED,OAAO,iBAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAND,8BAMC"} \ No newline at end of file diff --git a/packages/js/dist/worker.d.ts b/packages/js/dist/worker.d.ts index d3495e81..bdb0be03 100644 --- a/packages/js/dist/worker.d.ts +++ b/packages/js/dist/worker.d.ts @@ -27,6 +27,13 @@ export declare abstract class Worker { abstract get provider(): JsonRpcProvider; abstract tearDown(): Promise; } +export declare class CustomnetWorker extends Worker { + static init(config: Partial): Promise; + get provider(): JsonRpcProvider; + tearDown(): Promise; + static get defaultConfig(): Config; + private static get clientConfig(); +} export declare class TestnetWorker extends Worker { static init(config: Partial): Promise; get provider(): JsonRpcProvider; diff --git a/packages/js/dist/worker.d.ts.map b/packages/js/dist/worker.d.ts.map index 8e170940..8a79da2a 100644 --- a/packages/js/dist/worker.d.ts.map +++ b/packages/js/dist/worker.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,MAAM,EAAe,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAiB,WAAW,EAAE,kBAAkB,EAAC,M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G,OAAO,CAAC,aAAa,CAAC;WAgCrD,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAY7C,IAAI,QAAQ,IAAI,eAAe,CAE9B;IAEK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ/B,OAAO,CAAC,MAAM,KAAK,YAAY,GAO9B;IAED,OAAO,KAAK,OAAO,GAElB;CACF"} \ No newline at end of file diff --git a/packages/js/dist/worker.js b/packages/js/dist/worker.js index aaddbe89..b5ff515c 100644 --- a/packages/js/dist/worker.js +++ b/packages/js/dist/worker.js @@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.SandboxWorker = exports.TestnetWorker = exports.Worker = void 0; +exports.SandboxWorker = exports.TestnetWorker = exports.CustomnetWorker = exports.Worker = void 0; const fs_1 = __importDefault(require("fs")); const near_units_1 = require("near-units"); const proper_lockfile_1 = require("proper-lockfile"); @@ -43,9 +43,11 @@ class Worker { return TestnetWorker.init(config); case 'sandbox': return SandboxWorker.init(config); + case 'custom': + return CustomnetWorker.init(config); default: throw new Error(`config.network = '${config.network}' invalid; ` // eslint-disable-line @typescript-eslint/restrict-template-expressions - + 'must be \'testnet\' or \'sandbox\' (the default). Soon \'mainnet\''); + + 'must be \'testnet\', \'sandbox\' or \'custom\' (the default). Soon \'mainnet\''); } } get rootAccount() { @@ -53,6 +55,37 @@ class Worker { } } exports.Worker = Worker; +// Connect to a custom network. +// Note: the burden of ensuring the methods that are able to be called are left up to the user. +class CustomnetWorker extends Worker { + static async init(config) { + (0, internal_utils_1.debug)('Lifecycle.CustomnetWorker.create()', 'config:', config); + const fullConfig = { ...this.defaultConfig, ...config }; + const worker = new CustomnetWorker(fullConfig); + await worker.manager.init(); + return worker; + } + get provider() { + return jsonrpc_1.JsonRpcProvider.from(CustomnetWorker.clientConfig); + } + async tearDown() { + // We are not stopping any server here because we are using Testnet + return Promise.resolve(); + } + static get defaultConfig() { + return { + homeDir: 'ignored', + port: 3030, + rm: false, + refDir: null, + ...this.clientConfig, + }; + } + static get clientConfig() { + return (0, utils_1.urlConfigFromNetwork)('custom'); + } +} +exports.CustomnetWorker = CustomnetWorker; class TestnetWorker extends Worker { static async init(config) { (0, internal_utils_1.debug)('Lifecycle.TestnetWorker.create()', 'config:', config); diff --git a/packages/js/dist/worker.js.map b/packages/js/dist/worker.js.map index 1abd30d7..a0451157 100644 --- a/packages/js/dist/worker.js.map +++ b/packages/js/dist/worker.js.map @@ -1 +1 @@ -{"version":3,"file":"worker.js","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,2CAAgC;AAChC,qDAAqC;AACrC,mCAAgE;AAEhE,uCAA0E;AAC1E,uCAA0C;AAC1C,qDAAuC;AACvC,4CAA8C;AAE9C;;GAEG;AACH,MAAsB,MAAM;IAK1B,YAAY,MAAc;QACxB,IAAA,sBAAK,EAAC,8BAA8B,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,wBAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAA0B,EAAE;;QAC5C,IAAA,sBAAK,EAAC,yBAAyB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QACpD,QAAQ,MAAA,MAAM,CAAC,OAAO,mCAAI,IAAA,yBAAiB,GAAE,EAAE;YAC7C,KAAK,SAAS;gBACZ,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACpC,KAAK,SAAS;gBACZ,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACpC;gBACE,MAAM,IAAI,KAAK,CACb,qBAAqB,MAAM,CAAC,OAAO,aAAa,CAAC,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pB,OAAO,EAAE,sBAAa,CAAC,aAAa,EAAE;YACtC,IAAI;YACJ,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,oBAAoB,IAAI,EAAE;SACpC,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,yBAAe,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,IAAI;YACF,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;SAC3B;QAAC,OAAO,KAAc,EAAE;YACvB,IAAA,sBAAK,EAAC,kCAAkC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;SAC3E;IACH,CAAC;IAEO,MAAM,KAAK,YAAY;QAC7B,OAAO;YACL,OAAO,EAAE,SAAS;YAClB,aAAa,EAAE,WAAW;YAC1B,OAAO,EAAE,EAAE;YACX,cAAc,EAAE,iBAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE;SAC7C,CAAC;IACJ,CAAC;IAED,IAAY,OAAO;QACjB,OAAO,oBAAoB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAChD,CAAC;CACF;AAvED,sCAuEC"} \ No newline at end of file diff --git a/packages/js/src/types.ts b/packages/js/src/types.ts index 213c4232..eb6e93e3 100644 --- a/packages/js/src/types.ts +++ b/packages/js/src/types.ts @@ -55,13 +55,14 @@ export interface AccountBalance { available: NEAR; } -export type Network = 'testnet' | 'mainnet' | 'sandbox'; +export type Network = 'testnet' | 'mainnet' | 'sandbox' | 'custom'; export interface ClientConfig { network: Network; rootAccountId?: string; testnetMasterAccountId?: string; rpcAddr: string; + apiKey?: string; helperUrl?: string; explorerUrl?: string; initialBalance?: string; diff --git a/packages/js/src/utils.ts b/packages/js/src/utils.ts index 3dd5a7d3..09c736eb 100644 --- a/packages/js/src/utils.ts +++ b/packages/js/src/utils.ts @@ -56,12 +56,14 @@ export function isTopLevelAccount(accountId: string): boolean { return !accountId.includes('.'); } -function configFromDomain(network: 'testnet' | 'mainnet'): ClientConfig { +function configFromDomain(network: 'testnet' | 'mainnet' | 'custom'): ClientConfig { let rpcAddr = `https://archival-rpc.${network}.near.org`; if (network === 'mainnet' && process.env.NEAR_CLI_MAINNET_RPC_SERVER_URL) { rpcAddr = process.env.NEAR_CLI_MAINNET_RPC_SERVER_URL; } else if (network === 'testnet' && process.env.NEAR_CLI_TESTNET_RPC_SERVER_URL) { rpcAddr = process.env.NEAR_CLI_TESTNET_RPC_SERVER_URL; + } else if (network === 'custom' && process.env.NEAR_CLI_CUSTOM_RPC_SERVER_URL) { + rpcAddr = process.env.NEAR_CLI_CUSTOM_RPC_SERVER_URL; } return { @@ -84,9 +86,10 @@ export function urlConfigFromNetwork(network: string | {network: string}): Clien }; case 'testnet': - case 'mainnet': return configFromDomain(networkName); + case 'mainnet': + case 'custom': return configFromDomain(networkName); default: - throw new Error(`Got network ${networkName}, but only accept 'sandbox', 'testnet', and 'mainnet'`); + throw new Error(`Got network ${networkName}, but only accept 'sandbox', 'testnet', 'mainnet' and 'custom'`); } } @@ -107,18 +110,19 @@ export const EMPTY_CONTRACT_HASH = '11111111111111111111111111111111'; * * @returns network to connect to. Default 'sandbox' */ -export function getNetworkFromEnv(): 'sandbox' | 'testnet' { +export function getNetworkFromEnv(): 'sandbox' | 'testnet' | 'custom' { const network = process.env.NEAR_WORKSPACES_NETWORK; switch (network) { case 'sandbox': case 'testnet': + case 'custom': return network; case undefined: return 'sandbox'; default: throw new Error( `environment variable NEAR_WORKSPACES_NETWORK=${network} invalid; ` - + 'use \'testnet\', or \'sandbox\' (the default)', + + 'use \'testnet\', \'custom\', or \'sandbox\' (the default)', ); } } diff --git a/packages/js/src/worker.ts b/packages/js/src/worker.ts index f971c79c..f14aebd5 100644 --- a/packages/js/src/worker.ts +++ b/packages/js/src/worker.ts @@ -43,10 +43,12 @@ export abstract class Worker { return TestnetWorker.init(config); case 'sandbox': return SandboxWorker.init(config); + case 'custom': + return CustomnetWorker.init(config); default: throw new Error( `config.network = '${config.network}' invalid; ` // eslint-disable-line @typescript-eslint/restrict-template-expressions - + 'must be \'testnet\' or \'sandbox\' (the default). Soon \'mainnet\'', + + 'must be \'testnet\', \'sandbox\' or \'custom\' (the default). Soon \'mainnet\'', ); } } @@ -60,6 +62,41 @@ export abstract class Worker { abstract tearDown(): Promise; } +// Connect to a custom network. +// Note: the burden of ensuring the methods that are able to be called are left up to the user. +export class CustomnetWorker extends Worker { + static async init(config: Partial): Promise { + debug('Lifecycle.CustomnetWorker.create()', 'config:', config); + const fullConfig = {...this.defaultConfig, ...config}; + const worker = new CustomnetWorker(fullConfig); + await worker.manager.init(); + return worker; + } + + get provider(): JsonRpcProvider { + return JsonRpcProvider.from(CustomnetWorker.clientConfig); + } + + async tearDown(): Promise { + // We are not stopping any server here because we are using Testnet + return Promise.resolve(); + } + + static get defaultConfig(): Config { + return { + homeDir: 'ignored', + port: 3030, + rm: false, + refDir: null, + ...this.clientConfig, + }; + } + + private static get clientConfig(): ClientConfig { + return urlConfigFromNetwork('custom'); + } +} + export class TestnetWorker extends Worker { static async init(config: Partial): Promise { debug('Lifecycle.TestnetWorker.create()', 'config:', config); From 330804015ad58eebd89c5cebc8a87317c813219b Mon Sep 17 00:00:00 2001 From: Yasir Shariff Date: Tue, 9 Jan 2024 13:25:15 +0300 Subject: [PATCH 2/2] pass sample test --- __tests__/08.custom-network.ava.ts | 12 +++++- packages/js/dist/account/account-manager.d.ts | 8 ++++ .../js/dist/account/account-manager.d.ts.map | 2 +- packages/js/dist/account/account-manager.js | 27 +++++++++++- .../js/dist/account/account-manager.js.map | 2 +- packages/js/dist/account/index.js | 6 ++- packages/js/dist/account/index.js.map | 2 +- packages/js/dist/utils.d.ts | 1 + packages/js/dist/utils.d.ts.map | 2 +- packages/js/dist/utils.js | 12 +++--- packages/js/dist/utils.js.map | 2 +- packages/js/dist/worker.d.ts | 4 +- packages/js/dist/worker.d.ts.map | 2 +- packages/js/dist/worker.js | 38 +++++++++++++--- packages/js/dist/worker.js.map | 2 +- packages/js/src/account/account-manager.ts | 30 ++++++++++++- packages/js/src/utils.ts | 14 +++--- packages/js/src/worker.ts | 43 +++++++++++++++---- 18 files changed, 169 insertions(+), 40 deletions(-) diff --git a/__tests__/08.custom-network.ava.ts b/__tests__/08.custom-network.ava.ts index 8f26b7b8..2fc01a35 100644 --- a/__tests__/08.custom-network.ava.ts +++ b/__tests__/08.custom-network.ava.ts @@ -4,6 +4,8 @@ import anyTest, {TestFn} from 'ava'; // To run this test, you need to set the NEAR_RPC_API_KEY environment variable tied the Pagoda testnet network. // And the NEAR_WORKSPACES_NETWORK environment variable to 'custom'. +// +// Sample: NEAR_WORKSPACES_NETWORK=custom NEAR_RPC_API_KEY="xxx" yarn test... if (getNetworkFromEnv() === 'custom' && process.env.NEAR_RPC_API_KEY !== '') { const test = anyTest as TestFn<{ worker: Worker; @@ -25,8 +27,14 @@ if (getNetworkFromEnv() === 'custom' && process.env.NEAR_RPC_API_KEY !== '') { }); test('Ping network', async t => { - await t.context.worker.provider.block({finality: 'final'}); - console.log('Network is alive!'); + try { + await t.context.worker.provider.block({finality: 'final'}); + } catch (error: unknown) { + t.fail(`Failed to ping the network: ${error as string}`); + return; + } + + t.pass('Network pinged successfully!'); }); } diff --git a/packages/js/dist/account/account-manager.d.ts b/packages/js/dist/account/account-manager.d.ts index 3e627797..ab2d87e4 100644 --- a/packages/js/dist/account/account-manager.d.ts +++ b/packages/js/dist/account/account-manager.d.ts @@ -46,6 +46,14 @@ export declare abstract class AccountManager implements NearAccountManager { protected get networkId(): string; protected get connection(): nearAPI.Connection; } +export declare class CustomnetManager extends AccountManager { + get DEFAULT_INITIAL_BALANCE(): string; + get defaultKeyStore(): KeyStore; + get connection(): nearAPI.Connection; + get networkId(): string; + init(): Promise; + createFrom(config: Config): Promise; +} export declare class TestnetManager extends AccountManager { static readonly KEYSTORE_PATH: string; private static numTestAccounts; diff --git a/packages/js/dist/account/account-manager.d.ts.map b/packages/js/dist/account/account-manager.d.ts.map index 0741580d..1245c6e6 100644 --- a/packages/js/dist/account/account-manager.d.ts.map +++ b/packages/js/dist/account/account-manager.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"account-manager.d.ts","sourceRoot":"","sources":["../../src/account/account-manager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,aAAa,CAAC;AACvC,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,EAAE,EAAyC,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAEpJ,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAE1D,8BAAsB,cAAe,YAAW,kBAAkB;IAI9D,SAAS,CAAC,MAAM,EAAE,MAAM;IAH1B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IACzC,OAAO,CAAC,KAAK,CAAC,CAAc;gBAEhB,MAAM,EAAE,MAAM;IAG1B,MAAM,CAAC,MAAM,CACX,MAAM,EAAE,MAAM,GACb,cAAc;IAWX,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAI1D,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW;IAI1C,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW;IAS1C,SAAS,CACb,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;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AG,IAAI;IAK1C;;;;OAIG;IACG,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAQ9D"} \ No newline at end of file diff --git a/packages/js/dist/account/account-manager.js b/packages/js/dist/account/account-manager.js index c15230bd..6a2ff7b2 100644 --- a/packages/js/dist/account/account-manager.js +++ b/packages/js/dist/account/account-manager.js @@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ManagedTransaction = exports.SandboxManager = exports.TestnetManager = exports.AccountManager = void 0; +exports.ManagedTransaction = exports.SandboxManager = exports.TestnetManager = exports.CustomnetManager = exports.AccountManager = void 0; const path = __importStar(require("path")); const process = __importStar(require("process")); const nearAPI = __importStar(require("near-api-js")); @@ -48,7 +48,9 @@ class AccountManager { return new SandboxManager(config); case 'testnet': return new TestnetManager(config); - default: throw new Error(`Bad network id: "${network}"; expected "testnet" or "sandbox"`); + case 'custom': + return new CustomnetManager(config); + default: throw new Error(`Bad network id: "${network}"; expected "testnet", "custom" or "sandbox"`); } } async accountView(accountId) { @@ -204,6 +206,27 @@ class AccountManager { } } exports.AccountManager = AccountManager; +class CustomnetManager extends AccountManager { + get DEFAULT_INITIAL_BALANCE() { + return near_units_1.NEAR.parse('10 N').toJSON(); + } + get defaultKeyStore() { + return new nearAPI.keyStores.InMemoryKeyStore(); + } + get connection() { + return new nearAPI.Connection(this.networkId, this.provider, this.signer, `jsvm.${this.networkId}`); + } + get networkId() { + return this.config.network; + } + async init() { + return this; + } + async createFrom(config) { + return new CustomnetManager(config); + } +} +exports.CustomnetManager = CustomnetManager; class TestnetManager extends AccountManager { static get defaultKeyStore() { const keyStore = new nearAPI.keyStores.UnencryptedFileSystemKeyStore(this.KEYSTORE_PATH); diff --git a/packages/js/dist/account/account-manager.js.map b/packages/js/dist/account/account-manager.js.map index 23c39fb9..d546c744 100644 --- a/packages/js/dist/account/account-manager.js.map +++ b/packages/js/dist/account/account-manager.js.map @@ -1 +1 @@ -{"version":3,"file":"account-manager.js","sourceRoot":"","sources":["../../src/account/account-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,iDAAmC;AACnC,qDAAuC;AACvC,2CAAgC;AAChC,oCAAkE;AAClE,oCAAoJ;AACpJ,sDAAiD;AACjD,gDAA2C;AAC3C,wCAA2C;AAC3C,8DAAwD;AACxD,uCAAkC;AAElC,mCAAuC;AAGvC,MAAsB,cAAc;IAGlC,YACY,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAH1B,oBAAe,GAAgB,IAAI,GAAG,EAAE,CAAC;IAItC,CAAC;IAEJ,MAAM,CAAC,MAAM,CACX,MAAc;QAEd,MAAM,EAAC,OAAO,EAAC,GAAG,MAAM,CAAC;QACzB,QAAQ,OAAO,EAAE;YACf,KAAK,SAAS;gBACZ,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;YACpC,KAAK,SAAS;gBACZ,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;YACpC,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,oBAAoB,OAAiB,oCAAoC,CAAC,CAAC;SACrG;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,SAAiB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC9C,CAAC;IAED,UAAU,CAAC,SAAiB;QAC1B,OAAO,IAAI,iBAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,gBAAgB,CAAC,SAAiB;QAChC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;SACnC;QAED,OAAO,IAAI,CAAC,UAAU,CAAC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,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;IAC9D,CAAC;CACF;AA3BD,wCA2BC;AAED,MAAa,kBAAmB,SAAQ,yBAAW;IAEjD,YAA6B,OAAuB,EAAE,MAA6B,EAAE,QAA+B;QAClH,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QADG,YAAO,GAAP,OAAO,CAAgB;QAD5C,WAAM,GAAG,KAAK,CAAC;IAGvB,CAAC;IAED,aAAa;QACX,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/D,OAAO,KAAK,CAAC,aAAa,EAAE,CAAC;IAC/B,CAAC;IAED,aAAa,CAAC,aAAqB;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAiB;QAC9B,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7E,IAAI,eAAe,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE;YAC5C,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC/C;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AA7BD,gDA6BC"} \ No newline at end of file +{"version":3,"file":"account-manager.js","sourceRoot":"","sources":["../../src/account/account-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,iDAAmC;AACnC,qDAAuC;AACvC,2CAAgC;AAChC,oCAAkE;AAClE,oCAAoJ;AACpJ,sDAAiD;AACjD,g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AM,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7E,IAAI,eAAe,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE;YAC5C,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC/C;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AA7BD,gDA6BC"} \ No newline at end of file diff --git a/packages/js/dist/account/index.js b/packages/js/dist/account/index.js index fac830ac..5241593f 100644 --- a/packages/js/dist/account/index.js +++ b/packages/js/dist/account/index.js @@ -1,7 +1,11 @@ "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; diff --git a/packages/js/dist/account/index.js.map b/packages/js/dist/account/index.js.map index a6b16130..7367f83f 100644 --- a/packages/js/dist/account/index.js.map +++ b/packages/js/dist/account/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B;AAC/B,yDAAuC;AACvC,oDAAkC;AAClC,4CAA0B"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,yDAAuC;AACvC,oDAAkC;AAClC,4CAA0B"} \ No newline at end of file diff --git a/packages/js/dist/utils.d.ts b/packages/js/dist/utils.d.ts index baaad9a0..4bee558a 100644 --- a/packages/js/dist/utils.d.ts +++ b/packages/js/dist/utils.d.ts @@ -13,6 +13,7 @@ export declare function captureError(fn: () => Promise): Promise; export declare function isTopLevelAccount(accountId: string): boolean; export declare function urlConfigFromNetwork(network: string | { network: string; + rpcAddr?: string; }): ClientConfig; /** * diff --git a/packages/js/dist/utils.d.ts.map b/packages/js/dist/utils.d.ts.map index b4a8b579..287d7ae6 100644 --- a/packages/js/dist/utils.d.ts.map +++ b/packages/js/dist/utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAO9B,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAC,MAAM,SAAS,CAAC;AAE1E,eAAO,MAAM,QAAQ,MAAmB,CAAC;AAEzC,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,UAQtC;AAGD,wBAAgB,eAAe,CAAC,MAAM,SAAS,EAAE,UAAU,SAAK,EAAE,YAAY,SAAK,GAAG,MAAM,CAG3F;AAED,wBAAgB,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,MAAM,CAEtD;AAED,eAAO,MAAM,UAAU,MAAe,CAAC;AAEvC,wBAAsB,YAAY,CAAC,EAAE,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAU1E;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE5D;AAsBD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAAG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,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAU1E;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE5D;AAoBD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,YAAY,CAqBxG;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAI9D;AAED,eAAO,MAAM,mBAAmB,qCAAqC,CAAC;AAEtE;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,GAAG,SAAS,GAAG,QAAQ,CAepE;AAED,wBAAgB,YAAY,IAAI,QAAQ,CAIvC;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAE7D;AAID,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,EAAE,GAAG,GAAG,CAM5C;AAID,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,EAAE,GAAG,IAAI,CAM9C"} \ No newline at end of file diff --git a/packages/js/dist/utils.js b/packages/js/dist/utils.js index 03863c73..1a468567 100644 --- a/packages/js/dist/utils.js +++ b/packages/js/dist/utils.js @@ -86,9 +86,6 @@ function configFromDomain(network) { else if (network === 'testnet' && process.env.NEAR_CLI_TESTNET_RPC_SERVER_URL) { rpcAddr = process.env.NEAR_CLI_TESTNET_RPC_SERVER_URL; } - else if (network === 'custom' && process.env.NEAR_CLI_CUSTOM_RPC_SERVER_URL) { - rpcAddr = process.env.NEAR_CLI_CUSTOM_RPC_SERVER_URL; - } return { network, rpcAddr, @@ -100,15 +97,20 @@ function configFromDomain(network) { } function urlConfigFromNetwork(network) { const networkName = typeof network === 'string' ? network : network.network; + const rpcAddr = typeof network === 'string' ? undefined : network.rpcAddr; switch (networkName) { case 'sandbox': return { network: 'sandbox', rpcAddr: 'http://localhost', }; + case 'custom': + return { + network: 'custom', + rpcAddr: rpcAddr, + }; case 'testnet': - case 'mainnet': - case 'custom': return configFromDomain(networkName); + case 'mainnet': return configFromDomain(networkName); default: throw new Error(`Got network ${networkName}, but only accept 'sandbox', 'testnet', 'mainnet' and 'custom'`); } diff --git a/packages/js/dist/utils.js.map b/packages/js/dist/utils.js.map index b3134aa9..a760197b 100644 --- a/packages/js/dist/utils.js.map +++ b/packages/js/dist/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA8B;AAC9B,iDAAmC;AACnC,uCAAyB;AACzB,2CAA6B;AAC7B,qDAAuC;AACvC,0DAA+B;AAC/B,gDAAwB;AACxB,2CAAqC;AAGxB,QAAA,QAAQ,GAAG,iBAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAEzC,SAAgB,OAAO,CAAC,MAAc;IACpC,OAAO,iBAAI,CAAC,KAAK,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC7C,CAAC;AAFD,0BAEC;AAED,SAAgB,aAAa;IAC3B,OAAO,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;AACnD,CAAC;AAFD,sCAEC;AAED,SAAgB,IAAI,CAAC,CAAkB;IACrC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE;QACjE,MAAM,IAAI,SAAS,CACjB,uDAAuD,CAAC,EAAE,CAC3D,CAAC;KACH;IAED,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACpC,CAAC;AARD,oBAQC;AAED,2DA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AC,EAAE;QAC5D,OAAO,iBAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACtB;IAED,OAAO,iBAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAND,8BAMC"} \ No newline at end of file diff --git a/packages/js/dist/worker.d.ts b/packages/js/dist/worker.d.ts index bdb0be03..378cd311 100644 --- a/packages/js/dist/worker.d.ts +++ b/packages/js/dist/worker.d.ts @@ -28,11 +28,11 @@ export declare abstract class Worker { abstract tearDown(): Promise; } export declare class CustomnetWorker extends Worker { + private readonly clientConfig; static init(config: Partial): Promise; get provider(): JsonRpcProvider; tearDown(): Promise; - static get defaultConfig(): Config; - private static get clientConfig(); + get defaultConfig(): Config; } export declare class TestnetWorker extends Worker { static init(config: Partial): Promise; diff --git a/packages/js/dist/worker.d.ts.map b/packages/js/dist/worker.d.ts.map index 8a79da2a..e59a7ca3 100644 --- a/packages/js/dist/worker.d.ts.map +++ b/packages/js/dist/worker.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,MAAM,EAAe,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAiB,WAAW,EAAE,kBAAkB,EAAC,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAC,eAAe,EAAC,MAAM,WAAW,CAAC;AAI1C;;GAEG;AACH,8BAAsB,MAAM;IAC1B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,SAAS,CAAC,OAAO,EAAG,kBAAkB,CAAC;gBAE3B,MAAM,EAAE,MAAM;IAM1B;;;;;;;;;;;;;OAaG;WACU,IAAI,CAAC,MAAM,GAAE,OAAO,CAAC,MAAM,CAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAiBhE,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,QAAQ,KAAK,QAAQ,IAAI,eAAe,CAAC;IAEzC,QAAQ,CAAC,QAAQ,IAAI,O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C;IAQ/B,OAAO,CAAC,MAAM,KAAK,YAAY,GAO9B;IAED,OAAO,KAAK,OAAO,GAElB;CACF"} \ No newline at end of file diff --git a/packages/js/dist/worker.js b/packages/js/dist/worker.js index b5ff515c..6ca8cfa3 100644 --- a/packages/js/dist/worker.js +++ b/packages/js/dist/worker.js @@ -12,6 +12,7 @@ const account_1 = require("./account"); const jsonrpc_1 = require("./jsonrpc"); const internal_utils_1 = require("./internal-utils"); const server_1 = require("./server/server"); +const API_KEY_HEADER = 'x-api-key'; /** * The main interface to near-workspaces. Create a new worker instance with {@link Worker.init}, then run code on it. */ @@ -58,21 +59,37 @@ exports.Worker = Worker; // Connect to a custom network. // Note: the burden of ensuring the methods that are able to be called are left up to the user. class CustomnetWorker extends Worker { + constructor() { + super(...arguments); + this.clientConfig = (0, utils_1.urlConfigFromNetwork)({ network: 'custom', rpcAddr: this.config.rpcAddr }); + } static async init(config) { (0, internal_utils_1.debug)('Lifecycle.CustomnetWorker.create()', 'config:', config); - const fullConfig = { ...this.defaultConfig, ...config }; + const fullConfig = { + homeDir: 'ignored', + port: 3030, + rm: false, + refDir: null, + ...(0, utils_1.urlConfigFromNetwork)({ network: 'custom', rpcAddr: config.rpcAddr }), + ...config, + }; const worker = new CustomnetWorker(fullConfig); + if (config.apiKey) { + worker.provider.connection.headers = { + ...worker.provider.connection.headers, [API_KEY_HEADER]: config.apiKey, + }; + } await worker.manager.init(); return worker; } get provider() { - return jsonrpc_1.JsonRpcProvider.from(CustomnetWorker.clientConfig); + return jsonrpc_1.JsonRpcProvider.from(this.clientConfig); } async tearDown() { - // We are not stopping any server here because we are using Testnet + // We are not stopping any server here because it is an external network. return Promise.resolve(); } - static get defaultConfig() { + get defaultConfig() { return { homeDir: 'ignored', port: 3030, @@ -81,9 +98,6 @@ class CustomnetWorker extends Worker { ...this.clientConfig, }; } - static get clientConfig() { - return (0, utils_1.urlConfigFromNetwork)('custom'); - } } exports.CustomnetWorker = CustomnetWorker; class TestnetWorker extends Worker { @@ -91,6 +105,11 @@ class TestnetWorker extends Worker { (0, internal_utils_1.debug)('Lifecycle.TestnetWorker.create()', 'config:', config); const fullConfig = { ...this.defaultConfig, ...config }; const worker = new TestnetWorker(fullConfig); + if (config.apiKey) { + worker.provider.connection.headers = { + ...worker.provider.connection.headers, [API_KEY_HEADER]: config.apiKey, + }; + } await worker.manager.init(); return worker; } @@ -139,6 +158,11 @@ class SandboxWorker extends Worker { const release = await (0, proper_lockfile_1.lock)(syncFilename, retryOptions); const defaultConfig = await this.defaultConfig(); const worker = new SandboxWorker({ ...defaultConfig, ...config }); + if (config.apiKey) { + worker.provider.connection.headers = { + ...worker.provider.connection.headers, [API_KEY_HEADER]: config.apiKey, + }; + } worker.server = await server_1.SandboxServer.init(worker.config); await worker.server.start(); // Release file lock after near node start diff --git a/packages/js/dist/worker.js.map b/packages/js/dist/worker.js.map index a0451157..a5016dfd 100644 --- a/packages/js/dist/worker.js.map +++ b/packages/js/dist/worker.js.map @@ -1 +1 @@ -{"version":3,"file":"worker.js","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,2CAAgC;AAChC,qDAAqC;AACrC,mCAAgE;AAEhE,uCAA0E;AAC1E,uCAA0C;AAC1C,qDAAuC;AACvC,4CAA8C;AAE9C;;GAEG;AACH,MAAsB,MAAM;IAK1B,YAAY,MAAc;QACxB,IAAA,sBAAK,EAAC,8BAA8B,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,wBAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAA0B,EAAE;;QAC5C,IAAA,sBAAK,EAAC,yBAAyB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QACpD,QAAQ,MAAA,MAAM,CAA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,CAAC,KAAK,EAAE,CAAC;SAC3B;QAAC,OAAO,KAAc,EAAE;YACvB,IAAA,sBAAK,EAAC,kCAAkC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;SAC3E;IACH,CAAC;IAEO,MAAM,KAAK,YAAY;QAC7B,OAAO;YACL,OAAO,EAAE,SAAS;YAClB,aAAa,EAAE,WAAW;YAC1B,OAAO,EAAE,EAAE;YACX,cAAc,EAAE,iBAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE;SAC7C,CAAC;IACJ,CAAC;IAED,IAAY,OAAO;QACjB,OAAO,oBAAoB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAChD,CAAC;CACF;AA7ED,sCA6EC"} \ No newline at end of file diff --git a/packages/js/src/account/account-manager.ts b/packages/js/src/account/account-manager.ts index 2cc9485e..0db38ac2 100644 --- a/packages/js/src/account/account-manager.ts +++ b/packages/js/src/account/account-manager.ts @@ -29,7 +29,9 @@ export abstract class AccountManager implements NearAccountManager { return new SandboxManager(config); case 'testnet': return new TestnetManager(config); - default: throw new Error(`Bad network id: "${network as string}"; expected "testnet" or "sandbox"`); + case 'custom': + return new CustomnetManager(config); + default: throw new Error(`Bad network id: "${network as string}"; expected "testnet", "custom" or "sandbox"`); } } @@ -220,6 +222,32 @@ export abstract class AccountManager implements NearAccountManager { } } +export class CustomnetManager extends AccountManager { + get DEFAULT_INITIAL_BALANCE(): string { + return NEAR.parse('10 N').toJSON(); + } + + get defaultKeyStore(): KeyStore { + return new nearAPI.keyStores.InMemoryKeyStore(); + } + + get connection(): nearAPI.Connection { + return new nearAPI.Connection(this.networkId, this.provider, this.signer, `jsvm.${this.networkId}`); + } + + get networkId(): string { + return this.config.network; + } + + async init(): Promise { + return this; + } + + async createFrom(config: Config): Promise { + return new CustomnetManager(config); + } +} + export class TestnetManager extends AccountManager { static readonly KEYSTORE_PATH: string = path.join(process.cwd(), '.near-credentials', 'workspaces'); private static numTestAccounts = 0; diff --git a/packages/js/src/utils.ts b/packages/js/src/utils.ts index 09c736eb..0949c251 100644 --- a/packages/js/src/utils.ts +++ b/packages/js/src/utils.ts @@ -62,8 +62,6 @@ function configFromDomain(network: 'testnet' | 'mainnet' | 'custom'): ClientConf rpcAddr = process.env.NEAR_CLI_MAINNET_RPC_SERVER_URL; } else if (network === 'testnet' && process.env.NEAR_CLI_TESTNET_RPC_SERVER_URL) { rpcAddr = process.env.NEAR_CLI_TESTNET_RPC_SERVER_URL; - } else if (network === 'custom' && process.env.NEAR_CLI_CUSTOM_RPC_SERVER_URL) { - rpcAddr = process.env.NEAR_CLI_CUSTOM_RPC_SERVER_URL; } return { @@ -76,8 +74,9 @@ function configFromDomain(network: 'testnet' | 'mainnet' | 'custom'): ClientConf }; } -export function urlConfigFromNetwork(network: string | {network: string}): ClientConfig { +export function urlConfigFromNetwork(network: string | {network: string; rpcAddr?: string}): ClientConfig { const networkName = typeof network === 'string' ? network : network.network; + const rpcAddr = typeof network === 'string' ? undefined : network.rpcAddr; switch (networkName) { case 'sandbox': return { @@ -85,9 +84,14 @@ export function urlConfigFromNetwork(network: string | {network: string}): Clien rpcAddr: 'http://localhost', }; + case 'custom': + return { + network: 'custom', + rpcAddr: rpcAddr!, + }; + case 'testnet': - case 'mainnet': - case 'custom': return configFromDomain(networkName); + case 'mainnet': return configFromDomain(networkName); default: throw new Error(`Got network ${networkName}, but only accept 'sandbox', 'testnet', 'mainnet' and 'custom'`); } diff --git a/packages/js/src/worker.ts b/packages/js/src/worker.ts index f14aebd5..579cffd6 100644 --- a/packages/js/src/worker.ts +++ b/packages/js/src/worker.ts @@ -8,6 +8,8 @@ import {JsonRpcProvider} from './jsonrpc'; import {debug} from './internal-utils'; import {SandboxServer} from './server/server'; +const API_KEY_HEADER = 'x-api-key'; + /** * The main interface to near-workspaces. Create a new worker instance with {@link Worker.init}, then run code on it. */ @@ -65,24 +67,40 @@ export abstract class Worker { // Connect to a custom network. // Note: the burden of ensuring the methods that are able to be called are left up to the user. export class CustomnetWorker extends Worker { + private readonly clientConfig: ClientConfig = urlConfigFromNetwork({network: 'custom', rpcAddr: this.config.rpcAddr}); + static async init(config: Partial): Promise { debug('Lifecycle.CustomnetWorker.create()', 'config:', config); - const fullConfig = {...this.defaultConfig, ...config}; + const fullConfig = { + homeDir: 'ignored', + port: 3030, + rm: false, + refDir: null, + ...urlConfigFromNetwork({network: 'custom', rpcAddr: config.rpcAddr}), // Copied over, can't access member clientConfig here + ...config, + }; + const worker = new CustomnetWorker(fullConfig); + if (config.apiKey) { + worker.provider.connection.headers = { + ...worker.provider.connection.headers, [API_KEY_HEADER]: config.apiKey, + }; + } + await worker.manager.init(); return worker; } get provider(): JsonRpcProvider { - return JsonRpcProvider.from(CustomnetWorker.clientConfig); + return JsonRpcProvider.from(this.clientConfig); } async tearDown(): Promise { - // We are not stopping any server here because we are using Testnet + // We are not stopping any server here because it is an external network. return Promise.resolve(); } - static get defaultConfig(): Config { + get defaultConfig(): Config { return { homeDir: 'ignored', port: 3030, @@ -91,17 +109,20 @@ export class CustomnetWorker extends Worker { ...this.clientConfig, }; } - - private static get clientConfig(): ClientConfig { - return urlConfigFromNetwork('custom'); - } } export class TestnetWorker extends Worker { static async init(config: Partial): Promise { debug('Lifecycle.TestnetWorker.create()', 'config:', config); const fullConfig = {...this.defaultConfig, ...config}; + const worker = new TestnetWorker(fullConfig); + if (config.apiKey) { + worker.provider.connection.headers = { + ...worker.provider.connection.headers, [API_KEY_HEADER]: config.apiKey, + }; + } + await worker.manager.init(); return worker; } @@ -157,6 +178,12 @@ export class SandboxWorker extends Worker { const release = await lock(syncFilename, retryOptions); const defaultConfig = await this.defaultConfig(); const worker = new SandboxWorker({...defaultConfig, ...config}); + if (config.apiKey) { + worker.provider.connection.headers = { + ...worker.provider.connection.headers, [API_KEY_HEADER]: config.apiKey, + }; + } + worker.server = await SandboxServer.init(worker.config); await worker.server.start(); // Release file lock after near node start