From 6db58263f92362dc9fcfb078c7d80838875a19f9 Mon Sep 17 00:00:00 2001 From: Derek Date: Wed, 31 Jan 2024 07:34:52 -0500 Subject: [PATCH] fix(revert): nuke-tezos-cosmos This reverts commit 6ac2f249ba6fef9ec8ca860254cec63f94ec12ee. --- advanced/wallets/react-wallet-v2/package.json | 1 + .../src/components/AccountPicker.tsx | 4 + .../react-wallet-v2/src/components/Modal.tsx | 6 + .../src/hooks/useInitialization.ts | 6 + .../react-wallet-v2/src/lib/CosmosLib.ts | 63 ++++ .../react-wallet-v2/src/lib/TezosLib.ts | 109 ++++++ .../src/utils/CosmosRequestHandler.ts | 40 +++ .../src/utils/CosmosWalletUtil.ts | 43 +++ .../src/utils/TezosRequestHandlerUtil.ts | 46 +++ .../src/utils/TezosWalletUtil.ts | 50 +++ .../src/views/SessionProposalModal.tsx | 20 ++ .../src/views/SessionSignCosmosModal.tsx | 86 +++++ .../src/views/SessionSignTezosModal.tsx | 86 +++++ advanced/wallets/react-wallet-v2/yarn.lock | 322 +++++++++++++++++- yarn.lock | 4 - 15 files changed, 869 insertions(+), 17 deletions(-) create mode 100644 advanced/wallets/react-wallet-v2/src/lib/CosmosLib.ts create mode 100644 advanced/wallets/react-wallet-v2/src/lib/TezosLib.ts create mode 100644 advanced/wallets/react-wallet-v2/src/utils/CosmosRequestHandler.ts create mode 100644 advanced/wallets/react-wallet-v2/src/utils/CosmosWalletUtil.ts create mode 100644 advanced/wallets/react-wallet-v2/src/utils/TezosRequestHandlerUtil.ts create mode 100644 advanced/wallets/react-wallet-v2/src/utils/TezosWalletUtil.ts create mode 100644 advanced/wallets/react-wallet-v2/src/views/SessionSignCosmosModal.tsx create mode 100644 advanced/wallets/react-wallet-v2/src/views/SessionSignTezosModal.tsx delete mode 100644 yarn.lock diff --git a/advanced/wallets/react-wallet-v2/package.json b/advanced/wallets/react-wallet-v2/package.json index c4cd894..e5dd951 100644 --- a/advanced/wallets/react-wallet-v2/package.json +++ b/advanced/wallets/react-wallet-v2/package.json @@ -36,6 +36,7 @@ "cosmos-wallet": "1.2.0", "ethers": "5.7.2", "framer-motion": "6.5.1", + "mnemonic-keyring": "1.4.0", "near-api-js": "^0.45.0", "next": "12.1.5", "permissionless": "0.0.20", diff --git a/advanced/wallets/react-wallet-v2/src/components/AccountPicker.tsx b/advanced/wallets/react-wallet-v2/src/components/AccountPicker.tsx index 61657ab..8aa3d0d 100644 --- a/advanced/wallets/react-wallet-v2/src/components/AccountPicker.tsx +++ b/advanced/wallets/react-wallet-v2/src/components/AccountPicker.tsx @@ -1,9 +1,11 @@ import SettingsStore from '@/store/SettingsStore' +import { cosmosAddresses } from '@/utils/CosmosWalletUtil' import { eip155Addresses } from '@/utils/EIP155WalletUtil' import { nearAddresses } from '@/utils/NearWalletUtil' import { solanaAddresses } from '@/utils/SolanaWalletUtil' import { multiversxAddresses } from '@/utils/MultiversxWalletUtil' import { tronAddresses } from '@/utils/TronWalletUtil' +import { tezosAddresses } from '@/utils/TezosWalletUtil' import { kadenaAddresses } from '@/utils/KadenaWalletUtil' import { useSnapshot } from 'valtio' @@ -15,10 +17,12 @@ export default function AccountPicker() { console.log('account', account) SettingsStore.setAccount(account) SettingsStore.setEIP155Address(eip155Addresses[account]) + SettingsStore.setCosmosAddress(cosmosAddresses[account]) SettingsStore.setSolanaAddress(solanaAddresses[account]) SettingsStore.setNearAddress(nearAddresses[account]) SettingsStore.setMultiversxAddress(multiversxAddresses[account]) SettingsStore.setTronAddress(tronAddresses[account]) + SettingsStore.setTezosAddress(tezosAddresses[account]) SettingsStore.setKadenaAddress(kadenaAddresses[account]) } diff --git a/advanced/wallets/react-wallet-v2/src/components/Modal.tsx b/advanced/wallets/react-wallet-v2/src/components/Modal.tsx index 365c960..5bcec4d 100644 --- a/advanced/wallets/react-wallet-v2/src/components/Modal.tsx +++ b/advanced/wallets/react-wallet-v2/src/components/Modal.tsx @@ -1,12 +1,14 @@ import ModalStore from '@/store/ModalStore' import SessionProposalModal from '@/views/SessionProposalModal' import SessionSendTransactionModal from '@/views/SessionSendTransactionModal' +import SessionSignCosmosModal from '@/views/SessionSignCosmosModal' import SessionRequestModal from '@/views/SessionSignModal' import SessionSignNearModal from '@/views/SessionSignNearModal' import SessionSignPolkadotModal from '@/views/SessionSignPolkadotModal' import SessionSignSolanaModal from '@/views/SessionSignSolanaModal' import SessionSignMultiversxModal from '@/views/SessionSignMultiversxModal' import SessionSignTronModal from '@/views/SessionSignTronModal' +import SessionSignTezosModal from '@/views/SessionSignTezosModal' import SessionSignKadenaModal from '@/views/SessionSignKadenaModal' import SessionSignTypedDataModal from '@/views/SessionSignTypedDataModal' import SessionUnsuportedMethodModal from '@/views/SessionUnsuportedMethodModal' @@ -37,6 +39,8 @@ export default function Modal() { return case 'SessionUnsuportedMethodModal': return + case 'SessionSignCosmosModal': + return case 'SessionSignSolanaModal': return case 'SessionSignPolkadotModal': @@ -47,6 +51,8 @@ export default function Modal() { return case 'SessionSignTronModal': return + case 'SessionSignTezosModal': + return case 'SessionSignKadenaModal': return case 'AuthRequestModal': diff --git a/advanced/wallets/react-wallet-v2/src/hooks/useInitialization.ts b/advanced/wallets/react-wallet-v2/src/hooks/useInitialization.ts index 8ca1f9d..d96955f 100644 --- a/advanced/wallets/react-wallet-v2/src/hooks/useInitialization.ts +++ b/advanced/wallets/react-wallet-v2/src/hooks/useInitialization.ts @@ -1,10 +1,12 @@ import SettingsStore from '@/store/SettingsStore' +import { createOrRestoreCosmosWallet } from '@/utils/CosmosWalletUtil' import { createOrRestoreEIP155Wallet } from '@/utils/EIP155WalletUtil' import { createOrRestoreSolanaWallet } from '@/utils/SolanaWalletUtil' import { createOrRestorePolkadotWallet } from '@/utils/PolkadotWalletUtil' import { createOrRestoreNearWallet } from '@/utils/NearWalletUtil' import { createOrRestoreMultiversxWallet } from '@/utils/MultiversxWalletUtil' import { createOrRestoreTronWallet } from '@/utils/TronWalletUtil' +import { createOrRestoreTezosWallet } from '@/utils/TezosWalletUtil' import { createWeb3Wallet, web3wallet } from '@/utils/WalletConnectUtil' import { createOrRestoreKadenaWallet } from '@/utils/KadenaWalletUtil' import { useCallback, useEffect, useRef, useState } from 'react' @@ -19,19 +21,23 @@ export default function useInitialization() { const onInitialize = useCallback(async () => { try { const { eip155Addresses } = createOrRestoreEIP155Wallet() + const { cosmosAddresses } = await createOrRestoreCosmosWallet() const { solanaAddresses } = await createOrRestoreSolanaWallet() const { polkadotAddresses } = await createOrRestorePolkadotWallet() const { nearAddresses } = await createOrRestoreNearWallet() const { multiversxAddresses } = await createOrRestoreMultiversxWallet() const { tronAddresses } = await createOrRestoreTronWallet() + const { tezosAddresses } = await createOrRestoreTezosWallet() const { kadenaAddresses } = await createOrRestoreKadenaWallet() SettingsStore.setEIP155Address(eip155Addresses[0]) + SettingsStore.setCosmosAddress(cosmosAddresses[0]) SettingsStore.setSolanaAddress(solanaAddresses[0]) SettingsStore.setPolkadotAddress(polkadotAddresses[0]) SettingsStore.setNearAddress(nearAddresses[0]) SettingsStore.setMultiversxAddress(multiversxAddresses[0]) SettingsStore.setTronAddress(tronAddresses[0]) + SettingsStore.setTezosAddress(tezosAddresses[0]) SettingsStore.setKadenaAddress(kadenaAddresses[0]) await createWeb3Wallet(relayerRegionURL) setInitialized(true) diff --git a/advanced/wallets/react-wallet-v2/src/lib/CosmosLib.ts b/advanced/wallets/react-wallet-v2/src/lib/CosmosLib.ts new file mode 100644 index 0000000..1e12f3d --- /dev/null +++ b/advanced/wallets/react-wallet-v2/src/lib/CosmosLib.ts @@ -0,0 +1,63 @@ +import { Secp256k1Wallet, StdSignDoc } from '@cosmjs/amino' +import { fromHex } from '@cosmjs/encoding' +import { DirectSecp256k1Wallet } from '@cosmjs/proto-signing' +// @ts-expect-error +import { SignDoc } from '@cosmjs/proto-signing/build/codec/cosmos/tx/v1beta1/tx' +import Keyring from 'mnemonic-keyring' + +/** + * Constants + */ +const DEFAULT_PATH = "m/44'/118'/0'/0/0" +const DEFAULT_PREFIX = 'cosmos' + +/** + * Types + */ +interface IInitArguments { + mnemonic?: string + path?: string + prefix?: string +} + +/** + * Library + */ +export default class CosmosLib { + private keyring: Keyring + private directSigner: DirectSecp256k1Wallet + private aminoSigner: Secp256k1Wallet + + constructor(keyring: Keyring, directSigner: DirectSecp256k1Wallet, aminoSigner: Secp256k1Wallet) { + this.directSigner = directSigner + this.keyring = keyring + this.aminoSigner = aminoSigner + } + + static async init({ mnemonic, path, prefix }: IInitArguments) { + const keyring = await Keyring.init({ mnemonic: mnemonic ?? Keyring.generateMnemonic() }) + const privateKey = fromHex(keyring.getPrivateKey(path ?? DEFAULT_PATH)) + const directSigner = await DirectSecp256k1Wallet.fromKey(privateKey, prefix ?? DEFAULT_PREFIX) + const aminoSigner = await Secp256k1Wallet.fromKey(privateKey, prefix ?? DEFAULT_PREFIX) + + return new CosmosLib(keyring, directSigner, aminoSigner) + } + + public getMnemonic() { + return this.keyring.mnemonic + } + + public async getAddress() { + const account = await this.directSigner.getAccounts() + + return account[0].address + } + + public async signDirect(address: string, signDoc: SignDoc) { + return await this.directSigner.signDirect(address, signDoc) + } + + public async signAmino(address: string, signDoc: StdSignDoc) { + return await this.aminoSigner.signAmino(address, signDoc) + } +} diff --git a/advanced/wallets/react-wallet-v2/src/lib/TezosLib.ts b/advanced/wallets/react-wallet-v2/src/lib/TezosLib.ts new file mode 100644 index 0000000..0e0515b --- /dev/null +++ b/advanced/wallets/react-wallet-v2/src/lib/TezosLib.ts @@ -0,0 +1,109 @@ +import { TezosToolkit } from '@taquito/taquito' +import { InMemorySigner } from '@taquito/signer' +import { localForger } from '@taquito/local-forging' +import Keyring from 'mnemonic-keyring' + +/** + * Constants + */ +const DEFAULT_PATH = "m/44'/1729'/0'/0'" +const DEFAULT_CURVE = 'ed25519' + +/** + * Types + */ +interface IInitArguments { + mnemonic?: string + path?: string + curve?: 'ed25519' | 'secp256k1' +} + +/** + * Library + */ +export default class TezosLib { + tezos: TezosToolkit + signer: InMemorySigner + mnemonic: string + secretKey: string + publicKey: string + address: string + curve: 'ed25519' | 'secp256k1' + + constructor( + tezos: TezosToolkit, + mnemonic: string, + signer: InMemorySigner, + secretKey: string, + publicKey: string, + address: string, + curve: 'ed25519' | 'secp256k1' + ) { + this.tezos = tezos + this.mnemonic = mnemonic + this.signer = signer + this.secretKey = secretKey + this.publicKey = publicKey + this.address = address + this.curve = curve + } + + static async init({ mnemonic, path, curve }: IInitArguments) { + const params = { + mnemonic: mnemonic ?? Keyring.generateMnemonic(), + derivationPath: path ?? DEFAULT_PATH, + curve: curve ?? DEFAULT_CURVE + } + + const Tezos = new TezosToolkit('https://mainnet.api.tez.ie') + + const signer = InMemorySigner.fromMnemonic(params) + + Tezos.setSignerProvider(signer) + + const secretKey = await signer.secretKey() + const publicKey = await signer.publicKey() + const address = await signer.publicKeyHash() + + return new TezosLib(Tezos, params.mnemonic, signer, secretKey, publicKey, address, params.curve) + } + + public getMnemonic() { + return this.mnemonic + } + + public getPublicKey() { + return this.publicKey + } + + public getCurve() { + return this.curve + } + + public getAddress() { + return this.address + } + + public async signTransaction(transaction: any) { + const prepared = await this.tezos.prepare.batch( + transaction.map((tx: any) => ({ + amount: tx.amount, + to: tx.destination, + kind: tx.kind, + mutez: true + })) + ) + + const forged = await localForger.forge(prepared.opOb) + + const tx = await this.signer.sign(forged, new Uint8Array([3])) + + const hash = await this.tezos.rpc.injectOperation(tx.sbytes) + + return hash + } + + public async signPayload(payload: any) { + return await this.signer.sign(payload) + } +} diff --git a/advanced/wallets/react-wallet-v2/src/utils/CosmosRequestHandler.ts b/advanced/wallets/react-wallet-v2/src/utils/CosmosRequestHandler.ts new file mode 100644 index 0000000..4612c49 --- /dev/null +++ b/advanced/wallets/react-wallet-v2/src/utils/CosmosRequestHandler.ts @@ -0,0 +1,40 @@ +import { COSMOS_SIGNING_METHODS } from '@/data/COSMOSData' +import { cosmosAddresses, cosmosWallets } from '@/utils/CosmosWalletUtil' +import { getWalletAddressFromParams } from '@/utils/HelperUtil' +import { formatJsonRpcError, formatJsonRpcResult } from '@json-rpc-tools/utils' +import { SignClientTypes } from '@walletconnect/types' +import { getSdkError } from '@walletconnect/utils' +import { parseSignDocValues } from 'cosmos-wallet' + +export async function approveCosmosRequest( + requestEvent: SignClientTypes.EventArguments['session_request'] +) { + const { params, id } = requestEvent + const { request } = params + const wallet = cosmosWallets[getWalletAddressFromParams(cosmosAddresses, params)] + + switch (request.method) { + case COSMOS_SIGNING_METHODS.COSMOS_SIGN_DIRECT: + const signedDirect = await wallet.signDirect( + request.params.signerAddress, + parseSignDocValues(request.params.signDoc) + ) + return formatJsonRpcResult(id, signedDirect.signature) + + case COSMOS_SIGNING_METHODS.COSMOS_SIGN_AMINO: + const signedAmino = await wallet.signAmino( + request.params.signerAddress, + request.params.signDoc + ) + return formatJsonRpcResult(id, signedAmino.signature) + + default: + throw new Error(getSdkError('INVALID_METHOD').message) + } +} + +export function rejectCosmosRequest(request: SignClientTypes.EventArguments['session_request']) { + const { id } = request + + return formatJsonRpcError(id, getSdkError('USER_REJECTED_METHODS').message) +} diff --git a/advanced/wallets/react-wallet-v2/src/utils/CosmosWalletUtil.ts b/advanced/wallets/react-wallet-v2/src/utils/CosmosWalletUtil.ts new file mode 100644 index 0000000..55ed38f --- /dev/null +++ b/advanced/wallets/react-wallet-v2/src/utils/CosmosWalletUtil.ts @@ -0,0 +1,43 @@ +import CosmosLib from '@/lib/CosmosLib' + +export let wallet1: CosmosLib +export let wallet2: CosmosLib +export let cosmosWallets: Record +export let cosmosAddresses: string[] + +let address1: string +let address2: string + +/** + * Utilities + */ +export async function createOrRestoreCosmosWallet() { + const mnemonic1 = localStorage.getItem('COSMOS_MNEMONIC_1') + const mnemonic2 = localStorage.getItem('COSMOS_MNEMONIC_2') + + if (mnemonic1 && mnemonic2) { + wallet1 = await CosmosLib.init({ mnemonic: mnemonic1 }) + wallet2 = await CosmosLib.init({ mnemonic: mnemonic2 }) + } else { + wallet1 = await CosmosLib.init({}) + wallet2 = await CosmosLib.init({}) + + // Don't store mnemonic in local storage in a production project! + localStorage.setItem('COSMOS_MNEMONIC_1', wallet1.getMnemonic()) + localStorage.setItem('COSMOS_MNEMONIC_2', wallet2.getMnemonic()) + } + + address1 = await wallet1.getAddress() + address2 = await wallet2.getAddress() + + cosmosWallets = { + [address1]: wallet1, + [address2]: wallet2 + } + cosmosAddresses = Object.keys(cosmosWallets) + + return { + cosmosWallets, + cosmosAddresses + } +} diff --git a/advanced/wallets/react-wallet-v2/src/utils/TezosRequestHandlerUtil.ts b/advanced/wallets/react-wallet-v2/src/utils/TezosRequestHandlerUtil.ts new file mode 100644 index 0000000..c96c73b --- /dev/null +++ b/advanced/wallets/react-wallet-v2/src/utils/TezosRequestHandlerUtil.ts @@ -0,0 +1,46 @@ +import { TEZOS_SIGNING_METHODS } from '@/data/TezosData' +import { tezosWallets } from '@/utils/TezosWalletUtil' +import { formatJsonRpcError, formatJsonRpcResult } from '@json-rpc-tools/utils' +import { SignClientTypes } from '@walletconnect/types' +import { getSdkError } from '@walletconnect/utils' + +export async function approveTezosRequest( + requestEvent: SignClientTypes.EventArguments['session_request'] +) { + const { params, id } = requestEvent + const { request } = params + + const wallet = tezosWallets[request.params.account ?? Object.keys(tezosWallets)[0]] + const allWallets = Object.keys(tezosWallets).map(key => tezosWallets[key]) + + switch (request.method) { + case TEZOS_SIGNING_METHODS.TEZOS_GET_ACCOUNTS: + return formatJsonRpcResult( + id, + allWallets.map(wallet => ({ + algo: wallet.getCurve(), + address: wallet.getAddress(), + pubkey: wallet.getPublicKey() + })) + ) + + case TEZOS_SIGNING_METHODS.TEZOS_SEND: + const sendResponse = await wallet.signTransaction(request.params.operations) + + return formatJsonRpcResult(id, { hash: sendResponse }) + + case TEZOS_SIGNING_METHODS.TEZOS_SIGN: + const signResponse = await wallet.signPayload(request.params.payload) + + return formatJsonRpcResult(id, { signature: signResponse.prefixSig }) + + default: + throw new Error(getSdkError('INVALID_METHOD').message) + } +} + +export function rejectTezosRequest(request: SignClientTypes.EventArguments['session_request']) { + const { id } = request + + return formatJsonRpcError(id, getSdkError('USER_REJECTED_METHODS').message) +} diff --git a/advanced/wallets/react-wallet-v2/src/utils/TezosWalletUtil.ts b/advanced/wallets/react-wallet-v2/src/utils/TezosWalletUtil.ts new file mode 100644 index 0000000..aaaaf63 --- /dev/null +++ b/advanced/wallets/react-wallet-v2/src/utils/TezosWalletUtil.ts @@ -0,0 +1,50 @@ +import TezosLib from '@/lib/TezosLib' + +export let wallet1: TezosLib +export let wallet2: TezosLib +export let tezosWallets: Record +export let tezosAddresses: string[] + +let address1: string +let address2: string + +/** + * Utilities + */ +export function getTezosWallet(address: string) { + let wallet = Object.entries(tezosWallets).find(([walletAddress, _]) => { + return address === walletAddress + }) + return wallet?.[1] +} + +export async function createOrRestoreTezosWallet() { + const mnemonic1 = localStorage.getItem('TEZOS_MNEMONIC_1') + const mnemonic2 = localStorage.getItem('TEZOS_MNEMONIC_2') + + if (mnemonic1 && mnemonic2) { + wallet1 = await TezosLib.init({ mnemonic: mnemonic1 }) + wallet2 = await TezosLib.init({ mnemonic: mnemonic2 }) + } else { + wallet1 = await TezosLib.init({}) + wallet2 = await TezosLib.init({}) + + // Don't store mnemonic in local storage in a production project! + localStorage.setItem('TEZOS_MNEMONIC_1', wallet1.getMnemonic()) + localStorage.setItem('TEZOS_MNEMONIC_2', wallet2.getMnemonic()) + } + + address1 = wallet1.getAddress() + address2 = wallet2.getAddress() + + tezosWallets = { + [address1]: wallet1, + [address2]: wallet2 + } + tezosAddresses = Object.keys(tezosWallets) + + return { + tezosWallets, + tezosAddresses + } +} diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx index 2ebeb93..472763f 100644 --- a/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx +++ b/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx @@ -7,10 +7,12 @@ import DoneIcon from '@mui/icons-material/Done' import CloseIcon from '@mui/icons-material/Close' import ModalStore from '@/store/ModalStore' +import { cosmosAddresses } from '@/utils/CosmosWalletUtil' import { eip155Addresses } from '@/utils/EIP155WalletUtil' import { polkadotAddresses } from '@/utils/PolkadotWalletUtil' import { multiversxAddresses } from '@/utils/MultiversxWalletUtil' import { tronAddresses } from '@/utils/TronWalletUtil' +import { tezosAddresses } from '@/utils/TezosWalletUtil' import { solanaAddresses } from '@/utils/SolanaWalletUtil' import { nearAddresses } from '@/utils/NearWalletUtil' import { kadenaAddresses } from '@/utils/KadenaWalletUtil' @@ -91,6 +93,12 @@ export default function SessionProposalModal() { events: ['accountsChanged', 'chainChanged'], accounts: eip155Chains.map(chain => `${chain}:${eip155Addresses[0]}`).flat() }, + cosmos: { + chains: cosmosChains, + methods: cosmosMethods, + events: [], + accounts: cosmosChains.map(chain => `${chain}:${cosmosAddresses[0]}`).flat() + }, kadena: { chains: kadenaChains, methods: kadenaMethods, @@ -125,6 +133,14 @@ export default function SessionProposalModal() { .map(chain => solanaAddresses.map(address => `${chain}:${address}`)) .flat() }, + tezos: { + chains: tezosChains, + methods: tezosMethods, + events: [], + accounts: tezosChains + .map(chain => tezosAddresses.map(address => `${chain}:${address}`)) + .flat() + }, tron: { chains: tronChains, methods: tronMethods, @@ -181,6 +197,8 @@ export default function SessionProposalModal() { switch (namespace) { case 'eip155': return eip155Addresses[0] + case 'cosmos': + return cosmosAddresses[0] case 'kadena': return kadenaAddresses[0] case 'mvx': @@ -191,6 +209,8 @@ export default function SessionProposalModal() { return polkadotAddresses[0] case 'solana': return solanaAddresses[0] + case 'tezos': + return tezosAddresses[0] case 'tron': return tronAddresses[0] } diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionSignCosmosModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionSignCosmosModal.tsx new file mode 100644 index 0000000..4722ab0 --- /dev/null +++ b/advanced/wallets/react-wallet-v2/src/views/SessionSignCosmosModal.tsx @@ -0,0 +1,86 @@ +/* eslint-disable react-hooks/rules-of-hooks */ +import { Divider, Text } from '@nextui-org/react' +import { useCallback, useState } from 'react' + +import RequestDataCard from '@/components/RequestDataCard' +import RequesDetailsCard from '@/components/RequestDetalilsCard' +import RequestMethodCard from '@/components/RequestMethodCard' +import ModalStore from '@/store/ModalStore' +import { approveCosmosRequest, rejectCosmosRequest } from '@/utils/CosmosRequestHandler' +import { styledToast } from '@/utils/HelperUtil' +import { web3wallet } from '@/utils/WalletConnectUtil' +import RequestModal from './RequestModal' + +export default function SessionSignCosmosModal() { + // Get request and wallet data from store + const requestEvent = ModalStore.state.data?.requestEvent + const requestSession = ModalStore.state.data?.requestSession + const [isLoadingApprove, setIsLoadingApprove] = useState(false) + const [isLoadingReject, setIsLoadingReject] = useState(false) + + // Ensure request and wallet are defined + if (!requestEvent || !requestSession) { + return Missing request data + } + + // Get required request data + const { topic, params } = requestEvent + const { chainId, request } = params + + // Handle approve action (logic varies based on request method) + const onApprove = useCallback(async () => { + if (requestEvent) { + setIsLoadingApprove(true) + const response = await approveCosmosRequest(requestEvent) + try { + await web3wallet.respondSessionRequest({ + topic, + response + }) + } catch (e) { + setIsLoadingApprove(false) + styledToast((e as Error).message, 'error') + return + } + setIsLoadingApprove(false) + ModalStore.close() + } + }, [requestEvent, topic]) + + // Handle reject action + const onReject = useCallback(async () => { + if (requestEvent) { + setIsLoadingReject(true) + const response = rejectCosmosRequest(requestEvent) + try { + await web3wallet.respondSessionRequest({ + topic, + response + }) + } catch (e) { + setIsLoadingReject(false) + styledToast((e as Error).message, 'error') + return + } + setIsLoadingReject(false) + ModalStore.close() + } + }, [requestEvent, topic]) + + return ( + + + + + + + + ) +} diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionSignTezosModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionSignTezosModal.tsx new file mode 100644 index 0000000..0f3a036 --- /dev/null +++ b/advanced/wallets/react-wallet-v2/src/views/SessionSignTezosModal.tsx @@ -0,0 +1,86 @@ +/* eslint-disable react-hooks/rules-of-hooks */ +import { Divider, Text } from '@nextui-org/react' + +import RequestDataCard from '@/components/RequestDataCard' +import RequesDetailsCard from '@/components/RequestDetalilsCard' +import RequestMethodCard from '@/components/RequestMethodCard' +import ModalStore from '@/store/ModalStore' +import { styledToast } from '@/utils/HelperUtil' +import { approveTezosRequest, rejectTezosRequest } from '@/utils/TezosRequestHandlerUtil' +import { web3wallet } from '@/utils/WalletConnectUtil' +import RequestModal from './RequestModal' +import { useCallback, useState } from 'react' + +export default function SessionSignTezosModal() { + // Get request and wallet data from store + const requestEvent = ModalStore.state.data?.requestEvent + const requestSession = ModalStore.state.data?.requestSession + const [isLoadingApprove, setIsLoadingApprove] = useState(false) + const [isLoadingReject, setIsLoadingReject] = useState(false) + + // Ensure request and wallet are defined + if (!requestEvent || !requestSession) { + return Missing request data + } + + // Get required request data + const { topic, params } = requestEvent + const { request, chainId } = params + + // Handle approve action (logic varies based on request method) + const onApprove = useCallback(async () => { + if (requestEvent) { + setIsLoadingApprove(true) + const response = await approveTezosRequest(requestEvent) + try { + await web3wallet.respondSessionRequest({ + topic, + response + }) + } catch (e) { + setIsLoadingApprove(false) + styledToast((e as Error).message, 'error') + return + } + setIsLoadingApprove(false) + ModalStore.close() + } + }, [requestEvent, topic]) + + // Handle reject action + const onReject = useCallback(async () => { + if (requestEvent) { + setIsLoadingReject(true) + const response = rejectTezosRequest(requestEvent) + try { + await web3wallet.respondSessionRequest({ + topic, + response + }) + } catch (e) { + setIsLoadingReject(false) + styledToast((e as Error).message, 'error') + return + } + setIsLoadingReject(false) + ModalStore.close() + } + }, [requestEvent, topic]) + + return ( + + + + + + + + ) +} diff --git a/advanced/wallets/react-wallet-v2/yarn.lock b/advanced/wallets/react-wallet-v2/yarn.lock index 726c975..6539d4f 100644 --- a/advanced/wallets/react-wallet-v2/yarn.lock +++ b/advanced/wallets/react-wallet-v2/yarn.lock @@ -1368,6 +1368,15 @@ resolved "https://registry.yarnpkg.com/@pedrouid/environment/-/environment-1.0.1.tgz#858f0f8a057340e0b250398b75ead77d6f4342ec" integrity sha512-HaW78NszGzRZd9SeoI3JD11JqY+lubnaOx7Pewj5pfjqWXOEATpeKIFb9Z4t2WBUK2iryiXX3lzWwmYWgUL0Ug== +"@pedrouid/iso-random@^1.1.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@pedrouid/iso-random/-/iso-random-1.2.1.tgz#55178d9a2e7897b0f630dd1b4be76bc8460242d7" + integrity sha512-C35NqYMmLsg61WDiEup4OwjRhgfZIcK4BL+Qg49xowHUJ+f7/LFZCO+TGuQqoXFAj1beKIOpUN33f0fqV7zneQ== + dependencies: + "@pedrouid/environment" "^1.0.1" + enc-utils "^3.0.0" + randombytes "^2.1.0" + "@polkadot/keyring@^10.1.2", "@polkadot/keyring@^10.4.2": version "10.4.2" resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-10.4.2.tgz#793377fdb9076df0af771df11388faa6be03c70d" @@ -2462,6 +2471,11 @@ dependencies: undici-types "~5.26.4" +"@types/node@10.12.18": + version "10.12.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" + integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== + "@types/node@11.11.6": version "11.11.6" resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" @@ -3114,6 +3128,14 @@ base64-js@^1.3.0, base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +bcrypto@^5.4.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/bcrypto/-/bcrypto-5.5.2.tgz#7568186b31a1cfb142df50b22a87309287708e96" + integrity sha512-k3PF755oJM0+25iOVuraNedF5XneykxRwl+oBoMeQPfYee4qX8hHQhKCsNZWLthNYgi41GH2ysopd/8sDQDhEw== + dependencies: + bufio "~1.0.7" + loady "~0.0.5" + bech32@1.1.4, bech32@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" @@ -3124,6 +3146,14 @@ bech32@^2.0.0: resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== +better-sqlite3@^7.1.2: + version "7.6.2" + resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-7.6.2.tgz#47cd8cad5b9573cace535f950ac321166bc31384" + integrity sha512-S5zIU1Hink2AH4xPsN0W43T1/AJ5jrPh7Oy07ocuW/AKYYY02GWzz9NH0nbSMn/gw6fDZ5jZ1QsHt1BXAwJ6Lg== + dependencies: + bindings "^1.5.0" + prebuild-install "^7.1.0" + bigint-buffer@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" @@ -3146,13 +3176,26 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bindings@^1.3.0: +bindings@^1.3.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== dependencies: file-uri-to-path "1.0.0" +bip32@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/bip32/-/bip32-2.0.6.tgz#6a81d9f98c4cd57d05150c60d8f9e75121635134" + integrity sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA== + dependencies: + "@types/node" "10.12.18" + bs58check "^2.1.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + tiny-secp256k1 "^1.1.3" + typeforce "^1.11.5" + wif "^2.0.6" + bip39@3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.2.tgz#2baf42ff3071fc9ddd5103de92e8f80d9257ee32" @@ -3163,13 +3206,22 @@ bip39@3.0.2: pbkdf2 "^3.0.9" randombytes "^2.0.1" -bip39@^3.0.2, bip39@^3.0.4: +bip39@^3.0.2, bip39@^3.0.3, bip39@^3.0.4: version "3.1.0" resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.1.0.tgz#c55a418deaf48826a6ceb34ac55b3ee1577e18a3" integrity sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A== dependencies: "@noble/hashes" "^1.2.0" +bl@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + blake2b-wasm@^1.1.0: version "1.1.7" resolved "https://registry.yarnpkg.com/blake2b-wasm/-/blake2b-wasm-1.1.7.tgz#e4d075da10068e5d4c3ec1fb9accc4d186c55d81" @@ -3253,7 +3305,7 @@ bs58@^4.0.0, bs58@^4.0.1: dependencies: base-x "^3.0.2" -bs58check@^2.1.2: +bs58check@<3.0.0, bs58check@^2.1.1, bs58check@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== @@ -3270,6 +3322,14 @@ buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + bufferutil@^4.0.1: version "4.0.8" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.8.tgz#1de6a71092d65d7766c4d8a522b261a6e787e8ea" @@ -3277,6 +3337,11 @@ bufferutil@^4.0.1: dependencies: node-gyp-build "^4.3.0" +bufio@~1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/bufio/-/bufio-1.0.7.tgz#b7f63a1369a0829ed64cc14edf0573b3e382a33e" + integrity sha512-bd1dDQhiC+bEbEfg56IdBv7faWa6OipMs/AFFFvtFnB3wAYjlwQpQRZ0pm6ZkgtfL0pILRXhKxOiQj6UzoMR7A== + call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" @@ -3353,6 +3418,11 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -3470,7 +3540,7 @@ cosmos-wallet@1.2.0: "@cosmjs/amino" "^0.25.4" "@cosmjs/proto-signing" "^0.25.4" -create-hash@^1.1.0, create-hash@^1.1.2: +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -3481,7 +3551,7 @@ create-hash@^1.1.0, create-hash@^1.1.2: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@1.1.7, create-hmac@^1.1.4: +create-hmac@1.1.7, create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -3563,6 +3633,18 @@ decode-uri-component@^0.2.2: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -3636,6 +3718,11 @@ detect-libc@^1.0.3: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== +detect-libc@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -3691,7 +3778,7 @@ ed2curve@0.3.0, ed2curve@^0.3.0: dependencies: tweetnacl "1.x.x" -elliptic@6.5.4, elliptic@^6.5.3, elliptic@^6.5.4: +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -3709,7 +3796,15 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== -end-of-stream@^1.4.1: +enc-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/enc-utils/-/enc-utils-3.0.0.tgz#65935d2d6a867fa0ae995f05f3a2f055ce764dcf" + integrity sha512-e57t/Z2HzWOLwOp7DZcV0VMEY8t7ptWwsxyp6kM2b2zrk6JqIpXxzkruHAMiBsy5wg9jp/183GdiRXCvBtzsYg== + dependencies: + is-typedarray "1.0.0" + typedarray-to-buffer "3.1.5" + +end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -4128,6 +4223,11 @@ execa@^5.1.1: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + eyes@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" @@ -4264,6 +4364,11 @@ framesync@6.0.1: dependencies: tslib "^2.1.0" +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -4327,6 +4432,11 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -4560,7 +4670,7 @@ idb-keyval@^6.2.1: resolved "https://registry.yarnpkg.com/idb-keyval/-/idb-keyval-6.2.1.tgz#94516d625346d16f56f3b33855da11bfded2db33" integrity sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg== -ieee754@^1.2.1: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -4596,6 +4706,11 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + injectpromise@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/injectpromise/-/injectpromise-1.0.0.tgz#c621f7df2bbfc1164d714f1fb229adec2079da39" @@ -4829,6 +4944,11 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: dependencies: which-typed-array "^1.1.11" +is-typedarray@1.0.0, is-typedarray@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== + is-weakmap@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" @@ -5103,6 +5223,16 @@ keyvaluestorage-interface@^1.0.0: resolved "https://registry.yarnpkg.com/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz#13ebdf71f5284ad54be94bd1ad9ed79adad515ff" integrity sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g== +keyvaluestorage@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/keyvaluestorage/-/keyvaluestorage-0.7.1.tgz#be2f9f742d759d5442cdf9d49af6bdacc964c1eb" + integrity sha512-7AHq8bZE4WRWy+BltiuPwQo5aKuj7CguhwGdW7NUUOEImY2Tq/lJaBjHdOf0MYzeu+Y4oxQWhkZEZcrDc9KnxA== + dependencies: + better-sqlite3 "^7.1.2" + keyvaluestorage-interface "^1.0.0" + localStorage "^1.0.4" + safe-json-utils "^1.1.1" + language-subtag-registry@^0.3.20: version "0.3.22" resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz#2e1500861b2e457eba7e7ae86877cbd08fa1fd1d" @@ -5182,6 +5312,16 @@ listhen@^1.5.5: untun "^0.1.2" uqr "^0.1.2" +loady@~0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/loady/-/loady-0.0.5.tgz#b17adb52d2fb7e743f107b0928ba0b591da5d881" + integrity sha512-uxKD2HIj042/HBx77NBcmEPsD+hxCgAtjEWlYNScuUjIsh/62Uyu39GOR68TBR68v+jqDL9zfftCWoUo4y03sQ== + +localStorage@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/localStorage/-/localStorage-1.0.4.tgz#57dfa28084385f81431accb8ae24b196398223f7" + integrity sha512-r35zrihcDiX+dqWlJSeIwS9nrF95OQTgqMFm3FB2D/+XgdmZtcutZOb7t0xXkhOEM8a9kpuu7cc28g1g36I5DQ== + lodash.defaults@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" @@ -5281,6 +5421,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -5298,11 +5443,16 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0, minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + mlly@^1.2.0, mlly@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.4.2.tgz#7cf406aa319ff6563d25da6b36610a93f2a8007e" @@ -5313,6 +5463,17 @@ mlly@^1.2.0, mlly@^1.4.2: pkg-types "^1.0.3" ufo "^1.3.0" +mnemonic-keyring@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/mnemonic-keyring/-/mnemonic-keyring-1.4.0.tgz#f766c3ef660981030903ddc6bb44f240cfbeeda1" + integrity sha512-Peo4oupSy4UkeeqYpuJ5PUw4mjDj4lVetoD2R1LloMzoeA8UAXdLOXCUpooQZp7fq7kqtZeOUhDjoLcOWIJUiQ== + dependencies: + "@pedrouid/iso-random" "^1.1.0" + bcrypto "^5.4.0" + bip32 "^2.0.6" + bip39 "^3.0.3" + keyvaluestorage "^0.7.1" + mri@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" @@ -5338,6 +5499,11 @@ mustache@^4.0.0: resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== +nan@^2.13.2: + version "2.18.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" + integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== + nanoassert@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-1.1.0.tgz#4f3152e09540fde28c76f44b19bbcd1d5a42478d" @@ -5348,6 +5514,11 @@ nanoid@^3.1.30, nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + napi-wasm@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" @@ -5398,6 +5569,13 @@ next@12.1.5: "@next/swc-win32-ia32-msvc" "12.1.5" "@next/swc-win32-x64-msvc" "12.1.5" +node-abi@^3.3.0: + version "3.52.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.52.0.tgz#ffba0a85f54e552547e5849015f40f9514d5ba7c" + integrity sha512-JJ98b02z16ILv7859irtXn4oUaFWADtvkzy2c0IAatNVX2Mc9Yoh8z6hZInn3QwvMEYhHuQloYi+TTQy67SIdQ== + dependencies: + semver "^7.3.5" + node-addon-api@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" @@ -5533,7 +5711,7 @@ on-exit-leak-free@^0.2.0: resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" integrity sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg== -once@^1.3.0, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== @@ -5716,6 +5894,24 @@ postcss@8.4.5: picocolors "^1.0.0" source-map-js "^1.0.1" +prebuild-install@^7.1.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" + integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== + dependencies: + detect-libc "^2.0.0" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^3.3.0" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^4.0.0" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -5799,6 +5995,14 @@ proxy-compare@2.5.1: resolved "https://registry.yarnpkg.com/proxy-compare/-/proxy-compare-2.5.1.tgz#17818e33d1653fbac8c2ec31406bce8a2966f600" integrity sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA== +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + punycode@^2.1.0: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" @@ -5829,13 +6033,23 @@ radix3@^1.1.0: resolved "https://registry.yarnpkg.com/radix3/-/radix3-1.1.0.tgz#9745df67a49c522e94a33d0a93cf743f104b6e0d" integrity sha512-pNsHDxbGORSvuSScqNJ+3Km6QAVqk8CfsCBIEoDgpqLrkD2f3QM4I7d1ozJJ172OmIcoUcerZaNWqtLkRXTV3A== -randombytes@^2.0.1: +randombytes@^2.0.1, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-code-blocks@0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/react-code-blocks/-/react-code-blocks-0.1.5.tgz#8514c6b7bee5b238366278aaee3c0d6cc6f07851" @@ -5914,7 +6128,7 @@ react@17.0.2: loose-envify "^1.1.0" object-assign "^4.1.1" -readable-stream@^3.1.1, readable-stream@^3.6.0: +readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -6089,6 +6303,11 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.0, resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-json-utils@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/safe-json-utils/-/safe-json-utils-1.1.1.tgz#0e883874467d95ab914c3f511096b89bfb3e63b1" + integrity sha512-SAJWGKDs50tAbiDXLf89PDwt9XYkWyANFWVzn4dTXl5QyI8t2o/bW5/OJl3lvc2WVU4MEpTo9Yz5NVFNsp+OJQ== + safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" @@ -6131,7 +6350,7 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.7: +semver@^7.3.5, semver@^7.3.7: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -6201,6 +6420,20 @@ signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== + dependencies: + decompress-response "^6.0.0" + once "^1.3.1" + simple-concat "^1.0.0" + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -6343,6 +6576,11 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + style-value-types@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-5.0.0.tgz#76c35f0e579843d523187989da866729411fc8ad" @@ -6405,6 +6643,27 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +tar-fs@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + +tar-stream@^2.1.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + text-encoding-utf-8@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" @@ -6427,6 +6686,17 @@ thread-stream@^0.15.1: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== +tiny-secp256k1@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz#7e224d2bee8ab8283f284e40e6b4acb74ffe047c" + integrity sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA== + dependencies: + bindings "^1.3.0" + bn.js "^4.11.8" + create-hmac "^1.1.7" + elliptic "^6.4.0" + nan "^2.13.2" + tiny-warning@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" @@ -6502,6 +6772,13 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + tweetnacl@1.0.3, tweetnacl@1.x.x, tweetnacl@^1.0.1, tweetnacl@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" @@ -6558,11 +6835,23 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" +typedarray-to-buffer@3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + typedarray-to-buffer@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz#cdd2933c61dd3f5f02eda5d012d441f95bfeb50a" integrity sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ== +typeforce@^1.11.5: + version "1.18.0" + resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc" + integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g== + typescript@5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" @@ -6784,6 +7073,13 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +wif@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704" + integrity sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ== + dependencies: + bs58check "<3.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index fb57ccd..0000000 --- a/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - -