Skip to main content

Your First Transaction

This guide walks you through executing your first transaction on RP1.

Create a Wallet

# Create a new key
rp1d keys add my-wallet

# Save the mnemonic phrase securely!
# Output:
# - name: my-wallet
# type: local
# address: rp11234...
# pubkey: '{"@type":...}'
# mnemonic: "word1 word2 word3..."

Get Testnet Tokens

# Request from faucet
curl -X POST https://faucet.testnet.rp.one/request \
-H "Content-Type: application/json" \
-d '{"address": "rp1your-address..."}'

# Verify balance
rp1d query bank balances $(rp1d keys show my-wallet -a)

Send Tokens

Standard Transfer

rp1d tx bank send my-wallet rp1recipient-address 1000000urp1 \
--chain-id rp1-testnet-1 \
--gas auto \
--gas-adjustment 1.3 \
--fees 1000urp1

Private Transfer (Shielded)

Shield your tokens first:

# Shield tokens into private pool
rp1d tx privacy shield 1000000urp1 \
--from my-wallet \
--chain-id rp1-testnet-1

Transfer privately:

# Private transfer (requires viewing key of recipient)
rp1d tx privacy transfer \
--recipient rp1recipient... \
--amount 500000urp1 \
--from my-wallet

Unshield back to public:

rp1d tx privacy unshield 500000urp1 \
--from my-wallet

Check Transaction Status

# Query by transaction hash
rp1d query tx <TX_HASH>

# Query account transactions
rp1d query txs --events 'message.sender=rp1your-address'

Using TypeScript SDK

import { RP1Client, PrivacyModule } from '@rp1/sdk';

const client = new RP1Client('https://rpc.testnet.rp.one');

// Standard transfer
const tx = await client.send({
from: wallet.address,
to: 'rp1recipient...',
amount: '1000000',
denom: 'urp1',
});

// Private transfer
const privacy = new PrivacyModule(client);
await privacy.shield(wallet, '1000000', 'urp1');
await privacy.transfer(wallet, 'rp1recipient...', '500000');

Transaction Fees

Transaction TypeEstimated GasCost (~$0.001/gas)
Bank Send80,000~$0.00008
Privacy Shield200,000~$0.0002
Privacy Transfer350,000~$0.00035
DEX Swap150,000~$0.00015

Next Steps