pub struct OnchainAddress {
pub address: BlockchainAddress,
pub asset: Asset,
pub destination_tag: Option<String>,
pub network: Network,
}Expand description
The target of the payment is an onchain address.
JSON schema
{
"title": "Onchain Address",
"description": "The target of the payment is an onchain address.",
"examples": [
{
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"asset": "usdc",
"network": "base"
}
],
"type": "object",
"required": [
"address",
"asset",
"network"
],
"properties": {
"address": {
"description": "The onchain crypto address of the recipient.\n\nExamples:\n- EVM address: 0xabc1234567890abcdef1234567890abcdef123456\n- Solana address: HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT\n- XRP address: rhccc5p23aKiCGFcEqqnjEfLRZ6xEvfy3s\n",
"allOf": [
{
"$ref": "#/components/schemas/BlockchainAddress"
}
]
},
"asset": {
"description": "Asset symbol of the payment received by the recipient.",
"examples": [
"btc"
],
"allOf": [
{
"$ref": "#/components/schemas/Asset"
}
]
},
"destinationTag": {
"description": "The destination tag of the onchain address. Destination tags are used by certain networks\n(primarily XRP/Ripple) to identify specific recipients when multiple users share a single address.\nThe tag ensures funds are credited to the correct account within the shared address.\n\nExamples by network:\n- XRP/Ripple: Numeric values like \"1234567890\" or \"123456\"\n- Stellar (XLM): Memos which can be text, ID, or hash format\n\nNote: Most networks (Ethereum, Bitcoin, Solana) do not use destination tags.\n",
"type": "string"
},
"network": {
"$ref": "#/components/schemas/Network"
}
}
}Fields§
§address: BlockchainAddressThe onchain crypto address of the recipient.
Examples:
- EVM address: 0xabc1234567890abcdef1234567890abcdef123456
- Solana address: HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT
- XRP address: rhccc5p23aKiCGFcEqqnjEfLRZ6xEvfy3sasset: AssetAsset symbol of the payment received by the recipient.
destination_tag: Option<String>The destination tag of the onchain address. Destination tags are used by certain networks (primarily XRP/Ripple) to identify specific recipients when multiple users share a single address. The tag ensures funds are credited to the correct account within the shared address.
Examples by network:
- XRP/Ripple: Numeric values like "1234567890" or "123456"
- Stellar (XLM): Memos which can be text, ID, or hash format
Note: Most networks (Ethereum, Bitcoin, Solana) do not use destination tags.network: NetworkImplementations§
Source§impl OnchainAddress
impl OnchainAddress
pub fn builder() -> OnchainAddress
Trait Implementations§
Source§impl Clone for OnchainAddress
impl Clone for OnchainAddress
Source§fn clone(&self) -> OnchainAddress
fn clone(&self) -> OnchainAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OnchainAddress
impl Debug for OnchainAddress
Source§impl<'de> Deserialize<'de> for OnchainAddress
impl<'de> Deserialize<'de> for OnchainAddress
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&OnchainAddress> for OnchainAddress
impl From<&OnchainAddress> for OnchainAddress
Source§fn from(value: &OnchainAddress) -> Self
fn from(value: &OnchainAddress) -> Self
Converts to this type from the input type.
Source§impl From<OnchainAddress> for OnchainAddress
impl From<OnchainAddress> for OnchainAddress
Source§fn from(value: OnchainAddress) -> Self
fn from(value: OnchainAddress) -> Self
Converts to this type from the input type.
Source§impl From<OnchainAddress> for TransferSource
impl From<OnchainAddress> for TransferSource
Source§fn from(value: OnchainAddress) -> Self
fn from(value: OnchainAddress) -> Self
Converts to this type from the input type.
Source§impl From<OnchainAddress> for TransferTarget
impl From<OnchainAddress> for TransferTarget
Source§fn from(value: OnchainAddress) -> Self
fn from(value: OnchainAddress) -> Self
Converts to this type from the input type.
Source§impl Serialize for OnchainAddress
impl Serialize for OnchainAddress
Source§impl TryFrom<OnchainAddress> for OnchainAddress
impl TryFrom<OnchainAddress> for OnchainAddress
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: OnchainAddress) -> Result<Self, ConversionError>
fn try_from(value: OnchainAddress) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for OnchainAddress
impl RefUnwindSafe for OnchainAddress
impl Send for OnchainAddress
impl Sync for OnchainAddress
impl Unpin for OnchainAddress
impl UnsafeUnpin for OnchainAddress
impl UnwindSafe for OnchainAddress
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more