Skip to main content
Fuego supports on-chain time deposits: you lock a minimum amount of XFG for a fixed term of 16,440 blocks (approximately 3 months), and in return you receive interest when the deposit matures. Deposits are created and managed entirely through walletd — the deposit ID returned when you create a deposit is your handle for querying status and triggering withdrawal. All calls go to POST http://127.0.0.1:8070/json_rpc.
The minimum deposit amount is 800 XFG = 8,000,000,000 atomic units. The deposit term is fixed at 16,440 blocks, approximately 3 months at the 480-second block target. Deposits created below the minimum or with a non-standard term will be rejected.

createDeposit

Locks XFG from a source address into a time deposit. The wallet constructs and broadcasts a deposit transaction. The returned transactionHash is the on-chain proof of deposit creation, and the deposit index is assigned by the chain.

Request

params.amount
integer
required
Amount to deposit in atomic units. Minimum: 8000000000 (800 XFG).
params.term
integer
required
Deposit lock term in blocks. Must be 16440. Other values are currently rejected by the network.
params.sourceAddress
string
required
The wallet address to draw the deposit funds from. Must be an address managed by this wallet instance.
curl -s http://127.0.0.1:8070/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "createDeposit",
    "params": {
      "amount": 8000000000,
      "term": 16440,
      "sourceAddress": "fireXfGYourAddress..."
    },
    "id": "1"
  }'

Response

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "transactionHash": "c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
  }
}
transactionHash
string
required
Hash of the deposit creation transaction. Use this to look up the deposit ID by scanning transactions with getTransactions, or to track confirmation on the daemon.

withdrawDeposit

Withdraws a matured deposit, returning the principal plus accrued interest to the source address. You must wait until the deposit’s unlockHeight has been reached before calling this method.

Request

params.depositId
integer
required
The numeric deposit ID assigned by the chain when the deposit was created. Retrieve this via getDeposit or getStatus.
curl -s http://127.0.0.1:8070/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "withdrawDeposit",
    "params": {
      "depositId": 42
    },
    "id": "1"
  }'

Response

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "transactionHash": "d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5"
  }
}
transactionHash
string
required
Hash of the withdrawal transaction that returns the deposit funds plus interest to your address.

sendDeposit

Creates a deposit funded from a sourceAddress but redeemable by a different destinationAddress. This allows creating a deposit on behalf of another address — for example, funding a deposit for a user’s address from a hot wallet.

Request

params.amount
integer
required
Amount to deposit in atomic units. Minimum: 8000000000 (800 XFG).
params.term
integer
required
Deposit lock term in blocks. Must be 16440.
params.sourceAddress
string
required
The wallet address providing the funds. Must be managed by this wallet.
params.destinationAddress
string
required
The address that will be credited the deposit and its interest upon maturity. Can be any valid Fuego address.
curl -s http://127.0.0.1:8070/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "sendDeposit",
    "params": {
      "amount": 8000000000,
      "term": 16440,
      "sourceAddress": "fireXfGHotWalletAddress...",
      "destinationAddress": "fireXfGUserAddress..."
    },
    "id": "1"
  }'

Response

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "transactionHash": "e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6"
  }
}
transactionHash
string
required
Hash of the deposit creation transaction.

getDeposit

Returns the current state of a specific deposit identified by its numeric ID. Use this to check whether a deposit is still locked, what interest has accrued, and at which block height the funds unlock.

Request

params.depositId
integer
required
The numeric deposit ID to query.
curl -s http://127.0.0.1:8070/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "getDeposit",
    "params": {
      "depositId": 42
    },
    "id": "1"
  }'

Response

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "amount": 8000000000,
    "term": 16440,
    "interest": 160000000,
    "height": 883560,
    "unlockHeight": 900000,
    "creatingTransactionHash": "c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    "spendingTransactionHash": "",
    "locked": true,
    "address": "fireXfGYourAddress..."
  }
}
amount
integer
required
Principal amount deposited, in atomic units.
term
integer
required
Lock term in blocks (currently always 16440).
interest
integer
required
Interest earned on this deposit in atomic units, calculated at the time of the response. This is the bonus you receive in addition to the principal when you withdraw.
height
integer
required
Block height at which this deposit was created (confirmed).
unlockHeight
integer
required
Block height at which the deposit matures and can be withdrawn. Equal to height + term.
creatingTransactionHash
string
required
Hash of the transaction that created this deposit.
spendingTransactionHash
string
required
Hash of the withdrawal transaction, if the deposit has been spent. Empty string if the deposit is still locked or unspent.
locked
boolean
required
true if the deposit is still within its lock term. false if the deposit has matured or already been withdrawn.
address
string
required
The Fuego address associated with this deposit — the address that will receive the funds on withdrawal.