Deposit and Withdraw with the CLI
jv deposit and jv withdraw generate a web address. You open it in your browser and confirm with a wallet signature while the command waits for the result. Assets move between Base and Jasper Vault through a cross-chain bridge.
Do not set any wallet private key in the terminal environment where you run jv.
Complete authorization before you start. The first time, we recommend running through the full flow with a small amount. You can also deposit and withdraw on the web app; see Deposit and Withdraw.
Deposit
Section titled “Deposit”- The command first prints one line of JSON:
urlis the deposit page;recipientis the receiving address, which is your margin account (the same asmarginAccountinjv wallet info); andexpiresAtis when the page expires. - Open
urlin your browser, connect the wallet you used for authorization, and confirm the transactions on Base as the page instructs, usually a token approval (approve) plus a cross-chain transfer. Your wallet needs ETH on Base to pay gas. - After the transaction is confirmed on Base, the CLI waits up to another 60 seconds to check whether the funds have arrived, then prints the result:
"arrived": true means the funds have arrived. "arrived": false means the assets are still in transit across chains; check your balance on the web app in a few minutes.
| Flag | Description |
|---|---|
--token |
Set to usdc; required. Deposited USDC can be used as margin for perpetuals |
--amount |
Amount in USDC, for example 100 for 100 USDC; required |
--timeout |
Maximum time to wait for you to finish on the web page, in seconds; default 900 |
--no-wait |
Return as soon as the transaction is confirmed on Base, without waiting for the funds to arrive |
Withdraw
Section titled “Withdraw”- Set
BASE_HTTP_RPC_URLbefore running it; see Install the jv CLI. - Funds are withdrawn from your margin account, shown as
vaultin the output. - Open
urlin your browser, sign the withdrawal with your wallet, then follow the page to complete the cross-chain transfer and the claim on Base. - Only your wallet itself can sign withdrawals; the delegation key cannot sign on its behalf.
- By default, the command waits up to 900 seconds and, when done, prints
{"success":true,"message":"Withdrawal completed","transactionHash":"0x…",…}.
| Flag | Description |
|---|---|
--token |
Set to usdc; required |
--amount |
Amount in USDC; required |
--timeout |
Maximum time to wait for you to finish on the web page, in seconds; default 900 |
If it does not complete
Section titled “If it does not complete”If the page expires or the flow fails, the command prints "success": false and exits with code 3. After confirming that your wallet has no transactions already sent, run the command again.