docs: orderbook key delegation (secondary keys) - #235
Merged
Conversation
Document the ephemeral-key delegation feature shipped in podnetwork/pod#1358: a master account signs one off-chain EIP-712 DelegationAuth message to authorize a delegate key, which then submits orderbook calls on the master's behalf via the delegated(...) envelope. - New protocol page doc/protocol/key-delegation.md: motivation, certificate format, ownership vs identity, delegatable calls, security model. - New guide doc/api-reference/guides/delegate-a-trading-key.md: TypeScript (ethers.js) and Rust (alloy) examples for signing the certificate and submitting a delegated order. - Orderbook precompile reference: new 'Delegation envelope' section and the delegated(address,uint64,bytes,bytes) function in the ABI listing. - Linked both new pages from their SUMMARY.md tables of contents.
abresas
approved these changes
Jul 6, 2026
abresas
marked this pull request as ready for review
July 6, 2026 20:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: the ephemeral-key delegation feature (a master account authorizing a secondary "delegate" key to trade on its behalf) was completely undocumented in the public docs — nothing in the protocol docs, guides, or the Orderbook precompile reference mentioned the
delegated(...)envelope or theDelegationAuthcertificate.After: a reader finds a protocol page (Key Delegation, linked under Markets) explaining why and how a master authorizes a delegate, ownership-vs-identity semantics, what can be delegated, and the security model (expiry, recipient pinning, no revocation, gas exemption); a step-by-step guide (Delegate a trading key, linked under Guides) with TypeScript (ethers.js) and Rust (alloy) examples for (a) the master signing the EIP-712
DelegationAuthcertificate and (b) the delegate submitting an order on the master's behalf; and thedelegated(address master, uint64 validUntil, bytes signature, bytes inner)function in the Orderbook precompile reference, with a "Delegation envelope" section covering its validation rules.doc/protocol/key-delegation.md— new protocol page (concept, ownership, delegatable calls, security model)doc/protocol/SUMMARY.md— link the new page under Marketsdoc/api-reference/guides/delegate-a-trading-key.md— new guide with TypeScript and Rust examplesdoc/api-reference/SUMMARY.md— link the new guidedoc/api-reference/applications-precompiles/orderbook.md— new "Delegation envelope" section +delegated(...)in the Solidity ABI listing (placed to avoid the sections touched by docs(orderbook): update Clearing section for the four-case clearing price #231 and docs: remove getOrders from the orderbook precompile reference #234)