Type Definitions
This page provides detailed information about the type definitions used in the Trust Engine SDK.
createWallet
Options
Unique identifier for the user.
Response
An object containing the details of the created wallet. The address of the new wallet.
The blockchain the wallet was created on.
The ID of the transaction that created the wallet.
A URL to view the transaction on a block explorer.
User ID connected to the wallet address
registerFile
Options
The title of the content.
The address of the wallet to register the file with.
walletType
'self' | 'managed'
required
The type of wallet to use.
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)
An object containing the details of the registration. The status of the registration.
The ID of the transaction that registered the file.
The Program Derived Address for the registration.
The SHA256 hash of the file content.
The IPFS CID of the file.
A URL to view the transaction on a block explorer.
For Self Wallets (202 Accepted)
An object containing the details of the registration. The status of the registration.
A base64 encoded transaction that needs to be signed by the client.
The IPFS CID of the file.
The Program Derived Address for the registration.
The SHA256 hash of the file content.
searchFile
Parameters
Optional wallet address to filter search results to specific registrations.
Response
The type of search performed.
A message indicating the search results.
The search parameters that were used. The content hash that was searched for.
Number of registration records found.
An array of objects, where each object contains the details of a registration record. The chosen title of the registration
The SHA256 hash of the file content.
The Program Derived Address for the registration.
The IPFS Content Identifier for metadata storage.
The wallet address that registered the file.
The user ID associated with the creator of the file (null if no relation found).
ISO timestamp when file was registered.
Status of the registration.
Link to view on Solana Explorer.
Optional metadata about the file from the user
Identity data they decided to reveal about themselves
linkWallet
Options
The user’s wallet address.
Response
An object containing the details of the user-key relation. The user’s wallet address.
The ID of the transaction that stored the user-key relation.
A URL to view the transaction on a block explorer.
submitTransaction
Options
A base64 encoded transaction.
Response
An object containing the details of the transaction. The ID of the transaction.
A URL to view the transaction on a block explorer.
verifyIdentity
Options
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. Country/state that issued the ID document.
Full name from ID document.
Document/passport number.
Document expiration date.
Response
New Session Created (201)
Confirmation that the identity verification session was created.
Session information and verification instructions. URL for identity verification that can be opened in Self.xyz app.
The wallet address for this verification session.
Object showing which identity fields were requested (only shows true values).
Current verification status: "pending".
ISO timestamp when the session was created.
ISO timestamp when the session expires (24 hours from creation).
User-friendly instructions for completing verification.
Existing Session Found (200)
Message indicating an existing pending session was found.
Existing session information. URL for identity verification.
The wallet address for this verification session.
All disclosure fields with boolean values.
Current verification status: "pending".
ISO timestamp when the session was created.
ISO timestamp when the session expires.
Instructions for the existing session.
checkIdentityStatus
Parameters
Valid Solana wallet address (Base58 format) to check verification status for.
Response
Confirmation that the session was retrieved successfully.
Complete session information and verification data. The wallet address for this verification session.
status
'pending' | 'verified' | 'failed' | 'expired'
Current verification status.
ISO timestamp when the session was created.
ISO timestamp when the session expires (24 hours from creation).
ISO timestamp when verification was completed (null if not yet verified).
Object showing which identity fields were requested for verification. Whether issuing state was requested.
Whether name was requested.
Whether nationality was requested.
Whether date of birth was requested.
Whether passport number was requested.
Whether gender was requested.
Whether expiry date was requested.
Contains the actual verified identity data (only present when status is ‘verified’). Country/state that issued the ID document.
Full name from the ID document.
Date of birth from the document.
Document/passport number.
Gender from the ID document.
Document expiration date.
Unique identifier from Self.xyz verification system.
findWallet
Options
The user’s wallet address.
Response
Whether the request was successful.
A message describing the result of the request.
An object containing the details of the found wallet. The type of search that was performed.
The value that was searched for.
An object containing the details of the wallet relation. The user’s wallet address.
The date the relation was created.
The Program Derived Address for the relation.