Preparing search index...
The search index is not available cardstack
Class PrepaidCardMarketClass
Constructors
constructor
new Prepaid Card Market Class( layer2Web3: default , layer2Signer?: Signer ) : PrepaidCardMarketClass
Parameters
layer2Web3: default
Optional
layer2Signer: Signer
Properties
Private
layer2 Web3
layer2 Web3: default
Private
Optional
layer2 Signer
layer2 Signer?: Signer
Cardpay
get Inventory
get Inventory( sku: string , marketAddress?: string ) : Promise < PrepaidCardSafe [] >
Parameters
sku: string
Optional
marketAddress: string
Methods
is Paused
is Paused( marketAddress?: string ) : Promise < boolean >
Parameters
Optional
marketAddress: string
Returns Promise < boolean >
getSKUInfo
getSKUInfo( sku: string , marketAddress?: string ) : Promise < undefined | { faceValue: number ; issuer: string ; issuingToken: string ; customizationDID: string ; askPrice: string ; } >
Parameters
sku: string
Optional
marketAddress: string
Returns Promise < undefined | { faceValue: number ; issuer: string ; issuingToken: string ; customizationDID: string ; askPrice: string ; } >
add To Inventory
add To Inventory( txnHash: string ) : Promise < SuccessfulTransactionReceipt >
Returns Promise < SuccessfulTransactionReceipt >
add To Inventory( fundingPrepaidCard: string , prepaidCardToAdd: string , marketAddress?: string , txnOptions?: TransactionOptions , contractOptions?: ContractOptions ) : Promise < SuccessfulTransactionReceipt >
Parameters
fundingPrepaidCard: string
prepaidCardToAdd: string
Optional
marketAddress: string
Optional
contractOptions: ContractOptions
Returns Promise < SuccessfulTransactionReceipt >
remove From Inventory
remove From Inventory( txnHash: string ) : Promise < SuccessfulTransactionReceipt >
Returns Promise < SuccessfulTransactionReceipt >
remove From Inventory( fundingPrepaidCard: string , prepaidCardAddresses: string [] , marketAddress?: string , txnOptions?: TransactionOptions , contractOptions?: ContractOptions ) : Promise < SuccessfulTransactionReceipt >
Parameters
fundingPrepaidCard: string
prepaidCardAddresses: string []
Optional
marketAddress: string
Optional
contractOptions: ContractOptions
Returns Promise < SuccessfulTransactionReceipt >
set Ask
set Ask( txnHash: string ) : Promise < SuccessfulTransactionReceipt >
Returns Promise < SuccessfulTransactionReceipt >
set Ask( prepaidCard: string , sku: string , askPrice: string , marketAddress?: string , txnOptions?: TransactionOptions , contractOptions?: ContractOptions ) : Promise < SuccessfulTransactionReceipt >
Parameters
prepaidCard: string
sku: string
askPrice: string
Optional
marketAddress: string
Optional
contractOptions: ContractOptions
Returns Promise < SuccessfulTransactionReceipt >
get Prepaid Card From Provision Txn Hash
get Prepaid Card From Provision Txn Hash( txnHash: string , marketAddress?: string ) : Promise < PrepaidCardSafe >
Parameters
txnHash: string
Optional
marketAddress: string
Private
get Add To Inventory Payload
get Add To Inventory Payload( fundingPrepaidCard: string , prepaidCardToAdd: string , previousOwnerSignature: string , marketAddress: string , rate: string ) : Promise < SendPayload >
Parameters
fundingPrepaidCard: string
prepaidCardToAdd: string
previousOwnerSignature: string
marketAddress: string
rate: string
Private
execute Add To Inventory
execute Add To Inventory( fundingPrepaidCard: string , prepaidCardToAdd: string , previousOwnerSignature: string , marketAddress: string , rate: string , payload: SendPayload , signatures: Signature [] , nonce: BN ) : Promise < GnosisExecTx >
Parameters
fundingPrepaidCard: string
prepaidCardToAdd: string
previousOwnerSignature: string
marketAddress: string
rate: string
nonce: BN
Private
get Remove From Inventory Payload
get Remove From Inventory Payload( fundingPrepaidCard: string , prepaidCardAddresses: string [] , marketAddress: string , rate: string ) : Promise < SendPayload >
Parameters
fundingPrepaidCard: string
prepaidCardAddresses: string []
marketAddress: string
rate: string
Private
execute Remove From Inventory
execute Remove From Inventory( fundingPrepaidCard: string , prepaidCardAddresses: string [] , marketAddress: string , rate: string , payload: SendPayload , signatures: Signature [] , nonce: BN ) : Promise < GnosisExecTx >
Parameters
fundingPrepaidCard: string
prepaidCardAddresses: string []
marketAddress: string
rate: string
nonce: BN
Private
get Set Ask Payload
get Set Ask Payload( prepaidCardAddress: string , sku: string , askPrice: string , marketAddress: string , rate: string ) : Promise < SendPayload >
Parameters
prepaidCardAddress: string
sku: string
askPrice: string
marketAddress: string
rate: string
Private
execute Set Ask
execute Set Ask( prepaidCardAddress: string , sku: string , askPrice: string , marketAddress: string , rate: string , payload: SendPayload , signatures: Signature [] , nonce: BN ) : Promise < GnosisExecTx >
Parameters
prepaidCardAddress: string
sku: string
askPrice: string
marketAddress: string
rate: string
nonce: BN
The
PrepaidCardMarket
API is used to manage the inventory prepaid cards in the market contract, whose purpose is to provision prepaid cards to consumers who buy them. This API is used within the layer 2 network in which the Card Protocol runs. ThePrepaidCardMaket
API can be obtained fromgetSDK()
with aWeb3
instance that is configured to operate on a layer 2 network (like Gnosis Chain or Sokol).Example