From bbb38f0537c85ca72ce001dab21f36024b4ffa8b Mon Sep 17 00:00:00 2001 From: MickeyWang <1244134672@qq.com> Date: Mon, 14 Oct 2019 12:56:19 +0800 Subject: [PATCH] to support wasm contract --- package.json | 4 +- public/manifest.json | 2 +- src/background/api/messageApi.ts | 2 +- src/background/api/smartContractApi.ts | 81 ++++++++++++++----- src/background/dapp/asset.ts | 2 +- src/background/dapp/identity.ts | 2 +- src/background/dapp/index.ts | 2 +- src/background/dapp/message.ts | 2 +- src/background/dapp/network.ts | 2 +- src/background/dapp/provider.ts | 2 +- src/background/dapp/smartContract.ts | 65 +++++++++------ src/background/dapp/state-channel.ts | 4 +- src/background/dapp/stateChannel.ts | 2 +- src/background/popUpManager.ts | 2 +- .../redux/transactionRequestsReducer.ts | 4 +- src/background/requestsManager.ts | 9 ++- src/content/index.ts | 2 +- src/global.d.ts | 2 +- src/popup/backgroundManager.ts | 2 +- src/redux/transactionRequests.ts | 6 +- yarn.lock | 34 ++++---- 21 files changed, 148 insertions(+), 85 deletions(-) diff --git a/package.json b/package.json index 34b95de..9b8ada0 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@bugsnag/plugin-react": "^5.1.0", "@ont-community/hdkey-secp256r1": "^1.0.1", "@ont-community/ontology-ts-sdk-ledger": "^1.0.8", + "@ont-dev/ontology-dapi": "^0.4.9", "autoprefixer": "7.1.6", "axios": "^0.18.0", "babel-polyfill": "^6.26.0", @@ -30,8 +31,7 @@ "lodash": "^4.17.10", "long": "^4.0.0", "object-assign": "4.1.1", - "ontology-dapi": "^0.4.9", - "ontology-ts-sdk": "^1.0.22", + "ontology-ts-sdk": "^1.0.24", "ontology-ts-test": "^0.2.37", "postcss-flexbugs-fixes": "3.2.0", "promise": "8.0.1", diff --git a/public/manifest.json b/public/manifest.json index d8407ae..8464ce7 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -4,7 +4,7 @@ "name": "Cyano wallet", "author": "Matus Zamborsky ", "description": "Cyano wallet - an Ontology wallet", - "version": "0.7.15", + "version": "0.7.16", "browser_action": { "default_title": "Open the wallet" diff --git a/src/background/api/messageApi.ts b/src/background/api/messageApi.ts index 172a23d..4357393 100644 --- a/src/background/api/messageApi.ts +++ b/src/background/api/messageApi.ts @@ -1,4 +1,4 @@ -import { Signature } from 'ontology-dapi'; +import { Signature } from '@ont-dev/ontology-dapi'; import { Crypto, utils } from 'ontology-ts-sdk'; import { decryptAccount } from '../../api/accountApi'; import { getWallet } from '../../api/authApi'; diff --git a/src/background/api/smartContractApi.ts b/src/background/api/smartContractApi.ts index d3030d1..f78eff8 100644 --- a/src/background/api/smartContractApi.ts +++ b/src/background/api/smartContractApi.ts @@ -15,8 +15,8 @@ * You should have received a copy of the GNU Lesser General Public License * along with The Ontology Wallet&ID. If not, see . */ -import { Parameter } from 'ontology-dapi'; -import { Crypto, Transaction, TransactionBuilder, utils } from 'ontology-ts-sdk'; +import { Parameter } from '@ont-dev/ontology-dapi'; +import { Crypto, Parameter as Param, ParameterType, Transaction, TransactionBuilder, utils } from 'ontology-ts-sdk'; import { buildInvokePayload } from 'ontology-ts-test'; import { decryptAccount, getAccount } from '../../api/accountApi'; import { getWallet } from '../../api/authApi'; @@ -25,7 +25,7 @@ import { getClient } from '../network'; import { getStore } from '../redux'; import Address = Crypto.Address; -import {decryptDefaultIdentity } from 'src/api/identityApi'; +import { decryptDefaultIdentity } from 'src/api/identityApi'; /** * Creates, signs and sends the transaction for Smart Contract call. @@ -48,15 +48,16 @@ export async function scCall(request: ScCallRequest, password: string): Promise< const state = getStore().getState(); const wallet = getWallet(state.wallet.wallet!); const account = getAccount(state.wallet.wallet!).address; - + let tx: Transaction; if (request.presignedTransaction) { tx = Transaction.deserialize(request.presignedTransaction); } else { // convert params const params = convertParams(request.parameters); + /* + * we use ontology-ts-sdk to build the transaction const payload = buildInvokePayload(request.contract, request.method, params); - tx = TransactionBuilder.makeInvokeTransaction( request.method, [], @@ -65,8 +66,27 @@ export async function scCall(request: ScCallRequest, password: string): Promise< String(request.gasLimit), account, ); - (tx.payload as any).code = payload.toString('hex'); + */ + if (request.isWasmVm) { + tx = TransactionBuilder.makeWasmVmInvokeTransaction( + request.method, + params, + new Address(utils.reverseHex(request.contract)), + String(request.gasPrice), + String(request.gasLimit), + account, + ) + } else { + tx = TransactionBuilder.makeInvokeTransaction( + request.method, + params, + new Address(utils.reverseHex(request.contract)), + String(request.gasPrice), + String(request.gasLimit), + account, + ); + } } let privateKey: Crypto.PrivateKey; @@ -100,19 +120,37 @@ export async function scCall(request: ScCallRequest, password: string): Promise< export async function scCallRead(request: ScCallReadRequest) { request.parameters = request.parameters !== undefined ? request.parameters : []; - + const gasPrice = '500'; + const gasLimit = '30000'; // convert params const params = convertParams(request.parameters); + /* const payload = buildInvokePayload(request.contract, request.method, params); - const tx = TransactionBuilder.makeInvokeTransaction( request.method, [], new Address(utils.reverseHex(request.contract)), ); - (tx.payload as any).code = payload.toString('hex'); - + */ + let tx: Transaction; + if (request.isWasmVm) { + tx = TransactionBuilder.makeWasmVmInvokeTransaction( + request.method, + params, + new Address(utils.reverseHex(request.contract)), + gasPrice, + gasLimit, + ); + } else { + tx = TransactionBuilder.makeInvokeTransaction( + request.method, + params, + new Address(utils.reverseHex(request.contract)), + gasPrice, + gasLimit, + ) + } const client = getClient(); return await client.sendRawTransaction(tx.serialize(), true, false); } @@ -134,7 +172,7 @@ export async function scDeploy(request: ScDeployRequest, password: string) { request.author, request.email, request.description, - request.needStorage, + request.vmType, String(request.gasPrice), String(request.gasLimit), account, @@ -146,7 +184,7 @@ export async function scDeploy(request: ScDeployRequest, password: string) { return await client.sendRawTransaction(tx.serialize(), false, true); } -function convertParams(parameters?: Parameter[]): any[] { +function convertParams(parameters?: Parameter[]): Param[] { if (parameters === undefined) { return []; } @@ -165,19 +203,24 @@ function convertMapParams(map: any) { return obj; } -function convertParam(parameter: Parameter) { +function convertParam(parameter: Parameter): Param { if (parameter.type === 'Boolean') { - return parameter.value === true || parameter.value === 'true'; + return new Param('', ParameterType.Boolean, parameter.value === true || parameter.value === 'true') } else if (parameter.type === 'Integer') { - return Number(parameter.value); + return new Param('', ParameterType.Integer, Number(parameter.value)) } else if (parameter.type === 'ByteArray') { - return new Buffer(parameter.value, 'hex'); + // return new Buffer(parameter.value, 'hex'); + // return parameter.value; + // will use ontology-ts-sdk to build script code and it treats ByteArray as hex string; + return new Param('', ParameterType.ByteArray, parameter.value) } else if (parameter.type === 'String') { - return parameter.value; + return new Param('', ParameterType.String, parameter.value) } else if (parameter.type === 'Array') { - return convertParams(parameter.value); + return new Param('', ParameterType.Array, convertParams(parameter.value)); } else if (parameter.type === 'Map') { - return convertMapParams(parameter.value); + return new Param('', ParameterType.Map, convertMapParams(parameter.value)); + } else if (parameter.type === 'Address') { + return new Param('', ParameterType.Address, new Address(parameter.value)); } else { // send as is, so underlying library can process it return parameter.value; diff --git a/src/background/dapp/asset.ts b/src/background/dapp/asset.ts index 0df4039..c59a120 100644 --- a/src/background/dapp/asset.ts +++ b/src/background/dapp/asset.ts @@ -1,4 +1,4 @@ -import { AssetApi } from 'ontology-dapi'; +import { AssetApi } from '@ont-dev/ontology-dapi'; import { getAddress, getPublicKey } from '../../api/accountApi'; import { getStore } from '../redux'; import { getRequestsManager } from '../requestsManager'; diff --git a/src/background/dapp/identity.ts b/src/background/dapp/identity.ts index 55b2b3d..1d6e067 100644 --- a/src/background/dapp/identity.ts +++ b/src/background/dapp/identity.ts @@ -1,4 +1,4 @@ -import { IdentityApi, OntIdDDO } from 'ontology-dapi'; +import { IdentityApi, OntIdDDO } from '@ont-dev/ontology-dapi'; import { DDO, OntidContract } from 'ontology-ts-sdk'; import { getIdentity } from '../../api/identityApi'; import { getClient } from '../network'; diff --git a/src/background/dapp/index.ts b/src/background/dapp/index.ts index 1d505d2..cf452dd 100644 --- a/src/background/dapp/index.ts +++ b/src/background/dapp/index.ts @@ -1,4 +1,4 @@ -import { client, provider } from 'ontology-dapi'; +import { client, provider } from '@ont-dev/ontology-dapi'; import { assetApi as asset } from './asset'; import { identityApi as identity } from './identity'; import { messageApi as message } from './message'; diff --git a/src/background/dapp/message.ts b/src/background/dapp/message.ts index acebd31..df6d8de 100644 --- a/src/background/dapp/message.ts +++ b/src/background/dapp/message.ts @@ -1,4 +1,4 @@ -import { MessageApi, Signature } from 'ontology-dapi'; +import { MessageApi, Signature } from '@ont-dev/ontology-dapi'; import { messageVerify } from '../api/messageApi'; import { getRequestsManager } from '../requestsManager'; diff --git a/src/background/dapp/network.ts b/src/background/dapp/network.ts index b217951..a667eab 100644 --- a/src/background/dapp/network.ts +++ b/src/background/dapp/network.ts @@ -1,5 +1,5 @@ import Address = Crypto.Address; -import { Balance, Block, MerkleProof, Network, NetworkApi, Transaction } from 'ontology-dapi'; +import { Balance, Block, MerkleProof, Network, NetworkApi, Transaction } from '@ont-dev/ontology-dapi'; import { Crypto } from 'ontology-ts-sdk'; import { decodeAmount } from 'src/popup/utils/number'; import { getTokenBalance } from '../api/tokenApi'; diff --git a/src/background/dapp/provider.ts b/src/background/dapp/provider.ts index d9421de..0740a74 100644 --- a/src/background/dapp/provider.ts +++ b/src/background/dapp/provider.ts @@ -1,4 +1,4 @@ -import { Provider, ProviderApi } from 'ontology-dapi'; +import { Provider, ProviderApi } from '@ont-dev/ontology-dapi'; import { browser } from 'webextension-polyfill-ts'; export const providerApi: ProviderApi = { diff --git a/src/background/dapp/smartContract.ts b/src/background/dapp/smartContract.ts index 38b33ce..42eaffe 100644 --- a/src/background/dapp/smartContract.ts +++ b/src/background/dapp/smartContract.ts @@ -1,41 +1,58 @@ -import { Response, SmartContractApi } from 'ontology-dapi'; +import { Response, SmartContractApi } from '@ont-dev/ontology-dapi'; import { Hash } from 'ontology-ts-crypto'; import { getRequestsManager } from '../requestsManager'; -export const smartContractApi: SmartContractApi = { - async invoke(options): Promise { - const { scriptHash, operation, args, gasPrice, gasLimit, requireIdentity } = options; +async function invoke(options: any): Promise { + const { scriptHash, operation, args, gasPrice, gasLimit, requireIdentity, isWasmVm } = options; - const oldOptions: any = options; + const oldOptions: any = options; - const parameters = args !== undefined ? args : oldOptions.parameters; - const paramsHash = Hash.sha256(new Buffer(JSON.stringify(parameters))).toString('hex'); + const parameters = args !== undefined ? args : oldOptions.parameters; + const paramsHash = Hash.sha256(new Buffer(JSON.stringify(parameters))).toString('hex'); - return await getRequestsManager().initScCall({ - contract: scriptHash !== undefined ? scriptHash : oldOptions.contract, - gasLimit, - gasPrice, - method: operation !== undefined ? operation : oldOptions.method, - parameters, - paramsHash, - requireIdentity, - }); - }, + return await getRequestsManager().initScCall({ + contract: scriptHash !== undefined ? scriptHash : oldOptions.contract, + gasLimit, + gasPrice, + isWasmVm, + method: operation !== undefined ? operation : oldOptions.method, + parameters, + paramsHash, + requireIdentity, + }); +} - async invokeRead(options): Promise { - const { scriptHash, operation, args } = options; +async function invokeRead(options: any): Promise { + const { scriptHash, operation, args, isWasmVm } = options; const oldOptions: any = options; - return await getRequestsManager().initScCallRead({ - contract: scriptHash !== undefined ? scriptHash : oldOptions.contract, - method: operation !== undefined ? operation : oldOptions.method, + return await getRequestsManager().initScCallRead({ + contract: scriptHash !== undefined ? scriptHash : oldOptions.contract, + isWasmVm, + method: operation !== undefined ? operation : oldOptions.method, parameters: args !== undefined ? args : oldOptions.parameters, }); +} + +export const smartContractApi: SmartContractApi = { + async invoke(options: any): Promise { + return invoke(options); + }, + async invokeWasm(options: any): Promise { + return invoke(Object.assign({}, options, { isWasmVm: true })); + }, + + async invokeRead(options: any): Promise { + return invokeRead(options); + }, + + async invokeWasmRead(options: any): Promise { + return invokeRead(Object.assign({}, options, { isWasmVm: true })); }, - async deploy({ code, name, version, author, email, description, needStorage, gasPrice, gasLimit }): Promise { + async deploy({ code, name, version, author, email, description, vmType, gasPrice, gasLimit }): Promise { return await getRequestsManager().initScDeploy({ author, code, @@ -44,8 +61,8 @@ export const smartContractApi: SmartContractApi = { gasLimit, gasPrice, name, - needStorage, version, + vmType, }); }, }; diff --git a/src/background/dapp/state-channel.ts b/src/background/dapp/state-channel.ts index 1b0a039..b322908 100644 --- a/src/background/dapp/state-channel.ts +++ b/src/background/dapp/state-channel.ts @@ -1,5 +1,5 @@ -import { Signature } from 'ontology-dapi'; -import { StateChannelApi } from 'ontology-dapi/lib/types/api/stateChannel'; +import { Signature } from '@ont-dev/ontology-dapi'; +import { StateChannelApi } from '@ont-dev/ontology-dapi'; export const stateChannelApi: StateChannelApi = { async login(): Promise { diff --git a/src/background/dapp/stateChannel.ts b/src/background/dapp/stateChannel.ts index 2cb4833..aeaaa30 100644 --- a/src/background/dapp/stateChannel.ts +++ b/src/background/dapp/stateChannel.ts @@ -1,4 +1,4 @@ -import { Signature, StateChannelApi } from 'ontology-dapi'; +import { Signature, StateChannelApi } from '@ont-dev/ontology-dapi'; import { getRequestsManager } from '../requestsManager'; diff --git a/src/background/popUpManager.ts b/src/background/popUpManager.ts index 1deeadc..fe7afef 100644 --- a/src/background/popUpManager.ts +++ b/src/background/popUpManager.ts @@ -15,7 +15,7 @@ * You should have received a copy of the GNU Lesser General Public License * along with The Ontology Wallet&ID. If not, see . */ -import { MethodType, Rpc } from 'ontology-dapi'; +import { MethodType, Rpc } from '@ont-dev/ontology-dapi'; import { Identity } from 'ontology-ts-sdk'; import { decryptDefaultIdentity } from 'src/api/identityApi'; import { browser } from 'webextension-polyfill-ts'; diff --git a/src/background/redux/transactionRequestsReducer.ts b/src/background/redux/transactionRequestsReducer.ts index 53799c4..4772494 100644 --- a/src/background/redux/transactionRequestsReducer.ts +++ b/src/background/redux/transactionRequestsReducer.ts @@ -197,7 +197,7 @@ function isTrustedSc(request: ScCallRequest, state: GlobalState) { if (request.requireIdentity) { return false; } - + const trustedScs = state.settings.trustedScs; const trustedSc = trustedScs.find( @@ -249,7 +249,7 @@ async function submitScCall(request: ScCallRequest, password: string, dispatch: }; } - + } async function submitMessageSign(request: MessageSignRequest, password: string) { diff --git a/src/background/requestsManager.ts b/src/background/requestsManager.ts index 63e9d0c..d62ac1a 100644 --- a/src/background/requestsManager.ts +++ b/src/background/requestsManager.ts @@ -1,4 +1,4 @@ -import { Parameter } from 'ontology-dapi'; +import { Parameter, VmType } from '@ont-dev/ontology-dapi'; import { getWallet } from 'src/api/authApi'; import { hasIdentity } from 'src/api/identityApi'; import { v4 as uuid } from 'uuid'; @@ -122,7 +122,8 @@ export class RequestsManager { return deferred.promise; } - public async initScCall(args: { + public async initScCall(args: { + isWasmVm: boolean, contract: string; method: string; parameters?: Parameter[]; @@ -197,7 +198,7 @@ export class RequestsManager { return deferred.promise; } - public async initScCallRead(args: { contract: string; method: string; parameters?: Parameter[] }) { + public async initScCallRead(args: { isWasmVm: boolean; contract: string; method: string; parameters?: Parameter[] }) { const requestId = uuid(); // stores deferred object to resolve when the transaction is resolved @@ -224,7 +225,7 @@ export class RequestsManager { author?: string; email?: string; description?: string; - needStorage?: boolean; + vmType?: VmType | boolean; gasPrice?: number; gasLimit?: number; }) { diff --git a/src/content/index.ts b/src/content/index.ts index a5141df..e3bc3e4 100644 --- a/src/content/index.ts +++ b/src/content/index.ts @@ -1,3 +1,3 @@ -import { provider } from 'ontology-dapi'; +import { provider } from '@ont-dev/ontology-dapi'; provider.registerContentProxy({}); diff --git a/src/global.d.ts b/src/global.d.ts index 2e736d1..8264924 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -19,4 +19,4 @@ declare module 'uuid'; declare module 'websocket-as-promised'; declare module '@ledgerhq/hw-transport-node-hid'; declare module '@ledgerhq/hw-transport-u2f'; -declare module '@ont-community/hdkey-secp256r1' \ No newline at end of file +declare module '@ont-community/hdkey-secp256r1' diff --git a/src/popup/backgroundManager.ts b/src/popup/backgroundManager.ts index 920e996..a0ad11a 100644 --- a/src/popup/backgroundManager.ts +++ b/src/popup/backgroundManager.ts @@ -16,7 +16,7 @@ * along with The Ontology Wallet&ID. If not, see . */ import { History } from 'history'; -import { Rpc } from 'ontology-dapi'; +import { Rpc } from '@ont-dev/ontology-dapi'; import { browser } from 'webextension-polyfill-ts'; import { OEP4Token } from '../api/tokenApi'; diff --git a/src/redux/transactionRequests.ts b/src/redux/transactionRequests.ts index 2d0c9c7..878e82d 100644 --- a/src/redux/transactionRequests.ts +++ b/src/redux/transactionRequests.ts @@ -15,7 +15,7 @@ * You should have received a copy of the GNU Lesser General Public License * along with The Ontology Wallet&ID. If not, see . */ -import { Parameter } from 'ontology-dapi'; +import { Parameter, VmType } from '@ont-dev/ontology-dapi'; import { AssetType } from './runtime'; export type ErrorCode = 'TIMEOUT' | 'WRONG_PASSWORD' | 'CANCELED' | 'OTHER'; @@ -72,6 +72,7 @@ export interface RegisterOntIdRequest extends TransactionRequest { } export interface ScCallRequest extends TransactionRequest { + isWasmVm: boolean; contract: string; method: string; gasPrice?: number; @@ -89,12 +90,13 @@ export interface ScDeployRequest extends TransactionRequest { author?: string; email?: string; description?: string; - needStorage?: boolean; + vmType: boolean | VmType; gasPrice?: number; gasLimit?: number; } export interface ScCallReadRequest extends TransactionRequest { + isWasmVm: boolean; contract: string; method: string; parameters?: Parameter[]; diff --git a/yarn.lock b/yarn.lock index ddd3116..cb17dba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -398,6 +398,19 @@ version "0.2.14" resolved "https://registry.yarnpkg.com/@ont-community/window-post-message-proxy/-/window-post-message-proxy-0.2.14.tgz#e3b1fe1b1558d7aedbbc1d0053e35f21cd9dc05e" +"@ont-dev/ontology-dapi@^0.4.9": + version "0.4.9" + resolved "https://registry.yarnpkg.com/@ont-dev/ontology-dapi/-/ontology-dapi-0.4.9.tgz#3ddde4e037f8820cf85fc885d2d1efb685937df9" + integrity sha512-9FJYzrLv1VzbS8vQZxnAOWtYJRx6kwzuNeY1USXWo6bIWGNt9i9UVYxKPJkhyVQj/hRn4YQz0q7W0Fpm6mjnPQ== + dependencies: + "@ont-community/window-post-message-proxy" "^0.2.14" + base-x "^3.0.5" + crypto-js "^3.1.9-1" + promise-timeout "^1.3.0" + typedarray-to-buffer "^3.1.5" + uuid "^3.3.2" + webextension-polyfill-ts "^0.8.7" + "@types/babel__core@^7.1.0": version "7.1.2" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.2.tgz#608c74f55928033fce18b99b213c16be4b3d114f" @@ -6667,19 +6680,6 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -ontology-dapi@^0.4.9: - version "0.4.9" - resolved "https://registry.yarnpkg.com/ontology-dapi/-/ontology-dapi-0.4.9.tgz#39404b5706603b4de9901172f3be970ff8aa4ab8" - integrity sha512-ej/qBGGjYYZisnCfosoF4h2zB6BQ+7gr1Nd9LwySB1A2eSCPcglUVxoVqVKdXeQ+HIHsuZfVmqGyf4tlJCXiDQ== - dependencies: - "@ont-community/window-post-message-proxy" "^0.2.14" - base-x "^3.0.5" - crypto-js "^3.1.9-1" - promise-timeout "^1.3.0" - typedarray-to-buffer "^3.1.5" - uuid "^3.3.2" - webextension-polyfill-ts "^0.8.7" - ontology-ts-crypto@^0.1.24: version "0.1.24" resolved "https://registry.yarnpkg.com/ontology-ts-crypto/-/ontology-ts-crypto-0.1.24.tgz#cf43785e42b23d7ec4552b674e5cd22284d2d4f6" @@ -6728,10 +6728,10 @@ ontology-ts-sdk@^0.9.4: wif "^2.0.6" ws "^4.1.0" -ontology-ts-sdk@^1.0.22: - version "1.0.22" - resolved "https://registry.yarnpkg.com/ontology-ts-sdk/-/ontology-ts-sdk-1.0.22.tgz#e70063e669ac47409e9f6c2982e5ce82b2af8b29" - integrity sha512-XSYwmWZLxe9e0wk0oWmo+vsIpl7wpfj+TNT9hwP2JvhZq1TrS2h28dL9xKBoGPD0+03TUeFi0+5qNnF/ydV4cA== +ontology-ts-sdk@^1.0.24: + version "1.0.24" + resolved "https://registry.yarnpkg.com/ontology-ts-sdk/-/ontology-ts-sdk-1.0.24.tgz#5fd403ef9aac3931d54a25e4a323c1e500c42fca" + integrity sha512-jk+B2QbbE3uYgBvCkdwcJodHJYkxfmb1Km6RsxK2yM6E6krp7h7y01WCvLuEk2bgWTayz/jIg7AizeUqeRVlyg== dependencies: "@ont-community/hdkey-secp256r1" "^1.0.1" "@ont-community/html5-websocket" "^2.0.2"