Rust SDK Public API Inventory
This page lists the public classes, methods, functions, enum values, fields, and constants of the SDK. Use it to check exact names when working with lower-level SDK APIs.
phantasma_sdk::binary
Source: src/binary.rs
Declarations
pub const MAX_ARRAY_SIZE: usize = 0x0100_0000pub struct BinaryReader<'a>pub struct BinaryWriterMethods
impl BinaryReader<'a>: pub fn assert_eof(&self) -> Result<()>impl BinaryReader<'a>: pub fn new(data: &'a [u8]) -> Selfimpl BinaryReader<'a>: pub fn read(&mut self, count: usize) -> Result<Vec<u8>>impl BinaryReader<'a>: pub fn read_array<const N: usize>(&mut self) -> Result<[u8; N]>impl BinaryReader<'a>: pub fn read_big_integer(&mut self) -> Result<BigInt>impl BinaryReader<'a>: pub fn read_bool(&mut self) -> Result<bool>impl BinaryReader<'a>: pub fn read_i64_le(&mut self) -> Result<i64>impl BinaryReader<'a>: pub fn read_string(&mut self) -> Result<String>impl BinaryReader<'a>: pub fn read_u16_le(&mut self) -> Result<u16>impl BinaryReader<'a>: pub fn read_u32_le(&mut self) -> Result<u32>impl BinaryReader<'a>: pub fn read_u64_le(&mut self) -> Result<u64>impl BinaryReader<'a>: pub fn read_u8(&mut self) -> Result<u8>impl BinaryReader<'a>: pub fn read_var_bytes(&mut self, max_size: usize) -> Result<Vec<u8>>impl BinaryReader<'a>: pub fn read_var_uint(&mut self) -> Result<u64>impl BinaryReader<'a>: pub fn remaining(&self) -> usizeimpl BinaryWriter: pub fn bytes(&self) -> &[u8]impl BinaryWriter: pub fn into_bytes(self) -> Vec<u8>impl BinaryWriter: pub fn new() -> Selfimpl BinaryWriter: pub fn write(&mut self, data: impl AsRef<[u8]>)impl BinaryWriter: pub fn write_big_integer(&mut self, value: &BigInt) -> Result<()>impl BinaryWriter: pub fn write_bool(&mut self, value: bool)impl BinaryWriter: pub fn write_i64_le(&mut self, value: i64)impl BinaryWriter: pub fn write_string(&mut self, value: &str)impl BinaryWriter: pub fn write_u16_le(&mut self, value: u16)impl BinaryWriter: pub fn write_u32_le(&mut self, value: u32)impl BinaryWriter: pub fn write_u64_le(&mut self, value: u64)impl BinaryWriter: pub fn write_u8(&mut self, value: u8)impl BinaryWriter: pub fn write_var_bytes(&mut self, data: impl AsRef<[u8]>)impl BinaryWriter: pub fn write_var_uint(&mut self, value: u64)pub fn big_int_to_vm_bytes(value: &BigInt) -> Result<Vec<u8>>pub fn vm_bytes_to_big_int(data: &[u8]) -> BigIntphantasma_sdk::carbon
Source: src/carbon.rs
Declarations
pub const DEFAULT_TX_EXPIRY: Duration = Duration::from_secs(45)pub const EMPTY_BYTES16: Bytes16 = Bytes16([0; 16])pub const EMPTY_BYTES32: Bytes32 = Bytes32([0; 32])pub const EMPTY_BYTES64: Bytes64 = Bytes64([0; 64])pub const MARKET_DELISTING_GRACE_MS: u64 = 1_000 * 60 * 60 * 24pub const MARKET_MAXIMUM_LISTING_TIME_MS: u64 = 1_000 * 60 * 60 * 24 * 90pub const MARKET_MINIMUM_LISTING_TIME_MS: u64 = 1_000pub const MARKET_ROYALTY_HUNDRED_PERCENT: u64 = 100 * MARKET_ROYALTY_ONE_PERCENTpub const MARKET_ROYALTY_ONE_PERCENT: u64 = 10_000_000pub const STANDARD_META_ID: &str = "_i"pub const SYSTEM_ADDRESS_DATA_POOL: Bytes32 = Bytes32([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, ])pub const SYSTEM_ADDRESS_GAS_POOL: Bytes32 = Bytes32([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ])pub const SYSTEM_ADDRESS_NULL: Bytes32 = EMPTY_BYTES32pub enum GovernanceContractMethodpub enum ListingTypepub enum MarketContractMethodpub enum ModuleIdpub enum TokenContractMethodpub enum TxPayloadpub enum TxTypepub enum VMTypepub enum VMValuepub mod standard_metapub struct BurnFungibleArgspub struct BurnFungibleParamspub struct BurnNonFungibleArgspub struct BurnNonFungibleParamspub struct CallArgSectionpub struct CarbonReader<'a>pub struct CarbonWriterpub struct ChainConfigpub struct CreateMintedTokenSeriesArgspub struct CreateTokenSeriesArgspub struct GasConfigpub struct IntX(pub BigInt)pub struct MarketBuyTokenArgspub struct MarketBuyTokenByIdArgspub struct MarketCancelSaleArgspub struct MarketCancelSaleByIdArgspub struct MarketConfigpub struct MarketConfigFlags: u32pub struct MarketGetTokenListingCountArgspub struct MarketGetTokenListingInfoArgspub struct MarketGetTokenListingInfoByIdArgspub struct MarketSellTokenArgspub struct MarketSellTokenByIdArgspub struct MintFungibleArgspub struct MintFungibleParamspub struct MintNonFungibleArgspub struct MintPhantasmaNonFungibleArgspub struct MsgCallArgSectionspub struct NFTMintInfopub struct PhantasmaNFTMintInfopub struct PhantasmaNFTMintResultpub struct RegisterNameArgspub struct SeriesInfopub struct SignedTxMsgpub struct SmallString(pub String)pub struct TokenFlags: u8pub struct TokenInfopub struct TokenListingpub struct TokenSchemaFieldpub struct TokenSchemaspub struct TokenSchemasJsonpub struct TokensConfigpub struct TokensConfigFlags: u8pub struct TransferFungibleArgspub struct TransferFungibleParamspub struct TransferNonFungibleArgspub struct TransferNonFungibleParamspub struct TxLimitspub struct TxMsgpub struct TxMsgBurnFungiblepub struct TxMsgBurnFungibleGasPayerpub struct TxMsgBurnNonFungiblepub struct TxMsgBurnNonFungibleGasPayerpub struct TxMsgCallpub struct TxMsgCallMultipub struct TxMsgMintFungiblepub struct TxMsgMintNonFungiblepub struct TxMsgPhantasmapub struct TxMsgPhantasmaRawpub struct TxMsgSpecialResolutionpub struct TxMsgTradepub struct TxMsgTransferFungiblepub struct TxMsgTransferFungibleGasPayerpub struct TxMsgTransferNonFungibleMultipub struct TxMsgTransferNonFungibleMultiGasPayerpub struct TxMsgTransferNonFungibleSinglepub struct TxMsgTransferNonFungibleSingleGasPayerpub struct UpdateSeriesMetadataArgspub struct UpdateTokenMetadataArgspub struct VMDynamicStructpub struct VMDynamicVariablepub struct VMNamedDynamicVariablepub struct VMNamedVariableSchemapub struct VMStructArraypub struct VMStructFlags: u8pub struct VMStructSchemapub struct VMVariableSchemapub struct Witnesspub trait CarbonSerializable: Sizedpub trait TxSigner: Send + Syncpub type TokenSchemasJSON = TokenSchemasJsonFields
BurnFungibleArgs.pub amount: IntXBurnFungibleArgs.pub from_address: Bytes32BurnFungibleArgs.pub token_id: u64BurnFungibleParams.pub amount: IntXBurnFungibleParams.pub from: Bytes32BurnFungibleParams.pub gas_payer: Option<Bytes32>BurnFungibleParams.pub limits: TxLimitsBurnFungibleParams.pub token_id: u64BurnNonFungibleArgs.pub from_address: Bytes32BurnNonFungibleArgs.pub instance_ids: Vec<u64>BurnNonFungibleArgs.pub token_id: u64BurnNonFungibleParams.pub from: Bytes32BurnNonFungibleParams.pub gas_payer: Option<Bytes32>BurnNonFungibleParams.pub instance_id: u64BurnNonFungibleParams.pub limits: TxLimitsBurnNonFungibleParams.pub token_id: u64CallArgSection.pub args: Vec<u8>CallArgSection.pub register_offset: i32ChainConfig.pub allowed_tx_types: u32ChainConfig.pub block_rate_target: u32ChainConfig.pub expiry_window: u32ChainConfig.pub reserved1: u8ChainConfig.pub reserved2: u8ChainConfig.pub reserved3: u8ChainConfig.pub version: u8CreateMintedTokenSeriesArgs.pub address: Bytes32CreateMintedTokenSeriesArgs.pub info: SeriesInfoCreateMintedTokenSeriesArgs.pub rams: Vec<Vec<u8>>CreateMintedTokenSeriesArgs.pub roms: Vec<Vec<u8>>CreateMintedTokenSeriesArgs.pub token_id: u64CreateTokenSeriesArgs.pub info: SeriesInfoCreateTokenSeriesArgs.pub token_id: u64GasConfig.pub data_escrow_per_row: u64GasConfig.pub data_token_id: u64GasConfig.pub fee_multiplier: u64GasConfig.pub fee_shift: u8GasConfig.pub gas_burn_ratio_mul: u64GasConfig.pub gas_burn_ratio_shift: u8GasConfig.pub gas_dapp_ratio_mul: u64GasConfig.pub gas_dapp_ratio_shift: u8GasConfig.pub gas_fee_create_token_base: u64GasConfig.pub gas_fee_create_token_series: u64GasConfig.pub gas_fee_create_token_symbol: u64GasConfig.pub gas_fee_per_byte: u64GasConfig.pub gas_fee_query: u64GasConfig.pub gas_fee_register_name: u64GasConfig.pub gas_fee_transfer: u64GasConfig.pub gas_producer_ratio_mul: u64GasConfig.pub gas_producer_ratio_shift: u8GasConfig.pub gas_token_id: u64GasConfig.pub legacy_data_escrow_per_row: u64GasConfig.pub max_name_length: u8GasConfig.pub max_structure_size: u32GasConfig.pub max_token_symbol_length: u8GasConfig.pub minimum_gas_bill: u64GasConfig.pub minimum_gas_offer: u64GasConfig.pub policy_fee_create_token_base: u64GasConfig.pub policy_fee_create_token_series: u64GasConfig.pub policy_fee_create_token_symbol: u64GasConfig.pub policy_fee_register_name: u64GasConfig.pub version: u8IntX.pub fn as_bigint(&self) -> &BigIntIntX.pub fn is_8_byte_safe(&self) -> boolIntX.pub fn new(value: impl Into<BigInt>) -> SelfMarketBuyTokenArgs.pub from_address: Bytes32MarketBuyTokenArgs.pub instance_id: u64MarketBuyTokenArgs.pub token_id: u64MarketBuyTokenByIdArgs.pub from_address: Bytes32MarketBuyTokenByIdArgs.pub instance_id: VMDynamicVariableMarketBuyTokenByIdArgs.pub symbol: SmallStringMarketCancelSaleArgs.pub instance_id: u64MarketCancelSaleArgs.pub token_id: u64MarketCancelSaleByIdArgs.pub instance_id: VMDynamicVariableMarketCancelSaleByIdArgs.pub symbol: SmallStringMarketConfig.pub delisting_grace: u64MarketConfig.pub flags: MarketConfigFlagsMarketConfig.pub maximum_listing_time: u64MarketConfig.pub minimum_listing_time: u64MarketGetTokenListingCountArgs.pub token_id: u64MarketGetTokenListingInfoArgs.pub instance_id: u64MarketGetTokenListingInfoArgs.pub token_id: u64MarketGetTokenListingInfoByIdArgs.pub instance_id: VMDynamicVariableMarketGetTokenListingInfoByIdArgs.pub symbol: SmallStringMarketSellTokenArgs.pub end_date: i64MarketSellTokenArgs.pub from_address: Bytes32MarketSellTokenArgs.pub instance_id: u64MarketSellTokenArgs.pub price: IntXMarketSellTokenArgs.pub quote_token_id: u64MarketSellTokenArgs.pub token_id: u64MarketSellTokenByIdArgs.pub end_date: i64MarketSellTokenByIdArgs.pub from_address: Bytes32MarketSellTokenByIdArgs.pub instance_id: VMDynamicVariableMarketSellTokenByIdArgs.pub price: IntXMarketSellTokenByIdArgs.pub quote_symbol: SmallStringMarketSellTokenByIdArgs.pub symbol: SmallStringMintFungibleArgs.pub amount: IntXMintFungibleArgs.pub to: Bytes32MintFungibleArgs.pub token_id: u64MintFungibleParams.pub amount: IntXMintFungibleParams.pub limits: TxLimitsMintFungibleParams.pub owner: Bytes32MintFungibleParams.pub to: Bytes32MintFungibleParams.pub token_id: u64MintNonFungibleArgs.pub address: Bytes32MintNonFungibleArgs.pub token_id: u64MintNonFungibleArgs.pub tokens: Vec<NFTMintInfo>MintPhantasmaNonFungibleArgs.pub address: Bytes32MintPhantasmaNonFungibleArgs.pub token_id: u64MintPhantasmaNonFungibleArgs.pub tokens: Vec<PhantasmaNFTMintInfo>MsgCallArgSections.pub sections: Vec<CallArgSection>NFTMintInfo.pub ram: Vec<u8>NFTMintInfo.pub rom: Vec<u8>NFTMintInfo.pub series_id: u32PhantasmaNFTMintInfo.pub phantasma_series_id: IntXPhantasmaNFTMintInfo.pub ram: Vec<u8>PhantasmaNFTMintInfo.pub rom: Vec<u8>PhantasmaNFTMintResult.pub carbon_instance_id: u64PhantasmaNFTMintResult.pub phantasma_nft_id: Bytes32RegisterNameArgs.pub address: Bytes32RegisterNameArgs.pub name: SmallStringSeriesInfo.pub max_mint: u32SeriesInfo.pub max_supply: u32SeriesInfo.pub metadata: Vec<u8>SeriesInfo.pub owner: Bytes32SeriesInfo.pub ram: VMStructSchemaSeriesInfo.pub rom: VMStructSchemaSignedTxMsg.pub msg: TxMsgSignedTxMsg.pub witnesses: Vec<Witness>SmallString.pub fn as_str(&self) -> &strSmallString.pub fn new(value: impl Into<String>) -> Result<Self>TokenInfo.pub decimals: u8TokenInfo.pub flags: TokenFlagsTokenInfo.pub max_supply: IntXTokenInfo.pub metadata: Vec<u8>TokenInfo.pub owner: Bytes32TokenInfo.pub symbol: SmallStringTokenInfo.pub token_schemas: Vec<u8>TokenListing.pub end_date: i64TokenListing.pub listing_type: ListingTypeTokenListing.pub price: IntXTokenListing.pub quote_token_id: u64TokenListing.pub seller: Bytes32TokenListing.pub start_date: i64TokenSchemaField.pub name: StringTokenSchemaField.pub vm_type: VMTypeTokenSchemas.pub ram: VMStructSchemaTokenSchemas.pub rom: VMStructSchemaTokenSchemas.pub series_metadata: VMStructSchemaTokenSchemasJson.pub ram: Vec<TokenSchemaField>TokenSchemasJson.pub rom: Vec<TokenSchemaField>TokenSchemasJson.pub series_metadata: Vec<TokenSchemaField>TokensConfig.pub flags: TokensConfigFlagsTransferFungibleArgs.pub amount: IntXTransferFungibleArgs.pub from_address: Bytes32TransferFungibleArgs.pub to: Bytes32TransferFungibleArgs.pub token_id: u64TransferFungibleParams.pub amount: u64TransferFungibleParams.pub from: Bytes32TransferFungibleParams.pub gas_payer: Option<Bytes32>TransferFungibleParams.pub limits: TxLimitsTransferFungibleParams.pub to: Bytes32TransferFungibleParams.pub token_id: u64TransferNonFungibleArgs.pub from_address: Bytes32TransferNonFungibleArgs.pub instance_ids: Vec<u64>TransferNonFungibleArgs.pub to: Bytes32TransferNonFungibleArgs.pub token_id: u64TransferNonFungibleParams.pub from: Bytes32TransferNonFungibleParams.pub gas_payer: Option<Bytes32>TransferNonFungibleParams.pub instance_ids: Vec<u64>TransferNonFungibleParams.pub limits: TxLimitsTransferNonFungibleParams.pub to: Bytes32TransferNonFungibleParams.pub token_id: u64TxLimits.pub expiry: i64TxLimits.pub max_data: u64TxLimits.pub max_gas: u64TxMsg.pub expiry: i64TxMsg.pub gas_from: Bytes32TxMsg.pub max_data: u64TxMsg.pub max_gas: u64TxMsg.pub msg: TxPayloadTxMsg.pub payload: SmallStringTxMsg.pub tx_type: TxTypeTxMsgBurnFungible.pub amount: IntXTxMsgBurnFungible.pub token_id: u64TxMsgBurnFungibleGasPayer.pub amount: IntXTxMsgBurnFungibleGasPayer.pub from_address: Bytes32TxMsgBurnFungibleGasPayer.pub token_id: u64TxMsgBurnNonFungible.pub instance_id: u64TxMsgBurnNonFungible.pub token_id: u64TxMsgBurnNonFungibleGasPayer.pub from_address: Bytes32TxMsgBurnNonFungibleGasPayer.pub instance_id: u64TxMsgBurnNonFungibleGasPayer.pub token_id: u64TxMsgCall.pub args: Vec<u8>TxMsgCall.pub method_id: u32TxMsgCall.pub module_id: u32TxMsgCall.pub sections: Option<MsgCallArgSections>TxMsgCallMulti.pub calls: Vec<TxMsgCall>TxMsgMintFungible.pub amount: IntXTxMsgMintFungible.pub to: Bytes32TxMsgMintFungible.pub token_id: u64TxMsgMintNonFungible.pub ram: Vec<u8>TxMsgMintNonFungible.pub rom: Vec<u8>TxMsgMintNonFungible.pub series_id: u32TxMsgMintNonFungible.pub to: Bytes32TxMsgMintNonFungible.pub token_id: u64TxMsgPhantasma.pub chain: SmallStringTxMsgPhantasma.pub nexus: SmallStringTxMsgPhantasma.pub script: Vec<u8>TxMsgPhantasmaRaw.pub transaction: Vec<u8>TxMsgSpecialResolution.pub calls: Vec<TxMsgCall>TxMsgSpecialResolution.pub resolution_id: u64TxMsgTrade.pub burn_f: Vec<TxMsgBurnFungibleGasPayer>TxMsgTrade.pub burn_n: Vec<TxMsgBurnNonFungibleGasPayer>TxMsgTrade.pub mint_f: Vec<TxMsgMintFungible>TxMsgTrade.pub mint_n: Vec<TxMsgMintNonFungible>TxMsgTrade.pub transfer_f: Vec<TxMsgTransferFungibleGasPayer>TxMsgTrade.pub transfer_n: Vec<TxMsgTransferNonFungibleSingleGasPayer>TxMsgTransferFungible.pub amount: u64TxMsgTransferFungible.pub to: Bytes32TxMsgTransferFungible.pub token_id: u64TxMsgTransferFungibleGasPayer.pub amount: u64TxMsgTransferFungibleGasPayer.pub from_address: Bytes32TxMsgTransferFungibleGasPayer.pub to: Bytes32TxMsgTransferFungibleGasPayer.pub token_id: u64TxMsgTransferNonFungibleMulti.pub instance_ids: Vec<u64>TxMsgTransferNonFungibleMulti.pub to: Bytes32TxMsgTransferNonFungibleMulti.pub token_id: u64TxMsgTransferNonFungibleMultiGasPayer.pub from_address: Bytes32TxMsgTransferNonFungibleMultiGasPayer.pub instance_ids: Vec<u64>TxMsgTransferNonFungibleMultiGasPayer.pub to: Bytes32TxMsgTransferNonFungibleMultiGasPayer.pub token_id: u64TxMsgTransferNonFungibleSingle.pub instance_id: u64TxMsgTransferNonFungibleSingle.pub to: Bytes32TxMsgTransferNonFungibleSingle.pub token_id: u64TxMsgTransferNonFungibleSingleGasPayer.pub from_address: Bytes32TxMsgTransferNonFungibleSingleGasPayer.pub instance_id: u64TxMsgTransferNonFungibleSingleGasPayer.pub to: Bytes32TxMsgTransferNonFungibleSingleGasPayer.pub token_id: u64UpdateSeriesMetadataArgs.pub metadata: Vec<u8>UpdateSeriesMetadataArgs.pub series_id: u32UpdateSeriesMetadataArgs.pub token_id: u64UpdateTokenMetadataArgs.pub metadata: VMDynamicStructUpdateTokenMetadataArgs.pub token_id: u64VMDynamicStruct.pub fields: Vec<VMNamedDynamicVariable>VMDynamicVariable.pub data: VMValueVMDynamicVariable.pub vm_type: VMTypeVMNamedDynamicVariable.pub name: SmallStringVMNamedDynamicVariable.pub value: VMDynamicVariableVMNamedVariableSchema.pub name: SmallStringVMNamedVariableSchema.pub schema: VMVariableSchemaVMStructArray.pub schema: VMStructSchemaVMStructArray.pub structs: Vec<VMDynamicStruct>VMStructSchema.pub fields: Vec<VMNamedVariableSchema>VMStructSchema.pub flags: VMStructFlagsVMVariableSchema.pub struct_def: Option<VMStructSchema>VMVariableSchema.pub vm_type: VMTypeWitness.pub address: Bytes32Witness.pub signature: Bytes64
Methods
impl $name: pub fn as_bytes(&self) -> &[u8; $size]impl $name: pub fn from_hex(value: &str) -> Result<Self>impl $name: pub fn new(data: [u8; $size]) -> Selfimpl $name: pub fn try_from_slice(data: &[u8]) -> Result<Self>impl CarbonReader<'a>: pub fn assert_eof(&self) -> Result<()>impl CarbonReader<'a>: pub fn new(data: &'a [u8]) -> Selfimpl CarbonReader<'a>: pub fn read(&mut self, count: usize) -> Result<Vec<u8>>impl CarbonReader<'a>: pub fn read1(&mut self) -> Result<u8>impl CarbonReader<'a>: pub fn read16(&mut self) -> Result<Bytes16>impl CarbonReader<'a>: pub fn read2(&mut self) -> Result<i16>impl CarbonReader<'a>: pub fn read32(&mut self) -> Result<Bytes32>impl CarbonReader<'a>: pub fn read4(&mut self) -> Result<i32>impl CarbonReader<'a>: pub fn read4u(&mut self) -> Result<u32>impl CarbonReader<'a>: pub fn read64(&mut self) -> Result<Bytes64>impl CarbonReader<'a>: pub fn read8(&mut self) -> Result<i64>impl CarbonReader<'a>: pub fn read8u(&mut self) -> Result<u64>impl CarbonReader<'a>: pub fn read_array<const N: usize>(&mut self) -> Result<[u8; N]>impl CarbonReader<'a>: pub fn read_big_int(&mut self) -> Result<BigInt>impl CarbonReader<'a>: pub fn read_big_int_array(&mut self) -> Result<Vec<BigInt>>impl CarbonReader<'a>: pub fn read_big_int_with_header(&mut self, header: u8) -> Result<BigInt>impl CarbonReader<'a>: pub fn read_byte_array(&mut self) -> Result<Vec<u8>>impl CarbonReader<'a>: pub fn read_byte_arrays(&mut self) -> Result<Vec<Vec<u8>>>impl CarbonReader<'a>: pub fn read_i16_array(&mut self) -> Result<Vec<i16>>impl CarbonReader<'a>: pub fn read_i32_array(&mut self) -> Result<Vec<i32>>impl CarbonReader<'a>: pub fn read_i64_array(&mut self) -> Result<Vec<i64>>impl CarbonReader<'a>: pub fn read_i8_array(&mut self) -> Result<Vec<i8>>impl CarbonReader<'a>: pub fn read_int_array(&mut self, width: u8, signed: bool) -> Result<Vec<i128>>impl CarbonReader<'a>: pub fn read_length(&mut self) -> Result<usize>impl CarbonReader<'a>: pub fn read_length_for(&mut self, element_size: usize) -> Result<usize>impl CarbonReader<'a>: pub fn read_string_z(&mut self) -> Result<String>impl CarbonReader<'a>: pub fn read_string_z_array(&mut self) -> Result<Vec<String>>impl CarbonReader<'a>: pub fn read_u64_array(&mut self) -> Result<Vec<u64>>impl CarbonReader<'a>: pub fn remaining(&self) -> usizeimpl CarbonWriter: pub fn bytes(&self) -> &[u8]impl CarbonWriter: pub fn into_bytes(self) -> Vec<u8>impl CarbonWriter: pub fn new() -> Selfimpl CarbonWriter: pub fn write(&mut self, data: impl AsRef<[u8]>)impl CarbonWriter: pub fn write1(&mut self, value: u8)impl CarbonWriter: pub fn write16(&mut self, value: Bytes16)impl CarbonWriter: pub fn write2(&mut self, value: i16)impl CarbonWriter: pub fn write32(&mut self, value: Bytes32)impl CarbonWriter: pub fn write4(&mut self, value: i32)impl CarbonWriter: pub fn write4u(&mut self, value: u32)impl CarbonWriter: pub fn write64(&mut self, value: Bytes64)impl CarbonWriter: pub fn write8(&mut self, value: i64)impl CarbonWriter: pub fn write8u(&mut self, value: u64)impl CarbonWriter: pub fn write_big_int(&mut self, value: &BigInt) -> Result<()>impl CarbonWriter: pub fn write_big_int_array(&mut self, values: &[BigInt]) -> Result<()>impl CarbonWriter: pub fn write_byte_array(&mut self, data: impl AsRef<[u8]>) -> Result<()>impl CarbonWriter: pub fn write_byte_arrays(&mut self, values: &[Vec<u8>]) -> Result<()>impl CarbonWriter: pub fn write_i16_array(&mut self, values: &[i16]) -> Result<()>impl CarbonWriter: pub fn write_i32_array(&mut self, values: &[i32]) -> Result<()>impl CarbonWriter: pub fn write_i64_array(&mut self, values: &[i64]) -> Result<()>impl CarbonWriter: pub fn write_i8_array(&mut self, values: &[i8]) -> Result<()>impl CarbonWriter: pub fn write_int_array(&mut self, values: &[i128], width: u8, signed: bool) -> Result<()>impl CarbonWriter: pub fn write_string_z(&mut self, value: &str) -> Result<()>impl CarbonWriter: pub fn write_string_z_array(&mut self, values: &[String]) -> Result<()>impl CarbonWriter: pub fn write_u64_array(&mut self, values: &[u64]) -> Result<()>impl GasConfig: pub fn has_gas_model_v2(&self) -> boolimpl MsgCallArgSections: pub fn has_sections(&self) -> boolimpl MsgCallArgSections: pub fn read_with_count(reader: &mut CarbonReader<'_>, count_negative: i32) -> Result<Self>impl TokenSchemaField: pub fn new(name: impl Into<String>, vm_type: VMType) -> Selfimpl TxPayload: pub fn from_address(&self) -> Bytes32impl TxPayload: pub fn from_type(tx_type: TxType, reader: &mut CarbonReader<'_>) -> Result<Self>impl TxPayload: pub fn write_carbon(&self, writer: &mut CarbonWriter) -> Result<()>impl VMDynamicStruct: pub fn get(&self, name: &str) -> Option<&VMDynamicVariable>impl VMDynamicStruct: pub fn new(fields: Vec<VMNamedDynamicVariable>) -> Selfimpl VMDynamicStruct: pub fn read_with_schema(impl VMDynamicStruct: pub fn sort(&mut self)impl VMDynamicStruct: pub fn write_with_schema(impl VMDynamicVariable: pub fn bytes(value: impl Into<Vec<u8>>) -> Selfimpl VMDynamicVariable: pub fn int256(value: impl Into<BigInt>) -> Selfimpl VMDynamicVariable: pub fn int32(value: i32) -> Selfimpl VMDynamicVariable: pub fn int64(value: i64) -> Selfimpl VMDynamicVariable: pub fn new(vm_type: VMType, data: VMValue) -> Selfimpl VMDynamicVariable: pub fn read_static(impl VMDynamicVariable: pub fn string(value: impl Into<String>) -> Selfimpl VMDynamicVariable: pub fn write_static(impl VMNamedDynamicVariable: pub fn make(name: impl Into<SmallString>, vm_type: VMType, value: VMValue) -> Selfimpl VMNamedDynamicVariable: pub fn new(name: impl Into<SmallString>, value: VMDynamicVariable) -> Selfimpl VMNamedVariableSchema: pub fn make(name: impl Into<SmallString>, vm_type: VMType) -> Selfimpl VMNamedVariableSchema: pub fn make_with_struct(impl VMNamedVariableSchema: pub fn new(name: impl Into<SmallString>, vm_type: VMType) -> Selfimpl VMNamedVariableSchema: pub fn with_struct(impl VMStructSchema: pub fn new(fields: Vec<VMNamedVariableSchema>) -> Selfimpl VMStructSchema: pub fn with_flags(fields: Vec<VMNamedVariableSchema>, flags: VMStructFlags) -> Selfimpl VMType: pub fn code(self) -> u8impl VMVariableSchema: pub fn new(vm_type: VMType) -> Selfimpl VMVariableSchema: pub fn with_struct(vm_type: VMType, struct_def: VMStructSchema) -> Selfpub async fn sign_and_serialize_tx_msg_with( msg: &TxMsg, signers: &[&dyn TxSigner], ) -> Result<Vec<u8>>pub async fn sign_tx_msg_with(msg: &TxMsg, signers: &[&dyn TxSigner]) -> Result<SignedTxMsg>pub fn build_and_serialize_token_schemas(schemas: Option<&TokenSchemas>) -> Result<Vec<u8>>pub fn build_burn_fungible_tx(p: BurnFungibleParams) -> TxMsgpub fn build_burn_non_fungible_tx(p: BurnNonFungibleParams) -> TxMsgpub fn build_create_token_series_tx( token_id: u64, series_info: SeriesInfo, creator: Bytes32, limits: TxLimits, ) -> Result<TxMsg>pub fn build_create_token_series_tx_and_sign( token_id: u64, series_info: SeriesInfo, signer: &PhantasmaKeys, config: Option<&GasConfig>, options: &PlanAndSignOptions, ) -> Result<Vec<u8>>pub fn build_create_token_series_tx_and_sign_hex( token_id: u64, series_info: SeriesInfo, signer: &PhantasmaKeys, config: Option<&GasConfig>, options: &PlanAndSignOptions, ) -> Result<String>pub fn build_create_token_tx( token_info: TokenInfo, creator: Bytes32, limits: TxLimits, ) -> Result<TxMsg>pub fn build_create_token_tx_and_sign( token_info: TokenInfo, signer: &PhantasmaKeys, config: Option<&GasConfig>, options: &PlanAndSignOptions, ) -> Result<Vec<u8>>pub fn build_create_token_tx_and_sign_hex( token_info: TokenInfo, signer: &PhantasmaKeys, config: Option<&GasConfig>, options: &PlanAndSignOptions, ) -> Result<String>pub fn build_mint_fungible_tx(p: MintFungibleParams) -> TxMsgpub fn build_mint_phantasma_non_fungible_single_tx( token_id: u64, phantasma_series_id: impl Into<BigInt>, sender: Bytes32, receiver: Bytes32, public_rom: Vec<u8>, ram: Vec<u8>, limits: TxLimits, ) -> Result<TxMsg>pub fn build_mint_phantasma_non_fungible_single_tx_and_sign( token_id: u64, phantasma_series_id: impl Into<BigInt>, signer: &PhantasmaKeys, receiver: Bytes32, public_rom: Vec<u8>, ram: Vec<u8>, config: Option<&GasConfig>, options: &PlanAndSignOptions, ) -> Result<Vec<u8>>pub fn build_mint_phantasma_non_fungible_single_tx_and_sign_hex( token_id: u64, phantasma_series_id: impl Into<BigInt>, signer: &PhantasmaKeys, receiver: Bytes32, public_rom: Vec<u8>, ram: Vec<u8>, config: Option<&GasConfig>, options: &PlanAndSignOptions, ) -> Result<String>pub fn build_mint_phantasma_non_fungible_tx( token_id: u64, sender: Bytes32, receiver: Bytes32, tokens: Vec<PhantasmaNFTMintInfo>, limits: TxLimits, ) -> Result<TxMsg>pub fn build_mint_phantasma_non_fungible_tx_and_sign( token_id: u64, signer: &PhantasmaKeys, receiver: Bytes32, tokens: Vec<PhantasmaNFTMintInfo>, config: Option<&GasConfig>, options: &PlanAndSignOptions, ) -> Result<Vec<u8>>pub fn build_mint_phantasma_non_fungible_tx_and_sign_hex( token_id: u64, signer: &PhantasmaKeys, receiver: Bytes32, tokens: Vec<PhantasmaNFTMintInfo>, config: Option<&GasConfig>, options: &PlanAndSignOptions, ) -> Result<String>pub fn build_nft_rom( schema: &VMStructSchema, phantasma_nft_id: impl Into<BigInt>, metadata: &[(&str, VMValue)], ) -> Result<Vec<u8>>pub fn build_phantasma_nft_public_mint_schema(nft_rom_schema: &VMStructSchema) -> VMStructSchemapub fn build_phantasma_nft_rom( nft_rom_schema: &VMStructSchema, metadata: &[(&str, VMValue)], ) -> Result<Vec<u8>>pub fn build_series_info( phantasma_series_id: impl Into<BigInt>, max_mint: u32, max_supply: u32, owner: Bytes32, ) -> Result<SeriesInfo>pub fn build_token_info( symbol: &str, max_supply: IntX, is_nft: bool, decimals: u8, owner: Bytes32, metadata: Vec<u8>, token_schemas: Vec<u8>, ) -> Result<TokenInfo>pub fn build_token_metadata(fields: &[(&str, &str)]) -> Result<Vec<u8>>pub fn build_token_schemas_from_fields( series_metadata: &[TokenSchemaField], rom: &[TokenSchemaField], ram: &[TokenSchemaField], ) -> Result<TokenSchemas>pub fn build_token_series_metadata( schema: &VMStructSchema, phantasma_series_id: impl Into<BigInt>, metadata: &[(&str, VMValue)], ) -> Result<Vec<u8>>pub fn build_transfer_fungible_tx(p: TransferFungibleParams) -> TxMsgpub fn build_transfer_non_fungible_tx(p: TransferNonFungibleParams) -> Result<TxMsg>pub fn bytes32_from_phantasma_address(address: &Address) -> Result<Bytes32>pub fn bytes32_from_phantasma_address_text(text: &str) -> Result<Bytes32>pub fn bytes32_from_public_key(public_key: &[u8]) -> Result<Bytes32>pub fn check_token_symbol(symbol: &str) -> Result<()>pub fn default_expiry() -> i64pub fn default_market_config() -> MarketConfigpub fn deserialize<T: CarbonSerializable>(data: impl AsRef<[u8]>) -> Result<T>pub fn envelope_bytes(msg: &TxMsg, witness_count: Option<u32>) -> Result<u32>pub fn expiry_within(expiry_window: Duration, margin: Duration) -> Result<i64>pub fn get_nft_address(carbon_token_id: u64, instance_id: u64) -> Bytes32pub fn is_nft_address(address: &Bytes32) -> boolpub fn now_unix_millis() -> i64pub fn parse_create_token_result(result_hex: &str) -> Result<u64>pub fn parse_create_token_series_result(result_hex: &str) -> Result<u32>pub fn parse_mint_non_fungible_result( carbon_token_id: u64, result_hex: &str, ) -> Result<Vec<Bytes32>>pub fn parse_mint_phantasma_non_fungible_result( result_hex: &str, ) -> Result<Vec<PhantasmaNFTMintResult>>pub fn parse_token_schemas_json(data: &str) -> Result<TokenSchemasJson>pub fn prepare_standard_token_schemas(shared_metadata: bool) -> TokenSchemaspub fn required_witnesses(msg: &TxMsg) -> Option<Vec<Bytes32>>pub fn serialize<T: CarbonSerializable>(value: &T) -> Result<Vec<u8>>pub fn serialize_token_schemas(schemas: &TokenSchemas) -> Result<Vec<u8>>pub fn serialize_token_schemas_hex(schemas: &TokenSchemas) -> Result<String>pub fn sign_and_serialize_tx_msg(msg: &TxMsg, keys: &PhantasmaKeys) -> Result<Vec<u8>>pub fn sign_and_serialize_tx_msg_hex(msg: &TxMsg, keys: &PhantasmaKeys) -> Result<String>pub fn sign_and_serialize_tx_msg_with_keys( msg: &TxMsg, keys: &[&PhantasmaKeys], ) -> Result<Vec<u8>>pub fn sign_tx_msg(msg: &TxMsg, keys: &PhantasmaKeys) -> Result<SignedTxMsg>pub fn sign_tx_msg_with_keys(msg: &TxMsg, keys: &[&PhantasmaKeys]) -> Result<SignedTxMsg>pub fn token_schemas_from_json(data: &str) -> Result<TokenSchemas>pub fn unpack_nft_address(address: &Bytes32) -> (u64, u64)pub fn unpack_nft_instance_id(instance_id: u64) -> (u32, u32)pub fn verify_token_schemas(schemas: &TokenSchemas) -> Result<()>pub fn vm_type_from_string(value: &str) -> Result<VMType>pub fn vm_type_name(vm_type: VMType) -> Result<&'static str>Variants
GovernanceContractMethod::RegisterName = 1GovernanceContractMethod::SetGasConfig = 3ListingType::FixedPrice = 0MarketContractMethod::BuyToken = 4MarketContractMethod::BuyTokenById = 5MarketContractMethod::CancelSale = 2MarketContractMethod::CancelSaleById = 3MarketContractMethod::GetTokenListingCount = 6MarketContractMethod::GetTokenListingInfo = 7MarketContractMethod::GetTokenListingInfoById = 8MarketContractMethod::SellToken = 0MarketContractMethod::SellTokenById = 1ModuleId::Governance = 0ModuleId::Internal = 0xFFFF_FFFFModuleId::Market = 4ModuleId::Org = 3ModuleId::Phantasma = 2ModuleId::Token = 1TokenContractMethod::ApplyInflation = 22TokenContractMethod::BurnFungible = 4TokenContractMethod::BurnNonFungible = 9TokenContractMethod::CreateMintedTokenSeries = 21TokenContractMethod::CreateToken = 2TokenContractMethod::CreateTokenSeries = 6TokenContractMethod::DeleteTokenSeries = 7TokenContractMethod::GetBalance = 5TokenContractMethod::GetBalances = 20TokenContractMethod::GetInstances = 10TokenContractMethod::GetNextTokenInflation = 24TokenContractMethod::GetNonFungibleInfo = 11TokenContractMethod::GetNonFungibleInfoByRomId = 12TokenContractMethod::GetSeriesInfo = 13TokenContractMethod::GetSeriesInfoByMetaId = 14TokenContractMethod::GetSeriesSupply = 18TokenContractMethod::GetTokenIdBySymbol = 19TokenContractMethod::GetTokenInfo = 15TokenContractMethod::GetTokenInfoBySymbol = 16TokenContractMethod::GetTokenSupply = 17TokenContractMethod::MintFungible = 3TokenContractMethod::MintNonFungible = 8TokenContractMethod::MintPhantasmaNonFungible = 27TokenContractMethod::SetTokensConfig = 25TokenContractMethod::TransferFungible = 0TokenContractMethod::TransferNonFungible = 1TokenContractMethod::UpdateSeriesMetadata = 26TokenContractMethod::UpdateTokenMetadata = 23TxPayload::BurnFungible(TxMsgBurnFungible)TxPayload::BurnFungibleGasPayer(TxMsgBurnFungibleGasPayer)TxPayload::BurnNonFungible(TxMsgBurnNonFungible)TxPayload::BurnNonFungibleGasPayer(TxMsgBurnNonFungibleGasPayer)TxPayload::Call(TxMsgCall)TxPayload::CallMulti(TxMsgCallMulti)TxPayload::MintFungible(TxMsgMintFungible)TxPayload::MintNonFungible(TxMsgMintNonFungible)TxPayload::Phantasma(TxMsgPhantasma)TxPayload::PhantasmaRaw(TxMsgPhantasmaRaw)TxPayload::Trade(TxMsgTrade)TxPayload::TransferFungible(TxMsgTransferFungible)TxPayload::TransferFungibleGasPayer(TxMsgTransferFungibleGasPayer)TxPayload::TransferNonFungibleMulti(TxMsgTransferNonFungibleMulti)TxPayload::TransferNonFungibleMultiGasPayer(TxMsgTransferNonFungibleMultiGasPayer)TxPayload::TransferNonFungibleSingle(TxMsgTransferNonFungibleSingle)TxPayload::TransferNonFungibleSingleGasPayer(TxMsgTransferNonFungibleSingleGasPayer)TxType::BurnFungible = 10TxType::BurnFungibleGasPayer = 11TxType::BurnNonFungible = 13TxType::BurnNonFungibleGasPayer = 14TxType::Call = 0TxType::CallMulti = 1TxType::MintFungible = 9TxType::MintNonFungible = 12TxType::Phantasma = 15TxType::PhantasmaRaw = 16TxType::Trade = 2TxType::TransferFungible = 3TxType::TransferFungibleGasPayer = 4TxType::TransferNonFungibleMulti = 7TxType::TransferNonFungibleMultiGasPayer = 8TxType::TransferNonFungibleSingle = 5TxType::TransferNonFungibleSingleGasPayer = 6VMType::ArrayVMType::ArrayBytesVMType::ArrayBytes16VMType::ArrayBytes32VMType::ArrayBytes64VMType::ArrayDynamicVMType::ArrayInt16VMType::ArrayInt256VMType::ArrayInt32VMType::ArrayInt64VMType::ArrayInt8VMType::ArrayStringVMType::ArrayStructVMType::BytesVMType::Bytes16VMType::Bytes32VMType::Bytes64VMType::DynamicVMType::Int16VMType::Int256VMType::Int32VMType::Int64VMType::Int8VMType::StringVMType::StructVMValue::ArrayBytes(Vec<Vec<u8>>)VMValue::ArrayBytes16(Vec<Bytes16>)VMValue::ArrayBytes32(Vec<Bytes32>)VMValue::ArrayBytes64(Vec<Bytes64>)VMValue::ArrayDynamic(Vec<VMDynamicVariable>)VMValue::ArrayInt16(Vec<i16>)VMValue::ArrayInt256(Vec<BigInt>)VMValue::ArrayInt32(Vec<i32>)VMValue::ArrayInt64(Vec<i64>)VMValue::ArrayInt8(Vec<i8>)VMValue::ArrayString(Vec<String>)VMValue::ArrayStruct(VMStructArray)VMValue::Bytes(Vec<u8>)VMValue::Bytes16(Bytes16)VMValue::Bytes32(Bytes32)VMValue::Bytes64(Bytes64)VMValue::Dynamic(Box<VMDynamicVariable>)VMValue::Int(i64)VMValue::Int256(BigInt)VMValue::NoneVMValue::String(String)VMValue::Struct(VMDynamicStruct)
phantasma_sdk::crypto
Source: src/crypto.rs
Declarations
pub const ADDRESS_LENGTH: usize = 34pub const PRIVATE_KEY_LENGTH: usize = 32pub const PUBLIC_KEY_LENGTH: usize = 32pub const SIGNATURE_LENGTH: usize = 64pub enum AddressKindpub enum SignatureKindpub struct Addresspub struct Ed25519Signaturepub struct Hash(pub [u8; 32])pub struct PhantasmaKeysFields
Hash.pub fn difficulty(&self) -> u32Hash.pub fn new(data: [u8; 32]) -> SelfHash.pub fn sha256(data: impl AsRef<[u8]>) -> SelfHash.pub fn to_hex(&self) -> StringHash.pub fn try_from_slice(data: &[u8]) -> Result<Self>
Methods
impl Address: pub fn data(&self) -> &[u8; ADDRESS_LENGTH]impl Address: pub fn from_hash(value: impl AsRef<[u8]>) -> Selfimpl Address: pub fn from_public_key(public_key: &[u8]) -> Result<Self>impl Address: pub fn from_text(text: impl AsRef<str>) -> Result<Self>impl Address: pub fn into_bytes(self) -> [u8; ADDRESS_LENGTH]impl Address: pub fn is_null(&self) -> boolimpl Address: pub fn kind(&self) -> AddressKindimpl Address: pub fn new(data: [u8; ADDRESS_LENGTH]) -> Selfimpl Address: pub fn null() -> Selfimpl Address: pub fn prefixed_bytes(&self) -> Vec<u8>impl Address: pub fn public_key(&self) -> Result<[u8; PUBLIC_KEY_LENGTH]>impl Address: pub fn to_text(&self) -> Stringimpl Address: pub fn try_from_slice(data: &[u8]) -> Result<Self>impl Ed25519Signature: pub fn data(&self) -> &[u8; SIGNATURE_LENGTH]impl Ed25519Signature: pub fn kind(&self) -> SignatureKindimpl Ed25519Signature: pub fn new(data: [u8; SIGNATURE_LENGTH]) -> Selfimpl Ed25519Signature: pub fn serialize_data(&self) -> Vec<u8>impl Ed25519Signature: pub fn try_from_slice(data: &[u8]) -> Result<Self>impl Ed25519Signature: pub fn verify<'a>(impl PhantasmaKeys: pub fn address(&self) -> Addressimpl PhantasmaKeys: pub fn from_wif(wif: &str) -> Result<Self>impl PhantasmaKeys: pub fn generate() -> Selfimpl PhantasmaKeys: pub fn new(private_key: [u8; PRIVATE_KEY_LENGTH]) -> Selfimpl PhantasmaKeys: pub fn private_key(&self) -> &[u8; PRIVATE_KEY_LENGTH]impl PhantasmaKeys: pub fn public_key(&self) -> [u8; PUBLIC_KEY_LENGTH]impl PhantasmaKeys: pub fn sign(&self, message: impl AsRef<[u8]>) -> Ed25519Signatureimpl PhantasmaKeys: pub fn signing_key(&self) -> SigningKeyimpl PhantasmaKeys: pub fn to_wif(&self) -> Stringimpl PhantasmaKeys: pub fn try_from_slice(private_key: &[u8]) -> Result<Self>pub fn double_sha256(data: impl AsRef<[u8]>) -> [u8; 32]Variants
AddressKind::Interop = 3AddressKind::Invalid = 0AddressKind::System = 2AddressKind::User = 1SignatureKind::Ecdsa = 2SignatureKind::Ed25519 = 1SignatureKind::None = 0SignatureKind::Ring = 3
phantasma_sdk::encoding
Source: src/encoding.rs
Methods
pub fn decode_base58(text: &str) -> Result<Vec<u8>>pub fn decode_hex(value: &str) -> Result<Vec<u8>>pub fn encode_base58(data: impl AsRef<[u8]>) -> Stringpub fn encode_hex(data: impl AsRef<[u8]>) -> Stringpub fn encode_hex_upper(data: impl AsRef<[u8]>) -> Stringphantasma_sdk::error
Source: src/error.rs
Declarations
pub enum PhantasmaErrorpub type Result<T> = std::result::Result<T, PhantasmaError>Variants
PhantasmaError::Builder(String)PhantasmaError::Crypto(String)PhantasmaError::Encoding(String)PhantasmaError::Http(String)PhantasmaError::Json(String)PhantasmaError::Preflight(String)PhantasmaError::Rpc { code: Option<i64>, message: String }PhantasmaError::Serialization(String)
phantasma_sdk::extended_events
Source: src/extended_events.rs
Declarations
pub enum EventDatapub enum SpecialResolutionArgumentspub struct AddressArgumentspub struct BalanceArgumentspub struct BurnFungibleArgumentspub struct BurnNonFungibleArgumentspub struct ChainConfigArgumentspub struct ConsensusNodepub struct ContractStorageRowpub struct ContractStorageTablepub struct CreateMintedTokenSeriesArgumentspub struct CreateTokenArgumentspub struct DeployContractArgumentspub struct ExecuteScriptArgumentspub struct GasConfigArgumentspub struct ImportContractsArgumentspub struct ImportedContractpub struct MarketOrderDatapub struct MetadataArgumentspub struct MintFungibleArgumentspub struct MintNonFungibleArgumentspub struct MintPhantasmaNonFungibleArgumentspub struct NameArgumentspub struct NestedResolutionArgumentspub struct NftMintpub struct NodeConfigArgumentspub struct NonFungibleInfoArgumentspub struct NonFungibleInfoByRomIdArgumentspub struct PhantasmaNftMintpub struct PhantasmaVmConfigArgumentspub struct RawArgumentspub struct RegisterNameArgumentspub struct RegisterTokenContractArgumentspub struct RepairSeriesArgumentspub struct RepairTokenArgumentspub struct SeriesInfoByMetaIdArgumentspub struct SeriesMintCountRepairpub struct SeriesSupplementpub struct SpecialResolutionCallpub struct SpecialResolutionDatapub struct SymbolArgumentspub struct TokenCreateDatapub struct TokenReferenceArgumentspub struct TokenRepairpub struct TokenSeriesArgumentspub struct TokenSeriesCreateDatapub struct TokenSeriesReferenceArgumentspub struct TokensConfigArgumentspub struct TransferFungibleArgumentspub struct TransferNonFungibleArgumentspub struct UpdateSeriesMetadataArgumentspub struct UpdateTokenMetadataArgumentsFields
AddressArguments.pub address: StringBalanceArguments.pub address: StringBalanceArguments.pub token: StringBalanceArguments.pub token_id: StringBurnFungibleArguments.pub amount: StringBurnFungibleArguments.pub from: StringBurnFungibleArguments.pub token: StringBurnFungibleArguments.pub token_id: StringBurnNonFungibleArguments.pub address: StringBurnNonFungibleArguments.pub instance_ids: Vec<String>BurnNonFungibleArguments.pub token: StringBurnNonFungibleArguments.pub token_id: StringChainConfigArguments.pub allowed_tx_types: StringChainConfigArguments.pub block_rate_target: StringChainConfigArguments.pub expiry_window: StringChainConfigArguments.pub reserved1: StringChainConfigArguments.pub reserved2: StringChainConfigArguments.pub reserved3: StringChainConfigArguments.pub version: StringConsensusNode.pub id: StringConsensusNode.pub type_name: StringContractStorageRow.pub key: StringContractStorageRow.pub value: StringContractStorageTable.pub name: StringContractStorageTable.pub rows: Vec<ContractStorageRow>CreateMintedTokenSeriesArguments.pub max_mint: StringCreateMintedTokenSeriesArguments.pub max_supply: StringCreateMintedTokenSeriesArguments.pub metadata: Option<BTreeMap<String, VmValue>>CreateMintedTokenSeriesArguments.pub metadata_raw: Option<String>CreateMintedTokenSeriesArguments.pub owner: StringCreateMintedTokenSeriesArguments.pub rams: Vec<String>CreateMintedTokenSeriesArguments.pub recipient: StringCreateMintedTokenSeriesArguments.pub roms: Vec<String>CreateMintedTokenSeriesArguments.pub series_id: Option<String>CreateMintedTokenSeriesArguments.pub token: StringCreateMintedTokenSeriesArguments.pub token_id: StringCreateTokenArguments.pub decimals: StringCreateTokenArguments.pub flags: StringCreateTokenArguments.pub max_supply: StringCreateTokenArguments.pub metadata: Option<BTreeMap<String, VmValue>>CreateTokenArguments.pub owner: StringCreateTokenArguments.pub symbol: StringCreateTokenArguments.pub token_schemas: Option<String>DeployContractArguments.pub abi: StringDeployContractArguments.pub contract_name: StringDeployContractArguments.pub from: StringDeployContractArguments.pub script: StringExecuteScriptArguments.pub gas_from: StringExecuteScriptArguments.pub max_gas: StringExecuteScriptArguments.pub script: StringGasConfigArguments.pub data_escrow_per_row: StringGasConfigArguments.pub data_token_id: StringGasConfigArguments.pub fee_multiplier: StringGasConfigArguments.pub fee_shift: StringGasConfigArguments.pub gas_burn_ratio_mul: StringGasConfigArguments.pub gas_burn_ratio_shift: StringGasConfigArguments.pub gas_dapp_ratio_mul: Option<String>GasConfigArguments.pub gas_dapp_ratio_shift: Option<String>GasConfigArguments.pub gas_fee_create_token_base: StringGasConfigArguments.pub gas_fee_create_token_series: StringGasConfigArguments.pub gas_fee_create_token_symbol: StringGasConfigArguments.pub gas_fee_per_byte: StringGasConfigArguments.pub gas_fee_query: StringGasConfigArguments.pub gas_fee_register_name: StringGasConfigArguments.pub gas_fee_transfer: StringGasConfigArguments.pub gas_producer_ratio_mul: Option<String>GasConfigArguments.pub gas_producer_ratio_shift: Option<String>GasConfigArguments.pub gas_token_id: StringGasConfigArguments.pub legacy_data_escrow_per_row: Option<String>GasConfigArguments.pub max_name_length: StringGasConfigArguments.pub max_structure_size: StringGasConfigArguments.pub max_token_symbol_length: StringGasConfigArguments.pub minimum_gas_bill: Option<String>GasConfigArguments.pub minimum_gas_offer: StringGasConfigArguments.pub policy_fee_create_token_base: Option<String>GasConfigArguments.pub policy_fee_create_token_series: Option<String>GasConfigArguments.pub policy_fee_create_token_symbol: Option<String>GasConfigArguments.pub policy_fee_register_name: Option<String>GasConfigArguments.pub version: StringImportContractsArguments.pub contracts: Vec<ImportedContract>ImportContractsArguments.pub contracts_count: StringImportedContract.pub abi: StringImportedContract.pub address: StringImportedContract.pub name: StringImportedContract.pub owner: StringImportedContract.pub root_variables: Vec<ContractStorageRow>ImportedContract.pub script: StringImportedContract.pub tables: Vec<ContractStorageTable>MarketOrderData.pub base_symbol: StringMarketOrderData.pub buyer: StringMarketOrderData.pub carbon_base_token_id: u64MarketOrderData.pub carbon_instance_id: u64MarketOrderData.pub carbon_quote_token_id: u64MarketOrderData.pub end_date: i64MarketOrderData.pub end_price: StringMarketOrderData.pub price: StringMarketOrderData.pub quote_symbol: StringMarketOrderData.pub seller: StringMarketOrderData.pub start_date: i64MarketOrderData.pub token_id: StringMarketOrderData.pub type_name: StringMetadataArguments.pub metadata: BTreeMap<String, VmValue>MintFungibleArguments.pub amount: StringMintFungibleArguments.pub to: StringMintFungibleArguments.pub token: StringMintFungibleArguments.pub token_id: StringMintNonFungibleArguments.pub owner: StringMintNonFungibleArguments.pub token: StringMintNonFungibleArguments.pub token_id: StringMintNonFungibleArguments.pub tokens: Vec<NftMint>MintPhantasmaNonFungibleArguments.pub owner: StringMintPhantasmaNonFungibleArguments.pub token: StringMintPhantasmaNonFungibleArguments.pub token_id: StringMintPhantasmaNonFungibleArguments.pub tokens: Vec<PhantasmaNftMint>NameArguments.pub name: StringNestedResolutionArguments.pub resolution_id: StringNftMint.pub ram: StringNftMint.pub rom: StringNftMint.pub series_id: StringNodeConfigArguments.pub nodes: Vec<ConsensusNode>NonFungibleInfoArguments.pub get_schemas: StringNonFungibleInfoArguments.pub instance_id: StringNonFungibleInfoArguments.pub token: StringNonFungibleInfoArguments.pub token_id: StringNonFungibleInfoByRomIdArguments.pub get_schemas: StringNonFungibleInfoByRomIdArguments.pub rom_id: StringNonFungibleInfoByRomIdArguments.pub token: StringNonFungibleInfoByRomIdArguments.pub token_id: StringPhantasmaNftMint.pub phantasma_series_id: StringPhantasmaNftMint.pub ram: StringPhantasmaNftMint.pub rom: StringPhantasmaVmConfigArguments.pub feature_level: StringPhantasmaVmConfigArguments.pub fuel_per_contract_deploy: StringPhantasmaVmConfigArguments.pub gas_account: StringPhantasmaVmConfigArguments.pub gas_constructor: StringPhantasmaVmConfigArguments.pub gas_leaderboard: StringPhantasmaVmConfigArguments.pub gas_nexus: StringPhantasmaVmConfigArguments.pub gas_oracle: StringPhantasmaVmConfigArguments.pub gas_organization: StringPhantasmaVmConfigArguments.pub gas_standard: StringRawArguments.pub raw_args: StringRegisterNameArguments.pub address: StringRegisterNameArguments.pub name: StringRegisterTokenContractArguments.pub abi: StringRegisterTokenContractArguments.pub script: StringRegisterTokenContractArguments.pub symbol: StringRegisterTokenContractArguments.pub token: Option<String>RegisterTokenContractArguments.pub token_id: StringRepairSeriesArguments.pub repairs: Vec<SeriesMintCountRepair>RepairSeriesArguments.pub repairs_count: StringRepairSeriesArguments.pub supplements: Vec<SeriesSupplement>RepairSeriesArguments.pub supplements_count: StringRepairTokenArguments.pub repairs: Vec<TokenRepair>RepairTokenArguments.pub repairs_count: StringSeriesInfoByMetaIdArguments.pub rom_id: StringSeriesInfoByMetaIdArguments.pub token: StringSeriesInfoByMetaIdArguments.pub token_id: StringSeriesMintCountRepair.pub abi: StringSeriesMintCountRepair.pub imported_live_count: StringSeriesMintCountRepair.pub phantasma_series_id: StringSeriesMintCountRepair.pub script: StringSeriesMintCountRepair.pub token: StringSeriesMintCountRepair.pub token_id: StringSeriesSupplement.pub abi: StringSeriesSupplement.pub max_supply: StringSeriesSupplement.pub mint_count: StringSeriesSupplement.pub mode: StringSeriesSupplement.pub phantasma_series_id: StringSeriesSupplement.pub rom: StringSeriesSupplement.pub script: StringSeriesSupplement.pub token: StringSeriesSupplement.pub token_id: StringSpecialResolutionCall.pub arguments: Option<SpecialResolutionArguments>SpecialResolutionCall.pub calls: Option<Vec<SpecialResolutionCall>>SpecialResolutionCall.pub method: StringSpecialResolutionCall.pub method_id: u32SpecialResolutionCall.pub module: StringSpecialResolutionCall.pub module_id: u32SpecialResolutionData.pub calls: Vec<SpecialResolutionCall>SpecialResolutionData.pub description: Option<String>SpecialResolutionData.pub resolution_id: u64SymbolArguments.pub symbol: StringTokenCreateData.pub carbon_token_id: u64TokenCreateData.pub decimals: u32TokenCreateData.pub is_non_fungible: boolTokenCreateData.pub max_supply: StringTokenCreateData.pub metadata: BTreeMap<String, String>TokenCreateData.pub symbol: StringTokenReferenceArguments.pub token: StringTokenReferenceArguments.pub token_id: StringTokenRepair.pub abi: StringTokenRepair.pub repair_mask: StringTokenRepair.pub script: StringTokenRepair.pub symbol: StringTokenRepair.pub token: StringTokenRepair.pub token_flags: StringTokenRepair.pub token_id: StringTokenSeriesArguments.pub max_mint: StringTokenSeriesArguments.pub max_supply: StringTokenSeriesArguments.pub metadata: Option<BTreeMap<String, VmValue>>TokenSeriesArguments.pub metadata_raw: Option<String>TokenSeriesArguments.pub owner: StringTokenSeriesArguments.pub series_id: Option<String>TokenSeriesArguments.pub token: StringTokenSeriesArguments.pub token_id: StringTokenSeriesCreateData.pub carbon_series_id: u32TokenSeriesCreateData.pub carbon_token_id: u64TokenSeriesCreateData.pub max_mint: u32TokenSeriesCreateData.pub max_supply: u32TokenSeriesCreateData.pub metadata: BTreeMap<String, String>TokenSeriesCreateData.pub owner: StringTokenSeriesCreateData.pub series_id: StringTokenSeriesCreateData.pub symbol: StringTokenSeriesReferenceArguments.pub series_id: StringTokenSeriesReferenceArguments.pub token: StringTokenSeriesReferenceArguments.pub token_id: StringTokensConfigArguments.pub flags: StringTokensConfigArguments.pub flags_names: Vec<String>TransferFungibleArguments.pub amount: StringTransferFungibleArguments.pub from: StringTransferFungibleArguments.pub to: StringTransferFungibleArguments.pub token: StringTransferFungibleArguments.pub token_id: StringTransferNonFungibleArguments.pub from: StringTransferNonFungibleArguments.pub instance_ids: Vec<String>TransferNonFungibleArguments.pub to: StringTransferNonFungibleArguments.pub token: StringTransferNonFungibleArguments.pub token_id: StringUpdateSeriesMetadataArguments.pub metadata: StringUpdateSeriesMetadataArguments.pub series_id: StringUpdateSeriesMetadataArguments.pub token: StringUpdateSeriesMetadataArguments.pub token_id: StringUpdateTokenMetadataArguments.pub metadata: Option<BTreeMap<String, VmValue>>UpdateTokenMetadataArguments.pub token: StringUpdateTokenMetadataArguments.pub token_id: String
Methods
impl EventData: pub fn as_market_order(&self) -> Option<&MarketOrderData>impl EventData: pub fn as_special_resolution(&self) -> Option<&SpecialResolutionData>impl EventData: pub fn as_token_create(&self) -> Option<&TokenCreateData>impl EventData: pub fn as_token_series_create(&self) -> Option<&TokenSeriesCreateData>impl EventData: pub fn as_unknown(&self) -> Option<&Value>impl SpecialResolutionArguments: pub fn as_raw(&self) -> Option<&RawArguments>impl SpecialResolutionArguments: pub fn as_unrecognized(&self) -> Option<&Value>Variants
EventData::MarketOrder(MarketOrderData)EventData::SpecialResolution(SpecialResolutionData)EventData::TokenCreate(TokenCreateData)EventData::TokenSeriesCreate(TokenSeriesCreateData)EventData::Unknown(Value)SpecialResolutionArguments::Address(AddressArguments)SpecialResolutionArguments::Balance(BalanceArguments)SpecialResolutionArguments::BurnFungible(BurnFungibleArguments)SpecialResolutionArguments::BurnNonFungible(BurnNonFungibleArguments)SpecialResolutionArguments::ChainConfig(ChainConfigArguments)SpecialResolutionArguments::CreateMintedTokenSeries(CreateMintedTokenSeriesArguments)SpecialResolutionArguments::CreateToken(CreateTokenArguments)SpecialResolutionArguments::DeployContract(DeployContractArguments)SpecialResolutionArguments::ExecuteScript(ExecuteScriptArguments)SpecialResolutionArguments::GasConfig(Box<GasConfigArguments>)SpecialResolutionArguments::ImportContracts(ImportContractsArguments)SpecialResolutionArguments::Metadata(MetadataArguments)SpecialResolutionArguments::MintFungible(MintFungibleArguments)SpecialResolutionArguments::MintNonFungible(MintNonFungibleArguments)SpecialResolutionArguments::MintPhantasmaNonFungible(MintPhantasmaNonFungibleArguments)SpecialResolutionArguments::Name(NameArguments)SpecialResolutionArguments::NestedResolution(NestedResolutionArguments)SpecialResolutionArguments::NodeConfig(NodeConfigArguments)SpecialResolutionArguments::NonFungibleInfo(NonFungibleInfoArguments)SpecialResolutionArguments::NonFungibleInfoByRomId(NonFungibleInfoByRomIdArguments)SpecialResolutionArguments::PhantasmaVmConfig(PhantasmaVmConfigArguments)SpecialResolutionArguments::Raw(RawArguments)SpecialResolutionArguments::RegisterName(RegisterNameArguments)SpecialResolutionArguments::RegisterTokenContract(RegisterTokenContractArguments)SpecialResolutionArguments::RepairSeries(RepairSeriesArguments)SpecialResolutionArguments::RepairToken(RepairTokenArguments)SpecialResolutionArguments::SeriesInfoByMetaId(SeriesInfoByMetaIdArguments)SpecialResolutionArguments::Symbol(SymbolArguments)SpecialResolutionArguments::TokenReference(TokenReferenceArguments)SpecialResolutionArguments::TokenSeries(TokenSeriesArguments)SpecialResolutionArguments::TokenSeriesReference(TokenSeriesReferenceArguments)SpecialResolutionArguments::TokensConfig(TokensConfigArguments)SpecialResolutionArguments::TransferFungible(TransferFungibleArguments)SpecialResolutionArguments::TransferNonFungible(TransferNonFungibleArguments)SpecialResolutionArguments::Unrecognized(Value)SpecialResolutionArguments::UpdateSeriesMetadata(UpdateSeriesMetadataArguments)SpecialResolutionArguments::UpdateTokenMetadata(UpdateTokenMetadataArguments)
phantasma_sdk::fees
Source: src/fees.rs
Declarations
pub const GAS_MODEL_V2_UNITS_PER_BLOCK_DATA_BYTE: u64 = 25pub const KCAL_DECIMALS: u32 = 10pub const NATIVE_SIGNATURE_BYTES: u32 = 64pub const SOUL_DECIMALS: u32 = 8pub const STORAGE_QUANTUM_BYTES: u32 = 1024pub const WITNESS_ARRAY_ENTRY_BYTES: u32 = 96pub enum NativeFeeKindpub struct BurnedInstancepub struct FeePlanpub struct FeePlanOptionspub struct FeePlanSummarypub struct FeeQuotepub struct InfusedAssetpub struct NativeFeeEstimatepub struct NativeFeeParamspub struct NativeFeePartpub struct NativeFeeTransactionParamspub struct PlanAndSignOptionsFields
BurnedInstance.pub instance_id: u64BurnedInstance.pub token_id: u64FeePlan.pub deleted_storage_quanta: u32FeePlan.pub envelope_bytes: u32FeePlan.pub exact: boolFeePlan.pub expected_gas_bill: u64FeePlan.pub kinds: Vec<NativeFeeKind>FeePlan.pub max_data: u64FeePlan.pub max_gas: u64FeePlan.pub new_storage_quanta: u32FeePlanOptions.pub big_fungible: Option<bool>FeePlanOptions.pub duplicated_series: Option<bool>FeePlanOptions.pub infusions: Option<Vec<InfusedAsset>>FeePlanOptions.pub recipient_holds_token: boolFeePlanOptions.pub rom_has_meta_id: Option<bool>FeePlanOptions.pub script_event_bytes: Option<u32>FeePlanOptions.pub script_storage_quanta: Option<u32>FeePlanOptions.pub script_units_allowance: Option<u64>FeePlanOptions.pub series_has_meta_id: Option<bool>FeePlanOptions.pub supply_row_exists: boolFeePlanOptions.pub token_burned_before: boolFeePlanOptions.pub witness_count: Option<u32>FeePlanSummary.pub gas_bill: StringFeePlanSummary.pub gas_offer: StringFeePlanSummary.pub storage_ceiling: StringFeeQuote.pub expected_gas_bill: u64FeeQuote.pub max_data: u64FeeQuote.pub max_gas: u64InfusedAsset.pub burner_holds_token: boolInfusedAsset.pub instance_count: Option<u32>InfusedAsset.pub non_fungible: boolInfusedAsset.pub token_id: Option<u64>NativeFeeEstimate.pub deleted_storage_quanta: u32NativeFeeEstimate.pub expected_gas_bill: u64NativeFeeEstimate.pub max_data: u64NativeFeeEstimate.pub max_gas: u64NativeFeeEstimate.pub new_storage_quanta: u32NativeFeeParams.pub big_fungible: Option<bool>NativeFeeParams.pub count: Option<u32>NativeFeeParams.pub distinct_series_count: Option<u32>NativeFeeParams.pub duplicated_series: Option<bool>NativeFeeParams.pub envelope_bytes: u32NativeFeeParams.pub has_inflation_schedule: boolNativeFeeParams.pub has_pre_burn: boolNativeFeeParams.pub has_staking_organisation: boolNativeFeeParams.pub has_staking_reward_token: boolNativeFeeParams.pub infusions: Option<Vec<InfusedAsset>>NativeFeeParams.pub name_length: u32NativeFeeParams.pub non_fungible: boolNativeFeeParams.pub payload_bytes: u32NativeFeeParams.pub ram_bytes: Vec<u32>NativeFeeParams.pub recipient_holds_token: boolNativeFeeParams.pub rom_bytes: Vec<u32>NativeFeeParams.pub rom_has_meta_id: Option<bool>NativeFeeParams.pub script_event_bytes: Option<u32>NativeFeeParams.pub script_storage_quanta: Option<u32>NativeFeeParams.pub script_units_allowance: Option<u64>NativeFeeParams.pub series_has_meta_id: Option<bool>NativeFeeParams.pub series_info_bytes: u32NativeFeeParams.pub supply_row_exists: boolNativeFeeParams.pub symbol_length: u32NativeFeeParams.pub to_is_nft_address: boolNativeFeeParams.pub token_burned_before: boolNativeFeeParams.pub token_id: Option<u64>NativeFeeParams.pub token_info_bytes: u32NativeFeePart.pub kind: NativeFeeKindNativeFeePart.pub params: NativeFeeParamsNativeFeeTransactionParams.pub envelope_bytes: u32NativeFeeTransactionParams.pub payload_bytes: u32PlanAndSignOptions.pub facts: FeePlanOptionsPlanAndSignOptions.pub limits: TxLimits
Methods
impl FeePlan: pub fn apply(&self, msg: &TxMsg) -> TxMsgimpl FeePlan: pub fn quote(&self) -> FeeQuoteimpl NativeFeeEstimate: pub fn quote(&self) -> FeeQuotepub fn burned_instances(msg: &TxMsg) -> Vec<BurnedInstance>pub fn envelope_bytes_for( kind: NativeFeeKind, serialized_message_length: u32, witness_count: u32, ) -> u32pub fn estimate_native_fee( kind: NativeFeeKind, config: &GasConfig, params: &NativeFeeParams, ) -> Result<NativeFeeEstimate>pub fn estimate_native_fee_batch( parts: &[NativeFeePart], config: &GasConfig, transaction: NativeFeeTransactionParams, ) -> Result<NativeFeeEstimate>pub fn phantasma_canonical_rom_bytes(public_rom_bytes: u32) -> u32pub fn plan_and_sign_with_keys( msg: &TxMsg, keys: &[&PhantasmaKeys], config: Option<&GasConfig>, options: &PlanAndSignOptions, ) -> Result<Vec<u8>>pub fn plan_fees(msg: &TxMsg, config: &GasConfig, options: &FeePlanOptions) -> Result<FeePlan>pub fn storage_quanta_for(row_bytes: u32) -> u32pub fn summarize_fee_plan(plan: &FeePlan) -> FeePlanSummarypub fn summarize_fee_plan_with_decimals( plan: &FeePlan, gas_decimals: u32, data_decimals: u32, ) -> FeePlanSummaryVariants
NativeFeeKind::BurnFungibleNativeFeeKind::BurnNonFungibleNativeFeeKind::CreateTokenNativeFeeKind::CreateTokenSeriesNativeFeeKind::MintFungibleNativeFeeKind::MintNonFungibleNativeFeeKind::MintPhantasmaNonFungibleNativeFeeKind::RegisterNameNativeFeeKind::ScriptNativeFeeKind::TransferFungibleNativeFeeKind::TransferNonFungible
phantasma_sdk
Source: src/lib.rs
Declarations
pub const SDK_VERSION: &str = env!("CARGO_PKG_VERSION")pub mod binarypub mod carbonpub mod cryptopub mod encodingpub mod errorpub mod extended_eventspub mod feespub mod rpcpub mod transactionpub mod vmpub use binary::pub use carbon::*pub use crypto::pub use encoding::pub use error::pub use extended_events::*pub use fees::*pub use rpc::*pub use transaction::pub use vm::phantasma_sdk::rpc
Source: src/rpc.rs
Declarations
pub const ADDRESS_TYPE_CARBON: &str = "Carbon"pub const API_KEY_HEADER: &str = "X-Api-Key"pub const DEFAULT_FEE_CONFIG_TTL: Duration = Duration::from_secs(60)pub const DEFAULT_MAX_RPC_RESPONSE_BYTES: usize = 16 * 1024 * 1024pub enum PreflightVerdictpub enum VmValuepub struct AbiEventResultpub struct AbiMethodResultpub struct AbiParameterResultpub struct AccountInfoResultpub struct AccountResultpub struct AddressTransactionsResultpub struct ArchiveResultpub struct AuctionResultpub struct BalanceResultpub struct BlockResultpub struct BuildInfoResultpub struct ChainFeeParamspub struct ChainResultpub struct ChannelResultpub struct ContractResultpub struct CrowdsaleResultpub struct CursorPaginatedResult<T>pub struct DappResultpub struct EstimateTransactionResultpub struct EventExResultpub struct EventResultpub struct FeePlanner<'a, T>pub struct GasConfigDataResultpub struct GasConfigResultpub struct GovernanceResultpub struct InteropResultpub struct LeaderboardResultpub struct LeaderboardRowResultpub struct NexusResultpub struct NftResultpub struct OracleResultpub struct OrganizationMemberResultpub struct OrganizationResultpub struct PaginatedResult<T>pub struct PeerResultpub struct PhantasmaRpc<T = ReqwestTransport>pub struct PhantasmaVmConfigResultpub struct PlanRequestOptionspub struct PlatformResultpub struct PreflightResultpub struct ReceiptResultpub struct ReqwestTransportpub struct RpcCallResult<T>pub struct ScriptResultpub struct SendTransactionOptionspub struct SignatureResultpub struct StakeResultpub struct StorageResultpub struct SwapResultpub struct TokenDataResultpub struct TokenExternalResultpub struct TokenPriceResultpub struct TokenPropertyResultpub struct TokenResultpub struct TokenSchemasResultpub struct TokenSeriesResultpub struct TransactionResultpub struct ValidatorResultpub struct VmNamedVariableSchemaResultpub struct VmStructSchemaResultpub struct VmVariableSchemaResultpub trait RpcTransport: Send + Syncpub type VersionResult = BuildInfoResultFields
AbiEventResult.pub description: StringAbiEventResult.pub name: StringAbiEventResult.pub return_type: StringAbiEventResult.pub value: u32AbiMethodResult.pub name: StringAbiMethodResult.pub parameters: Vec<AbiParameterResult>AbiMethodResult.pub return_type: StringAbiParameterResult.pub name: StringAbiParameterResult.pub type_name: StringAccountInfoResult.pub address: StringAccountInfoResult.pub name: StringAccountInfoResult.pub stake: StakeResultAccountResult.pub address: StringAccountResult.pub balances: Vec<BalanceResult>AccountResult.pub name: StringAccountResult.pub relay: Option<String>AccountResult.pub stake: StringAccountResult.pub stakes: StakeResultAccountResult.pub storage: StorageResultAccountResult.pub txs: Option<Vec<String>>AccountResult.pub unclaimed: StringAccountResult.pub validator: StringAddressTransactionsResult.pub address: StringAddressTransactionsResult.pub txs: Vec<TransactionResult>ArchiveResult.pub block_count: u64ArchiveResult.pub encryption: Option<String>ArchiveResult.pub hash: Option<String>ArchiveResult.pub missing_blocks: Option<Vec<u64>>ArchiveResult.pub name: Option<String>ArchiveResult.pub owners: Option<Vec<String>>ArchiveResult.pub size: u64ArchiveResult.pub time: u64AuctionResult.pub base_symbol: StringAuctionResult.pub chain_address: StringAuctionResult.pub creator_address: StringAuctionResult.pub current_winner: StringAuctionResult.pub end_date: u64AuctionResult.pub end_price: StringAuctionResult.pub extension_period: StringAuctionResult.pub listing_fee: StringAuctionResult.pub price: StringAuctionResult.pub quote_symbol: StringAuctionResult.pub ram: StringAuctionResult.pub rom: StringAuctionResult.pub start_date: u64AuctionResult.pub token_id: StringAuctionResult.pub type_name: StringBalanceResult.pub amount: StringBalanceResult.pub chain: StringBalanceResult.pub decimals: u32BalanceResult.pub ids: Option<Vec<String>>BalanceResult.pub symbol: StringBlockResult.pub chain_address: StringBlockResult.pub events: Option<Vec<EventResult>>BlockResult.pub hash: StringBlockResult.pub height: u64BlockResult.pub oracles: Option<Vec<OracleResult>>BlockResult.pub previous_hash: StringBlockResult.pub producer_address: Option<String>BlockResult.pub protocol: u32BlockResult.pub reward: StringBlockResult.pub timestamp: u64BlockResult.pub txs: Vec<TransactionResult>BlockResult.pub validator_address: StringBuildInfoResult.pub build_time_utc: StringBuildInfoResult.pub commit: StringBuildInfoResult.pub version: StringChainFeeParams.pub block_rate_target: DurationChainFeeParams.pub expiry_window: DurationChainFeeParams.pub gas_model_version: u32ChainResult.pub address: Option<String>ChainResult.pub contracts: Option<Vec<String>>ChainResult.pub dapps: Option<Vec<String>>ChainResult.pub height: u64ChainResult.pub name: Option<String>ChainResult.pub organization: Option<String>ChainResult.pub parent: Option<String>ChannelResult.pub active: boolChannelResult.pub balance: StringChannelResult.pub chain: StringChannelResult.pub creation_time: u64ChannelResult.pub creator_address: StringChannelResult.pub fee: StringChannelResult.pub index: u64ChannelResult.pub name: StringChannelResult.pub symbol: StringChannelResult.pub target_address: StringContractResult.pub address: StringContractResult.pub events: Option<Vec<AbiEventResult>>ContractResult.pub methods: Option<Vec<AbiMethodResult>>ContractResult.pub name: StringContractResult.pub owner: Option<String>ContractResult.pub script: StringCrowdsaleResult.pub creator: StringCrowdsaleResult.pub end_date: u64CrowdsaleResult.pub flags: StringCrowdsaleResult.pub global_hard_cap: StringCrowdsaleResult.pub global_soft_cap: StringCrowdsaleResult.pub hash: StringCrowdsaleResult.pub name: StringCrowdsaleResult.pub price: u64CrowdsaleResult.pub receive_symbol: StringCrowdsaleResult.pub sell_symbol: StringCrowdsaleResult.pub start_date: u64CrowdsaleResult.pub user_hard_cap: StringCrowdsaleResult.pub user_soft_cap: StringCursorPaginatedResult.pub cursor: Option<String>CursorPaginatedResult.pub result: Option<T>DappResult.pub address: StringDappResult.pub chain: StringDappResult.pub name: StringEstimateTransactionResult.pub abort_reason: StringEstimateTransactionResult.pub data_escrow_atoms: Option<String>EstimateTransactionResult.pub data_refund_atoms: Option<String>EstimateTransactionResult.pub data_rows: Option<String>EstimateTransactionResult.pub gas_bill_kcal_base: Option<String>EstimateTransactionResult.pub recommended_max_data: Option<String>EstimateTransactionResult.pub recommended_max_gas: Option<String>EstimateTransactionResult.pub would_abort: boolEventExResult.pub address: StringEventExResult.pub contract: StringEventExResult.pub data: EventDataEventExResult.pub kind: StringEventResult.pub address: StringEventResult.pub contract: StringEventResult.pub data: StringEventResult.pub kind: StringEventResult.pub name: StringGasConfigDataResult.pub data_escrow_per_row: Option<String>GasConfigDataResult.pub data_token_id: Option<String>GasConfigDataResult.pub fee_multiplier: Option<String>GasConfigDataResult.pub fee_shift: u8GasConfigDataResult.pub gas_burn_ratio_mul: Option<String>GasConfigDataResult.pub gas_burn_ratio_shift: u8GasConfigDataResult.pub gas_dapp_ratio_mul: Option<String>GasConfigDataResult.pub gas_dapp_ratio_shift: Option<u8>GasConfigDataResult.pub gas_fee_create_token_base: Option<String>GasConfigDataResult.pub gas_fee_create_token_series: Option<String>GasConfigDataResult.pub gas_fee_create_token_symbol: Option<String>GasConfigDataResult.pub gas_fee_per_byte: Option<String>GasConfigDataResult.pub gas_fee_query: Option<String>GasConfigDataResult.pub gas_fee_register_name: Option<String>GasConfigDataResult.pub gas_fee_transfer: Option<String>GasConfigDataResult.pub gas_producer_ratio_mul: Option<String>GasConfigDataResult.pub gas_producer_ratio_shift: Option<u8>GasConfigDataResult.pub gas_token_id: Option<String>GasConfigDataResult.pub legacy_data_escrow_per_row: Option<String>GasConfigDataResult.pub max_name_length: u8GasConfigDataResult.pub max_structure_size: u32GasConfigDataResult.pub max_token_symbol_length: u8GasConfigDataResult.pub minimum_gas_bill: Option<String>GasConfigDataResult.pub minimum_gas_offer: Option<String>GasConfigDataResult.pub policy_fee_create_token_base: Option<String>GasConfigDataResult.pub policy_fee_create_token_series: Option<String>GasConfigDataResult.pub policy_fee_create_token_symbol: Option<String>GasConfigDataResult.pub policy_fee_register_name: Option<String>GasConfigDataResult.pub version: u8GasConfigResult.pub block_rate_target: u32GasConfigResult.pub expiry_window: u32GasConfigResult.pub gas_config: Option<GasConfigDataResult>GasConfigResult.pub gas_model_version: u32GasConfigResult.pub units_per_block_data_byte: Option<u32>GovernanceResult.pub name: StringGovernanceResult.pub value: StringInteropResult.pub external: StringInteropResult.pub local: StringLeaderboardResult.pub name: Option<String>LeaderboardResult.pub rows: Option<Vec<LeaderboardRowResult>>LeaderboardRowResult.pub address: StringLeaderboardRowResult.pub value: StringNexusResult.pub chains: Option<Vec<ChainResult>>NexusResult.pub governance: Option<Vec<GovernanceResult>>NexusResult.pub name: Option<String>NexusResult.pub organizations: Option<Vec<String>>NexusResult.pub platforms: Option<Vec<PlatformResult>>NexusResult.pub protocol: u32NexusResult.pub tokens: Option<Vec<TokenResult>>NftResult.pub carbon_nft_address: StringNftResult.pub carbon_series_id: StringNftResult.pub carbon_token_id: StringNftResult.pub chain_name: StringNftResult.pub creator_address: StringNftResult.pub id: StringNftResult.pub infusion: Vec<TokenPropertyResult>NftResult.pub mint: StringNftResult.pub owner_address: StringNftResult.pub properties: Vec<TokenPropertyResult>NftResult.pub ram: StringNftResult.pub rom: StringNftResult.pub series: StringNftResult.pub status: StringOracleResult.pub content: StringOracleResult.pub url: StringOrganizationMemberResult.pub address: Option<String>OrganizationMemberResult.pub carbon_address: Option<String>OrganizationMemberResult.pub is_member: boolOrganizationMemberResult.pub member_time: Option<u64>OrganizationResult.pub carbon_owner: Option<String>OrganizationResult.pub member_count: Option<String>OrganizationResult.pub metadata: Vec<TokenPropertyResult>OrganizationResult.pub name: Option<String>OrganizationResult.pub owner: Option<String>PaginatedResult.pub page: u32PaginatedResult.pub page_size: u32PaginatedResult.pub result: Option<T>PaginatedResult.pub total: u64PaginatedResult.pub total_pages: u32PeerResult.pub fee: StringPeerResult.pub flags: StringPeerResult.pub pow: u64PeerResult.pub url: StringPeerResult.pub version: StringPhantasmaVmConfigResult.pub feature_level: u32PhantasmaVmConfigResult.pub fuel_per_contract_deploy: StringPhantasmaVmConfigResult.pub gas_account: StringPhantasmaVmConfigResult.pub gas_constructor: StringPhantasmaVmConfigResult.pub gas_leaderboard: StringPhantasmaVmConfigResult.pub gas_nexus: StringPhantasmaVmConfigResult.pub gas_oracle: StringPhantasmaVmConfigResult.pub gas_organization: StringPhantasmaVmConfigResult.pub gas_standard: StringPhantasmaVmConfigResult.pub is_stored: boolPlanRequestOptions.pub facts: FeePlanOptionsPlanRequestOptions.pub refresh_config: boolPlatformResult.pub chain: StringPlatformResult.pub fuel: StringPlatformResult.pub interop: Vec<InteropResult>PlatformResult.pub platform: StringPlatformResult.pub tokens: Vec<String>PreflightResult.pub reason: StringPreflightResult.pub subject: StringPreflightResult.pub verdict: PreflightVerdictReceiptResult.pub channel: StringReceiptResult.pub index: StringReceiptResult.pub nexus: StringReceiptResult.pub receiver: StringReceiptResult.pub script: StringReceiptResult.pub sender: StringReceiptResult.pub timestamp: u64RpcCallResult.pub canonical_envelope_bytes: usizeRpcCallResult.pub canonical_result_bytes: usizeRpcCallResult.pub endpoint: StringRpcCallResult.pub http_status: u16RpcCallResult.pub method: StringRpcCallResult.pub raw_envelope: ValueRpcCallResult.pub raw_result: ValueRpcCallResult.pub value: TScriptResult.pub error: Option<String>ScriptResult.pub events: Vec<EventResult>ScriptResult.pub gas: Option<String>ScriptResult.pub oracles: Vec<OracleResult>ScriptResult.pub result: StringScriptResult.pub results: Vec<String>ScriptResult.pub state: Option<String>SendTransactionOptions.pub plan: PlanRequestOptionsSendTransactionOptions.pub skip_preflight: boolSignatureResult.pub data: StringSignatureResult.pub kind: StringStakeResult.pub amount: StringStakeResult.pub time: u64StakeResult.pub unclaimed: StringStorageResult.pub archives: Vec<ArchiveResult>StorageResult.pub available: u64StorageResult.pub avatar: StringStorageResult.pub used: u64SwapResult.pub destination_address: StringSwapResult.pub destination_chain: StringSwapResult.pub destination_hash: StringSwapResult.pub destination_platform: StringSwapResult.pub source_address: StringSwapResult.pub source_chain: StringSwapResult.pub source_hash: StringSwapResult.pub source_platform: StringSwapResult.pub symbol: StringSwapResult.pub value: StringTokenDataResult.pub carbon_nft_address: StringTokenDataResult.pub carbon_series_id: StringTokenDataResult.pub carbon_token_id: StringTokenDataResult.pub chain_name: StringTokenDataResult.pub creator_address: StringTokenDataResult.pub id: StringTokenDataResult.pub infusion: Vec<TokenPropertyResult>TokenDataResult.pub mint: StringTokenDataResult.pub owner_address: StringTokenDataResult.pub properties: Vec<TokenPropertyResult>TokenDataResult.pub ram: StringTokenDataResult.pub rom: StringTokenDataResult.pub series: StringTokenDataResult.pub status: StringTokenExternalResult.pub hash: StringTokenExternalResult.pub platform: StringTokenPriceResult.pub close: StringTokenPriceResult.pub high: StringTokenPriceResult.pub low: StringTokenPriceResult.pub open: StringTokenPriceResult.pub timestamp: u64TokenPropertyResult.pub key: StringTokenPropertyResult.pub value: VmValueTokenResult.pub address: StringTokenResult.pub burned_supply: StringTokenResult.pub carbon_id: StringTokenResult.pub current_supply: StringTokenResult.pub decimals: u32TokenResult.pub external: Option<Vec<TokenExternalResult>>TokenResult.pub flags: StringTokenResult.pub max_supply: StringTokenResult.pub metadata: Option<Vec<TokenPropertyResult>>TokenResult.pub name: StringTokenResult.pub owner: StringTokenResult.pub price: Option<Vec<TokenPriceResult>>TokenResult.pub script: Option<String>TokenResult.pub series: Vec<TokenSeriesResult>TokenResult.pub symbol: StringTokenResult.pub token_schemas: Option<TokenSchemasResult>TokenSchemasResult.pub ram: VmStructSchemaResultTokenSchemasResult.pub rom: VmStructSchemaResultTokenSchemasResult.pub series_metadata: VmStructSchemaResultTokenSeriesResult.pub burned_supply: Option<String>TokenSeriesResult.pub carbon_series_id: StringTokenSeriesResult.pub carbon_token_id: StringTokenSeriesResult.pub current_supply: StringTokenSeriesResult.pub max_mint: StringTokenSeriesResult.pub max_supply: StringTokenSeriesResult.pub metadata: Vec<TokenPropertyResult>TokenSeriesResult.pub methods: Option<Vec<AbiMethodResult>>TokenSeriesResult.pub mint_count: StringTokenSeriesResult.pub mode: Option<String>TokenSeriesResult.pub owner_address: StringTokenSeriesResult.pub script: Option<String>TokenSeriesResult.pub series_id: StringTransactionResult.pub block_hash: StringTransactionResult.pub block_height: u64TransactionResult.pub carbon_tx_data: StringTransactionResult.pub carbon_tx_type: u32TransactionResult.pub chain_address: StringTransactionResult.pub debug_comment: Option<String>TransactionResult.pub events: Vec<EventResult>TransactionResult.pub expiration: u64TransactionResult.pub extended_events: Vec<EventExResult>TransactionResult.pub fee: StringTransactionResult.pub gas_limit: StringTransactionResult.pub gas_payer: StringTransactionResult.pub gas_price: StringTransactionResult.pub gas_target: StringTransactionResult.pub hash: StringTransactionResult.pub payload: StringTransactionResult.pub result: StringTransactionResult.pub script: StringTransactionResult.pub sender: StringTransactionResult.pub signatures: Vec<SignatureResult>TransactionResult.pub state: StringTransactionResult.pub timestamp: u64ValidatorResult.pub address: StringValidatorResult.pub type_name: StringVmNamedVariableSchemaResult.pub name: StringVmNamedVariableSchemaResult.pub schema: VmVariableSchemaResultVmStructSchemaResult.pub fields: Vec<VmNamedVariableSchemaResult>VmStructSchemaResult.pub flags: u32VmVariableSchemaResult.pub schema: Option<VmStructSchemaResult>VmVariableSchemaResult.pub type_name: String
Methods
impl AccountResult: pub fn get_token_balance(&mut self, symbol: &str, decimals: u32) -> &BalanceResultimpl AccountResult: pub fn token_balance(&self, symbol: &str) -> Option<&BalanceResult>impl BalanceResult: pub fn decimal_amount(&self) -> Stringimpl EstimateTransactionResult: pub fn to_fee_quote(&self) -> Result<FeeQuote>impl FeePlanner<'_, T>: pub async fn chain_params(&self, refresh: bool) -> Result<ChainFeeParams>impl FeePlanner<'_, T>: pub async fn config(&self, refresh: bool) -> Result<GasConfig>impl FeePlanner<'_, T>: pub async fn plan(&self, msg: &TxMsg, options: &PlanRequestOptions) -> Result<FeePlan>impl FeePlanner<'_, T>: pub fn invalidate(&self)impl FeePlanner<'_, T>: pub fn plan_with(impl GasConfigResult: pub fn to_gas_config(&self) -> Result<GasConfig>impl PhantasmaRpc<ReqwestTransport>: pub fn mainnet() -> Selfimpl PhantasmaRpc<ReqwestTransport>: pub fn new(endpoint: impl Into<String>) -> Selfimpl PhantasmaRpc<ReqwestTransport>: pub fn testnet() -> Selfimpl PhantasmaRpc<ReqwestTransport>: pub fn with_api_key(mut self, api_key: impl Into<String>) -> Selfimpl PhantasmaRpc<ReqwestTransport>: pub fn with_max_response_bytes(mut self, max_response_bytes: usize) -> Selfimpl PhantasmaRpc<T>: pub async fn call<R: DeserializeOwned>(&self, method: &str, params: Vec<Value>) -> Result<R>impl PhantasmaRpc<T>: pub async fn call_value(&self, method: &str, params: Vec<Value>) -> Result<Value>impl PhantasmaRpc<T>: pub async fn call_value_with_raw(impl PhantasmaRpc<T>: pub async fn call_with_raw<R: DeserializeOwned>(impl PhantasmaRpc<T>: pub async fn control_token_id(&self) -> Result<u64>impl PhantasmaRpc<T>: pub async fn estimate_transaction(&self, tx_data: &str) -> Result<EstimateTransactionResult>impl PhantasmaRpc<T>: pub async fn get_account(&self, address: &str) -> Result<AccountResult>impl PhantasmaRpc<T>: pub async fn get_account_fungible_tokens(impl PhantasmaRpc<T>: pub async fn get_account_fungible_tokens_with_address_type(impl PhantasmaRpc<T>: pub async fn get_account_info(&self, address: &str) -> Result<AccountInfoResult>impl PhantasmaRpc<T>: pub async fn get_account_info_with_address_type(impl PhantasmaRpc<T>: pub async fn get_account_infos<S: AsRef<str> + Sync>(impl PhantasmaRpc<T>: pub async fn get_account_infos_with_address_type<S: AsRef<str> + Sync>(impl PhantasmaRpc<T>: pub async fn get_account_nfts(impl PhantasmaRpc<T>: pub async fn get_account_nfts_with_address_type(impl PhantasmaRpc<T>: pub async fn get_account_owned_token_series(impl PhantasmaRpc<T>: pub async fn get_account_owned_token_series_with_address_type(impl PhantasmaRpc<T>: pub async fn get_account_owned_tokens(impl PhantasmaRpc<T>: pub async fn get_account_owned_tokens_with_address_type(impl PhantasmaRpc<T>: pub async fn get_account_with_address_type(impl PhantasmaRpc<T>: pub async fn get_accounts<S: AsRef<str> + Sync>(impl PhantasmaRpc<T>: pub async fn get_accounts_text(impl PhantasmaRpc<T>: pub async fn get_accounts_with_address_type(impl PhantasmaRpc<T>: pub async fn get_address_transaction_count(&self, address: &str, chain: &str) -> Result<u64>impl PhantasmaRpc<T>: pub async fn get_address_transactions(impl PhantasmaRpc<T>: pub async fn get_archive(&self, hash: &str) -> Result<ArchiveResult>impl PhantasmaRpc<T>: pub async fn get_auction(impl PhantasmaRpc<T>: pub async fn get_auctions(impl PhantasmaRpc<T>: pub async fn get_auctions_count(&self, chain: &str, symbol: &str) -> Result<u64>impl PhantasmaRpc<T>: pub async fn get_block_by_hash(&self, hash: &str) -> Result<BlockResult>impl PhantasmaRpc<T>: pub async fn get_block_by_hash_with_raw(impl PhantasmaRpc<T>: pub async fn get_block_by_height(&self, chain: &str, height: u64) -> Result<BlockResult>impl PhantasmaRpc<T>: pub async fn get_block_by_height_with_raw(impl PhantasmaRpc<T>: pub async fn get_block_height(&self, chain: &str) -> Result<u64>impl PhantasmaRpc<T>: pub async fn get_block_height_with_raw(&self, chain: &str) -> Result<RpcCallResult<u64>>impl PhantasmaRpc<T>: pub async fn get_block_transaction_count_by_hash(impl PhantasmaRpc<T>: pub async fn get_block_transaction_count_by_hash_on_chain(impl PhantasmaRpc<T>: pub async fn get_chain(&self, chain: &str, extended: bool) -> Result<ChainResult>impl PhantasmaRpc<T>: pub async fn get_chains(&self, extended: bool) -> Result<Vec<ChainResult>>impl PhantasmaRpc<T>: pub async fn get_contract(&self, contract_name: &str, chain: &str) -> Result<ContractResult>impl PhantasmaRpc<T>: pub async fn get_contract_by_address(impl PhantasmaRpc<T>: pub async fn get_contract_by_name(&self, chain: &str, name: &str) -> Result<ContractResult>impl PhantasmaRpc<T>: pub async fn get_contracts(&self, chain: &str, extended: bool) -> Result<Vec<ContractResult>>impl PhantasmaRpc<T>: pub async fn get_gas_config(&self) -> Result<GasConfigResult>impl PhantasmaRpc<T>: pub async fn get_latest_block(&self, chain: &str) -> Result<BlockResult>impl PhantasmaRpc<T>: pub async fn get_latest_block_with_raw(impl PhantasmaRpc<T>: pub async fn get_leaderboard(&self, name: &str) -> Result<LeaderboardResult>impl PhantasmaRpc<T>: pub async fn get_nexus(&self, extended: bool) -> Result<NexusResult>impl PhantasmaRpc<T>: pub async fn get_nft(impl PhantasmaRpc<T>: pub async fn get_nfts<S: AsRef<str> + Sync>(impl PhantasmaRpc<T>: pub async fn get_nfts_text(impl PhantasmaRpc<T>: pub async fn get_organization(impl PhantasmaRpc<T>: pub async fn get_organization_member(impl PhantasmaRpc<T>: pub async fn get_organization_members(impl PhantasmaRpc<T>: pub async fn get_organizations(impl PhantasmaRpc<T>: pub async fn get_phantasma_vm_config(&self, chain: &str) -> Result<PhantasmaVmConfigResult>impl PhantasmaRpc<T>: pub async fn get_platforms(&self) -> Result<Vec<PlatformResult>>impl PhantasmaRpc<T>: pub async fn get_token(&self, symbol: &str, extended: bool) -> Result<TokenResult>impl PhantasmaRpc<T>: pub async fn get_token_balance(impl PhantasmaRpc<T>: pub async fn get_token_balance_checked(impl PhantasmaRpc<T>: pub async fn get_token_balance_with_address_type(impl PhantasmaRpc<T>: pub async fn get_token_data(&self, symbol: &str, token_id: &str) -> Result<TokenDataResult>impl PhantasmaRpc<T>: pub async fn get_token_nfts(impl PhantasmaRpc<T>: pub async fn get_token_nfts_with_series_id(impl PhantasmaRpc<T>: pub async fn get_token_series(impl PhantasmaRpc<T>: pub async fn get_token_series_by_id(impl PhantasmaRpc<T>: pub async fn get_token_series_by_ids(impl PhantasmaRpc<T>: pub async fn get_token_with_id(impl PhantasmaRpc<T>: pub async fn get_tokens(&self, extended: bool) -> Result<Vec<TokenResult>>impl PhantasmaRpc<T>: pub async fn get_tokens_as_map(&self, extended: bool) -> Result<HashMap<String, TokenResult>>impl PhantasmaRpc<T>: pub async fn get_tokens_by_owner(impl PhantasmaRpc<T>: pub async fn get_tokens_by_owner_with_address_type(impl PhantasmaRpc<T>: pub async fn get_transaction(&self, hash: &str) -> Result<TransactionResult>impl PhantasmaRpc<T>: pub async fn get_transaction_by_block_hash_and_index(impl PhantasmaRpc<T>: pub async fn get_transaction_by_block_hash_and_index_on_chain(impl PhantasmaRpc<T>: pub async fn get_transaction_by_block_hash_and_index_with_raw(impl PhantasmaRpc<T>: pub async fn get_transaction_with_raw(impl PhantasmaRpc<T>: pub async fn get_version(&self) -> Result<VersionResult>impl PhantasmaRpc<T>: pub async fn infused_assets(impl PhantasmaRpc<T>: pub async fn invoke_raw_script(&self, chain: &str, script_hex: &str) -> Result<ScriptResult>impl PhantasmaRpc<T>: pub async fn look_up_name(&self, name: &str) -> Result<String>impl PhantasmaRpc<T>: pub async fn lookup_name(&self, name: &str) -> Result<String>impl PhantasmaRpc<T>: pub async fn preflight_transaction(&self, msg: &TxMsg) -> Result<PreflightResult>impl PhantasmaRpc<T>: pub async fn read_archive(&self, hash: &str, block_index: u32) -> Result<String>impl PhantasmaRpc<T>: pub async fn send_carbon_transaction(&self, tx: &[u8]) -> Result<String>impl PhantasmaRpc<T>: pub async fn send_raw_transaction(&self, tx_hex: &str) -> Result<String>impl PhantasmaRpc<T>: pub async fn send_signed_tx_msg(&self, tx: &SignedTxMsg) -> Result<String>impl PhantasmaRpc<T>: pub async fn send_transaction(&self, tx: &Transaction) -> Result<String>impl PhantasmaRpc<T>: pub async fn send_tx_msg(impl PhantasmaRpc<T>: pub async fn sign_and_send_built_transaction(impl PhantasmaRpc<T>: pub async fn sign_and_send_transaction(impl PhantasmaRpc<T>: pub async fn write_archive(impl PhantasmaRpc<T>: pub async fn write_archive_base64(impl PhantasmaRpc<T>: pub fn fees(&self) -> FeePlanner<'_, T>impl PhantasmaRpc<T>: pub fn parse_create_token_result(&self, result_hex: &str) -> Result<u64>impl PhantasmaRpc<T>: pub fn parse_create_token_series_result(&self, result_hex: &str) -> Result<u32>impl PhantasmaRpc<T>: pub fn with_fee_config_ttl(mut self, ttl: Duration) -> Selfimpl PhantasmaRpc<T>: pub fn with_timeout(mut self, timeout: Duration) -> Selfimpl PhantasmaRpc<T>: pub fn with_transport(endpoint: impl Into<String>, transport: T) -> Selfimpl ReqwestTransport: pub fn with_api_key(mut self, api_key: impl Into<String>) -> Selfimpl RpcCallResult<T>: pub fn map_value<U>(self, value: U) -> RpcCallResult<U>impl ScriptResult: pub fn decode_result(&self) -> Result<VMObject>impl ScriptResult: pub fn decode_results(&self, index: usize) -> Result<VMObject>impl StakeResult: pub fn decimal_amount(&self) -> Stringimpl TokenResult: pub fn has_flag(&self, flag: &str) -> boolimpl TokenResult: pub fn is_burnable(&self) -> boolimpl TokenResult: pub fn is_divisible(&self) -> boolimpl TokenResult: pub fn is_fiat(&self) -> boolimpl TokenResult: pub fn is_finite(&self) -> boolimpl TokenResult: pub fn is_fuel(&self) -> boolimpl TokenResult: pub fn is_fungible(&self) -> boolimpl TokenResult: pub fn is_mintable(&self) -> boolimpl TokenResult: pub fn is_non_fungible(&self) -> boolimpl TokenResult: pub fn is_stakable(&self) -> boolimpl TokenResult: pub fn is_transferable(&self) -> boolimpl TransactionResult: pub fn state_is_fault(&self) -> boolimpl TransactionResult: pub fn state_is_success(&self) -> boolimpl VmValue: pub fn as_fields(&self) -> Option<&BTreeMap<String, VmValue>>impl VmValue: pub fn as_items(&self) -> Option<&[VmValue]>impl VmValue: pub fn as_text(&self) -> Option<&str>impl VmValue: pub fn field(&self, name: &str) -> Option<&VmValue>impl VmValue: pub fn is_text(&self) -> boolimpl VmValue: pub fn text(value: impl Into<String>) -> Selfpub fn convert_decimals(amount: &str, decimals: u32) -> Stringpub fn parse_json_rpc_response(status: u16, body: Value) -> Result<Value>pub fn parse_json_rpc_response_for_request( status: u16, body: Value, expected_request_id: u64, ) -> Result<Value>Variants
PreflightVerdict::FreePreflightVerdict::NotApplicablePreflightVerdict::TakenPreflightVerdict::UnknownVmValue::Fields(BTreeMap<String, VmValue>)VmValue::Items(Vec<VmValue>)VmValue::Text(String)
phantasma_sdk::transaction
Source: src/transaction.rs
Declarations
pub const SDK_PAYLOAD: &[u8] = concat!("RS-SDK-v", env!("CARGO_PKG_VERSION")).as_bytes()pub struct TransactionFields
Transaction.pub chain_name: StringTransaction.pub expiration: u32Transaction.pub nexus_name: StringTransaction.pub payload: Vec<u8>Transaction.pub script: Vec<u8>Transaction.pub signatures: Vec<Ed25519Signature>
Methods
impl Transaction: pub fn from_bytes(data: &[u8]) -> Result<Self>impl Transaction: pub fn hash(&self) -> Hashimpl Transaction: pub fn is_signed_by(&self, key_pair: &PhantasmaKeys) -> boolimpl Transaction: pub fn mine(&mut self, difficulty: u32)impl Transaction: pub fn new(impl Transaction: pub fn sign(&mut self, key_pair: &PhantasmaKeys) -> Ed25519Signatureimpl Transaction: pub fn to_bytes(&self, with_signatures: bool) -> Vec<u8>impl Transaction: pub fn with_payload(mut self, payload: impl Into<Vec<u8>>) -> Selfpub fn big_int(value: i64) -> BigIntpub fn tx_state_is_fault(state: &str) -> boolpub fn tx_state_is_success(state: &str) -> boolphantasma_sdk::vm
Source: src/vm.rs
Declarations
pub enum Opcodepub enum ScriptArgpub enum VMObjectpub enum VMTypepub struct ScriptBuilderMethods
impl ScriptBuilder: pub fn allow_gas(impl ScriptBuilder: pub fn allow_gas_text(impl ScriptBuilder: pub fn begin() -> Selfimpl ScriptBuilder: pub fn call_contract<I>(&mut self, contract_name: &str, method: &str, args: I) -> &mut Selfimpl ScriptBuilder: pub fn call_interop<I>(&mut self, method: &str, args: I) -> &mut Selfimpl ScriptBuilder: pub fn call_nft<I>(&mut self, symbol: &str, series_id: u64, method: &str, args: I) -> &mut Selfimpl ScriptBuilder: pub fn cross_transfer_nft(impl ScriptBuilder: pub fn cross_transfer_nft_text(impl ScriptBuilder: pub fn cross_transfer_nft_to_text(impl ScriptBuilder: pub fn cross_transfer_token(impl ScriptBuilder: pub fn cross_transfer_token_text(impl ScriptBuilder: pub fn cross_transfer_token_to_text(impl ScriptBuilder: pub fn current_size(&self) -> usizeimpl ScriptBuilder: pub fn emit(&mut self, opcode: Opcode) -> &mut Selfimpl ScriptBuilder: pub fn emit_call(&mut self, label: &str, register_count: u8) -> &mut Selfimpl ScriptBuilder: pub fn emit_conditional_jump(&mut self, opcode: Opcode, src_reg: u8, label: &str) -> &mut Selfimpl ScriptBuilder: pub fn emit_copy(&mut self, src_reg: u8, dst_reg: u8) -> &mut Selfimpl ScriptBuilder: pub fn emit_ext_call(&mut self, method: &str, reg: u8) -> &mut Selfimpl ScriptBuilder: pub fn emit_jump(&mut self, opcode: Opcode, label: &str, reg: u8) -> &mut Selfimpl ScriptBuilder: pub fn emit_label(&mut self, label: &str) -> &mut Selfimpl ScriptBuilder: pub fn emit_load(&mut self, reg: u8, data: impl AsRef<[u8]>, vm_type: VMType) -> &mut Selfimpl ScriptBuilder: pub fn emit_load_bool(&mut self, reg: u8, value: bool) -> &mut Selfimpl ScriptBuilder: pub fn emit_load_number(&mut self, reg: u8, value: &BigInt) -> &mut Selfimpl ScriptBuilder: pub fn emit_load_string(&mut self, reg: u8, value: &str) -> &mut Selfimpl ScriptBuilder: pub fn emit_load_time(&mut self, reg: u8, unix_seconds: u64) -> &mut Selfimpl ScriptBuilder: pub fn emit_load_timestamp(&mut self, reg: u8, unix_seconds: u64) -> &mut Selfimpl ScriptBuilder: pub fn emit_move(&mut self, src_reg: u8, dst_reg: u8) -> &mut Selfimpl ScriptBuilder: pub fn emit_pop(&mut self, reg: u8) -> &mut Selfimpl ScriptBuilder: pub fn emit_push(&mut self, reg: u8) -> &mut Selfimpl ScriptBuilder: pub fn emit_raw(&mut self, data: impl AsRef<[u8]>) -> &mut Selfimpl ScriptBuilder: pub fn emit_throw(&mut self, reg: u8) -> &mut Selfimpl ScriptBuilder: pub fn emit_var_bytes(&mut self, value: u64) -> &mut Selfimpl ScriptBuilder: pub fn end_script(&mut self) -> Result<Vec<u8>>impl ScriptBuilder: pub fn end_script_hex(&mut self) -> Result<String>impl ScriptBuilder: pub fn end_script_with_error(&mut self) -> (Vec<u8>, Option<PhantasmaError>)impl ScriptBuilder: pub fn mint_tokens(impl ScriptBuilder: pub fn mint_tokens_text(impl ScriptBuilder: pub fn new() -> Selfimpl ScriptBuilder: pub fn spend_gas(&mut self, address: Address) -> &mut Selfimpl ScriptBuilder: pub fn spend_gas_text(&mut self, address: &str) -> &mut Selfimpl ScriptBuilder: pub fn stake(&mut self, address: Address, amount: u64) -> &mut Selfimpl ScriptBuilder: pub fn stake_text(&mut self, address: &str, amount: u64) -> &mut Selfimpl ScriptBuilder: pub fn to_script(&self) -> Result<Vec<u8>>impl ScriptBuilder: pub fn transfer_balance(&mut self, symbol: &str, from: Address, to: Address) -> &mut Selfimpl ScriptBuilder: pub fn transfer_balance_text(&mut self, symbol: &str, from: &str, to: &str) -> &mut Selfimpl ScriptBuilder: pub fn transfer_nft(impl ScriptBuilder: pub fn transfer_nft_text(impl ScriptBuilder: pub fn transfer_nft_to_text(impl ScriptBuilder: pub fn transfer_tokens(impl ScriptBuilder: pub fn transfer_tokens_text(impl ScriptBuilder: pub fn transfer_tokens_to_text(impl ScriptBuilder: pub fn unstake(&mut self, address: Address, amount: u64) -> &mut Selfimpl ScriptBuilder: pub fn unstake_text(&mut self, address: &str, amount: u64) -> &mut Selfimpl VMObject: pub fn array_type(&self) -> VMTypeimpl VMObject: pub fn as_bool(&self) -> Result<bool>impl VMObject: pub fn as_bytes(&self) -> Result<Vec<u8>>impl VMObject: pub fn as_number(&self) -> Result<BigInt>impl VMObject: pub fn as_string(&self) -> Result<String>impl VMObject: pub fn cast_to(&self, target: VMType) -> Result<Self>impl VMObject: pub fn from_bytes(data: &[u8]) -> Result<Self>impl VMObject: pub fn read(reader: &mut BinaryReader<'_>) -> Result<Self>impl VMObject: pub fn to_bytes(&self) -> Result<Vec<u8>>impl VMObject: pub fn vm_type(&self) -> VMTypeimpl VMObject: pub fn write(&self, writer: &mut BinaryWriter) -> Result<()>pub fn script_arg_number_to_i64(value: &ScriptArg) -> Option<i64>Variants
Opcode::Abs = 34Opcode::Add = 35Opcode::And = 22Opcode::Call = 6Opcode::Cast = 14Opcode::Cat = 15Opcode::Clear = 49Opcode::Copy = 2Opcode::Count = 20Opcode::Ctx = 45Opcode::Debug = 52Opcode::Dec = 31Opcode::Div = 38Opcode::Equal = 25Opcode::Evm = 255Opcode::ExtCall = 7Opcode::Get = 48Opcode::Gt = 27Opcode::Gte = 29Opcode::Inc = 30Opcode::Jmp = 8Opcode::JmpIf = 9Opcode::JmpNot = 10Opcode::Left = 17Opcode::Load = 13Opcode::Lt = 26Opcode::Lte = 28Opcode::Max = 43Opcode::Min = 42Opcode::Mod = 39Opcode::Move = 1Opcode::Mul = 37Opcode::Negate = 33Opcode::Nop = 0Opcode::Not = 21Opcode::Or = 23Opcode::Pack = 51Opcode::Pop = 4Opcode::Pow = 44Opcode::Push = 3Opcode::Put = 47Opcode::Range = 16Opcode::Remove = 54Opcode::Ret = 11Opcode::Right = 18Opcode::Shl = 40Opcode::Shr = 41Opcode::Sign = 32Opcode::Size = 19Opcode::Sub = 36Opcode::Substr = 53Opcode::Swap = 5Opcode::Switch = 46Opcode::Throw = 12Opcode::Unpack = 50Opcode::Xor = 24ScriptArg::Address(Address)ScriptArg::Array(Vec<ScriptArg>)ScriptArg::Bool(bool)ScriptArg::Bytes(Vec<u8>)ScriptArg::Number(BigInt)ScriptArg::String(String)ScriptArg::Timestamp(u64)VMObject::Bool(bool)VMObject::Bytes(Vec<u8>)VMObject::Enum(u32)VMObject::NoneVMObject::Number(BigInt)VMObject::Object(Vec<u8>)VMObject::String(String)VMObject::Struct(Vec<(VMObject, VMObject)>)VMObject::Timestamp(u32)VMType::Bool = 6VMType::Bytes = 2VMType::Enum = 7VMType::None = 0VMType::Number = 3VMType::Object = 8VMType::String = 4VMType::Struct = 1VMType::Timestamp = 5