From fd1cc461a5bf1cb005968cd6824f027273a5750e Mon Sep 17 00:00:00 2001 From: jcstein Date: Fri, 6 Mar 2026 08:13:31 -0700 Subject: [PATCH] docs: add openrpc account selection guide for integrations --- app/build/stacks/_meta.js | 1 + app/build/stacks/account-selection/page.mdx | 96 +++++++++++++++++++ app/build/stacks/nitro-das-server/page.mdx | 1 + .../stacks/op-alt-da/introduction/page.mdx | 3 +- 4 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 app/build/stacks/account-selection/page.mdx diff --git a/app/build/stacks/_meta.js b/app/build/stacks/_meta.js index 25a9430bbc9..8622963571b 100644 --- a/app/build/stacks/_meta.js +++ b/app/build/stacks/_meta.js @@ -1,4 +1,5 @@ const meta = { + "account-selection": "Account selection", "nitro-das-server": "Nitro DAS server", "op-alt-da": "OP alt DA", }; diff --git a/app/build/stacks/account-selection/page.mdx b/app/build/stacks/account-selection/page.mdx new file mode 100644 index 00000000000..72f0d17ad64 --- /dev/null +++ b/app/build/stacks/account-selection/page.mdx @@ -0,0 +1,96 @@ +# Select a Celestia account in integrations + +## Overview + +One DA node can submit blobs for multiple execution environments, but each +blob submission still needs a specific Celestia signer. Use the OpenRPC +options on `blob.Submit` to select the account per request. + +## OpenRPC methods to use + +- `blob.Submit(blobs, options)`: + `options.key_name` or `options.signer_address` selects the signer for that + submission. +- `state.BalanceForAddress(addr)`: + checks the balance for the selected signer before submission. +- `state.AccountAddress()`: + returns the node's default signer, useful for fallback behavior. + +## JSON-RPC examples + +Submit using a key name: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "blob.Submit", + "params": [ + [ + { + "namespace": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAMJ/xGlNMdE=", + "data": "aGVsbG8gY2VsZXN0aWE=", + "share_version": 0 + } + ], + { + "key_name": "rollup-a" + } + ] +} +``` + +Submit using an explicit signer address: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "blob.Submit", + "params": [ + [ + { + "namespace": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAMJ/xGlNMdE=", + "data": "aGVsbG8gY2VsZXN0aWE=", + "share_version": 0 + } + ], + { + "signer_address": "celestia1..." + } + ] +} +``` + +Pre-flight balance check for a signer: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "state.BalanceForAddress", + "params": ["celestia1..."] +} +``` + +## Integration notes + +| Integration | How to select the Celestia account | +| --- | --- | +| OP Stack (`op-alt-da`) | Set the tx-client key used by the DA server (for example `--celestia.tx-client.key-name` or `default_key_name` in config). | +| Arbitrum (`nitro-das-celestia`) | The sidecar submits through a Celestia node RPC endpoint. Choose the node signer by running that Celestia node with the desired key (for example `--keyring.keyname`). | +| Rollkit | If Rollkit is connected to a Celestia node endpoint, signer selection is controlled by that node account, or by passing `blob.Submit` options in the client path that submits blobs. | +| RollApps | Same pattern as Rollkit: set signer at the Celestia node layer, or pass OpenRPC submit options where available. | +| Sovereign SDK | For direct Node API integration, pass `key_name` or `signer_address` in `blob.Submit` options; otherwise the node default signer is used. | + +## Key management and node defaults + +If your integration uses only the node default signer, set that default account +at node startup: + +```bash +celestia start --p2p.network --keyring.keyname +``` + +For wallet/key setup, see +[Create a wallet with celestia-node](/operate/keys-wallets/celestia-node-key). diff --git a/app/build/stacks/nitro-das-server/page.mdx b/app/build/stacks/nitro-das-server/page.mdx index 8c9ad5a3e4f..8f0f92d4ee0 100644 --- a/app/build/stacks/nitro-das-server/page.mdx +++ b/app/build/stacks/nitro-das-server/page.mdx @@ -26,3 +26,4 @@ Nitro's batch poster coordinates with the Celestia DAS server to store batch dat - [Nitro fork repository](https://github.com/celestiaorg/nitro) - [Celestia DAS server](https://github.com/celestiaorg/nitro-das-celestia) +- [Select a Celestia account in integrations](/build/stacks/account-selection) diff --git a/app/build/stacks/op-alt-da/introduction/page.mdx b/app/build/stacks/op-alt-da/introduction/page.mdx index 12c5beb9a1e..ef89ee931dc 100644 --- a/app/build/stacks/op-alt-da/introduction/page.mdx +++ b/app/build/stacks/op-alt-da/introduction/page.mdx @@ -24,4 +24,5 @@ The [Celestia fork](https://github.com/celestiaorg/optimism/blob/celestia-develo ## Resources - [op-alt-da repository](https://github.com/celestiaorg/op-alt-da) -- [Celestia OP Stack fork](https://github.com/celestiaorg/optimism) \ No newline at end of file +- [Celestia OP Stack fork](https://github.com/celestiaorg/optimism) +- [Select a Celestia account in integrations](/build/stacks/account-selection)