diff --git a/advanced/wallets/react-wallet-v2/README.md b/advanced/wallets/react-wallet-v2/README.md index bcfa31bca..e4a1c56b7 100644 --- a/advanced/wallets/react-wallet-v2/README.md +++ b/advanced/wallets/react-wallet-v2/README.md @@ -39,11 +39,11 @@ Your `.env.local` now contains the following environment variables: ## Navigating through example -1. Initial setup and initializations happen in [_app.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/pages/_app.tsx) file -2. WalletConnect client, ethers and cosmos wallets are initialized in [useInitialization.ts ](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/hooks/useInitialization.ts) hook -3. Subscription and handling of WalletConnect events happens in [useWalletConnectEventsManager.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/hooks/useWalletConnectEventsManager.ts) hook, that opens related [Modal views](https://github.com/WalletConnect/web-examples/tree/main/wallets/react-wallet-v2/src/views) and passes them all necessary data -4. [Modal views](https://github.com/WalletConnect/web-examples/tree/main/wallets/react-wallet-v2/src/views) are responsible for data display and handling approval or rejection actions -5. Upon approval or rejection, modals pass the request data to [RequestHandlerUtil.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/utils/RequestHandlerUtil.ts) that performs all necessary work based on the request method and returns formated json rpc result data that can be then used for WalletConnect client responses +1. Initial setup and initializations happen in [_app.ts](https://github.com/WalletConnect/web-examples/blob/main/advanced/wallets/react-wallet-v2/src/pages/_app.tsx) file +2. WalletConnect client, ethers and cosmos wallets are initialized in [useInitialization.ts ](https://github.com/WalletConnect/web-examples/blob/main/advanced/wallets/react-wallet-v2/src/hooks/useInitialization.ts) hook +3. Subscription and handling of WalletConnect events happens in [useWalletConnectEventsManager.ts](https://github.com/WalletConnect/web-examples/blob/main/advanced/wallets/react-wallet-v2/src/hooks/useWalletConnectEventsManager.ts) hook, that opens related [Modal views](https://github.com/WalletConnect/web-examples/tree/main/wallets/react-wallet-v2/src/views) and passes them all necessary data +4. [Modal views](https://github.com/WalletConnect/web-examples/tree/main/advanced/wallets/react-wallet-v2/src/views) are responsible for data display and handling approval or rejection actions +5. Upon approval or rejection, modals pass the request data to [RequestHandlerUtil.ts](https://github.com/WalletConnect/web-examples/blob/main/advanced/wallets/react-wallet-v2/src/utils/RequestHandlerUtil.ts) that performs all necessary work based on the request method and returns formated json rpc result data that can be then used for WalletConnect client responses ## Preview of wallet and dapp examples in action diff --git a/advanced/wallets/react-wallet-v2/package.json b/advanced/wallets/react-wallet-v2/package.json index de51b96b6..6066daa71 100644 --- a/advanced/wallets/react-wallet-v2/package.json +++ b/advanced/wallets/react-wallet-v2/package.json @@ -10,6 +10,7 @@ "prettier:write": "prettier --write '**/*.{js,ts,jsx,tsx}'" }, "dependencies": { + "@airgap/beacon-types": "^4.2.2", "@biconomy/permission-context-builder": "^1.0.9", "@cosmjs/amino": "0.32.3", "@cosmjs/encoding": "0.32.3", @@ -31,8 +32,9 @@ "@polkadot/types": "^9.3.3", "@rhinestone/module-sdk": "0.1.2", "@solana/web3.js": "1.89.2", - "@taquito/signer": "^15.1.0", - "@taquito/taquito": "^15.1.0", + "@taquito/rpc": "^20.0.1", + "@taquito/signer": "^20.0.1", + "@taquito/taquito": "^20.0.1", "@types/semver": "^7.5.8", "@walletconnect/web3wallet": "1.14.2", "@zerodev/ecdsa-validator": "5.3.0", diff --git a/advanced/wallets/react-wallet-v2/src/components/ModalFooter.tsx b/advanced/wallets/react-wallet-v2/src/components/ModalFooter.tsx index 96356b9d4..7ef7e732d 100644 --- a/advanced/wallets/react-wallet-v2/src/components/ModalFooter.tsx +++ b/advanced/wallets/react-wallet-v2/src/components/ModalFooter.tsx @@ -53,7 +53,7 @@ export default function ModalFooter({ auto flat style={{ color: 'white', backgroundColor: 'grey' }} - onPress={onReject} + onClick={onReject} data-testid="session-reject-button" disabled={disableReject || rejectLoader?.active} > @@ -68,7 +68,7 @@ export default function ModalFooter({ flat color={approveButtonColor} disabled={disableApprove || approveLoader?.active} - onPress={onApprove} + onClick={onApprove} data-testid="session-approve-button" > {approveLoader && approveLoader.active ? ( diff --git a/advanced/wallets/react-wallet-v2/src/data/TezosData.ts b/advanced/wallets/react-wallet-v2/src/data/TezosData.ts index 725fce06b..f9d9dc47a 100644 --- a/advanced/wallets/react-wallet-v2/src/data/TezosData.ts +++ b/advanced/wallets/react-wallet-v2/src/data/TezosData.ts @@ -5,6 +5,7 @@ type ChainMetadata = { rgb: string rpc: string namespace: string + api?: string } /** @@ -21,7 +22,7 @@ export const TEZOS_MAINNET_CHAINS: Record = { name: 'Tezos', logo: '/chain-logos/tezos.svg', rgb: '44, 125, 247', - rpc: 'https://mainnet.api.tez.ie', + rpc: 'https://rpc.tzbeta.net', namespace: 'tezos' } } @@ -32,7 +33,7 @@ export const TEZOS_TEST_CHAINS: Record = { name: 'Tezos Testnet', logo: '/chain-logos/tezos.svg', rgb: '44, 125, 247', - rpc: 'https://ghostnet.ecadinfra.com', + rpc: 'https://rpc.ghostnet.teztnets.com', namespace: 'tezos' } } diff --git a/advanced/wallets/react-wallet-v2/src/lib/TezosLib.ts b/advanced/wallets/react-wallet-v2/src/lib/TezosLib.ts index 8e2db75ad..3a3946d8d 100644 --- a/advanced/wallets/react-wallet-v2/src/lib/TezosLib.ts +++ b/advanced/wallets/react-wallet-v2/src/lib/TezosLib.ts @@ -1,7 +1,10 @@ -import { TezosToolkit } from '@taquito/taquito' +import { OpKind, ParamsWithKind, TezosToolkit } from '@taquito/taquito'; import { InMemorySigner } from '@taquito/signer' -import { localForger } from '@taquito/local-forging' + import { Wallet } from 'ethers/' +import { PvmKind, ScriptedContracts } from '@taquito/rpc'; +import { PartialTezosOperation, TezosOperationType } from '@airgap/beacon-types' +import { TEZOS_CHAINS } from '@/data/TezosData'; /** * Constants @@ -22,7 +25,7 @@ interface IInitArguments { * Library */ export default class TezosLib { - tezos: TezosToolkit + toolkits: Record signer: InMemorySigner mnemonic: string secretKey: string @@ -31,7 +34,7 @@ export default class TezosLib { curve: 'ed25519' | 'secp256k1' constructor( - tezos: TezosToolkit, + toolkits: Record, mnemonic: string, signer: InMemorySigner, secretKey: string, @@ -39,7 +42,7 @@ export default class TezosLib { address: string, curve: 'ed25519' | 'secp256k1' ) { - this.tezos = tezos + this.toolkits = toolkits this.mnemonic = mnemonic this.signer = signer this.secretKey = secretKey @@ -55,17 +58,27 @@ export default class TezosLib { curve: curve ?? DEFAULT_CURVE } - const Tezos = new TezosToolkit('https://mainnet.api.tez.ie') - - const signer = InMemorySigner.fromMnemonic(params) - - Tezos.setSignerProvider(signer) + const signer = InMemorySigner.fromMnemonic(params); - const secretKey = await signer.secretKey() - const publicKey = await signer.publicKey() - const address = await signer.publicKeyHash() + // we have wallets for multiple networks + // later we will determine the chain from the request + const toolkits: Record = {}; + for (const chainKey in TEZOS_CHAINS) { + const chain = TEZOS_CHAINS[chainKey]; + const toolkit = new TezosToolkit(chain.rpc); + + toolkit.setSignerProvider(signer); + toolkits[chainKey] = toolkit; + } + const toolkit = toolkits['tezos:mainnet']; + const secretKey = await toolkit.signer.secretKey(); + const publicKey = await toolkit.signer.publicKey(); + const address = await toolkit.signer.publicKeyHash(); - return new TezosLib(Tezos, params.mnemonic, signer, secretKey, publicKey, address, params.curve) + if (!secretKey) { + throw new Error("Failed to generate secret key"); + } + return new TezosLib(toolkits, params.mnemonic, signer, secretKey, publicKey, address, params.curve) } public getMnemonic() { @@ -84,23 +97,163 @@ export default class TezosLib { 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 - })) - ) + public convertToPartialParamsWithKind(op: PartialTezosOperation): ParamsWithKind { + switch (op.kind) { + case TezosOperationType.ACTIVATE_ACCOUNT: + return { + kind: OpKind.ACTIVATION, + pkh: op.pkh, + secret: op.secret, + }; + case TezosOperationType.DELEGATION: + return { + kind: OpKind.DELEGATION, + source: op.source ?? "source not provided", + delegate: op.delegate, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + }; + case TezosOperationType.FAILING_NOOP: + return { + kind: OpKind.FAILING_NOOP, + arbitrary: op.arbitrary, + basedOnBlock: 'head', + }; + case TezosOperationType.INCREASE_PAID_STORAGE: + return { + kind: OpKind.INCREASE_PAID_STORAGE, + source: op.source, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + amount: Number(op.amount), + destination: op.destination, + }; + case TezosOperationType.ORIGINATION: + let script : ScriptedContracts = op.script as unknown as ScriptedContracts; + return { + kind: OpKind.ORIGINATION, + balance: Number(op.balance), + code: script.code, + init: script.storage, + delegate: op.delegate, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + }; + case TezosOperationType.REGISTER_GLOBAL_CONSTANT: + return { + kind: OpKind.REGISTER_GLOBAL_CONSTANT, + source: op.source, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + value: op.value, + }; + case TezosOperationType.SMART_ROLLUP_ADD_MESSAGES: + return { + kind: OpKind.SMART_ROLLUP_ADD_MESSAGES, + source: op.source, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + message: op.message, + }; + case TezosOperationType.SMART_ROLLUP_ORIGINATE: + if (!Object.values(PvmKind).includes(op.pvm_kind)) { + throw new Error(`Invalid PvmKind: ${op.pvm_kind}`); + } + return { + kind: OpKind.SMART_ROLLUP_ORIGINATE, + source: op.source, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + pvmKind: op.pvm_kind, + kernel: op.kernel, + parametersType: op.parameters_ty, + }; + case TezosOperationType.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE: + return { + kind: OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE, + source: op.source, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + rollup: op.rollup, + cementedCommitment: op.cemented_commitment, + outputProof: op.output_proof, + }; + case TezosOperationType.TRANSACTION: + return { + kind: OpKind.TRANSACTION, + to: op.destination, + amount: Number(op.amount), + mutez: true, + source: op.source, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + parameter: op.parameters, + }; + case TezosOperationType.TRANSFER_TICKET: + return { + kind: OpKind.TRANSFER_TICKET, + source: op.source, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + ticketContents: op.ticket_contents, + ticketTy: op.ticket_ty, + ticketTicketer: op.ticket_ticketer, + ticketAmount: Number(op.ticket_amount), + destination: op.destination, + entrypoint: op.entrypoint, + }; + case TezosOperationType.UPDATE_CONSENSUS_KEY: + return { + kind: OpKind.UPDATE_CONSENSUS_KEY, + source: op.source, + fee: op.fee ? Number(op.fee) : undefined, + gasLimit: op.gas_limit ? Number(op.gas_limit) : undefined, + storageLimit: op.storage_limit ? Number(op.storage_limit) : undefined, + pk: op.pk, + }; + default: + throw new Error(`Operation kind cannot be converted to ParamsWithKind: ${op.kind}`); + } + } + + public async signTransaction(transaction: any, chainId: string) { + // Map the transactions and prepare the batch + console.log(`Wallet: handling transaction: `, transaction); + const batchTransactions: ParamsWithKind[] = transaction.map((tx: PartialTezosOperation) => { + if (tx.kind === TezosOperationType.DELEGATION && !tx.source) { + tx.source = this.address; + } + const op: ParamsWithKind = this.convertToPartialParamsWithKind(tx); + return op; + }); + + const toolkit = this.toolkits[chainId]; + if (!toolkit) { + throw new Error(`Toolkit not found for chainId: ${chainId}`); + } - const forged = await localForger.forge(prepared.opOb) + // Prepare the batch + console.log(`Wallet: prepared batchTransactions `, batchTransactions); + const batch = toolkit.contract.batch(batchTransactions); - const tx = await this.signer.sign(forged, new Uint8Array([3])) + // Send the batch and wait for the operation hash + console.log(`Wallet: sending batch `, batch); + const operation = await batch.send(); - const hash = await this.tezos.rpc.injectOperation(tx.sbytes) + // Wait for confirmation + await operation.confirmation(); - return hash + console.log('Wallet: operation confirmed:', operation); + return operation.hash; } public async signPayload(payload: any) { diff --git a/advanced/wallets/react-wallet-v2/src/utils/HelperUtil.ts b/advanced/wallets/react-wallet-v2/src/utils/HelperUtil.ts index 6f823a3e4..f2518e53d 100644 --- a/advanced/wallets/react-wallet-v2/src/utils/HelperUtil.ts +++ b/advanced/wallets/react-wallet-v2/src/utils/HelperUtil.ts @@ -2,7 +2,7 @@ import toast from 'react-hot-toast' import { COSMOS_MAINNET_CHAINS, TCosmosChain } from '@/data/COSMOSData' import { EIP155_CHAINS, TEIP155Chain } from '@/data/EIP155Data' import { MULTIVERSX_CHAINS, TMultiversxChain } from '@/data/MultiversxData' -import { NEAR_CHAINS, NEAR_TEST_CHAINS, TNearChain } from '@/data/NEARData' +import { NEAR_TEST_CHAINS, TNearChain } from '@/data/NEARData' import { POLKADOT_CHAINS, TPolkadotChain } from '@/data/PolkadotData' import { SOLANA_CHAINS, TSolanaChain } from '@/data/SolanaData' import { TEZOS_CHAINS, TTezosChain } from '@/data/TezosData' @@ -10,7 +10,6 @@ import { TRON_CHAINS, TTronChain } from '@/data/TronData' import { KADENA_CHAINS, TKadenaChain } from '@/data/KadenaData' import { utils } from 'ethers' -import { Verify } from '@walletconnect/types' import bs58 from 'bs58' /** diff --git a/advanced/wallets/react-wallet-v2/src/utils/TezosRequestHandlerUtil.ts b/advanced/wallets/react-wallet-v2/src/utils/TezosRequestHandlerUtil.ts index c96c73b6e..6d4df9014 100644 --- a/advanced/wallets/react-wallet-v2/src/utils/TezosRequestHandlerUtil.ts +++ b/advanced/wallets/react-wallet-v2/src/utils/TezosRequestHandlerUtil.ts @@ -8,7 +8,13 @@ export async function approveTezosRequest( requestEvent: SignClientTypes.EventArguments['session_request'] ) { const { params, id } = requestEvent - const { request } = params + const { request, chainId } = params + console.log("Approving Tezos request: ", request); + + if (!tezosWallets || Object.keys(tezosWallets).length === 0) { + console.error("No wallets found on Approve. Try reloading the wallet page.") + return formatJsonRpcError(id, "No Tezos wallets available. See the error log on wallet"); + } const wallet = tezosWallets[request.params.account ?? Object.keys(tezosWallets)[0]] const allWallets = Object.keys(tezosWallets).map(key => tezosWallets[key]) @@ -25,9 +31,18 @@ export async function approveTezosRequest( ) case TEZOS_SIGNING_METHODS.TEZOS_SEND: - const sendResponse = await wallet.signTransaction(request.params.operations) - - return formatJsonRpcResult(id, { hash: sendResponse }) + try { + const sendResponse = await wallet.signTransaction(request.params.operations, chainId) + return formatJsonRpcResult(id, { hash: sendResponse }) + } catch (error) { + if (error instanceof Error) { + console.error("Tezos_send operation failed with error: ", error.message); + return formatJsonRpcError(id, error.message); + } else { + console.error("Tezos_send operation failed with unknown error: ", error); + return formatJsonRpcError(id, 'TEZOS_SEND failed with unknown error.'); + } + } case TEZOS_SIGNING_METHODS.TEZOS_SIGN: const signResponse = await wallet.signPayload(request.params.payload) diff --git a/advanced/wallets/react-wallet-v2/yarn.lock b/advanced/wallets/react-wallet-v2/yarn.lock index d716d8085..4c1b3f67b 100644 --- a/advanced/wallets/react-wallet-v2/yarn.lock +++ b/advanced/wallets/react-wallet-v2/yarn.lock @@ -12,6 +12,13 @@ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== +"@airgap/beacon-types@^4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@airgap/beacon-types/-/beacon-types-4.2.2.tgz#b239e17270ebc4ffff084ee7d7e50523e62743e6" + integrity sha512-4sX5QEZTanQ5E6FiY7lp6ilv6rlzu5eNrWa3KdygpHm0NFfkJCY7YRPWo4V5LkCCkILa9QF5TS9tVKMORNcocQ== + dependencies: + "@types/chrome" "0.0.246" + "@apollo/client@^3.10.1": version "3.10.4" resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.10.4.tgz#1abc488c79cf37dc63edf041aee6f9dc5aabc692" @@ -2399,50 +2406,62 @@ dependencies: tslib "^2.4.0" -"@taquito/http-utils@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/http-utils/-/http-utils-15.1.0.tgz#66f3ce220c483e33d6b31bca6e0c76b5b895ed9b" - integrity sha512-Uug5hN0XvMlFFN+rxSMW+Y9Z8pw5uqHRDZC83eLOBSijbpMo+ScG/2nKkC8MUUrqLaLeHru1HD4kT5DHc1fI+A== +"@taquito/core@^20.0.1": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@taquito/core/-/core-20.0.1.tgz#37d49669bb71768f5c0bbb9bf695dbe439474365" + integrity sha512-/NvTkS8Enz5zxm481h7Ld5+MTa3/q84PMqtQ+HN3Mniv4EshnX5uIGfbdXdCQoaAeVdJOCeNIZDgeP6ZnkomRA== + dependencies: + json-stringify-safe "^5.0.1" + +"@taquito/http-utils@^20.0.1": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@taquito/http-utils/-/http-utils-20.0.1.tgz#6b09fbdb2b888e97da8fca6b93a6a4d17b7e8be9" + integrity sha512-belYNmWoT49IF8o51gEB5je5Wz54+C7Q5hmvh7modl7fG0qE8VD1ulSH+WjuZsFTPJdNEAfCe0O50Vb5tNzw2w== dependencies: - "@vespaiach/axios-fetch-adapter" "github:ecadlabs/axios-fetch-adapter" - axios "^0.26.0" + "@taquito/core" "^20.0.1" + node-fetch "^2.7.0" -"@taquito/local-forging@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/local-forging/-/local-forging-15.1.0.tgz#11404d4b90d4b1f4f6e3f7aa591e8227bf08e246" - integrity sha512-ib/2RqtxQQC9SjyTB9T5OSc5yUx9GUSdMOA4dmtiiFcN2+AG+aw7ixn6Hjt9Td8ZIOPt9H6HkyTypKrX7+cENw== +"@taquito/local-forging@^20.0.1": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@taquito/local-forging/-/local-forging-20.0.1.tgz#927c8caf6ecc267c0727a34c5b78ea1664db2e94" + integrity sha512-+XYHnoAYXpOYA4WbUvUO86F6uoUh1anaNQGD544ySaonJW1ZgwhylrGvvTVjQfFSqqP3TRWn69EqINco+hX7gA== dependencies: - "@taquito/utils" "^15.1.0" - bignumber.js "^9.1.0" + "@taquito/core" "^20.0.1" + "@taquito/utils" "^20.0.1" + bignumber.js "^9.1.2" -"@taquito/michel-codec@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/michel-codec/-/michel-codec-15.1.0.tgz#b4452757ff02c40b110ec5ecafad1f659e1de4e3" - integrity sha512-wKucIhs7vhaq5H+YSF2f6Qu9+g+QiEL6MPc5ROpxBrXJTeKSwBOEIpfqcKfkfMuecJyHZJW3glNfkpAVTCgkxg== +"@taquito/michel-codec@^20.0.1": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@taquito/michel-codec/-/michel-codec-20.0.1.tgz#0cdd8cde97562c66fd8eb67235b74da61e25a895" + integrity sha512-TB6fJS4ArW4p1mqR28cjKbYs4cbLz/wnf8bHI/4ubxpiPcARZkja7r4U89D+Lb6Kn1Er+USPIMdbRTkP011e0w== + dependencies: + "@taquito/core" "^20.0.1" -"@taquito/michelson-encoder@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/michelson-encoder/-/michelson-encoder-15.1.0.tgz#1b3250445d4cc7e945e6a0ed9f8deaf209e62ada" - integrity sha512-uQMEu3g+8WcYb5ZV6+XGvoWJhKoNxU0F2RqodLJB7UxQ1rI/OMa+VlxSLMt4niIxpKXqnO9j4tD7Y4mPC3ufaA== +"@taquito/michelson-encoder@^20.0.1": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@taquito/michelson-encoder/-/michelson-encoder-20.0.1.tgz#dc24804da7b7f662b16b79e87e9568244bb6e2f2" + integrity sha512-YfMLpxDL/Qd9AlIfjlCsXYiE07ReZRAqvj+mI/Q8sPsKpqrkjvhyieNUQDLVqMDRcWLBWUSIqccr7UVRlQ/+BQ== dependencies: - "@taquito/rpc" "^15.1.0" - "@taquito/utils" "^15.1.0" - bignumber.js "^9.1.0" + "@taquito/core" "^20.0.1" + "@taquito/rpc" "^20.0.1" + "@taquito/utils" "^20.0.1" + bignumber.js "^9.1.2" fast-json-stable-stringify "^2.1.0" -"@taquito/rpc@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/rpc/-/rpc-15.1.0.tgz#47f973d1f7d15cb56a4095c7a2a4d1803c5181c7" - integrity sha512-OeQA8QwT+s6IUmLaF5yeWruPYzWi/DVCA3kl+AaQ8IFfCMzmAW/MszbbNkJSzHpY2p4jPBwdRNxg3qeJdL482A== +"@taquito/rpc@^20.0.1": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@taquito/rpc/-/rpc-20.0.1.tgz#0ed66ae887f3abd9f5d07052dbe88dc9dd390e40" + integrity sha512-Ec6fXoehjLpfILpVAHZ1NJz6cAaguEFs9McK2Ct4RRKmVhModgrVPAGXn17rb7fLXwOLP3MCzqSgFPToY7ZIFA== dependencies: - "@taquito/http-utils" "^15.1.0" - "@taquito/utils" "^15.1.0" - bignumber.js "^9.1.0" + "@taquito/core" "^20.0.1" + "@taquito/http-utils" "^20.0.1" + "@taquito/utils" "^20.0.1" + bignumber.js "^9.1.2" -"@taquito/signer@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/signer/-/signer-15.1.0.tgz#0cb7bc9612e7f5ffbefc274f0aa6da27f5d755fd" - integrity sha512-VP7hS8cYQ6cMerVkbD5X3AqpoIXvh72xNuv3++R4reEjdl+E3VWs1CZZGnJj6yzlFV21SrdGKSILx8Rl3Ql4DA== +"@taquito/signer@^20.0.1": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@taquito/signer/-/signer-20.0.1.tgz#f0b007e39ba170471b6b4406bc362691d2887505" + integrity sha512-/ROKpEINTnjewctMAKsYrcR7smi96Gvl4TxvjNqVt8Ee5Layh1zDzVWlCe/gWOD/eIzR1kIFfVUS59I7Q//paQ== dependencies: "@stablelib/blake2b" "^1.0.1" "@stablelib/ed25519" "^1.0.3" @@ -2450,44 +2469,47 @@ "@stablelib/nacl" "^1.0.4" "@stablelib/pbkdf2" "^1.0.1" "@stablelib/sha512" "^1.0.1" - "@taquito/taquito" "^15.1.0" - "@taquito/utils" "^15.1.0" - "@types/bn.js" "^5.1.1" - bip39 "^3.0.4" + "@taquito/core" "^20.0.1" + "@taquito/taquito" "^20.0.1" + "@taquito/utils" "^20.0.1" + "@types/bn.js" "^5.1.2" + bip39 "3.1.0" elliptic "^6.5.4" pbkdf2 "^3.1.2" typedarray-to-buffer "^4.0.0" -"@taquito/taquito@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/taquito/-/taquito-15.1.0.tgz#9a3340a8bcaa8bd6e9567776cea1c1659aafe5e9" - integrity sha512-2AXWeNoXsmMOSkJVXtXjOlJkS+hKXITaSybMA6nJuS1YWY4e7iAr678Y6UgVEHRJxeGohX4R4Ww12Ymr3Sfedg== - dependencies: - "@taquito/http-utils" "^15.1.0" - "@taquito/local-forging" "^15.1.0" - "@taquito/michel-codec" "^15.1.0" - "@taquito/michelson-encoder" "^15.1.0" - "@taquito/rpc" "^15.1.0" - "@taquito/utils" "^15.1.0" - bignumber.js "^9.1.0" - rxjs "^6.6.3" - -"@taquito/utils@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/utils/-/utils-15.1.0.tgz#c72f07c4fe369920620809a23808817db4b7a221" - integrity sha512-lqVThoFMmOKPg9jyREr4A63cpeckf5esCwOyOAW3sm+yCxD9s5khnBPtH8s52cRVnChFdwk/eqmADka9gat5hw== +"@taquito/taquito@^20.0.1": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@taquito/taquito/-/taquito-20.0.1.tgz#44759a93b0f3810574ef2adeae9b43fa2cc95ce2" + integrity sha512-BcRNWcUGOWfthFPgPf12U1ZIf1xSyy1ZS4xU5TciuxI395LnKTz6I3WfmMggsZzWxqEgi/Lj8GXjji7DCtaZRg== + dependencies: + "@taquito/core" "^20.0.1" + "@taquito/http-utils" "^20.0.1" + "@taquito/local-forging" "^20.0.1" + "@taquito/michel-codec" "^20.0.1" + "@taquito/michelson-encoder" "^20.0.1" + "@taquito/rpc" "^20.0.1" + "@taquito/utils" "^20.0.1" + bignumber.js "^9.1.2" + rxjs "^7.8.1" + +"@taquito/utils@^20.0.1": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@taquito/utils/-/utils-20.0.1.tgz#f5bafe3bd70b19465f4ff37bb7213dfe8093c500" + integrity sha512-aJaKukIW9thzU/WZ7p9ARRIDoXLQZ8TsB0brtbf48GqBFoGXDNAsDo72lkeTpehEcgYItSjdBuWEKH/lyTMr+w== dependencies: "@stablelib/blake2b" "^1.0.1" "@stablelib/ed25519" "^1.0.3" + "@taquito/core" "^20.0.1" "@types/bs58check" "^2.1.0" - bignumber.js "^9.1.0" + bignumber.js "^9.1.2" blakejs "^1.2.1" - bs58check "^2.1.2" + bs58check "^3.0.1" buffer "^6.0.3" elliptic "^6.5.4" typedarray-to-buffer "^4.0.0" -"@types/bn.js@^5.1.1": +"@types/bn.js@^5.1.1", "@types/bn.js@^5.1.2": version "5.1.5" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== @@ -2501,6 +2523,14 @@ dependencies: "@types/node" "*" +"@types/chrome@0.0.246": + version "0.0.246" + resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.246.tgz#412ee1b162a67d1cfebe413887b9aa0c28998ef1" + integrity sha512-MxGxEomGxsJiL9xe/7ZwVgwdn8XVKWbPvxpVQl3nWOjrS0Ce63JsfzxUc4aU3GvRcUPYsfufHmJ17BFyKxeA4g== + dependencies: + "@types/filesystem" "*" + "@types/har-format" "*" + "@types/connect@^3.4.33": version "3.4.38" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" @@ -2508,6 +2538,18 @@ dependencies: "@types/node" "*" +"@types/filesystem@*": + version "0.0.36" + resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.36.tgz#7227c2d76bfed1b21819db310816c7821d303857" + integrity sha512-vPDXOZuannb9FZdxgHnqSwAG/jvdGM8Wq+6N4D/d80z+D4HWH+bItqsZaVRQykAn6WEVeEkLm2oQigyHtgb0RA== + dependencies: + "@types/filewriter" "*" + +"@types/filewriter@*": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.33.tgz#d9d611db9d9cd99ae4e458de420eeb64ad604ea8" + integrity sha512-xFU8ZXTw4gd358lb2jw25nxY9QAgqn2+bKKjKOYfNCzN4DKCFetK7sPtrlpg66Ywe3vWY9FNxprZawAh9wfJ3g== + "@types/glob@^7.1.1": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -2516,6 +2558,11 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/har-format@*": + version "1.2.15" + resolved "https://registry.yarnpkg.com/@types/har-format/-/har-format-1.2.15.tgz#f352493638c2f89d706438a19a9eb300b493b506" + integrity sha512-RpQH4rXLuvTXKR0zqHq3go0RVXYv/YVqv4TnPH95VbwUxZdQlK1EtcMvQvMpDngHbt13Csh9Z4qT9AbkiQH5BA== + "@types/hast@^2.0.0": version "2.3.9" resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.9.tgz#a9a1b5bbce46e8a1312e977364bacabc8e93d2cf" @@ -2670,10 +2717,6 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@vespaiach/axios-fetch-adapter@github:ecadlabs/axios-fetch-adapter": - version "0.3.1" - resolved "https://codeload.github.com/ecadlabs/axios-fetch-adapter/tar.gz/167684f522e90343b9f3439d9a43ac571e2396f6" - "@walletconnect/auth-client@2.1.2": version "2.1.2" resolved "https://registry.yarnpkg.com/@walletconnect/auth-client/-/auth-client-2.1.2.tgz#cee304fb0cdca76f6bf4aafac96ef9301862a7e8" @@ -3263,7 +3306,7 @@ axe-core@=4.7.0: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.0.tgz#34ba5a48a8b564f67e103f0aa5768d76e15bbbbf" integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ== -axios@^0.26.0, axios@^0.26.1: +axios@^0.26.1: version "0.26.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== @@ -3303,6 +3346,11 @@ base-x@^3.0.2: dependencies: safe-buffer "^5.0.1" +base-x@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" + integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== + base-x@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/base-x/-/base-x-5.0.0.tgz#6d835ceae379130e1a4cb846a70ac4746f28ea9b" @@ -3335,7 +3383,7 @@ bignumber.js@9.0.1: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== -bignumber.js@^9.0.1, bignumber.js@^9.1.0: +bignumber.js@^9.0.1, bignumber.js@^9.1.2: version "9.1.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== @@ -3362,7 +3410,7 @@ bip39@3.0.2: pbkdf2 "^3.0.9" randombytes "^2.0.1" -bip39@^3.0.2, bip39@^3.0.4: +bip39@3.1.0, bip39@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.1.0.tgz#c55a418deaf48826a6ceb34ac55b3ee1577e18a3" integrity sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A== @@ -3457,14 +3505,20 @@ bs58@^4.0.0, bs58@^4.0.1: dependencies: base-x "^3.0.2" -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== +bs58@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" + integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ== dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" + base-x "^4.0.0" + +bs58check@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-3.0.1.tgz#2094d13720a28593de1cba1d8c4e48602fdd841c" + integrity sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ== + dependencies: + "@noble/hashes" "^1.2.0" + bs58 "^5.0.0" buffer-reverse@^1.0.1: version "1.0.1" @@ -6453,20 +6507,13 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@7.8.1, rxjs@^7.8.0: +rxjs@7.8.1, rxjs@^7.8.0, rxjs@^7.8.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== dependencies: tslib "^2.1.0" -rxjs@^6.6.3: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - safe-array-concat@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" @@ -6927,7 +6974,7 @@ tsconfig-paths@^3.14.1, tsconfig-paths@^3.14.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0: +tslib@1.14.1, tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==