Retire deprecated sei_* association methods, document addr precompile#11
Retire deprecated sei_* association methods, document addr precompile#11alexander-sei wants to merge 2 commits into
Conversation
The sei_* JSON-RPC namespace is deprecated and gated by enabled_legacy_sei_apis in app.toml. Of the three address-related legacy methods: - sei_associate is not in the default allowlist and returns legacy_sei_deprecated on every public RPC unless the node operator has opted in. It is functionally a relay-only path that no public Sei node currently accepts. - sei_getSeiAddress and sei_getEVMAddress are enabled by default today, but belong to the same deprecated namespace and may be removed in a future release. All three are duplicated by the on-chain addr precompile at 0x...1004: associate(v, r, s, customMessage) / associatePubKey(pubKeyHex) for writes, getSeiAddr(address) / getEvmAddr(string) for reads. The precompile is a normal EVM call available on every public RPC, never deprecated, and is what the dashboard and other first-party integrations now use. learn/accounts.mdx: - Drop the entire "Method 5: Gasless Association via Signed Message" section (sei_associate-based) and its row in the methods table. - Drop the "Manual Association From the CLI" subsection — its only consumer was an embedded seid command for a flow we no longer document here. - Replace the legacy curl examples under "Query Linked Addresses" with precompile-based eth_call examples (curl + viem TS) covering both resolution directions. - Add an explanatory <Note> on the methods table and recap pointing operators who genuinely want sei_associate to the node-operators page. evm/reference.mdx: - Drop the sei_associate, sei_getSeiAddress, sei_getEVMAddress rows from the legacy methods accordion and their dedicated subsections in "Address & Cross-VM Helpers". - Split that section into an "Address Resolution" subsection (precompile + curl + viem examples, plus a <Note> on the historical methods) and a "Cross-VM Transaction Lookup" subsection that keeps sei_getCosmosTx (no precompile equivalent yet). - Leave the default enabled_legacy_sei_apis code block intact — it documents what `seid init` actually emits, and the chain still ships with the two get-helpers enabled by default. node/node-operators.mdx is intentionally untouched: it mirrors the chain's default app.toml, so the commented sei_associate line and the two enabled get-helpers stay there as accurate operator reference. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
PR SummaryLow Risk Overview On On Reviewed by Cursor Bugbot for commit c2b92f1. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
…ak256)
The "Sei Address Derivation" snippet was applying the Ethereum derivation
algorithm to the Cosmos side: keccak256 the pubkey, then take the first
20 bytes. That doesn't match what the chain actually does — see
`PubkeyBytesToSeiPubKey` and the standard cosmos secp256k1
`PubKey.Address()` in sei-chain/utils/helpers/address.go, which is
SHA256 -> RIPEMD160 of the compressed pubkey (the canonical Cosmos
derivation). The Python and TypeScript "Generating Wallets" snippets
later in the same doc already implement this correctly, so the bug was
just in the standalone "Sei Address Derivation" section near the top.
Also tightened the paired EVM derivation snippet:
- Made the input type explicit (uncompressed pubkey, 65 bytes, leading 0x04).
- Slice off the 0x04 prefix byte before hashing, matching the Python
snippet ("Exclude the first byte") and the actual EVM derivation in
sei-chain/utils/helpers/address.go:PubkeyToEVMAddress.
Updated the Summary block and the "Why It Works" paragraph to reflect
that the two derivations use different algorithms, and switched both
example imports from ethereumjs-util to @noble/hashes for consistency
with the canonical snippets later in the file.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Replaces
learn/accountsand the address-resolution part of the EVM reference with the on-chainaddrprecompile path (0x0000000000000000000000000000000000001004), and retires the deprecatedsei_*JSON-RPC methods that the old copy pointed users at.Why
The
sei_*JSON-RPC namespace is deprecated and gated byenabled_legacy_sei_apisinapp.toml(seeevmrpc/sei_legacy.go):sei_associateis not in the default allowlist. On every public Sei RPC (evm-rpc.sei-apis.com, third-party providers, etc.) it returnslegacy_sei_deprecated. The docs were telling readers to build a flow that fails for the vast majority of them.sei_getSeiAddress/sei_getEVMAddressare enabled by default today but belong to the same deprecated namespace and may be removed in a future release. They duplicategetSeiAddr/getEvmAddron the addr precompile, which is a normal EVM call available on every RPC and never deprecated.The on-chain
addrprecompile already covers all three operations (associate,getSeiAddr,getEvmAddr) and is what first-party Sei integrations now use end-to-end. The first-party dashboard's recent switch to the precompile path is tracked in sei-dashboard#8.What changed
learn/accounts.mdxsei_associateflow) — its row in the table, its ~35-line code snippet, and the surrounding callouts. Method 3 covers the same wallet-signed-message UX without depending on a gated endpoint.seid tx evm associate-addresssnippet).sei_get*Addresscurl examples under Query Linked Addresses witheth_callagainst the precompile, plus a viem TypeScript example that covers bothgetSeiAddrandgetEvmAddrdirections. Selector0x0c3c20edverified againstviem.toFunctionSelector('function getSeiAddr(address) view returns (string)').<Note>for readers arriving from old links, pointing operators who want the legacy method back to/node/node-operators(where the chain's defaultapp.tomlis mirrored).sei-chain/precompiles(was44fd60cec6…) with/tree/main/precompiles/addr.evm/reference.mdxsei_associate,sei_getSeiAddress, andsei_getEVMAddressfrom the legacy methods accordion table.<Note>explaining the historical helpers.#### sei_getCosmosTx(no precompile equivalent yet).enabled_legacy_sei_apiscode block intact — it mirrors whatseid initactually writes toapp.toml. Omitting the twosei_get*Addressentries there would make the docs disagree with the chain default.Not touched
node/node-operators.mdx— the commented# "sei_associate",line and the two enabled get-helpers in the default allowlist are accurate operator reference for what the chain ships. Removing them would diverge from chain reality.Reviewer notes
<Note>blocks on both pages are load-bearing for SEO / external-link continuity: they explain to anyone arriving here from a stale Google result, a third-party tutorial, or an old bookmark why the section they remembered no longer exists.learn/accounts.mdx: the "Sei Address Derivation" snippet near the bottom (under "Deriving Addresses from the Public Key") says to keccak256-hash the public key and take the first 20 bytes for the bech32 — but Cosmos sei derivation is SHA256→RIPEMD160, as the Python/TypeScript snippets later in the same doc correctly show. Not fixed in this PR to keep the scope focused on association method availability; happy to do it in a follow-up.🤖 Generated with Claude Code