Withdrawals

  1. Deactivate API Returns an unsigned transaction to begin unstaking a stake account.

  2. Withdraw API Returns an unsigned transaction to withdraw SOL from a fully deactivated stake account.

API Reference

Deactivate Request

POST /api/v1/deactivate

Submits a deactivate request to generate an unsigned transaction. This transaction needs to be signed by the private key of the wallet address and broadcasted to the network to trigger deactivation of stake accounts

Headers

Name
Type
Description

api-key*

String

API Key provided by Luganodes

Request Body

Name
Type
Description

validatorPubKey*

String

Public address of validator

walletPubKey*

String

Wallet address

stakeAccountPubKey*

String

Public address of user stake account

{
    "success": true,
    "data": {
        "validatorPubkey": "6aow5rTURdbhbeMDrFrbP2GR5vZjMEhktEy87iH1VGPs",
        "walletPubkey": "2WeFEJbeXFrfm9v7zgF25bViroaHgLxX7imeMyLFzeBA",
        "stakeAccountPubkey": "BW8yWJoNPBQfKLLN2oKh7FxQEGimXFDHfDgrADPxRnxj",
        "unsignedTransactionBase64": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAIEFnOk0ZOXCCj0mVHqGUp7F+D7DTliS46FUE+sAeVtrimcC7qt7Ed4l19FBITNtyX3HgJdOsjOMrkh6iZyDoFqZAah2BeRN1QqmDQ3vf4qerJVf1NcinhyK2ikncAAAAAABqfVFxjHdMkoVmOYaR1etoteuKObS21cc1VbIQAAAAB11L4Dvg0YoB4hY0KwaHv2zg0IZTtyyyvi/yugS1UUQAECAwEDAAQFAAAA"
    }
}

Sample Request

curl --location '{{url}}/v1/stake' \
--header 'api-key: ee908371-d13b-43dd-ae33-b854dade5e9d' \
--data '{
    "validatorPubkey": "6aow5rTURdbhbeMDrFrbP2GR5vZjMEhktEy87iH1VGPs",
    "walletPubkey": "2WeFEJbeXFrfm9v7zgF25bViroaHgLxX7imeMyLFzeBA",
    "stakeAccountPubkey": "BW8yWJoNPBQfKLLN2oKh7FxQEGimXFDHfDgrADPxRnxj"
}'

Types

Deactivate Response Object

Property
Description
Type

validatorPubKey

Public address of validator

String

walletPubKey

Public address of user wallet

String

stakeAccountPubKey

Public address of stake account

String

unsignedTransactionBase64

Unsigned transaction which needs to be signed with the private key of the user wallet

String

Withdraw

POST /api/v1/withdraw

Submits a withdraw request to generate an unsigned transaction. This transaction needs to be signed by the private key of the wallet address and broadcasted to the network to trigger withdrawal of delegated SOL.

Headers

Name
Type
Description

api-key*

String

API Key provided by Luganodes

Request Body

Name
Type
Description

validatorPubKey*

String

Public address of validator

walletPubKey*

String

Wallet address

stakeAccountPubKey*

String

Public address of user stake account

amount*

Number

SOL to withdraw in lamports. 1 SOL = 10^9 Lamports

{
    "success": true,
    "data": {
        "validatorPubkey": "6aow5rTURdbhbeMDrFrbP2GR5vZjMEhktEy87iH1VGPs",
        "walletPubkey": "2WeFEJbeXFrfm9v7zgF25bViroaHgLxX7imeMyLFzeBA",
        "stakeAccountPubkey": "BW8yWJoNPBQfKLLN2oKh7FxQEGimXFDHfDgrADPxRnxj",
        "amount": 1,
        "unsignedTransactionBase64": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAIEFnOk0ZOXCCj0mVHqGUp7F+D7DTliS46FUE+sAeVtrimcC7qt7Ed4l19FBITNtyX3HgJdOsjOMrkh6iZyDoFqZAah2BeRN1QqmDQ3vf4qerJVf1NcinhyK2ikncAAAAAABqfVFxjHdMkoVmOYaR1etoteuKObS21cc1VbIQAAAAB11L4Dvg0YoB4hY0KwaHv2zg0IZTtyyyvi/yugS1UUQAECAwEDAAQFAAAA"
    }
}

Sample Request

curl --location '{{url}}/v1/withdraw' \
--header 'api-key: ee908371-d13b-43dd-ae33-b854dade5e9d' \
--data '{
    "validatorPubkey": "6aow5rTURdbhbeMDrFrbP2GR5vZjMEhktEy87iH1VGPs",
    "walletPubkey": "2WeFEJbeXFrfm9v7zgF25bViroaHgLxX7imeMyLFzeBA",
    "stakeAccountPubkey": "BW8yWJoNPBQfKLLN2oKh7FxQEGimXFDHfDgrADPxRnxj"
    "amount": 1
}'

Types

Withdraw Response Object

Property
Description
Type

validatorPubKey

Public address of validator

String

walletPubKey

Public address of user wallet

String

stakeAccountPubKey

Public address of stake account

String

unsignedTransactionBase64

Unsigned transaction which needs to be signed with the private key of the user wallet

String

amount

Amount to be withdrawn in lamports 1 SOL = 10^9 Lamports

Number

Last updated