Create Stake

POST /staking/stakes

Creates a new stake.

Required Permissions

Name
Conditions

Stakes:Create

Always Required

Parameters

Body

Property
Required/Optional
Description
Type

walletId *

Required

Id of the Dfns wallet making the deposit.

String

kind *

Required

Enum for the type of asset. Eg "Native" or "ERC20".

String

amount *

Required

Transaction amount denominated in min units

String

provider *

Required

Staking Provider, Eg "Figment"

String

protocol *

Required

Staking Protocol, Eg "Babylon"

String

duration *

Required

Duration of staking in Bitcoin block for Babylon

Number

Depending on the asset kind, the body must be completed with some extra parameter identical to the Transfer Asset from Wallet

Example

{
  "walletId": "wa-fd328-9v5a8-xxxxxxxxxxxxxxxx",
  "provider": "Figment",
  "protocol": "Babylon",
  "duration": 150,
  "kind": "Native",
  "amount": "50000"
}

Response

Response example

{
  "stake": {
    "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",
      "appId": "ap-3g5ir-mt688-xxxxxxxxxxxxxxxx"
    },
    "requestBody": {
      "kind": "Native",
      "amount": "50000",
      "walletId": "wa-fd328-9v5a8-xxxxxxxxxxxxxxxx",
      "provider": "Figment",
      "protocol": "Babylon",
      "duration": 150
    },
    "dateCreated": "2024-11-27T19:05:33.551Z"
},
"stakeTransaction": {
    "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",
      "appId": "ap-3g5ir-mt688-xxxxxxxxxxxxxxxx"
    },
    "requestBody": {
      "kind": "Native",
      "amount": "50000",
      "walletId": "wa-fd328-9v5a8-xxxxxxxxxxxxxxxx",
      "provider": "Figment",
      "protocol": "Babylon",
      "duration": 150
    },
    "dateCreated": "2024-11-27T19:05:33.551Z"
  }
}

Last updated