0.5.4 • Published 2 years ago

@wagpay/id v0.5.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

NPM Twitter Follow

@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 data
  • api_key: string - API Key (only given to wallets)
  • signed_msg: string - Signed message by default address in CreateIDParams

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
0.5.4

2 years ago

0.5.3

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago