Skip to main content

build_token_direct_purchase_to_pool_transition

Function build_token_direct_purchase_to_pool_transition 

Source
pub async fn build_token_direct_purchase_to_pool_transition<S: Signer<IdentityPublicKey>, P: OrchardProver>(
    token_id: Identifier,
    owner_id: Identifier,
    data_contract_id: Identifier,
    token_contract_position: u16,
    recipient: &OrchardAddress,
    token_count: TokenAmount,
    total_agreed_price: Credits,
    memo: [u8; 36],
    sender_ovk: Option<OutgoingViewingKey>,
    identity_public_key: &IdentityPublicKey,
    identity_contract_nonce: IdentityNonce,
    user_fee_increase: UserFeeIncrease,
    signer: &S,
    prover: &P,
    platform_version: &PlatformVersion,
) -> Result<StateTransition, ProtocolError>
Expand description

Builds a TokenDirectPurchaseToPool batch transition: proves an outputs-only Orchard bundle creating token_count of the token as a note for recipient inside the token’s shielded pool, then wraps it in a batch transition signed by owner_id, the buyer, who pays at most total_agreed_price credits to the contract owner plus the fee.