AssetX API: ZK Auth

Routes

POST /api/zkme

Creates a new entry in the database using the information provided by issuer.

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request body:

{
    wallet: String,         // Address of zkMe account holder
    signature: String,      // Signed message using 'wallet'
    message: String,        // Message containing 'wallet'
    apiKey: String,         // API key issued by ZKMe
    appId: String,          // AppID of issuer
    programNames: String[], // Program names (app names)
    programNos: String[],   // Program numbers
    cooperators: String[],  // Cooperators (addresses)
    chainIds: Number[]      // ChainIDs (must be numbers)
}

POST /api/zkme/:wallet/programs

Adds a new program to the existing entry for a zkMe account holder. Wallet is used as a key to the database issuer entry - it must already exist.

[!IMPORTANT] Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String,        // Message containing 'wallet'
    programName: String,    // Program name (app name)
    programNo: String,      // Program number
    cooperator: String,     // Cooperator (address)
    chainId: Number         // ChainID (must be number)
}

POST /api/zkme/:wallet/token

Get the zkMe token.

⚠️ Important

Verifies the IP address before operation - it must be either the front end IP address, or the localhost for testing.

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String         // Message containing 'wallet'
}

GET /

Return this document.

GET /api/zkme/:wallet

Reads the saved issuer entry (if it exists), using the wallet address as a key.

⚠️ Important

Verifies the IP address before operation - it must be either the front end IP address, or the localhost for testing.

Request params: wallet: String

GET /api/zkme/:wallet/:programNo/program

Get the specific program for the given wallet address and program number.

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String, programNo: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String        // Message containing 'wallet'
}

GET /api/zkme/:wallet/:programNo/programConfig

Get program configuration from zkMe API with transformed data including citizenship countries as ISO codes, sanctions status, age requirements, and location restrictions.

⚠️ Important

Verifies the IP address before operation - it must be either the front end IP address, or the localhost for testing.

Request params: wallet: String, programNo: String

Response includes:

POST /api/zkme/:wallet/kycInfoByAddress

Get user's KYC verification status including Proof-of-Citizenship (zkPoC), Proof-of-Location (zkPoL), and AML Check (AMLMe).

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String,        // Message containing 'wallet'
    programNo: String,      // Program number
    chainId: Number         // Chain ID
}

Response includes KYC status, verification results, and verifier values for sanction, age, citizenship, and location checks.

POST /api/zkme/:wallet/userList

Get a paginated list of users who have authorized Soulbound Tokens under the project account.

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String,        // Message containing 'wallet'
    page: Number,           // Page number
    num: Number             // Number of entries per page
}

Response includes filtered user wallet addresses and pagination metadata.

POST /api/zkme/:wallet/kycStats

Get KYC statistics including participant counts, verification status, and daily activity data.

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String         // Message containing 'wallet'
}

Response includes total participants, verified count, daily activity data, and MeID statistics.

POST /api/zkme/:wallet/accreditedInvestorStatus

Check user's accredited investor verification status.

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String,        // Message containing 'wallet'
    programNo: String,      // Program number
    chainId: Number         // Chain ID
}

Response includes PoAI status, completion timestamp, SSI address, and zkMe ID.

PUT /api/zkme/:wallet

Updates the data saved by zkMe account holder. Uses wallet as a key.

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String,        // Message containing 'wallet'
    apiKey: String,         // API key issued by ZKMe
    appId: String,          // AppID of issuer
    programNames: String[], // Program names (app names)
    programNos: String[],   // Program numbers
    cooperators: String[],  // Cooperators (addresses)
    chainIds: Number[]      // ChainIDs (must be numbers)
}

DELETE /api/zkme/:wallet

Deletes the corresponding issuer entry from the database, using 'wallet' as a key. It must already exist.

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String,        // Message containing 'wallet'
}

DELETE /api/zkme/:wallet/programs/:programNo

Deletes the program corresponding to the provided programNo by removing it from the issuer array. The program must already exist in the database.

⚠️ Important

Verifies the authenticity before operation - signature and message must be passed, where message is the wallet address.

Request params: wallet: String, programNo: String

Request body:

{
    signature: String,      // Signed message using 'wallet'
    message: String,        // Message containing 'wallet'
}