Skip to main content

build_token_claim_to_pool_transition

Function build_token_claim_to_pool_transition 

Source
pub async fn build_token_claim_to_pool_transition<S: Signer<IdentityPublicKey>, P: OrchardProver>(
    token_id: Identifier,
    owner_id: Identifier,
    data_contract_id: Identifier,
    token_contract_position: u16,
    recipient: &OrchardAddress,
    amount: TokenAmount,
    distribution_type: TokenDistributionType,
    claim_up_to: Option<u64>,
    memo: [u8; 36],
    sender_ovk: Option<OutgoingViewingKey>,
    public_note: Option<String>,
    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 TokenClaimToPool batch transition: proves an outputs-only Orchard bundle creating amount 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 claimant, who pays the fee in credits.

amount must be exactly what consensus will pay out: the next pre-programmed release, or for a perpetual distribution the rewards from the last claim up to claim_up_to (a cycle-aligned moment in the distribution’s own unit, not after the current interval). A mismatch is a paid failure, so the client should compute the amount from the same state it read the moment from.