diff --git a/packages/neuron-ui/package.json b/packages/neuron-ui/package.json index c28ec2a348..7d4e8c8fed 100644 --- a/packages/neuron-ui/package.json +++ b/packages/neuron-ui/package.json @@ -43,7 +43,7 @@ "last 2 chrome versions" ], "dependencies": { - "@nervosnetwork/ckb-sdk-core": "0.20.0", + "@nervosnetwork/ckb-sdk-core": "0.21.0", "@uifabric/experiments": "7.16.1", "@uifabric/styling": "7.6.2", "canvg": "2.0.0", diff --git a/packages/neuron-ui/src/containers/Main/hooks.ts b/packages/neuron-ui/src/containers/Main/hooks.ts index 9c7c792c24..1dae29b28e 100644 --- a/packages/neuron-ui/src/containers/Main/hooks.ts +++ b/packages/neuron-ui/src/containers/Main/hooks.ts @@ -38,7 +38,7 @@ export const useSyncChainData = ({ chainURL, dispatch }: { chainURL: string; dis .then(tipBlockNumber => { dispatch({ type: AppActions.UpdateTipBlockNumber, - payload: tipBlockNumber, + payload: BigInt(tipBlockNumber).toString(), }) }) .catch((err: Error) => { @@ -51,7 +51,9 @@ export const useSyncChainData = ({ chainURL, dispatch }: { chainURL: string; dis getBlockchainInfo() .then(info => { if (info) { - const { chain = '', difficulty = '', epoch = '', alerts = [] } = info + const { chain = '', difficulty: difficultyHex = '', epoch: epochHex = '', alerts = [] } = info + const difficulty = BigInt(difficultyHex).toString() + const epoch = BigInt(epochHex).toString() if (alerts.length) { alerts.forEach(a => { // TODO: display alerts in Notification diff --git a/packages/neuron-wallet/package.json b/packages/neuron-wallet/package.json index b4fc183e17..c9f4205976 100644 --- a/packages/neuron-wallet/package.json +++ b/packages/neuron-wallet/package.json @@ -34,8 +34,8 @@ ] }, "dependencies": { - "@nervosnetwork/ckb-sdk-core": "0.20.0", - "@nervosnetwork/ckb-sdk-utils": "0.20.0", + "@nervosnetwork/ckb-sdk-core": "0.21.0", + "@nervosnetwork/ckb-sdk-utils": "0.21.0", "bn.js": "4.11.8", "chalk": "2.4.2", "electron-log": "3.0.7", @@ -51,7 +51,7 @@ "uuid": "3.3.3" }, "devDependencies": { - "@nervosnetwork/ckb-types": "0.20.0", + "@nervosnetwork/ckb-types": "0.21.0", "@types/electron-devtools-installer": "2.2.0", "@types/elliptic": "6.4.9", "@types/sqlite3": "3.1.5", diff --git a/packages/neuron-wallet/src/listeners/tx-status.ts b/packages/neuron-wallet/src/listeners/tx-status.ts index b442310287..aaf1cb4e28 100644 --- a/packages/neuron-wallet/src/listeners/tx-status.ts +++ b/packages/neuron-wallet/src/listeners/tx-status.ts @@ -24,13 +24,13 @@ const getTransactionStatus = async (hash: string) => { } if (tx.txStatus.status === 'committed') { return { - tx: tx.transaction, + tx: TypeConvert.toTransaction(tx.transaction), status: TransactionStatus.Success, blockHash: tx.txStatus.blockHash, } } return { - tx: tx.transaction, + tx: TypeConvert.toTransaction(tx.transaction), status: TransactionStatus.Pending, blockHash: null, } @@ -68,7 +68,7 @@ const trackingStatus = async () => { const { core }: { core: Core } = nodeService const getBlockService = new GetBlocks(core.rpc.node.url) for (const successTx of successTxs) { - const transaction = TypeConvert.toTransaction(successTx.tx) + const transaction = successTx.tx const { blockHash } = successTx const blockHeader = await getBlockService.getHeader(blockHash!) transaction.blockHash = blockHash! diff --git a/packages/neuron-wallet/src/models/keys/address.ts b/packages/neuron-wallet/src/models/keys/address.ts index 3a9b7018b8..bb0eaaf955 100644 --- a/packages/neuron-wallet/src/models/keys/address.ts +++ b/packages/neuron-wallet/src/models/keys/address.ts @@ -9,12 +9,14 @@ export enum AddressType { Change = 1, // Internal chain } -export const publicKeyToAddress = (publicKey: string, prefix = AddressPrefix.Testnet) => - pubkeyToAddress(publicKey, { +export const publicKeyToAddress = (publicKey: string, prefix = AddressPrefix.Testnet) => { + const pubkey = publicKey.startsWith('0x') ? publicKey : `0x${publicKey}` + return pubkeyToAddress(pubkey, { prefix, type: Type.HashIdx, codeHashIndex: '0x00', }) +} export default class Address { publicKey?: string diff --git a/packages/neuron-wallet/src/models/lock-utils.ts b/packages/neuron-wallet/src/models/lock-utils.ts index 211e2a3ce1..4c19809139 100644 --- a/packages/neuron-wallet/src/models/lock-utils.ts +++ b/packages/neuron-wallet/src/models/lock-utils.ts @@ -130,7 +130,7 @@ export default class LockUtils { const prefix = env.testnet ? core.utils.AddressPrefix.Testnet : core.utils.AddressPrefix.Mainnet const result: string = core.utils.parseAddress(address, prefix, 'hex') as string const hrp: string = `0100` - let blake160: string = result.slice(hrp.length, result.length) + let blake160: string = result.slice(hrp.length + 2, result.length) if (!blake160.startsWith('0x')) { blake160 = `0x${blake160}` } diff --git a/packages/neuron-wallet/src/services/indexer/queue.ts b/packages/neuron-wallet/src/services/indexer/queue.ts index bb7e8d5d73..e468a773ab 100644 --- a/packages/neuron-wallet/src/services/indexer/queue.ts +++ b/packages/neuron-wallet/src/services/indexer/queue.ts @@ -11,6 +11,7 @@ import TransactionPersistor from 'services/tx/transaction-persistor' import IndexerTransaction from 'services/tx/indexer-transaction' import IndexerRPC from './indexer-rpc' +import HexUtils from 'utils/hex' export interface LockHashInfo { lockHash: string @@ -137,7 +138,7 @@ export default class IndexerQueue { const lockHashIndexStates = await this.indexerRPC.getLockHashIndexStates() const blockNumbers = lockHashIndexStates .filter(state => lockHashes.includes(state.lockHash)) - .map(state => state.blockNumber) + .map(state => HexUtils.toDecimal(state.blockNumber)) const uniqueBlockNumbers = [...new Set(blockNumbers)] const blockNumbersBigInt = uniqueBlockNumbers.map(num => BigInt(num)) const minBlockNumber = Utils.min(blockNumbersBigInt) @@ -192,9 +193,9 @@ export default class IndexerQueue { let address: string | undefined if (type === TxPointType.CreatedBy) { - address = LockUtils.lockScriptToAddress(transaction.outputs![+txPoint.index].lock) + address = LockUtils.lockScriptToAddress(transaction.outputs![parseInt(txPoint.index, 16)].lock) } else if (type === TxPointType.ConsumedBy) { - const input = txEntity.inputs[+txPoint.index] + const input = txEntity.inputs[parseInt(txPoint.index, 16)] const output = await IndexerTransaction.updateInputLockHash(input.outPointTxHash!, input.outPointIndex!) if (output) { address = LockUtils.lockScriptToAddress(output.lock) diff --git a/packages/neuron-wallet/src/services/node.ts b/packages/neuron-wallet/src/services/node.ts index b7ccb17f06..e87ae1a921 100644 --- a/packages/neuron-wallet/src/services/node.ts +++ b/packages/neuron-wallet/src/services/node.ts @@ -7,6 +7,7 @@ import { ShouldBeTypeOf } from 'exceptions' import { ConnectionStatusSubject } from 'models/subjects/node' import { CurrentNetworkIDSubject } from 'models/subjects/networks' import NetworksService from 'services/networks' +import HexUtils from 'utils/hex' class NodeService { private static instance: NodeService @@ -96,7 +97,7 @@ class NodeService { if (!this.delayTime) { this.delayTime = 0 } - this.tipNumberSubject.next(tipNumber) + this.tipNumberSubject.next(HexUtils.toDecimal(tipNumber)) }, () => { if (this.delayTime < 10 * this.intervalTime) { diff --git a/packages/neuron-wallet/src/services/sync/get-blocks.ts b/packages/neuron-wallet/src/services/sync/get-blocks.ts index 8e280c17c0..69ba035581 100644 --- a/packages/neuron-wallet/src/services/sync/get-blocks.ts +++ b/packages/neuron-wallet/src/services/sync/get-blocks.ts @@ -5,6 +5,7 @@ import { Block, BlockHeader } from 'types/cell-types' import TypeConvert from 'types/type-convert' import CheckAndSave from './check-and-save' import Utils from './utils' +import HexUtils from 'utils/hex' export default class GetBlocks { private retryTime: number @@ -59,13 +60,13 @@ export default class GetBlocks { } public getBlockByNumber = async (num: string): Promise => { - const block = await this.core.rpc.getBlockByNumber(num) + const block = await this.core.rpc.getBlockByNumber(HexUtils.toHex(num)) return TypeConvert.toBlock(block) } public genesisBlockHash = async (): Promise => { const hash: string = await Utils.retry(3, 100, async () => { - const h: string = await this.core.rpc.getBlockHash('0') + const h: string = await this.core.rpc.getBlockHash('0x0') return h }) diff --git a/packages/neuron-wallet/src/services/wallets.ts b/packages/neuron-wallet/src/services/wallets.ts index c7e633bd4d..683e4f9410 100644 --- a/packages/neuron-wallet/src/services/wallets.ts +++ b/packages/neuron-wallet/src/services/wallets.ts @@ -452,7 +452,7 @@ export default class WalletService { blake2b.update(data) }) const message = blake2b.digest() - const signature = `0x${addrObj.signRecoverable(message)}` + const signature = addrObj.signRecoverable(message) const newWitness: Witness = { data: [signature], } diff --git a/packages/neuron-wallet/src/startup/sync-block-task/genesis.ts b/packages/neuron-wallet/src/startup/sync-block-task/genesis.ts index 7d63d9052c..be2a275fa1 100644 --- a/packages/neuron-wallet/src/startup/sync-block-task/genesis.ts +++ b/packages/neuron-wallet/src/startup/sync-block-task/genesis.ts @@ -5,7 +5,7 @@ const { core } = NodeService.getInstance() export const genesisBlockHash = async () => { const hash: string = await Utils.retry(3, 100, async () => { - const h: string = await core.rpc.getBlockHash('0') + const h: string = await core.rpc.getBlockHash('0x0') return h }) diff --git a/packages/neuron-wallet/src/types/convert-to.ts b/packages/neuron-wallet/src/types/convert-to.ts index 0821adc17d..39d86281f1 100644 --- a/packages/neuron-wallet/src/types/convert-to.ts +++ b/packages/neuron-wallet/src/types/convert-to.ts @@ -1,9 +1,11 @@ import { Transaction, Input, Cell, Script, TransactionWithoutHash, CellDep, OutPoint } from './cell-types' +import HexUtils from 'utils/hex' export default class ConvertTo { public static toSdkTransaction = (tx: Transaction): CKBComponents.Transaction => { const transaction: CKBComponents.Transaction = { - ...tx, + hash: tx.hash, + version: HexUtils.toHex(tx.version), inputs: tx.inputs!.map(input => ConvertTo.toSdkInput(input)), outputs: tx.outputs!.map(output => ConvertTo.toSdkOutput(output)), cellDeps: tx.cellDeps ? tx.cellDeps.map(cellDep => ConvertTo.toSdkCellDep(cellDep)) : [], @@ -23,7 +25,7 @@ export default class ConvertTo { public static toSdkTxWithoutHash = (tx: TransactionWithoutHash): CKBComponents.RawTransaction => { const transaction = { - ...tx, + version: HexUtils.toHex(tx.version), inputs: tx.inputs!.map(input => ConvertTo.toSdkInput(input)), outputs: tx.outputs!.map(output => ConvertTo.toSdkOutput(output)), cellDeps: tx.cellDeps ? tx.cellDeps.map(cellDep => ConvertTo.toSdkCellDep(cellDep)) : [], @@ -36,8 +38,8 @@ export default class ConvertTo { public static toSdkInput = (input: Input): CKBComponents.CellInput => { return { - since: input.since!, - previousOutput: input.previousOutput!, + since: HexUtils.toHex(input.since!), + previousOutput: ConvertTo.toSdkOutPoint(input.previousOutput!), } } @@ -45,7 +47,7 @@ export default class ConvertTo { const type = output.type ? ConvertTo.toSdkScript(output.type) : undefined return { - ...output, + capacity: HexUtils.toHex(output.capacity), lock: ConvertTo.toSdkScript(output.lock!), type, } @@ -58,4 +60,11 @@ export default class ConvertTo { hashType: script.hashType, } } + + public static toSdkOutPoint = (outPoint: OutPoint): CKBComponents.OutPoint => { + return { + txHash: outPoint.txHash, + index: HexUtils.toHex(outPoint.index), + } + } } diff --git a/packages/neuron-wallet/src/types/type-convert.ts b/packages/neuron-wallet/src/types/type-convert.ts index 35b382b07a..f9f3f852a9 100644 --- a/packages/neuron-wallet/src/types/type-convert.ts +++ b/packages/neuron-wallet/src/types/type-convert.ts @@ -1,3 +1,4 @@ +import HexUtils from 'utils/hex'; import { Block, BlockHeader, @@ -23,19 +24,18 @@ export default class TypeConvert { static toBlockHeader(blockHeader: CKBComponents.BlockHeader): BlockHeader { return { - version: blockHeader.version, - timestamp: blockHeader.timestamp.toString(), + version: HexUtils.toDecimal(blockHeader.version), + timestamp: HexUtils.toDecimal(blockHeader.timestamp), hash: blockHeader.hash, parentHash: blockHeader.parentHash, - number: blockHeader.number.toString(), + number: HexUtils.toDecimal(blockHeader.number), } } static toTransaction(transaction: CKBComponents.Transaction, blockHeader?: BlockHeader): Transaction { const tx: Transaction = { hash: transaction.hash, - version: transaction.version, - // deps: transaction.deps, + version: HexUtils.toDecimal(transaction.version), cellDeps: transaction.cellDeps.map(cellDep => TypeConvert.toCellDep(cellDep)), headerDeps: transaction.headerDeps, witnesses: transaction.witnesses, @@ -44,8 +44,8 @@ export default class TypeConvert { outputsData: transaction.outputsData, } if (blockHeader) { - tx.timestamp = blockHeader.timestamp - tx.blockNumber = blockHeader.number + tx.timestamp = HexUtils.toDecimal(blockHeader.timestamp) + tx.blockNumber = HexUtils.toDecimal(blockHeader.number) tx.blockHash = blockHeader.hash } return tx @@ -59,16 +59,20 @@ export default class TypeConvert { } static toInput(input: CKBComponents.CellInput): Input { + let previousOutput: OutPoint | null = null + if (input.previousOutput) { + previousOutput = TypeConvert.toOutPoint(input.previousOutput) + } return { - previousOutput: input.previousOutput, - since: input.since, + previousOutput, + since: HexUtils.toDecimal(input.since), } } static toOutPoint(outPoint: CKBComponents.OutPoint): OutPoint { return { txHash: outPoint.txHash, - index: outPoint.index, + index: HexUtils.toDecimal(outPoint.index), } } @@ -78,7 +82,7 @@ export default class TypeConvert { type = TypeConvert.toScript(output.type) } return { - capacity: output.capacity.toString(), + capacity: HexUtils.toDecimal(output.capacity), lock: TypeConvert.toScript(output.lock), type, } diff --git a/packages/neuron-wallet/src/utils/blake2b.ts b/packages/neuron-wallet/src/utils/blake2b.ts index 5fc73dce2f..f8cb736d1d 100644 --- a/packages/neuron-wallet/src/utils/blake2b.ts +++ b/packages/neuron-wallet/src/utils/blake2b.ts @@ -8,8 +8,8 @@ export default class Blake2b { } public update = (message: string): void => { - const msg = hexToBytes(message.replace(/0x/, '')) - this.blake2b.update(msg) + const msg = message.startsWith('0x') ? message : `0x${message}` + this.blake2b.update(hexToBytes(msg)) } public digest = (): string => { diff --git a/packages/neuron-wallet/src/utils/hex.ts b/packages/neuron-wallet/src/utils/hex.ts new file mode 100644 index 0000000000..911efab8ca --- /dev/null +++ b/packages/neuron-wallet/src/utils/hex.ts @@ -0,0 +1,9 @@ +export default class HexUtils { + public static toDecimal(hex: string): string { + return BigInt(hex).toString() + } + + public static toHex(num: string): string { + return `0x${BigInt(num).toString(16)}` + } +} diff --git a/yarn.lock b/yarn.lock index 9240d73894..b23e07cdfd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2079,45 +2079,45 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@nervosnetwork/ckb-sdk-address@0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-address/-/ckb-sdk-address-0.20.0.tgz#3de8824c860e22e185664f2f4c39001648431f56" - integrity sha512-3FEP1I/+fRVuvafD6h1adRlv/6lfbRVwpgA/XrW4jYQBqghlaBcHVZbYqVAn5HFKAcJWtk9r9Xb8avCzfjaobg== - dependencies: - "@nervosnetwork/ckb-sdk-utils" "0.20.0" - "@nervosnetwork/ckb-types" "0.20.0" - -"@nervosnetwork/ckb-sdk-core@0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-core/-/ckb-sdk-core-0.20.0.tgz#c05faef381ba10f6efa246943237fe3b8aef5e16" - integrity sha512-My0xdhRZcXVzrQRk8pi00guyaf9kGaVdKhKE+oTLthyPHxAqGtbyl7sc4Fx0RNuQhVtwe1jmh6LEtPgZbqbiLw== - dependencies: - "@nervosnetwork/ckb-sdk-address" "0.20.0" - "@nervosnetwork/ckb-sdk-rpc" "0.20.0" - "@nervosnetwork/ckb-sdk-utils" "0.20.0" - "@nervosnetwork/ckb-types" "0.20.0" - -"@nervosnetwork/ckb-sdk-rpc@0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-rpc/-/ckb-sdk-rpc-0.20.0.tgz#3fa2bb17f4d81e56569859c40f147eb6b53a11b4" - integrity sha512-0F6j/hop1JOTLGalX+0LsjXRKc4+4gMBV7cdSOZh9O56Qd4m1yZS+2t6+nrN9Xi9+pAC+8wkhKvGJl2B3mXBnQ== - dependencies: - "@nervosnetwork/ckb-sdk-utils" "0.20.0" +"@nervosnetwork/ckb-sdk-address@0.21.0": + version "0.21.0" + resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-address/-/ckb-sdk-address-0.21.0.tgz#bf78b3bcb84f80566d9167c5b38d9dac8b5eb81f" + integrity sha512-2sYFh38/DYHbb2OCvyTB3UGbrdbGU2qj47dQY82lsznDphblC6h/VLwISlaE/xQ04de/idb0Uc0fHVAqA4lkEg== + dependencies: + "@nervosnetwork/ckb-sdk-utils" "0.21.0" + "@nervosnetwork/ckb-types" "0.21.0" + +"@nervosnetwork/ckb-sdk-core@0.21.0": + version "0.21.0" + resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-core/-/ckb-sdk-core-0.21.0.tgz#60d5bb5bb2c80b31a77c221ab06fded4d34b72c0" + integrity sha512-zS8vp01t5iYqXDsAjlhcdZafIXaYkJoYXSC1cnCh3dr23iaYuYjDz9/mbe2j/fZ4p46c1NSqQRpo4TGubhSm1g== + dependencies: + "@nervosnetwork/ckb-sdk-address" "0.21.0" + "@nervosnetwork/ckb-sdk-rpc" "0.21.0" + "@nervosnetwork/ckb-sdk-utils" "0.21.0" + "@nervosnetwork/ckb-types" "0.21.0" + +"@nervosnetwork/ckb-sdk-rpc@0.21.0": + version "0.21.0" + resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-rpc/-/ckb-sdk-rpc-0.21.0.tgz#4ff7d8e16b716c49ad5e9cc32868324921ba6b3b" + integrity sha512-0Dz871S9slwFPASs3Dz/07kkRK99T3uFo60zgyt1GSEmGoSREqXOwzaXbEU2lqPLvmFz1GP+T/mHt4TtIf7nWg== + dependencies: + "@nervosnetwork/ckb-sdk-utils" "0.21.0" axios "0.19.0" -"@nervosnetwork/ckb-sdk-utils@0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-utils/-/ckb-sdk-utils-0.20.0.tgz#0acbed3caef1f9c5180336efed13c6083246c7f7" - integrity sha512-CGXQFCSyZFTtF9yDeNnk6NR9Seq5Sk1haZgLwk0jRHzmZdD/v3PQNnonOBywaVEWNKcsVXrCBJEUAvOBKeaP3g== +"@nervosnetwork/ckb-sdk-utils@0.21.0": + version "0.21.0" + resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-utils/-/ckb-sdk-utils-0.21.0.tgz#461c9864d511bd4b9fb4469f4f0a35b4e631e589" + integrity sha512-MNMG1cx8w+qLrF1iKJLT8NgpZ+gaFrbvgtYF9SCqQiChqZI2iQyBdT7QyBQ/XPIRi5EKyEjyFH5+ofPwukWDFA== dependencies: - "@nervosnetwork/ckb-types" "0.20.0" + "@nervosnetwork/ckb-types" "0.21.0" blake2b-wasm "1.1.7" - elliptic "6.4.1" + elliptic "6.5.1" -"@nervosnetwork/ckb-types@0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-types/-/ckb-types-0.20.0.tgz#d172904262011fdbc0b4970c0a34fbe2842da73e" - integrity sha512-ZqiLayu2wg1vJVt3gXXsRxwYQ/B9nur7WniCBsnQswDVs9hM5lZ628Ov50PIISOLSR//B7dxpnsr4rd/oz4yMA== +"@nervosnetwork/ckb-types@0.21.0": + version "0.21.0" + resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-types/-/ckb-types-0.21.0.tgz#20cfc81f2eef8c7baa36f0ada4f7642aee0eaf39" + integrity sha512-1VhtubsnTkY+rP+CiQ25nXoK+5SLWlf+aUsGJ7HhWhjP1gzlBJKXB3EAoa92FZzmfARJ7U3QKJoAEV4Bo6KXkQ== "@nodelib/fs.scandir@2.1.2": version "2.1.2" @@ -6961,19 +6961,6 @@ elegant-spinner@^1.0.1: resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= -elliptic@6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" - integrity sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - elliptic@6.5.1, elliptic@^6.0.0: version "6.5.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.1.tgz#c380f5f909bf1b9b4428d028cd18d3b0efd6b52b"