Skip to content

Http Endpoints

Exposed endpoints the client can query to obtain data about their exposed data, the relayer, or mixer deployments.

API v1

IP

Relayers can let the client know of their IP address. This is informative to the client, as their privacy is potentially compromised by this information.

/api/v1/ip

Response Format

{
    "ip": <string>
}

Response Explanation

The IP address from which the request was sent to the relayer.

Info

A client should make a call to the relayer to find which chains it supports, as well as the fees and relayer address to include in the proof generation.

/api/v1/info

Response Format

{ 
    evm: {
        [networkName]: {
            "withdrawFeePercentage": <number>,
            "account": <string>,
            "enableLeavesWatcher": <boolean>,
        },
        ...
    }
}

Response Explanation

  • withdrawFeePercentage: The minimum amount of percentage that the relayer requires to send a transaction on the client's behalf.
  • account: The reward account of the relayer, which will collect the fee.
  • enableLeavesWatcher: A boolean flag indicating if the relayer is able to provide a client with the leaves that make up the merkle tree of a particular mixer.

EVM Mixer Leaves

A client can query the relayer for the leaves (commitments) of a mixer deployment. This information is necessary for building the merkle tree on the client side, in order to build the proof of secrets for a particular commitment. The client can query the blockchain directly, but getting the information from a relayer will be much quicker.

/api/v1/leaves/:contractAddress

Response Format

{
    "leaves": [
        <hex-string>,
        <hex-string>,
        ...
    ],
    "lastQueriedBlock": <hex-string>
}

Response explanation

The leaves will be properly indexed in the array. The lastQueriedBlock will contain the block number of the deposit transaction which created the leaf in the last entry of the leaves array.