Skip to content

Go 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.

github.com/phantasma-io/phantasma-sdk-go/pkg/blockchain

Source: pkg/blockchain

Declarations

const MaxTransactionSignatureCount = 1024
type Transaction struct {

Fields

  • ChainName string
  • Expiration uint32
  • Hash crypto.Hash
  • NexusName string
  • Payload []byte
  • Script []byte
  • Signatures []crypto.Signature

Methods

func (tx *Transaction) Bytes() []byte
func (tx *Transaction) BytesEx(withSignatures bool) []byte
func (tx *Transaction) Deserialize(reader *io.BinReader)
func (tx *Transaction) HasSignatures() bool
func (tx *Transaction) IsSignedBy(addresses []crypto.Address) bool
func (tx *Transaction) Mine(difficulty int)
func (tx *Transaction) Serialize(writer *io.BinWriter)
func (tx *Transaction) SerializeEx(writer *io.BinWriter, withSignatures bool)
func (tx *Transaction) Sign(keyPair crypto.KeyPair) error
func (tx *Transaction) String() string
func NewTransaction(nexusName, chainName string, script []byte, timestamp uint32, payload []byte) Transaction
func TxStateIsFault(state string) bool
func TxStateIsSuccess(state string) bool

github.com/phantasma-io/phantasma-sdk-go/pkg/carbon

Source: pkg/carbon

Declarations

const DefaultTxExpiry = 45 * time.Second
const GasModelV2UnitsPerBlockDataByte = 25
const GovernanceMethodRegisterName GovernanceContractMethod = 1
const GovernanceMethodSetGasConfig GovernanceContractMethod = 3
const KCALDecimals = 10
const ListingTypeFixedPrice ListingType = 0
const MarketConfigFlagsCanCancelEarly MarketConfigFlags = 1 << 2
const MarketConfigFlagsCanPurchaseLate MarketConfigFlags = 1 << 3
const MarketConfigFlagsEnforceRoyalties MarketConfigFlags = 1 << 1
const MarketConfigFlagsNone MarketConfigFlags = 0
const MarketConfigFlagsPriceRequired MarketConfigFlags = 1 << 0
const MarketDelistingGraceMS uint64 = 1000 * 60 * 60 * 24
const MarketMaximumListingTimeMS uint64 = 1000 * 60 * 60 * 24 * 90
const MarketMethodBuyToken
const MarketMethodBuyTokenByID
const MarketMethodCancelSale
const MarketMethodCancelSaleByID
const MarketMethodGetTokenListingCount
const MarketMethodGetTokenListingInfo
const MarketMethodGetTokenListingInfoByID
const MarketMethodSellToken MarketContractMethod = iota
const MarketMethodSellTokenByID
const MarketMinimumListingTimeMS uint64 = 1000
const MarketRoyaltyHundredPercent uint64 = 100 * MarketRoyaltyOnePercent
const MarketRoyaltyOnePercent uint64 = 10_000_000
const ModuleIDGovernance ModuleID = 0
const ModuleIDInternal ModuleID = 0xffffffff
const ModuleIDMarket ModuleID = 4
const ModuleIDOrg ModuleID = 3
const ModuleIDPhantasma ModuleID = 2
const ModuleIDPhantasmaVM = ModuleIDPhantasma
const ModuleIDToken ModuleID = 1
const NativeFeeBurnFungible
const NativeFeeBurnNonFungible
const NativeFeeCreateToken
const NativeFeeCreateTokenSeries
const NativeFeeMintFungible
const NativeFeeMintNonFungible
const NativeFeeMintPhantasmaNonFungible
const NativeFeeRegisterName
const NativeFeeScript
const NativeFeeTransferFungible NativeFeeKind = iota
const NativeFeeTransferNonFungible
const NativeSignatureBytes = 64
const SOULDecimals = 8
const StandardMetaChainAddress = "_a"
const StandardMetaChainName = "_n"
const StandardMetaChainNexus = "_x"
const StandardMetaChainTokenomics = "_t"
const StandardMetaID = "_i"
const StandardMetaTokenInflationPeriod = "_ip"
const StandardMetaTokenPhantasmaABI = "_phb"
const StandardMetaTokenPhantasmaScript = "_phs"
const StandardMetaTokenPreBurn = "_brn"
const StandardMetaTokenStakingBoosterDiv = "_sbd"
const StandardMetaTokenStakingBoosterLimit = "_sbl"
const StandardMetaTokenStakingBoosterMul = "_sbm"
const StandardMetaTokenStakingBoosterToken = "_sbt"
const StandardMetaTokenStakingLock = "_sl"
const StandardMetaTokenStakingOrgID = "_soi"
const StandardMetaTokenStakingOrgThreshold = "_sot"
const StandardMetaTokenStakingRewardDiv = "_srd"
const StandardMetaTokenStakingRewardMul = "_srm"
const StandardMetaTokenStakingRewardPeriod = "_srp"
const StandardMetaTokenStakingRewardToken = "_srt"
const StorageQuantumBytes = 1024
const TokenFlagsBigFungible TokenFlags = 1 << 0
const TokenFlagsNonFungible TokenFlags = 1 << 1
const TokenFlagsNone TokenFlags = 0
const TokenMethodApplyInflation
const TokenMethodBurnFungible
const TokenMethodBurnNonFungible
const TokenMethodCreateMintedTokenSeries
const TokenMethodCreateToken
const TokenMethodCreateTokenSeries
const TokenMethodDeleteTokenSeries
const TokenMethodGetBalance
const TokenMethodGetBalances
const TokenMethodGetInstances
const TokenMethodGetNextTokenInflation
const TokenMethodGetNonFungibleInfo
const TokenMethodGetNonFungibleInfoByRomID
const TokenMethodGetSeriesInfo
const TokenMethodGetSeriesInfoByMetaID
const TokenMethodGetSeriesSupply
const TokenMethodGetTokenIDBySymbol
const TokenMethodGetTokenInfo
const TokenMethodGetTokenInfoBySymbol
const TokenMethodGetTokenSupply
const TokenMethodMintFungible
const TokenMethodMintNonFungible
const TokenMethodMintPhantasmaNonFungible
const TokenMethodSetTokensConfig
const TokenMethodTransferFungible TokenContractMethod = iota
const TokenMethodTransferNonFungible
const TokenMethodUpdateSeriesMetadata
const TokenMethodUpdateTokenMetadata
const TokensConfigFlagsAllowExplicitNFTMetaIDMint TokensConfigFlags = 1 << 4
const TokensConfigFlagsNone TokensConfigFlags = 0
const TokensConfigFlagsRequireMetadata TokensConfigFlags = 1 << 0
const TokensConfigFlagsRequireNFTMetaID TokensConfigFlags = 1 << 2
const TokensConfigFlagsRequireNFTStandard TokensConfigFlags = 1 << 3
const TokensConfigFlagsRequireSymbol TokensConfigFlags = 1 << 1
const TxTypeBurnFungible
const TxTypeBurnFungibleGasPayer
const TxTypeBurnNonFungible
const TxTypeBurnNonFungibleGasPayer
const TxTypeCall TxType = iota
const TxTypeCallMulti
const TxTypeMintFungible
const TxTypeMintNonFungible
const TxTypePhantasma
const TxTypePhantasmaRaw
const TxTypeTrade
const TxTypeTransferFungible
const TxTypeTransferFungibleGasPayer
const TxTypeTransferNonFungibleMulti
const TxTypeTransferNonFungibleMultiGasPayer
const TxTypeTransferNonFungibleSingle
const TxTypeTransferNonFungibleSingleGasPayer
const VMStructFlagsDynamicExtras VMStructFlags = 1 << 0
const VMStructFlagsIsSorted VMStructFlags = 1 << 1
const VMStructFlagsNone VMStructFlags = 0
const VMTypeArray VMType = 1
const VMTypeArrayBytes VMType = VMTypeArray | VMTypeBytes
const VMTypeArrayBytes16 VMType = VMTypeArray | VMTypeBytes16
const VMTypeArrayBytes32 VMType = VMTypeArray | VMTypeBytes32
const VMTypeArrayBytes64 VMType = VMTypeArray | VMTypeBytes64
const VMTypeArrayDynamic VMType = VMTypeArray | VMTypeDynamic
const VMTypeArrayInt16 VMType = VMTypeArray | VMTypeInt16
const VMTypeArrayInt256 VMType = VMTypeArray | VMTypeInt256
const VMTypeArrayInt32 VMType = VMTypeArray | VMTypeInt32
const VMTypeArrayInt64 VMType = VMTypeArray | VMTypeInt64
const VMTypeArrayInt8 VMType = VMTypeArray | VMTypeInt8
const VMTypeArrayString VMType = VMTypeArray | VMTypeString
const VMTypeArrayStruct VMType = VMTypeArray | VMTypeStruct
const VMTypeBytes VMType = 1 << 1
const VMTypeBytes16 VMType = 8 << 1
const VMTypeBytes32 VMType = 9 << 1
const VMTypeBytes64 VMType = 10 << 1
const VMTypeDynamic VMType = 0
const VMTypeInt16 VMType = 4 << 1
const VMTypeInt256 VMType = 7 << 1
const VMTypeInt32 VMType = 5 << 1
const VMTypeInt64 VMType = 6 << 1
const VMTypeInt8 VMType = 3 << 1
const VMTypeString VMType = 11 << 1
const VMTypeStruct VMType = 2 << 1
const WitnessArrayEntryBytes = 96
type Blob interface {
type BurnFungibleArgs struct {
type BurnFungibleParams struct {
type BurnNonFungibleArgs struct {
type BurnNonFungibleParams struct {
type BurnedInstance struct {
type Bytes16 [16]byte
type Bytes32 [32]byte
type Bytes64 [64]byte
type CallArgSection struct {
type ChainConfig struct {
type CreateMintedTokenSeriesArgs struct {
type CreateTokenSeriesArgs struct {
type FeePlan struct {
type FeePlanOptions struct {
type FeePlanSummary struct {
type FeeQuote struct {
type FieldType struct {
type GasConfig struct {
type GovernanceContractMethod uint32
type InfusedAsset struct {
type IntX struct {
type KeyPairSigner struct {
type ListingType byte
type MarketBuyTokenArgs struct {
type MarketBuyTokenByIDArgs struct {
type MarketCancelSaleArgs struct {
type MarketCancelSaleByIDArgs struct {
type MarketConfig struct {
type MarketConfigFlags uint32
type MarketContractMethod uint32
type MarketGetTokenListingCountArgs struct {
type MarketGetTokenListingInfoArgs struct {
type MarketGetTokenListingInfoByIDArgs struct {
type MarketSellTokenArgs struct {
type MarketSellTokenByIDArgs struct {
type MetadataField struct {
type MintFungibleArgs struct {
type MintFungibleParams struct {
type MintNonFungibleArgs struct {
type MintPhantasmaNonFungibleArgs struct {
type ModuleID uint32
type MsgCallArgSections struct {
type NFTMintInfo struct {
type NativeFeeEstimate struct {
type NativeFeeKind int
type NativeFeeParams struct {
type NativeFeePart struct {
type NativeFeeTransactionParams struct {
type PhantasmaNFTMintInfo struct {
type PhantasmaNFTMintResult struct {
type PlanAndSignOptions struct {
type Reader struct {
type RegisterNameArgs struct {
type SeriesInfo struct {
type SignedTxMsg struct {
type SmallString string
type TokenContractMethod uint32
type TokenFlags byte
type TokenInfo struct {
type TokenListing struct {
type TokenSchemas struct {
type TokenSchemasJSON struct {
type TokensConfig struct {
type TokensConfigFlags byte
type TransferFungibleArgs struct {
type TransferFungibleParams struct {
type TransferNonFungibleArgs struct {
type TransferNonFungibleParams struct {
type TxLimits struct {
type TxMsg struct {
type TxMsgBurnFungible struct {
type TxMsgBurnFungibleGasPayer struct {
type TxMsgBurnNonFungible struct {
type TxMsgBurnNonFungibleGasPayer struct {
type TxMsgCall struct {
type TxMsgCallMulti struct {
type TxMsgMintFungible struct {
type TxMsgMintNonFungible struct {
type TxMsgPhantasma struct {
type TxMsgPhantasmaRaw struct {
type TxMsgTrade struct {
type TxMsgTransferFungible struct {
type TxMsgTransferFungibleGasPayer struct {
type TxMsgTransferNonFungibleMulti struct {
type TxMsgTransferNonFungibleMultiGasPayer struct {
type TxMsgTransferNonFungibleSingle struct {
type TxMsgTransferNonFungibleSingleGasPayer struct {
type TxPayload interface {
type TxSigner interface {
type TxType byte
type UpdateSeriesMetadataArgs struct {
type UpdateTokenMetadataArgs struct {
type VMDynamicStruct struct {
type VMDynamicVariable struct {
type VMNamedDynamicVariable struct {
type VMNamedVariableSchema struct {
type VMStructArray struct {
type VMStructFlags byte
type VMStructSchema struct {
type VMType byte
type VMVariableSchema struct {
type Witness struct {
type Writer struct {
var EmptyBytes16 Bytes16
var EmptyBytes32 Bytes32
var EmptyBytes64 Bytes64
var SystemAddressDataPool = systemAddress(2)
var SystemAddressGasPool = systemAddress(1)
var SystemAddressNull = systemAddress(0)

Fields

  • Address Bytes32
  • Address Bytes32
  • AllowedTxTypes uint32
  • Amount IntX
  • Amount uint64
  • Amount IntX
  • Amount uint64
  • Args []byte
  • Args []byte
  • Blob
  • BlockRateTarget uint32
  • BurnF []TxMsgBurnFungibleGasPayer
  • BurnN []TxMsgBurnNonFungibleGasPayer
  • BurnerHoldsToken bool
  • Calls []TxMsgCall
  • CarbonInstanceID uint64
  • Chain SmallString
  • Count int
  • Data any
  • DataEscrowPerRow uint64
  • DataTokenID uint64
  • Decimals byte
  • DeletedStorageQuanta int
  • DelistingGrace uint64
  • DistinctSeriesCount int
  • EndDate int64
  • EndDate int64
  • EnvelopeBytes int
  • Exact bool
  • ExpectedGasBill uint64
  • Expiry int64
  • Expiry int64
  • ExpiryWindow uint32
  • FeeMultiplier uint64
  • FeePlanOptions
  • FeeQuote
  • FeeShift byte
  • Fields []VMNamedDynamicVariable
  • Fields []VMNamedVariableSchema
  • Flags MarketConfigFlags
  • Flags TokenFlags
  • Flags VMStructFlags
  • Flags TokensConfigFlags
  • From Bytes32
  • From Bytes32
  • From Bytes32
  • From Bytes32
  • From Bytes32
  • From Bytes32
  • GasBill string
  • GasBurnRatioMul uint64
  • GasBurnRatioShift byte
  • GasDappRatioMul uint64
  • GasDappRatioShift byte
  • GasFeeCreateTokenBase uint64
  • GasFeeCreateTokenSeries uint64
  • GasFeeCreateTokenSymbol uint64
  • GasFeePerByte uint64
  • GasFeeQuery uint64
  • GasFeeRegisterName uint64
  • GasFeeTransfer uint64
  • GasFrom Bytes32
  • GasOffer string
  • GasPayer Bytes32
  • GasPayer Bytes32
  • GasProducerRatioMul uint64
  • GasProducerRatioShift byte
  • GasTokenID uint64
  • HasInflationSchedule bool
  • HasPreBurn bool
  • HasStakingOrganisation bool
  • HasStakingRewardToken bool
  • Info SeriesInfo
  • Infusions []InfusedAsset
  • InstanceCount int
  • InstanceID uint64
  • InstanceID VMDynamicVariable
  • InstanceID VMDynamicVariable
  • InstanceID uint64
  • InstanceIDs []uint64
  • Int64Balances bool
  • Keys cryptography.KeyPair
  • Kind NativeFeeKind
  • Kinds []NativeFeeKind
  • LegacyDataEscrowPerRow uint64
  • MaxData uint64
  • MaxGas uint64
  • MaxGas uint64
  • MaxMint uint32
  • MaxNameLength byte
  • MaxStructureSize uint32
  • MaxSupply IntX
  • MaxSupply uint32
  • MaxTokenSymbolLength byte
  • MaximumListingTime uint64
  • Metadata []byte
  • Metadata []byte
  • Metadata VMDynamicStruct
  • Metadata []byte
  • MethodID uint32
  • MinimumGasBill uint64
  • MinimumGasOffer uint64
  • MinimumListingTime uint64
  • MintF []TxMsgMintFungible
  • MintN []TxMsgMintNonFungible
  • ModuleID uint32
  • Msg TxMsg
  • Msg TxPayload
  • Name SmallString
  • Name SmallString
  • Name SmallString
  • Name string
  • Name string json:“name”``
  • NameLength int
  • NativeFeeEstimate
  • NewStorageQuanta int
  • Nexus SmallString
  • NonFungible bool
  • Owner Bytes32
  • Owner Bytes32
  • Owner Bytes32
  • Params NativeFeeParams
  • Payload SmallString
  • PayloadBytes int
  • PhantasmaNFTID Bytes32
  • PhantasmaSeriesID IntX
  • PolicyFeeCreateTokenBase uint64
  • PolicyFeeCreateTokenSeries uint64
  • PolicyFeeCreateTokenSymbol uint64
  • PolicyFeeRegisterName uint64
  • Price IntX
  • Price IntX
  • PublicKey() []byte
  • QuoteSymbol SmallString
  • QuoteTokenID uint64
  • RAM []byte
  • RAM VMStructSchema
  • RAM []FieldType json:“ram”``
  • RAM VMStructSchema
  • RAM []byte
  • RAMBytes []int
  • RAMs [][]byte
  • ROM []byte
  • ROM VMStructSchema
  • ROM []FieldType json:“rom”``
  • ROM VMStructSchema
  • ROM []byte
  • ROMBytes []int
  • ROMs [][]byte
  • ReadCarbon(*Reader)
  • RecipientHoldsToken bool
  • RegisterOffset int32
  • Reserved1 byte
  • Reserved2 byte
  • Reserved3 byte
  • RomWithoutMetaID bool
  • Schema VMStructSchema
  • Schema VMVariableSchema
  • Script []byte
  • ScriptEventBytes int
  • ScriptStorageQuanta int
  • ScriptUnitsAllowance uint64
  • Sections *MsgCallArgSections
  • Sections []CallArgSection
  • Seller Bytes32
  • SeriesID uint32
  • SeriesInfoBytes int
  • SeriesMetadata VMStructSchema
  • SeriesMetadata []FieldType json:“seriesMetadata”``
  • SeriesWithoutMetaID bool
  • SignMessage(ctx context.Context, message []byte) ([]byte, error)
  • Signature Bytes64
  • StartDate int64
  • StorageCeiling string
  • StructDef *VMStructSchema
  • Structs []VMDynamicStruct
  • SupplyRowExists bool
  • Symbol SmallString
  • Symbol SmallString
  • Symbol SmallString
  • SymbolLength int
  • To Bytes32
  • To Bytes32
  • To Bytes32
  • To Bytes32
  • ToIsNFTAddress bool
  • TokenBurnedBefore bool
  • TokenID uint64
  • TokenID uint64
  • TokenID uint64
  • TokenID uint64
  • TokenID uint64
  • TokenInfoBytes int
  • TokenSchemas []byte
  • Tokens []NFTMintInfo
  • Tokens []PhantasmaNFTMintInfo
  • Transaction []byte
  • TransferF []TxMsgTransferFungibleGasPayer
  • TransferN []TxMsgTransferNonFungibleSingleGasPayer
  • TxLimits
  • Type ListingType
  • Type VMType
  • Type TxType
  • Type VMType
  • Type VMType json:“type”``
  • UniqueSeries bool
  • Value VMDynamicVariable
  • Value any
  • Version byte
  • Version byte
  • WitnessCount int
  • Witnesses []Witness
  • WriteCarbon(*Writer)

Methods

func (a *BurnFungibleArgs) ReadCarbon(r *Reader)
func (a *BurnFungibleArgs) WriteCarbon(w *Writer)
func (a *BurnNonFungibleArgs) ReadCarbon(r *Reader)
func (a *BurnNonFungibleArgs) WriteCarbon(w *Writer)
func (a *CreateMintedTokenSeriesArgs) ReadCarbon(r *Reader)
func (a *CreateMintedTokenSeriesArgs) WriteCarbon(w *Writer)
func (a *CreateTokenSeriesArgs) ReadCarbon(r *Reader)
func (a *CreateTokenSeriesArgs) WriteCarbon(w *Writer)
func (a *MarketBuyTokenArgs) ReadCarbon(r *Reader)
func (a *MarketBuyTokenArgs) WriteCarbon(w *Writer)
func (a *MarketBuyTokenByIDArgs) ReadCarbon(r *Reader)
func (a *MarketBuyTokenByIDArgs) WriteCarbon(w *Writer)
func (a *MarketCancelSaleArgs) ReadCarbon(r *Reader)
func (a *MarketCancelSaleArgs) WriteCarbon(w *Writer)
func (a *MarketCancelSaleByIDArgs) ReadCarbon(r *Reader)
func (a *MarketCancelSaleByIDArgs) WriteCarbon(w *Writer)
func (a *MarketGetTokenListingCountArgs) ReadCarbon(r *Reader)
func (a *MarketGetTokenListingCountArgs) WriteCarbon(w *Writer)
func (a *MarketGetTokenListingInfoArgs) ReadCarbon(r *Reader)
func (a *MarketGetTokenListingInfoArgs) WriteCarbon(w *Writer)
func (a *MarketGetTokenListingInfoByIDArgs) ReadCarbon(r *Reader)
func (a *MarketGetTokenListingInfoByIDArgs) WriteCarbon(w *Writer)
func (a *MarketSellTokenArgs) ReadCarbon(r *Reader)
func (a *MarketSellTokenArgs) WriteCarbon(w *Writer)
func (a *MarketSellTokenByIDArgs) ReadCarbon(r *Reader)
func (a *MarketSellTokenByIDArgs) WriteCarbon(w *Writer)
func (a *MintFungibleArgs) ReadCarbon(r *Reader)
func (a *MintFungibleArgs) WriteCarbon(w *Writer)
func (a *MintNonFungibleArgs) ReadCarbon(r *Reader)
func (a *MintNonFungibleArgs) WriteCarbon(w *Writer)
func (a *MintPhantasmaNonFungibleArgs) ReadCarbon(r *Reader)
func (a *MintPhantasmaNonFungibleArgs) WriteCarbon(w *Writer)
func (a *RegisterNameArgs) ReadCarbon(r *Reader)
func (a *RegisterNameArgs) WriteCarbon(w *Writer)
func (a *TransferFungibleArgs) ReadCarbon(r *Reader)
func (a *TransferFungibleArgs) WriteCarbon(w *Writer)
func (a *TransferNonFungibleArgs) ReadCarbon(r *Reader)
func (a *TransferNonFungibleArgs) WriteCarbon(w *Writer)
func (a *UpdateSeriesMetadataArgs) ReadCarbon(r *Reader)
func (a *UpdateSeriesMetadataArgs) WriteCarbon(w *Writer)
func (a *UpdateTokenMetadataArgs) ReadCarbon(r *Reader)
func (a *UpdateTokenMetadataArgs) WriteCarbon(w *Writer)
func (b *Bytes16) ReadCarbon(r *Reader)
func (b *Bytes32) ReadCarbon(r *Reader)
func (b *Bytes64) ReadCarbon(r *Reader)
func (b Bytes16) Bytes() []byte
func (b Bytes16) String() string
func (b Bytes16) WriteCarbon(w *Writer)
func (b Bytes32) Bytes() []byte
func (b Bytes32) String() string
func (b Bytes32) WriteCarbon(w *Writer)
func (b Bytes64) Bytes() []byte
func (b Bytes64) String() string
func (b Bytes64) WriteCarbon(w *Writer)
func (c *ChainConfig) ReadCarbon(r *Reader)
func (c *ChainConfig) WriteCarbon(w *Writer)
func (c *GasConfig) HasGasModelV2() bool
func (c *GasConfig) ReadCarbon(r *Reader)
func (c *GasConfig) WriteCarbon(w *Writer)
func (c *MarketConfig) ReadCarbon(r *Reader)
func (c *MarketConfig) WriteCarbon(w *Writer)
func (c *TokensConfig) ReadCarbon(r *Reader)
func (c *TokensConfig) WriteCarbon(w *Writer)
func (f *FieldType) UnmarshalJSON(data []byte) error
func (f FieldType) MarshalJSON() ([]byte, error)
func (i *NFTMintInfo) ReadCarbon(r *Reader)
func (i *NFTMintInfo) WriteCarbon(w *Writer)
func (i *PhantasmaNFTMintInfo) ReadCarbon(r *Reader)
func (i *PhantasmaNFTMintInfo) WriteCarbon(w *Writer)
func (k NativeFeeKind) String() string
func (l *TokenListing) ReadCarbon(r *Reader)
func (l *TokenListing) WriteCarbon(w *Writer)
func (m *SignedTxMsg) ReadCarbon(r *Reader)
func (m *SignedTxMsg) WriteCarbon(w *Writer)
func (m *TxMsg) ReadCarbon(r *Reader)
func (m *TxMsg) WriteCarbon(w *Writer)
func (m *TxMsgBurnFungible) ReadCarbon(r *Reader)
func (m *TxMsgBurnFungible) WriteCarbon(w *Writer)
func (m *TxMsgBurnFungibleGasPayer) ReadCarbon(r *Reader)
func (m *TxMsgBurnFungibleGasPayer) WriteCarbon(w *Writer)
func (m *TxMsgBurnNonFungible) ReadCarbon(r *Reader)
func (m *TxMsgBurnNonFungible) WriteCarbon(w *Writer)
func (m *TxMsgBurnNonFungibleGasPayer) ReadCarbon(r *Reader)
func (m *TxMsgBurnNonFungibleGasPayer) WriteCarbon(w *Writer)
func (m *TxMsgCall) ReadCarbon(r *Reader)
func (m *TxMsgCall) WriteCarbon(w *Writer)
func (m *TxMsgCallMulti) ReadCarbon(r *Reader)
func (m *TxMsgCallMulti) WriteCarbon(w *Writer)
func (m *TxMsgMintFungible) ReadCarbon(r *Reader)
func (m *TxMsgMintFungible) WriteCarbon(w *Writer)
func (m *TxMsgMintNonFungible) ReadCarbon(r *Reader)
func (m *TxMsgMintNonFungible) WriteCarbon(w *Writer)
func (m *TxMsgPhantasma) ReadCarbon(r *Reader)
func (m *TxMsgPhantasma) WriteCarbon(w *Writer)
func (m *TxMsgPhantasmaRaw) ReadCarbon(r *Reader)
func (m *TxMsgPhantasmaRaw) WriteCarbon(w *Writer)
func (m *TxMsgTrade) ReadCarbon(r *Reader)
func (m *TxMsgTrade) WriteCarbon(w *Writer)
func (m *TxMsgTransferFungible) ReadCarbon(r *Reader)
func (m *TxMsgTransferFungible) WriteCarbon(w *Writer)
func (m *TxMsgTransferFungibleGasPayer) ReadCarbon(r *Reader)
func (m *TxMsgTransferFungibleGasPayer) WriteCarbon(w *Writer)
func (m *TxMsgTransferNonFungibleMulti) ReadCarbon(r *Reader)
func (m *TxMsgTransferNonFungibleMulti) WriteCarbon(w *Writer)
func (m *TxMsgTransferNonFungibleMultiGasPayer) ReadCarbon(r *Reader)
func (m *TxMsgTransferNonFungibleMultiGasPayer) WriteCarbon(w *Writer)
func (m *TxMsgTransferNonFungibleSingle) ReadCarbon(r *Reader)
func (m *TxMsgTransferNonFungibleSingle) WriteCarbon(w *Writer)
func (m *TxMsgTransferNonFungibleSingleGasPayer) ReadCarbon(r *Reader)
func (m *TxMsgTransferNonFungibleSingleGasPayer) WriteCarbon(w *Writer)
func (p FeePlan) Apply(msg TxMsg) TxMsg
func (r *Reader) AssertEOF()
func (r *Reader) Read1() byte
func (r *Reader) Read16() Bytes16
func (r *Reader) Read2() int16
func (r *Reader) Read32() Bytes32
func (r *Reader) Read4() int32
func (r *Reader) Read4U() uint32
func (r *Reader) Read64() Bytes64
func (r *Reader) Read8() int64
func (r *Reader) Read8U() uint64
func (r *Reader) ReadBigInt() *big.Int
func (r *Reader) ReadBigIntArray() []*big.Int
func (r *Reader) ReadBigIntWithHeader(preReadHeader int) *big.Int
func (r *Reader) ReadByteArray() []byte
func (r *Reader) ReadByteArrays() [][]byte
func (r *Reader) ReadInt16Array() []int16
func (r *Reader) ReadInt32Array() []int32
func (r *Reader) ReadInt64Array() []int64
func (r *Reader) ReadInt8Array() []int8
func (r *Reader) ReadLength() int
func (r *Reader) ReadLengthFor(elementSize int) int
func (r *Reader) ReadRaw(count int) []byte
func (r *Reader) ReadStringZ() string
func (r *Reader) ReadStringZArray() []string
func (r *Reader) ReadUint64Array() []uint64
func (r0 *PhantasmaNFTMintResult) ReadCarbon(r *Reader)
func (r0 *PhantasmaNFTMintResult) WriteCarbon(w *Writer)
func (s *MsgCallArgSections) ReadWithCount(r *Reader, countNegative int32)
func (s *SeriesInfo) ReadCarbon(r *Reader)
func (s *SeriesInfo) WriteCarbon(w *Writer)
func (s *SmallString) ReadCarbon(r *Reader)
func (s *TokenSchemas) ReadCarbon(r *Reader)
func (s *TokenSchemas) WriteCarbon(w *Writer)
func (s *VMDynamicStruct) Get(name string) *VMDynamicVariable
func (s *VMDynamicStruct) ReadCarbon(r *Reader)
func (s *VMDynamicStruct) ReadWithSchema(schema *VMStructSchema, r *Reader)
func (s *VMDynamicStruct) WriteCarbon(w *Writer)
func (s *VMDynamicStruct) WriteWithSchema(schema *VMStructSchema, w *Writer) bool
func (s *VMNamedVariableSchema) ReadCarbon(r *Reader)
func (s *VMNamedVariableSchema) WriteCarbon(w *Writer)
func (s *VMStructSchema) ReadCarbon(r *Reader)
func (s *VMStructSchema) WriteCarbon(w *Writer)
func (s *VMVariableSchema) ReadCarbon(r *Reader)
func (s *VMVariableSchema) WriteCarbon(w *Writer)
func (s KeyPairSigner) PublicKey() []byte
func (s KeyPairSigner) SignMessage(_ context.Context, message []byte) ([]byte, error)
func (s MsgCallArgSections) HasSections() bool
func (s MsgCallArgSections) WriteCarbon(w *Writer)
func (s SmallString) Bytes() []byte
func (s SmallString) String() string
func (s SmallString) WriteCarbon(w *Writer)
func (t *TokenInfo) ReadCarbon(r *Reader)
func (t *TokenInfo) WriteCarbon(w *Writer)
func (t TxType) String() string
func (v *VMDynamicVariable) ReadCarbon(r *Reader)
func (v *VMDynamicVariable) ReadWithSchema(schema *VMVariableSchema, r *Reader)
func (v *VMDynamicVariable) WriteCarbon(w *Writer)
func (v *VMNamedDynamicVariable) ReadCarbon(r *Reader)
func (v *VMNamedDynamicVariable) WriteCarbon(w *Writer)
func (w *Writer) Bytes() []byte
func (w *Writer) Write1(v byte)
func (w *Writer) Write16(data Bytes16)
func (w *Writer) Write2(v int16)
func (w *Writer) Write32(data Bytes32)
func (w *Writer) Write4(v int32)
func (w *Writer) Write4U(v uint32)
func (w *Writer) Write64(data Bytes64)
func (w *Writer) Write8(v int64)
func (w *Writer) Write8U(v uint64)
func (w *Writer) WriteBigInt(value *big.Int)
func (w *Writer) WriteBigIntArray(values []*big.Int)
func (w *Writer) WriteBlob(blob Blob)
func (w *Writer) WriteBlobArray(items []Blob)
func (w *Writer) WriteByteArray(data []byte)
func (w *Writer) WriteByteArrays(values [][]byte)
func (w *Writer) WriteFixed(data []byte, count int)
func (w *Writer) WriteInt16Array(values []int16)
func (w *Writer) WriteInt32Array(values []int32)
func (w *Writer) WriteInt64Array(values []int64)
func (w *Writer) WriteInt8Array(values []int8)
func (w *Writer) WriteRaw(data []byte)
func (w *Writer) WriteStringZ(value string)
func (w *Writer) WriteStringZArray(values []string)
func (w *Writer) WriteUint64Array(values []uint64)
func (witness *Witness) ReadCarbon(r *Reader)
func (witness *Witness) WriteCarbon(w *Writer)
func (x *IntX) ReadCarbon(r *Reader)
func (x IntX) BigInt() *big.Int
func (x IntX) Is8ByteSafe() bool
func (x IntX) String() string
func (x IntX) WriteCarbon(w *Writer)
func BuildAndSerializeTokenSchemas(schemas *TokenSchemas) []byte
func BuildBurnFungibleTx(p BurnFungibleParams) TxMsg
func BuildBurnNonFungibleTx(p BurnNonFungibleParams) TxMsg
func BuildCreateTokenSeriesTx(tokenID uint64, seriesInfo SeriesInfo, creator Bytes32, limits TxLimits) TxMsg
func BuildCreateTokenSeriesTxAndSign(tokenID uint64, seriesInfo SeriesInfo, signer cryptography.KeyPair, config *GasConfig, options PlanAndSignOptions) ([]byte, error)
func BuildCreateTokenSeriesTxAndSignHex(tokenID uint64, seriesInfo SeriesInfo, signer cryptography.KeyPair, config *GasConfig, options PlanAndSignOptions) (string, error)
func BuildCreateTokenTx(tokenInfo TokenInfo, creator Bytes32, limits TxLimits) TxMsg
func BuildCreateTokenTxAndSign(tokenInfo TokenInfo, signer cryptography.KeyPair, config *GasConfig, options PlanAndSignOptions) ([]byte, error)
func BuildCreateTokenTxAndSignHex(tokenInfo TokenInfo, signer cryptography.KeyPair, config *GasConfig, options PlanAndSignOptions) (string, error)
func BuildMintFungibleTx(p MintFungibleParams) TxMsg
func BuildMintPhantasmaNonFungibleSingleTx(tokenID uint64, phantasmaSeriesID *big.Int, sender Bytes32, receiver Bytes32, publicRom []byte, ram []byte, limits TxLimits) (TxMsg, error)
func BuildMintPhantasmaNonFungibleSingleTxAndSign(tokenID uint64, phantasmaSeriesID *big.Int, signer cryptography.KeyPair, receiver Bytes32, publicRom []byte, ram []byte, config *GasConfig, options PlanAndSignOptions) ([]byte, error)
func BuildMintPhantasmaNonFungibleSingleTxAndSignHex(tokenID uint64, phantasmaSeriesID *big.Int, signer cryptography.KeyPair, receiver Bytes32, publicRom []byte, ram []byte, config *GasConfig, options PlanAndSignOptions) (string, error)
func BuildMintPhantasmaNonFungibleTx(tokenID uint64, sender Bytes32, receiver Bytes32, tokens []PhantasmaNFTMintInfo, limits TxLimits) (TxMsg, error)
func BuildMintPhantasmaNonFungibleTxAndSign(tokenID uint64, signer cryptography.KeyPair, receiver Bytes32, tokens []PhantasmaNFTMintInfo, config *GasConfig, options PlanAndSignOptions) ([]byte, error)
func BuildMintPhantasmaNonFungibleTxAndSignHex(tokenID uint64, signer cryptography.KeyPair, receiver Bytes32, tokens []PhantasmaNFTMintInfo, config *GasConfig, options PlanAndSignOptions) (string, error)
func BuildNFTRom(schema VMStructSchema, phantasmaNFTID *big.Int, metadata []MetadataField) ([]byte, error)
func BuildPhantasmaNFTPublicMintSchema(nftRomSchema VMStructSchema) VMStructSchema
func BuildPhantasmaNFTRom(nftRomSchema VMStructSchema, metadata []MetadataField) ([]byte, error)
func BuildSeriesInfo(phantasmaSeriesID *big.Int, maxMint uint32, maxSupply uint32, owner Bytes32) (SeriesInfo, error)
func BuildTokenInfo(symbol string, maxSupply IntX, isNFT bool, decimals byte, owner Bytes32, metadata []byte, schemas []byte) (TokenInfo, error)
func BuildTokenMetadata(fields map[string]string) ([]byte, error)
func BuildTokenSchemasFromFields(seriesMetadata []FieldType, rom []FieldType, ram []FieldType) (TokenSchemas, error)
func BuildTokenSeriesMetadata(schema VMStructSchema, phantasmaSeriesID *big.Int, metadata []MetadataField) ([]byte, error)
func BuildTransferFungibleTx(p TransferFungibleParams) TxMsg
func BuildTransferNonFungibleTx(p TransferNonFungibleParams) (TxMsg, error)
func BurnedInstances(msg TxMsg) []BurnedInstance
func Bytes16FromHex(value string) (Bytes16, error)
func Bytes32FromHex(value string) (Bytes32, error)
func Bytes32FromPhantasmaAddress(address cryptography.Address) (Bytes32, error)
func Bytes32FromPhantasmaAddressText(text string) (Bytes32, error)
func Bytes32FromPublicKey(publicKey []byte) (Bytes32, error)
func Bytes64FromHex(value string) (Bytes64, error)
func CheckTokenSymbol(symbol string) error
func DecodeHex(value string) ([]byte, error)
func DefaultExpiry() int64
func DefaultMarketConfig() MarketConfig
func EnvelopeBytes(msg TxMsg, witnessCount int) (int, error)
func EnvelopeBytesFor(kind NativeFeeKind, serializedMessageLength int, witnessCount int) (int, error)
func EstimateNativeFee(kind NativeFeeKind, config *GasConfig, params NativeFeeParams) (NativeFeeEstimate, error)
func EstimateNativeFeeBatch(parts []NativeFeePart, config *GasConfig, transaction NativeFeeTransactionParams) (NativeFeeEstimate, error)
func ExpiryWithin(expiryWindow, margin time.Duration) (int64, error)
func GetNFTAddress(carbonTokenID uint64, instanceID uint64) Bytes32
func IntXFromInt64(value int64) IntX
func IsNFTAddress(address Bytes32) bool
func KeyPairSigners(keys ...cryptography.KeyPair) []TxSigner
func MustBuildMintPhantasmaNonFungibleSingleTx(tokenID uint64, phantasmaSeriesID *big.Int, sender Bytes32, receiver Bytes32, publicRom []byte, ram []byte, limits TxLimits) TxMsg
func MustBuildNFTRom(schema VMStructSchema, phantasmaNFTID *big.Int, metadata []MetadataField) []byte
func MustBuildPhantasmaNFTRom(nftRomSchema VMStructSchema, metadata []MetadataField) []byte
func MustBuildSeriesInfo(phantasmaSeriesID *big.Int, maxMint uint32, maxSupply uint32, owner Bytes32) SeriesInfo
func MustBuildTokenMetadata(fields map[string]string) []byte
func MustBuildTokenSeriesMetadata(schema VMStructSchema, phantasmaSeriesID *big.Int, metadata []MetadataField) []byte
func MustBytes16(data []byte) Bytes16
func MustBytes16FromHex(value string) Bytes16
func MustBytes32(data []byte) Bytes32
func MustBytes32FromHex(value string) Bytes32
func MustBytes32FromPhantasmaAddress(address cryptography.Address) Bytes32
func MustBytes32FromPhantasmaAddressText(text string) Bytes32
func MustBytes32FromPublicKey(publicKey []byte) Bytes32
func MustBytes64(data []byte) Bytes64
func MustBytes64FromHex(value string) Bytes64
func MustDecodeHex(value string) []byte
func MustIntXFromString(value string) IntX
func MustParseCreateTokenResult(resultHex string) uint64
func MustParseCreateTokenSeriesResult(resultHex string) uint32
func MustParseMintNonFungibleResult(carbonTokenID uint64, resultHex string) []Bytes32
func MustParseMintPhantasmaNonFungibleResult(resultHex string) []PhantasmaNFTMintResult
func MustSmallString(value string) SmallString
func MustTokenSchemasFromJSON(data string) TokenSchemas
func MustVMNamedDynamicVariable(name string, vmType VMType, value any) VMNamedDynamicVariable
func MustVMNamedVariableSchema(name string, vmType VMType) VMNamedVariableSchema
func NewBytes16(data []byte) (Bytes16, error)
func NewBytes32(data []byte) (Bytes32, error)
func NewBytes64(data []byte) (Bytes64, error)
func NewIntX(value *big.Int) IntX
func NewReader(data []byte) *Reader
func NewSmallString(value string) (SmallString, error)
func NewVMDynamicVariable(vmType VMType, value any) VMDynamicVariable
func NewVMNamedDynamicVariable(name string, vmType VMType, value any) (VMNamedDynamicVariable, error)
func NewVMNamedVariableSchema(name string, vmType VMType) (VMNamedVariableSchema, error)
func NewVMVariableSchema(vmType VMType, structDef *VMStructSchema) VMVariableSchema
func NewWriter() *Writer
func NowUnixMillis() int64
func ParseCreateTokenResult(resultHex string) (uint64, error)
func ParseCreateTokenSeriesResult(resultHex string) (uint32, error)
func ParseMintNonFungibleResult(carbonTokenID uint64, resultHex string) ([]Bytes32, error)
func ParseMintPhantasmaNonFungibleResult(resultHex string) ([]PhantasmaNFTMintResult, error)
func ParseTokenSchemasJSON(data string) (TokenSchemasJSON, error)
func PhantasmaCanonicalROMBytes(publicROMBytes int) (int, error)
func PlanAndSignWithKeys(msg TxMsg, keys []cryptography.KeyPair, config *GasConfig, options PlanAndSignOptions) ([]byte, error)
func PlanFees(msg TxMsg, config *GasConfig, options FeePlanOptions) (FeePlan, error)
func PrepareStandardTokenSchemas(sharedMetadata bool) TokenSchemas
func RequiredWitnesses(msg TxMsg) (addresses []Bytes32, fixed bool)
func Serialize(blob Blob) []byte
func SerializeTokenSchemas(schemas TokenSchemas) []byte
func SerializeTokenSchemasHex(schemas TokenSchemas) string
func SignAndSerializeTxMsg(msg TxMsg, keys ...cryptography.KeyPair) ([]byte, error)
func SignAndSerializeTxMsgHex(msg TxMsg, keys ...cryptography.KeyPair) (string, error)
func SignAndSerializeTxMsgWith(ctx context.Context, msg TxMsg, signers ...TxSigner) ([]byte, error)
func SignTxMsg(msg TxMsg, keys ...cryptography.KeyPair) (SignedTxMsg, error)
func SignTxMsgWith(ctx context.Context, msg TxMsg, signers ...TxSigner) (SignedTxMsg, error)
func StorageQuantaFor(rowBytes int) (int, error)
func SummarizeFeePlan(plan FeePlan) FeePlanSummary
func SummarizeFeePlanWithDecimals(plan FeePlan, gasDecimals, dataDecimals int) FeePlanSummary
func TokenSchemasFromJSON(data string) (TokenSchemas, error)
func UnpackNFTAddress(address Bytes32) (carbonTokenID uint64, instanceID uint64)
func UnpackNFTInstanceID(instanceID uint64) (seriesID uint32, mintNumber uint32)
func VMTypeFromString(value string) (VMType, error)
func VMTypeName(vmType VMType) (string, error)
func VerifyTokenSchemas(schemas TokenSchemas) error

github.com/phantasma-io/phantasma-sdk-go/pkg/cryptography

Source: pkg/cryptography

Declarations

const ECDSA
const Ed25519
const HashLength = 32
const HexPrefix = "0x"
const Interop AddressKind = 0x03
const Invalid AddressKind = 0x00
const Length = 34
const None SignatureKind = iota
const PrivateKeyLength = 32
const Ring
const System AddressKind = 0x02
const User AddressKind = 0x01
type Address struct {
type AddressKind byte
type Ed25519Signature struct {
type Hash struct {
type Hashable interface {
type KeyPair interface {
type PhantasmaKeys struct {
type Signature interface {
type SignatureKind uint

Fields

  • Address() Address
  • Bytes() []byte
  • Deserialize(*io.BinReader)
  • ExpandedPrivateKey() []byte
  • Hash() Hash
  • Kind() SignatureKind
  • PrivateKey() []byte
  • PublicKey() []byte
  • Serialize(*io.BinWriter)
  • Sign(msg []byte) (Signature, error)
  • Verify(message []byte, addresses []Address) bool

Methods

func (a *Address) Deserialize(reader *io.BinReader)
func (a *Address) GetPublicKey() ([]byte, error)
func (a *Address) Serialize(writer *io.BinWriter)
func (a Address) Bytes() []byte
func (a Address) BytesPrefixed() []byte
func (a Address) IsNull() bool
func (a Address) IsUser() bool
func (a Address) Kind() AddressKind
func (a Address) String() string
func (a Address) Text() string
func (h *Hash) Deserialize(reader *io.BinReader)
func (h *Hash) Serialize(writer *io.BinWriter)
func (h Hash) Bytes() []byte
func (h Hash) FromUnpaddedHex(s string) (Hash, error)
func (h Hash) GetDifficulty() int
func (h Hash) IsNull() bool
func (h Hash) Size() int
func (h Hash) String() string
func (k PhantasmaKeys) Address() Address
func (k PhantasmaKeys) ExpandedPrivateKey() []byte
func (k PhantasmaKeys) PrivateKey() []byte
func (k PhantasmaKeys) PublicKey() []byte
func (k PhantasmaKeys) Sign(msg []byte) (Signature, error)
func (k PhantasmaKeys) String() string
func (k PhantasmaKeys) WIF() string
func (sig *Ed25519Signature) Deserialize(reader *io.BinReader)
func (sig Ed25519Signature) Bytes() []byte
func (sig Ed25519Signature) Kind() SignatureKind
func (sig Ed25519Signature) Serialize(writer *io.BinWriter)
func (sig Ed25519Signature) Verify(message []byte, addresses []Address) bool
func FromKey(keyPair KeyPair) (Address, error)
func FromString(s string) (Address, error)
func FromWIF(wif string) (PhantasmaKeys, error)
func GeneratePhantasmaKeys() (PhantasmaKeys, error)
func HashFromBytes(data []byte) (Hash, error)
func HashFromString(s string) Hash
func IsValidAddress(text string) bool
func MustAddressFromString(s string) Address
func NewAddress(pubKey []byte) (Address, error)
func NewEd25519Signature(bytes []byte) (*Ed25519Signature, error)
func NewPhantasmaKeys(seed []byte) (PhantasmaKeys, error)
func NullAddress() Address
func ParseHash(s string) (Hash, error)

github.com/phantasma-io/phantasma-sdk-go/pkg/cryptography/ecdsa

Source: pkg/cryptography/ecdsa

Declarations

const CompressedPublicKeySize = 33
const PrefixedUncompressedPublicKeySize = 65
const PrivateKeySize = 32
const RecoverableSignatureSize = 65
const Secp256k1 Curve = 1
const Secp256r1 Curve = 0
const SignatureSize = 64
const UncompressedPublicKeySize = 64
type Curve uint

Methods

func CompressPublicKey(uncompressedPublicKey []byte) ([]byte, error)
func PrivateKeyUnmarshal(privKey []byte, curve elliptic.Curve) (*ecdsa.PrivateKey, error)
func PublicKeyUnmarshal(pubKey []byte, curve elliptic.Curve) (*ecdsa.PublicKey, error)
func RSToSignatureWithoutRecoveryID(r, s *big.Int) []byte
func Sign(message, prikey []byte, curve Curve) ([]byte, error)
func SignatureDropRecoveryID(signature []byte) []byte
func SignatureToRS(signature []byte) (*big.Int, *big.Int, error)
func UncompressedPublicKeyTo65Bytes(pubkey []byte) ([]byte, error)
func Verify(message, signature, pubkey []byte, curve Curve) (bool, error)

github.com/phantasma-io/phantasma-sdk-go/pkg/cryptography/neoLegacy

Source: pkg/cryptography/neoLegacy

Declarations

var Prefix = byte(0x17)

Methods

func Address(pubKey []byte) string

github.com/phantasma-io/phantasma-sdk-go/pkg/cryptography/proofOfAddress

Source: pkg/cryptography/proofOfAddress

Declarations

type ProofOfAddressesVerifier struct {

Fields

  • EthAddress string
  • EthPublicKey string
  • EthPublicKeyBytes []byte
  • EthSignature string
  • EthSignatureBytes []byte
  • Message string
  • Neo2Address string
  • Neo2PublicKey string
  • Neo2PublicKeyBytes []byte
  • Neo2Signature string
  • Neo2SignatureBytes []byte
  • PhaAddress string
  • PhaPublicKeyBytes []byte
  • PhaSignature string
  • PhaSignatureBytes []byte
  • SignedMessage string
  • SignedMessageBytes []byte

Methods

func (v *ProofOfAddressesVerifier) VerifyMessage() (bool, string, error)
func NewProofOfAddressesVerifier(message string) (*ProofOfAddressesVerifier, error)

github.com/phantasma-io/phantasma-sdk-go/pkg/domain

Source: pkg/domain

Declarations

const SDKVersion = "0.18.1"
var SDKPayload []byte = []byte("GO-SDK-v" + SDKVersion)

github.com/phantasma-io/phantasma-sdk-go/pkg/domain/contract

Source: pkg/domain/contract

Declarations

const Duplicated TokenSeriesMode = 2
const Unique TokenSeriesMode = 1
type ContractEvent struct {
type ContractInterface struct {
type ContractInterface_S struct {
type ContractMethod struct {
type ContractMethod_S struct {
type ContractParameter struct {
type TokenContent struct {
type TokenContent_S struct {
type TokenInfusion struct {
type TokenInfusion_S struct {
type TokenSeries struct {
type TokenSeriesMode uint
type TokenSeries_S struct {

Fields

  • ABI ContractInterface
  • Creator string
  • CurrentChain string
  • CurrentOwner string
  • Description []byte
  • Events []ContractEvent
  • Infusion []TokenInfusion
  • Infusion []TokenInfusion_S
  • MaxSupply *big.Int
  • MaxSupply string
  • Methods *orderedmap.OrderedMap[string, ContractMethod]
  • Methods *orderedmap.OrderedMap[string, ContractMethod_S]
  • MintCount *big.Int
  • MintCount string
  • MintID *big.Int
  • MintID string
  • Mode TokenSeriesMode
  • Name string
  • Name string
  • Name string
  • Offset int32
  • Parameters []ContractParameter
  • RAM []byte
  • ROM []byte
  • ROM []byte
  • ReturnType vm.VMType
  • ReturnType string
  • ReturnType vm.VMType
  • Script []byte
  • SeriesID *big.Int
  • SeriesID string
  • SeriesID *big.Int
  • SeriesID string
  • Symbol string
  • Symbol string
  • Symbol string
  • Timestamp *types.Timestamp
  • TokenID *big.Int
  • TokenID string
  • Type vm.VMType
  • Value byte
  • Value *big.Int
  • Value string

Methods

func (c *TokenContent) Deserialize(reader *io.BinReader)
func (c *TokenContent) Serialize(writer *io.BinWriter)
func (c *TokenContent_S) Deserialize(reader *io.BinReader)
func (c *TokenContent_S) Serialize(writer *io.BinWriter)
func (e *ContractEvent) Deserialize(reader *io.BinReader)
func (e *ContractEvent) Serialize(writer *io.BinWriter)
func (i *ContractInterface) Deserialize(reader *io.BinReader)
func (i *ContractInterface) Serialize(writer *io.BinWriter)
func (i *ContractInterface_S) Deserialize(reader *io.BinReader)
func (i *ContractInterface_S) Serialize(writer *io.BinWriter)
func (i *TokenInfusion) Deserialize(reader *io.BinReader)
func (i *TokenInfusion) Serialize(writer *io.BinWriter)
func (i *TokenInfusion_S) Deserialize(reader *io.BinReader)
func (i *TokenInfusion_S) Serialize(writer *io.BinWriter)
func (m *ContractMethod) Deserialize(reader *io.BinReader)
func (m *ContractMethod) Serialize(writer *io.BinWriter)
func (m *ContractMethod_S) Deserialize(reader *io.BinReader)
func (m *ContractMethod_S) Serialize(writer *io.BinWriter)
func (s *TokenSeries) Deserialize(reader *io.BinReader)
func (s *TokenSeries) Serialize(writer *io.BinWriter)
func (s *TokenSeries_S) Deserialize(reader *io.BinReader)
func (s *TokenSeries_S) Serialize(writer *io.BinWriter)

github.com/phantasma-io/phantasma-sdk-go/pkg/domain/event

Source: pkg/domain/event

Declarations

const AddressLink EventKind = 10
const AddressMigration EventKind = 46
const AddressRegister EventKind = 9
const AddressUnlink EventKind = 11
const AddressUnregister EventKind = 17
const ChainCreate EventKind = 1
const ChainSwap EventKind = 43
const ChannelCreate EventKind = 36
const ChannelRefill EventKind = 37
const ChannelSettle EventKind = 38
const Classic TypeAuction = 1
const ContractDeploy EventKind = 45
const ContractRegister EventKind = 44
const ContractUpgrade EventKind = 47
const Crowdsale EventKind = 58
const CrownRewards EventKind = 56
const Custom EventKind = 64
const DomainCreate EventKind = 52
const DomainDelete EventKind = 53
const Dutch TypeAuction = 3
const FeedCreate EventKind = 22
const FeedUpdate EventKind = 23
const FileCreate EventKind = 24
const FileDelete EventKind = 25
const Fixed TypeAuction = 0
const GasEscrow EventKind = 15
const GasPayment EventKind = 16
const Inflation EventKind = 49
const Infusion EventKind = 57
const LeaderboardCreate EventKind = 39
const LeaderboardInsert EventKind = 40
const LeaderboardReset EventKind = 41
const Log EventKind = 48
const OrderBid EventKind = 59
const OrderCancelled EventKind = 19
const OrderClosed EventKind = 21
const OrderCreated EventKind = 18
const OrderFilled EventKind = 20
const OrganizationAdd EventKind = 13
const OrganizationCreate EventKind = 12
const OrganizationRemove EventKind = 14
const OwnerAdded EventKind = 50
const OwnerRemoved EventKind = 51
const PackedNFT EventKind = 30
const PlatformCreate EventKind = 42
const PollClosed EventKind = 34
const PollCreated EventKind = 33
const PollVote EventKind = 35
const Reserve TypeAuction = 2
const TaskStart EventKind = 54
const TaskStop EventKind = 55
const TokenBurn EventKind = 6
const TokenClaim EventKind = 8
const TokenCreate EventKind = 2
const TokenMint EventKind = 5
const TokenReceive EventKind = 4
const TokenSend EventKind = 3
const TokenStake EventKind = 7
const Unknown EventKind = 0
const ValidatorElect EventKind = 27
const ValidatorPropose EventKind = 26
const ValidatorRemove EventKind = 28
const ValidatorSwitch EventKind = 29
const ValueCreate EventKind = 31
const ValueUpdate EventKind = 32
type ChainValueEventData struct {
type Event struct {
type EventKind uint
type GasEventData struct {
type InfusionEventData struct {
type MarketEventData struct {
type OrganizationEventData struct {
type TokenEventData struct {
type TransactionSettleEventData struct {
type TypeAuction uint

Fields

  • Address crypto.Address
  • Address crypto.Address
  • Amount big.Int
  • BaseSymbol string
  • BaseSymbol string
  • Chain string
  • ChainName string
  • ChainName string
  • Contract string
  • Data []byte
  • EndPrice *big.Int
  • Hash crypto.Hash
  • ID *big.Int
  • InfusedSymbol string
  • InfusedValue big.Int
  • Kind EventKind
  • MemberAddress crypto.Address
  • Name string
  • Organization string
  • Platform string
  • Price *big.Int
  • Price big.Int
  • QuoteSymbol string
  • Symbol string
  • TokenID big.Int
  • Type TypeAuction
  • Value *big.Int
  • Value big.Int

Methods

func (d *MarketEventData) Deserialize(reader *io.BinReader)
func (d *MarketEventData) Serialize(writer *io.BinWriter)
func (e *Event) Deserialize(reader *io.BinReader)
func (e *Event) Serialize(writer *io.BinWriter)
func (e Event) String() string
func (k *EventKind) SetString(eventKind string)
func (k EventKind) IsMarketEvent() bool
func (k EventKind) IsTokenEvent() bool
func (k EventKind) String() string
func (te *TokenEventData) Deserialize(reader *io.BinReader)
func (te *TokenEventData) Serialize(writer *io.BinWriter)

github.com/phantasma-io/phantasma-sdk-go/pkg/domain/stake

Source: pkg/domain/stake

Declarations

type EnergyClaim struct {
type EnergyClaim_S struct {
type EnergyStake struct {
type EnergyStake_S struct {

Fields

  • ClaimDate *types.Timestamp
  • IsNew bool
  • StakeAmount *big.Int
  • StakeAmount string
  • StakeTime *types.Timestamp

Methods

func (ec *EnergyClaim) Deserialize(reader *io.BinReader)
func (ec *EnergyClaim) Serialize(writer *io.BinWriter)
func (ec *EnergyClaim_S) Deserialize(reader *io.BinReader)
func (ec *EnergyClaim_S) Serialize(writer *io.BinWriter)
func (es *EnergyStake) Deserialize(reader *io.BinReader)
func (es *EnergyStake) Serialize(writer *io.BinWriter)
func (es *EnergyStake_S) Deserialize(reader *io.BinReader)
func (es *EnergyStake_S) Serialize(writer *io.BinWriter)

github.com/phantasma-io/phantasma-sdk-go/pkg/domain/token

Source: pkg/domain/token

Declarations

const Burnable TokenFlags = 1 << 8
const Divisible TokenFlags = 1 << 3
const Fiat TokenFlags = 1 << 6
const Finite TokenFlags = 1 << 2
const Fuel TokenFlags = 1 << 4
const Fungible TokenFlags = 1 << 1
const Mintable TokenFlags = 1 << 9
const None TokenFlags = 0
const Stakable TokenFlags = 1 << 5
const Swappable TokenFlags = 1 << 7
const Transferable TokenFlags = 1 << 0
type TokenFlags uint
type TokenInfo struct {
type TokenInfo_S struct {

Fields

  • ABI contract.ContractInterface
  • ABI contract.ContractInterface_S
  • Decimals int32
  • Flags TokenFlags
  • Flags []string
  • MaxSupply *big.Int
  • MaxSupply string
  • Name string
  • Owner cryptography.Address
  • Script []byte
  • Symbol string

Methods

func (tf TokenFlags) FromSlice(flagsSlice []string) TokenFlags
func (tf TokenFlags) ToSlice() []string
func (ti *TokenInfo) Deserialize(reader *io.BinReader)
func (ti *TokenInfo) Serialize(writer *io.BinWriter)
func (ti *TokenInfo_S) Deserialize(reader *io.BinReader)
func (ti *TokenInfo_S) Serialize(writer *io.BinWriter)

github.com/phantasma-io/phantasma-sdk-go/pkg/domain/types

Source: pkg/domain/types

Declarations

type Timestamp struct {

Fields

  • Value uint32

Methods

func NewTimestamp(value uint32) *Timestamp

github.com/phantasma-io/phantasma-sdk-go/pkg/encoding/base58

Source: pkg/encoding/base58

Methods

func CheckDecode(s string) (b []byte, err error)
func CheckEncode(b []byte) string
func Decode(s string) (b []byte, err error)
func Encode(b []byte) string

github.com/phantasma-io/phantasma-sdk-go/pkg/io

Source: pkg/io

Declarations

const MaxArraySize = 0x1000000
type BinReader struct {
type BinWriter struct {
type BufBinWriter struct {
type Serializer interface {

Fields

  • Count int
  • Deserialize(*BinReader)
  • Err error
  • Err error
  • Serialize(*BinWriter)

Methods

func (bw *BufBinWriter) Bytes() []byte
func (bw *BufBinWriter) Len() int
func (bw *BufBinWriter) Reset()
func (cw *counterWriter) Write(p []byte) (int, error)
func (r *BinReader) ReadArray(t interface{}, maxSize ...int)
func (r *BinReader) ReadB() byte
func (r *BinReader) ReadBigInteger() *big.Int
func (r *BinReader) ReadBigIntegerToString() string
func (r *BinReader) ReadBool() bool
func (r *BinReader) ReadBytes(buf []byte)
func (r *BinReader) ReadString() string
func (r *BinReader) ReadTimestamp() *types.Timestamp
func (r *BinReader) ReadU16BE() uint16
func (r *BinReader) ReadU16LE() uint16
func (r *BinReader) ReadU32LE() uint32
func (r *BinReader) ReadU64LE() uint64
func (r *BinReader) ReadVarBytes(maxSize ...int) []byte
func (r *BinReader) ReadVarUint() uint64
func (w *BinWriter) WriteArray(arr interface{})
func (w *BinWriter) WriteB(u8 byte)
func (w *BinWriter) WriteBigInteger(n *big.Int)
func (w *BinWriter) WriteBigIntegerFromString(n string)
func (w *BinWriter) WriteBool(b bool)
func (w *BinWriter) WriteBytes(b []byte)
func (w *BinWriter) WriteOp(value byte)
func (w *BinWriter) WriteString(s string)
func (w *BinWriter) WriteTimestamp(t *types.Timestamp)
func (w *BinWriter) WriteU16BE(u16 uint16)
func (w *BinWriter) WriteU16LE(u16 uint16)
func (w *BinWriter) WriteU32LE(u32 uint32)
func (w *BinWriter) WriteU64LE(u64 uint64)
func (w *BinWriter) WriteVarBytes(b []byte)
func (w *BinWriter) WriteVarUint(val uint64)
func GetVarSize(value interface{}) int
func MakeDirForFile(filePath string, creator string) error
func NewBinReaderFromBuf(b []byte) *BinReader
func NewBinReaderFromIO(ior io.Reader) *BinReader
func NewBinWriterFromIO(iow io.Writer) *BinWriter
func NewBufBinWriter() *BufBinWriter

github.com/phantasma-io/phantasma-sdk-go/pkg/jsonrpc

Source: pkg/jsonrpc

Declarations

const DefaultMaxResponseBytes = 16 * 1024 * 1024
type HTTPError struct {
type RPCClient interface {
type RPCClientOpts struct {
type RPCError struct {
type RPCRequest struct {
type RPCRequests []*RPCRequest
type RPCResponse struct {
type RPCResponses []*RPCResponse

Fields

  • AllowUnknownFields bool
  • Code int json:“code”``
  • Code int
  • CustomHeaders map[string]string
  • Data interface{} json:“data,omitempty”``
  • DefaultRequestID int
  • Error *RPCError json:“error,omitempty”``
  • HTTPClient *http.Client
  • ID int json:“id”``
  • ID string json:“id”``
  • JSONRPC string json:“jsonrpc”``
  • MaxResponseBytes int64
  • Message string json:“message”``
  • Method string json:“method”``
  • Params interface{} json:“params,omitempty”``
  • Result interface{} json:“result,omitempty”``

Methods

func (RPCResponse *RPCResponse) GetBool() (bool, error)
func (RPCResponse *RPCResponse) GetFloat() (float64, error)
func (RPCResponse *RPCResponse) GetInt() (int64, error)
func (RPCResponse *RPCResponse) GetObject(toType interface{}) error
func (RPCResponse *RPCResponse) GetString() (string, error)
func (client *rpcClient) Call(ctx context.Context, method string, params ...interface{}) (*RPCResponse, error)
func (client *rpcClient) CallBatch(ctx context.Context, requests RPCRequests) (RPCResponses, error)
func (client *rpcClient) CallBatchRaw(ctx context.Context, requests RPCRequests) (RPCResponses, error)
func (client *rpcClient) CallFor(ctx context.Context, out interface{}, method string, params ...interface{}) error
func (client *rpcClient) CallRaw(ctx context.Context, request *RPCRequest) (*RPCResponse, error)
func (e *HTTPError) Error() string
func (e *RPCError) Error() string
func (id *rpcResponseID) UnmarshalJSON(data []byte) error
func (res RPCResponses) AsMap() map[int]*RPCResponse
func (res RPCResponses) GetByID(id int) *RPCResponse
func (res RPCResponses) HasError() bool
func (result *rpcResponseResult) UnmarshalJSON(data []byte) error
func NewClient(endpoint string) RPCClient
func NewClientWithOpts(endpoint string, opts *RPCClientOpts) RPCClient
func NewRequest(method string, params ...interface{}) *RPCRequest
func NewRequestWithID(id int, method string, params ...interface{}) *RPCRequest
func Params(params ...interface{}) interface

github.com/phantasma-io/phantasma-sdk-go/pkg/rpc

Source: pkg/rpc

Declarations

const AddressTypeCarbon
const AddressTypePhantasma AddressType = iota
const ApiKeyHeader = "X-Api-Key"
const PreflightFree
const PreflightNotApplicable PreflightVerdict = iota
const PreflightTaken
const PreflightUnknown
type AddressType int
type ChainFeeParams struct {
type FeePlanner struct {
type FeePlannerOptions struct {
type GasConfigSource interface {
type InfusionSource interface {
type PhantasmaRPC struct {
type PlanRequestOptions struct {
type PreflightError struct {
type PreflightResult struct {
type PreflightSource interface {
type PreflightVerdict int
type SendTransactionOptions struct {

Fields

  • BlockRateTarget time.Duration
  • ConfigTTL time.Duration
  • ControlTokenID(ctx context.Context) (uint64, error)
  • ExpiryWindow time.Duration
  • GasModelVersion uint32
  • GetGasConfig(ctx context.Context) (resp.GasConfigResult, error)
  • GetTokenWithID(ctx context.Context, symbol string, extended bool, carbonTokenID uint64) (resp.TokenResult, error)
  • InfusedAssets(ctx context.Context, tokenID, instanceID uint64) ([]carbon.InfusedAsset, error)
  • Message string
  • PlanRequestOptions
  • Reason string
  • RefreshConfig bool
  • SkipPreflight bool
  • Subject string
  • Verdict PreflightVerdict

Methods

func (addressType AddressType) MarshalJSON() ([]byte, error)
func (addressType AddressType) String() string
func (e *PreflightError) Error() string
func (p *FeePlanner) ChainParams(ctx context.Context, refresh bool) (ChainFeeParams, error)
func (p *FeePlanner) Config(ctx context.Context, refresh bool) (carbon.GasConfig, error)
func (p *FeePlanner) Invalidate()
func (p *FeePlanner) Plan(ctx context.Context, msg carbon.TxMsg, options PlanRequestOptions) (carbon.FeePlan, error)
func (p *FeePlanner) PlanWith(config *carbon.GasConfig, msg carbon.TxMsg, options carbon.FeePlanOptions) (carbon.FeePlan, error)
func (rpc PhantasmaRPC) Call(ctx context.Context, method string, params ...interface{}) (*jsonrpc.RPCResponse, error)
func (rpc PhantasmaRPC) ControlTokenID(ctx context.Context) (uint64, error)
func (rpc PhantasmaRPC) EstimateTransaction(ctx context.Context, txData string) (resp.EstimateTransactionResult, error)
func (rpc PhantasmaRPC) Fees() *FeePlanner
func (rpc PhantasmaRPC) GetAccount(ctx context.Context, address string) (resp.AccountResult, error)
func (rpc PhantasmaRPC) GetAccountFungibleTokens(ctx context.Context, account string, tokenSymbol string, carbonTokenID uint64, pageSize int, cursor string, checkAddressReservedByte bool) (resp.CursorPaginatedResult[[]resp.BalanceResult], error)
func (rpc PhantasmaRPC) GetAccountFungibleTokensWithAddressType(ctx context.Context, account string, tokenSymbol string, carbonTokenID uint64, pageSize int, cursor string, checkAddressReservedByte bool, addressType AddressType) (resp.CursorPaginatedResult[[]resp.BalanceResult], error)
func (rpc PhantasmaRPC) GetAccountInfo(ctx context.Context, address string) (resp.AccountInfoResult, error)
func (rpc PhantasmaRPC) GetAccountInfoWithAddressType(ctx context.Context, address string, checkAddressReservedByte bool, addressType AddressType) (resp.AccountInfoResult, error)
func (rpc PhantasmaRPC) GetAccountInfos(ctx context.Context, addresses []string) ([]resp.AccountInfoResult, error)
func (rpc PhantasmaRPC) GetAccountInfosWithAddressType(ctx context.Context, addresses []string, checkAddressReservedByte bool, addressType AddressType) ([]resp.AccountInfoResult, error)
func (rpc PhantasmaRPC) GetAccountNFTs(ctx context.Context, account string, tokenSymbol string, carbonTokenID uint64, carbonSeriesID uint32, pageSize int, cursor string, extended bool, checkAddressReservedByte bool) (resp.CursorPaginatedResult[[]resp.TokenDataResult], error)
func (rpc PhantasmaRPC) GetAccountNFTsWithAddressType(ctx context.Context, account string, tokenSymbol string, carbonTokenID uint64, carbonSeriesID uint32, pageSize int, cursor string, extended bool, checkAddressReservedByte bool, addressType AddressType) (resp.CursorPaginatedResult[[]resp.TokenDataResult], error)
func (rpc PhantasmaRPC) GetAccountOwnedTokenSeries(ctx context.Context, account string, tokenSymbol string, carbonTokenID uint64, pageSize int, cursor string, checkAddressReservedByte bool) (resp.CursorPaginatedResult[[]resp.TokenSeriesResult], error)
func (rpc PhantasmaRPC) GetAccountOwnedTokenSeriesWithAddressType(ctx context.Context, account string, tokenSymbol string, carbonTokenID uint64, pageSize int, cursor string, checkAddressReservedByte bool, addressType AddressType) (resp.CursorPaginatedResult[[]resp.TokenSeriesResult], error)
func (rpc PhantasmaRPC) GetAccountOwnedTokens(ctx context.Context, account string, tokenSymbol string, carbonTokenID uint64, pageSize int, cursor string, checkAddressReservedByte bool) (resp.CursorPaginatedResult[[]resp.TokenResult], error)
func (rpc PhantasmaRPC) GetAccountOwnedTokensWithAddressType(ctx context.Context, account string, tokenSymbol string, carbonTokenID uint64, pageSize int, cursor string, checkAddressReservedByte bool, addressType AddressType) (resp.CursorPaginatedResult[[]resp.TokenResult], error)
func (rpc PhantasmaRPC) GetAccountWithAddressType(ctx context.Context, address string, extended bool, checkAddressReservedByte bool, addressType AddressType) (resp.AccountResult, error)
func (rpc PhantasmaRPC) GetAccounts(ctx context.Context, addresses ...string) ([]resp.AccountResult, error)
func (rpc PhantasmaRPC) GetAccountsText(ctx context.Context, addresses string) ([]resp.AccountResult, error)
func (rpc PhantasmaRPC) GetAccountsWithAddressType(ctx context.Context, addresses []string, extended bool, checkAddressReservedByte bool, addressType AddressType) ([]resp.AccountResult, error)
func (rpc PhantasmaRPC) GetAddressTransactionCount(ctx context.Context, address string, chainName string) (int, error)
func (rpc PhantasmaRPC) GetAddressTransactions(ctx context.Context, address string, page int, pageSize int) (resp.PaginatedResult[resp.AddressTransactionsResult], error)
func (rpc PhantasmaRPC) GetArchive(ctx context.Context, hash string) (resp.ArchiveResult, error)
func (rpc PhantasmaRPC) GetAuction(ctx context.Context, chainAddressOrName string, symbol string, tokenID string) (resp.AuctionResult, error)
func (rpc PhantasmaRPC) GetAuctions(ctx context.Context, chainAddressOrName string, symbol string, page int, pageSize int) (resp.PaginatedResult[[]resp.AuctionResult], error)
func (rpc PhantasmaRPC) GetAuctionsCount(ctx context.Context, chainAddressOrName string, symbol string) (int, error)
func (rpc PhantasmaRPC) GetBlockByHash(ctx context.Context, blockHash string) (resp.BlockResult, error)
func (rpc PhantasmaRPC) GetBlockByHeight(ctx context.Context, chain string, height string) (resp.BlockResult, error)
func (rpc PhantasmaRPC) GetBlockHeight(ctx context.Context, chainName string) (*big.Int, error)
func (rpc PhantasmaRPC) GetBlockTransactionCountByHash(ctx context.Context, blockHash string) (int, error)
func (rpc PhantasmaRPC) GetBlockTransactionCountByHashOnChain(ctx context.Context, chainAddressOrName string, blockHash string) (int, error)
func (rpc PhantasmaRPC) GetChain(ctx context.Context, name string, extended bool) (resp.ChainResult, error)
func (rpc PhantasmaRPC) GetChains(ctx context.Context, extended bool) ([]resp.ChainResult, error)
func (rpc PhantasmaRPC) GetContract(ctx context.Context, name, chainName string) (resp.ContractResult, error)
func (rpc PhantasmaRPC) GetContractByAddress(ctx context.Context, chainAddressOrName string, contractAddress string) (resp.ContractResult, error)
func (rpc PhantasmaRPC) GetContractByName(ctx context.Context, chainAddressOrName string, contractName string) (resp.ContractResult, error)
func (rpc PhantasmaRPC) GetContracts(ctx context.Context, chainAddressOrName string, extended bool) ([]resp.ContractResult, error)
func (rpc PhantasmaRPC) GetGasConfig(ctx context.Context) (resp.GasConfigResult, error)
func (rpc PhantasmaRPC) GetLatestBlock(ctx context.Context, chainAddressOrName string) (resp.BlockResult, error)
func (rpc PhantasmaRPC) GetLeaderboard(ctx context.Context, name string) (resp.LeaderboardResult, error)
func (rpc PhantasmaRPC) GetNFT(ctx context.Context, symbol string, tokenID string, extended bool) (resp.TokenDataResult, error)
func (rpc PhantasmaRPC) GetNFTs(ctx context.Context, symbol string, tokenIDs []string, extended bool) ([]resp.TokenDataResult, error)
func (rpc PhantasmaRPC) GetNFTsText(ctx context.Context, symbol string, tokenIDs string, extended bool) ([]resp.TokenDataResult, error)
func (rpc PhantasmaRPC) GetNexus(ctx context.Context, extended bool) (resp.NexusResult, error)
func (rpc PhantasmaRPC) GetOrganization(ctx context.Context, name string, includeMemberCount bool) (resp.OrganizationResult, error)
func (rpc PhantasmaRPC) GetOrganizationMember(ctx context.Context, name string, address string, checkAddressReservedByte bool, addressType AddressType) (resp.OrganizationMemberResult, error)
func (rpc PhantasmaRPC) GetOrganizationMembers(ctx context.Context, name string, pageSize int, cursor string, includeMemberTime bool) (resp.CursorPaginatedResult[[]resp.OrganizationMemberResult], error)
func (rpc PhantasmaRPC) GetOrganizations(ctx context.Context, pageSize int, cursor string, includeMemberCount bool) (resp.CursorPaginatedResult[[]resp.OrganizationResult], error)
func (rpc PhantasmaRPC) GetPhantasmaVMConfig(ctx context.Context, chainAddressOrName string) (resp.PhantasmaVMConfigResult, error)
func (rpc PhantasmaRPC) GetPlatforms(ctx context.Context) ([]resp.PlatformResult, error)
func (rpc PhantasmaRPC) GetToken(ctx context.Context, symbol string, extended bool) (resp.TokenResult, error)
func (rpc PhantasmaRPC) GetTokenBalance(ctx context.Context, address string, tokenSymbol string, chainAddressOrName string) (resp.BalanceResult, error)
func (rpc PhantasmaRPC) GetTokenBalanceChecked(ctx context.Context, address string, tokenSymbol string, chainAddressOrName string, checkAddressReservedByte bool) (resp.BalanceResult, error)
func (rpc PhantasmaRPC) GetTokenBalanceWithAddressType(ctx context.Context, address string, tokenSymbol string, chainAddressOrName string, checkAddressReservedByte bool, addressType AddressType) (resp.BalanceResult, error)
func (rpc PhantasmaRPC) GetTokenData(ctx context.Context, symbol string, tokenID string) (resp.TokenDataResult, error)
func (rpc PhantasmaRPC) GetTokenNFTs(ctx context.Context, carbonTokenID uint64, carbonSeriesID uint32, pageSize int, cursor string, extended bool) (resp.CursorPaginatedResult[[]resp.TokenDataResult], error)
func (rpc PhantasmaRPC) GetTokenNFTsWithSeriesID(ctx context.Context, carbonTokenID uint64, carbonSeriesID uint32, seriesID string, pageSize int, cursor string, extended bool) (resp.CursorPaginatedResult[[]resp.TokenDataResult], error)
func (rpc PhantasmaRPC) GetTokenSeries(ctx context.Context, symbol string, carbonTokenID uint64, pageSize int, cursor string) (resp.CursorPaginatedResult[[]resp.TokenSeriesResult], error)
func (rpc PhantasmaRPC) GetTokenSeriesByID(ctx context.Context, symbol string, carbonTokenID uint64, seriesID string, carbonSeriesID uint32) (resp.TokenSeriesResult, error)
func (rpc PhantasmaRPC) GetTokenWithID(ctx context.Context, symbol string, extended bool, carbonTokenID uint64) (resp.TokenResult, error)
func (rpc PhantasmaRPC) GetTokens(ctx context.Context, extended bool) ([]resp.TokenResult, error)
func (rpc PhantasmaRPC) GetTokensAsMap(ctx context.Context, extended bool) (map[string]resp.TokenResult, error)
func (rpc PhantasmaRPC) GetTokensByOwner(ctx context.Context, extended bool, ownerAddress string) ([]resp.TokenResult, error)
func (rpc PhantasmaRPC) GetTokensByOwnerWithAddressType(ctx context.Context, extended bool, ownerAddress string, addressType AddressType) ([]resp.TokenResult, error)
func (rpc PhantasmaRPC) GetTransaction(ctx context.Context, txHash string) (resp.TransactionResult, error)
func (rpc PhantasmaRPC) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash string, index int) (resp.TransactionResult, error)
func (rpc PhantasmaRPC) GetTransactionByBlockHashAndIndexOnChain(ctx context.Context, chainAddressOrName string, blockHash string, index int) (resp.TransactionResult, error)
func (rpc PhantasmaRPC) GetVersion(ctx context.Context) (resp.BuildInfoResult, error)
func (rpc PhantasmaRPC) InfusedAssets(ctx context.Context, tokenID, instanceID uint64) ([]carbon.InfusedAsset, error)
func (rpc PhantasmaRPC) InvokeRawScript(ctx context.Context, chain, script string) (resp.ScriptResult, error)
func (rpc PhantasmaRPC) LookupName(ctx context.Context, name string) (string, error)
func (rpc PhantasmaRPC) ReadArchive(ctx context.Context, hash string, blockIndex int) (string, error)
func (rpc PhantasmaRPC) SendCarbonTransaction(ctx context.Context, txData string) (string, error)
func (rpc PhantasmaRPC) SendRawTransaction(ctx context.Context, txData string) (string, error)
func (rpc PhantasmaRPC) SendTransaction(ctx context.Context, msg carbon.TxMsg, signers []carbon.TxSigner, options SendTransactionOptions) (string, error)
func (rpc PhantasmaRPC) SignAndSendBuiltTransaction(ctx context.Context, tx chain.Transaction, keys cryptography.KeyPair) (string, error)
func (rpc PhantasmaRPC) SignAndSendTransaction(ctx context.Context, keys cryptography.KeyPair, nexus string, script []byte, chainName string, payload []byte) (string, error)
func (rpc PhantasmaRPC) SignAndSendTransactionTextPayload(ctx context.Context, keys cryptography.KeyPair, nexus string, script []byte, chainName string, payload string) (string, error)
func (rpc PhantasmaRPC) SignAndSendTransactionWithExpiration(ctx context.Context, keys cryptography.KeyPair, nexus string, script []byte, chainName string, payload []byte, expiration uint32) (string, error)
func (rpc PhantasmaRPC) WriteArchive(ctx context.Context, hash string, blockIndex int, blockContent []byte) (bool, error)
func (rpc PhantasmaRPC) WriteArchiveBase64(ctx context.Context, hash string, blockIndex int, blockContent string) (bool, error)
func (v PreflightVerdict) String() string
func NewFeePlanner(source GasConfigSource, options FeePlannerOptions) *FeePlanner
func NewRPC(endpoint string) PhantasmaRPC
func NewRPCMainnet() PhantasmaRPC
func NewRPCSetMainnet() []PhantasmaRPC
func NewRPCTestnet() PhantasmaRPC
func NewRPCWithApiKey(endpoint, apiKey string) PhantasmaRPC
func PreflightTransaction(ctx context.Context, source PreflightSource, msg carbon.TxMsg) (PreflightResult, error)

github.com/phantasma-io/phantasma-sdk-go/pkg/rpc/response

Source: pkg/rpc/response

Declarations

const VMValueFields
const VMValueItems
const VMValueText VMValueKind = iota
type ABIEventResult struct {
type ABIMethodResult struct {
type ABIParameterResult struct {
type AccountInfoResult struct {
type AccountResult struct {
type AddressArguments struct {
type AddressTransactionsResult struct {
type ArchiveResult struct {
type AuctionResult struct {
type BalanceArguments struct {
type BalanceResult struct {
type BlockResult struct {
type BuildInfoResult struct {
type BurnFungibleArguments struct {
type BurnNonFungibleArguments struct {
type ChainConfigArguments struct {
type ChainResult struct {
type ChannelResult struct {
type ConsensusNode struct {
type ContractResult struct {
type ContractStorageRow struct {
type ContractStorageTable struct {
type CreateMintedTokenSeriesArguments struct {
type CreateTokenArguments struct {
type CrowdsaleResult struct {
type DappResult struct {
type DeployContractArguments struct {
type ErrorResult struct {
type EstimateTransactionResult struct {
type EventData interface {
type EventExResult struct {
type EventResult struct {
type ExecuteScriptArguments struct {
type GasConfigArguments struct {
type GasConfigDataResult struct {
type GasConfigResult struct {
type GovernanceResult struct {
type ImportContractsArguments struct {
type ImportedContract struct {
type InteropResult struct {
type LeaderboardResult struct {
type LeaderboardRowResult struct {
type MarketOrderData struct {
type MetadataArguments struct {
type MintFungibleArguments struct {
type MintNonFungibleArguments struct {
type MintPhantasmaNonFungibleArguments struct {
type NFTMint struct {
type NameArguments struct {
type NestedResolutionArguments struct {
type NexusResult struct {
type NodeConfigArguments struct {
type NonFungibleInfoArguments struct {
type NonFungibleInfoByRomIDArguments struct {
type OracleResult struct {
type OrganizationMemberResult struct {
type OrganizationResult struct {
type PeerResult struct {
type PhantasmaNFTMint struct {
type PhantasmaVMConfigArguments struct {
type PhantasmaVMConfigResult struct {
type PlatformResult struct {
type RawArguments struct {
type ReceiptResult struct {
type RegisterNameArguments struct {
type RegisterTokenContractArguments struct {
type RepairSeriesArguments struct {
type RepairTokenArguments struct {
type ScriptResult struct {
type SendRawTxResult struct {
type SeriesInfoByMetaIDArguments struct {
type SeriesMintCountRepair struct {
type SeriesSupplement struct {
type SignatureResult struct {
type SingleResult struct {
type SpecialResolutionArguments interface {
type SpecialResolutionCall struct {
type SpecialResolutionData struct {
type StakeResult struct {
type StorageResult struct {
type SwapResult struct {
type SymbolArguments struct {
type TokenCreateData struct {
type TokenDataResult struct {
type TokenExternalResult struct {
type TokenPriceResult struct {
type TokenPropertyResult struct {
type TokenReferenceArguments struct {
type TokenRepair struct {
type TokenResult struct {
type TokenSchemasResult struct {
type TokenSeriesArguments struct {
type TokenSeriesCreateData struct {
type TokenSeriesReferenceArguments struct {
type TokenSeriesResult struct {
type TokensConfigArguments struct {
type TransactionResult struct {
type TransferFungibleArguments struct {
type TransferNonFungibleArguments struct {
type UnknownEventData struct {
type UnrecognizedArguments struct {
type UpdateSeriesMetadataArguments struct {
type UpdateTokenMetadataArguments struct {
type VMNamedVariableSchemaResult struct {
type VMStructSchemaResult struct {
type VMValue struct {
type VMValueKind uint8
type VMVariableSchemaResult struct {
type ValidatorResult struct {

Fields

  • Abi string json:“abi”``
  • Abi string json:“abi”``
  • Abi string json:“abi”``
  • Abi string json:“abi”``
  • AbortReason string json:“abortReason,omitempty”``
  • Active bool json:“active”``
  • Address *string json:“address,omitempty”``
  • Address string json:“address”``
  • Address *string json:“address,omitempty”``
  • Address string json:“address”``
  • Address string json:“address”``
  • Address string json:“address”``
  • Address string json:“address”``
  • Address string json:“address”``
  • Address string json:“address”``
  • Address string json:“address”``
  • AllowedTxTypes string json:“allowedTxTypes”``
  • Amount string json:“amount”``
  • Amount string json:“amount”``
  • Amount string json:“amount”``
  • Archives []ArchiveResult json:“archives”``
  • Arguments SpecialResolutionArguments json:“arguments,omitempty”``
  • Available uint json:“available”``
  • Avatar string json:“avatar”``
  • Balance string json:“balance”``
  • Balances []BalanceResult json:“balances”``
  • BaseSymbol string json:“baseSymbol”``
  • BaseSymbol string json:“baseSymbol”``
  • BlockCount int json:“blockCount”``
  • BlockHash string json:“blockHash”``
  • BlockHeight int json:“blockHeight”``
  • BlockRateTarget string json:“blockRateTarget”``
  • BlockRateTarget uint32 json:“blockRateTarget”``
  • BuildTimeUTC string json:“buildTimeUtc”``
  • BurnedSupply *string json:“burnedSupply,omitempty”``
  • BurnedSupply string json:“burnedSupply”``
  • Buyer string json:“buyer”``
  • Calls []SpecialResolutionCall json:“calls”``
  • Calls []SpecialResolutionCall json:“calls,omitempty”``
  • CarbonAddress *string json:“carbonAddress,omitempty”``
  • CarbonBaseTokenID uint64 json:“carbonBaseTokenId”``
  • CarbonID string json:“carbonId”``
  • CarbonInstanceID uint64 json:“carbonInstanceId”``
  • CarbonNFTAddress string json:“carbonNftAddress”``
  • CarbonOwner *string json:“carbonOwner,omitempty”``
  • CarbonQuoteTokenID uint64 json:“carbonQuoteTokenId”``
  • CarbonSeriesID string json:“carbonSeriesId”``
  • CarbonSeriesID string json:“carbonSeriesId”``
  • CarbonSeriesID uint32 json:“carbonSeriesId”``
  • CarbonTokenID string json:“carbonTokenId”``
  • CarbonTokenID string json:“carbonTokenId”``
  • CarbonTokenID uint64 json:“carbonTokenId”``
  • CarbonTokenID uint64 json:“carbonTokenId”``
  • CarbonTxData string json:“carbonTxData”``
  • CarbonTxType uint32 json:“carbonTxType”``
  • Chain string json:“chain”``
  • Chain string json:“chain”``
  • Chain string json:“chain”``
  • Chain string json:“chain”``
  • ChainAddress string json:“chainAddress”``
  • ChainAddress string json:“chainAddress”``
  • ChainAddress string json:“chainAddress”``
  • ChainName string json:“chainName”``
  • Chains []ChainResult json:“chains,omitempty”``
  • Channel string json:“channel”``
  • Close string json:“Close”``
  • Commit string json:“commit”``
  • Content string json:“content”``
  • Contract string json:“contract”``
  • ContractName string json:“contractName”``
  • Contracts []ImportedContract json:“contracts”``
  • Contracts []string json:“contracts,omitempty”``
  • ContractsCount string json:“contractsCount”``
  • CreationTime uint json:“creationTime”``
  • Creator string json:“creator”``
  • CreatorAddress string json:“creatorAddress”``
  • CreatorAddress string json:“creatorAddress”``
  • CreatorAddress string json:“creatorAddress”``
  • CurrentSupply string json:“currentSupply”``
  • CurrentSupply string json:“currentSupply”``
  • CurrentWinner string json:“currentWinner”``
  • Dapps []string json:“dapps,omitempty”``
  • Data string json:“data”``
  • Data EventData json:“data,omitempty”``
  • Data string json:“data”``
  • DataEscrowAtoms *string json:“dataEscrowAtoms,omitempty”``
  • DataEscrowPerRow *string json:“dataEscrowPerRow,omitempty”``
  • DataEscrowPerRow string json:“dataEscrowPerRow”``
  • DataRefundAtoms *string json:“dataRefundAtoms,omitempty”``
  • DataRows *string json:“dataRows,omitempty”``
  • DataTokenID *string json:“dataTokenId,omitempty”``
  • DataTokenID string json:“dataTokenId”``
  • DebugComment *string json:“debugComment,omitempty”``
  • Decimals int json:“decimals”``
  • Decimals uint32 json:“decimals”``
  • Decimals string json:“decimals”``
  • Decimals uint json:“decimals”``
  • Description *string json:“description,omitempty”``
  • Description string json:“description”``
  • DestinationAddress string json:“destinationAddress”``
  • DestinationChain string json:“destinationChain”``
  • DestinationHash string json:“destinationHash”``
  • DestinationPlatform string json:“destinationPlatform”``
  • Encryption *string json:“encryption,omitempty”``
  • EndDate uint json:“endDate”``
  • EndDate uint json:“endDate”``
  • EndDate int64 json:“endDate”``
  • EndPrice string json:“endPrice”``
  • EndPrice string json:“endPrice”``
  • Error *string json:“error,omitempty”``
  • Error string json:“error”``
  • Events []EventResult json:“events,omitempty”``
  • Events []EventResult json:“events”``
  • Events []ABIEventResult json:“events,omitempty”``
  • Events []EventResult json:“events”``
  • Expiration uint json:“expiration”``
  • ExpiryWindow string json:“expiryWindow”``
  • ExpiryWindow uint32 json:“expiryWindow”``
  • ExtendedEvents []EventExResult json:“extendedEvents”``
  • ExtensionPeriod string json:“extensionPeriod”``
  • External []TokenExternalResult json:“external,omitempty”``
  • External string json:“external”``
  • FeatureLevel int json:“featureLevel”``
  • FeatureLevel string json:“featureLevel”``
  • Fee string json:“fee”``
  • Fee string json:“fee”``
  • Fee string json:“fee”``
  • FeeMultiplier *string json:“feeMultiplier,omitempty”``
  • FeeMultiplier string json:“feeMultiplier”``
  • FeeShift byte json:“feeShift”``
  • FeeShift string json:“feeShift”``
  • Fields []VMNamedVariableSchemaResult json:“fields”``
  • Fields map[string]VMValue
  • Flags string json:“flags”``
  • Flags string json:“flags”``
  • Flags string json:“flags”``
  • Flags string json:“flags”``
  • Flags uint json:“flags”``
  • Flags string json:“flags”``
  • FlagsNames []string json:“flagsNames”``
  • From string json:“from”``
  • From string json:“from”``
  • From string json:“from”``
  • Fuel string json:“fuel”``
  • FuelPerContractDeploy string json:“fuelPerContractDeploy”``
  • Gas *string json:“gas,omitempty”``
  • GasAccount string json:“gasAccount”``
  • GasBillKcalBase *string json:“gasBillKcalBase,omitempty”``
  • GasBurnRatioMul *string json:“gasBurnRatioMul,omitempty”``
  • GasBurnRatioMul string json:“gasBurnRatioMul”``
  • GasBurnRatioShift byte json:“gasBurnRatioShift”``
  • GasBurnRatioShift string json:“gasBurnRatioShift”``
  • GasConfig *GasConfigDataResult json:“gasConfig,omitempty”``
  • GasConstructor string json:“gasConstructor”``
  • GasDappRatioMul *string json:“gasDappRatioMul,omitempty”``
  • GasDappRatioShift *byte json:“gasDappRatioShift,omitempty”``
  • GasDappRatioShift *string json:“gasDappRatioShift,omitempty”``
  • GasFeeCreateTokenBase *string json:“gasFeeCreateTokenBase,omitempty”``
  • GasFeeCreateTokenBase string json:“gasFeeCreateTokenBase”``
  • GasFeeCreateTokenSeries *string json:“gasFeeCreateTokenSeries,omitempty”``
  • GasFeeCreateTokenSeries string json:“gasFeeCreateTokenSeries”``
  • GasFeeCreateTokenSymbol *string json:“gasFeeCreateTokenSymbol,omitempty”``
  • GasFeeCreateTokenSymbol string json:“gasFeeCreateTokenSymbol”``
  • GasFeePerByte *string json:“gasFeePerByte,omitempty”``
  • GasFeePerByte string json:“gasFeePerByte”``
  • GasFeeQuery *string json:“gasFeeQuery,omitempty”``
  • GasFeeQuery string json:“gasFeeQuery”``
  • GasFeeRegisterName *string json:“gasFeeRegisterName,omitempty”``
  • GasFeeRegisterName string json:“gasFeeRegisterName”``
  • GasFeeTransfer *string json:“gasFeeTransfer,omitempty”``
  • GasFeeTransfer string json:“gasFeeTransfer”``
  • GasFrom string json:“gasFrom”``
  • GasLeaderboard string json:“gasLeaderboard”``
  • GasLimit string json:“gasLimit”``
  • GasModelVersion uint32 json:“gasModelVersion”``
  • GasNexus string json:“gasNexus”``
  • GasOracle string json:“gasOracle”``
  • GasOrganization string json:“gasOrganization”``
  • GasPayer string json:“gasPayer”``
  • GasPrice string json:“gasPrice”``
  • GasProducerRatioMul *string json:“gasProducerRatioMul,omitempty”``
  • GasProducerRatioShift *byte json:“gasProducerRatioShift,omitempty”``
  • GasProducerRatioShift *string json:“gasProducerRatioShift,omitempty”``
  • GasStandard string json:“gasStandard”``
  • GasTarget string json:“gasTarget”``
  • GasTokenID *string json:“gasTokenId,omitempty”``
  • GasTokenID string json:“gasTokenId”``
  • GetSchemas string json:“getSchemas”``
  • GlobalHardCap string json:“globalHardCap”``
  • GlobalSoftCap string json:“globalSoftCap”``
  • Governance []GovernanceResult json:“governance,omitempty”``
  • Hash string json:“hash”``
  • Hash string json:“hash”``
  • Hash *string json:“hash,omitempty”``
  • Hash string json:“hash”``
  • Hash string json:“hash”``
  • Hash string json:“hash”``
  • Height uint json:“height”``
  • Height uint json:“height”``
  • High string json:“High”``
  • ID string json:“id”``
  • ID string json:“id”``
  • Ids []string json:“ids,omitempty”``
  • ImportedLiveCount string json:“importedLiveCount”``
  • Index int json:“index”``
  • Index string json:“index”``
  • Infusion []TokenPropertyResult json:“infusion”``
  • InstanceID string json:“instanceId”``
  • InstanceIDs []string json:“instanceIds”``
  • Interop []InteropResult json:“interop”``
  • IsMember bool json:“isMember”``
  • IsNonFungible bool json:“isNonFungible”``
  • IsStored bool json:“isStored”``
  • Items []VMValue
  • JSON json.RawMessage
  • Key string json:“key”``
  • Key string json:“key”``
  • Kind string json:“kind”``
  • Kind VMValueKind
  • Kind string json:“kind”``
  • LegacyDataEscrowPerRow *string json:“legacyDataEscrowPerRow,omitempty”``
  • ListingFee string json:“listingFee”``
  • Local string json:“local”``
  • Low string json:“Low”``
  • MaxGas string json:“maxGas”``
  • MaxMint string json:“maxMint”``
  • MaxMint uint32 json:“maxMint”``
  • MaxMint string json:“maxMint”``
  • MaxNameLength byte json:“maxNameLength”``
  • MaxNameLength string json:“maxNameLength”``
  • MaxStructureSize string json:“maxStructureSize”``
  • MaxStructureSize uint32 json:“maxStructureSize”``
  • MaxSupply string json:“maxSupply”``
  • MaxSupply string json:“maxSupply”``
  • MaxSupply uint32 json:“maxSupply”``
  • MaxSupply string json:“maxSupply”``
  • MaxSupply string json:“maxSupply”``
  • MaxSupply string json:“maxSupply”``
  • MaxTokenSymbolLength byte json:“maxTokenSymbolLength”``
  • MaxTokenSymbolLength string json:“maxTokenSymbolLength”``
  • MemberCount *string json:“memberCount,omitempty”``
  • MemberTime *uint64 json:“memberTime,omitempty”``
  • Metadata []TokenPropertyResult json:“metadata”``
  • Metadata []TokenPropertyResult json:“metadata,omitempty”``
  • Metadata []TokenPropertyResult json:“metadata,omitempty”``
  • Metadata map[string]VMValue json:“metadata”``
  • Metadata map[string]VMValue json:“metadata,omitempty”``
  • Metadata map[string]string json:“metadata”``
  • Metadata string json:“metadata”``
  • MetadataRaw *string json:“metadataRaw,omitempty”``
  • Method string json:“method”``
  • MethodID uint32 json:“methodId”``
  • Methods []ABIMethodResult json:“methods,omitempty”``
  • Methods []ABIMethodResult json:“methods,omitempty”``
  • MinimumGasBill *string json:“minimumGasBill,omitempty”``
  • MinimumGasOffer *string json:“minimumGasOffer,omitempty”``
  • MinimumGasOffer string json:“minimumGasOffer”``
  • Mint string json:“mint”``
  • MintCount string json:“mintCount”``
  • MintCount string json:“mintCount”``
  • MissingBlocks []int json:“missingBlocks,omitempty”``
  • Mode string json:“mode”``
  • Mode *string json:“mode,omitempty”``
  • Module string json:“module”``
  • ModuleID uint32 json:“moduleId”``
  • Name string json:“name”``
  • Name *string json:“name,omitempty”``
  • Name *string json:“name,omitempty”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Name *string json:“name,omitempty”``
  • Name *string json:“name,omitempty”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Name *string json:“name,omitempty”``
  • Name string json:“name”``
  • Name string json:“name”``
  • Nexus string json:“nexus”``
  • Nodes []ConsensusNode json:“nodes”``
  • Open string json:“Open”``
  • Oracles []OracleResult json:“oracles,omitempty”``
  • Oracles []OracleResult json:“oracles”``
  • Organization *string json:“organization,omitempty”``
  • Organizations []string json:“organizations,omitempty”``
  • Owner string json:“owner”``
  • Owner string json:“owner”``
  • Owner *string json:“owner,omitempty”``
  • Owner string json:“owner”``
  • Owner *string json:“owner,omitempty”``
  • Owner string json:“owner”``
  • Owner string json:“owner”``
  • Owner string json:“owner”``
  • OwnerAddress string json:“ownerAddress”``
  • OwnerAddress string json:“ownerAddress”``
  • Owners []string json:“owners,omitempty”``
  • Parameters []ABIParameterResult json:“parameters”``
  • Parent *string json:“parent,omitempty”``
  • Payload string json:“payload”``
  • PhantasmaSeriesID string json:“phantasmaSeriesId”``
  • Platform string json:“platform”``
  • Platform string json:“platform”``
  • Platforms []PlatformResult json:“platforms,omitempty”``
  • PolicyFeeCreateTokenBase *string json:“policyFeeCreateTokenBase,omitempty”``
  • PolicyFeeCreateTokenSeries *string json:“policyFeeCreateTokenSeries,omitempty”``
  • PolicyFeeCreateTokenSymbol *string json:“policyFeeCreateTokenSymbol,omitempty”``
  • PolicyFeeRegisterName *string json:“policyFeeRegisterName,omitempty”``
  • Pow uint json:“pow”``
  • PreviousHash string json:“previousHash”``
  • Price string json:“price”``
  • Price []TokenPriceResult json:“price,omitempty”``
  • Price uint json:“price”``
  • Price string json:“price”``
  • ProducerAddress *string json:“producerAddress,omitempty”``
  • Properties []TokenPropertyResult json:“properties”``
  • Protocol uint json:“protocol”``
  • Protocol uint json:“protocol”``
  • QuoteSymbol string json:“quoteSymbol”``
  • QuoteSymbol string json:“quoteSymbol”``
  • RAM string json:“ram”``
  • RAM string json:“ram”``
  • RAM VMStructSchemaResult json:“ram”``
  • ROM string json:“rom”``
  • ROM string json:“rom”``
  • ROM VMStructSchemaResult json:“rom”``
  • Ram string json:“ram”``
  • Ram string json:“ram”``
  • Rams []string json:“rams”``
  • RawArgs string json:“rawArgs”``
  • ReceiveSymbol string json:“receiveSymbol”``
  • Receiver string json:“receiver”``
  • Recipient string json:“recipient”``
  • RecommendedMaxData *string json:“recommendedMaxData,omitempty”``
  • RecommendedMaxGas *string json:“recommendedMaxGas,omitempty”``
  • Relay *string json:“relay,omitempty”``
  • RepairMask string json:“repairMask”``
  • Repairs []SeriesMintCountRepair json:“repairs”``
  • Repairs []TokenRepair json:“repairs”``
  • RepairsCount string json:“repairsCount”``
  • RepairsCount string json:“repairsCount”``
  • Reserved1 string json:“reserved1”``
  • Reserved2 string json:“reserved2”``
  • Reserved3 string json:“reserved3”``
  • ResolutionID string json:“resolutionId”``
  • ResolutionID uint64 json:“resolutionId”``
  • Result string json:“result”``
  • Result string json:“result,omitempty”``
  • Results []string json:“results”``
  • ReturnType string json:“returnType”``
  • ReturnType string json:“returnType”``
  • Reward string json:“reward”``
  • Rom string json:“rom”``
  • Rom string json:“rom”``
  • RomID string json:“romId”``
  • RomID string json:“romId”``
  • Roms []string json:“roms”``
  • RootVariables []ContractStorageRow json:“rootVariables”``
  • Rows []ContractStorageRow json:“rows”``
  • Rows []LeaderboardRowResult json:“rows,omitempty”``
  • Schema *VMStructSchemaResult json:“schema,omitempty”``
  • Schema VMVariableSchemaResult json:“schema”``
  • Script string json:“script”``
  • Script *string json:“script,omitempty”``
  • Script string json:“script”``
  • Script *string json:“script,omitempty”``
  • Script string json:“script”``
  • Script string json:“script”``
  • Script string json:“script”``
  • Script string json:“script”``
  • Script string json:“script”``
  • SellSymbol string json:“sellSymbol”``
  • Seller string json:“seller”``
  • Sender string json:“sender”``
  • Sender string json:“sender”``
  • Series string json:“series”``
  • Series []TokenSeriesResult json:“series”``
  • SeriesID string json:“seriesId”``
  • SeriesID string json:“seriesId”``
  • SeriesID *string json:“seriesId,omitempty”``
  • SeriesID string json:“seriesId”``
  • SeriesMetadata VMStructSchemaResult json:“seriesMetadata”``
  • Signatures []SignatureResult json:“signatures”``
  • Size uint json:“size”``
  • SourceAddress string json:“sourceAddress”``
  • SourceChain string json:“sourceChain”``
  • SourceHash string json:“sourceHash”``
  • SourcePlatform string json:“sourcePlatform”``
  • Stake string json:“stake”``
  • Stake StakeResult json:“stake”``
  • Stakes StakeResult json:“stakes”``
  • StartDate uint json:“startDate”``
  • StartDate uint json:“startDate”``
  • StartDate int64 json:“startDate”``
  • State string json:“state”``
  • State *string json:“state,omitempty”``
  • Status string json:“status”``
  • Storage StorageResult json:“storage”``
  • Supplements []SeriesSupplement json:“supplements”``
  • SupplementsCount string json:“supplementsCount”``
  • Symbol string json:“symbol”``
  • Symbol string json:“symbol”``
  • Symbol string json:“symbol”``
  • Symbol string json:“symbol”``
  • Symbol string json:“symbol”``
  • Symbol string json:“symbol”``
  • Symbol string json:“symbol”``
  • Symbol string json:“symbol”``
  • Symbol string json:“symbol”``
  • Tables []ContractStorageTable json:“tables”``
  • TargetAddress string json:“targetAddress”``
  • Text string
  • Time uint json:“time”``
  • Time uint json:“time”``
  • Timestamp uint json:“timestamp”``
  • Timestamp uint json:“timestamp”``
  • Timestamp uint json:“Timestamp”``
  • Timestamp uint json:“timestamp”``
  • To string json:“to”``
  • To string json:“to”``
  • Token string json:“token”``
  • Token string json:“token”``
  • Token string json:“token”``
  • Token *string json:“token,omitempty”``
  • TokenFlags string json:“tokenFlags”``
  • TokenID string json:“tokenId”``
  • TokenID string json:“tokenId”``
  • TokenID string json:“tokenId”``
  • TokenID string json:“tokenId”``
  • TokenID string json:“tokenId”``
  • TokenReferenceArguments
  • TokenSchemas *TokenSchemasResult json:“tokenSchemas”``
  • TokenSchemas *string json:“tokenSchemas,omitempty”``
  • TokenSeriesArguments
  • Tokens []TokenResult json:“tokens,omitempty”``
  • Tokens []string json:“tokens”``
  • Tokens []NFTMint json:“tokens”``
  • Tokens []PhantasmaNFTMint json:“tokens”``
  • Txs []TransactionResult json:“txs”``
  • Txs []string json:“txs,omitempty”``
  • Txs []TransactionResult json:“txs”``
  • Type string json:“type”``
  • Type string json:“type”``
  • Type string json:“type”``
  • Type string json:“type”``
  • URL string json:“url”``
  • Unclaimed string json:“unclaimed”``
  • Unclaimed string json:“unclaimed”``
  • UnitsPerBlockDataByte *uint32 json:“unitsPerBlockDataByte,omitempty”``
  • Used uint json:“used”``
  • UserHardCap string json:“userHardCap”``
  • UserSoftCap string json:“userSoftCap”``
  • Validator string json:“validator”``
  • ValidatorAddress string json:“validatorAddress”``
  • Value string json:“value”``
  • Value int json:“value”``
  • Value string json:“value”``
  • Value VMValue json:“value”``
  • Value interface{} json:“error”``
  • Value string json:“value”``
  • Version byte json:“version”``
  • Version string json:“version”``
  • Version string json:“version”``
  • Version string json:“version”``
  • Version string json:“version”``
  • WouldAbort bool json:“wouldAbort”``

Methods

func (a *AccountResult) GetTokenBalance(t TokenResult) *BalanceResult
func (a AccountResult) Clone() *AccountResult
func (b BalanceResult) Clone() *BalanceResult
func (b BalanceResult) ConvertDecimals() string
func (b BalanceResult) ConvertDecimalsToFloat() *big.Float
func (c *SpecialResolutionCall) UnmarshalJSON(data []byte) error
func (e *EstimateTransactionResult) ToFeeQuote() (carbon.FeeQuote, error)
func (e *EventExResult) UnmarshalJSON(data []byte) error
func (e *EventResult) UnmarshalJSON(data []byte) error
func (g *GasConfigResult) ToGasConfig() (carbon.GasConfig, error)
func (p *TokenPropertyResult) UnmarshalJSON(data []byte) error
func (s *SignatureResult) UnmarshalJSON(data []byte) error
func (s *SpecialResolutionData) UnmarshalJSON(data []byte) error
func (s ScriptResult) DecodeResultWithError() (*vm.VMObject, error)
func (s ScriptResult) DecodeResultsWithError(index int) (*vm.VMObject, error)
func (s StakeResult) ConvertDecimals() string
func (s StakeResult) ConvertDecimalsToFloat() *big.Float
func (t *TokenDataResult) UnmarshalJSON(data []byte) error
func (t *TokenResult) UnmarshalJSON(data []byte) error
func (t TokenResult) IsBurnable() bool
func (t TokenResult) IsDivisible() bool
func (t TokenResult) IsFiat() bool
func (t TokenResult) IsFinite() bool
func (t TokenResult) IsFuel() bool
func (t TokenResult) IsFungible() bool
func (t TokenResult) IsMintable() bool
func (t TokenResult) IsStakable() bool
func (t TokenResult) IsTransferable() bool
func (t TransactionResult) StateIsFault() bool
func (t TransactionResult) StateIsSuccess() bool
func (u UnknownEventData) MarshalJSON() ([]byte, error)
func (u UnrecognizedArguments) MarshalJSON() ([]byte, error)
func (v *VMValue) UnmarshalJSON(data []byte) error
func (v VMValue) AsFields() (fields map[string]VMValue, ok bool)
func (v VMValue) AsItems() (items []VMValue, ok bool)
func (v VMValue) AsText() (text string, ok bool)
func (v VMValue) Field(name string) (field VMValue, ok bool)
func (v VMValue) IsText() bool
func (v VMValue) MarshalJSON() ([]byte, error)
func DecodeEventData(kind string, data json.RawMessage) EventData
func DecodeSpecialResolutionArguments(module, method string, data json.RawMessage) SpecialResolutionArguments
func VMFields(fields map[string]VMValue) VMValue
func VMItems(items ...VMValue) VMValue
func VMText(text string) VMValue

github.com/phantasma-io/phantasma-sdk-go/pkg/util

Source: pkg/util

Methods

func BigIntBytesFromCsharpOrPhantasmaByteArray(bytes []byte) ([]byte, int)
func BigIntFromCsharpOrPhantasmaByteArray(bytes []byte) *big.Int
func BigIntToCsharpByteArray(n *big.Int) []byte
func BigIntToPhantasmaByteArray(n *big.Int) []byte
func ConvertDecimals(number *big.Int, decimals int) string
func ConvertDecimalsBack(number string, decimals int) (*big.Int, error)
func ConvertDecimalsBackEx(number string, decimals int, separator string) (string, error)
func ConvertDecimalsEx(number string, decimals int, separator string) string
func ErrorDetect(s string) bool
func TwosComplementConvertFrom(bytes []byte)
func TwosComplementConvertTo(bytes []byte)

github.com/phantasma-io/phantasma-sdk-go/pkg/util/hashing

Source: pkg/util/hashing

Methods

func Checksum(data []byte) []byte
func DoubleSha256(data []byte) []byte
func Sha256(data []byte) []byte

github.com/phantasma-io/phantasma-sdk-go/pkg/vm

Source: pkg/vm

Declarations

const ABS
const ADD
const AND
const Bool
const Bytes
const CALL
const CAST
const CAT
const CLEAR // clears a register
const COPY // copy by value
const COUNT
const CTX
const DEBUG
const DEC
const DIV
const EQUAL
const EVM = 255
const EXTCALL
const Enum
const GET // lookups a key and copies a reference into register
const GT
const GTE
const INC
const JMP
const JMPIF
const JMPNOT
const LEFT
const LOAD
const LT
const LTE
const MAX
const MIN
const MOD
const MOVE // copy reference
const MUL
const NEGATE
const NOP Opcode = iota
const NOT
const None VMType = iota
const Number
const OR
const Object
const PACK // unused for now
const POP
const POW
const PUSH
const PUT
const RANGE
const REMOVE = 54
const RET
const RIGHT
const SHL
const SHR
const SIGN
const SIZE
const SUB
const SUBSTR
const SWAP
const SWITCH
const String
const Struct
const THROW
const Timestamp
const UNPACK // unpacks serialized struct based on ref struct
const XOR
type Opcode byte
type VMObject struct {
type VMObjectPair struct {
type VMObjectStruct []VMObjectPair
type VMType byte
var VMTypeLookup = map[VMType]string

Fields

  • Data interface{}
  • Key VMObject
  • Type VMType
  • Value VMObject

Methods

func (t VMType) FromString(vmType string) VMType
func (v *VMObject) AsBool() bool
func (v *VMObject) AsBytes() []byte
func (v *VMObject) AsNumber() *big.Int
func (v *VMObject) AsString() string
func (v *VMObject) CastTo(vmtype VMType) *VMObject
func (v *VMObject) Copy(other *VMObject)
func (v *VMObject) Deserialize(reader *io.BinReader)
func (v *VMObject) GetArrayType() VMType
func (v *VMObject) Serialize(writer *io.BinWriter)
func (v *VMObject) SetValue(val []byte, vmtype VMType) *VMObject
func (v *VMObject) String() string
func ValidateStructKey(key *VMObject)

github.com/phantasma-io/phantasma-sdk-go/pkg/vm/script_builder

Source: pkg/vm/script_builder

Declarations

type ScriptBuilder struct {

Methods

func (s ScriptBuilder) AllowGas(from, to cryptography.Address, gasPrice, gasLimit *big.Int) ScriptBuilder
func (s ScriptBuilder) AllowGasText(from, to string, gasPrice, gasLimit *big.Int) ScriptBuilder
func (s ScriptBuilder) CallContract(contractName, method string, args ...interface{}) ScriptBuilder
func (s ScriptBuilder) CallInterop(method string, args ...interface{}) ScriptBuilder
func (s ScriptBuilder) CallNFT(symbol string, seriesID *big.Int, method string, args ...interface{}) ScriptBuilder
func (s ScriptBuilder) CrossTransferNFT(destinationChain cryptography.Address, symbol string, from, to cryptography.Address, tokenID *big.Int) ScriptBuilder
func (s ScriptBuilder) CrossTransferNFTText(destinationChain string, symbol string, from string, to string, tokenID *big.Int) ScriptBuilder
func (s ScriptBuilder) CrossTransferNFTToText(destinationChain cryptography.Address, symbol string, from cryptography.Address, to string, tokenID *big.Int) ScriptBuilder
func (s ScriptBuilder) CrossTransferToken(destinationChain cryptography.Address, symbol string, from, to cryptography.Address, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) CrossTransferTokenText(destinationChain string, symbol string, from string, to string, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) CrossTransferTokenToText(destinationChain cryptography.Address, symbol string, from cryptography.Address, to string, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) CurrentSize() int
func (s ScriptBuilder) EmitCall(label string, regCnt byte) ScriptBuilder
func (s ScriptBuilder) EmitConditionalJump(opcode vm.Opcode, srcReg byte, label string) ScriptBuilder
func (s ScriptBuilder) EmitCopy(srcReg byte, dstReg byte) ScriptBuilder
func (s ScriptBuilder) EmitExtCall(method string, reg byte) ScriptBuilder
func (s ScriptBuilder) EmitJump(opcode vm.Opcode, label string, reg byte) ScriptBuilder
func (s ScriptBuilder) EmitLabel(label string) ScriptBuilder
func (s ScriptBuilder) EmitLoad(reg byte, bytes []byte, _type vm.VMType) ScriptBuilder
func (s ScriptBuilder) EmitLoadBool(reg byte, toLoad bool) ScriptBuilder
func (s ScriptBuilder) EmitLoadInt(reg byte, toLoad int) ScriptBuilder
func (s ScriptBuilder) EmitLoadNumberAsBinary(reg byte, toLoad *big.Int) ScriptBuilder
func (s ScriptBuilder) EmitLoadString(reg byte, toLoad string) ScriptBuilder
func (s ScriptBuilder) EmitLoadTime(reg byte, toLoad time.Time) ScriptBuilder
func (s ScriptBuilder) EmitM(opcode vm.Opcode, bytes []byte) ScriptBuilder
func (s ScriptBuilder) EmitMove(srcReg byte, dstReg byte) ScriptBuilder
func (s ScriptBuilder) EmitPop(reg byte) ScriptBuilder
func (s ScriptBuilder) EmitPush(reg byte) ScriptBuilder
func (s ScriptBuilder) EmitRaw(value []byte) ScriptBuilder
func (s ScriptBuilder) EmitS(opcode vm.Opcode) ScriptBuilder
func (s ScriptBuilder) EmitThrow(reg byte) ScriptBuilder
func (s ScriptBuilder) EmitVarBytes(value int) ScriptBuilder
func (s ScriptBuilder) EndScript() []byte
func (s ScriptBuilder) EndScriptWithError() ([]byte, error)
func (s ScriptBuilder) MintTokens(symbol string, from, to cryptography.Address, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) MintTokensText(symbol string, from, to string, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) SpendGas(address cryptography.Address) ScriptBuilder
func (s ScriptBuilder) SpendGasText(address string) ScriptBuilder
func (s ScriptBuilder) Stake(address cryptography.Address, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) StakeText(address string, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) ToScript() ([]byte, error)
func (s ScriptBuilder) TransferBalance(symbol string, from, to cryptography.Address) ScriptBuilder
func (s ScriptBuilder) TransferBalanceText(symbol string, from, to string) ScriptBuilder
func (s ScriptBuilder) TransferNFT(symbol string, from, to cryptography.Address, tokenID *big.Int) ScriptBuilder
func (s ScriptBuilder) TransferNFTText(symbol string, from, to string, tokenID *big.Int) ScriptBuilder
func (s ScriptBuilder) TransferNFTToText(symbol string, from cryptography.Address, to string, tokenID *big.Int) ScriptBuilder
func (s ScriptBuilder) TransferTokens(symbol string, from, to cryptography.Address, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) TransferTokensText(symbol string, from, to string, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) TransferTokensToText(symbol string, from cryptography.Address, to string, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) Unstake(address cryptography.Address, amount *big.Int) ScriptBuilder
func (s ScriptBuilder) UnstakeText(address string, amount *big.Int) ScriptBuilder
func BeginScript() ScriptBuilder
func NewScriptBuilder() ScriptBuilder