Skip to main content

build_token_burn_from_pool_transition

Function build_token_burn_from_pool_transition 

Source
pub async fn build_token_burn_from_pool_transition<S: Signer<IdentityPublicKey>, P: OrchardProver>(
    token_id: Identifier,
    owner_id: Identifier,
    data_contract_id: Identifier,
    token_contract_position: u16,
    spends: Vec<SpendableNote>,
    amount: TokenAmount,
    change_address: &OrchardAddress,
    fvk: &FullViewingKey,
    ask: &SpendAuthorizingKey,
    anchor: Anchor,
    memo: [u8; 36],
    public_note: Option<String>,
    using_group_info: Option<GroupStateTransitionInfoStatus>,
    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 TokenBurnFromPool batch transition: spends spends inside the token’s shielded pool, destroys amount and returns the remainder to change_address, then wraps the bundle in a batch transition signed by owner_id, who must be authorized to burn and pays the fee in credits. The token id, owner id and amount are bound into the Orchard sighash.

A group action burn is proven once, by the proposer (GroupStateTransitionInfoProposer): the group action pins the digest of the actions and the sighash binds the proposer, so every other signer submits the proposer’s bundle unchanged through new_token_burn_from_pool_transition with GroupStateTransitionInfoOtherSigner. Asking this builder for a fresh bundle on behalf of another signer is refused, since consensus would reject it as a modification of the group action.