Enoki API Specification
HTTP API for Enoki
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.
Authorization
Authorization
RequiredBearer <token>
In: header
Request Body
application/json
Requirednetwork
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.
2
Minimum: 0
Maximum: 30
Successful response
Create zkLogin ZKP
Creates a zero-knowledge proof, which is used to submit transactions to Sui.
Authorization
Authorization
RequiredBearer <token>
In: header
Request Body
application/json
Requirednetwork
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.
Successful response
Create sponsored transaction
Creates sponsored transaction
Authorization
Authorization
RequiredBearer <token>
In: header
Request Body
application/json
Requirednetwork
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<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<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.
Successful response
{digest}
Submits a sponsored transaction for execution
Submits a transaction created from /transaction-blocks/sponsor
for execution.
Authorization
Authorization
RequiredBearer <token>
In: header
Request Body
application/json
Requiredsignature
Requiredstring
User signature of the transaction.
Path Parameters
digest
Requiredstring
The digest of the previously-created sponsored transaction block to execute.
Successful response
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.
Authorization
Authorization
RequiredBearer <token>
In: header
Header Parameters
zklogin-jwt
Requiredstring
The JWT of the user signed in with zkLogin.
Successful response
Get app metadata
Returns the public metadata (configured in the Enoki Developer Portal) of the app associated with the API key.
Authorization
Authorization
RequiredBearer <token>
In: header
Successful response
Get a list of subnames for an address
Get a list of subnames for an address
Authorization
Authorization
RequiredBearer <token>
In: header
Query Parameters
network
string
The network subnames are registered on.
"mainnet"
Value in: "testnet" | "mainnet"
domain
string
The domain name the subname is on.
address
string
The address to resolve subnames for
Successful response
Create a subname
Creates a subname
Authorization
Authorization
RequiredBearer <token>
In: header
Request Body
application/json
Requireddomain
Requiredstring
The domain name to create the subname under.
network
string
The network the domain and subname are registered on.
"mainnet"
Value in: "testnet" | "mainnet"
subname
Requiredstring
The subname to create.
targetAddress
string
The address the new subname will resolve to
Header Parameters
zklogin-jwt
string
The JWT of the user signed in with zkLogin.
Successful response
Delete a subname
Deletes a subname
Authorization
Authorization
RequiredBearer <token>
In: header
Request Body
application/json
Requireddomain
Requiredstring
The domain name the subname is on.
network
string
The network the domain and subname are registered on.
"mainnet"
Value in: "testnet" | "mainnet"
subname
Requiredstring
The subname to delete.
targetAddress
string
The address the new subname will resolve to
Successful response