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.
createDeposit
Locks XFG from a source address into a time deposit. The wallet constructs and broadcasts a deposit transaction. The returnedtransactionHash is the on-chain proof of deposit creation, and the deposit index is assigned by the chain.
Request
Amount to deposit in atomic units. Minimum:
8000000000 (800 XFG).Deposit lock term in blocks. Must be
16440. Other values are currently rejected by the network.The wallet address to draw the deposit funds from. Must be an address managed by this wallet instance.
Response
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’sunlockHeight has been reached before calling this method.
Request
The numeric deposit ID assigned by the chain when the deposit was created. Retrieve this via
getDeposit or getStatus.Response
Hash of the withdrawal transaction that returns the deposit funds plus interest to your address.
sendDeposit
Creates a deposit funded from asourceAddress 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
Amount to deposit in atomic units. Minimum:
8000000000 (800 XFG).Deposit lock term in blocks. Must be
16440.The wallet address providing the funds. Must be managed by this wallet.
The address that will be credited the deposit and its interest upon maturity. Can be any valid Fuego address.
Response
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
The numeric deposit ID to query.
Response
Principal amount deposited, in atomic units.
Lock term in blocks (currently always
16440).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.
Block height at which this deposit was created (confirmed).
Block height at which the deposit matures and can be withdrawn. Equal to
height + term.Hash of the transaction that created this deposit.
Hash of the withdrawal transaction, if the deposit has been spent. Empty string if the deposit is still locked or unspent.
true if the deposit is still within its lock term. false if the deposit has matured or already been withdrawn.The Fuego address associated with this deposit — the address that will receive the funds on withdrawal.