@marigoldlabs/web3-tester 0.1.2 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +26 -17
- package/LICENSE +21 -0
- package/README.md +480 -48
- package/dist/anvil.d.ts +90 -2
- package/dist/anvil.d.ts.map +1 -1
- package/dist/anvil.js +215 -13
- package/dist/anvil.js.map +1 -1
- package/dist/benchmark.d.ts +55 -0
- package/dist/benchmark.d.ts.map +1 -0
- package/dist/benchmark.js +168 -0
- package/dist/benchmark.js.map +1 -0
- package/dist/contracts/test-erc20.d.ts +227 -0
- package/dist/contracts/test-erc20.d.ts.map +1 -0
- package/dist/contracts/test-erc20.js +8 -0
- package/dist/contracts/test-erc20.js.map +1 -0
- package/dist/erc20.d.ts +38 -0
- package/dist/erc20.d.ts.map +1 -0
- package/dist/erc20.js +229 -0
- package/dist/erc20.js.map +1 -0
- package/dist/fixtures.d.ts +44 -2
- package/dist/fixtures.d.ts.map +1 -1
- package/dist/fixtures.js +162 -17
- package/dist/fixtures.js.map +1 -1
- package/dist/index.d.ts +26 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/injected-provider.d.ts.map +1 -1
- package/dist/injected-provider.js +863 -77
- package/dist/injected-provider.js.map +1 -1
- package/dist/live-fixtures.d.ts +32 -3
- package/dist/live-fixtures.d.ts.map +1 -1
- package/dist/live-fixtures.js +64 -27
- package/dist/live-fixtures.js.map +1 -1
- package/dist/matchers.d.ts +90 -0
- package/dist/matchers.d.ts.map +1 -0
- package/dist/matchers.js +268 -0
- package/dist/matchers.js.map +1 -0
- package/dist/metamask-extension.d.ts +34 -0
- package/dist/metamask-extension.d.ts.map +1 -0
- package/dist/metamask-extension.js +97 -0
- package/dist/metamask-extension.js.map +1 -0
- package/dist/mock-wallet-controller.d.ts +354 -4
- package/dist/mock-wallet-controller.d.ts.map +1 -1
- package/dist/mock-wallet-controller.js +1444 -58
- package/dist/mock-wallet-controller.js.map +1 -1
- package/dist/private-key-rpc-client.d.ts +1744 -2
- package/dist/private-key-rpc-client.d.ts.map +1 -1
- package/dist/private-key-rpc-client.js +245 -30
- package/dist/private-key-rpc-client.js.map +1 -1
- package/dist/real-wallet-cache.d.ts +103 -0
- package/dist/real-wallet-cache.d.ts.map +1 -0
- package/dist/real-wallet-cache.js +331 -0
- package/dist/real-wallet-cache.js.map +1 -0
- package/dist/real-wallet-extension-fixtures.d.ts +35 -0
- package/dist/real-wallet-extension-fixtures.d.ts.map +1 -0
- package/dist/real-wallet-extension-fixtures.js +96 -0
- package/dist/real-wallet-extension-fixtures.js.map +1 -0
- package/dist/real-wallet-extension.d.ts +86 -0
- package/dist/real-wallet-extension.d.ts.map +1 -0
- package/dist/real-wallet-extension.js +245 -0
- package/dist/real-wallet-extension.js.map +1 -0
- package/dist/real-wallet-fixtures.d.ts +52 -0
- package/dist/real-wallet-fixtures.d.ts.map +1 -0
- package/dist/real-wallet-fixtures.js +88 -0
- package/dist/real-wallet-fixtures.js.map +1 -0
- package/dist/real-wallet.d.ts +119 -19
- package/dist/real-wallet.d.ts.map +1 -1
- package/dist/real-wallet.js +1656 -144
- package/dist/real-wallet.js.map +1 -1
- package/dist/safe.d.ts +311 -0
- package/dist/safe.d.ts.map +1 -0
- package/dist/safe.js +743 -0
- package/dist/safe.js.map +1 -0
- package/dist/transactions.d.ts +118 -0
- package/dist/transactions.d.ts.map +1 -0
- package/dist/transactions.js +207 -0
- package/dist/transactions.js.map +1 -0
- package/dist/types.d.ts +36 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/wallet-personas.d.ts +99 -0
- package/dist/wallet-personas.d.ts.map +1 -0
- package/dist/wallet-personas.js +666 -0
- package/dist/wallet-personas.js.map +1 -0
- package/dist/walletconnect.d.ts +373 -0
- package/dist/walletconnect.d.ts.map +1 -0
- package/dist/walletconnect.js +799 -0
- package/dist/walletconnect.js.map +1 -0
- package/examples/live-sepolia.spec.ts +20 -1
- package/examples/playwright.config.ts +8 -0
- package/package.json +90 -8
- package/docs/API.md +0 -223
- package/docs/ARCHITECTURE.md +0 -81
- package/docs/CONSUMING_FROM_FJORD.md +0 -123
- package/docs/FJORD_LIVE_QA.md +0 -87
- package/docs/RELEASE_CHECKLIST.md +0 -55
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { once } from 'node:events';
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import os from 'node:os';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
/**
|
|
8
|
+
* The MetaMask build the adapter's selectors are maintained against. Bump
|
|
9
|
+
* deliberately and re-run the real-wallet smoke suite when changing it
|
|
10
|
+
* (`npm run smoke:real-wallet`).
|
|
11
|
+
*
|
|
12
|
+
* The adapter drives one UI generation per launch as explicit configuration
|
|
13
|
+
* (derived from the extension manifest, overridable via the `generation`
|
|
14
|
+
* option): 13.x (the "multichain" UI) is validated end to end and gates
|
|
15
|
+
* releases; the last 12.x line stays supported on a best-effort cadence. Set
|
|
16
|
+
* WEB3_TESTER_METAMASK_VERSION=12.23.1 to drive the older generation.
|
|
17
|
+
*/
|
|
18
|
+
export const DEFAULT_METAMASK_VERSION = '13.34.1';
|
|
19
|
+
export const defaultExtensionCacheDir = () => path.join(os.homedir(), '.cache', 'web3-tester', 'metamask');
|
|
20
|
+
const releaseUrl = (version) => `https://github.com/MetaMask/metamask-extension/releases/download/v${version}/metamask-chrome-${version}.zip`;
|
|
21
|
+
const unzip = async (zipPath, destination) => {
|
|
22
|
+
const [command, args] = process.platform === 'win32'
|
|
23
|
+
? [
|
|
24
|
+
'powershell.exe',
|
|
25
|
+
['-NoProfile', '-Command', `Expand-Archive -LiteralPath '${zipPath}' -DestinationPath '${destination}' -Force`],
|
|
26
|
+
]
|
|
27
|
+
: ['unzip', ['-o', '-q', zipPath, '-d', destination]];
|
|
28
|
+
const child = spawn(command, args, { stdio: ['ignore', 'ignore', 'pipe'] });
|
|
29
|
+
let stderr = '';
|
|
30
|
+
child.stderr.on('data', (chunk) => {
|
|
31
|
+
stderr += chunk.toString();
|
|
32
|
+
});
|
|
33
|
+
const [code] = (await once(child, 'exit'));
|
|
34
|
+
if (code !== 0) {
|
|
35
|
+
throw new Error(`Failed to unzip MetaMask extension (${command} exited with ${code}).\n${stderr}`);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Downloads and unpacks a pinned MetaMask release into a local cache and
|
|
40
|
+
* returns the unpacked extension directory, suitable for
|
|
41
|
+
* launchRealWallet({ extensionPath }). Subsequent calls hit the cache.
|
|
42
|
+
*/
|
|
43
|
+
export async function prepareMetaMaskExtension(options = {}) {
|
|
44
|
+
// `||` (not `??`): an empty env var (e.g. a workflow_dispatch input left
|
|
45
|
+
// blank) must fall through to the pinned default, not become version "".
|
|
46
|
+
const version = options.version || process.env.WEB3_TESTER_METAMASK_VERSION || DEFAULT_METAMASK_VERSION;
|
|
47
|
+
const cacheDir = options.cacheDir ?? defaultExtensionCacheDir();
|
|
48
|
+
const destination = path.join(cacheDir, `metamask-chrome-${version}`);
|
|
49
|
+
const manifestPath = path.join(destination, 'manifest.json');
|
|
50
|
+
if (!options.force && fs.existsSync(manifestPath)) {
|
|
51
|
+
return destination;
|
|
52
|
+
}
|
|
53
|
+
const url = options.downloadUrl ?? releaseUrl(version);
|
|
54
|
+
const response = await fetch(url);
|
|
55
|
+
if (!response.ok) {
|
|
56
|
+
throw new Error(`Failed to download MetaMask ${version} from ${url}: HTTP ${response.status}. ` +
|
|
57
|
+
`Check the version exists (https://github.com/MetaMask/metamask-extension/releases) ` +
|
|
58
|
+
`or set WEB3_TESTER_METAMASK_VERSION / options.version.`);
|
|
59
|
+
}
|
|
60
|
+
const zipBytes = Buffer.from(await response.arrayBuffer());
|
|
61
|
+
if (options.sha256) {
|
|
62
|
+
const actual = createHash('sha256').update(zipBytes).digest('hex');
|
|
63
|
+
if (actual !== options.sha256.toLowerCase()) {
|
|
64
|
+
throw new Error(`MetaMask ${version} download failed integrity check: expected sha256 ${options.sha256}, got ${actual}.`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
fs.mkdirSync(cacheDir, { recursive: true });
|
|
68
|
+
const zipPath = path.join(cacheDir, `metamask-chrome-${version}.zip`);
|
|
69
|
+
fs.writeFileSync(zipPath, zipBytes);
|
|
70
|
+
// Extract into a staging directory and rename so a partially extracted
|
|
71
|
+
// cache entry can never be mistaken for a complete one.
|
|
72
|
+
const staging = `${destination}.tmp-${process.pid}`;
|
|
73
|
+
fs.rmSync(staging, { recursive: true, force: true });
|
|
74
|
+
try {
|
|
75
|
+
await unzip(zipPath, staging);
|
|
76
|
+
if (!fs.existsSync(path.join(staging, 'manifest.json'))) {
|
|
77
|
+
throw new Error(`MetaMask zip for ${version} did not contain a manifest.json at its root.`);
|
|
78
|
+
}
|
|
79
|
+
fs.rmSync(destination, { recursive: true, force: true });
|
|
80
|
+
fs.renameSync(staging, destination);
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
fs.rmSync(staging, { recursive: true, force: true });
|
|
84
|
+
fs.rmSync(zipPath, { force: true });
|
|
85
|
+
}
|
|
86
|
+
return destination;
|
|
87
|
+
}
|
|
88
|
+
/** Reads the version field of an unpacked extension's manifest.json. */
|
|
89
|
+
export function extensionManifestVersion(extensionPath) {
|
|
90
|
+
const manifestPath = path.join(extensionPath, 'manifest.json');
|
|
91
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
92
|
+
if (!manifest.version) {
|
|
93
|
+
throw new Error(`No version field in ${manifestPath}.`);
|
|
94
|
+
}
|
|
95
|
+
return manifest.version;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=metamask-extension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metamask-extension.js","sourceRoot":"","sources":["../src/metamask-extension.ts"],"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AK,EAAE,IAAI,EAAE,CAAC,CAAC;QACzD,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACtC,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACrD,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,wBAAwB,CAAC,aAAqB;IAC5D,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAyB,CAAC;IAC3F,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,uBAAuB,YAAY,GAAG,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC1B,CAAC"}
|
|
@@ -1,17 +1,219 @@
|
|
|
1
1
|
import type { Page } from '@playwright/test';
|
|
2
2
|
import { type Address, type Hex } from 'viem';
|
|
3
|
-
import type { RpcClient, WalletProviderInfo } from './types.js';
|
|
3
|
+
import type { JsonRpcRequest, RpcClient, WalletProviderIdentity, WalletProviderInfo } from './types.js';
|
|
4
|
+
import { type WalletPersonaInput } from './wallet-personas.js';
|
|
4
5
|
export type RejectionRule = {
|
|
5
6
|
methods?: readonly string[];
|
|
6
7
|
message?: string;
|
|
7
8
|
};
|
|
9
|
+
export type HeldRequest = {
|
|
10
|
+
method: string;
|
|
11
|
+
params: readonly unknown[];
|
|
12
|
+
approve: () => void;
|
|
13
|
+
reject: (message?: string) => void;
|
|
14
|
+
};
|
|
15
|
+
export type SentTransactionRecord = {
|
|
16
|
+
hash: Hex;
|
|
17
|
+
/** The wallet's active chain when the transaction was sent. */
|
|
18
|
+
chainId: Hex;
|
|
19
|
+
from?: Address;
|
|
20
|
+
to?: Hex;
|
|
21
|
+
data?: Hex;
|
|
22
|
+
value?: string;
|
|
23
|
+
};
|
|
24
|
+
export type WatchedAssetRecord = {
|
|
25
|
+
/** The wallet's active chain when the asset prompt was accepted. */
|
|
26
|
+
chainId: Hex;
|
|
27
|
+
/** EIP-747 asset type, usually ERC20. */
|
|
28
|
+
type?: string;
|
|
29
|
+
/** Wallet-visible asset options passed by the dapp. */
|
|
30
|
+
options?: Record<string, unknown>;
|
|
31
|
+
/** Original wallet_watchAsset request object passed by the dapp. */
|
|
32
|
+
request: unknown;
|
|
33
|
+
};
|
|
34
|
+
/** A chain backend: any RpcClient, or an http(s) RPC URL string. */
|
|
35
|
+
export type ChainBackend = RpcClient | string;
|
|
36
|
+
export type AtomicCapabilityStatus = 'supported' | 'ready' | 'unsupported';
|
|
37
|
+
export type Eip5792Options = {
|
|
38
|
+
/** Master switch. false = legacy wallet: all four methods throw 4200. Default: true. */
|
|
39
|
+
enabled?: boolean;
|
|
40
|
+
/** Atomic capability advertised for backed chains. Default: 'supported'. */
|
|
41
|
+
atomic?: AtomicCapabilityStatus;
|
|
42
|
+
/** Extra/override capability objects merged per chain ('0x0' = cross-chain per spec). */
|
|
43
|
+
capabilities?: Record<Hex, Record<string, unknown>>;
|
|
44
|
+
/** Batches with more calls throw 5740. Default: 100. */
|
|
45
|
+
maxCallsPerBatch?: number;
|
|
46
|
+
};
|
|
47
|
+
export type HardwareWalletDeviceState = 'ready' | 'locked' | 'wrong-app' | 'blind-signing-disabled' | 'disconnected';
|
|
48
|
+
export type HardwareWalletSimulationOptions = {
|
|
49
|
+
/**
|
|
50
|
+
* Enables deterministic hardware-wallet behavior. Passing an options object
|
|
51
|
+
* enables it unless `enabled: false` is set.
|
|
52
|
+
*/
|
|
53
|
+
enabled?: boolean;
|
|
54
|
+
/** Delay after user approval while the request waits for device confirmation. */
|
|
55
|
+
approvalDelayMs?: number;
|
|
56
|
+
/** Device state to emulate. Non-ready states reject matching requests. */
|
|
57
|
+
deviceState?: HardwareWalletDeviceState;
|
|
58
|
+
/** Methods that require hardware confirmation. Defaults to signing/spend methods. */
|
|
59
|
+
methods?: readonly string[];
|
|
60
|
+
/**
|
|
61
|
+
* App name shown when `deviceState` is `wrong-app`. Defaults to the app
|
|
62
|
+
* inferred from the method, currently Ethereum for EVM methods and Solana
|
|
63
|
+
* for `solana_*` methods.
|
|
64
|
+
*/
|
|
65
|
+
requiredApp?: string;
|
|
66
|
+
/** Method-specific app names for `wrong-app` errors. Overrides `requiredApp`. */
|
|
67
|
+
requiredApps?: Record<string, string>;
|
|
68
|
+
};
|
|
69
|
+
export type CoinbaseSpendPermission = {
|
|
70
|
+
account: Address;
|
|
71
|
+
spender: Address;
|
|
72
|
+
token: Address;
|
|
73
|
+
allowance: string;
|
|
74
|
+
period: number;
|
|
75
|
+
start: number;
|
|
76
|
+
end: number;
|
|
77
|
+
salt: string;
|
|
78
|
+
extraData: Hex;
|
|
79
|
+
};
|
|
80
|
+
export type CoinbasePermission = {
|
|
81
|
+
createdAt: number;
|
|
82
|
+
permissionHash: Hex;
|
|
83
|
+
signature: Hex;
|
|
84
|
+
spendPermission: CoinbaseSpendPermission;
|
|
85
|
+
/** Filtering metadata; omitted from RPC responses. Defaults to the active chain. */
|
|
86
|
+
chainId?: number | Hex | string;
|
|
87
|
+
};
|
|
88
|
+
export type CoinbaseSubAccount = {
|
|
89
|
+
address: Address;
|
|
90
|
+
factory?: Address;
|
|
91
|
+
factoryData?: Hex;
|
|
92
|
+
/** Filtering/return metadata. Defaults to the active chain. */
|
|
93
|
+
chainId?: number | Hex | string;
|
|
94
|
+
/** Optional owner account filter for wallet_getSubAccounts. */
|
|
95
|
+
account?: Address;
|
|
96
|
+
/** Optional dapp-domain filter for wallet_getSubAccounts. */
|
|
97
|
+
domain?: string;
|
|
98
|
+
};
|
|
99
|
+
export type CoinbaseWalletSimulationOptions = {
|
|
100
|
+
/**
|
|
101
|
+
* Enables Coinbase/Base Account RPC methods. Defaults to true when any
|
|
102
|
+
* configured persona has isCoinbaseWallet.
|
|
103
|
+
*/
|
|
104
|
+
enabled?: boolean;
|
|
105
|
+
/** Seed spend permissions returned by coinbase_fetchPermission(s). */
|
|
106
|
+
permissions?: readonly CoinbasePermission[];
|
|
107
|
+
/** Seed sub-accounts returned by wallet_getSubAccounts. */
|
|
108
|
+
subAccounts?: readonly CoinbaseSubAccount[];
|
|
109
|
+
/** Default factory attached to generated sub-accounts. */
|
|
110
|
+
factory?: Address;
|
|
111
|
+
/** Default factoryData attached to generated sub-accounts. */
|
|
112
|
+
factoryData?: Hex;
|
|
113
|
+
};
|
|
114
|
+
export type CallsBatchRecord = {
|
|
115
|
+
id: Hex;
|
|
116
|
+
chainId: Hex;
|
|
117
|
+
from: Address;
|
|
118
|
+
version: '2.0.0';
|
|
119
|
+
/** Execution mode actually used (the spec requires it to reflect reality). */
|
|
120
|
+
atomic: boolean;
|
|
121
|
+
/** What the dapp requested. */
|
|
122
|
+
atomicRequired: boolean;
|
|
123
|
+
capabilities?: Record<string, unknown>;
|
|
124
|
+
calls: readonly {
|
|
125
|
+
to?: Hex;
|
|
126
|
+
data?: Hex;
|
|
127
|
+
value?: Hex;
|
|
128
|
+
}[];
|
|
129
|
+
/** Submitted hashes in call order (rolled-back hashes included). */
|
|
130
|
+
txHashes: readonly Hex[];
|
|
131
|
+
/**
|
|
132
|
+
* 'atomic-rollback': something landed and everything was reverted (500).
|
|
133
|
+
* 'nothing-landed': no call made it onchain (400). Otherwise the status is
|
|
134
|
+
* computed from receipts.
|
|
135
|
+
*/
|
|
136
|
+
failure?: 'atomic-rollback' | 'nothing-landed';
|
|
137
|
+
};
|
|
138
|
+
export type HttpRpcClientOptions = {
|
|
139
|
+
/** Request timeout in ms. Defaults to viem's transport default (10s). */
|
|
140
|
+
timeout?: number;
|
|
141
|
+
/** Retry count. Defaults to 0 so dead endpoints fail deterministically. */
|
|
142
|
+
retryCount?: number;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Adapter: EIP-1193 RpcClient over a plain JSON-RPC URL (viem http
|
|
146
|
+
* transport). URL-backed chains serve reads, eth_sendRawTransaction, and
|
|
147
|
+
* dapp-side flows; node-side signing (personal_sign, eth_sendTransaction)
|
|
148
|
+
* needs a node that signs — back those chains with Anvil or a
|
|
149
|
+
* PrivateKeyRpcClient instead.
|
|
150
|
+
*/
|
|
151
|
+
export declare function httpRpcClient(url: string, options?: HttpRpcClientOptions): RpcClient;
|
|
8
152
|
export type MockWalletControllerOptions = {
|
|
9
153
|
accounts: readonly Address[];
|
|
10
154
|
chainId: number | Hex;
|
|
155
|
+
/**
|
|
156
|
+
* Additional chains the wallet can switch to, keyed by chain id (number or
|
|
157
|
+
* 0x-hex). The constructor's rpcClient remains the backend for `chainId`;
|
|
158
|
+
* listing `chainId` here too is a construction error. Forwarded calls
|
|
159
|
+
* route to the active chain's backend; a known-but-unbacked chain throws
|
|
160
|
+
* 4901 (EIP-1193 "Chain Disconnected").
|
|
161
|
+
*/
|
|
162
|
+
chains?: Readonly<Record<number | Hex, ChainBackend>>;
|
|
163
|
+
/**
|
|
164
|
+
* Honor dapp-supplied rpcUrls[0] in wallet_addEthereumChain: the URL is
|
|
165
|
+
* probed (its eth_chainId must match, per EIP-3085) and registered as the
|
|
166
|
+
* chain's backend. Default false: the chain id is registered (so the
|
|
167
|
+
* 4902 -> add -> switch flow completes) but forwarded calls on it throw
|
|
168
|
+
* 4901 until a backend is registered via `chains` or addChain(). Never
|
|
169
|
+
* enable this for wallets fronting a real key.
|
|
170
|
+
*/
|
|
171
|
+
trustDappRpcUrls?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* EIP-5792 support (wallet_getCapabilities/sendCalls/getCallsStatus/
|
|
174
|
+
* showCallsStatus). Enabled by default, like 2026 MetaMask; pass false for
|
|
175
|
+
* a legacy wallet that answers 4200.
|
|
176
|
+
*/
|
|
177
|
+
eip5792?: boolean | Eip5792Options;
|
|
178
|
+
/** Primary wallet identity, including EIP-6963 metadata, provider flags, and global aliases. */
|
|
179
|
+
persona?: WalletPersonaInput;
|
|
180
|
+
/** Additional announced wallet identities. */
|
|
181
|
+
additionalPersonas?: readonly WalletPersonaInput[];
|
|
182
|
+
/**
|
|
183
|
+
* Deterministic Ledger/Trezor-style approval simulation. `true` enables
|
|
184
|
+
* the default ready device with a confirmation delay; an options object can
|
|
185
|
+
* model locked, wrong-app, blind-signing-disabled, and disconnected states.
|
|
186
|
+
*/
|
|
187
|
+
hardwareWallet?: boolean | HardwareWalletSimulationOptions;
|
|
188
|
+
/**
|
|
189
|
+
* Coinbase/Base Account RPC simulation. Auto-enabled for Coinbase personas;
|
|
190
|
+
* pass false to make coinbase_* and Coinbase wallet_* methods unsupported.
|
|
191
|
+
*/
|
|
192
|
+
coinbase?: boolean | CoinbaseWalletSimulationOptions;
|
|
193
|
+
/**
|
|
194
|
+
* Legacy shortcut for overriding primary EIP-6963 metadata. Prefer
|
|
195
|
+
* `persona` for wallet flags and aliases.
|
|
196
|
+
*/
|
|
11
197
|
providerInfo?: Partial<WalletProviderInfo>;
|
|
198
|
+
/**
|
|
199
|
+
* Legacy shortcut for extra EIP-6963-only providers. Prefer
|
|
200
|
+
* `additionalPersonas` for wallet flags and aliases.
|
|
201
|
+
*/
|
|
12
202
|
additionalProviders?: readonly Partial<WalletProviderInfo>[];
|
|
13
203
|
autoApprove?: boolean;
|
|
14
204
|
connected?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Software wallet lock state exposed through `_metamask.isUnlocked()` and
|
|
207
|
+
* `metamask_getProviderState`. Locked wallets keep chain connectivity but
|
|
208
|
+
* hide accounts and reject approval-gated account/sign/spend requests.
|
|
209
|
+
*/
|
|
210
|
+
unlocked?: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* When set, only frames whose origin matches an entry (URL or origin
|
|
213
|
+
* string) can reach the wallet; everything else gets a 4100 error. Leave
|
|
214
|
+
* unset to serve every frame, like a real extension.
|
|
215
|
+
*/
|
|
216
|
+
allowedOrigins?: readonly string[];
|
|
15
217
|
};
|
|
16
218
|
export declare class MockWalletController {
|
|
17
219
|
private readonly page;
|
|
@@ -19,23 +221,171 @@ export declare class MockWalletController {
|
|
|
19
221
|
private accounts;
|
|
20
222
|
private chainId;
|
|
21
223
|
private connected;
|
|
224
|
+
private unlocked;
|
|
22
225
|
private approveRequests;
|
|
226
|
+
private hardwareWallet;
|
|
227
|
+
private coinbase;
|
|
23
228
|
private rejectionQueue;
|
|
229
|
+
private holdQueue;
|
|
230
|
+
private approvalQueue;
|
|
231
|
+
private readonly knownChainIds;
|
|
232
|
+
private readonly chainBackends;
|
|
233
|
+
private readonly trustDappRpcUrls;
|
|
234
|
+
private readonly allowedOrigins?;
|
|
235
|
+
private readonly providerEventListeners;
|
|
236
|
+
private sendQueue;
|
|
237
|
+
private nodeAccountsCache?;
|
|
238
|
+
private readonly eip5792;
|
|
239
|
+
private atomicStatus;
|
|
240
|
+
private upgradeRejectionArmed;
|
|
241
|
+
private readonly callBatches;
|
|
242
|
+
/** Every accepted wallet_sendCalls batch, for test assertions. */
|
|
243
|
+
readonly sentCallBatches: CallsBatchRecord[];
|
|
244
|
+
/** Ids the page passed to wallet_showCallsStatus (a headless no-op). */
|
|
245
|
+
readonly shownCallsStatusIds: Hex[];
|
|
246
|
+
readonly sentTransactions: Hex[];
|
|
247
|
+
readonly sentTransactionRequests: SentTransactionRecord[];
|
|
248
|
+
readonly watchedAssets: WatchedAssetRecord[];
|
|
24
249
|
constructor(page: Page, rpcClient: RpcClient, options: MockWalletControllerOptions);
|
|
25
250
|
readonly providerInfo: WalletProviderInfo;
|
|
26
|
-
readonly providerInfos: readonly
|
|
251
|
+
readonly providerInfos: readonly WalletProviderIdentity[];
|
|
27
252
|
get primaryAccount(): Address;
|
|
253
|
+
/** Current account list; index 0 is the selected account. */
|
|
254
|
+
get currentAccounts(): readonly Address[];
|
|
28
255
|
get currentChainId(): Hex;
|
|
256
|
+
/** Chain ids that currently have an RPC backend, canonical hex. */
|
|
257
|
+
get backedChainIds(): readonly Hex[];
|
|
258
|
+
get coinbasePermissions(): readonly CoinbasePermission[];
|
|
259
|
+
get coinbaseSubAccounts(): readonly CoinbaseSubAccount[];
|
|
260
|
+
get solanaAccounts(): readonly {
|
|
261
|
+
publicKey: string;
|
|
262
|
+
pubkey: string;
|
|
263
|
+
address: string;
|
|
264
|
+
}[];
|
|
265
|
+
/**
|
|
266
|
+
* Test-side chain registration (Synpress addNetwork analogue): registers
|
|
267
|
+
* the backend and marks the chain known — no approval gate, no probe, and
|
|
268
|
+
* re-registration overwrites (tests may rewire).
|
|
269
|
+
*/
|
|
270
|
+
addChain(chainId: number | Hex, backend: ChainBackend): void;
|
|
271
|
+
/**
|
|
272
|
+
* Dispatch a request arriving from a non-injected transport (e.g. a
|
|
273
|
+
* WalletConnect session). Approval gating applies exactly as for injected
|
|
274
|
+
* requests. When allowedOrigins is configured, `context.origin` is
|
|
275
|
+
* enforced; an absent origin counts as "null" and is refused.
|
|
276
|
+
* `bypassOriginCheck` is the deliberate opt-out for transports that cannot
|
|
277
|
+
* attest origins — approval gating still applies.
|
|
278
|
+
*/
|
|
279
|
+
handleExternalRequest(request: JsonRpcRequest, context?: {
|
|
280
|
+
origin?: string;
|
|
281
|
+
bypassOriginCheck?: boolean;
|
|
282
|
+
}): Promise<unknown>;
|
|
283
|
+
/**
|
|
284
|
+
* Observe provider events (chainChanged, accountsChanged, connect,
|
|
285
|
+
* disconnect) node-side — the hook non-injected transports use to push
|
|
286
|
+
* session events. Dispatch is fire-and-forget; listener errors are
|
|
287
|
+
* swallowed. Returns an unsubscribe function.
|
|
288
|
+
*/
|
|
289
|
+
onProviderEvent(listener: (event: string, payload: unknown) => void): () => void;
|
|
29
290
|
injectMockProvider(): Promise<void>;
|
|
30
291
|
autoApprove(enabled?: boolean): void;
|
|
292
|
+
configureHardwareWallet(options: boolean | HardwareWalletSimulationOptions): void;
|
|
293
|
+
configureCoinbaseWallet(options: boolean | CoinbaseWalletSimulationOptions): void;
|
|
294
|
+
setHardwareWalletState(state: HardwareWalletDeviceState): void;
|
|
295
|
+
setHardwareWalletApprovalDelay(approvalDelayMs: number): void;
|
|
296
|
+
/**
|
|
297
|
+
* One-shot: the next atomicRequired wallet_sendCalls while the atomic
|
|
298
|
+
* capability is 'ready' throws 5750 (user rejected the EOA upgrade)
|
|
299
|
+
* instead of upgrading to 'supported'.
|
|
300
|
+
*/
|
|
301
|
+
simulateAtomicUpgradeRejection(): void;
|
|
302
|
+
/**
|
|
303
|
+
* Arms approval for the next matching request while autoApprove is off —
|
|
304
|
+
* the explicit per-call grant for real-key (live) wallets. Queued
|
|
305
|
+
* rejections and holds still take precedence.
|
|
306
|
+
*
|
|
307
|
+
* A grant without `match` approves whatever matching request arrives first
|
|
308
|
+
* and never expires, so any page script (including a third-party include on
|
|
309
|
+
* an allowed origin) can race the dapp for it. Pass `match` to bind the
|
|
310
|
+
* grant to the expected payload, or use holdNextRequest() to inspect the
|
|
311
|
+
* request before deciding.
|
|
312
|
+
*/
|
|
313
|
+
approveNext(methods?: string | readonly string[], match?: (method: string, params: readonly unknown[]) => boolean): void;
|
|
31
314
|
simulateRejection(methods?: string | readonly string[], message?: string): Promise<void>;
|
|
32
|
-
|
|
315
|
+
/**
|
|
316
|
+
* Intercepts the next matching request and keeps it pending until the test
|
|
317
|
+
* approves or rejects it — for asserting "confirm in your wallet" UI states.
|
|
318
|
+
* Resolves once the page actually issues the request.
|
|
319
|
+
*/
|
|
320
|
+
holdNextRequest(methods?: string | readonly string[]): Promise<HeldRequest>;
|
|
321
|
+
/**
|
|
322
|
+
* Resolves with the hash of the next transaction the page submits after
|
|
323
|
+
* this call. Invoke before triggering the dapp action, then await it.
|
|
324
|
+
*/
|
|
325
|
+
waitForNextTransaction(options?: {
|
|
326
|
+
timeoutMs?: number;
|
|
327
|
+
}): Promise<Hex>;
|
|
328
|
+
/**
|
|
329
|
+
* Resolves with the next approved wallet_watchAsset request after this
|
|
330
|
+
* call. Invoke before triggering the dapp action, then await it.
|
|
331
|
+
*/
|
|
332
|
+
waitForNextWatchedAsset(options?: {
|
|
333
|
+
timeoutMs?: number;
|
|
334
|
+
}): Promise<WatchedAssetRecord>;
|
|
335
|
+
/**
|
|
336
|
+
* Replaces the account set (and reconnects a disconnected wallet — unlike
|
|
337
|
+
* switchAccount, which only reorders). Accounts are validated against the
|
|
338
|
+
* backing node's eth_accounts; pass { allowUnknownAccounts: true } only
|
|
339
|
+
* for custom RpcClients whose account list the probe cannot see.
|
|
340
|
+
*/
|
|
341
|
+
setAccounts(accounts: readonly Address[], options?: {
|
|
342
|
+
allowUnknownAccounts?: boolean;
|
|
343
|
+
}): Promise<void>;
|
|
344
|
+
/**
|
|
345
|
+
* Re-selects one of the wallet's existing accounts: moves it to index 0
|
|
346
|
+
* (MetaMask orders eth_accounts most-recently-selected first) and emits
|
|
347
|
+
* accountsChanged with the reordered array. No event when it is already
|
|
348
|
+
* selected, and — unlike setAccounts — no reconnect while disconnected:
|
|
349
|
+
* the reorder stays internal until the wallet reconnects.
|
|
350
|
+
*/
|
|
351
|
+
switchAccount(address: Address): Promise<void>;
|
|
352
|
+
get isUnlocked(): boolean;
|
|
353
|
+
setUnlocked(unlocked: boolean): Promise<void>;
|
|
354
|
+
lock(): Promise<void>;
|
|
355
|
+
unlock(): Promise<void>;
|
|
33
356
|
disconnect(): Promise<void>;
|
|
34
357
|
reconnect(): Promise<void>;
|
|
35
358
|
switchNetwork(chainId: number | Hex): Promise<void>;
|
|
36
359
|
private emit;
|
|
37
|
-
private
|
|
360
|
+
private clientForChain;
|
|
361
|
+
private get activeRpcClient();
|
|
362
|
+
private enqueueSend;
|
|
363
|
+
private assertEip5792Enabled;
|
|
364
|
+
private batchForId;
|
|
365
|
+
private handleSendCalls;
|
|
366
|
+
private executeBatch;
|
|
367
|
+
private buildCallsStatus;
|
|
368
|
+
private consumeRule;
|
|
369
|
+
private fetchNodeAccounts;
|
|
370
|
+
private assertAccountsKnownToNode;
|
|
371
|
+
private assertOriginAllowed;
|
|
372
|
+
private assertHardwareWalletReady;
|
|
38
373
|
private assertUserApproved;
|
|
374
|
+
private permissionResponse;
|
|
375
|
+
private requestedPermissionKeys;
|
|
376
|
+
private assertSupportedPermissions;
|
|
377
|
+
private handleRequestPermissions;
|
|
378
|
+
private handleRevokePermissions;
|
|
379
|
+
private assertCoinbaseEnabled;
|
|
380
|
+
private assertCoinbaseConnected;
|
|
381
|
+
private assertAuthorizedAccount;
|
|
382
|
+
private buildCoinbaseSiweCapability;
|
|
383
|
+
private handleWalletConnect;
|
|
384
|
+
private handleWalletGetSubAccounts;
|
|
385
|
+
private handleWalletAddSubAccount;
|
|
386
|
+
private handleCoinbaseFetchPermissions;
|
|
387
|
+
private handleCoinbaseFetchPermission;
|
|
388
|
+
private handleWatchAsset;
|
|
39
389
|
private handleRpcRequest;
|
|
40
390
|
}
|
|
41
391
|
//# sourceMappingURL=mock-wallet-controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-wallet-controller.d.ts","sourceRoot":"","sources":["../src/mock-wallet-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"mock-wallet-controller.d.ts","sourceRoot":"","sources":["../src/mock-wallet-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAqC,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAOjF,OAAO,KAAK,EAEV,cAAc,EAGd,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MA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