Docs/Guides
Deposit
Move public SOL from your wallet into your private balance.
A deposit takes SOL from your wallet and creates a note that your balance key owns. The deposit is a public transaction: the wallet and the amount are visible.
You need to be unlocked, with SOL in the wallet for the amount and the network fee. A deposit carries no Liora fee.
App
On /app, under Move funds, choose Deposit. Enter an amount in SOL and press Deposit. Approve the transaction in your wallet.
The row under the form follows the transfer until it is confirmed. The balance at the top updates after the next scan, which the app runs by itself.
SDK
const result = await liora.deposit(
{ assetId: "1", amountLamports: "2000000000" },
(state) => render(state),
);The wallet needs a signTransaction. The call reports pending, sent and then confirmed or failed, and resolves to the last of them.
buildDeposit(amount) returns the unsigned transaction without sending it, for a wallet flow of your own.
CLI
liora deposit 2000000000 --keypair payer.jsonstate confirmed
kind deposit
signature 3ie4yhgXrpBv7L6xyEUoJZkxhddrtfPGQdNZ1LxDT7fTfjhWnkTUrQzpX31VE58o2PGYQxJ6cNLTMhGyZeZBcj1Wliora balance --keypair payer.jsonassetId 1
decimals 9
symbol SOL
amountLamports 2000000000#What the chain shows
| Public | Hidden |
|---|---|
| The depositing wallet | Who you pay from the balance |
| The amount | How much each payment is |
| The balance key the note went to | What remains in the balance |
A payment or withdrawal names the owner address of each note it spends, so a reader can see that a balance funded by this deposit made a transfer. The recipient and the amount of that transfer stay hidden.
The program records the deposit in a DepositRecorded event. Your device finds its own deposits by looking for its balance keys in those events.
#If it fails
| What you see | Why | Next |
|---|---|---|
WALLET_REJECTED | The transaction was declined in the wallet | Deposit again and approve |
VALIDATION_ERROR | The amount is zero or not a whole number of lamports | Correct the amount |
CONFIRMATION_FAILED | The transaction failed on chain, most often for lack of SOL | Nothing was deposited. Fund the wallet and deposit again |
| A balance that does not rise yet | The scan has not reached the deposit's slot | Wait a moment and read the balance again |