diff --git a/package.json b/package.json index 3db9520..2164bd5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "root", "version": "0.1.0", "private": true, - "type": "module", "description": "", "homepage": "https://github.com/MetaMask/template-snap-monorepo#readme", "bugs": { @@ -14,6 +13,7 @@ }, "license": "(MIT-0 OR Apache-2.0)", "author": "", + "type": "module", "workspaces": [ "packages/*" ], diff --git a/packages/site/package.json b/packages/site/package.json index 5ec6dae..5ab82a4 100644 --- a/packages/site/package.json +++ b/packages/site/package.json @@ -1,44 +1,48 @@ { - "name": "site", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "prettier --check . && eslint .", - "format": "prettier --write .", - "allow-scripts": "yarn workspace root allow-scripts", - "start": "vite dev" - }, - "dependencies": { - "@metamask/providers": "^17.0.0" - }, - "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@metamask/eslint-config": "^12.2.0", - "@metamask/eslint-config-browser": "^12.1.0", - "@metamask/eslint-config-jest": "^12.1.0", - "@metamask/eslint-config-nodejs": "^12.1.0", - "@metamask/eslint-config-typescript": "^12.1.0", - "@sveltejs/adapter-auto": "^3.0.0", - "@sveltejs/kit": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "@types/eslint": "^8.56.7", - "eslint": "^9.0.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-svelte": "^2.36.0", - "globals": "^15.0.0", - "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", - "svelte": "^4.2.7", - "svelte-check": "^3.6.0", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "typescript-eslint": "^8.0.0-alpha.20", - "vite": "^5.0.3" - }, - "type": "module" + "name": "site", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --check . && eslint .", + "format": "prettier --write .", + "allow-scripts": "yarn workspace root allow-scripts", + "start": "vite dev" + }, + "dependencies": { + "@metamask/providers": "^17.0.0", + "@wharfkit/session": "next", + "@wharfkit/transact-plugin-resource-provider": "^1.1.1", + "@wharfkit/wallet-plugin-metamask": "next", + "@wharfkit/web-renderer": "next" + }, + "devDependencies": { + "@eslint/eslintrc": "^3.1.0", + "@metamask/eslint-config": "^12.2.0", + "@metamask/eslint-config-browser": "^12.1.0", + "@metamask/eslint-config-jest": "^12.1.0", + "@metamask/eslint-config-nodejs": "^12.1.0", + "@metamask/eslint-config-typescript": "^12.1.0", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/eslint": "^8.56.7", + "eslint": "^9.0.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-svelte": "^2.36.0", + "globals": "^15.0.0", + "prettier": "^3.1.1", + "prettier-plugin-svelte": "^3.1.2", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "typescript-eslint": "^8.0.0-alpha.20", + "vite": "^5.0.3" + }, + "type": "module" } diff --git a/packages/site/src/components/CreateAccount.svelte b/packages/site/src/components/CreateAccount.svelte index 8fe5d70..e5fa037 100644 --- a/packages/site/src/components/CreateAccount.svelte +++ b/packages/site/src/components/CreateAccount.svelte @@ -1,5 +1,6 @@ -

- Welcome to SvelteKit - {#if $accountName} - {$accountName} - {/if} -

Snaps detected: {$snapsDetected}

Is flask: {$isFlask}

Is metamask ready: {$isMetaMaskReady}

@@ -45,11 +94,18 @@

The snap will need to be re-installed after any changes to the code.

- - -

We disable the connection button when an account is already connected.

+{#if isSnapInstalled} + {#if $session} +

Connected account: {String($session.permissionLevel)}

+ + + {:else} + + {/if} - -
+
- + +{/if} diff --git a/packages/site/tsconfig.json b/packages/site/tsconfig.json index a7a5ae3..d35ace6 100644 --- a/packages/site/tsconfig.json +++ b/packages/site/tsconfig.json @@ -1,25 +1,25 @@ { - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "moduleResolution": "bundler", - "isolatedModules": true, - "references": [ - { - "path": "../snap" - } - ] - } - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias - // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler", + "isolatedModules": true, + "references": [ + { + "path": "../snap" + } + ] + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in } diff --git a/packages/snap/package.json b/packages/snap/package.json index 8e836a6..f37bec3 100644 --- a/packages/snap/package.json +++ b/packages/snap/package.json @@ -1,6 +1,6 @@ { - "name": "@greymass/eos-snap", - "version": "0.1.0", + "name": "@greymass/test-snap", + "version": "0.0.1", "description": "The 'Hello, world!' of MetaMask Snaps, now written in TypeScript.", "repository": { "type": "git", @@ -31,8 +31,6 @@ "@metamask/snaps-sdk": "^4.0.0", "@wharfkit/antelope": "^1.0.7", "@wharfkit/common": "^1.2.2", - "@wharfkit/session": "^1.3.1", - "@wharfkit/wallet-plugin-privatekey": "^1.1.0", "buffer": "^6.0.3" }, "devDependencies": { diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index 7a2c231..7f63089 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -1,5 +1,5 @@ { - "version": "0.1.0", + "version": "0.0.1", "description": "An example Snap written in TypeScript.", "proposedName": "TypeScript Example", "repository": { @@ -7,11 +7,11 @@ "url": "https://github.com/MetaMask/template-snap-monorepo.git" }, "source": { - "shasum": "8umaH6PfjEyYlBUhmvZMVC0qBkwbhIp7NFH4hSB1ERc=", + "shasum": "V1uGJrGwuqW6jk/9Qn0Lkg3aGyq+5EBTwQmIQs7t7Bs=", "location": { "npm": { "filePath": "dist/bundle.js", - "packageName": "@greymass/eos-snap", + "packageName": "@greymass/test-snap", "registry": "https://registry.npmjs.org/" } } @@ -28,6 +28,15 @@ "snap_getBip44Entropy": [ { "coinType": 194 + }, + { + "coinType": 235 + }, + { + "coinType": 977 + }, + { + "coinType": 14001 } ] }, diff --git a/packages/snap/src/index.ts b/packages/snap/src/index.ts index 5e5be6a..69f9a28 100644 --- a/packages/snap/src/index.ts +++ b/packages/snap/src/index.ts @@ -3,9 +3,8 @@ import { MethodNotFoundError, } from '@metamask/snaps-sdk'; -import { signTransaction, connectAccount, getConnectedAccount } from './rpc'; - -export * from './rpc-types'; +import { getPublicKey, signTransaction } from './rpc'; +import { AntelopeRequest, AntelopeSignatureRequest } from './types'; /** * Handle incoming JSON-RPC requests, sent through `wallet_invokeSnap`. @@ -18,15 +17,13 @@ export * from './rpc-types'; * @throws If the request method is not valid for this snap. */ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => { + console.log(request); switch (request.method) { - case 'eos_connectAccount': - return await connectAccount(); - - case 'eos_signTransaction': - return await signTransaction(); + case 'antelope_getPublicKey': + return await getPublicKey(request as AntelopeRequest); - case 'eos_getConnectedAccount': - return await getConnectedAccount(); + case 'antelope_signTransaction': + return String(await signTransaction(request as AntelopeSignatureRequest)); default: // eslint-disable-next-line @typescript-eslint/no-throw-literal diff --git a/packages/snap/src/lib/keyDeriver.ts b/packages/snap/src/lib/keyDeriver.ts index 7d2f674..800909a 100644 --- a/packages/snap/src/lib/keyDeriver.ts +++ b/packages/snap/src/lib/keyDeriver.ts @@ -1,17 +1,14 @@ import { getBIP44AddressKeyDeriver } from '@metamask/key-tree'; -import { Bytes, KeyType, PrivateKey } from '@wharfkit/antelope'; -import { Chains } from '@wharfkit/common'; - -// export const chain = Chains.EOS; -export const chain = Chains.Jungle4; +import { Bytes, KeyType, PrivateKey, PublicKey } from '@wharfkit/antelope'; +import { ChainDefinition } from '@wharfkit/common'; /** * Get the key deriver for the given coin type. * * @returns The key deriver. */ -async function getKeyDeriver() { +async function getKeyDeriver(chain: ChainDefinition) { if (!chain.coinType) { throw new Error('ChainDefinition does not contain coinType value.'); } @@ -31,8 +28,11 @@ async function getKeyDeriver() { * @returns The public key. * @throws If the key tree is not initialized. */ -export async function derivePublicKey(addressIndex = 0) { - return (await derivePrivateKey(addressIndex)).toPublic(); +export async function derivePublicKey( + chain: ChainDefinition, + addressIndex = 0, +): Promise { + return (await derivePrivateKey(chain, addressIndex)).toPublic(); } /** @@ -42,8 +42,11 @@ export async function derivePublicKey(addressIndex = 0) { * @returns The private key. * @throws If the key tree is not initialized. */ -export async function derivePrivateKey(addressIndex = 0) { - const keyDeriver = await getKeyDeriver(); +export async function derivePrivateKey( + chain: ChainDefinition, + addressIndex = 0, +): Promise { + const keyDeriver = await getKeyDeriver(chain); const derived = await keyDeriver(addressIndex); if (!derived.privateKeyBytes) { diff --git a/packages/snap/src/lib/manageState.ts b/packages/snap/src/lib/manageState.ts deleted file mode 100644 index 19223ea..0000000 --- a/packages/snap/src/lib/manageState.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { assert, type Json } from '@metamask/snaps-sdk'; - -export class StateManager { - public async get() { - const state = await snap.request({ - method: 'snap_manageState', - params: { operation: 'get' }, - }); - return state; - } - - public async getValue(key: string) { - const state = await this.get(); - assert(state, 'State not found'); - assert(state[key], `Key ${key} not found in state`); - return state[key]; - } - - public async set(obj: Record) { - const state = await this.get(); - await snap.request({ - method: 'snap_manageState', - params: { - operation: 'update', - newState: { ...state, ...obj }, - }, - }); - } - - public async clear() { - await snap.request({ - method: 'snap_manageState', - params: { operation: 'clear' }, - }); - } -} diff --git a/packages/snap/src/lib/mockTransfer.ts b/packages/snap/src/lib/mockTransfer.ts deleted file mode 100644 index 0109af3..0000000 --- a/packages/snap/src/lib/mockTransfer.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Action, Asset, Name, Struct, Transaction, TransactionHeader } from "@wharfkit/antelope" -import { Account } from "../models" - -class Transfer extends Struct { - static abiName = "transfer" - static abiFields = [ - { - name: "from", - type: Name, - }, - { - name: "to", - type: Name, - }, - { - name: "quantity", - type: Asset, - }, - { - name: "memo", - type: "string", - }, - ] -} - -export interface TransferParams { - from: string; - to: string; - quantity: string; - memo?: string; -} - -export function makeMockAction(account: Account, transferObject: TransferParams): Action { - // Generate typed data for action data - const transfer = Transfer.from(transferObject) - - // Assemble action with action data and metadata - const action = Action.from({ - authorization: [ - { - actor: account.name, - permission: account.permission, - }, - ], - account: 'eosio.token', - name: 'transfer', - data: transfer, - }) - - return action -} - -export function makeMockActions(account: Account, transferObject: TransferParams): Action[] { - return [makeMockAction(account, transferObject)] -} - -export function makeMockTransaction(account: Account, header: TransactionHeader, transferObject: TransferParams): Transaction { - // Generate array of actions - const actions = makeMockActions(account, transferObject) - // Form and return transaction object - const transaction = Transaction.from({ - ...header, - actions, - }) - return transaction -} diff --git a/packages/snap/src/models.ts b/packages/snap/src/models.ts deleted file mode 100644 index e541936..0000000 --- a/packages/snap/src/models.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class Account { - constructor( - public name: string, - public permission: string, - public publicKey: string, - ) {} -} diff --git a/packages/snap/src/rpc-types.ts b/packages/snap/src/rpc-types.ts deleted file mode 100644 index 9d8164e..0000000 --- a/packages/snap/src/rpc-types.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as rpcMethods from './rpc'; - -type RpcMethods = typeof rpcMethods; -type InferArgs = RpcMethods[M] extends ( - ...args: infer A -) => unknown - ? A[0] - : never; - -export type RpcMethodTypes = { - [Method in keyof RpcMethods]: { - input: InferArgs; - output: ReturnType; - }; -}; diff --git a/packages/snap/src/rpc.ts b/packages/snap/src/rpc.ts index 3dfd438..bcf5a10 100644 --- a/packages/snap/src/rpc.ts +++ b/packages/snap/src/rpc.ts @@ -1,90 +1,101 @@ -import { assert } from '@metamask/snaps-sdk'; - -import { Session } from '@wharfkit/session'; -import { WalletPluginPrivateKey } from '@wharfkit/wallet-plugin-privatekey'; - -import { chain, derivePrivateKey, derivePublicKey } from './lib/keyDeriver'; -import { ApiClient } from './api'; -import { StateManager } from './lib/manageState'; -import { makeMockTransaction } from './lib/mockTransfer'; +import { panel, heading, row, text } from '@metamask/snaps-sdk'; import { - alertNoAccountFound, - userConfirmedAccount, - userConfirmedTransaction, -} from './ui'; + ABI, + APIClient, + Checksum256Type, + Serializer, + Signature, + Transaction, +} from '@wharfkit/antelope'; +import { ChainDefinition, Chains, chainIdsToIndices } from '@wharfkit/common'; -export async function connectAccount() { - const publicKey = await derivePublicKey(); - console.log(publicKey); - const api = new ApiClient(chain.url); - const account = await api.fetchAccountByKey(publicKey); - console.log(JSON.stringify(account)); - console.log(JSON.stringify(chain)); +import { derivePrivateKey, derivePublicKey } from './lib/keyDeriver'; +import { AntelopeRequest, AntelopeSignatureRequest } from './types'; - if (account) { - const confirmed = await userConfirmedAccount(account.name); - if (!confirmed) return null; - const state = new StateManager(); - await state.set({ - account: JSON.stringify(account), - }); - return account.name; - } else { - await alertNoAccountFound(publicKey.toString()); - return null; +export function chainIdToDefinition(chainId: Checksum256Type): ChainDefinition { + const index = chainIdsToIndices.get(String(chainId)); + if (!index) { + throw new Error(`Unsupported chainId: ${chainId}`); } + return Chains[index]; +} + +export async function getPublicKey(request: AntelopeRequest): Promise { + if (!request.params?.chainId) { + throw new Error('Missing chainId in request params'); + } + const chain = chainIdToDefinition(request.params.chainId); + + return String(await derivePublicKey(chain)); } -// TODO: will need params -export async function signTransaction() { - console.log('signTransaction'); - const api = new ApiClient(chain.url); - const publicKey = await derivePublicKey(); - const account = await api.fetchAccountByKey(publicKey); +export async function signTransaction( + request: AntelopeSignatureRequest, +): Promise { + // Process incoming transaction + if (!request.params?.transaction) { + throw new Error('Missing transaction in request params'); + } + const transaction = Transaction.from(JSON.parse(request.params.transaction)); - assert(account, 'Account not found'); + // Load the appropriate chain definition + if (!request.params?.chainId) { + throw new Error('Missing chainId in request params'); + } + const chain = chainIdToDefinition(request.params.chainId); - // Will be replaced with actual transaction data from params - const memo = 'test'; - const transferObject = { - from: account.name, - to: 'teamgreymass', - quantity: '0.1337 EOS', - memo: memo || 'wharfkit is the best <3', - }; + // Determine the unique contracts used in this transaction + const contracts = Array.from( + new Set(transaction.actions.map((action) => String(action.account))), + ); - const header = await api.getTransactionHeader(); - const transaction = makeMockTransaction(account, header, transferObject); // TODO: will need params - console.log(JSON.stringify(transaction)); + // Establish APIClient instance based on chain + const client = new APIClient({ url: chain.url }); - const confirmed = await userConfirmedTransaction(transferObject); + // Load all ABIs required to decode actions + const abis: Record = {}; + for (const contract of contracts) { + const result = await client.v1.chain.get_abi(contract); + if (!result.account_name || !result.abi) { + throw new Error('Failed to load ABI'); + } + abis[result.account_name] = ABI.from(result.abi); + } + // Decode each action in the transaction and add to details + const details = transaction.actions.map((action, index) => { + const abi = abis[String(action.account)]; + if (!abi) { + throw new Error('Missing ABI for contract'); + } + const decoded = Serializer.decode({ + abi, + type: String(action.name), + data: action.data, + }); + const rows = Object.entries(decoded).map(([key, value]) => + row(key, text(String(value))), + ); + const header = heading( + `Action ${index + 1}: ${String(action.account)}::${String(action.name)}`, + ); + return panel([header, panel(rows)]); + }); + + // Request user confirmation of transaction details + const confirmed = await snap.request({ + method: 'snap_dialog', + params: { + type: 'confirmation', + content: panel([heading('Transaction details'), ...details]), + }, + }); + + // If confirmed, sign the transaction if (confirmed) { - const privateKey = await derivePrivateKey(); - console.log(privateKey); - assert(privateKey, 'Private key not found'); - const sessionArgs = { - chain: { - id: chain.id, - url: chain.url, - }, - actor: account.name, - permission: account.permission, - walletPlugin: new WalletPluginPrivateKey(privateKey), - }; - console.log(sessionArgs); - const session = new Session(sessionArgs); - console.log(JSON.stringify(session)); - const result = await session.transact(transaction); - console.log(JSON.stringify(result)); - return String(result); + const privateKey = await derivePrivateKey(chain); + return privateKey.signDigest(transaction.signingDigest(chain.id)); } - return null; -} -export async function getConnectedAccount() { - const state = new StateManager(); - const account = (await state.getValue('account')) as string; - if (!account) return null; - return account; + return undefined; } diff --git a/packages/snap/src/types.ts b/packages/snap/src/types.ts new file mode 100644 index 0000000..86a0773 --- /dev/null +++ b/packages/snap/src/types.ts @@ -0,0 +1,14 @@ +import { JsonRpcRequest } from '@metamask/snaps-sdk'; + +export interface AntelopeRequest extends JsonRpcRequest { + params?: { + chainId: string; + }; +} + +export interface AntelopeSignatureRequest extends JsonRpcRequest { + params?: { + chainId: string; + transaction: string; + }; +} diff --git a/packages/snap/src/ui/connectAccount.ts b/packages/snap/src/ui/connectAccount.ts deleted file mode 100644 index b2f284d..0000000 --- a/packages/snap/src/ui/connectAccount.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { - panel, - text, - heading, - copyable, -} from '@metamask/snaps-sdk'; - -export async function userConfirmedAccount(accountName: string) { - return await snap.request({ - method: 'snap_dialog', - params: { - type: 'confirmation', - content: panel([ - heading(`Account found: ${accountName}`), - text('Use this account'), - ]), - }, - }); -} - -export async function alertNoAccountFound(publicKey: string) { - await snap.request({ - method: 'snap_dialog', - params: { - type: 'alert', - content: panel([ - heading('No EOS account found'), - text( - 'Please create an account using the following public key then try connecting again', - ), - copyable(String(publicKey)), - ]), - }, - }); -} - diff --git a/packages/snap/src/ui/index.ts b/packages/snap/src/ui/index.ts deleted file mode 100644 index a808f73..0000000 --- a/packages/snap/src/ui/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './connectAccount' -export * from './signTransaction' diff --git a/packages/snap/src/ui/signTransaction.ts b/packages/snap/src/ui/signTransaction.ts deleted file mode 100644 index 2695bda..0000000 --- a/packages/snap/src/ui/signTransaction.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - panel, - text, - heading, - row, - assert, -} from '@metamask/snaps-sdk'; -import { Transaction } from '@wharfkit/antelope'; - -export async function userConfirmedTransaction(details: Record) { - - const detailsRows = Object.entries(details).map(([key, value]) => row(key, text(value))); - - return await snap.request({ - method: 'snap_dialog', - params: { - type: 'confirmation', - content: panel([ - heading(`Transaction`), - text('Confirm transaction details:'), - panel([ - ...detailsRows, - ]) - ]), - }, - }); -} - diff --git a/yarn.lock b/yarn.lock index 3f535d5..b2a2222 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1729,9 +1729,9 @@ __metadata: languageName: node linkType: hard -"@greymass/eos-snap@workspace:packages/snap": +"@greymass/test-snap@workspace:packages/snap": version: 0.0.0-use.local - resolution: "@greymass/eos-snap@workspace:packages/snap" + resolution: "@greymass/test-snap@workspace:packages/snap" dependencies: "@jest/globals": ^29.5.0 "@metamask/auto-changelog": ^3.4.4 @@ -1747,8 +1747,6 @@ __metadata: "@typescript-eslint/parser": ^5.42.1 "@wharfkit/antelope": ^1.0.7 "@wharfkit/common": ^1.2.2 - "@wharfkit/session": ^1.3.1 - "@wharfkit/wallet-plugin-privatekey": ^1.1.0 buffer: ^6.0.3 eslint: ^8.45.0 eslint-config-prettier: ^8.5.0 @@ -4132,9 +4130,9 @@ __metadata: languageName: node linkType: hard -"@wharfkit/session@npm:^1.3.1": - version: 1.3.1 - resolution: "@wharfkit/session@npm:1.3.1" +"@wharfkit/session@npm:next": + version: 1.4.0-rc3 + resolution: "@wharfkit/session@npm:1.4.0-rc3" dependencies: "@wharfkit/abicache": ^1.2.1 "@wharfkit/account": ^1.0.0 @@ -4143,7 +4141,7 @@ __metadata: "@wharfkit/signing-request": ^3.1.0 pako: ^2.0.4 tslib: ^2.1.0 - checksum: 18df1af3d743f55d64d1af4b5c22361df66e4531273606accfd41dbae6c76648ab77cf2256a2ef802202485bacd288e662938c4f2bbd133732a03fcce9569c49 + checksum: b7372ea56a13f07d03bdc8707108227c52aa67e7548d62bc0cf9eb01b4510cac7d9ecca1b0c188956b0efd5dc6e3d5b5641c9a99d63b08d743bd8bf32fca309d languageName: node linkType: hard @@ -4169,14 +4167,35 @@ __metadata: languageName: node linkType: hard -"@wharfkit/wallet-plugin-privatekey@npm:^1.1.0": - version: 1.1.0 - resolution: "@wharfkit/wallet-plugin-privatekey@npm:1.1.0" +"@wharfkit/transact-plugin-resource-provider@npm:^1.1.1": + version: 1.1.1 + resolution: "@wharfkit/transact-plugin-resource-provider@npm:1.1.1" dependencies: tslib: ^2.1.0 peerDependencies: "@wharfkit/session": ^1.1.0 - checksum: cfdbb286dfbb160428b9333d557522feca09cc026844a419ce1975a17302c7256df63fcaa80a245ce37e2ae02c678310e2cbfbece5b4ab31f4a24603ae65b7eb + checksum: 30132579931e8743deca277170373c15a476de2d7560f981747504cf77908f24bd9bf839fcaa5e4d2a63509ce536193662d9478ad7b7dee095ea600383f59d6f + languageName: node + linkType: hard + +"@wharfkit/wallet-plugin-metamask@npm:next": + version: 1.0.0-rc3 + resolution: "@wharfkit/wallet-plugin-metamask@npm:1.0.0-rc3" + dependencies: + "@metamask/providers": ^17.0.0 + tslib: ^2.1.0 + peerDependencies: + "@wharfkit/session": ^1.1.0 + checksum: 21196847c16d05e469a01a3e2cd8951a6c2da749d269c70676a11dd5b1ce10aa108f8672fa18769193e8b05b3f85ffc33fd864430d8c52fb4df439c4afbcd47c + languageName: node + linkType: hard + +"@wharfkit/web-renderer@npm:next": + version: 1.4.0-rc4 + resolution: "@wharfkit/web-renderer@npm:1.4.0-rc4" + peerDependencies: + "@wharfkit/session": ^1.0.1 + checksum: a52e06cfa83045e5a7941f7e081d51a12f666c4d13af324d107160e9f2d2fff0222d2e2d3ece300a0a832a6ef6d66469fe0d663ade40125a12ed0e9797bb8a7b languageName: node linkType: hard @@ -11198,6 +11217,10 @@ __metadata: "@sveltejs/kit": ^2.0.0 "@sveltejs/vite-plugin-svelte": ^3.0.0 "@types/eslint": ^8.56.7 + "@wharfkit/session": next + "@wharfkit/transact-plugin-resource-provider": ^1.1.1 + "@wharfkit/wallet-plugin-metamask": next + "@wharfkit/web-renderer": next eslint: ^9.0.0 eslint-config-prettier: ^9.1.0 eslint-plugin-svelte: ^2.36.0