pub struct ChannelAuthorize<'a> {
pub common_fields: CommonFields<'a>,
pub channel_id: Cow<'a, str>,
pub amount: Cow<'a, str>,
pub secret: Option<Cow<'a, str>>,
pub seed: Option<Cow<'a, str>>,
pub seed_hex: Option<Cow<'a, str>>,
pub passphrase: Option<Cow<'a, str>>,
pub key_type: Option<CryptoAlgorithm>,
}
Expand description
The channel_authorize method creates a signature that can be used to redeem a specific amount of XRP from a payment channel.
Warning: Do not send secret keys to untrusted servers or through unsecured network connections. (This includes the secret, seed, seed_hex, or passphrase fields of this request.) You should only use this method on a secure, encrypted network connection to a server you run or fully trust with your funds. Otherwise, eavesdroppers could use your secret key to sign claims and take all the money from this payment channel and anything else using the same key pair.
See Set Up Secure Signing:
<https://xrpl.org/set-up-secure-signing.html>
See Channel Authorize:
<https://xrpl.org/channel_authorize.html>
Fields§
§common_fields: CommonFields<'a>
The common fields shared by all requests.
channel_id: Cow<'a, str>
The unique ID of the payment channel to use.
amount: Cow<'a, str>
Cumulative amount of XRP, in drops, to authorize. If the destination has already received a lesser amount of XRP from this channel, the signature created by this method can be redeemed for the difference.
secret: Option<Cow<'a, str>>
The secret key to use to sign the claim. This must be the same key pair as the public key specified in the channel. Cannot be used with seed, seed_hex, or passphrase.
seed: Option<Cow<'a, str>>
The secret seed to use to sign the claim. This must be the same key pair as the public key specified in the channel. Must be in the XRP Ledger’s base58 format. If provided, you must also specify the key_type. Cannot be used with secret, seed_hex, or passphrase.
seed_hex: Option<Cow<'a, str>>
The secret seed to use to sign the claim. This must be the same key pair as the public key specified in the channel. Must be in hexadecimal format. If provided, you must also specify the key_type. Cannot be used with secret, seed, or passphrase.
passphrase: Option<Cow<'a, str>>
A string passphrase to use to sign the claim. This must be the same key pair as the public key specified in the channel. The key derived from this passphrase must match the public key specified in the channel. If provided, you must also specify the key_type. Cannot be used with secret, seed, or seed_hex.
key_type: Option<CryptoAlgorithm>
The signing algorithm of the cryptographic key pair provided. Valid types are secp256k1 or ed25519. The default is secp256k1.
Implementations§
Trait Implementations§
Source§impl<'a> ChannelAuthorizeError for ChannelAuthorize<'a>
impl<'a> ChannelAuthorizeError for ChannelAuthorize<'a>
fn _get_field_error(&self) -> XRPLModelResult<()>
Source§impl<'a> Clone for ChannelAuthorize<'a>
impl<'a> Clone for ChannelAuthorize<'a>
Source§fn clone(&self) -> ChannelAuthorize<'a>
fn clone(&self) -> ChannelAuthorize<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a> Debug for ChannelAuthorize<'a>
impl<'a> Debug for ChannelAuthorize<'a>
Source§impl<'de, 'a> Deserialize<'de> for ChannelAuthorize<'a>
impl<'de, 'a> Deserialize<'de> for ChannelAuthorize<'a>
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>,
Source§impl<'a> From<ChannelAuthorize<'a>> for XRPLRequest<'a>
impl<'a> From<ChannelAuthorize<'a>> for XRPLRequest<'a>
Source§fn from(request: ChannelAuthorize<'a>) -> Self
fn from(request: ChannelAuthorize<'a>) -> Self
Source§impl<'a> Model for ChannelAuthorize<'a>
impl<'a> Model for ChannelAuthorize<'a>
Source§fn get_errors(&self) -> XRPLModelResult<()>
fn get_errors(&self) -> XRPLModelResult<()>
Source§fn validate(&self) -> XRPLModelResult<()>
fn validate(&self) -> XRPLModelResult<()>
get_errors
if there was one.Source§impl<'a> PartialEq for ChannelAuthorize<'a>
impl<'a> PartialEq for ChannelAuthorize<'a>
Source§impl<'a> Request<'a> for ChannelAuthorize<'a>
impl<'a> Request<'a> for ChannelAuthorize<'a>
fn get_common_fields(&self) -> &CommonFields<'a>
fn get_common_fields_mut(&mut self) -> &mut CommonFields<'a>
Source§impl<'a> Serialize for ChannelAuthorize<'a>
impl<'a> Serialize for ChannelAuthorize<'a>
impl<'a> Eq for ChannelAuthorize<'a>
impl<'a> StructuralPartialEq for ChannelAuthorize<'a>
Auto Trait Implementations§
impl<'a> Freeze for ChannelAuthorize<'a>
impl<'a> RefUnwindSafe for ChannelAuthorize<'a>
impl<'a> Send for ChannelAuthorize<'a>
impl<'a> Sync for ChannelAuthorize<'a>
impl<'a> Unpin for ChannelAuthorize<'a>
impl<'a> UnwindSafe for ChannelAuthorize<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.