pub trait TopUpAddress<S: Signer<PlatformAddress>> {
// Required methods
fn top_up<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_private_key: PrivateKey,
fee_strategy: AddressFundsFeeStrategy,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<AddressInfos, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn top_up_with_signers<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, AS>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_proof_path: &'life2 DerivationPath,
fee_strategy: AddressFundsFeeStrategy,
signer: &'life3 S,
asset_lock_signer: &'life4 AS,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<AddressInfos, Error>> + Send + 'async_trait>>
where AS: Signer + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
}Expand description
Trait for topping up Platform addresses using various funding sources.
Required Methods§
Sourcefn top_up<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_private_key: PrivateKey,
fee_strategy: AddressFundsFeeStrategy,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<AddressInfos, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn top_up<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_private_key: PrivateKey,
fee_strategy: AddressFundsFeeStrategy,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<AddressInfos, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Tops up addresses using a raw private key for the asset-lock proof.
Returns proof-backed AddressInfos for the funded addresses.
Prefer Self::top_up_with_signers when the asset-lock private
key lives outside Rust (Swift / hardware wallet / HSM): the
_with_signers variant routes asset-lock signing through an
external [dpp::key_wallet::signer::Signer] so no raw private
key crosses the FFI boundary.
Sourcefn top_up_with_signers<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, AS>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_proof_path: &'life2 DerivationPath,
fee_strategy: AddressFundsFeeStrategy,
signer: &'life3 S,
asset_lock_signer: &'life4 AS,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<AddressInfos, Error>> + Send + 'async_trait>>
fn top_up_with_signers<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, AS>( &'life0 self, sdk: &'life1 Sdk, asset_lock_proof: AssetLockProof, asset_lock_proof_path: &'life2 DerivationPath, fee_strategy: AddressFundsFeeStrategy, signer: &'life3 S, asset_lock_signer: &'life4 AS, settings: Option<PutSettings>, ) -> Pin<Box<dyn Future<Output = Result<AddressInfos, Error>> + Send + 'async_trait>>
Top up addresses with an external asset-lock signer.
signer (the trait’s S: Signer<PlatformAddress>) signs each
per-input AddressWitness; asset_lock_signer produces the
outer state-transition ECDSA signature for the key at
asset_lock_proof_path — atomically deriving, signing, and
zeroising inside the signer’s trust boundary. This is the
signing path used by hosts that hold their private keys outside
Rust (the iOS Swift SDK, hardware wallets, remote signers).
settings.user_fee_increase is threaded straight through to
the transition builder. It both affects fee accounting AND
changes the ST’s signable bytes, which the upstream CL-height
retry path in platform-wallet relies on to bypass
Tenderdash’s invalid-tx hash cache
(keep-invalid-txs-in-cache = true in dashmate’s
mainnet/testnet templates). None / unset = unaltered fees.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.