Create Stake
POST /staking/stakes
Creates a new stake.
Required Permissions
Stakes:Create
Always Required
Parameters
Body
walletId
*
Required
Id of the Dfns wallet making the deposit.
String
amount
*
Required
Transaction amount denominated in min units
String
provider
Optional
Staking Provider, Eg "Figment"
String
protocol
*
Required
Staking Protocol, Eg "Babylon", "Iota",..
String
Currently, only two kind are possible: LockedNative
for vested staking on IOTA and Native
otherwise.
Depending on the protocol, some arguments are required when creating a stake:\
Babylon
duration
*
number
Iota
You need to choose between amount and lockedIotas to indicate if you want to stake vested coins or native coins
validator
*
string
amount
string
lockedIotas
string[]
for vested staking
Example
{
"walletId": "wa-fd328-9v5a8-xxxxxxxxxxxxxxxx",
"provider": "Figment",
"protocol": "Babylon",
"duration": 150,
"amount": "50000"
}
Response
Response example
{
"id": "stk-5q230-nl4b0-xxxxxxxxxxxxxxxx",
"provider": "Figment",
"providerStakeId": "1dd3b430-729e-4935-8da1-bc7af56a4e7a",
"walletId": "wa-fd328-9v5a8-xxxxxxxxxxxxxxxx",
"protocol": "Babylon",
"status": "Active",
"requester": {
"userId": "us-3htce-s75t3-xxxxxxxxxxxxxxxx",
"tokenId": "to-72305-jh38s-xxxxxxxxxxxxxxxx",
},
"requestBody": {
"amount": "50000",
"walletId": "wa-fd328-9v5a8-xxxxxxxxxxxxxxxx",
"provider": "Figment",
"protocol": "Babylon",
"duration": 150
},
"dateCreated": "2024-11-27T19:05:33.551Z",
"actions": [
{
"id": "stktx-7cmu5-u8pct-xxxxxxxxxxxxxxxx",
"stakeId": "stk-5q230-nl4b0-xxxxxxxxxxxxxxxx",
"transactionId": "tx-4j1md-uperm-xxxxxxxxxxxxxxxx",
"kind": "Stake",
"requester": {
"userId": "us-3htce-s75t3-xxxxxxxxxxxxxxxx",
"tokenId": "to-72305-jh38s-xxxxxxxxxxxxxxxx",
},
"requestBody": {
"amount": "50000",
"walletId": "wa-fd328-9v5a8-xxxxxxxxxxxxxxxx",
"provider": "Figment",
"protocol": "Babylon",
"duration": 150
},
"dateCreated": "2024-11-27T19:05:33.551Z"
}
]
}
Remarks
When creating a stake it will implicitly create a StakeAction
with kind Stake
Last updated