Skip to main content

build_token_mint_to_pool_transition

Function build_token_mint_to_pool_transition 

Source
pub async fn build_token_mint_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,
    memo: [u8; 36],
    sender_ovk: Option<OutgoingViewingKey>,
    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 TokenMintToPool 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, who must be authorized to mint and pays the fee in credits. using_group_info sets up a group action exactly like a transparent mint.

A group action mint is proven once, by the proposer (GroupStateTransitionInfoProposer): the group action pins the digest of the actions and the sighash binds the proposer as the minter, so every other signer submits the proposer’s bundle unchanged through new_token_mint_to_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.