https://github.com/openzeppelin/openzeppelin-relayer-sdk
OpenZeppelin Relayer SDK
https://github.com/openzeppelin/openzeppelin-relayer-sdk
Last synced: 10 months ago
JSON representation
OpenZeppelin Relayer SDK
- Host: GitHub
- URL: https://github.com/openzeppelin/openzeppelin-relayer-sdk
- Owner: OpenZeppelin
- License: agpl-3.0
- Created: 2025-03-20T20:48:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-21T05:37:39.000Z (10 months ago)
- Last Synced: 2025-06-21T05:38:35.826Z (10 months ago)
- Language: TypeScript
- Homepage:
- Size: 736 KB
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# OpenZeppelin Relayer SDK
[](https://www.npmjs.org/package/@openzeppelin/relayer-sdk)
[](https://api.securityscorecards.dev/projects/github.com/OpenZeppelin/openzeppelin-relayer-sdk)
[](https://github.com/OpenZeppelin/openzeppelin-relayer-sdk/actions/workflows/scorecard.yml)
[](https://github.com/OpenZeppelin/openzeppelin-relayer-sdk/actions/workflows/ci.yaml)
The OpenZeppelin Relayer SDK provides a TypeScript/JavaScript client for interacting with the OpenZeppelin Relayer service. This SDK allows developers to easily integrate relayer functionality into their applications for various blockchain networks.
## Requirements
- Node.js 22.14.0 or higher
- Package manager: pnpm 9.0.0 or higher
## Installation
```bash
npm install @openzeppelin/relayer-sdk
# or
yarn add @openzeppelin/relayer-sdk
# or
pnpm add @openzeppelin/relayer-sdk
```
## Features
- Easy integration with OpenZeppelin Relayer services
- Support for multiple blockchain networks (EVM, Solana)
- TypeScript typings for better development experience
- Built-in configuration management
## Architecture
The SDK is built on top of an OpenAPI-generated TypeScript client that communicates with the OpenZeppelin Relayer API. It uses Axios for HTTP requests and provides type-safe interfaces for all API operations.
## Usage Examples
The SDK includes various examples demonstrating how to interact with relayers:
### EVM Networks
See the [examples/evm](examples/evm) directory for EVM-specific examples.
### Solana
See the [examples/solana](examples/solana) directory for Solana-specific examples.
### Common Operations
#### Get Relayer
```typescript
import { Configuration, RelayersApi } from '@openzeppelin/relayer-sdk';
const config = new Configuration({
basePath: 'https://your-path.com',
accessToken: '',
});
const relayersApi = new RelayersApi(config);
const relayer = await api.getRelayer('relayer-id');
console.log(relayer);
```
For more examples, check the [examples directory](examples).
## API Documentation
The SDK is built on top of an OpenAPI specification which can be found in the [openapi.json](openapi.json) file.
For detailed API documentation, please refer to the [API Reference](docs/README.md) in the docs folder. This documentation provides comprehensive information about all available endpoints, request parameters, and response types.
## Development
### Setup
```bash
# Install dependencies
pnpm install
# Build the SDK
pnpm generate
```
## Generating a New Client
The SDK client is generated from an OpenAPI specification file. To generate a new client:
1. Create or update the `openapi.json` file in the root directory if it doesn't exist.
2. Run the generation command:
```bash
pnpm run generate
```
This command performs the following steps:
- Cleans the existing source files
- Generates a TypeScript Axios client from the OpenAPI specification
- Runs post-generation scripts to customize the output
- Builds the final client
### Testing
```bash
pnpm test
```
### Contributing
Contributions are welcome! Please read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing to this project.
## License
This project is licensed under the **AGPL-3.0-or-later** license. See the [LICENSE](LICENSE) file for more details.
---
### Release Workflow
