Deposit
Add credits from your wallet in USDC, SOL, an xStock or SHDR, and see them land in your credit account.
A deposit turns an asset in your wallet into credits. You need a connected, signed-in wallet holding one of the payment assets. Deposits are signed by your wallet, so they happen in the app; an agent token cannot make one.
#Add credits
USDC
Choose the asset
Open Credits and, under Pay with, choose USDC. The list shows what your wallet holds of each supported asset.
Enter the amount
Type an amount, or press Max. You get shows the credits that will land. One USDC is one dollar of credits, one atom to one base unit. The quote expires after a short while, and the app asks for a new one when it does.
Sign
Press Sign to add and approve the transaction in your wallet. Once it confirms, the balance goes up, and the deposit shows under Recent deposits with a link to its receipt.
SOL
Choose the asset
Open Credits and, under Pay with, choose SOL. The list shows what your wallet holds of each supported asset.
Enter the amount
Type an amount, or press Max. You get shows the credits that will land. The quote is a Jupiter route from SOL to USDC. You get the route's minimum output in credits; any extra USDC the swap delivers stays in your wallet. 0.01 SOL stays in your wallet for fees. The quote expires after a short while, and the app asks for a new one when it does.
Sign
Press Sign to add and approve the transaction in your wallet. Once it confirms, the balance goes up, and the deposit shows under Recent deposits with a link to its receipt.
xStocks
Choose the asset
Open Credits and, under Pay with, choose NVDAx, TSLAx or AAPLx. The list shows what your wallet holds of each supported asset.
Enter the amount
Type an amount, or press Max. You get shows the credits that will land. NVDAx, TSLAx and AAPLx quote like SOL: a Jupiter route to USDC, credited at its minimum output. The quote expires after a short while, and the app asks for a new one when it does.
Sign
Press Sign to add and approve the transaction in your wallet. Once it confirms, the balance goes up, and the deposit shows under Recent deposits with a link to its receipt.
SHDR
Choose the asset
Open Credits and, under Pay with, choose SHDR. The list shows what your wallet holds of each supported asset.
Enter the amount
Type an amount, or press Max. You get shows the credits that will land. The quote is a USDC price for your SHDR, signed by Shader's price signer. The SHDR goes into escrow behind the credits, and those credits are spent first. SHDR deposits open once the mint exists. The quote expires after a short while, and the app asks for a new one when it does.
Sign
Press Sign to add and approve the transaction in your wallet. Once it confirms, the balance goes up, and the deposit shows under Recent deposits with a link to its receipt.
#What happened
Quote
The API priced the deposit: one to one for USDC, a Jupiter route to USDC for SOL and the xStocks, a price-signed USDC quote for SHDR.
Build
It built the transaction for your wallet to sign:
deposit_usdcfor USDC; a Jupiter swap to USDC followed bydeposit_usdc, in one transaction, for SOL and the xStocks;deposit_shdrfor SHDR.Sign and relay
Your wallet signed it. For SHDR, the price signer co-signed after your wallet. The API relayed it and followed it to confirmation.
On chain
The program moved the asset to the treasury, or SHDR into escrow, and booked the credits in your
CreditAccount, creating it on your first deposit. An expired SHDR quote is refused.
#The receipt
A deposit is listed in Receipts as kind deposit, from the UsdcDeposited or ShdrDeposited event, with the asset and amount as its units.
#Afterwards
The credits are spendable at once, on a rental or a generation, and by any agent key of your wallet.
#If it fails
| What you see | Why | Next |
|---|---|---|
QUOTE_EXPIRED | The quote ran out before you signed | Ask for a new quote |
WALLET_REJECTED | You declined in the wallet | Sign again when ready |
SIMULATION_FAILED | The signed transaction would fail, for example the swap no longer meets its minimum | Nothing was sent. Quote again |
TRANSACTION_EXPIRED | The blockhash expired before the transaction was sent | Build it again from a new quote |
ASSET_NOT_LIVE | SHDR has no mint yet | Pay with another asset |
QUOTE_ASSET_UNSUPPORTED | The asset is not a payment asset | Pick one from Pay with |