Skip to content

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.refIdstring

    The reference ID used for prediction.

  • idPredictionOptions.saltstring

    The salt used for generating the contract address.

  • idPredictionOptions.adminstring

    The single use/public address of the admin.

  • idPredictionOptions.uristring

    The URI associated with the contract.

  • idPredictionOptions.factoryAddressstring

    The address of the factory contract used for creating new contracts.

Interface TxData

Represents transaction data with details for Ethereum transactions.

Properties

  • txData.fromstring

    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.noncestring

    Nonce of the transaction.

  • txData.gasLimitstring

    Gas limit for the transaction.

  • txData.gasPrice? ⇒ string

    Gas price for the transaction.

  • txData.chainIdstring

    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.namestring
    The name of the popcode asset.

  • evmPopcode.addressstring
    The address of the popcode.

  • evmPopcode.rolesRoles
    The roles associated with the popcode.

  • evmPopcode.tokensTokens
    The tokens associated with the popcode.

  • evmPopcode.proofsProofs
    The proofs added to the popcode.

  • evmPopcode.childrenstring[]
    The child addresses of the popcode.

  • evmPopcode.parentsstring[]
    The parent addresses of the popcode.

Interface Trail

Represents a trail of events with associated details.

Properties

  • trail.namestring
    The name of the event.

  • trail.eventsEventDetail[]
    An array of details for each event in the trail.

  • trail.addressstring
    The address associated with the transaction.

  • trail.transactionHashstring
    The hash of the transaction.

  • trail.blockNumbernumber
    The block number in which the transaction was included.

  • trail.blockHashstring
    The hash of the block in which the transaction was included.

  • trail.blockTimestampnumber
    The timestamp of the block in which the transaction was included.

  • trail.messagestring
    A formatted message related to the event.

Interface EventDetail

Represents the details of an event.

Properties

  • eventDetail.namestring
    The name of the event.

  • eventDetail.typestring
    The type of the event.

  • eventDetail.valuestring
    The value associated with the event.

Interface AcceptedEvent

Represents an accepted event.

Properties

  • acceptedEvent.acceptorstring
    The address of the entity that accepted the event.

Interface ApprovalForAllEvent

Represents an approval for all event.

Properties

  • approvalForAllEvent.accountstring
    The address of the account being approved.

  • approvalForAllEvent.operatorstring
    The address of the operator granting the approval.

  • approvalForAllEvent.approvedboolean
    A boolean indicating whether the approval was granted or not.

Interface ChangeConfirmedEvent

Represents a change confirmed event.

Properties

  • changeConfirmedEvent.updateTypestring
    The type of update that was confirmed.

  • changeConfirmedEvent.fromValuestring
    The previous value before the change.

  • changeConfirmedEvent.toValuestring
    The new value after the change.

Interface ChangeRequestedEvent

Represents a change requested event.

Properties

  • changeRequestedEvent.senderstring
    The address of the sender requesting the change.

  • changeRequestedEvent.updateTypestring
    The type of update being requested.

  • changeRequestedEvent.fromValuestring
    The previous value before the change.

  • changeRequestedEvent.toValuestring
    The new value requested.

Interface ClaimSettledEvent

Represents a claim settled event.

Properties

  • claimSettledEvent.claimantAddressstring
    The address of the claimant.

  • claimSettledEvent.amountstring
    The amount settled in the claim.

Interface ConditionVerifiedEvent

Represents a condition verified event.

Properties

  • conditionVerifiedEvent.conditionIdstring
    The ID of the verified condition.

Interface RoleAdminChangedEvent

Represents a role admin changed event.

Properties

  • roleAdminChangedEvent.rolestring
    The role whose admin was changed.

  • roleAdminChangedEvent.previousAdminRolestring
    The previous admin role.

  • roleAdminChangedEvent.newAdminRolestring
    The new admin role.

Interface RoleRevokedEvent

Represents a role revoked event.

Properties

  • roleRevokedEvent.rolestring
    The role that was revoked.

  • roleRevokedEvent.accountstring
    The address of the account from which the role was revoked.

  • roleRevokedEvent.senderstring
    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.idstring

    Unique identifier for the Popcode.

  • popcode.salt? ⇒ string | null

    Salt value for the Popcode.

  • popcode.uri? ⇒ string | null

    URI associated with the Popcode.

  • popcode.valueunknown

    Value associated with the Popcode, which can be of various types including object, array, string, number, boolean, or null.

  • popcode.statusstring

    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.idstring

    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.idstring

    Unique identifier for the Dlpc.

  • dlpc.salt? ⇒ string | null

    Salt value for the Dlpc.

  • dlpc.valueunknown

    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.statusstring

    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.pluginPathstring

    The path to the vault plugin used for transactions. This is required for vault integration.

  • VaultClientOptions.vaultAddressstring

    The address of the vault service where transaction requests will be sent.

  • VaultClientOptions.vaultTokenstring

    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.pubKeystring

    The public key in hexadecimal format with the 0x prefix.

  • KeyPairDetails.addressstring

    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.mnemonicstring | undefined

    The mnemonic phrase used for key generation.

  • KeyGenerationResult.ethKeyPairKeyPairDetails

    The generated Ethereum key pair details.

  • KeyGenerationResult.cosmosKeyPairKeyPairDetails

    The generated Cosmos key pair details.


Types

Type DlpcDoc

Represents the document details of a DLPC (Documentary Letter of Credit) contract.

Properties

  • dlpcDoc.committeestring
    The address of the committee.

  • dlpcDoc.committerstring
    The address of the committer.

  • dlpcDoc.denomstring
    The denomination of the DLPC.

  • dlpcDoc.amountstring
    The amount specified in the DLPC.

  • dlpcDoc.dlpcDocumentHashstring
    The hash of the DLPC document.

  • dlpcDoc.dueDatestring
    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.addressstring

    The address associated with the token.

  • tokenLedger.qtynumber

    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.