Skip to content

Add docs about how to create a signer with a key pair#692

Open
jhaaaa wants to merge 3 commits intomainfrom
curve-centric
Open

Add docs about how to create a signer with a key pair#692
jhaaaa wants to merge 3 commits intomainfrom
curve-centric

Conversation

@jhaaaa
Copy link
Collaborator

@jhaaaa jhaaaa commented Feb 25, 2026

This is phase 1 of updating docs to reframe web3/crypto

Document creating a signer from a key pair

  • Adds a new section in create-a-signer.mdx showing how to create a signer from a secp256k1 key pair, with code examples for Browser and Node using @noble/curves and @noble/hashes
  • Retitles the page from "Create a EOA or SCW signer" to "Create a signer" and reorganizes the EOA and SCW sections with additional context and feature tables
  • Updates sidebar navigation and cross-references in build-an-agent.mdx, extend-id-model.md, and get-started.mdx
📊 Macroscope summarized f93f7ea. 5 files reviewed, 3 issues evaluated, 0 issues filtered, 3 comments posted

🗂️ Filtered Issues

@jhaaaa jhaaaa requested a review from a team as a code owner February 25, 2026 23:30
@vercel
Copy link

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-xmtp-org Ready Ready Preview, Comment Feb 25, 2026 11:32pm

Request Review


- **EOAs on EVM chain**: Work automatically. Signature verification is purely cryptographic (secp256k1 ECDSA), so no configuration is needed.
- **SCWs on EVM chains**: Require adding the chain's RPC endpoint to the verifier config. See [Create a SCW signer](/chat-apps/core-messaging/create-a-signer#create-a-smart-contract-wallet-signer).
- **SCWs on EVM chains**: Require adding the chain's RPC endpoint to the verifier config. See [Create a SCW signer](/chat-apps/core-messaging/create-a-signer#from-a-smart-contract-wallet-scw).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium core-messaging/extend-id-model.md:12

Anchor #from-a-smart-contract-wallet-scw doesn't exist in the target file. Consider using #create-a-signer-from-a-scw to match the heading "Create a signer from a SCW".

Suggested change
- **SCWs on EVM chains**: Require adding the chain's RPC endpoint to the verifier config. See [Create a SCW signer](/chat-apps/core-messaging/create-a-signer#from-a-smart-contract-wallet-scw).
- **SCWs on EVM chains**: Require adding the chain's RPC endpoint to the verifier config. See [Create a SCW signer](/chat-apps/core-messaging/create-a-signer#create-a-signer-from-a-scw).
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file docs/pages/chat-apps/core-messaging/extend-id-model.md around line 12:

Anchor `#from-a-smart-contract-wallet-scw` doesn't exist in the target file. Consider using `#create-a-signer-from-a-scw` to match the heading "Create a signer from a SCW".


```ts
import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium core-messaging/create-a-signer.mdx:219

The chain: mainnet doesn't match the Base RPC URL. Consider using base from viem/chains instead.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file docs/pages/chat-apps/core-messaging/create-a-signer.mdx around line 219:

The `chain: mainnet` doesn't match the Base RPC URL. Consider using `base` from `viem/chains` instead.

const code = await client.getCode({ address });

// EOAs have no bytecode, while smart contracts do.
if (code === undefined) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium core-messaging/create-a-signer.mdx:242

viem's getCode returns '0x' for EOAs, not undefined. Consider checking if (!code || code === '0x') instead.

Suggested change
if (code === undefined) {
if (!code || code === '0x') {
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file docs/pages/chat-apps/core-messaging/create-a-signer.mdx around line 242:

viem's `getCode` returns `'0x'` for EOAs, not `undefined`. Consider checking `if (!code || code === '0x')` instead.

| Security model | Single key | Policy-based, multi-layer security |
## Create a signer from a key pair

## How do I know if I have a SCW?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we preserve this content for a "XMTP for Web3" section? I got these SCW questions asked multiple times already.

@jhaaaa jhaaaa changed the title Add docs about how to creaate a signer with a key pair Add docs about how to create a signer with a key pair Feb 26, 2026
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