Enoki API Specification
POST
/v1/zklogin/nonce
Create zkLogin nonce
Generates a nonce used in the zkLogin OAuth flow. Using this API is not required, you can also construct a nonce client-side if desired.
Request Body (Optional)
network
string
The Sui network you wish to use. Defaults to mainnet
.
"mainnet"
Value in: "testnet" | "mainnet" | "devnet"
ephemeralPublicKey
Requiredstring
The ephemeral public key created during the zkLogin process, encoded as a base64 string.
additionalEpochs
number
The amount of epochs that you would like to have the nonce be valid for.
Default:2
Minimum: 0
Maximum: 30
Status code | Description |
---|---|
200 | Successful response |
POST
/v1/zklogin/zkp
Create zkLogin ZKP
Creates a zero-knowledge proof, which is used to submit transactions to Sui.
Request Body (Optional)
network
string
The Sui network you wish to use. Defaults to mainnet
.
"mainnet"
Value in: "testnet" | "mainnet" | "devnet"
ephemeralPublicKey
Requiredstring
The ephemeral public key created during the zkLogin process, encoded as a base64 string.
maxEpoch
Requiredinteger
The maxEpoch
created during the zkLogin process.
0
randomness
Requiredstring
The randomness
created during the zkLogin process.
Header Parameters
zklogin-jwt
Requiredstring
The JWT of the user signed in with zkLogin.
Status code | Description |
---|---|
200 | Successful response |
POST
/v1/transaction-blocks/sponsor
Create sponsored transaction
Creates sponsored transaction
Request Body (Optional)
network
string
The Sui network you wish to use. Defaults to mainnet
.
"mainnet"
Value in: "testnet" | "mainnet" | "devnet"
transactionBlockKindBytes
Requiredstring
Bytes of the transaction with the onlyTransactionKind
flag set to true.
sender
string
The address sending the transaction. Include this parameter if not including the zklogin-jwt
header. This option is only supported when calling the API from a backend service using a private
key.
allowedAddresses
array of string
List of Sui addresses that can be present in the transaction. These addresses are combined with the list configured in the Enoki Developer Portal. Transactions attempting to refer to or transfer assets outside of these addresses are rejected.
allowedMoveCallTargets
array of string
List of permitted Move targets the sponsored user's transactions can call.
Header Parameters
zklogin-jwt
string
The JWT of the user signed in with zkLogin.
Status code | Description |
---|---|
200 | Successful response |
POST
/v1/transaction-blocks/sponsor/{digest}
Submits a sponsored transaction for execution
Submits a transaction created from /transaction-blocks/sponsor
for execution.
Request Body (Optional)
signature
Requiredstring
User signature of the transaction.
Path Parameters
digest
Requiredstring
The digest of the previously-created sponsored transaction block to execute.
Status code | Description |
---|---|
200 | Successful response |
GET
/v1/zklogin
Get address for zkLogin user
Returns the address and salt value for the given JWT. If the JWT is not valid, the API will return an error code.
Header Parameters
zklogin-jwt
Requiredstring
The JWT of the user signed in with zkLogin.
Status code | Description |
---|---|
200 | Successful response |
GET
/v1/app
Get app metadata
Returns the public metadata (configured in the Enoki Developer Portal) of the app associated with the API key.
Status code | Description |
---|---|
200 | Successful response |