pub struct Builder { /* private fields */ }Expand description
Builder used to create Address instances
Currently, only mailbox delivery is supported.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn testnet(self, testnet: bool) -> Self
pub fn testnet(self, testnet: bool) -> Self
Set the address to be used for test networks
Default is false.
Sourcepub fn server_pubkey(self, server_pubkey: PublicKey) -> Self
pub fn server_pubkey(self, server_pubkey: PublicKey) -> Self
Set the Ark server pubkey
Sourcepub fn policy(self, policy: VtxoPolicy) -> Self
pub fn policy(self, policy: VtxoPolicy) -> Self
Set the VTXO policy
Sourcepub fn pubkey_policy(self, user_pubkey: PublicKey) -> Self
pub fn pubkey_policy(self, user_pubkey: PublicKey) -> Self
Set the VTXO policy to the given PublicKey.
Sourcepub fn delivery(self, delivery: VtxoDelivery) -> Self
pub fn delivery(self, delivery: VtxoDelivery) -> Self
Add the given delivery method
Sourcepub fn mailbox(
self,
server_mailbox_pubkey: PublicKey,
mailbox: MailboxIdentifier,
vtxo_key: &Keypair,
) -> Result<Self, AddressBuilderError>
pub fn mailbox( self, server_mailbox_pubkey: PublicKey, mailbox: MailboxIdentifier, vtxo_key: &Keypair, ) -> Result<Self, AddressBuilderError>
Set the mailbox identifier of the server mailbox to use
Errors if no server pubkey was provided yet or if the vtxo key is incorrect.
Sourcepub fn into_address(self) -> Result<Address, AddressBuilderError>
pub fn into_address(self) -> Result<Address, AddressBuilderError>
Finish by building an Address
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
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