BonkSwap decoder

Decode BonkSwap instructions and accounts in Rust with carbon-bonkswap-decoder 2.0.0. Program ID BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.

On this page

carbon-bonkswap-decoder decodes the instructions and accounts of the BonkSwap program (BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p): 19 instructions, 5 account types. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.

Cratecarbon-bonkswap-decoder 2.0.0
Installcargo add carbon-bonkswap-decoder@2.0.0
Program IDBSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p (carbon_bonkswap_decoder::PROGRAM_ID)
CategoryDEX & AMM
Decodercarbon_bonkswap_decoder::BonkswapDecoder
Instruction enuminstructions::BonkswapInstruction
Account enumaccounts::BonkswapAccount
Featuresserde, postgres, graphql (none enabled by default)
API docsdocs.rs/carbon-bonkswap-decoder/2.0.0
Sourcedecoders/bonkswap-decoder

Other DEX and AMM decoders: FluxBeam, Gavel, Heaven, Jupiter Limit Order, Jupiter Limit Order v2, Kamino Limit Order, Lifinity AMM v2, Meteora DAMM v2, Meteora DLMM, Meteora Pools, OpenBook v2, Orca Whirlpools, PancakeSwap, Phoenix v1, PumpSwap, Raydium AMM v4, Raydium CLMM, Raydium CPMM, Raydium Stable Swap, Stabble Stable Swap, Stabble Weighted Swap. To decode several in one pipeline, see dEX and AMM decoders.

The serde feature derives Serialize/Deserialize on every type, postgres adds tables and processors for Postgres, and graphql adds a schema for the GraphQL server.

Usage#

This program crawls recent BonkSwap transactions from the public RPC and prints every decoded Swap instruction. Add the dependencies:

Terminal
cargo add carbon-core@2.0.0 carbon-bonkswap-decoder@2.0.0 carbon-rpc-transaction-crawler-datasource@2.0.0 carbon-log-metrics@2.0.0 env_logger tokio --features tokio/full
src/main.rs
use {
    carbon_core::{
        error::CarbonResult, instruction::InstructionProcessorInputType, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_bonkswap_decoder::{instructions::BonkswapInstruction, BonkswapDecoder, PROGRAM_ID},
    carbon_rpc_transaction_crawler_datasource::{ConnectionConfig, Filters, RpcTransactionCrawler},
    std::sync::Arc,
};

#[tokio::main]
async fn main() -> CarbonResult<()> {
    env_logger::init();

    // Fetches the program's recent transactions over JSON-RPC, newest first.
    let datasource = RpcTransactionCrawler::new(
        "https://api.mainnet-beta.solana.com".to_string(),
        PROGRAM_ID,
        ConnectionConfig::default(),
        Filters::new(None, None, None),
        None,
    );

    Pipeline::builder()
        .datasource(datasource)
        .metrics(Arc::new(LogMetrics::new()))
        .instruction(BonkswapDecoder, InstructionLogger)
        .build()?
        .run()
        .await
}

struct InstructionLogger;

impl Processor<InstructionProcessorInputType<'_, BonkswapInstruction>> for InstructionLogger {
    async fn process(
        &mut self,
        input: &InstructionProcessorInputType<'_, BonkswapInstruction>,
    ) -> CarbonResult<()> {
        let signature = input.metadata.transaction_metadata.signature;
        if let BonkswapInstruction::Swap { data, accounts, .. } = input.decoded_instruction {
            println!("swap {signature}: {data:?} state={}", accounts.state);
        }
        Ok(())
    }
}
Terminal
RUST_LOG=info cargo run

Each Swap instruction prints one line with the transaction signature and the decoded Swap data. The public endpoint rate-limits requests, so the first lines can take a while; use your own RPC URL for anything beyond a test. See stream with RPC for the crawler options.

Decode accounts#

The transaction crawler emits transactions only. To decode accounts, use a datasource that emits account updates. This program subscribes to the program's accounts with programSubscribe on the public WebSocket endpoint and prints every decoded Pool account as it changes. Add the datasource and the Solana RPC types it takes:

Terminal
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2
src/main.rs
use {
    carbon_core::{
        account::AccountProcessorInputType, error::CarbonResult, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_bonkswap_decoder::{accounts::BonkswapAccount, BonkswapDecoder, PROGRAM_ID},
    carbon_rpc_program_subscribe_datasource::{Filters, RpcProgramSubscribe},
    solana_client::rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig, UiAccountEncoding},
    std::sync::Arc,
};

#[tokio::main]
async fn main() -> CarbonResult<()> {
    env_logger::init();

    // Streams every change to an account owned by the program (programSubscribe).
    let config = RpcProgramAccountsConfig {
        account_config: RpcAccountInfoConfig {
            encoding: Some(UiAccountEncoding::Base64),
            ..Default::default()
        },
        ..Default::default()
    };
    let datasource = RpcProgramSubscribe::new(
        "wss://api.mainnet-beta.solana.com".to_string(),
        Filters::new(PROGRAM_ID, Some(config)),
    );

    Pipeline::builder()
        .datasource(datasource)
        .metrics(Arc::new(LogMetrics::new()))
        .account(BonkswapDecoder, AccountLogger)
        .build()?
        .run()
        .await
}

struct AccountLogger;

impl Processor<AccountProcessorInputType<'_, BonkswapAccount>> for AccountLogger {
    async fn process(
        &mut self,
        input: &AccountProcessorInputType<'_, BonkswapAccount>,
    ) -> CarbonResult<()> {
        if let BonkswapAccount::Pool(pool) = &input.decoded_account.data {
            println!("pool {}: {pool:?}", input.metadata.pubkey);
        }
        Ok(())
    }
}
Terminal
RUST_LOG=info cargo run

Each update to a Pool account prints its address and decoded fields; the program runs until you stop it. Cargo resolves solana-client to 4.2.2, the exact version the datasource pins, so both use the same RpcProgramAccountsConfig type. To load every existing account once instead of streaming changes, see load account state.

Instructions#

Variants of BonkswapInstruction. Each is BonkswapInstruction::<Variant> { program_id, data, accounts }, where data and accounts are the types listed under the variant, exported from carbon_bonkswap_decoder::instructions. Discriminators are the leading bytes of the instruction data, in hex.

How an instruction decodes. The decoder returns a variant only when all of these hold; otherwise the instruction is skipped and no processor is called:

  1. The instruction's program ID is BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.
  2. The data starts with the variant's discriminator, and the rest deserializes into its data type.
  3. The instruction has at least as many accounts as the variant requires (the "Required accounts" count under each variant).

Accounts. They are matched by position, in the order listed. An account marked optional is None only when the instruction ends before it; Anchor programs pass the program ID as a placeholder for an omitted optional account, so check for Some(PROGRAM_ID) too. Accounts after the listed ones are in accounts.remaining as AccountMetas. The decoder doesn't record whether an account signed or was writable: read that from input.raw_instruction.accounts[i].is_signer and .is_writable, which follow the same order. It doesn't check signer, writable, owner or PDA constraints either; the program enforced those when the transaction executed, so a decoded instruction from a successful transaction already satisfied them.

AddSupply#

Discriminator 50664639eb58ef08 · data AddSupply · accounts AddSupplyInstructionAccounts.

FieldType
supply_marcoToken
supply_project_firstToken
supply_project_secondToken
durationu64

Required accounts: 13; extras go to remaining.

Fields of AddSupplyInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3token_xPubkey
4token_yPubkey
5token_marco_accountPubkey
6token_project_first_accountPubkey
7token_project_second_accountPubkey
8admin_marco_accountPubkey
9admin_project_first_accountPubkey
10admin_project_second_accountPubkey
11adminPubkey
12token_programPubkey
13…remainingVec<AccountMeta>

AddTokens#

Discriminator 1cda1ed1af9b99f0 · data AddTokens · accounts AddTokensInstructionAccounts.

FieldType
delta_xToken
delta_yToken

Required accounts: 25; extras go to remaining.

Fields of AddTokensInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3providerPubkey
4token_xPubkey
5token_yPubkey
6token_marcoPubkey
7token_project_firstPubkey
8token_project_secondPubkey
9owner_x_accountPubkey
10owner_y_accountPubkey
11pool_x_accountPubkey
12pool_y_accountPubkey
13owner_marco_accountPubkey
14owner_project_first_accountPubkey
15owner_project_second_accountPubkey
16token_marco_accountPubkey
17token_project_first_accountPubkey
18token_project_second_accountPubkey
19ownerPubkey
20program_authorityPubkey
21system_programPubkey
22token_programPubkey
23associated_token_programPubkey
24rentPubkey
25…remainingVec<AccountMeta>

ClosePool#

Discriminator 8cbdd117ef3eef0b · data ClosePool · accounts ClosePoolInstructionAccounts.

No data fields.

Required accounts: 15; extras go to remaining.

Fields of ClosePoolInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3token_xPubkey
4token_yPubkey
5token_marco_accountPubkey
6token_project_first_accountPubkey
7token_project_second_accountPubkey
8pool_x_accountPubkey
9pool_y_accountPubkey
10buyback_x_accountPubkey
11buyback_y_accountPubkey
12adminPubkey
13program_authorityPubkey
14token_programPubkey
15…remainingVec<AccountMeta>

CreateDualFarm#

Discriminator 2ab4678ace2bd062 · data CreateDualFarm · accounts CreateDualFarmInstructionAccounts.

FieldType
supply_marcoToken
supply_project_firstToken
durationu64
bumpu8

Required accounts: 16; extras go to remaining.

Fields of CreateDualFarmInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3token_xPubkey
4token_yPubkey
5token_marcoPubkey
6token_project_firstPubkey
7token_marco_accountPubkey
8token_project_first_accountPubkey
9admin_marco_accountPubkey
10admin_project_first_accountPubkey
11adminPubkey
12program_authorityPubkey
13system_programPubkey
14token_programPubkey
15rentPubkey
16…remainingVec<AccountMeta>

CreateFarm#

Discriminator 4a3b80a057ae99c2 · data CreateFarm · accounts CreateFarmInstructionAccounts.

FieldType
supplyToken
durationu64
bumpu8

Required accounts: 13; extras go to remaining.

Fields of CreateFarmInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3token_xPubkey
4token_yPubkey
5token_marcoPubkey
6token_marco_accountPubkey
7admin_marco_accountPubkey
8adminPubkey
9program_authorityPubkey
10system_programPubkey
11token_programPubkey
12rentPubkey
13…remainingVec<AccountMeta>

CreatePool#

Discriminator e992d18ecf6840bc · data CreatePool · accounts CreatePoolInstructionAccounts.

FieldType
lp_feeFixedPoint
buyback_feeFixedPoint
project_feeFixedPoint
mercanti_feeFixedPoint
initial_token_xToken
initial_token_yToken
bumpu8

Required accounts: 14; extras go to remaining.

Fields of CreatePoolInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2token_xPubkey
3token_yPubkey
4pool_x_accountPubkey
5pool_y_accountPubkey
6admin_x_accountPubkey
7admin_y_accountPubkey
8adminPubkey
9project_ownerPubkey
10program_authorityPubkey
11system_programPubkey
12token_programPubkey
13rentPubkey
14…remainingVec<AccountMeta>

CreateProvider#

Discriminator 4a35d3ae26a8e3b1 · data CreateProvider · accounts CreateProviderInstructionAccounts.

FieldType
token_x_amountToken
token_y_amountToken
bumpu8

Required accounts: 13; extras go to remaining.

Fields of CreateProviderInstructionAccounts, in account order:

#FieldType
0poolPubkey
1farmPubkey
2providerPubkey
3token_xPubkey
4token_yPubkey
5pool_x_accountPubkey
6pool_y_accountPubkey
7owner_x_accountPubkey
8owner_y_accountPubkey
9ownerPubkey
10system_programPubkey
11token_programPubkey
12rentPubkey
13…remainingVec<AccountMeta>

CreateState#

Discriminator d6d3d14f6b69f7de · data CreateState · accounts CreateStateInstructionAccounts.

FieldType
nonceu8

Required accounts: 4; extras go to remaining.

Fields of CreateStateInstructionAccounts, in account order:

#FieldType
0statePubkey
1adminPubkey
2program_authorityPubkey
3system_programPubkey
4…remainingVec<AccountMeta>

CreateTripleFarm#

Discriminator 9a1ab49112c987ab · data CreateTripleFarm · accounts CreateTripleFarmInstructionAccounts.

FieldType
supply_marcoToken
supply_project_firstToken
supply_project_secondToken
durationu64
bumpu8

Required accounts: 19; extras go to remaining.

Fields of CreateTripleFarmInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3token_xPubkey
4token_yPubkey
5token_marcoPubkey
6token_project_firstPubkey
7token_project_secondPubkey
8token_marco_accountPubkey
9token_project_first_accountPubkey
10token_project_second_accountPubkey
11admin_marco_accountPubkey
12admin_project_first_accountPubkey
13admin_project_second_accountPubkey
14adminPubkey
15program_authorityPubkey
16system_programPubkey
17token_programPubkey
18rentPubkey
19…remainingVec<AccountMeta>

ResetFarm#

Discriminator 2f4de97576373d71 · data ResetFarm · accounts ResetFarmInstructionAccounts.

No data fields.

Required accounts: 17; extras go to remaining.

Fields of ResetFarmInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3token_xPubkey
4token_yPubkey
5token_marcoPubkey
6token_marco_accountPubkey
7token_project_first_accountPubkey
8token_project_second_accountPubkey
9admin_marco_accountPubkey
10admin_project_first_accountPubkey
11admin_project_second_accountPubkey
12adminPubkey
13program_authorityPubkey
14system_programPubkey
15token_programPubkey
16rentPubkey
17…remainingVec<AccountMeta>

Swap#

Discriminator f8c69e91e17587c8 · data Swap · accounts SwapInstructionAccounts.

FieldType
delta_inToken
price_limitFixedPoint
x_to_ybool

Required accounts: 17; extras go to remaining.

Fields of SwapInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2token_xPubkey
3token_yPubkey
4pool_x_accountPubkey
5pool_y_accountPubkey
6swapper_x_accountPubkey
7swapper_y_accountPubkey
8swapperPubkey
9referrer_x_accountPubkey
10referrer_y_accountPubkey
11referrerPubkey
12program_authorityPubkey
13system_programPubkey
14token_programPubkey
15associated_token_programPubkey
16rentPubkey
17…remainingVec<AccountMeta>

UpdateFees#

Discriminator e11b0d064554acbf · data UpdateFees · accounts UpdateFeesInstructionAccounts.

FieldType
new_buyback_feeFixedPoint
new_project_feeFixedPoint
new_provider_feeFixedPoint
new_mercanti_feeFixedPoint

Required accounts: 6; extras go to remaining.

Fields of UpdateFeesInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2token_xPubkey
3token_yPubkey
4adminPubkey
5program_authorityPubkey
6…remainingVec<AccountMeta>

UpdateRewardTokens#

Discriminator f9ec474a683ae11c · data UpdateRewardTokens · accounts UpdateRewardTokensInstructionAccounts.

No data fields.

Required accounts: 12; extras go to remaining.

Fields of UpdateRewardTokensInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3token_marco_accountPubkey
4token_project_first_accountPubkey
5token_project_second_accountPubkey
6token_marcoPubkey
7new_token_marco_accountPubkey
8adminPubkey
9program_authorityPubkey
10system_programPubkey
11token_programPubkey
12…remainingVec<AccountMeta>

WithdrawBuyback#

Discriminator bc4b1ec6632b0c36 · data WithdrawBuyback · accounts WithdrawBuybackInstructionAccounts.

No data fields.

Required accounts: 14; extras go to remaining.

Fields of WithdrawBuybackInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2token_xPubkey
3token_yPubkey
4buyback_x_accountPubkey
5buyback_y_accountPubkey
6pool_x_accountPubkey
7pool_y_accountPubkey
8adminPubkey
9program_authorityPubkey
10system_programPubkey
11token_programPubkey
12associated_token_programPubkey
13rentPubkey
14…remainingVec<AccountMeta>

WithdrawLpFee#

Discriminator 95a102d5c3932a41 · data WithdrawLpFee · accounts WithdrawLpFeeInstructionAccounts.

No data fields.

Required accounts: 15; extras go to remaining.

Fields of WithdrawLpFeeInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2providerPubkey
3token_xPubkey
4token_yPubkey
5owner_x_accountPubkey
6owner_y_accountPubkey
7pool_x_accountPubkey
8pool_y_accountPubkey
9ownerPubkey
10program_authorityPubkey
11system_programPubkey
12token_programPubkey
13associated_token_programPubkey
14rentPubkey
15…remainingVec<AccountMeta>

WithdrawMercantiFee#

Discriminator fde581252f480bf0 · data WithdrawMercantiFee · accounts WithdrawMercantiFeeInstructionAccounts.

No data fields.

Required accounts: 11; extras go to remaining.

Fields of WithdrawMercantiFeeInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2token_xPubkey
3token_yPubkey
4mercanti_x_accountPubkey
5mercanti_y_accountPubkey
6pool_x_accountPubkey
7pool_y_accountPubkey
8adminPubkey
9program_authorityPubkey
10token_programPubkey
11…remainingVec<AccountMeta>

WithdrawProjectFee#

Discriminator 82c98e9c9fcfa816 · data WithdrawProjectFee · accounts WithdrawProjectFeeInstructionAccounts.

No data fields.

Required accounts: 14; extras go to remaining.

Fields of WithdrawProjectFeeInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2token_xPubkey
3token_yPubkey
4project_owner_x_accountPubkey
5project_owner_y_accountPubkey
6pool_x_accountPubkey
7pool_y_accountPubkey
8project_ownerPubkey
9program_authorityPubkey
10system_programPubkey
11token_programPubkey
12associated_token_programPubkey
13rentPubkey
14…remainingVec<AccountMeta>

WithdrawRewards#

Discriminator 0ad6db8bcd16fb15 · data WithdrawRewards · accounts WithdrawRewardsInstructionAccounts.

No data fields.

Required accounts: 21; extras go to remaining.

Fields of WithdrawRewardsInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3providerPubkey
4token_xPubkey
5token_yPubkey
6token_marcoPubkey
7token_project_firstPubkey
8token_project_secondPubkey
9token_marco_accountPubkey
10token_project_first_accountPubkey
11token_project_second_accountPubkey
12owner_marco_accountPubkey
13owner_project_first_accountPubkey
14owner_project_second_accountPubkey
15ownerPubkey
16program_authorityPubkey
17system_programPubkey
18token_programPubkey
19associated_token_programPubkey
20rentPubkey
21…remainingVec<AccountMeta>

WithdrawShares#

Discriminator b0689a69fa5044f4 · data WithdrawShares · accounts WithdrawSharesInstructionAccounts.

FieldType
sharesToken

Required accounts: 25; extras go to remaining.

Fields of WithdrawSharesInstructionAccounts, in account order:

#FieldType
0statePubkey
1poolPubkey
2farmPubkey
3providerPubkey
4token_xPubkey
5token_yPubkey
6token_marcoPubkey
7token_project_firstPubkey
8token_project_secondPubkey
9pool_x_accountPubkey
10pool_y_accountPubkey
11token_marco_accountPubkey
12token_project_first_accountPubkey
13token_project_second_accountPubkey
14owner_x_accountPubkey
15owner_y_accountPubkey
16owner_marco_accountPubkey
17owner_project_first_accountPubkey
18owner_project_second_accountPubkey
19ownerPubkey
20program_authorityPubkey
21system_programPubkey
22token_programPubkey
23associated_token_programPubkey
24rentPubkey
25…remainingVec<AccountMeta>

Accounts#

Variants of BonkswapAccount. Each wraps a boxed struct from carbon_bonkswap_decoder::accounts::<module>. decode_account only considers accounts owned by PROGRAM_ID and returns the first variant that matches.

Farm#

Discriminator a19cd3fdfa4035fa · accounts::farm::Farm.

FieldType
poolPubkey
tokens[Pubkey; 3]
token_accounts[Pubkey; 3]
supply[Token; 3]
supply_left[Token; 3]
accumulated_seconds_per_shareFixedPoint
offset_seconds_per_shareFixedPoint
start_timeu64
end_timeu64
last_updateu64
bumpu8
farm_typeFarmType

Pool#

Discriminator f19a6d0411b16dbc · accounts::pool::Pool.

FieldType
token_xPubkey
token_yPubkey
pool_x_accountPubkey
pool_y_accountPubkey
adminPubkey
project_ownerPubkey
token_x_reserveToken
token_y_reserveToken
self_sharesToken
all_sharesToken
buyback_amount_xToken
buyback_amount_yToken
project_amount_xToken
project_amount_yToken
mercanti_amount_xToken
mercanti_amount_yToken
lp_accumulator_xFixedPoint
lp_accumulator_yFixedPoint
const_kProduct
priceFixedPoint
lp_feeFixedPoint
buyback_feeFixedPoint
project_feeFixedPoint
mercanti_feeFixedPoint
farm_countu64
bumpu8

PoolV2#

Discriminator 5b0cd65707b9a737 · accounts::pool_v2::PoolV2.

FieldType
token_xPubkey
token_yPubkey
pool_x_accountPubkey
pool_y_accountPubkey
adminPubkey
project_ownerPubkey
token_x_reserveToken
token_y_reserveToken
self_sharesToken
all_sharesToken
buyback_amount_xToken
buyback_amount_yToken
project_amount_xToken
project_amount_yToken
mercanti_amount_xToken
mercanti_amount_yToken
lp_accumulator_xFixedPoint
lp_accumulator_yFixedPoint
const_kProduct
priceFixedPoint
lp_feeFixedPoint
buyback_feeFixedPoint
project_feeFixedPoint
mercanti_feeFixedPoint
farm_countu64
pool_bumpu8
lp_tokenPubkey
lp_token_mint_bumpu8
padding[u64; 8]

Provider#

Discriminator a4b447114bd850c3 · accounts::provider::Provider.

FieldType
token_xPubkey
token_yPubkey
ownerPubkey
sharesToken
last_fee_accumulator_xFixedPoint
last_fee_accumulator_yFixedPoint
last_seconds_per_shareFixedPoint
last_withdraw_timeu64
tokens_owed_xToken
tokens_owed_yToken
current_farm_countu64
bumpu8

State#

Discriminator d8926b5e684bb6b1 · accounts::state::State.

FieldType
adminPubkey
program_authorityPubkey
bumpu8
nonceu8

Types#

Types used by the instructions, accounts and events above, exported from carbon_bonkswap_decoder::types.

FarmType#

Enum types::FarmType.

Variant
Single
Dual
Triple

FixedPoint#

Struct types::FixedPoint.

FieldType
vu128

Product#

Struct types::Product.

FieldType
vu128

Token#

Struct types::Token.

FieldType
vu64

Generated from the crate’s source at Carbon v2.0.0, so it always matches the published code. Spotted a problem? Report it; edits to this page itself are overwritten on the next release.

Your endpoints

Code samples use these instead of the placeholders, so you can copy and run them as they are. They’re stored only in this browser and never sent anywhere.