Mint and Redeem support
Pre-read
Review the Authentication Guide for the Alluvial API.
Onboarding wallets
Create an Account object
First create an account object for each of your users.
Request:
curl -X 'POST' \
'https://api.staging.alluvial.finance/v0/platform/accounts' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGci…CVm5g' \
-H 'Content-Type: application/json' \
-d '{
"key": "FO123"
}'
Response:
{
"id": "da36a6fa-070d-4cd1-b99a-f2da4f4ccb20",
"key": "FO123",
"org_id": "org_WaYHN06ay6WoTjcz",
"status": "ACTIVE",
"created_at": "2023-03-17T17:24:18.031434748Z",
"wallets": []
}
Create Wallet objects
Add wallet to Allowlist
Attach a wallet object to each account. You can add the wallet to the Allowlist (on-chain) or the On-Platform list (off-chain).
The first example below shows how to add a wallet address to the Allowlist (which be default is added to the On-Platform list).
Request:
curl -X 'POST' \
'https://api.staging.alluvial.finance/v0/platform/accounts/da36a6fa-070d-4cd1-b99a-f2da4f4ccb20/wallets' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGci…CVm5g' \
-H 'Content-Type: application/json' \
-d '{
"address": "0x5210d328bC5651F92F4557EfDE08dd97A36A935c",
"type": "ETH"
}'
Response:
{
"id": "a41c520e-fadd-4c0c-a1ce-d574ee731cee",
"type": "ETH",
"address": "0x5210d328bC5651F92F4557EfDE08dd97A36A935c",
"account_id": "993327a3-1d48-4eff-a9ee-7ec769ec1f64",
"status": "ALLOWLISTED",
"allowlisted": true,
"on_platform": true,
"created_at": "2024-03-25T18:38:31.427654433Z"
}
Add wallet to On-Platform list
Platforms that enable mint/redeem may also need to add a wallet address to the On-Platform list separately. The following request is for a Platform that enables mint/redeem to add a wallet to the On-Platform list.
Request:
curl -X 'POST' \
'https://api.staging.alluvial.finance/v0/platform/accounts/da36a6fa-070d-4cd1-b99a-f2da4f4ccb20/wallets' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGci…CVm5g' \
-H 'Content-Type: application/json' \
-d '{
"address": "0x5210d328bC5651F92F4557EfDE08dd97A36A935c",
"type": "ETH",
"allowlisted": "false"
}'
Request:
{
"address": "0x5210d328bC5651F92F4557EfDE08dd97A36A935c",
"created_at": "string",
"id": "string",
"status": "NOT_ALLOWLISTED",
"type": "ETH",
"on_platform": "true"
}
Now that you have an Account object created and Wallet objects associated, the user can stake ETH and mint LsETH. Before depositing, ensure that the Wallet object(s) have a status = ALLOWLISTED
.
Stake ETH
To complete the staking process, review this guide.
Last updated
Was this helpful?