Appearance
Interfaces
Interface ARSGateway
Interface for interacting with the Address Resolution Service (ARS).
Properties
arsGateway.register( popcodeId:
string
, dId:string
, salt:string
) ⇒Promise<any>
Registers a new entry in the ARS with the given Popcode ID, ID, and salt.
arsGateway.batchResolve( assetId:
string
, addresses:string[]
) ⇒Promise<any>
Resolves a batch of addresses associated with the given asset ID.
Interface Database
Interface for performing CRUD operations on a database.
Properties
database.create( collectionName:
string
, data:any
) ⇒Promise<any>
Creates a new record in the specified collection with the provided data.
database.read( collectionName:
string
, query:string
) ⇒Promise<any>
Reads records from the specified collection based on the given query.
database.update( collectionName:
string
, updateData:any
, key:string
) ⇒Promise<any>
Updates a record in the specified collection with the provided data and key.
database.delete( collectionName:
string
, query:string
) ⇒Promise<any>
Deletes records from the specified collection based on the given query.
Interface MPGateway
Interface for managing marketplace operations, including organization and user initialization, listing creation, offers, and proof uploads.
Methods
mpGateway.mpOrganizationInit() ⇒
Promise<any>
Initializes a new marketplace organization.
mpGateway.mpUserInit( email:
string
, password:string
) ⇒Promise<any>
Initializes a new marketplace user with the provided email and password.
mpGateway.draftListing( data:
Listing
) ⇒Promise<any>
Creates a draft listing with the provided data.
mpGateway.createListing( listingId:
string
) ⇒Promise<any>
Creates a listing with the specified ID.
mpGateway.getListingById( id:
string
) ⇒Promise<any>
Retrieves the listing by its ID.
mpGateway.makeOffer( data:
Offer
) ⇒Promise<any>
Submits an offer with the provided data.
mpGateway.getOfferById( id:
string
) ⇒Promise<any>
Retrieves the offer by its ID.
mpGateway.acceptOffer( id:
string
, signature:string
) ⇒Promise<any>
Accepts an offer with the specified ID and signature.
mpGateway.uploadProof( filePath:
string
, description:string
) ⇒Promise<any>
Uploads a proof file with a description.
Interface Notifications
Interface for sending and confirming notifications.
Methods
notifications.sendNotification( data:
SendNotification
) ⇒Promise<any>
Sends a notification with the provided data.
notifications.confirmNotification( data:
ConfirmNotification
) ⇒Promise<any>
Confirms a notification with the provided data.
Interface SendNotification
Interface for sending notifications with asset-related details.
Properties
to:
string
The recipient of the notification.
message:
any
The content of the message.
messageType:
string
The type of the message being sent (e.g., alert, info).
description:
string
A description of the notification's content.
assetId:
string
The ID of the asset associated with the notification.
assetType:
string
The type of the asset related to the notification.
metadata:
any
Additional metadata related to the notification or asset.
Interface ConfirmNotification
Interface for confirming a notification with asset-related details.
Properties
assetType:
string
The type of the asset related to the notification.
messageType:
string
The type of the message being confirmed.
assetId:
string
The ID of the asset associated with the confirmation.
message:
any
The content of the confirmation message.
Interface FileServer
Interface for managing file uploads and downloads.
Methods
fileServer.upload( description:
string
, filePath:string
, fileType:string
) ⇒Promise<any>
Uploads a file with a description and file type.
fileServer.download( accessToken:
string
, cId:string
) ⇒Promise<any>
Downloads a file using the access token and content ID.
Interface IdPredictionOptions
Options for predicting contract addresses in the context of Popcode.
Properties
idPredictionOptions.refId ⇒
string
The reference ID used for prediction.
idPredictionOptions.salt ⇒
string
The salt used for generating the contract address.
idPredictionOptions.admin ⇒
string
The single use/public address of the admin.
idPredictionOptions.uri ⇒
string
The URI associated with the contract.
idPredictionOptions.factoryAddress ⇒
string
The address of the factory contract used for creating new contracts.
Interface TxData
Represents transaction data with details for Ethereum transactions.
Properties
txData.from ⇒
string
Address initiating the transaction.
txData.to? ⇒
string
Address receiving the transaction.
txData.data? ⇒
string
Data payload of the transaction.
txData.value? ⇒
bigint
Amount of value being transferred in the transaction.
txData.nonce ⇒
string
Nonce of the transaction.
txData.gasLimit ⇒
string
Gas limit for the transaction.
txData.gasPrice? ⇒
string
Gas price for the transaction.
txData.chainId ⇒
string
Chain ID for the blockchain network.
txData.offset? ⇒
string
Offset for the transaction data.
Interface Proofs
Represents a collection of proof records, where each proof is associated with a unique identifier.
Properties
proofs.<key> ⇒
string
The value associated with the unique identifier (key) in the proof records. Each key represents a proof identifier, and the corresponding value represents the proof itself.
Interface EvmPopcode
Represents a popcode with associated details.
Properties
evmPopcode.name ⇒
string
The name of the popcode asset.evmPopcode.address ⇒
string
The address of the popcode.evmPopcode.roles ⇒
Roles
The roles associated with the popcode.evmPopcode.tokens ⇒
Tokens
The tokens associated with the popcode.evmPopcode.proofs ⇒
Proofs
The proofs added to the popcode.evmPopcode.children ⇒
string[]
The child addresses of the popcode.evmPopcode.parents ⇒
string[]
The parent addresses of the popcode.
Interface Trail
Represents a trail of events with associated details.
Properties
trail.name ⇒
string
The name of the event.trail.events ⇒
EventDetail
[]
An array of details for each event in the trail.trail.address ⇒
string
The address associated with the transaction.trail.transactionHash ⇒
string
The hash of the transaction.trail.blockNumber ⇒
number
The block number in which the transaction was included.trail.blockHash ⇒
string
The hash of the block in which the transaction was included.trail.blockTimestamp ⇒
number
The timestamp of the block in which the transaction was included.trail.message ⇒
string
A formatted message related to the event.
Interface EventDetail
Represents the details of an event.
Properties
eventDetail.name ⇒
string
The name of the event.eventDetail.type ⇒
string
The type of the event.eventDetail.value ⇒
string
The value associated with the event.
Interface AcceptedEvent
Represents an accepted event.
Properties
- acceptedEvent.acceptor ⇒
string
The address of the entity that accepted the event.
Interface ApprovalForAllEvent
Represents an approval for all event.
Properties
approvalForAllEvent.account ⇒
string
The address of the account being approved.approvalForAllEvent.operator ⇒
string
The address of the operator granting the approval.approvalForAllEvent.approved ⇒
boolean
A boolean indicating whether the approval was granted or not.
Interface ChangeConfirmedEvent
Represents a change confirmed event.
Properties
changeConfirmedEvent.updateType ⇒
string
The type of update that was confirmed.changeConfirmedEvent.fromValue ⇒
string
The previous value before the change.changeConfirmedEvent.toValue ⇒
string
The new value after the change.
Interface ChangeRequestedEvent
Represents a change requested event.
Properties
changeRequestedEvent.sender ⇒
string
The address of the sender requesting the change.changeRequestedEvent.updateType ⇒
string
The type of update being requested.changeRequestedEvent.fromValue ⇒
string
The previous value before the change.changeRequestedEvent.toValue ⇒
string
The new value requested.
Interface ClaimSettledEvent
Represents a claim settled event.
Properties
claimSettledEvent.claimantAddress ⇒
string
The address of the claimant.claimSettledEvent.amount ⇒
string
The amount settled in the claim.
Interface ConditionVerifiedEvent
Represents a condition verified event.
Properties
- conditionVerifiedEvent.conditionId ⇒
string
The ID of the verified condition.
Interface RoleAdminChangedEvent
Represents a role admin changed event.
Properties
roleAdminChangedEvent.role ⇒
string
The role whose admin was changed.roleAdminChangedEvent.previousAdminRole ⇒
string
The previous admin role.roleAdminChangedEvent.newAdminRole ⇒
string
The new admin role.
Interface RoleRevokedEvent
Represents a role revoked event.
Properties
roleRevokedEvent.role ⇒
string
The role that was revoked.roleRevokedEvent.account ⇒
string
The address of the account from which the role was revoked.roleRevokedEvent.sender ⇒
string
The address of the sender who revoked the role.
Interface SkcCmsConnectOptions
Represents options for connecting to the CMS.
Properties
skcCmsConnectOptions.email? ⇒
string
Email used for authentication.
skcCmsConnectOptions.password? ⇒
string
Password used for authentication.
skcCmsConnectOptions.apiKey? ⇒
string
API key for connecting to the CMS without email and password.
Interface Popcode
Represents a Popcode entity with various attributes.
Properties
popcode.id ⇒
string
Unique identifier for the Popcode.
popcode.salt? ⇒
string | null
Salt value for the Popcode.
popcode.uri? ⇒
string | null
URI associated with the Popcode.
popcode.value ⇒
unknown
Value associated with the Popcode, which can be of various types including object, array, string, number, boolean, or null.
popcode.status ⇒
string
Status of the Popcode.
popcode.labels? ⇒
Array<{ value?: string | null, id?: string | null }> | null
Array of labels associated with the Popcode.
popcode.lastLabel? ⇒
string | null
Last label of the Popcode.
popcode.workflow? ⇒
string | null
Workflow associated with the Popcode.
popcode.popcodeDocument? ⇒
unknown
Document associated with the Popcode, which can be of various types including object, array, string, number, boolean, or null.
popcode.events? ⇒
Array<{ txHash: string, eventData?: unknown, id?: string | null }> | null
Array of events related to the Popcode.
popcode.metadata? ⇒
string | null
Metadata associated with the Popcode.
popcode.associatedOrganizations? ⇒
Array<{ relationTo: "v2connectedorganizations" | "v2tenants", value: string }> | null
Array of associated organizations for the Popcode.
popcode.searchBlob? ⇒
string | null
Search blob for the Popcode.
popcode.owner? ⇒
{ name?: string | null, dId?: string | null, address?: string | null, publicKey?: string | null }
Owner details for the Popcode.
popcode.skucode? ⇒
string | null | Skucode
Associated Skucode for the Popcode.
popcode.workflowType? ⇒
string | null
Type of workflow for the Popcode.
popcode.tenant? ⇒
string[] | null
Array of tenant IDs associated with the Popcode.
Interface Skucode
Represents a Skucode entity with various attributes.
Properties
skucode.id ⇒
string
Unique identifier for the Skucode.
skucode.popcode? ⇒
Array<string | Popcode> | null
Associated Popcodes for the Skucode.
skucode.address? ⇒
string | null
Address related to the Skucode.
skucode.tokenId? ⇒
string | null
Token ID for the Skucode.
skucode.hash? ⇒
string | null
Hash value associated with the Skucode.
skucode.brandId? ⇒
string | null
Brand ID for the Skucode.
skucode.itemId? ⇒
string | null
Item ID for the Skucode.
skucode.uom? ⇒
string | null
Unit of measure for the Skucode.
skucode.salt? ⇒
string | null
Salt value for the Skucode.
skucode.nameHashId? ⇒
string | null
Name hash ID for the Skucode.
skucode.status? ⇒
"DRAFTED" | "REGISTERED" | null
Status of the Skucode.
skucode.tenant? ⇒
string[] | null
Array of tenant IDs associated with the Skucode.
Interface Dlpc
Represents a Dlpc entity with various attributes.
Properties
dlpc.id ⇒
string
Unique identifier for the Dlpc.
dlpc.salt? ⇒
string | null
Salt value for the Dlpc.
dlpc.value ⇒
unknown
Value associated with the Dlpc, which can be of various types including object, array, string, number, boolean, or null.
dlpc.documentHash? ⇒
string | null
Document hash for the Dlpc.
dlpc.status ⇒
string
Status of the Dlpc.
dlpc.metadata? ⇒
string | null
Metadata associated with the Dlpc.
dlpc.searchBlob? ⇒
string | null
Search blob for the Dlpc.
dlpc.tenant? ⇒
string[] | null
Array of tenant IDs associated with the Dlpc.
Interface VaultClientOptions
Represents the configuration options required to initialize the Vault class for transaction and storage management.
Properties
VaultClientOptions.pluginPath ⇒
string
The path to the vault plugin used for transactions. This is required for vault integration.
VaultClientOptions.vaultAddress ⇒
string
The address of the vault service where transaction requests will be sent.
VaultClientOptions.vaultToken ⇒
string
The authentication token used to securely interact with the vault service.
Interface KeyPairDetails
Represents the details of a cryptographic key pair.
Properties
KeyPairDetails.privKey? ⇒
string
The private key in hexadecimal format with the
0x
prefix.KeyPairDetails.pubKey ⇒
string
The public key in hexadecimal format with the
0x
prefix.KeyPairDetails.address ⇒
string
The associated address, typically derived from the private key.
KeyPairDetails.xPrivKey? ⇒
string
The extended private key in base58 encoding.
KeyPairDetails.xPubKey? ⇒
string
The extended public key in base58 encoding.
Interface KeyGenerationResult
Represents the result of generating Ethereum and Cosmos key pairs.
Properties
KeyGenerationResult.mnemonic ⇒
string | undefined
The mnemonic phrase used for key generation.
KeyGenerationResult.ethKeyPair ⇒
KeyPairDetails
The generated Ethereum key pair details.
KeyGenerationResult.cosmosKeyPair ⇒
KeyPairDetails
The generated Cosmos key pair details.
Types
Type DlpcDoc
Represents the document details of a DLPC (Documentary Letter of Credit) contract.
Properties
dlpcDoc.committee ⇒
string
The address of the committee.dlpcDoc.committer ⇒
string
The address of the committer.dlpcDoc.denom ⇒
string
The denomination of the DLPC.dlpcDoc.amount ⇒
string
The amount specified in the DLPC.dlpcDoc.dlpcDocumentHash ⇒
string
The hash of the DLPC document.dlpcDoc.dueDate ⇒
string
The due date of the DLPC.
Type Conditions
Represents the conditions associated with a contract.
Properties
- conditions[ conditionId ] ⇒
string
The condition ID as the key, with the value being the condition data.
Type Attestation
Represents the attestation status for various parties.
Properties
- attestation[< party >] ⇒
boolean
The address or identifier of the party, with the value indicating whether the party has attested.
Type Tokens
Represents a collection of token records, where each token ID is associated with an array of token ledger entries.
Properties
tokens.[tokenId] ⇒ TokenLedger[]
An array of token ledger entries associated with the token ID. Each entry represents a specific ledger record for the token.
Type TokenLedger
Represents a token ledger entry with an address and quantity.
Properties
tokenLedger.address ⇒
string
The address associated with the token.
tokenLedger.qty ⇒
number
The quantity of tokens.
Type Roles
Maps role names to addresses or arrays of addresses.
Properties
roles[< roleName >] ⇒
string[] | string
The role name maps to either an array of addresses or a single address.