Skip to content

SkcSctCms

SkcSctCms class provides functionalities to interact with the CMS, including CRUD operations, file uploads, and Ethereum transaction signing. It implements the following interfaces: Database, Privacy Service.

Creating Instances

new SkcSctCms( baseUrl: string )

Creates a new instance of SkcSctCms, enabling interaction with the CMS for data management and on-chain operations.

Properties

  • SkcSctCms.baseUrlstring
    The base URL of the CMS.

Instance Methods

skcSctCms.login ( options: SkcCmsConnectOptions )

Logs in to the CMS using API keys or credentials, retrieves the user, and sets up the provider for Ethereum interactions.



skcSctCms.create ( collectionName: string, data: any )

Creates a new record in the specified CMS collection.



skcSctCms.read ( collectionName: string, query?: string ) ⇒ Promise<any>

Retrieves records from the specified CMS collection with optional query parameters.



skcSctCms.update ( collectionName: string, updateData: Popcode | Dlpc | Skucode, id?: string )

Updates an existing record in the CMS collection by ID.



skcSctCms.delete ( collectionName: string, id: string )

Deletes a record from the CMS collection by ID.



skcSctCms.setupUser ( mnemonic: string) ⇒ Promise<any>

Sets up a user in the CMS using the provided mnemonic. If no mnemonic is provided, the CMS will generate one



skcSctCms.prepareTxTokenLedger ( methodName: string, args: string, tokenLedgerId: string, memo?: string ) ⇒ Promise<any>

Prepares a transaction for a specific journal operation in the CMS.



skcSctCms.prepareTxTokenType ( methodName: string, args: string, tokenTypeId: string, memo?: string ) ⇒ Promise<any>

Prepares a transaction for a specific journal operation in the CMS.



skcSctCms.createTokenType ( name: string, category: string, itemId: string, denom: string, description: string, type: string, initialSupply: string ) ⇒ Promise<any>

Creates a new Supply Chain Tokens (SCT) using CMS.



skcSctCms.createTokenLedger ( name: string, description: string, offset: string, uri: string, type: string ) ⇒ Promise<any>

Creates a new Token Ledger.



skcSctCms.signTx ( unsignedTxData: { from: string, to: string, data: string, nonce: string, gasLimit: string, chainId: string, offset: string, } ) ⇒ Promise<any>

Signs a prepared Ethereum transaction using the CMS KMS.



skcSctCms.submitTx ( signedTxData: string, msgName?: string, memo?: string, scts?: string[], tokenLedgers?: string[] ) ⇒ Promise<any>

Submits a signed Ethereum transaction for a journal operation to the EVM.



skcSctCms.tokenLedgerDetails ( tokenLedgerId: string ) ⇒ Promise<any>

Fetches details of a specific Token Ledger from the privacy service.



skcSctCms.tokenTypeDetails ( tokenTypeId: string ) ⇒ Promise<any>

Fetches details of a specific SCT



skcSctCms.decrypt ( txHash: string ) ⇒ Promise<any>

Decrypts the given cipherText using the privacy service.



skcSctCms.encrypt ( plainText: string ) ⇒ Promise<any>

Encrypts the provided plainText using the privacy service.