Addresses
An address is a user-controlled account on a blockchain network. An address can hold a balance of one or more assets, and can be used to send or receive crypto.
An address is backed by a private key, which provides access to spend the assets in the address. Addresses can list their balances and transfer assets to other addresses or wallets.
Creating Addresses
Addresses should be created via a wallet:
a = w.create_address
A wallet comes with a single address by default, accessible via default_address
.
Viewing Address IDs
To view the hexadecimal string that actually represents your address, use the address_id
property:
address_id = a.address_id
Faucets
On Testnets, asset issuers provide faucets so that developers can easily fund their wallets for testing purposes.
We provide a faucet
method to fund your address with ETH on Base Sepolia testnet. You are allowed one faucet claim per address in a 24-hour window.
Faucet requests can be made at the address level in the Platform SDK.
# Create a faucet request that returns a Faucet transaction, which can be used to retrieve the transaction hash.
faucet_tx = a.faucet
faucet_tx.transaction_hash
Other faucets on Base Sepolia:
- ETH faucet
- USDC faucet - specify Base Sepolia as the network
Retrieving Balances
To view the amount of assets held in an address, call the following:
a.list_balances
Or, to obtain the balance of a specific asset, call the following:
a.get_balance(:eth)
SDK Documentation
Refer to the Address class SDK docs for a full list of supported methods.