Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@reservoir0x/defender-relayer-adapter

Package Overview
Dependencies
Maintainers
0
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reservoir0x/defender-relayer-adapter

An adapter that intergrates OpenZeppelins defender relayer wallet to a Reservoir Wallet for use in the @reservoir0x/reservoir-sdk

  • 5.0.37
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
229
increased by141.05%
Maintainers
0
Weekly downloads
 
Created
Source

Reservoir Defender Relayer Adapter

Installation

yarn add @reservoir0x/defender-relayer-adapter @reservoir0x/reservoir-sdk

Also make sure to install the peer dependencies required by the adapter if your application doesn't already include them:

yarn add ethers viem @reservoir0x/defender-relayer-adapter @reservoir0x/reservoir-sdk

Usage

To use the adapter simply pass in your relayer credentials and receive a normalized ReservoirWallet object:

import { getClient } from '@reservoir0x/reservoir-sdk'
import { adaptDefenderRelay } from '@reservoir0x/defender-relayer-adapter'

...

const credentials = {
  apiKey: '' // Your OpenZepplin relayer apiKey,
  apiSecret: '' // Your OpenZepplin relaer apiSecret,
}

const wallet = adaptDefenderRelay(credentials)

getClient().actions.buyToken({
  items: [
    {
      collection: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
    },
  ],
  wallet,
  onProgress: () => {},
})

In the code above, we pass in our relayer credentials to adapt the signer to the ReservoirWallet object and pass this into any of the SDK methods. Here we pass it into the buyToken method along with the other required parameters.

Keywords

FAQs

Package last updated on 03 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc