pub struct ArkoorPackageBuilder<S: BuilderState> {
pub builders: Vec<ArkoorBuilder<S>>,
}Expand description
A builder struct for creating arkoor packages
A package consists out of one or more inputs and matching outputs. When packages are created, the outputs can be possibly split up between the inputs.
The builder always keeps input and output order.
Fields§
§builders: Vec<ArkoorBuilder<S>>Implementations§
Source§impl ArkoorPackageBuilder<Initial>
impl ArkoorPackageBuilder<Initial>
Sourcepub fn new_with_checkpoints(
inputs: impl IntoIterator<Item = Vtxo<Full>>,
outputs: Vec<ArkoorDestination>,
) -> Result<Self, ArkoorConstructionError>
pub fn new_with_checkpoints( inputs: impl IntoIterator<Item = Vtxo<Full>>, outputs: Vec<ArkoorDestination>, ) -> Result<Self, ArkoorConstructionError>
Create builder with checkpoints for multiple outputs
Sourcepub fn new_without_checkpoints(
inputs: impl IntoIterator<Item = Vtxo<Full>>,
outputs: Vec<ArkoorDestination>,
) -> Result<Self, ArkoorConstructionError>
pub fn new_without_checkpoints( inputs: impl IntoIterator<Item = Vtxo<Full>>, outputs: Vec<ArkoorDestination>, ) -> Result<Self, ArkoorConstructionError>
Create builder without checkpoints for multiple outputs
Sourcepub fn new_single_output_with_checkpoints(
inputs: impl IntoIterator<Item = Vtxo<Full>>,
output: ArkoorDestination,
change_policy: VtxoPolicy,
) -> Result<Self, ArkoorConstructionError>
pub fn new_single_output_with_checkpoints( inputs: impl IntoIterator<Item = Vtxo<Full>>, output: ArkoorDestination, change_policy: VtxoPolicy, ) -> Result<Self, ArkoorConstructionError>
Convenience constructor for single output with automatic change
Calculates change amount and creates appropriate output (backward-compatible with old API)
Sourcepub fn new_claim_all_with_checkpoints(
inputs: impl IntoIterator<Item = Vtxo<Full>>,
output_policy: VtxoPolicy,
) -> Result<Self, ArkoorConstructionError>
pub fn new_claim_all_with_checkpoints( inputs: impl IntoIterator<Item = Vtxo<Full>>, output_policy: VtxoPolicy, ) -> Result<Self, ArkoorConstructionError>
Convenience constructor for single output that claims all inputs
Sourcepub fn new_claim_all_without_checkpoints(
inputs: impl IntoIterator<Item = Vtxo<Full>>,
output_policy: VtxoPolicy,
) -> Result<Self, ArkoorConstructionError>
pub fn new_claim_all_without_checkpoints( inputs: impl IntoIterator<Item = Vtxo<Full>>, output_policy: VtxoPolicy, ) -> Result<Self, ArkoorConstructionError>
Convenience constructor for single output that claims all inputs
pub fn generate_user_nonces( self, user_keypairs: &[Keypair], ) -> Result<ArkoorPackageBuilder<UserGeneratedNonces>, ArkoorSigningError>
Source§impl ArkoorPackageBuilder<UserGeneratedNonces>
impl ArkoorPackageBuilder<UserGeneratedNonces>
pub fn user_cosign( self, user_keypairs: &[Keypair], server_cosign_response: ArkoorPackageCosignResponse, ) -> Result<ArkoorPackageBuilder<UserSigned>, ArkoorSigningError>
pub fn cosign_request(&self) -> ArkoorPackageCosignRequest<Vtxo<Full>>
Source§impl ArkoorPackageBuilder<UserSigned>
impl ArkoorPackageBuilder<UserSigned>
pub fn build_signed_vtxos(self) -> Vec<Vtxo<Full>>
Source§impl ArkoorPackageBuilder<ServerCanCosign>
impl ArkoorPackageBuilder<ServerCanCosign>
pub fn from_cosign_request( cosign_request: ArkoorPackageCosignRequest<Vtxo<Full>>, ) -> Result<Self, ArkoorSigningError>
pub fn server_cosign( self, server_keypair: &Keypair, ) -> Result<ArkoorPackageBuilder<ServerSigned>, ArkoorSigningError>
Source§impl ArkoorPackageBuilder<ServerSigned>
impl ArkoorPackageBuilder<ServerSigned>
pub fn cosign_response(&self) -> ArkoorPackageCosignResponse
Source§impl<S: BuilderState> ArkoorPackageBuilder<S>
impl<S: BuilderState> ArkoorPackageBuilder<S>
Sourcepub fn input_ids<'a>(&'a self) -> impl Iterator<Item = VtxoId> + Clone + 'a
pub fn input_ids<'a>(&'a self) -> impl Iterator<Item = VtxoId> + Clone + 'a
Access the input VTXO IDs
pub fn build_unsigned_vtxos<'a>( &'a self, ) -> impl Iterator<Item = Vtxo<Full>> + 'a
Sourcepub fn build_unsigned_internal_vtxos<'a>(
&'a self,
) -> impl Iterator<Item = ServerVtxo<Full>> + 'a
pub fn build_unsigned_internal_vtxos<'a>( &'a self, ) -> impl Iterator<Item = ServerVtxo<Full>> + 'a
Builds the unsigned internal VTXOs
Returns the checkpoint outputs (if checkpoints are used) and the dust isolation output (if dust isolation is used).