Introduction

Introduction

MetaKeep JS is a lightweight SDK that does these things:

  1. Get users' wallet
  2. Get consent from users
  3. Get users to sign custom transactions

If you're using MetaKeep's NFT Transfers & Coin Transfers APIs, all you need is a line of code on the client side, that looks something like the below for getting the user's consent.

sdk.getConsent(consentToken);

If you already have an existing Web3 app, MetaKeep JS is a drop-in Web3 JS provider that works alongside your existing code, with just one line of change. You don't have to change anything else to get users to sign transactions.

const web3 = new Web3(await sdk.ethereum);

Importing the SDK

Please refer to the Web SDK installation guide for more details.

Initializing the SDK

Please refer to the Web SDK initialization guide for more details.

If you are an advanced user, SDK also supports web3 provider integration.

Blockchain configuration options

Here are all possible blockchain configuration options supported by the SDK

OptionDescriptionRequired
chainIdThe chain that you want to use e.g. 80002 for Polygon Amoy and 137 for Polygon Mainnnet.

This is only required if you are using the web3 provider.
No
rpcNodeUrlsThis is a map from chainId to RPC node URLs. This allows your web3 provider to switch chains if needed.

E.g.
{ 80002: "https://polygon-amoy.g.alchemy.com/v2/<api-key>" }

This is only required if you are using the web3 provider.
No

© Copyright 2024, Passbird Research Inc.