StakeStone (X Layer) API Reference
Get Quote
POST
/protocol/get-protocol-quotes
Fetch the quote for staking into StakeStone on X Layer.
Base URL
https://api.pod.routerintents.com
Body
{
"ReceiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"SourceTokens": [
{
"chainId": "8453",
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
}
],
"DestinationTokens": [
{
"chainId": "196",
"address": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18
}
],
"Amount": [
"12000000"
],
"SourceChainId": 8453,
"Protocol": [
{
"protocolId": "stakestone",
"chainId": "196",
"action": "vault-stake",
"poolId": "stakestone-vault_196"
}
]
}
Name | Type | Description |
---|---|---|
| string (required) | Wallet address to receive STONE |
| array (required) | Array of tokens at the source side |
| array (required) | Array of token amounts being supplied |
| int (required) | Network ID of the starting chain, for example: 8453 for Base |
| object (required) | Intent adapter information for StakeStone |
| string (optional) | If SenderAddress is different from the ReceiverAddress |
| float (optional) | 1 means 1%; by default, this is set to 2%. |
// For protocol, pass the following:
{
"protocolId": "stakestone",
"chainId": "196",
"action": "vault-stake",
"poolId": "stakestone-vault_196"
}
// If the source chain is Ethereum (1), pass the following:
{
"protocolId": "stakestone",
"chainId": "1",
"action": "express-stake",
"poolId": "stakestone-stone-1",
"data": {
"bridgePoolId": "stakestone-stone",
"bridgeChain": "196"
}
}
// This is because, when the source chain is Ethereum, we directly stake on
// Ethereum and then bridge the token using LayerZero. For all other cases,
// we stake on our custom vault deployed on X Layer.
Response
200: Success
{
"Code": 0,
"Errors": [],
"PayLoad": {
"appId": "0",
"quotationType": "BatchTransaction",
"feeParams": [
{
"fee": "6000",
"recipient": "0x00EB64b501613F8Cf8Ef3Ac4F82Fc63a50343fee",
"decimals": 6,
"symbol": "USDC",
"tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"chainId": 8453,
"name": "USDC",
"adapter": "batch-handler"
}
],
"slippageTolerance": 2,
"sourceTokens": [
{
"chainId": "8453",
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
}
],
"amount": [
"12000000"
],
"sourceChainId": 8453,
"destinationChainId": 196,
"destinationToken": {
"address": "0x80137510979822322193FC997d400D5A6C747bf7",
"name": "StakeStone Ether",
"symbol": "STONE",
"decimals": 18
},
"adapters": [
{
"adapterId": "nitro_bridge",
"adapterType": "bridge",
"sourceChainId": 8453,
"destChainId": "196",
"adapterOptions": {
"srcToken": {
"chainId": "8453",
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
},
"amountIn": "11994000",
"amountOut": "3682187020630992",
"destToken": {
"address": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18
},
"receiverAddress": "0xd5808A8D0Ec8eae3929Bbc380e562649cDb957F0",
"data": {
"actionType": 1,
"refundAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"partnerId": 155,
"tokens": [
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"0x4200000000000000000000000000000000000006"
],
"bridgeFee": {
"amount": "49156587252505",
"decimals": 18,
"symbol": "WETH",
"address": "0x4200000000000000000000000000000000000006"
},
"isMainnet": true,
"quotationParams": {
"fromTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"toTokenAddress": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"amount": "11994000",
"fromTokenChainId": 8453,
"toTokenChainId": "196",
"partnerId": 155,
"additionalGasLimit": 160000,
"slippageTolerance": 2
},
"forwarderQuotation": {
"flowType": "trustless",
"isTransfer": "false",
"isWrappedToken": false,
"allowanceTo": "0x02D728B9C1513478a6b6de77a92648e1D8F801e7",
"bridgeFee": {
"amount": "49156587252505",
"decimals": 18,
"symbol": "WETH",
"address": "0x4200000000000000000000000000000000000006"
},
"fuelTransfer": null,
"fromTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"toTokenAddress": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"source": {
"chainId": "8453",
"chainType": "evm",
"asset": {
"decimals": 6,
"symbol": "USDC",
"name": "USDC",
"chainId": "8453",
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"resourceID": "usdc-circle",
"isMintable": false,
"isWrappedAsset": false,
"isReserveAsset": false,
"tokenInstance": {
"decimals": 6,
"symbol": "USDC",
"name": "USDC",
"chainId": 8453,
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
},
"stableReserveAsset": {
"decimals": 18,
"symbol": "WETH",
"name": "WETH",
"chainId": "8453",
"address": "0x4200000000000000000000000000000000000006",
"resourceID": "native-eth",
"isMintable": false,
"isWrappedAsset": false,
"isReserveAsset": false
},
"tokenAmount": "11994000",
"stableReserveAmount": "3768537416172698",
"path": [
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"0x4200000000000000000000000000000000000006"
],
"flags": [
"4002"
],
"priceImpact": "0.00",
"tokenPath": "USDC->WETH",
"dataTx": [
"0x90411a32000000000000000000000000b45373129b4220160b92bd2320869f44d48ecd01000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda029130000000000000000000000004200000000000000000000000000000000000006000000000000000000000000b45373129b4220160b92bd2320869f44d48ecd0100000000000000000000000002d728b9c1513478a6b6de77a92648e1d8f801e70000000000000000000000000000000000000000000000000000000000b70390000000000000000000000000000000000000000000000000000d6376fe03849a000000000000000000000000000000000000000000000000000d8615ee7a80c50000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d2137a6d0ef438a7c2bb38eeef364500271658be00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000007200000000000000000000000000000000000000000000000000000000000000840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001045c6913d700000000000000000000000078585a997bac9950de16a56d15c6d7086cec517800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000464700000000000000000000000000b45373129b4220160b92bd2320869f44d48ecd0100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000003cb2855783a346735e4aae0c1eb894def861fa9b45833589fcd6edb6e08f4c7c32d4f71b54bda0291342000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000994c90f2e654b282e24a1b7d00ee12e82408312c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001043eece7db000000000000000000000000b45373129b4220160b92bd2320869f44d48ecd0100000000000000000000000000000000000000000000000000000000004c224000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff8000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000a7e848aca42d879ef06507fca0e7b33a0a63c1e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb000000000000000000000000273fdfe6018230f188741d7f93d4ab589bd2619700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000249a5000000000000000000000000008b935148ab10d3699cb8d944519e8213abe6f1d00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e833589fcd6edb6e08f4c7c32d4f71b54bda02913000050b79dd08ea68a908a97220c76d19a6aa9cbde437600001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000643afe5f0080000000000000000271001e08b935148ab10d3699cb8d944519e8213abe6f1d000000000000000000000000b79dd08ea68a908a97220c76d19a6aa9cbde4376000000000000000000000000b45373129b4220160b92bd2320869f44d48ecd0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000648a6a1e850000000000000000000000004200000000000000000000000000000000000006000000000000000000000000353c1f0bc78fbbc245b3c93ef77b1dcc5b77d2a0000000000000000000000000000000000000000000000000000d8615ee7a80c500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a49f865422000000000000000000000000420000000000000000000000000000000000000600000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d1660f99000000000000000000000000420000000000000000000000000000000000000600000000000000000000000002d728b9c1513478a6b6de77a92648e1d8f801e700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
]
},
"destination": {
"chainId": "196",
"chainType": "evm",
"asset": {
"decimals": 18,
"symbol": "WETH",
"name": "WETH",
"chainId": "196",
"address": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"resourceID": "native-eth",
"isMintable": false,
"isWrappedAsset": false,
"isReserveAsset": false,
"tokenInstance": {
"decimals": 18,
"symbol": "WETH",
"name": "WETH",
"chainId": 196,
"address": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c"
}
},
"stableReserveAsset": {
"decimals": 18,
"symbol": "WETH",
"name": "WETH",
"chainId": "196",
"address": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"resourceID": "native-eth",
"isMintable": false,
"isWrappedAsset": false,
"isReserveAsset": false
},
"tokenAmount": "3719380828920193",
"stableReserveAmount": "3719380828920193",
"priceImpact": "0.00",
"tokenPath": "WETH",
"dataTx": [
"0x00"
],
"path": [
"0x5a77f1443d16ee5761d310e38b62f77f726bc71c"
],
"flags": []
},
"partnerId": "155",
"slippageTolerance": "2",
"estimatedTime": 40
},
"destinationAmount": "3719380828920193",
"destinationAmountPromised": "3682187020630992"
}
},
"adapters": [
{
"adapterId": "stakestone_vault_stake",
"adapterType": "stake",
"sourceChainId": "196",
"destChainId": "196",
"adapterOptions": {
"srcToken": {
"address": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18
},
"amountIn": "3682187020630992",
"amountOut": "3310719511746768",
"destToken": {
"address": "0x80137510979822322193FC997d400D5A6C747bf7",
"name": "StakeStone Ether",
"symbol": "STONE",
"decimals": 18
},
"receiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"data": {
"refundAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8"
}
},
"adapters": []
}
],
"fee": {
"fee": "49156587252505",
"recipient": "",
"decimals": 18,
"symbol": "WETH",
"tokenAddress": "0x4200000000000000000000000000000000000006",
"chainId": 8453,
"name": "WETH",
"adapter": "nitro_bridge"
}
}
],
"quote": [
{
"amountSent": 11994000,
"amountReceived": "3682187020630992",
"amountReceivedInEther": "0.003682",
"exchangeRate": "",
"estimatedTime": 40,
"slippageTolerance": "2",
"srcToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"destToken": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"adapterId": "nitro_bridge",
"bridgeFee": {
"amount": "49156587252505",
"decimals": 18,
"symbol": "WETH",
"address": "0x4200000000000000000000000000000000000006"
}
},
{
"amountSent": "3682187020630992",
"amountReceived": "3310719511746768",
"amountReceivedInEther": "0",
"exchangeRate": "1",
"srcToken": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"destToken": "0x80137510979822322193FC997d400D5A6C747bf7",
"adapterId": "stakestone_vault_stake",
"estimatedTime": 3
}
],
"clientAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"senderAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"estimatedTime": 43
}
}
400: Bad Request
{
"Code": 1,
"Error": [
{
"Code": "1",
"Message": [
{
"title": "",
"message": ""
}
]
}
],
"Payload": null
}
Sample cURL
curl --location 'https://api.pod.routerintents.com/router-intent/protocol/get-protocol-quotes' \
--header 'Accept: */*' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'Origin: https://poc-intents-ui.vercel.app' \
--header 'Referer: https://poc-intents-ui.vercel.app/' \
--header 'Sec-Fetch-Dest: empty' \
--header 'Sec-Fetch-Mode: cors' \
--header 'Sec-Fetch-Site: cross-site' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
--header 'sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--data '{
"ReceiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"SourceTokens": [
{
"chainId": "8453",
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
}
],
"DestinationTokens": [
{
"chainId": "196",
"address": "0x5A77f1443D16ee5761d310e38b62f77f726bC71c",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18
}
],
"Amount": [
"12000000"
],
"SourceChainId": 8453,
"Protocol": [
{
"protocolId": "stakestone",
"chainId": "196",
"action": "vault-stake",
"poolId": "stakestone-vault_196"
}
]
}'
Compose Calldata
POST
/adapter/compose-adapter-calldata
Fetch the calldata to execute the quote fetched via the get-protocol-quotes
endpoint
Base URL
https://api.pod.routerintents.com
Body
Payload object from the response of the get-protocol-quotes
endpoint
Response
{
"Code": 0,
"Errors": [],
"PayLoad": {
"trnxId": "8003108b-7acc-4854-a378-4f70e2d2325e",
"gasPrice": "116346184669",
"calldata": "0xabcd",
"to": "0x1047770a9eb317667fAa472Ed2579E6f8dA086c6",
"from": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"value": "0x00",
"prioritySteps": [
{
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0xabcd",
"value": 0,
"instructionData": "Approve USDC for Batch Handler Contract",
"instructionTitle": "Approve USDC",
"chainId": "8453"
}
],
"gasLimit": "3000000"
}
}
{
"Code": 1,
"Error": [
{
"Code": "1",
"Message": [
{
"title": "",
"message": ""
}
]
}
],
"Payload": null
}
Notes:
In the payload,
prioritySteps
contains the approval transaction calldata that needs to be executed before performing the transaction.The estimated
gasLimit
sent by our APIs are not based on any simulations because it is not possible to simulate gasLimit without having token allowance. ThegasLimit
sent by our APIs is a highly conservative estimate of the gas that a tx could use. Since the actual gas limit will likely be lower, we suggest that the API users estimate thegasLimit
themselves once the approval tx is mined.
Last updated