PrivMX DOCS
API Reference/PrivMX Endpoint Web/Api reference

Endpoint

Class with the static factory methods to create instances of Connection and APIs

Fields

api

Api

eventQueueInstance

EventQueue

Methods

setup

Load the Endpoint's WASM assets and initialize the Endpoint library.

Params

assetsBasePath

string

base path/url to the Endpoint's WebAssembly assets (like: endpoint-wasm-module.js, driver-web-context.js and others)

setup(assetsBasePath)

getEventQueue

Gets the EventQueue instance.

getEventQueue()

Returns

Promise<EventQueue> · instance of EventQueue

connect

Connects to the platform backend.

Params

userPrivKey

string

user's private key

solutionId

string

ID of the Solution

bridgeUrl

string

the Bridge Server URL

connect(userPrivKey, solutionId, bridgeUrl)

Returns

Promise<Connection> · instance of Connection

connectPublic

Connects to the Platform backend as a guest user.

Params

solutionId

string

ID of the Solution

bridgeUrl

string

the Bridge Server URL

connectPublic(solutionId, bridgeUrl)

Returns

Promise<Connection> · instance of Connection

createThreadApi

Creates an instance of the Thread API.

Params

connection

Connection

instance of Connection

createThreadApi(connection)

Returns

Promise<ThreadApi> · instance of ThreadApi

createStoreApi

Creates an instance of the Store API.

Params

connection

Connection

instance of Connection

createStoreApi(connection)

Returns

Promise<StoreApi> · instance of StoreApi

createInboxApi

Creates an instance of the Inbox API.

Params

connection

Connection

instance of Connection

threadApi

ThreadApi

instance of ThreadApi

storeApi

StoreApi

instance of StoreApi

createInboxApi(connection, threadApi, storeApi)

Returns

Promise<InboxApi> · instance of InboxApi

createCryptoApi

Creates an instance of the Crypto API.

createCryptoApi()

Returns

Promise<CryptoApi> · instance of CryptoApi

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.