Type Definitions

This page provides detailed information about the type definitions used in the Trust Engine SDK.

createWallet

Options

userID
string
required
Unique identifier for the user.

Response

message
string
A success message.
details
object
An object containing the details of the created wallet.

registerFile

Options

file
File
required
The file to register.
contentTitle
string
required
The title of the content.
walletAddress
string
required
The address of the wallet to register the file with.
walletType
'self' | 'managed'
required
The type of wallet to use.
metadata
string
Additional metadata to store with the file.
signTransaction
(transaction: Transaction) => Promise<Transaction>
A function to sign a transaction. Usually a function from your wallet provider (Phantom, Metamask, etc. )

Response

The response from registering a file. This can vary depending on whether the wallet type is 'self' or 'managed'.

For Managed Wallets (200 OK)

message
string
A success message.
details
object
An object containing the details of the registration.

For Self Wallets (202 Accepted)

message
string
A success message.
details
object
An object containing the details of the registration.

searchFile

Parameters

file
File
required
The file to search for.
walletAddress
string
Optional wallet address to filter search results to specific registrations.

Response

searchMode
string
The type of search performed.
message
string
A message indicating the search results.
searchCriteria
object
The search parameters that were used.
totalResults
number
Number of registration records found.
registrations
Array<object>
An array of objects, where each object contains the details of a registration record.

linkWallet

Options

userID
string
required
The user’s ID.
walletAddress
string
required
The user’s wallet address.

Response

message
string
A success message.
details
object
An object containing the details of the user-key relation.

submitTransaction

Options

transaction
string
required
A base64 encoded transaction.

Response

message
string
A success message.
details
object
An object containing the details of the transaction.

verifyIdentity

Options

walletAddress
string
required
Valid Solana wallet address (Base58 format). Must have an existing user-key relation in the system.
disclosures
IdentityDisclosures
required
Object specifying which identity fields to request verification for. All 7 fields must be explicitly provided with boolean values. At least one field must be set to true.

Response

New Session Created (201)

message
string
Confirmation that the identity verification session was created.
details
object
Session information and verification instructions.

Existing Session Found (200)

message
string
Message indicating an existing pending session was found.
details
object
Existing session information.

checkIdentityStatus

Parameters

walletAddress
string
required
Valid Solana wallet address (Base58 format) to check verification status for.

Response

message
string
Confirmation that the session was retrieved successfully.
details
object
Complete session information and verification data.

findWallet

Options

userID
string
The user’s ID.
walletAddress
string
The user’s wallet address.

Response

success
boolean
Whether the request was successful.
message
string
A message describing the result of the request.
details
object
An object containing the details of the found wallet.