@wagpay/id
v0.5.4
Published
Cross Chain ID
Downloads
4
Maintainers
Readme
@wagpay/id
WagPay ID makes interacting with Wallet IDs more easier. Transact (Single/Cross Chain) between Wallet IDs and never worry about addresses again!
A True Cross Chain ID
Installation
To install the SDK, you can run the following command:
yarn add @wagpay/id
or
npm install @wagpay/id
or
pnpm install @wagpay/id
Documentation
WagPay ID SDK will be used for
wagpay.get_id()
wagpay.create_id()
wagpay.pay()
wagpay.create_qr()
wagpay.create_payment_request()
wagpay.get_id()
Get addresses for an ID
Params
id: string
- WagPay ID which addresses and data you want
Response
id: ID
- WagPay ID
wagpay.create_id()
(accessed only by selected providers)
Create IDs for addresses (only select providers can access this function)
Params
params: CreateIDParams
- WagPay ID dataapi_key: string
- API Key (only given to wallets)signed_msg: string
- Signed message by default address inCreateIDParams
Response
id: ID
- WagPay ID
wagpay.pay()
Transact between IDs even if both IDs are on complete different chains (auto detects if evm or solana)
Params
user_config: UserPayConfig
- User payment config (what user wants to pay)config: PaymentParams
- payment params for payment request or qr code (optional)
Response
transaction_data: any
- it can be either evm tx data or solana tx data (single chain or cross chain)
wagpay.create_qr()
Create QR Codes for (possibly) cross chain payments
Params
config: PaymentParams
- payment params for qr code
Response
qr_code: string
- uri for generating qr codes
wagpay.create_payment_request()
Create payment requests which can be shown in the wallet app
Params
config: CreatePaymentRequest
- payment params for payment request
Response
payment_request: PaymentParams
- payment params for payment request