Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,27 @@ yarn add @metamask/snap-solana-wallet

This dual repository setup allows you to develop and test the Solana Wallet Snap alongside the main MetaMask extension. The snap is installed as a dependency in the MetaMask extension repository, where it can be tested and integrated.

## API Documentation

MetaMask interacts with the Solana Wallet Snap via its [JSON-RPC API](packages/snap/openrpc.json). The complete API specification is documented in the OpenRPC format.

### Viewing the API Documentation

The API documentation is located in [`packages/snap/openrpc.json`](packages/snap/openrpc.json). To view it in a user-friendly format:

1. Go to the [OpenRPC Playground](https://playground.open-rpc.org/), or any other OpenRPC viewer of your liking
2. Copy the contents of [`packages/snap/openrpc.json`](packages/snap/openrpc.json)
3. Paste it into the playground's editor
4. Explore the interactive documentation with method details, parameters, examples, and error specifications

### Available Methods

The API includes methods for:

- **Wallet operations** - Account management, transaction signing and broadcasting, and message signing
- **Protocol requests** - Direct interaction with Solana RPC methods
- **Client-only requests** (as defined in [SIP-31](https://github.com/MetaMask/SIPs/blob/main/SIPS/sip-31.md)) - For operations like Swap/Bridge without user confirmation

## Contributing

We welcome contributions to the Solana Wallet Snap! Please read our [Contributing](docs/contributing.md) guidelines to get started.
Loading