@moonpay/login-sdk
v1.2.0
Published
Moonpay's Wallet SDK is a library that allows you to integrate Moonpay wallets into a Moonpay user's journey.
Downloads
1,439
Maintainers
Keywords
Readme
MoonPay Wallet SDK
Moonpay's Wallet SDK is a library that allows you to integrate Moonpay wallets into a Moonpay user's journey.
Installation
npm install @moonpay/login-sdk
Requirements
To use in our live environment you will need to provide your live api key found in the moonpay dashboard. Check out Usage below for more details.
Usage
Follow our example here: https://github.com/moonpay/login-sdk-demo/blob/main/src/App.tsx
Init from the example:
// @ts-ignore
import { MoonpayWalletSDK } from "@moonpay/login-sdk";
const sdk = new MoonpayWalletSDK({
loginDomain: "https://buy-sandbox.moonpay.com",
secureWalletDomain: "https://web3.moonpay.com",
apiKey: "pk_test_123",
});
Replace loginDomain
with https://buy.moonpay.com
if you are using a live api key.
Next.js
Note: if you are using next.js add the following to your next.config.js
:
const nextConfig = {
transpilePackages: ['@moonpay/login-common', '@moonpay/login-sdk'],
}