The Relayer SDK (Documentation Index
Fetch the complete documentation index at: https://docs.relayer.fi/llms.txt
Use this file to discover all available pages before exploring further.
@relayerfi/action-kit) is the TypeScript library for building blockchain action metadata. It defines the action schema, validates metadata before submission, and provides template helpers for common parameter types. Use it to create the metadata object that powers a Relayer Trigger.
The Relayer SDK metadata layer is mode-agnostic. Whether your integration uses Passkey Signing (passkey) or Metadata Mode (bring your own wallet), the metadata schema and validation are identical. The SDK defines what action to perform — the integration mode determines how signing happens.
Install
viem is a required peer dependency.Core Concepts
- Blockchain action metadata is a typed
Metadataobject withurl,icon,title,description, and anactionsarray. - Each action in the array is one of:
transfer,blockchain,http,dynamic, or a nestedflow. - Call
createMetadata(metadata)to validate and process the metadata. It throws if the input is invalid. - Call
validateMetadata(metadata)for non-throwing validation that returns a detailed result object with anerrorsarray.
Action Types
| Type | Purpose | Key Fields |
|---|---|---|
transfer | Send native tokens to an address | to, amount, chains |
blockchain | Call a smart contract function | address, abi, functionName, params |
http | POST to a REST endpoint for server-side logic | path, params |
dynamic | Advanced server-side processing with external services | url, params |
flow | Multi-step interactive experience with conditional branching | steps, decisions |
Quick Start — Transfer Action
Quick Start — Blockchain Action
Validation
UsevalidateMetadata for non-throwing validation with detailed error reporting:
Parameter Templates
PARAM_TEMPLATES provides predefined parameter shapes (email, token select, etc.) so you do not have to hand-craft common parameter structures:
Supported Chains
| Chain | Chain ID |
|---|---|
| Ethereum Mainnet | 1 |
| Ethereum Sepolia | 11155111 |
| Avalanche C-Chain | 43114 |
| Avalanche Fuji | 43113 |
| Celo Mainnet | 42220 |
| Base Mainnet | 8453 |
| Base Sepolia | 84532 |
| Mantle Mainnet | 5000 |
API Reference
| Export | Type | Purpose |
|---|---|---|
createMetadata(metadata) | function | Validate and process metadata; throws on error |
validateMetadata(input) | function | Non-throwing validation with errors array |
isBlockchainActionMetadata(action) | type guard | Narrow action type to blockchain |
isTransferAction(action) | type guard | Narrow action type to transfer |
isHttpAction(action) | type guard | Narrow action type to http |
isActionFlow(obj) | type guard | Narrow to nested flow |
PARAM_TEMPLATES | constant | Library of predefined parameter shapes |
createParameter(template, overrides) | function | Create a parameter from a template |
Debug Your Trigger
Use the Relayer Debugger to test and preview blockchain action metadata before embedding. Paste your metadata JSON or URL and see the rendered Trigger in real time.Next Steps
Integration Guide
Embed the Trigger component in your app.
Action Kit
Register and publish blockchain actions via the Relayer API.