Repository navigation
Conversation
Preview deployments for wdk-docs staging ⚡️
Commit: Deployment ID: Static site name: |
Add fourteen published versions to the release documentation and retain the existing October 9 and 15 coverage. Document Core policy boundaries, EVM chain configuration, token-paymaster validation, swap checks, recovery limits, and the smaller package updates with their required migration guidance. Merge fresh develop and synchronize the generated documentation feed.
|
Could you please review the sections in this review map for the areas you worked on or know best? Each link opens the relevant file. Please leave any feedback on the relevant section. Broader review is welcome too; if you're comfortable with the PR overall, an approval would be appreciated. |
|
@ihsraham I went through the open docs PRs, here's what I think gets the queue moving:
Thanks! |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
claudiovb
left a comment
There was a problem hiding this comment.
One item outside the diff, in content/docs/sdk/wallet-modules/wallet-evm/guides/getting-started.mdx L22:
npm install @tetherto/wdk-wallet-evm @tetherto/wdk-wallet@1.0.0-beta.17
wallet-evm beta.23/24 depends on @tetherto/wdk-wallet@1.0.0-beta.21, so this line installs two base copies: beta.17 at top level for the app, beta.21 nested under wallet-evm (verified in the resulting package-lock). Error classes the app imports (ValueError, InvalidSignerError, …) are then different objects from the ones the wallet throws, and the app's copy has none of the IDisposable/DisposalError surface these pages now describe.
| | `getAccount(signerName)` | Returns the account associated with a registered signer | `Promise<WalletAccountEvm>` | If the named signer is unavailable | | ||
| | `getAccountByPath(path, options?)` | Returns a wallet account at the specified BIP-44 derivation path, optionally from a named signer | `Promise<WalletAccountEvm>` | If the requested signer is unavailable or cannot derive | | ||
| | `getFeeRates()` | Returns current fee rates for transactions | `Promise<{normal: bigint, fast: bigint}>` | `ProviderRequiredError` if no provider is set | | ||
| | `dispose()` | Initiates cleanup of accounts and default/named signers, including supplied signers in beta.20 | `void` | - | |
There was a problem hiding this comment.
This reference is stale for beta.20. I suggest changing it to beta.23 and also adding this comment:
app-supplied default and named signers stay app-owned
| ``` | ||
|
|
||
| The manager's default signer must support derivation. Non-derivable signers, such as private-key signers, can be registered by name and used to retrieve signer-backed accounts: | ||
| `SeedSignerEvm(seed)` starts at the coin node `m/44'/60'`. Its `derive()` method uses a path relative to the signer's current node. The manager's default signer must support derivation. Non-derivable signers, such as private-key signers, can be registered by name and used to retrieve signer-backed accounts: |
There was a problem hiding this comment.
SeedSignerEvm(seed) starts at the coin node m/44'/60'" is true, but the constructor is new SeedSignerEvm(seed, path?) and the path can be any absolute BIP-32 path (seed-signer-evm.js L56).
| provider: 'https://eth.drpc.org', | ||
|
|
||
| // Optional: Skip automatic chain ID detection when the network is known | ||
| // Optional: Pin this RPC endpoint to a known chain without detecting it |
There was a problem hiding this comment.
I found this rather cryptic while reading it. I think this could be a better wording:
| // Optional: Pin this RPC endpoint to a known chain without detecting it | |
| // Optional: trust this chain ID instead of asking the RPC (1 = Ethereum mainnet). It must match the endpoint; mismatches are not detected |
|
|
||
| | Property | Type | Description | | ||
| |----------|------|-------------| | ||
| | `seed` | `Uint8Array \| undefined` (inherited declaration) | Always `undefined` at runtime in beta.20: the manager turns seed input into its default signer before calling the base constructor. Keep seed storage in your application. | |
There was a problem hiding this comment.
This is true for beta.20 onwards so it should say this too. So people doesn't expect to have seed variable defined at beta.23
|
|
||
| // ⚠️ SENSITIVE: Handle with care | ||
| const { privateKey, publicKey } = account.keyPair | ||
| console.log('Public key length:', publicKey.length) // 65 bytes |
There was a problem hiding this comment.
This comment is wrong public key length is :
Public key length: 33
| Use `generateEntryPoint()` when you need the generated HRPC Bare entrypoint written to a chosen output directory. This path includes configured generic modules, both method-allowlist maps, module lifecycle/event wiring, and the optional `handleLeakCheck` diagnostic. | ||
|
|
||
| The beta.14 HRPC entrypoint scans `require.cache` for every loaded `bare-http1` and `bare-https` module, deduplicates their `globalAgent` objects, and invokes each agent's `suspend()` or `resume()` method. It also invokes `context.moduleRuntime.suspendAll()` or `resumeAll()` when present. Each call is fire-and-forget; synchronous throws and rejected promises are logged without stopping the other lifecycle calls. When `options.convertEsmToCjs` is enabled, the entrypoint also emits the matching runtime `.mjs`-as-CommonJS loader patch. | ||
| The beta.15 HRPC entrypoint scans `require.cache` for every loaded `bare-http1` and `bare-https` module, deduplicates their `globalAgent` objects, and invokes each agent's `suspend()` or `resume()` method. It also invokes `context.moduleRuntime.suspendAll()` or `resumeAll()` when present. Each call is fire-and-forget; synchronous throws and rejected promises are logged without stopping the other lifecycle calls. When `options.convertEsmToCjs` is enabled, the entrypoint also emits the matching runtime `.mjs`-as-CommonJS loader patch. |
There was a problem hiding this comment.
Accurate for beta.15, so nothing to change here. Heads-up for the next cycle: beta.16 (wdk-worklet-bundler#80) removes the runtime .mjs-as-CommonJS loader patch entirely. Conversion moves inside pack() and converted .mjs files are stored under .js keys, so the entrypoint no longer depends on convertEsmToCjs. That also drops convertBundleEsmToCjs() / validateBundle() and the "source-only, then convert yourself" workflow, and adds packBundle() plus options.builtins. I'd avoid polishing those sections now, since they get rewritten rather than updated.
| #### `generateJsonRpcEntryPoint(config, outputDir)` | ||
|
|
||
| Generate the framed JSON-RPC entrypoint used by native hosts. Beta.14 includes wallet, protocol, and generic-module managers plus both method-allowlist maps. It generates the same fire-and-forget HTTP-agent and module-runtime lifecycle wiring as HRPC. `options.handleLeakCheck` remains HRPC-only, so JSON-RPC does not emit diagnostic registration. When `options.convertEsmToCjs` is enabled, JSON-RPC emits the same `.mjs` loader patch as HRPC. | ||
| Generate the framed JSON-RPC entrypoint used by native hosts. Beta.15 includes wallet, protocol, and generic-module managers plus both method-allowlist maps. It generates the same fire-and-forget HTTP-agent and module-runtime lifecycle wiring as HRPC. `options.handleLeakCheck` remains HRPC-only, so JSON-RPC does not emit diagnostic registration. When `options.convertEsmToCjs` is enabled, JSON-RPC emits the same `.mjs` loader patch as HRPC. |
There was a problem hiding this comment.
same as above for the mjs loader patch
|
|
||
| Use `generateSourceFiles()` when you want the generated entrypoint without the final `bare-pack` step. | ||
|
|
||
| `options.convertEsmToCjs: true` adds the runtime `.mjs` CommonJS-loader patch to that entrypoint, but this function does not pack or convert a bundle. If you run `bare-pack` yourself, call `convertBundleEsmToCjs()` on its output and keep the same conversion setting used to generate the entrypoint. |
There was a problem hiding this comment.
It's config.options.convertEsmToCjs. The signature right above is generateSourceFiles(config, options?), so options.convertEsmToCjs reads as the second argument, which only accepts verbose. This will confuse both agents and people.
|
|
||
| ```bash | ||
| # 1. Install the bundler CLI | ||
| npm install -g @tetherto/wdk-worklet-bundler@1.0.0-beta.14 |
There was a problem hiding this comment.
Bump to beta.15 and later to 16. Drop the -g so it matches the --save-dev guidance on bundler's page
| ``` | ||
|
|
||
| Worklet Bundler beta.14 generates entrypoints that import Pear Worklet. These examples pair it with Pear Worklet beta.16, which retains beta.15's runtime API and requires the `bare-crypto >=1.13.1` peer. The bundler checks whether the runtime package is installed; it does not enforce this version pairing. React Native Core beta.21 still depends on Pear Worklet beta.15; upgrading Core alone does not select this newer direct-install version. | ||
| Worklet Bundler beta.15 generates entrypoints that import Pear Worklet. These examples pair it with Pear Worklet beta.16, which retains beta.15's runtime API and requires the `bare-crypto >=1.13.1` peer. The bundler checks whether the runtime package is installed; it does not enforce this version pairing. React Native Core beta.21 still depends on Pear Worklet beta.15; upgrading Core alone does not select this newer direct-install version. |
There was a problem hiding this comment.
RN Core beta.22 (documented in this PR) still pins Pear Worklet beta.15, same as beta.21, so this should say "React Native Core beta.22". The same sentence lives in pear-wrk-wdk/configuration.mdx line 16 (not in this PR, but worth fixing in the same pass).
Description
Document 31 published versions across 20 WDK packages from October 9–21, with the required migration guidance.
The main changes cover Core policy enforcement, EVM signer ownership and chain configuration, Safe fees, EIP-7702 paymaster validation, Velora transaction validation, Utils recovery limits, and Worklet native-addon targets. Maintenance releases and React Native, Solana, Indexer, bridge, and MoonPay updates are included.
Release coverage (31 versions, 20 packages)
CLI beta.7 remains separately reviewable in #293. Broader corrections and the separate API-reference pilot are outside this PR.
Merge after #310.
Type of change