Usage
import {Passport} from '@credenza-web3/passport'
or
const Passport = window.CredenzaPassport
const TransactionUI = window.CredenzaTUI
const passport = new Passport() // See passport docs for more...
await passport.init()
passport.openUI(Passport.pages.PAYMENT, {
title: string,
subtitle: string,
payments?: {
credenzaStoredValue?: {
disabled?: boolean //default - false
},
stripe?: {
disabled?: boolean // default - false
}
},
// This will help credenza to get a price and figure out a token to be transferred
token?: {
// Should either have tokenId or typeId
address: string, // contract address
tokenId?: string, // token id if exists
typeId?: string // if buying membership. If typeId === "0", API will treat it as a simple memberships purchase. If typeId > "0", ex. "1", "2", API will look for club memberships purchase.
amount?: number // amount of tokens if exists. For ERC721 either ignore it, or set 1. will be ignored for memberships purchase
},
email?: {
templateId?: string // For custom email template usage
}
})
Last updated