Skip to content

docs: orderbook key delegation (secondary keys) - #235

Merged
abresas merged 2 commits into
mainfrom
docs/secondary-keys
Jul 6, 2026
Merged

docs: orderbook key delegation (secondary keys)#235
abresas merged 2 commits into
mainfrom
docs/secondary-keys

Conversation

@claude

@claude claude Bot commented Jul 6, 2026

Copy link
Copy Markdown

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 the DelegationAuth certificate.

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 DelegationAuth certificate and (b) the delegate submitting an order on the master's behalf; and the delegated(address master, uint64 validUntil, bytes signature, bytes inner) function in the Orderbook precompile reference, with a "Delegation envelope" section covering its validation rules.

claude and others added 2 commits July 6, 2026 11:48
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
abresas marked this pull request as ready for review July 6, 2026 20:35
@abresas
abresas merged commit d4f8e9f into main Jul 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants