v1

latestOpenAPI 3.1.02026-07-24223580832.9 KB
NEAR

Post Deactivation Intent

Create a transaction for deactivating staked NEAR tokens.

The Post Deactivation Intent endpoint returns an unsigned transaction, which once signed and broadcasted starts the deactivation process. The process will complete in 4 NEAR epochs (48 hours).

Once the deactivation countdown is underway, you can still change the deactivated account by generating and broadcasting a new deactivation transaction. Please note that this will reset the countdown.

post/v1/near/{network}/deactivation-intents

Request body

amountstring required

Denomination of NEAR Protocol.

wallet_addressstring required

Base58 encoded public key or registered named account. Accounts.

public_keystring required

Base58 encoded public key prefixed by ed25519, associated with the private key that will be used to sign the transaction.

tostring

Base58 encoded public key or registered named account. Accounts.

plan_idstring

This feature enables you to stake to validators from the specified plan(s). When no plan id is specified, validators across all plans that match the API route will be available for staking. If it is a shared plan, you can to stake to validators on a shared node from the specified plan.

Example request

{
  "amount": "100000000000000000000000000",
  "wallet_address": "alice.near",
  "public_key": "ed25519:Cxg2wgFYrdLTEkMu6j5D6aEZqTb3kXbmJygS48ZKbo1S",
  "to": "alice.near",
  "plan_id": "plan_Wgx98Rbi8nQuL9ddn3mTk1"
}

Response

Created

deactivate_intent_idstring uuid required

Unique idenifier for deactivate intent.

customer_idstring required

Unique identifier for a customer

protocol'near' required

Near protocol

network'mainnet' | 'testnet' | 'localnet' required

NEAR network

Example response

{
  "deactivate_intent_id": "4ba06e89-8c29-483e-ac36-318de5aa7364",
  "customer_id": "SatoshiNakamoto-xUYJbPw9hw",
  "near": {
    "to": "alice.near",
    "unsigned_transaction": "0x22895118000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120087fed394b43849eebef1e88873cd9efdbe33136656e5148e659b8b2f33625d40000000000000000000000000000000000000000000000000000000000000030b81748644e23c4d950f9dd709f3eb73d5eacd9657997e1d9dde7c4ebd8a6519ecb9d0a7fb603d3b68e023278f9650122000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020010000000000000000000000c509bb854c526af4cee5e037089f7aa8e091d8870000000000000000000000000000000000000000000000000000000000000060b36b79b4b206c0310472c117fa40c05342b5dc3e89f98f42c9da3ce6450d4c603cad55248017fd4eca3ab277cca64569193e4d487f5b2ea78a2bcdc81926c313c05842a3af318967a775783bba22519e8b8886587efa99aa7dab5784f792b187\n",
    "unsigned_transaction_hash": "120000007465737477616c6c65742e746573746e65740025150c44ecddfe779c2ca ",
    "amount": "100000000000000000000000000",
    "wallet_address": "alice.near",
    "public_key": "ed25519:Cxg2wgFYrdLTEkMu6j5D6aEZqTb3kXbmJygS48ZKbo1S",
    "expiration_time": 1689939023
  }
}