Skip to content

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

Package Exports

Declared export targets from package.json:

  • phantasma-sdk-ts: ./dist/types/index.d.ts (available)
  • phantasma-sdk-ts/core: ./dist/types/core/index.d.ts (available)
  • phantasma-sdk-ts/core/*: ./dist/types/core/*.d.ts (available)
  • phantasma-sdk-ts/core/interfaces: ./dist/types/core/interfaces/index.d.ts (available)
  • phantasma-sdk-ts/core/ledger: ./dist/types/core/ledger/index.d.ts (available)
  • phantasma-sdk-ts/core/link: ./dist/types/core/link/index.d.ts (available)
  • phantasma-sdk-ts/core/rpc: ./dist/types/core/rpc/index.d.ts (available)
  • phantasma-sdk-ts/core/tx: ./dist/types/core/tx/index.d.ts (available)
  • phantasma-sdk-ts/core/types: ./dist/types/core/types/index.d.ts (available)
  • phantasma-sdk-ts/core/utils: ./dist/types/core/utils/index.d.ts (available)
  • phantasma-sdk-ts/core/vm: ./dist/types/core/vm/index.d.ts (available)
  • phantasma-sdk-ts/interfaces: ./dist/types/interfaces/index.d.ts (available)
  • phantasma-sdk-ts/interfaces/*: ./dist/types/interfaces/*.d.ts (available)
  • phantasma-sdk-ts/ledger: ./dist/types/ledger/index.d.ts (available)
  • phantasma-sdk-ts/ledger/*: ./dist/types/ledger/*.d.ts (available)
  • phantasma-sdk-ts/link: ./dist/types/link/index.d.ts (available)
  • phantasma-sdk-ts/link/*: ./dist/types/link/*.d.ts (available)
  • phantasma-sdk-ts/link/v5: ./dist/types/link/v5/index.d.ts (available)
  • phantasma-sdk-ts/public: ./dist/types/public.d.ts (available)
  • phantasma-sdk-ts/rpc: ./dist/types/rpc/index.d.ts (available)
  • phantasma-sdk-ts/rpc/*: ./dist/types/rpc/*.d.ts (available)
  • phantasma-sdk-ts/tx: ./dist/types/tx/index.d.ts (available)
  • phantasma-sdk-ts/tx/*: ./dist/types/tx/*.d.ts (available)
  • phantasma-sdk-ts/types: ./dist/types/types/index.d.ts (available)
  • phantasma-sdk-ts/types/*: ./dist/types/types/*.d.ts (available)
  • phantasma-sdk-ts/utils: ./dist/types/utils/index.d.ts (available)
  • phantasma-sdk-ts/utils/*: ./dist/types/utils/*.d.ts (available)
  • phantasma-sdk-ts/vm: ./dist/types/vm/index.d.ts (available)
  • phantasma-sdk-ts/vm/*: ./dist/types/vm/*.d.ts (available)

phantasma-sdk-ts/core

Source: dist/types/core/index.d.ts

Declarations

export * from '../rpc/phantasma.js';
export * from '../rpc/index.js';
export * from '../vm/index.js';
export * from '../tx/index.js';
export * from '../utils/index.js';
export * from '../types/index.js';
export * from '../interfaces/index.js';
export * from '../ledger/index.js';
export * from '../link/index.js';

phantasma-sdk-ts/core/interfaces/Carbon/ICarbonBlob

Source: dist/types/core/interfaces/Carbon/ICarbonBlob.d.ts

Declarations

export * from '../../../interfaces/carbon/carbon-blob-like.js';

phantasma-sdk-ts/core/interfaces/Carbon

Source: dist/types/core/interfaces/Carbon/index.d.ts

Declarations

export * from '../../../interfaces/carbon/index.js';

phantasma-sdk-ts/core/interfaces/IContract

Source: dist/types/core/interfaces/IContract.d.ts

Declarations

export * from '../../interfaces/contract.js';

phantasma-sdk-ts/core/interfaces/IKeyPair

Source: dist/types/core/interfaces/IKeyPair.d.ts

Declarations

export * from '../../interfaces/key-pair.js';

phantasma-sdk-ts/core/interfaces/ISerializable

Source: dist/types/core/interfaces/ISerializable.d.ts

Declarations

export * from '../../interfaces/serializable.js';

phantasma-sdk-ts/core/interfaces/IStack

Source: dist/types/core/interfaces/IStack.d.ts

Declarations

export * from '../../interfaces/stack.js';

phantasma-sdk-ts/core/interfaces/IToken

Source: dist/types/core/interfaces/IToken.d.ts

Declarations

export * from '../../interfaces/token.js';

phantasma-sdk-ts/core/interfaces/Signature

Source: dist/types/core/interfaces/Signature.d.ts

Declarations

export * from '../../interfaces/signature.js';

phantasma-sdk-ts/core/interfaces

Source: dist/types/core/interfaces/index.d.ts

Declarations

export * from '../../interfaces/index.js';

phantasma-sdk-ts/core/ledger/Address-Transcode

Source: dist/types/core/ledger/Address-Transcode.d.ts

Declarations

export * from '../../ledger/address-transcode.js';

phantasma-sdk-ts/core/ledger/Ledger-Commands

Source: dist/types/core/ledger/Ledger-Commands.d.ts

Declarations

export * from '../../ledger/ledger-commands.js';

phantasma-sdk-ts/core/ledger/Ledger-Utils

Source: dist/types/core/ledger/Ledger-Utils.d.ts

Declarations

export * from '../../ledger/ledger-utils.js';

phantasma-sdk-ts/core/ledger/Mnemonic

Source: dist/types/core/ledger/Mnemonic.d.ts

Declarations

export * from '../../ledger/mnemonic.js';

phantasma-sdk-ts/core/ledger/Transaction-Sign

Source: dist/types/core/ledger/Transaction-Sign.d.ts

Declarations

export * from '../../ledger/transaction-sign.js';

phantasma-sdk-ts/core/ledger/Transaction-Transcode

Source: dist/types/core/ledger/Transaction-Transcode.d.ts

Declarations

export * from '../../ledger/transaction-transcode.js';

phantasma-sdk-ts/core/ledger

Source: dist/types/core/ledger/index.d.ts

Declarations

export * from '../../ledger/index.js';

phantasma-sdk-ts/core/ledger/interfaces/ApplicationNameResponse

Source: dist/types/core/ledger/interfaces/ApplicationNameResponse.d.ts

Declarations

export * from '../../../ledger/interfaces/application-name-response.js';

phantasma-sdk-ts/core/ledger/interfaces/Device

Source: dist/types/core/ledger/interfaces/Device.d.ts

Declarations

export * from '../../../ledger/interfaces/device.js';

phantasma-sdk-ts/core/ledger/interfaces/DeviceResponse

Source: dist/types/core/ledger/interfaces/DeviceResponse.d.ts

Declarations

export * from '../../../ledger/interfaces/device-response.js';

phantasma-sdk-ts/core/ledger/interfaces/Ledger

Source: dist/types/core/ledger/interfaces/Ledger.d.ts

Declarations

export * from '../../../ledger/interfaces/ledger.js';

phantasma-sdk-ts/core/ledger/interfaces/LedgerBalanceFromLedgerResponse

Source: dist/types/core/ledger/interfaces/LedgerBalanceFromLedgerResponse.d.ts

Declarations

export * from '../../../ledger/interfaces/ledger-balance-from-ledger-response.js';

phantasma-sdk-ts/core/ledger/interfaces/LedgerConfig

Source: dist/types/core/ledger/interfaces/LedgerConfig.d.ts

Declarations

export * from '../../../ledger/interfaces/ledger-config.js';

phantasma-sdk-ts/core/ledger/interfaces/LedgerDeviceInfoResponse

Source: dist/types/core/ledger/interfaces/LedgerDeviceInfoResponse.d.ts

Declarations

export * from '../../../ledger/interfaces/ledger-device-info-response.js';

phantasma-sdk-ts/core/ledger/interfaces/LedgerSendTransactionResponse

Source: dist/types/core/ledger/interfaces/LedgerSendTransactionResponse.d.ts

Declarations

export * from '../../../ledger/interfaces/ledger-send-transaction-response.js';

phantasma-sdk-ts/core/ledger/interfaces/LedgerSigner

Source: dist/types/core/ledger/interfaces/LedgerSigner.d.ts

Declarations

export * from '../../../ledger/interfaces/ledger-signer.js';

phantasma-sdk-ts/core/ledger/interfaces/LedgerSignerData

Source: dist/types/core/ledger/interfaces/LedgerSignerData.d.ts

Declarations

export * from '../../../ledger/interfaces/ledger-signer-data.js';

phantasma-sdk-ts/core/ledger/interfaces/PublicKeyResponse

Source: dist/types/core/ledger/interfaces/PublicKeyResponse.d.ts

Declarations

export * from '../../../ledger/interfaces/public-key-response.js';

phantasma-sdk-ts/core/ledger/interfaces/SignResponse

Source: dist/types/core/ledger/interfaces/SignResponse.d.ts

Declarations

export * from '../../../ledger/interfaces/sign-response.js';

phantasma-sdk-ts/core/ledger/interfaces/VersionResponse

Source: dist/types/core/ledger/interfaces/VersionResponse.d.ts

Declarations

export * from '../../../ledger/interfaces/version-response.js';

phantasma-sdk-ts/core/ledger/interfaces

Source: dist/types/core/ledger/interfaces/index.d.ts

Declarations

export * from '../../../ledger/interfaces/index.js';

phantasma-sdk-ts/core/link/easyConnect

Source: dist/types/core/link/easyConnect.d.ts

Declarations

export * from '../../link/easy-connect.js';

phantasma-sdk-ts/core/link/easyScript

Source: dist/types/core/link/easyScript.d.ts

Declarations

export * from '../../link/easy-script.js';

phantasma-sdk-ts/core/link

Source: dist/types/core/link/index.d.ts

Declarations

export * from '../../link/index.js';

phantasma-sdk-ts/core/link/interfaces/IAccount

Source: dist/types/core/link/interfaces/IAccount.d.ts

Declarations

export * from '../../../link/interfaces/account.js';

phantasma-sdk-ts/core/link/interfaces/IFile

Source: dist/types/core/link/interfaces/IFile.d.ts

Declarations

export * from '../../../link/interfaces/file.js';

phantasma-sdk-ts/core/link/interfaces/ProofOfWork

Source: dist/types/core/link/interfaces/ProofOfWork.d.ts

Declarations

export * from '../../../link/interfaces/proof-of-work.js';

phantasma-sdk-ts/core/link/interfaces

Source: dist/types/core/link/interfaces/index.d.ts

Declarations

export * from '../../../link/interfaces/index.js';

phantasma-sdk-ts/core/link/phantasmaLink

Source: dist/types/core/link/phantasmaLink.d.ts

Declarations

export * from '../../link/phantasma-link.js';

phantasma-sdk-ts/core/rpc/helpers

Source: dist/types/core/rpc/helpers/index.d.ts

Declarations

export * from '../../../rpc/helpers/index.js';

phantasma-sdk-ts/core/rpc/helpers/vmSchemaHelpers

Source: dist/types/core/rpc/helpers/vmSchemaHelpers.d.ts

Declarations

export * from '../../../rpc/helpers/vm-schema-helpers.js';

phantasma-sdk-ts/core/rpc

Source: dist/types/core/rpc/index.d.ts

Declarations

export * from '../../rpc/index.js';

phantasma-sdk-ts/core/rpc/interfaces/ABIContract

Source: dist/types/core/rpc/interfaces/ABIContract.d.ts

Declarations

export * from '../../../rpc/interfaces/abi-contract.js';

phantasma-sdk-ts/core/rpc/interfaces/ABIEvent

Source: dist/types/core/rpc/interfaces/ABIEvent.d.ts

Declarations

export * from '../../../rpc/interfaces/abi-event.js';

phantasma-sdk-ts/core/rpc/interfaces/ABIMethod

Source: dist/types/core/rpc/interfaces/ABIMethod.d.ts

Declarations

export * from '../../../rpc/interfaces/abi-method.js';

phantasma-sdk-ts/core/rpc/interfaces/ABIParameter

Source: dist/types/core/rpc/interfaces/ABIParameter.d.ts

Declarations

export * from '../../../rpc/interfaces/abi-parameter.js';

phantasma-sdk-ts/core/rpc/interfaces/Account

Source: dist/types/core/rpc/interfaces/Account.d.ts

Declarations

export * from '../../../rpc/interfaces/account.js';

phantasma-sdk-ts/core/rpc/interfaces/AccountTransactions

Source: dist/types/core/rpc/interfaces/AccountTransactions.d.ts

Declarations

export * from '../../../rpc/interfaces/account-transactions.js';

phantasma-sdk-ts/core/rpc/interfaces/Archive

Source: dist/types/core/rpc/interfaces/Archive.d.ts

Declarations

export * from '../../../rpc/interfaces/archive.js';

phantasma-sdk-ts/core/rpc/interfaces/Auction

Source: dist/types/core/rpc/interfaces/Auction.d.ts

Declarations

export * from '../../../rpc/interfaces/auction.js';

phantasma-sdk-ts/core/rpc/interfaces/Balance

Source: dist/types/core/rpc/interfaces/Balance.d.ts

Declarations

export * from '../../../rpc/interfaces/balance.js';

phantasma-sdk-ts/core/rpc/interfaces/Block

Source: dist/types/core/rpc/interfaces/Block.d.ts

Declarations

export * from '../../../rpc/interfaces/block.js';

phantasma-sdk-ts/core/rpc/interfaces/BuildInfoResult

Source: dist/types/core/rpc/interfaces/BuildInfoResult.d.ts

Declarations

export * from '../../../rpc/interfaces/build-info-result.js';

phantasma-sdk-ts/core/rpc/interfaces/Chain

Source: dist/types/core/rpc/interfaces/Chain.d.ts

Declarations

export * from '../../../rpc/interfaces/chain.js';

phantasma-sdk-ts/core/rpc/interfaces/Channel

Source: dist/types/core/rpc/interfaces/Channel.d.ts

Declarations

export * from '../../../rpc/interfaces/channel.js';

phantasma-sdk-ts/core/rpc/interfaces/Contract

Source: dist/types/core/rpc/interfaces/Contract.d.ts

Declarations

export * from '../../../rpc/interfaces/contract.js';

phantasma-sdk-ts/core/rpc/interfaces/CursorPaginatedResult

Source: dist/types/core/rpc/interfaces/CursorPaginatedResult.d.ts

Declarations

export * from '../../../rpc/interfaces/cursor-paginated-result.js';

phantasma-sdk-ts/core/rpc/interfaces/Dapp

Source: dist/types/core/rpc/interfaces/Dapp.d.ts

Declarations

export * from '../../../rpc/interfaces/dapp.js';

phantasma-sdk-ts/core/rpc/interfaces/Event

Source: dist/types/core/rpc/interfaces/Event.d.ts

Declarations

export * from '../../../rpc/interfaces/event.js';

phantasma-sdk-ts/core/rpc/interfaces/EventExtended

Source: dist/types/core/rpc/interfaces/EventExtended.d.ts

Declarations

export * from '../../../rpc/interfaces/event-extended.js';

phantasma-sdk-ts/core/rpc/interfaces/Governance

Source: dist/types/core/rpc/interfaces/Governance.d.ts

Declarations

export * from '../../../rpc/interfaces/governance.js';

phantasma-sdk-ts/core/rpc/interfaces/Interop

Source: dist/types/core/rpc/interfaces/Interop.d.ts

Declarations

export * from '../../../rpc/interfaces/interop.js';

phantasma-sdk-ts/core/rpc/interfaces/KeyValue

Source: dist/types/core/rpc/interfaces/KeyValue.d.ts

Declarations

export * from '../../../rpc/interfaces/key-value.js';

phantasma-sdk-ts/core/rpc/interfaces/Leaderboard

Source: dist/types/core/rpc/interfaces/Leaderboard.d.ts

Declarations

export * from '../../../rpc/interfaces/leaderboard.js';

phantasma-sdk-ts/core/rpc/interfaces/LeaderboardRow

Source: dist/types/core/rpc/interfaces/LeaderboardRow.d.ts

Declarations

export * from '../../../rpc/interfaces/leaderboard-row.js';

phantasma-sdk-ts/core/rpc/interfaces/NFT

Source: dist/types/core/rpc/interfaces/NFT.d.ts

Declarations

export * from '../../../rpc/interfaces/nft.js';

phantasma-sdk-ts/core/rpc/interfaces/Nexus

Source: dist/types/core/rpc/interfaces/Nexus.d.ts

Declarations

export * from '../../../rpc/interfaces/nexus.js';

phantasma-sdk-ts/core/rpc/interfaces/Oracle

Source: dist/types/core/rpc/interfaces/Oracle.d.ts

Declarations

export * from '../../../rpc/interfaces/oracle.js';

phantasma-sdk-ts/core/rpc/interfaces/Organization

Source: dist/types/core/rpc/interfaces/Organization.d.ts

Declarations

export * from '../../../rpc/interfaces/organization.js';

phantasma-sdk-ts/core/rpc/interfaces/Paginated

Source: dist/types/core/rpc/interfaces/Paginated.d.ts

Declarations

export * from '../../../rpc/interfaces/paginated.js';

phantasma-sdk-ts/core/rpc/interfaces/Peer

Source: dist/types/core/rpc/interfaces/Peer.d.ts

Declarations

export * from '../../../rpc/interfaces/peer.js';

phantasma-sdk-ts/core/rpc/interfaces/PhantasmaVmConfig

Source: dist/types/core/rpc/interfaces/PhantasmaVmConfig.d.ts

Declarations

export * from '../../../rpc/interfaces/phantasma-vm-config.js';

phantasma-sdk-ts/core/rpc/interfaces/Platform

Source: dist/types/core/rpc/interfaces/Platform.d.ts

Declarations

export * from '../../../rpc/interfaces/platform.js';

phantasma-sdk-ts/core/rpc/interfaces/Receipt

Source: dist/types/core/rpc/interfaces/Receipt.d.ts

Declarations

export * from '../../../rpc/interfaces/receipt.js';

phantasma-sdk-ts/core/rpc/interfaces/Script

Source: dist/types/core/rpc/interfaces/Script.d.ts

Declarations

export * from '../../../rpc/interfaces/script.js';

phantasma-sdk-ts/core/rpc/interfaces/SendRawTx

Source: dist/types/core/rpc/interfaces/SendRawTx.d.ts

Declarations

export * from '../../../rpc/interfaces/send-raw-tx.js';

phantasma-sdk-ts/core/rpc/interfaces/SignatureResult

Source: dist/types/core/rpc/interfaces/SignatureResult.d.ts

Declarations

export * from '../../../rpc/interfaces/signature-result.js';

phantasma-sdk-ts/core/rpc/interfaces/Stake

Source: dist/types/core/rpc/interfaces/Stake.d.ts

Declarations

export * from '../../../rpc/interfaces/stake.js';

phantasma-sdk-ts/core/rpc/interfaces/Storage

Source: dist/types/core/rpc/interfaces/Storage.d.ts

Declarations

export * from '../../../rpc/interfaces/storage.js';

phantasma-sdk-ts/core/rpc/interfaces/Swap

Source: dist/types/core/rpc/interfaces/Swap.d.ts

Declarations

export * from '../../../rpc/interfaces/swap.js';

phantasma-sdk-ts/core/rpc/interfaces/Token

Source: dist/types/core/rpc/interfaces/Token.d.ts

Declarations

export * from '../../../rpc/interfaces/token.js';

phantasma-sdk-ts/core/rpc/interfaces/TokenData

Source: dist/types/core/rpc/interfaces/TokenData.d.ts

Declarations

export * from '../../../rpc/interfaces/token-data.js';

phantasma-sdk-ts/core/rpc/interfaces/TokenExternal

Source: dist/types/core/rpc/interfaces/TokenExternal.d.ts

Declarations

export * from '../../../rpc/interfaces/token-external.js';

phantasma-sdk-ts/core/rpc/interfaces/TokenPrice

Source: dist/types/core/rpc/interfaces/TokenPrice.d.ts

Declarations

export * from '../../../rpc/interfaces/token-price.js';

phantasma-sdk-ts/core/rpc/interfaces/TokenSchemasResult

Source: dist/types/core/rpc/interfaces/TokenSchemasResult.d.ts

Declarations

export * from '../../../rpc/interfaces/token-schemas-result.js';

phantasma-sdk-ts/core/rpc/interfaces/TokenSeries

Source: dist/types/core/rpc/interfaces/TokenSeries.d.ts

Declarations

export * from '../../../rpc/interfaces/token-series.js';

phantasma-sdk-ts/core/rpc/interfaces/TokenSeriesResult

Source: dist/types/core/rpc/interfaces/TokenSeriesResult.d.ts

Declarations

export * from '../../../rpc/interfaces/token-series-result.js';

phantasma-sdk-ts/core/rpc/interfaces/TransactionData

Source: dist/types/core/rpc/interfaces/TransactionData.d.ts

Declarations

export * from '../../../rpc/interfaces/transaction-data.js';

phantasma-sdk-ts/core/rpc/interfaces/Validator

Source: dist/types/core/rpc/interfaces/Validator.d.ts

Declarations

export * from '../../../rpc/interfaces/validator.js';

phantasma-sdk-ts/core/rpc/interfaces/VmNamedVariableSchemaResult

Source: dist/types/core/rpc/interfaces/VmNamedVariableSchemaResult.d.ts

Declarations

export * from '../../../rpc/interfaces/vm-named-variable-schema-result.js';

phantasma-sdk-ts/core/rpc/interfaces/VmStructSchemaResult

Source: dist/types/core/rpc/interfaces/VmStructSchemaResult.d.ts

Declarations

export * from '../../../rpc/interfaces/vm-struct-schema-result.js';

phantasma-sdk-ts/core/rpc/interfaces/VmVariableSchemaResult

Source: dist/types/core/rpc/interfaces/VmVariableSchemaResult.d.ts

Declarations

export * from '../../../rpc/interfaces/vm-variable-schema-result.js';

phantasma-sdk-ts/core/rpc/interfaces

Source: dist/types/core/rpc/interfaces/index.d.ts

Declarations

export * from '../../../rpc/interfaces/index.js';

phantasma-sdk-ts/core/rpc/phantasma

Source: dist/types/core/rpc/phantasma.d.ts

Declarations

export * from '../../rpc/phantasma.js';

phantasma-sdk-ts/core/tx/ContractArtifacts

Source: dist/types/core/tx/ContractArtifacts.d.ts

Declarations

export * from '../../tx/contract-artifacts.js';

phantasma-sdk-ts/core/tx/ContractTxHelper

Source: dist/types/core/tx/ContractTxHelper.d.ts

Declarations

export * from '../../tx/contract-tx-helper.js';

phantasma-sdk-ts/core/tx/ExecutionState

Source: dist/types/core/tx/ExecutionState.d.ts

Declarations

export * from '../../tx/execution-state.js';

phantasma-sdk-ts/core/tx/Transaction

Source: dist/types/core/tx/Transaction.d.ts

Declarations

export * from '../../tx/transaction.js';

phantasma-sdk-ts/core/tx

Source: dist/types/core/tx/index.d.ts

Declarations

export * from '../../tx/index.js';

phantasma-sdk-ts/core/tx/utils

Source: dist/types/core/tx/utils.d.ts

Declarations

export * from '../../tx/utils.js';

phantasma-sdk-ts/core/types/Address

Source: dist/types/core/types/Address.d.ts

Declarations

export * from '../../types/address.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/CarbonTokenFlags

Source: dist/types/core/types/Carbon/Blockchain/CarbonTokenFlags.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/carbon-token-flags.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Extensions/TxMsgSigner

Source: dist/types/core/types/Carbon/Blockchain/Extensions/TxMsgSigner.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/extensions/tx-msg-signer.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Extensions

Source: dist/types/core/types/Carbon/Blockchain/Extensions/index.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/extensions/index.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/ModuleId

Source: dist/types/core/types/Carbon/Blockchain/ModuleId.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/module-id.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders/IdHelper

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/IdHelper.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/id-helper.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders/MetadataHelper

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/MetadataHelper.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/metadata-helper.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders/NftRomBuilder

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/NftRomBuilder.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/nft-rom-builder.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders/PhantasmaNftRomBuilder

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/PhantasmaNftRomBuilder.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/phantasma-nft-rom-builder.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders/SeriesInfoBuilder

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/SeriesInfoBuilder.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/series-info-builder.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders/TokenInfoBuilder

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/TokenInfoBuilder.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/token-info-builder.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders/TokenMetadataBuilder

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/TokenMetadataBuilder.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/token-metadata-builder.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders/TokenSchemasBuilder

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/TokenSchemasBuilder.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/token-schemas-builder.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders/TokenSeriesMetadataBuilder

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/TokenSeriesMetadataBuilder.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/token-series-metadata-builder.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/Builders

Source: dist/types/core/types/Carbon/Blockchain/Modules/Builders/index.d.ts

Declarations

export * from '../../../../../../types/carbon/blockchain/modules/builders/index.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/MintPhantasmaNonFungibleArgs

Source: dist/types/core/types/Carbon/Blockchain/Modules/MintPhantasmaNonFungibleArgs.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/mint-phantasma-non-fungible-args.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/PhantasmaNftMintInfo

Source: dist/types/core/types/Carbon/Blockchain/Modules/PhantasmaNftMintInfo.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/phantasma-nft-mint-info.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/PhantasmaNftMintResult

Source: dist/types/core/types/Carbon/Blockchain/Modules/PhantasmaNftMintResult.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/phantasma-nft-mint-result.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/SeriesInfo

Source: dist/types/core/types/Carbon/Blockchain/Modules/SeriesInfo.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/series-info.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/StandardMeta

Source: dist/types/core/types/Carbon/Blockchain/Modules/StandardMeta.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/standard-meta.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/TokenContract_Methods

Source: dist/types/core/types/Carbon/Blockchain/Modules/TokenContract_Methods.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/token-contract-methods.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/TokenHelper

Source: dist/types/core/types/Carbon/Blockchain/Modules/TokenHelper.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/token-helper.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/TokenInfo

Source: dist/types/core/types/Carbon/Blockchain/Modules/TokenInfo.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/token-info.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/TokenListing

Source: dist/types/core/types/Carbon/Blockchain/Modules/TokenListing.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/token-listing.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules/TokenSchemas

Source: dist/types/core/types/Carbon/Blockchain/Modules/TokenSchemas.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/token-schemas.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Modules

Source: dist/types/core/types/Carbon/Blockchain/Modules/index.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/modules/index.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/SignedTxMsg

Source: dist/types/core/types/Carbon/Blockchain/SignedTxMsg.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/signed-tx-msg.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxHelpers/CreateTokenSeriesTxHelper

Source: dist/types/core/types/Carbon/Blockchain/TxHelpers/CreateTokenSeriesTxHelper.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/tx-helpers/create-token-series-tx-helper.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxHelpers/CreateTokenTxHelper

Source: dist/types/core/types/Carbon/Blockchain/TxHelpers/CreateTokenTxHelper.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/tx-helpers/create-token-tx-helper.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxHelpers/MintPhantasmaNonFungibleTxHelper

Source: dist/types/core/types/Carbon/Blockchain/TxHelpers/MintPhantasmaNonFungibleTxHelper.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/tx-helpers/mint-phantasma-non-fungible-tx-helper.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxHelpers

Source: dist/types/core/types/Carbon/Blockchain/TxHelpers/index.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/tx-helpers/index.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsg

Source: dist/types/core/types/Carbon/Blockchain/TxMsg.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgBurnFungible

Source: dist/types/core/types/Carbon/Blockchain/TxMsgBurnFungible.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-burn-fungible.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgBurnFungibleGasPayer

Source: dist/types/core/types/Carbon/Blockchain/TxMsgBurnFungibleGasPayer.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-burn-fungible-gas-payer.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgBurnNonFungible

Source: dist/types/core/types/Carbon/Blockchain/TxMsgBurnNonFungible.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-burn-non-fungible.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgBurnNonFungibleGasPayer

Source: dist/types/core/types/Carbon/Blockchain/TxMsgBurnNonFungibleGasPayer.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-burn-non-fungible-gas-payer.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgCall

Source: dist/types/core/types/Carbon/Blockchain/TxMsgCall.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-call.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgCallMulti

Source: dist/types/core/types/Carbon/Blockchain/TxMsgCallMulti.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-call-multi.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgMintFungible

Source: dist/types/core/types/Carbon/Blockchain/TxMsgMintFungible.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-mint-fungible.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgMintNonFungible

Source: dist/types/core/types/Carbon/Blockchain/TxMsgMintNonFungible.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-mint-non-fungible.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgPhantasma

Source: dist/types/core/types/Carbon/Blockchain/TxMsgPhantasma.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-phantasma.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgPhantasmaRaw

Source: dist/types/core/types/Carbon/Blockchain/TxMsgPhantasmaRaw.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-phantasma-raw.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgSpecialResolution

Source: dist/types/core/types/Carbon/Blockchain/TxMsgSpecialResolution.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-special-resolution.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgTrade

Source: dist/types/core/types/Carbon/Blockchain/TxMsgTrade.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-trade.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgTransferFungible

Source: dist/types/core/types/Carbon/Blockchain/TxMsgTransferFungible.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-transfer-fungible.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgTransferFungibleGasPayer

Source: dist/types/core/types/Carbon/Blockchain/TxMsgTransferFungibleGasPayer.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-transfer-fungible-gas-payer.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgTransferNonFungibleMulti

Source: dist/types/core/types/Carbon/Blockchain/TxMsgTransferNonFungibleMulti.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-transfer-non-fungible-multi.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgTransferNonFungibleMultiGasPayer

Source: dist/types/core/types/Carbon/Blockchain/TxMsgTransferNonFungibleMultiGasPayer.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-transfer-non-fungible-multi-gas-payer.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgTransferNonFungibleSingle

Source: dist/types/core/types/Carbon/Blockchain/TxMsgTransferNonFungibleSingle.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-transfer-non-fungible-single.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/TxMsgTransferNonFungibleSingleGasPayer

Source: dist/types/core/types/Carbon/Blockchain/TxMsgTransferNonFungibleSingleGasPayer.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/tx-msg-transfer-non-fungible-single-gas-payer.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm/VmDynamicStruct

Source: dist/types/core/types/Carbon/Blockchain/Vm/VmDynamicStruct.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/vm-dynamic-struct.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm/VmDynamicVariable

Source: dist/types/core/types/Carbon/Blockchain/Vm/VmDynamicVariable.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/vm-dynamic-variable.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm/VmNamedDynamicVariable

Source: dist/types/core/types/Carbon/Blockchain/Vm/VmNamedDynamicVariable.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/vm-named-dynamic-variable.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm/VmNamedVariableSchema

Source: dist/types/core/types/Carbon/Blockchain/Vm/VmNamedVariableSchema.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/vm-named-variable-schema.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm/VmStructArray

Source: dist/types/core/types/Carbon/Blockchain/Vm/VmStructArray.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/vm-struct-array.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm/VmStructFlags

Source: dist/types/core/types/Carbon/Blockchain/Vm/VmStructFlags.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/vm-struct-flags.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm/VmStructSchema

Source: dist/types/core/types/Carbon/Blockchain/Vm/VmStructSchema.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/vm-struct-schema.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm/VmType

Source: dist/types/core/types/Carbon/Blockchain/Vm/VmType.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/vm-type.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm/VmVariableSchema

Source: dist/types/core/types/Carbon/Blockchain/Vm/VmVariableSchema.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/vm-variable-schema.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain/Vm

Source: dist/types/core/types/Carbon/Blockchain/Vm/index.d.ts

Declarations

export * from '../../../../../types/carbon/blockchain/vm/index.js';

phantasma-sdk-ts/core/types/Carbon/Blockchain

Source: dist/types/core/types/Carbon/Blockchain/index.d.ts

Declarations

export * from '../../../../types/carbon/blockchain/index.js';

phantasma-sdk-ts/core/types/Carbon/Bytes16

Source: dist/types/core/types/Carbon/Bytes16.d.ts

Declarations

export * from '../../../types/carbon/bytes16.js';

phantasma-sdk-ts/core/types/Carbon/Bytes32

Source: dist/types/core/types/Carbon/Bytes32.d.ts

Declarations

export * from '../../../types/carbon/bytes32.js';

phantasma-sdk-ts/core/types/Carbon/Bytes64

Source: dist/types/core/types/Carbon/Bytes64.d.ts

Declarations

export * from '../../../types/carbon/bytes64.js';

phantasma-sdk-ts/core/types/Carbon/CarbonBlob

Source: dist/types/core/types/Carbon/CarbonBlob.d.ts

Declarations

export * from '../../../types/carbon/carbon-blob.js';

phantasma-sdk-ts/core/types/Carbon/IntX

Source: dist/types/core/types/Carbon/IntX.d.ts

Declarations

export * from '../../../types/carbon/int-x.js';

phantasma-sdk-ts/core/types/Carbon/SmallString

Source: dist/types/core/types/Carbon/SmallString.d.ts

Declarations

export * from '../../../types/carbon/small-string.js';

phantasma-sdk-ts/core/types/Carbon/TxTypes

Source: dist/types/core/types/Carbon/TxTypes.d.ts

Declarations

export * from '../../../types/carbon/tx-types.js';

phantasma-sdk-ts/core/types/Carbon/Witness

Source: dist/types/core/types/Carbon/Witness.d.ts

Declarations

export * from '../../../types/carbon/witness.js';

phantasma-sdk-ts/core/types/Carbon

Source: dist/types/core/types/Carbon/index.d.ts

Declarations

export * from '../../../types/carbon/index.js';

phantasma-sdk-ts/core/types/CarbonSerialization

Source: dist/types/core/types/CarbonSerialization.d.ts

Declarations

export * from '../../types/carbon-serialization.js';

phantasma-sdk-ts/core/types/Consensus

Source: dist/types/core/types/Consensus.d.ts

Declarations

export * from '../../types/consensus.js';

phantasma-sdk-ts/core/types/Contract

Source: dist/types/core/types/Contract.d.ts

Declarations

export * from '../../types/contract.js';

phantasma-sdk-ts/core/types/DomainSettings

Source: dist/types/core/types/DomainSettings.d.ts

Declarations

export * from '../../types/domain-settings.js';

phantasma-sdk-ts/core/types/Ed25519

Source: dist/types/core/types/Ed25519.d.ts

Declarations

export * from '../../types/ed25519.js';

phantasma-sdk-ts/core/types/Ed25519Signature

Source: dist/types/core/types/Ed25519Signature.d.ts

Declarations

export * from '../../types/ed25519-signature.js';

phantasma-sdk-ts/core/types/Entropy

Source: dist/types/core/types/Entropy.d.ts

Declarations

export * from '../../types/entropy.js';

phantasma-sdk-ts/core/types/Extensions/Base16

Source: dist/types/core/types/Extensions/Base16.d.ts

Declarations

export * from '../../../types/extensions/base16.js';

phantasma-sdk-ts/core/types/Extensions/Describer

Source: dist/types/core/types/Extensions/Describer.d.ts

Declarations

export * from '../../../types/extensions/describer.js';

phantasma-sdk-ts/core/types/Extensions/PBinaryReader

Source: dist/types/core/types/Extensions/PBinaryReader.d.ts

Declarations

export * from '../../../types/extensions/p-binary-reader.js';

phantasma-sdk-ts/core/types/Extensions/PBinaryWriter

Source: dist/types/core/types/Extensions/PBinaryWriter.d.ts

Declarations

export * from '../../../types/extensions/p-binary-writer.js';

phantasma-sdk-ts/core/types/Extensions

Source: dist/types/core/types/Extensions/index.d.ts

Declarations

export * from '../../../types/extensions/index.js';

phantasma-sdk-ts/core/types/PhantasmaBigIntSerialization

Source: dist/types/core/types/PhantasmaBigIntSerialization.d.ts

Declarations

export * from '../../types/phantasma-big-int-serialization.js';

phantasma-sdk-ts/core/types/PhantasmaKeys

Source: dist/types/core/types/PhantasmaKeys.d.ts

Declarations

export * from '../../types/phantasma-keys.js';

phantasma-sdk-ts/core/types/Serialization

Source: dist/types/core/types/Serialization.d.ts

Declarations

export * from '../../types/serialization.js';

phantasma-sdk-ts/core/types/Stack

Source: dist/types/core/types/Stack.d.ts

Declarations

export * from '../../types/stack.js';

phantasma-sdk-ts/core/types/Timestamp

Source: dist/types/core/types/Timestamp.d.ts

Declarations

export * from '../../types/timestamp.js';

phantasma-sdk-ts/core/types

Source: dist/types/core/types/index.d.ts

Declarations

export * from '../../types/index.js';

phantasma-sdk-ts/core/utils/Hex

Source: dist/types/core/utils/Hex.d.ts

Declarations

export * from '../../utils/hex.js';

phantasma-sdk-ts/core/utils/ValidationUtils

Source: dist/types/core/utils/ValidationUtils.d.ts

Declarations

export * from '../../utils/validation-utils.js';

phantasma-sdk-ts/core/utils

Source: dist/types/core/utils/index.d.ts

Declarations

export * from '../../utils/index.js';

phantasma-sdk-ts/core/utils/logger

Source: dist/types/core/utils/logger.d.ts

Declarations

export * from '../../utils/logger.js';

phantasma-sdk-ts/core/vm/Contracts

Source: dist/types/core/vm/Contracts.d.ts

Declarations

export * from '../../vm/contracts.js';

phantasma-sdk-ts/core/vm/Decoder

Source: dist/types/core/vm/Decoder.d.ts

Declarations

export * from '../../vm/decoder.js';

phantasma-sdk-ts/core/vm/Disassembler

Source: dist/types/core/vm/Disassembler.d.ts

Declarations

export * from '../../vm/disassembler.js';

phantasma-sdk-ts/core/vm/EventData

Source: dist/types/core/vm/EventData.d.ts

Declarations

export * from '../../vm/event-data.js';

phantasma-sdk-ts/core/vm/Opcode

Source: dist/types/core/vm/Opcode.d.ts

Declarations

export * from '../../vm/opcode.js';

phantasma-sdk-ts/core/vm/ScriptBuilder

Source: dist/types/core/vm/ScriptBuilder.d.ts

Declarations

export * from '../../vm/script-builder.js';

phantasma-sdk-ts/core/vm/VMObject

Source: dist/types/core/vm/VMObject.d.ts

Declarations

export * from '../../vm/vm-object.js';

phantasma-sdk-ts/core/vm/VMType

Source: dist/types/core/vm/VMType.d.ts

Declarations

export * from '../../vm/vm-type.js';

phantasma-sdk-ts/core/vm

Source: dist/types/core/vm/index.d.ts

Declarations

export * from '../../vm/index.js';

phantasma-sdk-ts/core/vm/utils/DisasmMethodCall

Source: dist/types/core/vm/utils/DisasmMethodCall.d.ts

Declarations

export * from '../../../vm/utils/disasm-method-call.js';

phantasma-sdk-ts/core/vm/utils/DisasmUtils

Source: dist/types/core/vm/utils/DisasmUtils.d.ts

Declarations

export * from '../../../vm/utils/disasm-utils.js';

phantasma-sdk-ts/core/vm/utils

Source: dist/types/core/vm/utils/index.d.ts

Declarations

export * from '../../../vm/utils/index.js';

phantasma-sdk-ts

Source: dist/types/index.d.ts

Declarations

export * from './core/index.js';
export * as PhantasmaTS from './core/index.js';
export { PhantasmaLink } from './link/phantasma-link.js';
export { EasyConnect } from './link/easy-connect.js';
export * as PhantasmaLinkV5 from './link/v5/index.js';

phantasma-sdk-ts/interfaces/carbon/carbon-blob-like

Source: dist/types/interfaces/carbon/carbon-blob-like.d.ts

Declarations

export interface CarbonBlobLike {
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
}
export type ICarbonBlob = CarbonBlobLike;

phantasma-sdk-ts/interfaces/carbon

Source: dist/types/interfaces/carbon/index.d.ts

Declarations

export * from './carbon-blob-like.js';

phantasma-sdk-ts/interfaces/contract

Source: dist/types/interfaces/contract.d.ts

Declarations

export interface ContractDescriptor {
    name: string;
    abi: ContractInterface;
}
export interface IContract {
    /** @deprecated Use `name` instead. */
    Name: string;
    /** @deprecated Use `abi` instead. */
    ABI: ContractInterface;
}
export declare enum NativeContractKind {
    Gas = 0,
    Block = 1,
    Stake = 2,
    Swap = 3,
    Account = 4,
    Consensus = 5,
    Governance = 6,
    Storage = 7,
    Validator = 8,
    Interop = 9,
    Exchange = 10,
    Privacy = 11,
    Relay = 12,
    Ranking = 13,
    Market = 14,
    Friends = 15,
    Mail = 16,
    Sale = 17,
    Unknown = 18
}

phantasma-sdk-ts/interfaces

Source: dist/types/interfaces/index.d.ts

Declarations

export * from './carbon/index.js';
export * from './stack.js';
export * from './token.js';
export * from './contract.js';
export * from './key-pair.js';
export * from './serializable.js';
export * from './signature.js';

phantasma-sdk-ts/interfaces/key-pair

Source: dist/types/interfaces/key-pair.d.ts

Declarations

export interface KeyPair {
    privateKey: Uint8Array;
    publicKey: Uint8Array;
    sign(msg: Uint8Array): Signature;
}
export interface IKeyPair {
    /** @deprecated Use `privateKey` instead. This alias will be removed in v1.0. */
    PrivateKey: Uint8Array;
    /** @deprecated Use `publicKey` instead. This alias will be removed in v1.0. */
    PublicKey: Uint8Array;
    /** @deprecated Use `sign` instead. This alias will be removed in v1.0. */
    Sign(msg: Uint8Array, customSignFunction?: (message: Uint8Array, privateKey: Uint8Array, publicKey: Uint8Array) => Uint8Array): Signature;
}

phantasma-sdk-ts/interfaces/serializable

Source: dist/types/interfaces/serializable.d.ts

Declarations

export interface Serializable {
    serializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
}
export interface LegacySerializable {
    SerializeData(writer: PBinaryWriter): void;
    UnserializeData(reader: PBinaryReader): void;
}
export type SerializableLike = Serializable | LegacySerializable;
export declare function isSerializableLike(value: unknown): value is SerializableLike;
export declare function serializeSerializable(value: SerializableLike, writer: PBinaryWriter): void;
export declare function unserializeSerializable(value: SerializableLike, reader: PBinaryReader): void;
export declare abstract class ISerializable implements LegacySerializable {
    abstract SerializeData(writer: PBinaryWriter): void;
    abstract UnserializeData(reader: PBinaryReader): void;
}

phantasma-sdk-ts/interfaces/signature

Source: dist/types/interfaces/signature.d.ts

Declarations

export declare enum SignatureKind {
    None = 0,
    Ed25519 = 1,
    ECDSA = 2
}
export declare class ISignature {
    signature: string;
    kind: SignatureKind;
}
export declare abstract class Signature implements ISerializable {
    /** @deprecated Use `bytes` instead. This alias will be removed in v1.0. */
    abstract Bytes: Uint8Array;
    /** @deprecated Use `kind` instead. This alias will be removed in v1.0. */
    abstract Kind: SignatureKind;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    abstract SerializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    abstract UnserializeData(reader: PBinaryReader): void;
    abstract verifyMultiple(message: Uint8Array, addresses: Address[]): boolean;
    get bytes(): Uint8Array;
    set bytes(value: Uint8Array);
    get kind(): SignatureKind;
    set kind(value: SignatureKind);
    serializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    verify(message: Uint8Array, address: Address): boolean;
    /** @deprecated Use `verifyMultiple` instead. This alias will be removed in v1.0. */
    VerifyMultiple(message: Uint8Array, addresses: Address[]): boolean;
    /** @deprecated Use `verify` instead. This alias will be removed in v1.0. */
    Verify(message: Uint8Array, address: Address): boolean;
    toByteArray(): Uint8Array;
    /** @deprecated Use `toByteArray` instead. This alias will be removed in v1.0. */
    ToByteArray(): Uint8Array;
}

phantasma-sdk-ts/interfaces/stack

Source: dist/types/interfaces/stack.d.ts

Declarations

export interface StackLike<T> {
    push(item: T): void;
    pop(): T | undefined;
    peek(): T | undefined;
    size(): number;
}
export type IStack<T> = StackLike<T>;

phantasma-sdk-ts/interfaces/token

Source: dist/types/interfaces/token.d.ts

Declarations

export declare enum TokenFlags {
    None = 0,
    Transferable = 1,
    Fungible = 2,
    Finite = 4,
    Divisible = 8,
    Fuel = 16,
    Stakable = 32,
    Fiat = 64,
    Swappable = 128,
    Burnable = 256
}
export declare enum TokenSeriesMode {
    Unique = 0,
    Duplicated = 1
}
export interface TokenDescriptor {
    readonly name: string;
    readonly symbol: string;
    readonly owner: Address;
    readonly flags: TokenFlags;
    readonly maxSupply: BigInteger;
    readonly decimals: number;
    readonly script: Uint8Array;
    readonly abi: ContractInterface;
}
export interface IToken {
    /** @deprecated Use `name` instead. */
    readonly Name: string;
    /** @deprecated Use `symbol` instead. */
    readonly Symbol: string;
    /** @deprecated Use `owner` instead. */
    readonly Owner: Address;
    /** @deprecated Use `flags` instead. */
    readonly Flags: TokenFlags;
    /** @deprecated Use `maxSupply` instead. */
    readonly MaxSupply: BigInteger;
    /** @deprecated Use `decimals` instead. */
    readonly Decimals: number;
    /** @deprecated Use `script` instead. */
    readonly Script: Uint8Array;
    /** @deprecated Use `abi` instead. */
    readonly ABI: ContractInterface;
}

phantasma-sdk-ts/ledger/address-transcode

Source: dist/types/ledger/address-transcode.d.ts

Declarations

export declare const getAddressFromPrivateKey: (privateKey: string) => string;
export declare const GetAddressFromPrivateKey: (privateKey: string) => string;
export declare const getAddressFromPublicKey: (publicKey: string) => string;
export declare const GetAddressFromPublicKey: (publicKey: string) => string;
export declare const getAddressPublicKeyFromPublicKey: (publicKey: string) => Address;
export declare const GetAddressPublicKeyFromPublicKey: (publicKey: string) => Address;

phantasma-sdk-ts/ledger

Source: dist/types/ledger/index.d.ts

Declarations

export * from './mnemonic.js';
export * from './address-transcode.js';
export * from './interfaces/ledger-config.js';
export * from './ledger-utils.js';
export * from './ledger-commands.js';
export * from './transaction-transcode.js';
export * from './transaction-sign.js';
export * from './interfaces/index.js';

phantasma-sdk-ts/ledger/interfaces/application-name-response

Source: dist/types/ledger/interfaces/application-name-response.d.ts

Declarations

export interface ApplicationNameResponse {
    success: boolean;
    message: string;
    applicationName?: string;
}

phantasma-sdk-ts/ledger/interfaces/device-response

Source: dist/types/ledger/interfaces/device-response.d.ts

Declarations

export interface DeviceResponse {
    enabled: boolean;
    error: boolean;
    message?: string;
    device?: LedgerTransportDevice;
}

phantasma-sdk-ts/ledger/interfaces/device

Source: dist/types/ledger/interfaces/device.d.ts

Declarations

export interface LedgerTransportDevice {
    exchange(request: Buffer): Promise<Buffer>;
    close(): Promise<void>;
}
export interface Device {
    enabled: boolean;
    error?: boolean;
    message?: string;
    device?: LedgerTransportDevice;
}

phantasma-sdk-ts/ledger/interfaces

Source: dist/types/ledger/interfaces/index.d.ts

Declarations

export * from './application-name-response.js';
export * from './device.js';
export * from './device-response.js';
export * from './ledger.js';
export * from './ledger-config.js';
export * from './ledger-device-info-response.js';
export * from './public-key-response.js';
export * from './sign-response.js';
export * from './version-response.js';
export * from './ledger-balance-from-ledger-response.js';
export * from './ledger-signer.js';
export * from './ledger-signer-data.js';
export * from './ledger-send-transaction-response.js';

phantasma-sdk-ts/ledger/interfaces/ledger-balance-from-ledger-response

Source: dist/types/ledger/interfaces/ledger-balance-from-ledger-response.d.ts

Declarations

export interface LedgerBalanceFromLedgerResponse {
    success: boolean;
    message: string;
    publicKey?: string;
    address?: Address;
    balances?: Map<string, string>;
}

phantasma-sdk-ts/ledger/interfaces/ledger-config

Source: dist/types/ledger/interfaces/ledger-config.d.ts

Declarations

export interface LedgerTransport {
    isSupported(): Promise<boolean>;
    list(): Promise<string[]>;
    open(path: string): Promise<LedgerTransportDevice>;
}
export interface LedgerBip39 {
    mnemonicToSeedSync(mnemonic: string): Uint8Array | Buffer;
    entropyToMnemonic(entropy: string): string;
}
export interface LedgerBip32Node {
    privateKey: Uint8Array | Buffer;
    derivePath(path: string): LedgerBip32Node;
}
export interface LedgerBip32 {
    fromSeed(seed: Uint8Array): LedgerBip32Node;
}
export type LedgerBip32Factory = (curve: unknown) => LedgerBip32;
export interface LedgerClientConfig {
    debug?: boolean;
    transport: LedgerTransport;
    bip39: LedgerBip39;
    bip32Factory: LedgerBip32Factory;
    curve: unknown;
    nexusName: string;
    chainName: string;
    payload?: string;
    tokenNames?: string[];
    rpc: PhantasmaAPI;
    gasPrice?: number;
    gasLimit?: number;
    verifyResponse?: boolean;
}
export interface LedgerConfig {
    /** @deprecated Use `debug` on `LedgerClientConfig` instead. */
    Debug: boolean;
    /** @deprecated Use `transport` on `LedgerClientConfig` instead. */
    Transport: LedgerTransport;
    /** @deprecated Use `bip39` on `LedgerClientConfig` instead. */
    Bip39: LedgerBip39;
    /** @deprecated Use `bip32Factory` on `LedgerClientConfig` instead. */
    Bip32Factory: LedgerBip32Factory;
    /** @deprecated Use `curve` on `LedgerClientConfig` instead. */
    Curve: unknown;
    /** @deprecated Use `nexusName` on `LedgerClientConfig` instead. */
    NexusName: string;
    /** @deprecated Use `chainName` on `LedgerClientConfig` instead. */
    ChainName: string;
    /** @deprecated Use `payload` on `LedgerClientConfig` instead. */
    Payload: string;
    /** @deprecated Use `tokenNames` on `LedgerClientConfig` instead. */
    TokenNames: string[];
    /** @deprecated Use `rpc` on `LedgerClientConfig` instead. */
    RPC: PhantasmaAPI;
    /** @deprecated Use `gasPrice` on `LedgerClientConfig` instead. */
    GasPrice: number;
    /** @deprecated Use `gasLimit` on `LedgerClientConfig` instead. */
    GasLimit: number;
    /** @deprecated Use `verifyResponse` on `LedgerClientConfig` instead. */
    VerifyResponse: boolean;
}
export type LedgerCompatibleConfig = LedgerClientConfig | LedgerConfig;
export interface NormalizedLedgerConfig {
    debug: boolean;
    transport: LedgerTransport;
    bip39: LedgerBip39;
    bip32Factory: LedgerBip32Factory;
    curve: unknown;
    nexusName: string;
    chainName: string;
    payload: string;
    tokenNames: string[];
    rpc: PhantasmaAPI;
    gasPrice: number;
    gasLimit: number;
    verifyResponse: boolean;
}
export declare function getLedgerDebug(config: LedgerCompatibleConfig): boolean;
export declare function getLedgerTransport(config: LedgerCompatibleConfig): LedgerTransport;
export declare function getLedgerBip39(config: LedgerCompatibleConfig): LedgerBip39;
export declare function getLedgerBip32Factory(config: LedgerCompatibleConfig): LedgerBip32Factory;
export declare function getLedgerCurve(config: LedgerCompatibleConfig): unknown;
export declare function getLedgerNexusName(config: LedgerCompatibleConfig): string;
export declare function getLedgerChainName(config: LedgerCompatibleConfig): string;
export declare function getLedgerPayload(config: LedgerCompatibleConfig): string;
export declare function getLedgerTokenNames(config: LedgerCompatibleConfig): string[];
export declare function getLedgerRpc(config: LedgerCompatibleConfig): PhantasmaAPI;
export declare function getLedgerGasPrice(config: LedgerCompatibleConfig): number;
export declare function getLedgerGasLimit(config: LedgerCompatibleConfig): number;
export declare function getLedgerVerifyResponse(config: LedgerCompatibleConfig): boolean;
export declare function normalizeLedgerConfig(config: LedgerCompatibleConfig): NormalizedLedgerConfig;

phantasma-sdk-ts/ledger/interfaces/ledger-device-info-response

Source: dist/types/ledger/interfaces/ledger-device-info-response.d.ts

Declarations

export interface LedgerDeviceInfoResponse {
    version: VersionResponse;
    applicationName: ApplicationNameResponse;
}

phantasma-sdk-ts/ledger/interfaces/ledger-send-transaction-response

Source: dist/types/ledger/interfaces/ledger-send-transaction-response.d.ts

Declarations

export interface LedgerSendTransactionResponse {
    success: boolean;
    message: string;
}

phantasma-sdk-ts/ledger/interfaces/ledger-signer-data

Source: dist/types/ledger/interfaces/ledger-signer-data.d.ts

Declarations

export interface LedgerSignerData {
    success: boolean;
    message: string;
    publicKey?: string;
    address?: Address;
}

phantasma-sdk-ts/ledger/interfaces/ledger-signer

Source: dist/types/ledger/interfaces/ledger-signer.d.ts

Declarations

export interface LedgerSigner {
    GetPublicKey: () => string;
    GetAccount: () => Address;
}
export interface LedgerAccountSigner extends LedgerSigner {
    getPublicKey: () => string;
    getAccount: () => Address;
}

phantasma-sdk-ts/ledger/interfaces/ledger

Source: dist/types/ledger/interfaces/ledger.d.ts

Declarations

export interface Ledger {
    device: Device;
    publicKey: string;
    address: string;
    signature: string;
    error?: boolean;
    message?: string;
}
export type ILedger = Ledger;

phantasma-sdk-ts/ledger/interfaces/public-key-response

Source: dist/types/ledger/interfaces/public-key-response.d.ts

Declarations

export interface PublicKeyResponse {
    success: boolean;
    message: string;
    publicKey?: string;
}

phantasma-sdk-ts/ledger/interfaces/sign-response

Source: dist/types/ledger/interfaces/sign-response.d.ts

Declarations

export interface SignResponse {
    success: boolean;
    message: string;
    signature?: string;
}

phantasma-sdk-ts/ledger/interfaces/version-response

Source: dist/types/ledger/interfaces/version-response.d.ts

Declarations

export interface VersionResponse {
    success: boolean;
    message: string;
    version?: string;
}

phantasma-sdk-ts/ledger/ledger-commands

Source: dist/types/ledger/ledger-commands.d.ts

Declarations

export declare const leftPad: (number: string | number, length: number) => string;
export declare const LeftPad: (number: string | number, length: number) => string;
export declare const toWholeNumber: (balance: string | number, decimals: number) => string;
export declare const ToWholeNumber: (balance: string | number, decimals: number) => string;
export declare const getLedgerDeviceInfo: (config: LedgerCompatibleConfig) => Promise<LedgerDeviceInfoResponse>;
export declare const GetLedgerDeviceInfo: (config: LedgerCompatibleConfig) => Promise<LedgerDeviceInfoResponse>;
export declare const getLedgerAccountSigner: (config: LedgerCompatibleConfig, accountIx: number) => Promise<LedgerAccountSigner>;
export declare const GetLedgerAccountSigner: (config: LedgerCompatibleConfig, accountIx: number) => Promise<LedgerAccountSigner>;
export declare function getLedgerSignerData(config: LedgerCompatibleConfig, options: LedgerPublicKeyOptions): Promise<LedgerSignerData>;
export declare const GetLedgerSignerData: typeof getLedgerSignerData;
export declare const getBalanceFromLedger: (config: LedgerCompatibleConfig, options: LedgerPublicKeyOptions) => Promise<LedgerBalanceFromLedgerResponse>;
export declare const GetBalanceFromLedger: (config: LedgerCompatibleConfig, options: LedgerPublicKeyOptions) => Promise<LedgerBalanceFromLedgerResponse>;
export declare const getAddressFromLedger: (config: LedgerCompatibleConfig, options: LedgerPublicKeyOptions) => Promise<string | PublicKeyResponse>;
export declare const GetAddressFromLedeger: (config: LedgerCompatibleConfig, options: LedgerPublicKeyOptions) => Promise<string | PublicKeyResponse>;
export declare const SignEncodedTx: typeof signEncodedTx;
export declare function sendTransactionLedger(config: LedgerCompatibleConfig, script: string): Promise<LedgerSendTransactionResponse>;
export declare const SendTransactionLedger: typeof sendTransactionLedger;
export declare const getBalanceFromPrivateKey: (config: LedgerCompatibleConfig, privateKey: string) => Promise<LedgerBalanceFromLedgerResponse>;
export declare const GetBalanceFromPrivateKey: (config: LedgerCompatibleConfig, privateKey: string) => Promise<LedgerBalanceFromLedgerResponse>;
export declare const getBalanceFromMnemonic: (config: LedgerCompatibleConfig, mnemonic: string, index: string) => Promise<LedgerBalanceFromLedgerResponse>;
export declare const GetBalanceFromMnemonic: (config: LedgerCompatibleConfig, mnemonic: string, index: string) => Promise<LedgerBalanceFromLedgerResponse>;
export {};

phantasma-sdk-ts/ledger/ledger-utils

Source: dist/types/ledger/ledger-utils.d.ts

Declarations

export declare const MAX_SIGNED_TX_LEN = 1024;
export interface LedgerPublicKeyOptions {
    verifyOnDevice?: boolean;
    debug?: boolean;
}
export declare const bip44Path: string;
export declare const ledgerErrorDescriptions: Record<string, string>;
export declare const Bip44Path: string;
export declare const ErrorDescriptions: Record<string, string>;
export declare const getErrorMessage: (responseStr: string) => string;
export declare const GetErrorMessage: (responseStr: string) => string;
export declare const getDevice: (transport: LedgerTransport) => Promise<DeviceResponse>;
export declare const GetDevice: (transport: LedgerTransport) => Promise<DeviceResponse>;
export declare const getApplicationName: (transport: LedgerTransport) => Promise<ApplicationNameResponse>;
export declare const GetApplicationName: (transport: LedgerTransport) => Promise<ApplicationNameResponse>;
export declare const getVersion: (transport: LedgerTransport) => Promise<VersionResponse>;
export declare const GetVersion: (transport: LedgerTransport) => Promise<VersionResponse>;
export declare const getBip44PathMessage: (messagePrefix: Buffer) => Buffer;
export declare const GetBip44PathMessage: (messagePrefix: Buffer) => Buffer;
export declare const getPublicKey: (transport: LedgerTransport, options: LedgerPublicKeyOptions) => Promise<PublicKeyResponse>;
export declare const GetPublicKey: (transport: LedgerTransport, options: LedgerPublicKeyOptions) => Promise<PublicKeyResponse>;
export declare const chunkString: (str: string, length: number) => string[];
export declare const ChunkString: (str: string, length: number) => string[];
export declare const splitMessageIntoChunks: (ledgerMessage: string) => Buffer[];
export declare const SplitMessageIntoChunks: (ledgerMessage: string) => Buffer[];
export declare const decodeSignature: (response: string) => string;
export declare const DecodeSignature: (response: string) => string;
export declare const signLedger: (transport: LedgerTransport, transactionHex: string) => Promise<SignResponse>;
export declare const SignLedger: (transport: LedgerTransport, transactionHex: string) => Promise<SignResponse>;

phantasma-sdk-ts/ledger/mnemonic

Source: dist/types/ledger/mnemonic.d.ts

Declarations

export declare const SOUL_COIN: number;
export declare const getPrivateKeyFromMnemonic: (config: LedgerCompatibleConfig, mnemonic: string, index: string) => string;
export declare const GetPrivateKeyFromMnemonic: (config: LedgerCompatibleConfig, mnemonic: string, index: string) => string;
export declare const getPrivateKeyFromSeed: (config: LedgerCompatibleConfig, seed: string, index: string) => string;
export declare const GetPrivateKeyFromSeed: (config: LedgerCompatibleConfig, seed: string, index: string) => string;
export declare const getPoltergeistMnemonic: (config: LedgerCompatibleConfig, mnemonic: string, index: string) => string;
export declare const GetPoltergeistMnemonic: (config: LedgerCompatibleConfig, mnemonic: string, index: string) => string;
export declare const getBip44Path: (index: string) => string;
export declare const GetBip44Path: (index: string) => string;

phantasma-sdk-ts/ledger/transaction-sign

Source: dist/types/ledger/transaction-sign.d.ts

Declarations

export declare const privateToDer: (privateKeyHex: string) => Buffer;
export declare const PrivateToDer: (privateKeyHex: string) => Buffer;
export declare const publicToDer: (publicKeyHex: string) => Buffer;
export declare const PublicToDer: (publicKeyHex: string) => Buffer;
export declare const publicToPem: (publicKeyHex: string) => string;
export declare const PublicToPem: (publicKeyHex: string) => string;
export declare const signBytes: (hash: Buffer, privateKey: Buffer) => string;
export declare const SignBytes: (hash: Buffer, privateKey: Buffer) => string;
export declare const getHash: (encodedTx: string) => Buffer;
export declare const GetHash: (encodedTx: string) => Buffer;
export declare const sign: (encodedTx: string, privateKeyHex: string) => string;
export declare const Sign: (encodedTx: string, privateKeyHex: string) => string;
export declare const verify: (encodedTx: string, signatureHex: string, publicKeyHex: string) => boolean;
export declare const Verify: (encodedTx: string, signatureHex: string, publicKeyHex: string) => boolean;
export declare const getPublicFromPrivate: (privateKey: string) => string;
export declare const GetPublicFromPrivate: (privateKey: string) => string;

phantasma-sdk-ts/ledger/transaction-transcode

Source: dist/types/ledger/transaction-transcode.d.ts

Declarations

export declare const getDateAsUTCSeconds: (expirationDate: Date) => number;
export declare const GetDateAsUTCSeconds: (expirationDate: Date) => number;
export declare const getExpirationDate: (expirationMinutes?: number) => Date;
export declare const GetExpirationDate: (expirationMinutes?: number) => Date;
export declare const encodeSendTxWithSignature: (transaction: Transaction) => string;
export declare const EncodeSendTxWithSignature: (transaction: Transaction) => string;
export declare const encodeSendTxWithoutSignature: (transaction: Transaction) => string;
export declare const EncodeSendTxWithoutSignature: (transaction: Transaction) => string;

phantasma-sdk-ts/link/easy-connect

Source: dist/types/link/easy-connect.d.ts

Declarations

export declare class EasyConnect {
    requiredVersion: number;
    platform: string;
    providerHint: string;
    link: PhantasmaLink;
    connected: boolean;
    script: EasyScript;
    nexus: Nexus | null;
    constructor(_options?: string[] | null);
    setConfig(_provider: string): void;
    connect(onSuccess?: EasyCallback, onFail?: EasyCallback): void;
    disconnect(_message?: string): void;
    query(_type?: string | null, _arguments?: string[] | null, _callback?: EasyCallback): Promise<string | import("../index.js").Balance[] | import("./index.js").LinkAccount | null | undefined>;
    action(_type?: string | null, _arguments?: EasyArguments | null, onSuccess?: EasyCallback, onFail?: EasyCallback): Promise<void>;
    signTransaction(script: string, payload?: string | null, onSuccess?: EasyCallback, onFail?: EasyCallback): void;
    signData(data: string, onSuccess?: EasyCallback, onFail?: EasyCallback): void;
    signCarbonTransaction(txMsg: TxMsg, onSuccess?: EasyCallback, onFail?: EasyCallback): void;
    signPrebuiltTransaction(tx: Transaction, onSuccess?: EasyCallback, onFail?: EasyCallback): void;
    invokeScript(script: string, _callback: EasyCallback): void;
    deployContract(script: string, payload?: null, proofOfWork?: ProofOfWork, onSuccess?: EasyCallback, onFail?: EasyCallback): void;
}
export {};

phantasma-sdk-ts/link/easy-script

Source: dist/types/link/easy-script.d.ts

Declarations

export declare enum Nexus {
    Mainnet = "mainnet",
    Simnet = "simnet",
    Testnet = "testnet"
}
export declare class EasyScript {
    nexus: Nexus;
    sb: ScriptBuilder;
    constructor(nexus?: Nexus);
    buildScript(_type: string, _options?: unknown[]): string;
}

phantasma-sdk-ts/link

Source: dist/types/link/index.d.ts

Declarations

export * from './interfaces/index.js';

phantasma-sdk-ts/link/interfaces/account

Source: dist/types/link/interfaces/account.d.ts

Declarations

export interface LinkAccount {
    alias: string;
    name: string;
    address: string;
    avatar: string;
    platform: string;
    external: string;
    balances: Balance[];
    files: LinkFile[];
}
export type IAccount = LinkAccount;

phantasma-sdk-ts/link/interfaces/file

Source: dist/types/link/interfaces/file.d.ts

Declarations

export interface LinkFile {
    name: string;
    hash: string;
    size: number;
    date: string;
}
export type IFile = LinkFile;

phantasma-sdk-ts/link/interfaces

Source: dist/types/link/interfaces/index.d.ts

Declarations

export * from './file.js';
export * from './account.js';
export * from './proof-of-work.js';

phantasma-sdk-ts/link/interfaces/proof-of-work

Source: dist/types/link/interfaces/proof-of-work.d.ts

Declarations

export declare enum ProofOfWork {
    None = 0,
    Minimal = 5,
    Moderate = 15,
    Hard = 19,
    Heavy = 24,
    Extreme = 30
}

phantasma-sdk-ts/link/phantasma-link

Source: dist/types/link/phantasma-link.d.ts

Declarations

export interface PrebuiltTransactionSignResult {
    success: true;
    signature: string;
    signedTx: string;
}
export declare class PhantasmaLink {
    host: string;
    dapp: string;
    onLogin: ((success: boolean) => void) | null;
    providerHint: string;
    onError: LinkErrorCallback | null;
    socket: PhantasmaLinkSocketLike | null;
    requestCallback: LinkCallback | null;
    socketTransport: 'websocket' | 'injected' | null;
    socketOpen: boolean;
    token: unknown;
    requestID: number;
    account: LinkAccount | null;
    wallet: unknown;
    messageLogging: boolean;
    version: number;
    nexus: string;
    chain: string;
    platform: string;
    constructor(dappID: string, logging?: boolean);
    onMessage: (msg: string) => void;
    login(onLoginCallback: (success: boolean) => void, onErrorCallback: LinkErrorCallback, version?: number, platform?: string, providerHint?: string): void;
    invokeScript(script: string, callback: (message: string | LinkResponse) => void): void;
    signTx(script: string, payload: string | null, callback: LinkCallback, onErrorCallback: LinkErrorCallback, pow?: ProofOfWork, signature?: string): void;
    signCarbonTxAndBroadcast(txMsg: TxMsg, callback?: LinkCallback, onErrorCallback?: (message?: string) => void): void;
    signTxSignature(tx: string, callback: LinkCallback, onErrorCallback: (message?: string) => void, signature?: string): void;
    signPrebuiltTransaction(tx: Transaction, callback: (result: PrebuiltTransactionSignResult) => void, onErrorCallback: (message?: string) => void, signature?: string): void;
    multiSig(subject: string, callback: LinkCallback, onErrorCallback: () => void, signature?: string): void;
    getPeer(callback: (result: string) => void, onErrorCallback: () => void): void;
    fetchWallet(callback?: LinkCallback, onErrorCallback?: LinkErrorCallback): void;
    getNexus(callback: LinkCallback, onErrorCallback: LinkErrorCallback): void;
    getWalletVersion(callback: LinkCallback, onErrorCallback: LinkErrorCallback): void;
    signData(data: string, callback: LinkCallback, onErrorCallback: (message: string) => void, signature?: string): void;
    createSocket(isResume?: boolean): void;
    toggleMessageLogging(): void;
    resume(token: unknown): void;
    retry(): void;
    set dappID(dapp: string);
    get dappID(): string;
    sendLinkRequest(request: string, callback: LinkCallback): void;
    disconnect(triggered: string | boolean | undefined): void;
}
export {};

phantasma-sdk-ts/link/v5/capabilities

Source: dist/types/link/v5/capabilities.d.ts

Declarations

export interface DappMetadata {
    name: string;
    url: string;
    icon?: string;
    description?: string;
}
export interface MaxPayloadBytes {
    relay?: number;
    deeplink?: number;
    loopback?: number;
    injected?: number;
}
export interface WalletInfo {
    name: string;
    version: string;
    icon?: string;
    /** The wallet's configured RPC node URL (informational; old `getPeer`). */
    rpc?: string;
}
export interface LinkBalance {
    symbol: string;
    value: string;
    decimals: number;
    ids?: string[];
}
export interface LinkAccountV5 {
    address: string;
    name?: string;
    avatar?: string;
    balances?: LinkBalance[];
}
export interface WalletCapabilities {
    /** Protocol versions the wallet speaks (always includes 5 for this generation). */
    plvVersions: number[];
    /** Supported request methods (`pha_*`). */
    methods: string[];
    /** Supported chains as CAIP-2-like ids, e.g. `phantasma:mainnet`. */
    chains: string[];
    /** Supported transaction formats (spec §9.4). */
    txFormats: TxFormat[];
    /** Supported signature schemes (spec §9.7). */
    signatureKinds: SignatureKind[];
    /** Optional feature flags, e.g. `batch`, `events`. */
    features?: string[];
    maxPayloadBytes?: MaxPayloadBytes;
}
export interface Session {
    id: string;
    /** Unix milliseconds at which the session expires (absent = until revoked). */
    expiresAt?: number;
}
export interface ConnectParams {
    dapp: DappMetadata;
    /** dApp ephemeral X25519 public key (base64), present on the custom-scheme ECDH path. */
    pubkey?: string;
    chains?: string[];
    methods?: string[];
    features?: string[];
    /** An existing session id to resume without a new prompt. */
    session?: string;
}
export interface ConnectResult {
    wallet: WalletInfo;
    capabilities: WalletCapabilities;
    account: LinkAccountV5;
    session: Session;
}

phantasma-sdk-ts/link/v5/client

Source: dist/types/link/v5/client.d.ts

Declarations

export interface PhantasmaLink5Options extends LinkSessionClientOptions {
    /** Default dApp identity used by {@link PhantasmaLink5.connect} when none is passed. */
    dapp?: DappMetadata;
    /** Notified on session-state changes: the {@link ConnectResult} after every successful
     * connect/resume, `undefined` after disconnect. Lets an embedder persist session state
     * (the web-deeplink factory stores it; a custom host could keep it elsewhere). */
    onSessionChange?: (connect: ConnectResult | undefined) => void;
}
export declare class PhantasmaLink5 {
    constructor(transport: LinkTransport, options?: PhantasmaLink5Options);
    /** Build a client over the desktop loopback transport (plaintext, trusted-local). */
    static loopback(options?: LoopbackTransportOptions): PhantasmaLink5;
    /** A browser-extension wallet on this page (spec §6.1): frames go through the provider
     * `window.phantasmaLink`. Trusted-local, plaintext. Throws `4900` when no v5 provider is
     * present; check {@link findInjectedProvider} first to fall back to another transport.
     * Consents run in the extension UI, so the request timeout is the same generous default
     * as deeplink and relay. */
    static injected(options?: InjectedTransportOptions & {
        requestTimeoutMs?: number;
    }): PhantasmaLink5;
    /** Build a client over the deeplink transport (spec §17). The channel key from pairing is
     * MANDATORY here: deeplink URLs are interceptable, so plaintext frames are never allowed. */
    static deeplink(options: DeeplinkTransportOptions & {
        sessionKey: Uint8Array;
        requestTimeoutMs?: number;
    }): PhantasmaLink5;
    /** Build a client over the relay transport (spec §6.4/§16). The channel key from
     * pairing is MANDATORY: relay payloads are ALWAYS encrypted (spec §8) - the relay is
     * E2E-blind and must stay that way. */
    static relay(options: RelayTransportOptions & {
        sessionKey: Uint8Array;
        requestTimeoutMs?: number;
    }): PhantasmaLink5;
    /**
     * Build a client for the ecdh pairing fallback (spec §15/§18.1): the custom-scheme
     * channel is hijackable, so NO secret rides the pairing URI - only the dApp's
     * ephemeral X25519 PUBLIC key. The wallet answers over the relay with its own public
     * key plus the sealed connect result; the session key is derived on arrival and the
     * client refuses to send (or accept) anything before that. Show {@link pairingUri}
     * (a phantasma:// URI) to start; the session then arrives one-tap.
     */
    static relayEcdh(options: Omit<RelayTransportOptions, 'topic' | 'onWalletKey'> & {
        topic?: string;
        dapp?: DappMetadata;
        keyPair?: EphemeralKeyPair;
        requestTimeoutMs?: number;
    }): PhantasmaLink5;
    /**
     * Build a ready-to-use client for a WEB dApp over the deeplink transport (spec §17),
     * bundling the per-dApp glue: pairing material generation, the pairing URI, persistence
     * (localStorage by default), restore + session resume across page loads, and intake of
     * the response URLs the wallet opens back at the page (initial URL + `hashchange`).
     *
     * The factory itself never opens a URL: mobile browsers only allow app-opening
     * navigation from a user gesture. The dApp drives the hops - show {@link pairingUri}
     * (link/QR) for the one-time pairing consent, then call {@link connect} and the typed
     * methods from click handlers; an established session resumes promptlessly (spec §7).
     */
    static webDeeplink(options: WebDeeplinkOptions): Promise<PhantasmaLink5>;
    /** Feed an OS-delivered URL into a deeplink-backed client; see DeeplinkTransport.deliverUrl.
     * The web-deeplink factory wires this automatically; SPAs whose routing swallows
     * `hashchange` call it explicitly on route events. */
    deliverUrl(url: string): boolean;
    /** Take (and clear) a wallet response that arrived with no in-flight request to match it -
     * the deeplink reload case, where the page that issued the request was discarded before the
     * answer returned. The web-deeplink factory delivers it during construction, so read it right
     * after building the client. Returns undefined when there is nothing to recover. */
    takeUnmatchedResponse(): UnmatchedResponse | undefined;
    /** The pairing URI for this client's channel (set by pairing-capable factories such as
     * {@link webDeeplink}); render it as a link/QR for the one-time wallet pairing consent. */
    get pairingUri(): string | undefined;
    /** The account from the last successful {@link connect}, if any. */
    get account(): LinkAccountV5 | undefined;
    /** The capabilities granted at the last successful {@link connect}, if any. */
    get capabilities(): WalletCapabilities | undefined;
    /** Pair/resume and run the capability handshake. The wallet MAY grant a subset of the
     * requested capabilities; inspect the returned {@link ConnectResult}. `dapp` falls back
     * to `options.dapp` (factories set it), so a configured client connects with no args. */
    connect(dapp?: DappMetadata, extra?: Omit<ConnectParams, 'dapp'>): Promise<ConnectResult>;
    /** Make a connect result the live session state (used by both the explicit connect and
     * the wallet-pushed {@link LinkEvent.SessionEstablished} one-tap pairing path). */
    getAccounts(): Promise<GetAccountsResult>;
    getChains(): Promise<GetChainsResult>;
    getWalletInfo(): Promise<GetWalletInfoResult>;
    signMessage(params: SignMessageParams): Promise<SignMessageResult>;
    /** Sign a transaction without broadcasting; the dApp submits the returned signed tx. */
    signTransaction(params: SignTransactionParams): Promise<SignTransactionResult>;
    /** Sign AND broadcast a transaction via the format's RPC endpoint. */
    sendTransaction(params: SendTransactionParams): Promise<SendTransactionResult>;
    /** Read-only VM invoke (no keys, no approval). */
    invokeScript(params: InvokeScriptParams): Promise<InvokeScriptResult>;
    disconnect(): Promise<DisconnectResult>;
    /** Drop the local (and persisted) session WITHOUT notifying the wallet. Use when a wallet
     * round-trip is undesirable - notably deeplink, where pha_disconnect would navigate to the
     * wallet and reload this page, so the cleanup after the request never runs and the session
     * would resume on the next load. The wallet's side lapses on its own session TTL (spec §7). */
    forgetSession(): void;
    /** Subscribe to wallet->dApp events; returns an unsubscribe function. */
    onEvent(handler: LinkEventHandler): () => void;
    /** Close the underlying transport and reject any in-flight requests. */
    close(): void;
}

phantasma-sdk-ts/link/v5/deeplink

Source: dist/types/link/v5/deeplink.d.ts

Declarations

export declare const WALLET_SCHEME_BASE = "phantasma://";
export declare const DEEPLINK_REQUEST_TIMEOUT_MS = 300000;
export interface DeeplinkUrls {
    topic: string;
    frame: string;
}
export declare function buildRequestUrl(walletBase: string, topic: string, frame: string): string;
export declare function parseRequestUrl(url: string): DeeplinkUrls | null;
export declare function buildResponseUrl(callback: string, topic: string, frame: string): string;
export declare function parseResponseUrl(url: string): DeeplinkUrls | null;
export interface DeeplinkTransportOptions {
    /** The pairing topic; routes frames to the right channel on both sides. */
    topic: string;
    /** Opens a URL at the wallet (platform hook: location.href, anchor click, native intent). */
    opener: (url: string) => void;
    /** Wallet base; defaults to the custom scheme {@link WALLET_SCHEME_BASE}. */
    walletBase?: string;
    /** Optional diagnostic sink for inbound response URLs: whether a delivered URL matched this
     * channel's topic or was ignored (foreign topic / not a v5 response). METADATA ONLY - never the
     * sealed `f` payload. Default: no-op. */
    log?: (message: string) => void;
}
export declare class DeeplinkTransport implements LinkTransport {
    constructor(options: DeeplinkTransportOptions);
    send(frame: string): void;
    onMessage(handler: (frame: string) => void): void;
    onClose(handler: (reason?: string) => void): void;
    /**
     * Feed an OS-delivered URL into the transport. Returns true when the URL was a v5 response
     * for THIS transport's topic and was dispatched; false lets the caller try other handlers.
     */
    deliverUrl(url: string): boolean;
    close(): void;
}

phantasma-sdk-ts/link/v5/encoding

Source: dist/types/link/v5/encoding.d.ts

Declarations

export declare function bytesToBase64(bytes: Uint8Array): string;
export declare function base64ToBytes(input: string): Uint8Array;
export declare function bytesToBase64Url(bytes: Uint8Array): string;
export declare function base64UrlToBytes(input: string): Uint8Array;
export declare function utf8ToBytes(text: string): Uint8Array;
export declare function bytesToUtf8(bytes: Uint8Array): string;

phantasma-sdk-ts/link/v5/envelope

Source: dist/types/link/v5/envelope.d.ts

Declarations

export interface LinkRequest {
    plv: typeof PLV;
    id: string;
    session?: string;
    method: string;
    params?: Record<string, unknown>;
}
export interface LinkSuccessResponse {
    plv: typeof PLV;
    id: string;
    result: unknown;
}
export interface LinkErrorResponse {
    plv: typeof PLV;
    id: string;
    error: LinkErrorObject;
}
export type LinkResponse = LinkSuccessResponse | LinkErrorResponse;
export interface LinkEventMessage {
    plv: typeof PLV;
    type: 'event';
    session?: string;
    event: string;
    data?: unknown;
}
export type LinkMessage = LinkRequest | LinkResponse | LinkEventMessage;
export declare function isLinkRequest(msg: LinkMessage): msg is LinkRequest;
export declare function isLinkEvent(msg: LinkMessage): msg is LinkEventMessage;
export declare function isLinkErrorResponse(msg: LinkMessage): msg is LinkErrorResponse;
export declare function isLinkSuccessResponse(msg: LinkMessage): msg is LinkSuccessResponse;
export declare function encodeEnvelope(message: LinkMessage): string;
export declare function decodeEnvelope(text: string): LinkMessage;

phantasma-sdk-ts/link/v5/errors

Source: dist/types/link/v5/errors.d.ts

Declarations

export declare const LinkErrorCode: {
    readonly ParseError: -32700;
    readonly InvalidRequest: -32600;
    readonly MethodNotFound: -32601;
    readonly InvalidParams: -32602;
    readonly InternalError: -32603;
    readonly UserRejected: 4001;
    readonly Unauthorized: 4100;
    readonly Disconnected: 4900;
    readonly UnsupportedChain: 4902;
    readonly PayloadTooLarge: 5001;
    readonly NexusMismatch: 5002;
    readonly UnsupportedSignatureKind: 5003;
    readonly CapabilityNotSupported: 5004;
    readonly SessionExpired: 5100;
    readonly SessionRevoked: 5101;
};
export type LinkErrorCode = (typeof LinkErrorCode)[keyof typeof LinkErrorCode];
export interface LinkErrorObject {
    code: number;
    message: string;
    data?: unknown;
}
export declare class LinkError extends Error {
    readonly code: number;
    readonly data?: unknown;
    constructor(code: number, message: string, data?: unknown);
    toObject(): LinkErrorObject;
    /** Reconstruct a {@link LinkError} from a received error object, tolerating malformed
     * inputs (a peer may send a non-conforming shape). */
    static fromObject(obj: unknown): LinkError;
}

phantasma-sdk-ts/link/v5

Source: dist/types/link/v5/index.d.ts

Declarations

export * from './protocol.js';
export * from './errors.js';
export * from './encoding.js';
export * from './envelope.js';
export * from './capabilities.js';
export * from './methods.js';
export * from './session-crypto.js';
export * from './pairing.js';
export * from './transport.js';
export * from './loopback-transport.js';
export * from './injected-transport.js';
export * from './deeplink.js';
export * from './relay-transport.js';
export * from './web-deeplink.js';
export * from './client.js';

phantasma-sdk-ts/link/v5/injected-transport

Source: dist/types/link/v5/injected-transport.d.ts

Declarations

export interface PhantasmaLinkProvider {
    /** Protocol generations the wallet speaks. Contains 5. */
    readonly plvVersions: readonly number[];
    /** Sends one request envelope and returns its response envelope. Rejects only when the
     * bridge to the extension fails; wallet and protocol errors arrive as error envelopes. */
    request(frame: string): Promise<string>;
    /** Subscribes to event envelopes. Returns the function that unsubscribes. */
    onEvent(handler: (frame: string) => void): () => void;
}
export interface ProviderHost {
    phantasmaLink?: unknown;
}
export declare function findInjectedProvider(host?: ProviderHost): PhantasmaLinkProvider | undefined;
export interface InjectedTransportOptions {
    /** The provider to use. Default: the page's `window.phantasmaLink`. Tests pass a fake. */
    provider?: PhantasmaLinkProvider;
}
export declare class InjectedTransport implements LinkTransport {
    constructor(options?: InjectedTransportOptions);
    send(frame: string): Promise<void>;
    onMessage(handler: (frame: string) => void): void;
    onClose(handler: (reason?: string) => void): void;
    /** Stops delivering frames. The provider itself stays on the page for the next client. */
    close(): void;
}

phantasma-sdk-ts/link/v5/loopback-transport

Source: dist/types/link/v5/loopback-transport.d.ts

Declarations

export interface WebSocketLike {
    readonly readyState: number;
    send(data: string): void;
    close(code?: number, reason?: string): void;
    onopen: ((event: unknown) => void) | null;
    onmessage: ((event: {
        data: unknown;
    }) => void) | null;
    onclose: ((event: {
        reason?: string;
        wasClean?: boolean;
    }) => void) | null;
    onerror: ((event: unknown) => void) | null;
}
export type WebSocketFactory = (url: string) => WebSocketLike;
export interface LoopbackTransportOptions {
    /** Default `localhost`. */
    host?: string;
    /** Default `7090` (the wallet link port). */
    port?: number;
    /** Default `/phantasma/v5` (separate from the legacy `/phantasma`). */
    path?: string;
    /** Override the WebSocket implementation (Node / tests). Defaults to global `WebSocket`. */
    webSocketFactory?: WebSocketFactory;
}
export declare class LoopbackTransport implements LinkTransport {
    constructor(options?: LoopbackTransportOptions);
    send(frame: string): void;
    onMessage(handler: (frame: string) => void): void;
    onClose(handler: (reason?: string) => void): void;
    close(): void;
}

phantasma-sdk-ts/link/v5/methods

Source: dist/types/link/v5/methods.d.ts

Declarations

export type Base64 = string;
export type DisconnectParams = Record<string, never>;
export interface DisconnectResult {
    ok: true;
}
export type GetAccountsParams = Record<string, never>;
export interface GetAccountsResult {
    accounts: LinkAccountV5[];
}
export type GetChainsParams = Record<string, never>;
export interface GetChainsResult {
    /** Supported chains as CAIP-2-like ids. */
    chains: string[];
    /** Currently selected chain id. */
    current: string;
    /** The Phantasma nexus name (domain term kept as a field). */
    nexus: string;
}
export type GetWalletInfoParams = Record<string, never>;
export type GetWalletInfoResult = WalletInfo;
export interface SignMessageParams {
    /** The message bytes to sign, base64. */
    message: Base64;
    /** Optional human-readable hint the wallet may show instead of raw bytes. */
    display?: string;
    signatureKind?: SignatureKind;
}
export interface SignMessageResult {
    /** The signature, base64. */
    signature: Base64;
    /** The 32 random bytes the wallet prepended (base64); needed to reconstruct the signed
     * payload `DOMAIN_TAG || random || message` for verification. */
    random: Base64;
}
export interface TransactionParams {
    format: TxFormat;
    /** The serialized (unsigned) transaction bytes, base64. */
    tx: Base64;
    signatureKind?: SignatureKind;
    pow?: ProofOfWork;
}
export type SignTransactionParams = TransactionParams;
export interface SignTransactionResult {
    /** The signed transaction bytes, base64; the dApp broadcasts it itself. */
    signedTx: Base64;
}
export type SendTransactionParams = TransactionParams;
export interface SendTransactionResult {
    /** The broadcast transaction hash. */
    hash: string;
}
export interface InvokeScriptParams {
    chain: string;
    /** The raw VM script bytes, base64. */
    script: Base64;
}
export interface InvokeScriptResult {
    /** Decoded VM result objects (hex/encoded values, as the node returns them). */
    results: string[];
}
export interface AccountsChangedData {
    accounts: LinkAccountV5[];
}
export interface ChainChangedData {
    chain: string;
}
export interface SessionLifecycleData {
    session: string;
}

phantasma-sdk-ts/link/v5/pairing

Source: dist/types/link/v5/pairing.d.ts

Declarations

export type PairingMode = 'sym' | 'ecdh';
export interface PairingParams {
    version: number;
    topic: string;
    relay?: string;
    mode: PairingMode;
    /** Present when `mode === 'sym'`. */
    symKey?: Uint8Array;
    /** Present when `mode === 'ecdh'`. */
    dappPublicKey?: Uint8Array;
    /** Where the wallet opens response deeplinks for this pairing (spec §17). */
    callback?: string;
    meta?: DappMetadata;
}
export interface BuildPairingUriInput {
    topic: string;
    mode: PairingMode;
    symKey?: Uint8Array;
    dappPublicKey?: Uint8Array;
    relay?: string;
    /** dApp URL the wallet opens to deliver deeplink responses (required for deeplink use). */
    callback?: string;
    meta?: DappMetadata;
    /** `universal` (default) => `https://<host>/v5/pair`; `scheme` => `phantasma://v5/pair`. */
    scheme?: 'universal' | 'scheme';
    /** Universal-link host; defaults to {@link DEFAULT_LINK_HOST}. */
    host?: string;
}
export declare function buildPairingUri(input: BuildPairingUriInput): string;
export declare function parsePairingUri(uri: string): PairingParams;

phantasma-sdk-ts/link/v5/protocol

Source: dist/types/link/v5/protocol.d.ts

Declarations

export declare const PLV: 5;
export declare const DEFAULT_LINK_HOST = "link.phantasma.info";
export declare const LinkMethod: {
    /** Pair or resume a session; returns the capability handshake + account + session. */
    readonly Connect: "pha_connect";
    /** End the session. */
    readonly Disconnect: "pha_disconnect";
    /** Account(s) authorized for this session. */
    readonly GetAccounts: "pha_getAccounts";
    /** Supported chains (CAIP-2) + current; `nexus` as a field. */
    readonly GetChains: "pha_getChains";
    /** Wallet name/version/capabilities/rpc. */
    readonly GetWalletInfo: "pha_getWalletInfo";
    /** Sign an arbitrary, non-transaction-forgeable message. */
    readonly SignMessage: "pha_signMessage";
    /** Sign a transaction only (do NOT broadcast); the dApp submits it. */
    readonly SignTransaction: "pha_signTransaction";
    /** Sign AND broadcast a transaction via the format's RPC endpoint. */
    readonly SendTransaction: "pha_sendTransaction";
    /** Read-only VM invoke (no keys, no approval). */
    readonly InvokeScript: "pha_invokeScript";
};
export type LinkMethod = (typeof LinkMethod)[keyof typeof LinkMethod];
export declare const LinkEvent: {
    readonly AccountsChanged: "pha_accountsChanged";
    readonly ChainChanged: "pha_chainChanged";
    readonly SessionDeleted: "pha_sessionDeleted";
    readonly SessionExpired: "pha_sessionExpired";
    /** Unsolicited connect result pushed right after a pairing approval (spec §15 step 3),
     * letting the first connection complete in one user gesture. Unlike the other events it
     * also rides the deeplink transport: the wallet is foreground at the approval moment, so
     * it CAN open the callback (this is a reply to the pairing, not a spontaneous push).
     * `data` carries the same shape as a `pha_connect` result. */
    readonly SessionEstablished: "pha_sessionEstablished";
};
export type LinkEvent = (typeof LinkEvent)[keyof typeof LinkEvent];
export declare const TxFormat: {
    readonly Script: "script";
    readonly Carbon: "carbon";
};
export type TxFormat = (typeof TxFormat)[keyof typeof TxFormat];
export declare const SignatureKind: {
    readonly Ed25519: "Ed25519";
    readonly ECDSA: "ECDSA";
};
export type SignatureKind = (typeof SignatureKind)[keyof typeof SignatureKind];

phantasma-sdk-ts/link/v5/relay-transport

Source: dist/types/link/v5/relay-transport.d.ts

Declarations

export declare const DEFAULT_RELAY_URL = "wss://link.phantasma.info/relay";
export declare const RELAY_CHUNK_BYTES = 900000;
export interface RelayTransportOptions {
    /** The pairing topic both sides subscribe to (bearer capability, spec §16). */
    topic: string;
    /** Relay WebSocket URL; default {@link DEFAULT_RELAY_URL}. */
    url?: string;
    /** Override the WebSocket implementation (Node / tests). Defaults to global WebSocket. */
    webSocketFactory?: WebSocketFactory;
    /** Chunking threshold for outgoing frames; default {@link RELAY_CHUNK_BYTES}. */
    maxPayloadBytes?: number;
    /** Ceiling for one reassembled incoming message; default 64 MB of frame text. */
    maxAssembledBytes?: number;
    /** How long to wait for the relay's ack of one publish; default 15 s. */
    publishAckTimeoutMs?: number;
    /** Reconnect backoff ladder; the last entry repeats. Default 0.5/1/2/5/15 s. */
    reconnectDelaysMs?: number[];
    /** ecdh pairing (spec §18.1): called ONCE with the wallet's ephemeral X25519 public key
     * (base64url) when the key hop arrives; the caller derives the session key before any
     * sealed frame embedded in the same payload is forwarded. */
    onWalletKey?: (publicKeyB64Url: string) => void;
    /** Optional sink for diagnostics the transport cannot attribute to a caller - notably relay
     * `error` frames that match no in-flight publish (spec §16: clients MUST surface error frames,
     * not drop them). Defaults to console.warn; wire this to redirect or silence. */
    log?: (message: string) => void;
}
export declare class RelayTransport implements LinkTransport {
    constructor(options: RelayTransportOptions);
    send(frame: string): Promise<void>;
    onMessage(handler: (frame: string) => void): void;
    onClose(handler: (reason?: string) => void): void;
    close(): void;
    /** Collect one chunk; emit the reassembled frame when complete. Bounds: chunk count,
     * total bytes, concurrent partial messages, and a staleness GC - a hostile peer can
     * waste its own topic, but not this client's memory (spec §16). */
}

phantasma-sdk-ts/link/v5/session-crypto

Source: dist/types/link/v5/session-crypto.d.ts

Declarations

export declare const SESSION_KEY_LENGTH: number;
export declare const NONCE_LENGTH: number;
export declare const PUBLIC_KEY_LENGTH: number;
export declare const SIGN_MESSAGE_DOMAIN_TAG: Uint8Array;
export declare const SIGN_MESSAGE_RANDOM_LENGTH = 32;
export interface EncryptedFrame {
    nonce: string;
    ct: string;
}
export interface EphemeralKeyPair {
    publicKey: Uint8Array;
    secretKey: Uint8Array;
}
export declare function generateSessionKey(): Uint8Array;
export declare function randomToken(byteLength?: number): string;
export declare function generateEphemeralKeyPair(): EphemeralKeyPair;
export declare function deriveSessionKey(theirPublicKey: Uint8Array, mySecretKey: Uint8Array): Uint8Array;
export declare function seal(plaintext: Uint8Array, key: Uint8Array): EncryptedFrame;
export declare function open(frame: EncryptedFrame, key: Uint8Array): Uint8Array;
export declare function sealEnvelopeText(json: string, key: Uint8Array): EncryptedFrame;
export declare function openEnvelopeText(frame: EncryptedFrame, key: Uint8Array): string;
export declare function generateSignMessageRandom(): Uint8Array;
export declare function buildSignMessagePayload(message: Uint8Array, random: Uint8Array): Uint8Array;

phantasma-sdk-ts/link/v5/transport

Source: dist/types/link/v5/transport.d.ts

Declarations

export interface LinkTransport {
    send(frame: string): void | Promise<void>;
    onMessage(handler: (frame: string) => void): void;
    onClose?(handler: (reason?: string) => void): void;
    close(): void;
}
export type LinkEventHandler = (event: string, data: unknown, session?: string) => void;
export interface LinkSessionClientOptions {
    /** 32-byte session key. When omitted, frames are PLAINTEXT envelope JSON - appropriate
     * ONLY for a trusted local transport (loopback/injected); deeplink and relay MUST set a
     * key (spec §8). */
    sessionKey?: Uint8Array;
    /** Refuse to SEND until a session key is set (see {@link LinkSessionClient.setSessionKey}).
     * Used by the ecdh pairing flow, where the key is derived only after the wallet's
     * public key arrives - plaintext must never leave the client in the meantime. */
    requireSessionKey?: boolean;
    /** Session id attached to outgoing requests after connect/pairing. */
    sessionId?: string;
    /** Per-request timeout in ms; 0 disables. Default 60000. */
    requestTimeoutMs?: number;
    /** Sink for responses with no matching in-flight request (the deeplink page reloaded while
     * the wallet was open, discarding the original request promise). Without it such responses
     * are dropped. Never fires on same-page flows - those always have a pending entry. */
    onUnmatchedResponse?: (response: UnmatchedResponse) => void;
    /** Optional diagnostic sink for the receive path: frames dropped (undecodable / wrong key) and
     * events received. Mirrors the relay transport's `log` seam so a host can trace the otherwise
     * silent deeplink/relay receive path. METADATA ONLY - never receives secrets or plaintext
     * payloads. Default: no-op. */
    log?: (message: string) => void;
}
export interface UnmatchedResponse {
    id: string;
    ok: boolean;
    result?: unknown;
    error?: unknown;
}
export declare class LinkSessionClient {
    constructor(transport: LinkTransport, options?: LinkSessionClientOptions);
    /** Set/refresh the session id sent on subsequent requests (e.g. after `pha_connect`),
     * or clear it with `undefined` (e.g. after `pha_disconnect`). */
    setSessionId(id: string | undefined): void;
    /** The current session id, if a session is established. */
    getSessionId(): string | undefined;
    /** Install the channel key once it is established (ecdh pairing derives it only after
     * the wallet's ephemeral public key arrives, spec §18.1). From here on every frame is
     * sealed/opened with it, exactly as if it had been passed at construction. */
    setSessionKey(key: Uint8Array): void;
    /** Subscribe to wallet->dApp events; returns an unsubscribe function. */
    onEvent(handler: LinkEventHandler): () => void;
    /** Send a request and await its result. Rejects with {@link LinkError}. */
    request(method: string, params?: Record<string, unknown>): Promise<unknown>;
    /** Close the session, rejecting all in-flight requests. */
    close(): void;
}

phantasma-sdk-ts/link/v5/web-deeplink

Source: dist/types/link/v5/web-deeplink.d.ts

Declarations

export interface WebDeeplinkStorage {
    getItem(key: string): string | null;
    setItem(key: string, value: string): void;
    removeItem(key: string): void;
}
export declare const WEB_DEEPLINK_STORAGE_KEY = "phantasma.link.v5.webdeeplink";
export interface WebDeeplinkOptions {
    /** dApp identity: shown in wallet consent UIs and embedded in the pairing URI meta. */
    dapp: DappMetadata;
    /** Persistence for the pairing/session record; default `localStorage`. */
    storage?: WebDeeplinkStorage;
    /** Storage key for the record; default {@link WEB_DEEPLINK_STORAGE_KEY}. */
    storageKey?: string;
    /** Opens a URL at the wallet; default assigns `location.href`. */
    opener?: (url: string) => void;
    /** Reads the current page URL; default `location.href`. */
    pageUrl?: () => string;
    /** Subscribes to page-URL changes and returns an unsubscribe; default listens to
     * `hashchange` (wallet responses arrive as fragment-only navigations on the callback). */
    onUrlChange?: (handler: () => void) => () => void;
    /** Replaces the page URL after a response fragment is consumed (history.replaceState by
     * default) so reload/back does not re-deliver it and ciphertext leaves the address bar. */
    replaceUrl?: (url: string) => void;
    /** Wallet base for request URLs (DeeplinkTransport); default the `phantasma://` scheme. */
    walletBase?: string;
    /** Universal-link host for the pairing URI; default `link.phantasma.info`. */
    host?: string;
    /** Where the wallet opens responses. Default: the current page URL without its fragment.
     * Baked into the wallet-side pairing at consent time - changing it later needs a re-pair. */
    callback?: string;
    /** Per-request timeout; the web default is 5 minutes (an app switch + human consent). */
    requestTimeoutMs?: number;
    /** Optional diagnostic sink for the deeplink lifecycle (return-URL matched / ignored, frame
     * drops, events received). METADATA ONLY - never the symKey or sealed payload. Default: no-op.
     * A host can wire this to surface why a deeplink return did or did not land. */
    log?: (message: string) => void;
}
export interface WebDeeplinkRecord {
    /** Record format version (for forward migration of stored state). */
    v: 1;
    /** Pairing topic routing frames on both sides (32 random bytes, base64url). */
    topic: string;
    /** The 32-byte symmetric session key, base64url. Lives in the dApp origin's storage -
     * the same trust domain as the dApp code that uses it. */
    key: string;
    /** Response callback URL the wallet opens; fixed at pairing consent. */
    callback: string;
    /** Established session id (spec §7), set after a successful connect. */
    sessionId?: string;
    /** Cache of the last ConnectResult so a reloaded page can show the account without a
     * URL hop; refreshed by every successful connect, dropped on disconnect. */
    lastConnect?: ConnectResult;
}
export interface WebDeeplinkHooks {
    storage: WebDeeplinkStorage;
    storageKey: string;
    opener: (url: string) => void;
    pageUrl: () => string;
    onUrlChange?: (handler: () => void) => () => void;
    replaceUrl?: (url: string) => void;
}
export declare function resolveWebDeeplinkHooks(options: WebDeeplinkOptions): WebDeeplinkHooks;
export declare function stripUrlFragment(url: string): string;
export declare function createWebDeeplinkRecord(callback: string): WebDeeplinkRecord;
export declare function loadWebDeeplinkRecord(storage: WebDeeplinkStorage, storageKey: string): WebDeeplinkRecord | null;
export declare function saveWebDeeplinkRecord(storage: WebDeeplinkStorage, storageKey: string, record: WebDeeplinkRecord): void;

phantasma-sdk-ts/public

Source: dist/types/public.d.ts

Declarations

export { PhantasmaAPI } from './rpc/phantasma.js';
export { getRpcErrorMessage, isRpcErrorResult, unwrapRpcResult } from './rpc/rpc-result.js';
export type { JsonRpcErrorObject, JsonRpcErrorResponse, JsonRpcParam, JsonRpcResponse, JsonRpcSuccessResponse, RpcErrorResult, RpcResult, } from './rpc/rpc-result.js';
export type { ABIContract, ABIEvent, ABIMethod, ABIParameter, Account, AccountTransactions, Archive, Auction, Balance, Block, BuildInfoResult, Chain, Channel, CursorPaginatedResult, Dapp, Event as RpcEvent, EventExtended, EventExtendedTyped, ExtendedEventData, Governance, Interop, KeyValue, Leaderboard, LeaderboardRow, Nexus as RpcNexus, NFT, Oracle, Organization, OrganizationMember, Paginated, Peer, PhantasmaVmConfig, Platform, Receipt, RpcAddressType, Script, SendRawTx, SignatureResult, SpecialResolutionArguments, SpecialResolutionArgumentsByMethod, SpecialResolutionCall, SpecialResolutionData, Stake, Storage, Swap, Token, TokenData, TokenExternal, TokenPrice, TokenSchemasResult, TokenSeries, TokenSeriesResult, TransactionData, Validator, VmNamedVariableSchemaResult, VmStructSchemaResult, VmValue, VmVariableSchemaResult, } from './rpc/interfaces/index.js';
export { vmStructSchemaFromRpcResult, vmVariableSchemaFromRpcResult } from './rpc/helpers/index.js';
export { ContractTxHelper, buildContractArtifactBundle, buildContractArtifactManifest, coerceContractBytes, normalizeContractName, ExecutionState, Transaction, } from './tx/index.js';
export type { BuildContractArtifactBundleParams, BuildContractArtifactManifestParams, ContractArtifactBundle, ContractArtifactFileEntry, ContractArtifactManifest, ContractBinaryInput, ContractScriptBuildParams, ContractTransactionBuildParams, ContractTransactionSignParams, } from './tx/index.js';
export { Contracts, Decoder, EventKind, Opcode, ScriptBuilder, TypeAuction, VMObject, VMType, decodeVMObject, getChainValueEventData, getGasEventData, getInfusionEventData, getMarketEventData, getString, getTokenEventData, getTransactionSettleEventData, } from './vm/index.js';
export type { ChainValueEventData, GasEventData, InfusionEventData, MarketEventData, TokenEventData, TransactionSettleEventData, } from './vm/index.js';
export { AccountTrigger, Address, AddressKind, Base16, CarbonBinaryReader, CarbonBinaryWriter, ConsensusMode, ContractEvent, ContractInterface, ContractMethod, ContractParameter, CustomSerializer, Describer, DomainSettings, Ed25519Signature, Entropy, OrganizationTrigger, PBinaryReader, PBinaryWriter, PhantasmaKeys, PollChoice, PollPresence, PollState, PollValue, PollVote, Serialization, Stack, StakeReward, Timestamp, TokenTrigger, TriggerResult, bigIntToTwosComplementLE, readBlob, twosComplementLEToBigInt, writeBlob, } from './types/index.js';
export type { CustomReader, CustomWriter } from './types/index.js';
export { Bytes16, Bytes32, Bytes64, CarbonBlob, CarbonTokenFlags, CreateTokenSeriesTxHelper, CreateTokenTxHelper, FieldType, IntX, MetadataField, MintPhantasmaNonFungibleTxHelper, ModuleId, NativeTxHelper, NftRomBuilder, PhantasmaNftRomBuilder, PhantasmaNftMintInfo, PhantasmaNftMintResult, SeriesInfo, SeriesInfoBuilder, SignedTxMsg, SmallString, StandardMeta, TokenContractMethods, TokenHelper, TokenInfo, TokenInfoBuilder, TokenMetadataBuilder, TokenSchemas, TokenSchemasBuilder, TokenSchemasJson, TokenSeriesMetadataBuilder, TxMsg, TxMsgBurnFungible, TxMsgBurnFungibleGasPayer, TxMsgBurnNonFungible, TxMsgBurnNonFungibleGasPayer, TxMsgCall, TxMsgCallMulti, TxMsgMintFungible, TxMsgMintNonFungible, TxMsgPhantasma, TxMsgPhantasmaRaw, TxMsgSigner, TxMsgSpecialResolution, TxMsgTrade, TxMsgTransferFungible, TxMsgTransferFungibleGasPayer, TxMsgTransferNonFungibleMulti, TxMsgTransferNonFungibleMultiGasPayer, TxMsgTransferNonFungibleSingle, TxMsgTransferNonFungibleSingleGasPayer, TxTypes, TokenListing, VmDynamicStruct, VmDynamicVariable, VmNamedDynamicVariable, VmNamedVariableSchema, VmStructArray, VmStructFlags, VmStructSchema, VmType, VmVariableSchema, Witness, findMetadataField, nftDefaultMetadataFields, parseTokenSchemasJson, pushMetadataField, seriesDefaultMetadataFields, standardMetadataFields, } from './types/carbon/index.js';
export type { MetadataValueInput } from './types/carbon/index.js';
export { ANONYMOUS_NAME, ENTRY_CONTEXT_NAME, GENESIS_NAME, NULL_NAME, arrayNumberToUint8Array, bigIntToByteArray, bytesToHex, decodeBase16, encodeBase16, formatUnits, getDifficulty, hexStringToUint8Array, hexToBytes, isReservedIdentifier, isValidIdentifier, isValidTicker, numberToByteArray, parseUnits, reverseHex, setLogger, stringToUint8Array, uint8ArrayToBytes, uint8ArrayToNumberArray, uint8ArrayToString, uint8ArrayToStringDefault, } from './utils/index.js';
export type { Logger } from './utils/index.js';
export { generateNewSeed, generateNewSeedWords, generateNewWif, getAddressFromWif, getPrivateKeyFromWif, getPublicKeyFromPrivateKey, getWifFromPrivateKey, signData, verifyData, } from './tx/utils.js';
export { EasyConnect } from './link/easy-connect.js';
export { EasyScript, Nexus } from './link/easy-script.js';
export { PhantasmaLink } from './link/phantasma-link.js';
export { ProofOfWork } from './link/interfaces/proof-of-work.js';
export type { LinkAccount, LinkFile } from './link/index.js';
export type { PrebuiltTransactionSignResult } from './link/phantasma-link.js';
export * as PhantasmaLinkV5 from './link/v5/index.js';
export { Signature, SignatureKind } from './interfaces/signature.js';
export { NativeContractKind } from './interfaces/contract.js';
export { TokenFlags, TokenSeriesMode } from './interfaces/token.js';
export { getAddressFromLedger, getAddressFromPrivateKey, getAddressFromPublicKey, getAddressPublicKeyFromPublicKey, } from './ledger/index.js';
export type { CarbonBlobLike } from './interfaces/carbon/carbon-blob-like.js';
export type { ContractDescriptor } from './interfaces/contract.js';
export type { KeyPair } from './interfaces/key-pair.js';
export type { Ledger } from './ledger/interfaces/ledger.js';
export type { Serializable } from './interfaces/serializable.js';
export type { StackLike } from './interfaces/stack.js';
export type { TokenDescriptor } from './interfaces/token.js';
export type { TxSigner } from './types/carbon/blockchain/extensions/tx-signer.js';
export { GasConfig } from './types/carbon/blockchain/gas-config.js';
export { gasConfigFromRpc } from './rpc/interfaces/gas-config.js';
export type { GasConfigData, GasConfigResult } from './rpc/interfaces/gas-config.js';
export { FeePlanner } from './rpc/fee-planner.js';
export type { ChainFeeParams, FeePlannerOptions, GasConfigSource, PlanRequestOptions, } from './rpc/fee-planner.js';
export { burnedInstances, DEFAULT_TX_EXPIRY_MS, expiryWithin, NativeFeeKind, planFees, summarizeFeePlan, } from './types/carbon/blockchain/tx-helpers/index.js';
export type { BurnFungibleParams, BurnNonFungibleParams, FeePlan, FeePlanOptions, FeePlanSummary, FeePlanSummaryDecimals, FeeQuote, InfusedAsset, MintFungibleParams, NativeFeeEstimate, NativeTxParties, PhantasmaNftMintParams, PlanAndSignOptions, TransferFungibleParams, TransferNonFungibleParams, TxLimits, } from './types/carbon/blockchain/tx-helpers/index.js';
export { TransactionPreflightError, preflightTransaction } from './rpc/transaction-preflight.js';
export type { PreflightResult, PreflightSource, PreflightVerdict, } from './rpc/transaction-preflight.js';
export type { SendTransactionOptions } from './rpc/phantasma.js';
export { GovernanceContractMethods } from './types/carbon/blockchain/modules/governance-contract-methods.js';

phantasma-sdk-ts/rpc/fee-planner

Source: dist/types/rpc/fee-planner.d.ts

Declarations

export interface GasConfigSource {
    getGasConfig(): Promise<GasConfigResult>;
    /**
     * What an NFT holds at its own address, needed to plan its burn. The method is optional. A source
     * without it can plan every message except a burn, and for a burn the caller must then state
     * `infusions`.
     */
    infusedAssets?(tokenId: bigint, instanceId: bigint): Promise<InfusedAsset[]>;
}
export interface FeePlannerOptions {
    /**
     * How long a fetched gas config is reused before it is read again. Prices change only by
     * governance resolution. A stale price under-offers every transaction until someone notices, so
     * the default is short, 60 seconds.
     */
    configTtlMs?: number;
}
export interface PlanRequestOptions extends FeePlanOptions {
    /** Read the gas config again before planning, ignoring the cache. */
    refreshConfig?: boolean;
}
export interface ChainFeeParams {
    /**
     * The longest lifetime the chain admits for a transaction, in milliseconds. The chain refuses an
     * expiry at or beyond `now + expiryWindow`. Pass this value to `expiryWithin` when a person sits
     * between building a transaction and signing it.
     */
    expiryWindow: number;
    /** Target time between blocks, in milliseconds. */
    blockRateTarget: number;
    /** Gas model the node runs: 1 = the original fee model, 2 = gas model v2. */
    gasModelVersion: number;
}
export declare class FeePlanner {
    constructor(source: GasConfigSource, options?: FeePlannerOptions);
    /** The chain's gas config, read from the source when the cached one is missing or expired. */
    config(options?: {
        refresh?: boolean;
    }): Promise<GasConfig>;
    /**
     * The chain's admission parameters, from the same answer and the same cache as {@link config}.
     */
    chainParams(options?: {
        refresh?: boolean;
    }): Promise<ChainFeeParams>;
    /** Forgets the cached config; the next plan reads it again. */
    invalidate(): void;
    /** Plans a message against the chain's current prices. See {@link planFees}. */
    plan(msg: TxMsg, options?: PlanRequestOptions): Promise<FeePlan>;
    /** Plans a message against a config the caller already holds. It touches no network and no cache. */
    planWith(config: GasConfig, msg: TxMsg, options?: FeePlanOptions): FeePlan;
}

phantasma-sdk-ts/rpc/helpers

Source: dist/types/rpc/helpers/index.d.ts

Declarations

export * from './vm-schema-helpers.js';

phantasma-sdk-ts/rpc/helpers/vm-schema-helpers

Source: dist/types/rpc/helpers/vm-schema-helpers.d.ts

Declarations

export declare function vmStructSchemaFromRpcResult(r: VmStructSchemaResult): VmStructSchema;
export declare function vmVariableSchemaFromRpcResult(v: VmVariableSchemaResult): VmVariableSchema;

phantasma-sdk-ts/rpc

Source: dist/types/rpc/index.d.ts

Declarations

export * from './fee-planner.js';
export * from './helpers/index.js';
export * from './interfaces/index.js';
export * from './phantasma.js';
export * from './rpc-result.js';
export * from './transaction-preflight.js';

phantasma-sdk-ts/rpc/interfaces/abi-contract

Source: dist/types/rpc/interfaces/abi-contract.d.ts

Declarations

export interface ABIContract {
    name: string;
    methods: Array<ABIMethod>;
}

phantasma-sdk-ts/rpc/interfaces/abi-event

Source: dist/types/rpc/interfaces/abi-event.d.ts

Declarations

export interface ABIEvent {
    value: number;
    name: string;
    returnType: string;
    description: string;
}

phantasma-sdk-ts/rpc/interfaces/abi-method

Source: dist/types/rpc/interfaces/abi-method.d.ts

Declarations

export interface ABIMethod {
    name: string;
    returnType: string;
    parameters: Array<ABIParameter>;
}

phantasma-sdk-ts/rpc/interfaces/abi-parameter

Source: dist/types/rpc/interfaces/abi-parameter.d.ts

Declarations

export interface ABIParameter {
    name: string;
    type: string;
}

phantasma-sdk-ts/rpc/interfaces/account-info

Source: dist/types/rpc/interfaces/account-info.d.ts

Declarations

export interface AccountInfo {
    address: string;
    /** On-chain registered name, or `anonymous` when the address has none. */
    name: string;
    /**
     * Staking info. Note the wire name differs from {@link Account}, which carries the same object
     * under `stakes` and uses `stake` for a deprecated flat scalar.
     */
    stake: Stake;
}

phantasma-sdk-ts/rpc/interfaces/account-transactions

Source: dist/types/rpc/interfaces/account-transactions.d.ts

Declarations

export interface AccountTransactions {
    address: string;
    txs: Array<TransactionData>;
}

phantasma-sdk-ts/rpc/interfaces/account

Source: dist/types/rpc/interfaces/account.d.ts

Declarations

export interface Account {
    address: string;
    name: string;
    stakes: Stake;
    stake: string;
    unclaimed: string;
    relay?: string;
    validator: string;
    storage: Storage;
    balances: Array<Balance>;
    txs?: Array<string>;
}

phantasma-sdk-ts/rpc/interfaces/archive

Source: dist/types/rpc/interfaces/archive.d.ts

Declarations

export interface Archive {
    name?: string;
    hash?: string;
    time: number;
    size: number;
    encryption?: string;
    blockCount: number;
    missingBlocks?: Array<number>;
    owners?: Array<string>;
}

phantasma-sdk-ts/rpc/interfaces/auction

Source: dist/types/rpc/interfaces/auction.d.ts

Declarations

export interface Auction {
    creatorAddress: string;
    chainAddress: string;
    startDate: number;
    endDate: number;
    baseSymbol: string;
    quoteSymbol: string;
    tokenId: string;
    price: string;
    endPrice: string;
    extensionPeriod: string;
    type: string;
    rom: string;
    ram: string;
    listingFee: string;
    currentWinner: string;
}

phantasma-sdk-ts/rpc/interfaces/balance

Source: dist/types/rpc/interfaces/balance.d.ts

Declarations

export interface Balance {
    chain: string;
    amount: string;
    symbol: string;
    decimals: number;
    ids?: Array<string>;
}

phantasma-sdk-ts/rpc/interfaces/block

Source: dist/types/rpc/interfaces/block.d.ts

Declarations

export interface Block {
    hash: string;
    previousHash: string;
    timestamp: number;
    height: number;
    chainAddress: string;
    protocol: number;
    txs: Array<TransactionData>;
    validatorAddress: string;
    producerAddress?: string;
    reward: string;
    events?: Array<Event>;
    oracles?: Array<Oracle>;
}

phantasma-sdk-ts/rpc/interfaces/build-info-result

Source: dist/types/rpc/interfaces/build-info-result.d.ts

Declarations

export interface BuildInfoResult {
    version: string;
    commit: string;
    buildTimeUtc: string;
}

phantasma-sdk-ts/rpc/interfaces/chain

Source: dist/types/rpc/interfaces/chain.d.ts

Declarations

export interface Chain {
    name?: string;
    address?: string;
    parent?: string;
    height: number;
    organization?: string;
    contracts?: Array<string>;
    dapps?: Array<string>;
}

phantasma-sdk-ts/rpc/interfaces/channel

Source: dist/types/rpc/interfaces/channel.d.ts

Declarations

export interface Channel {
    creatorAddress: string;
    targetAddress: string;
    name: string;
    chain: string;
    creationTime: number;
    symbol: string;
    fee: string;
    balance: string;
    active: boolean;
    index: number;
}

phantasma-sdk-ts/rpc/interfaces/contract

Source: dist/types/rpc/interfaces/contract.d.ts

Declarations

export interface Contract {
    name: string;
    address: string;
    owner?: string;
    script: string;
    methods?: Array<ABIMethod>;
    events?: Array<ABIEvent>;
}

phantasma-sdk-ts/rpc/interfaces/cursor-paginated-result

Source: dist/types/rpc/interfaces/cursor-paginated-result.d.ts

Declarations

export interface CursorPaginatedResult<T> {
    result?: T;
    cursor?: string;
}

phantasma-sdk-ts/rpc/interfaces/dapp

Source: dist/types/rpc/interfaces/dapp.d.ts

Declarations

export interface Dapp {
    name: string;
    address: string;
    chain: string;
}

phantasma-sdk-ts/rpc/interfaces/estimate-transaction

Source: dist/types/rpc/interfaces/estimate-transaction.d.ts

Declarations

export interface EstimateTransactionResult {
    /** True when the transaction would not complete on-chain as submitted; see abortReason. */
    wouldAbort: boolean;
    /** Rejection or abort reason when wouldAbort is true; empty otherwise. */
    abortReason?: string;
    /** Settled gas bill in kcal-base, including the minimum-bill floor and the maxGas clamp (aborted transactions still pay). */
    gasBillKcalBase: string;
    /** Newly paid storage quanta the transaction creates (dataRows * dataEscrowPerRow == dataEscrowAtoms). */
    dataRows: string;
    /** Gross storage escrow paid for grown rows, in data-token atoms. */
    dataEscrowAtoms: string;
    /** Gross storage refunds for shrunk rows, in data-token atoms. */
    dataRefundAtoms: string;
    /** Recommended TxMsg.maxGas: the bill plus a 15% state-drift margin, floored at the chain minimums; "0" when wouldAbort. */
    recommendedMaxGas: string;
    /** Recommended TxMsg.maxData: the net escrow plus a 15% margin, aligned up to whole rows; "0" when wouldAbort or nothing is escrowed. */
    recommendedMaxData: string;
}
export declare function feeEstimateFromRpc(result: EstimateTransactionResult): FeeQuote;

phantasma-sdk-ts/rpc/interfaces/event-extended

Source: dist/types/rpc/interfaces/event-extended.d.ts

Declarations

export interface TokenCreateData {
    symbol: string;
    maxSupply: string;
    decimals: number;
    isNonFungible: boolean;
    carbonTokenId: number;
    metadata: Record<string, string>;
}
export interface TokenSeriesCreateData {
    symbol: string;
    seriesId: string;
    maxMint: number;
    maxSupply: number;
    owner: string;
    carbonTokenId: number;
    carbonSeriesId: number;
    metadata: Record<string, string>;
}
export interface MarketOrderData {
    baseSymbol: string;
    quoteSymbol: string;
    tokenId: string;
    carbonBaseTokenId: number;
    carbonQuoteTokenId: number;
    carbonInstanceId: number;
    seller: string;
    buyer: string;
    price: string;
    endPrice: string;
    startDate: number;
    endDate: number;
    type: string;
}
export interface SpecialResolutionCall<TArguments extends SpecialResolutionArguments = SpecialResolutionArguments> {
    moduleId: number;
    module: string;
    methodId: number;
    method: string;
    arguments?: TArguments;
    calls?: SpecialResolutionCall[];
}
export interface SpecialResolutionData {
    /** Numeric on the wire, unlike the string `resolutionId` of `NestedResolutionArguments`. */
    resolutionId: number;
    description?: string;
    calls: SpecialResolutionCall[];
}
export type ExtendedEventData = TokenCreateData | TokenSeriesCreateData | MarketOrderData | SpecialResolutionData;
export interface EventExtended<T = unknown> {
    address: string;
    contract: string;
    kind: string;
    data: T;
}
export type EventExtendedTyped = EventExtended<ExtendedEventData>;

phantasma-sdk-ts/rpc/interfaces/event

Source: dist/types/rpc/interfaces/event.d.ts

Declarations

export interface Event {
    address: string;
    contract: string;
    kind: string;
    name: string;
    data: string;
}

phantasma-sdk-ts/rpc/interfaces/gas-config

Source: dist/types/rpc/interfaces/gas-config.d.ts

Declarations

export interface GasConfigResult {
    /** Gas model version: 1 = original fee model, 2 = gas-model-v2 (config version >= 1). */
    gasModelVersion: number;
    /** Current on-chain GasConfig. */
    gasConfig?: GasConfigData;
    /** Chain block rate target in milliseconds. */
    blockRateTarget: number;
    /** Transaction expiry window in milliseconds. */
    expiryWindow: number;
    /** Gas-model-v2 price of block-carried bytes in gas units per byte; absent under gas model v1. */
    unitsPerBlockDataByte?: number;
}
export interface GasConfigData {
    version: number;
    maxNameLength: number;
    maxTokenSymbolLength: number;
    feeShift: number;
    maxStructureSize: number;
    feeMultiplier: string;
    gasTokenId: string;
    dataTokenId: string;
    minimumGasOffer: string;
    dataEscrowPerRow: string;
    gasFeeTransfer: string;
    gasFeeQuery: string;
    gasFeeCreateTokenBase: string;
    gasFeeCreateTokenSymbol: string;
    gasFeeCreateTokenSeries: string;
    gasFeePerByte: string;
    gasFeeRegisterName: string;
    gasBurnRatioMul: string;
    gasBurnRatioShift: number;
    minimumGasBill?: string;
    gasProducerRatioMul?: string;
    gasProducerRatioShift?: number;
    gasDappRatioMul?: string;
    gasDappRatioShift?: number;
    policyFeeCreateTokenBase?: string;
    policyFeeCreateTokenSymbol?: string;
    policyFeeCreateTokenSeries?: string;
    policyFeeRegisterName?: string;
    legacyDataEscrowPerRow?: string;
}
export declare function gasConfigFromRpc(result: GasConfigResult): GasConfig;

phantasma-sdk-ts/rpc/interfaces/governance

Source: dist/types/rpc/interfaces/governance.d.ts

Declarations

export interface Governance {
    name: string;
    value: string;
}

phantasma-sdk-ts/rpc/interfaces

Source: dist/types/rpc/interfaces/index.d.ts

Declarations

export * from './abi-contract.js';
export * from './abi-event.js';
export * from './abi-method.js';
export * from './abi-parameter.js';
export * from './account.js';
export * from './account-info.js';
export * from './account-transactions.js';
export * from './archive.js';
export * from './auction.js';
export * from './balance.js';
export * from './block.js';
export * from './chain.js';
export * from './channel.js';
export * from './contract.js';
export * from './dapp.js';
export * from './estimate-transaction.js';
export * from './event.js';
export * from './event-extended.js';
export * from './gas-config.js';
export * from './governance.js';
export * from './interop.js';
export * from './key-value.js';
export * from './leaderboard.js';
export * from './leaderboard-row.js';
export * from './nexus.js';
export * from './nft.js';
export * from './oracle.js';
export * from './organization.js';
export * from './paginated.js';
export * from './peer.js';
export * from './platform.js';
export * from './receipt.js';
export * from './script.js';
export * from './send-raw-tx.js';
export * from './signature-result.js';
export * from './special-resolution-arguments.js';
export * from './stake.js';
export * from './storage.js';
export * from './swap.js';
export * from './token.js';
export * from './token-data.js';
export * from './token-external.js';
export * from './token-price.js';
export * from './token-series.js';
export * from './transaction-data.js';
export * from './validator.js';
export * from './cursor-paginated-result.js';
export * from './token-series-result.js';
export * from './build-info-result.js';
export * from './phantasma-vm-config.js';
export * from './token-schemas-result.js';
export * from './vm-named-variable-schema-result.js';
export * from './vm-struct-schema-result.js';
export * from './vm-value.js';
export * from './vm-variable-schema-result.js';

phantasma-sdk-ts/rpc/interfaces/interop

Source: dist/types/rpc/interfaces/interop.d.ts

Declarations

export interface Interop {
    local: string;
    external: string;
}

phantasma-sdk-ts/rpc/interfaces/key-value

Source: dist/types/rpc/interfaces/key-value.d.ts

Declarations

export interface KeyValue {
    key: string;
    /** Decoded VM value: a scalar string, or the array/struct shape the value really has. */
    value: VmValue;
}

phantasma-sdk-ts/rpc/interfaces/leaderboard-row

Source: dist/types/rpc/interfaces/leaderboard-row.d.ts

Declarations

export interface LeaderboardRow {
    address: string;
    value: string;
}

phantasma-sdk-ts/rpc/interfaces/leaderboard

Source: dist/types/rpc/interfaces/leaderboard.d.ts

Declarations

export interface Leaderboard {
    name?: string;
    rows?: Array<LeaderboardRow>;
}

phantasma-sdk-ts/rpc/interfaces/nexus

Source: dist/types/rpc/interfaces/nexus.d.ts

Declarations

export interface Nexus {
    name?: string;
    protocol: number;
    platforms?: Array<Platform>;
    tokens?: Array<Token>;
    chains?: Array<Chain>;
    governance?: Array<Governance>;
    organizations?: Array<string>;
}

phantasma-sdk-ts/rpc/interfaces/nft

Source: dist/types/rpc/interfaces/nft.d.ts

Declarations

export interface NFT {
    id: string;
    series: string;
    carbonTokenId: string;
    carbonSeriesId: string;
    carbonNftAddress: string;
    mint: string;
    chainName: string;
    ownerAddress: string;
    creatorAddress: string;
    ram: string;
    rom: string;
    status: string;
    infusion: KeyValue[];
    properties: KeyValue[];
}

phantasma-sdk-ts/rpc/interfaces/oracle

Source: dist/types/rpc/interfaces/oracle.d.ts

Declarations

export interface Oracle {
    url: string;
    content: string;
}

phantasma-sdk-ts/rpc/interfaces/organization

Source: dist/types/rpc/interfaces/organization.d.ts

Declarations

export interface Organization {
    name?: string;
    owner?: string;
    carbonOwner?: string;
    metadata?: KeyValue[];
    memberCount?: string;
}
export interface OrganizationMember {
    address?: string;
    carbonAddress?: string;
    isMember?: boolean;
    memberTime?: number;
}
export type RpcAddressType = 'Phantasma' | 'Carbon';

phantasma-sdk-ts/rpc/interfaces/paginated

Source: dist/types/rpc/interfaces/paginated.d.ts

Declarations

export interface Paginated<T> {
    page: number;
    pageSize: number;
    total: number;
    totalPages: number;
    result: T;
}

phantasma-sdk-ts/rpc/interfaces/peer

Source: dist/types/rpc/interfaces/peer.d.ts

Declarations

export interface Peer {
    url: string;
    version: string;
    flags: string;
    fee: string;
    pow: number;
}

phantasma-sdk-ts/rpc/interfaces/phantasma-vm-config

Source: dist/types/rpc/interfaces/phantasma-vm-config.d.ts

Declarations

export interface PhantasmaVmConfig {
    isStored: boolean;
    featureLevel: number;
    gasConstructor: string;
    gasNexus: string;
    gasOrganization: string;
    gasAccount: string;
    gasLeaderboard: string;
    gasStandard: string;
    gasOracle: string;
    fuelPerContractDeploy: string;
}

phantasma-sdk-ts/rpc/interfaces/platform

Source: dist/types/rpc/interfaces/platform.d.ts

Declarations

export interface Platform {
    platform: string;
    chain: string;
    fuel: string;
    tokens: Array<string>;
    interop: Array<Interop>;
}

phantasma-sdk-ts/rpc/interfaces/receipt

Source: dist/types/rpc/interfaces/receipt.d.ts

Declarations

export interface Receipt {
    nexus: string;
    channel: string;
    index: string;
    timestamp: number;
    sender: string;
    receiver: string;
    script: string;
}

phantasma-sdk-ts/rpc/interfaces/script

Source: dist/types/rpc/interfaces/script.d.ts

Declarations

export interface Script {
    events: Array<Event>;
    result: string;
    results: Array<string>;
    oracles: Array<Oracle>;
    error?: string;
}

phantasma-sdk-ts/rpc/interfaces/send-raw-tx

Source: dist/types/rpc/interfaces/send-raw-tx.d.ts

Declarations

export interface SendRawTx {
    hash: string;
    error: string;
}

phantasma-sdk-ts/rpc/interfaces/signature-result

Source: dist/types/rpc/interfaces/signature-result.d.ts

Declarations

export interface SignatureResult {
    kind: string;
    data: string;
}

phantasma-sdk-ts/rpc/interfaces/special-resolution-arguments

Source: dist/types/rpc/interfaces/special-resolution-arguments.d.ts

Declarations

export type SpecialResolutionArguments = RawArguments | GasConfigArguments | ChainConfigArguments | NestedResolutionArguments | MetadataArguments | NodeConfigArguments | RegisterNameArguments | AddressArguments | NameArguments | ExecuteScriptArguments | RegisterTokenContractArguments | DeployContractArguments | PhantasmaVmConfigArguments | ImportContractsArguments | RepairSeriesArguments | RepairTokenArguments | TokenReferenceArguments | TokenSeriesReferenceArguments | SymbolArguments | TransferFungibleArguments | TransferNonFungibleArguments | MintFungibleArguments | BurnFungibleArguments | BalanceArguments | CreateTokenArguments | TokenSeriesArguments | CreateMintedTokenSeriesArguments | MintNonFungibleArguments | MintPhantasmaNonFungibleArguments | BurnNonFungibleArguments | NonFungibleInfoArguments | NonFungibleInfoByRomIdArguments | SeriesInfoByMetaIdArguments | TokensConfigArguments | UpdateTokenMetadataArguments | UpdateSeriesMetadataArguments;
export interface RawArguments {
    rawArgs: string;
}
export interface GasConfigArguments {
    version: string;
    maxNameLength: string;
    maxTokenSymbolLength: string;
    feeShift: string;
    maxStructureSize: string;
    feeMultiplier: string;
    gasTokenId: string;
    dataTokenId: string;
    minimumGasOffer: string;
    dataEscrowPerRow: string;
    gasFeeTransfer: string;
    gasFeeQuery: string;
    gasFeeCreateTokenBase: string;
    gasFeeCreateTokenSymbol: string;
    gasFeeCreateTokenSeries: string;
    gasFeePerByte: string;
    gasFeeRegisterName: string;
    gasBurnRatioMul: string;
    gasBurnRatioShift: string;
    minimumGasBill?: string;
    gasProducerRatioMul?: string;
    gasProducerRatioShift?: string;
    gasDappRatioMul?: string;
    gasDappRatioShift?: string;
    policyFeeCreateTokenBase?: string;
    policyFeeCreateTokenSymbol?: string;
    policyFeeCreateTokenSeries?: string;
    policyFeeRegisterName?: string;
    legacyDataEscrowPerRow?: string;
}
export interface ChainConfigArguments {
    version: string;
    reserved1: string;
    reserved2: string;
    reserved3: string;
    allowedTxTypes: string;
    expiryWindow: string;
    blockRateTarget: string;
}
export interface NestedResolutionArguments {
    resolutionId: string;
}
export interface MetadataArguments {
    metadata: Record<string, VmValue>;
}
export interface ConsensusNode {
    id: string;
    type: string;
}
export interface NodeConfigArguments {
    nodes: ConsensusNode[];
}
export interface RegisterNameArguments {
    address: string;
    name: string;
}
export interface AddressArguments {
    address: string;
}
export interface NameArguments {
    name: string;
}
export interface ExecuteScriptArguments {
    maxGas: string;
    gasFrom: string;
    script: string;
}
export interface RegisterTokenContractArguments {
    tokenId: string;
    symbol: string;
    script: string;
    abi: string;
    /** Resolved token symbol; absent when the token could not be resolved at answer time. */
    token?: string;
}
export interface DeployContractArguments {
    from: string;
    contractName: string;
    script: string;
    abi: string;
}
export interface PhantasmaVmConfigArguments {
    featureLevel: string;
    gasConstructor: string;
    gasNexus: string;
    gasOrganization: string;
    gasAccount: string;
    gasLeaderboard: string;
    gasStandard: string;
    gasOracle: string;
    fuelPerContractDeploy: string;
}
export interface ContractStorageRow {
    key: string;
    value: string;
}
export interface ContractStorageTable {
    name: string;
    rows: ContractStorageRow[];
}
export interface ImportedContract {
    name: string;
    address: string;
    owner: string;
    script: string;
    abi: string;
    /** Root-level contract variables. */
    rootVariables: ContractStorageRow[];
    /** Map and list tables, including their backing rows. */
    tables: ContractStorageTable[];
}
export interface ImportContractsArguments {
    contractsCount: string;
    contracts: ImportedContract[];
}
export interface SeriesSupplement {
    token: string;
    tokenId: string;
    phantasmaSeriesId: string;
    maxSupply: string;
    mintCount: string;
    mode: string;
    script: string;
    abi: string;
    rom: string;
}
export interface SeriesMintCountRepair {
    token: string;
    tokenId: string;
    phantasmaSeriesId: string;
    importedLiveCount: string;
    script: string;
    abi: string;
}
export interface RepairSeriesArguments {
    supplementsCount: string;
    supplements: SeriesSupplement[];
    repairsCount: string;
    repairs: SeriesMintCountRepair[];
}
export interface TokenRepair {
    token: string;
    tokenId: string;
    symbol: string;
    script: string;
    abi: string;
    tokenFlags: string;
    /**
     * Bitmask of the repair operations the chain was asked to perform. Kept numeric on purpose: a new
     * chain-side operation must not silently render as an unrelated name here.
     */
    repairMask: string;
}
export interface RepairTokenArguments {
    repairsCount: string;
    repairs: TokenRepair[];
}
export interface TokenReferenceArguments {
    token: string;
    tokenId: string;
}
export interface TokenSeriesReferenceArguments extends TokenReferenceArguments {
    seriesId: string;
}
export interface SymbolArguments {
    symbol: string;
}
export interface TransferFungibleArguments extends TokenReferenceArguments {
    from: string;
    to: string;
    amount: string;
}
export interface TransferNonFungibleArguments extends TokenReferenceArguments {
    from: string;
    to: string;
    instanceIds: string[];
}
export interface MintFungibleArguments extends TokenReferenceArguments {
    to: string;
    amount: string;
}
export interface BurnFungibleArguments extends TokenReferenceArguments {
    from: string;
    amount: string;
}
export interface BalanceArguments extends TokenReferenceArguments {
    address: string;
}
export interface CreateTokenArguments {
    symbol: string;
    owner: string;
    maxSupply: string;
    decimals: string;
    flags: string;
    /** Decoded metadata fields; absent when the token carries none. */
    metadata?: Record<string, VmValue>;
    /** NFT schema blob as hex; absent for fungible tokens. */
    tokenSchemas?: string;
}
export interface TokenSeriesArguments extends TokenReferenceArguments {
    owner: string;
    maxMint: string;
    maxSupply: string;
    /** Decoded series metadata; absent when the token declares no schema for it. */
    metadata?: Record<string, VmValue>;
    /** Phantasma series id taken from the decoded metadata, when the schema carries one. */
    seriesId?: string;
    /** Metadata blob as hex, reported instead of `metadata` when it cannot be decoded. */
    metadataRaw?: string;
}
export interface CreateMintedTokenSeriesArguments extends TokenSeriesArguments {
    recipient: string;
    roms: string[];
    rams: string[];
}
export interface NftMint {
    seriesId: string;
    rom: string;
    ram: string;
}
export interface PhantasmaNftMint {
    phantasmaSeriesId: string;
    rom: string;
    ram: string;
}
export interface MintNonFungibleArguments extends TokenReferenceArguments {
    owner: string;
    tokens: NftMint[];
}
export interface MintPhantasmaNonFungibleArguments extends TokenReferenceArguments {
    owner: string;
    tokens: PhantasmaNftMint[];
}
export interface BurnNonFungibleArguments extends TokenReferenceArguments {
    address: string;
    instanceIds: string[];
}
export interface NonFungibleInfoArguments extends TokenReferenceArguments {
    instanceId: string;
    getSchemas: string;
}
export interface NonFungibleInfoByRomIdArguments extends TokenReferenceArguments {
    romId: string;
    getSchemas: string;
}
export interface SeriesInfoByMetaIdArguments extends TokenReferenceArguments {
    romId: string;
}
export interface TokensConfigArguments {
    flags: string;
    /** Names of the flags that are set, including a Reserved0xNN entry for unknown bits. */
    flagsNames: string[];
}
export interface UpdateTokenMetadataArguments extends TokenReferenceArguments {
    metadata?: Record<string, VmValue>;
}
export interface UpdateSeriesMetadataArguments extends TokenReferenceArguments {
    seriesId: string;
    /** Metadata blob as hex: this call carries it unschematized. */
    metadata: string;
}
export interface SpecialResolutionArgumentsByMethod {
    'governance.SetGasConfig': GasConfigArguments;
    'governance.SetChainConfig': ChainConfigArguments;
    'governance.SpecialResolution': NestedResolutionArguments;
    'governance.SetMetadata': MetadataArguments;
    'governance.SetNodeConfig': NodeConfigArguments;
    'governance.RegisterName': RegisterNameArguments;
    'governance.LookupName': AddressArguments;
    'governance.LookupAddress': NameArguments;
    'phantasma_vm.ExecuteScript': ExecuteScriptArguments;
    'phantasma_vm.RegisterTokenContract': RegisterTokenContractArguments;
    'phantasma_vm.DeployContract': DeployContractArguments;
    'phantasma_vm.IsContractDeployed': NameArguments;
    'phantasma_vm.SetConfig': PhantasmaVmConfigArguments;
    'phantasma_vm.ImportContracts': ImportContractsArguments;
    'phantasma_vm.RepairSeries': RepairSeriesArguments;
    'phantasma_vm.RepairToken': RepairTokenArguments;
    'token.TransferFungible': TransferFungibleArguments;
    'token.TransferNonFungible': TransferNonFungibleArguments;
    'token.CreateToken': CreateTokenArguments;
    'token.MintFungible': MintFungibleArguments;
    'token.BurnFungible': BurnFungibleArguments;
    'token.GetBalance': BalanceArguments;
    'token.CreateTokenSeries': TokenSeriesArguments;
    'token.DeleteTokenSeries': TokenSeriesReferenceArguments;
    'token.MintNonFungible': MintNonFungibleArguments;
    'token.BurnNonFungible': BurnNonFungibleArguments;
    'token.GetNonFungibleInfo': NonFungibleInfoArguments;
    'token.GetNonFungibleInfoByRomId': NonFungibleInfoByRomIdArguments;
    'token.GetSeriesInfo': TokenSeriesReferenceArguments;
    'token.GetSeriesInfoByMetaId': SeriesInfoByMetaIdArguments;
    'token.GetTokenInfo': TokenReferenceArguments;
    'token.GetTokenInfoBySymbol': SymbolArguments;
    'token.GetTokenSupply': TokenReferenceArguments;
    'token.GetSeriesSupply': TokenSeriesReferenceArguments;
    'token.GetTokenIdBySymbol': SymbolArguments;
    'token.GetBalances': AddressArguments;
    'token.CreateMintedTokenSeries': CreateMintedTokenSeriesArguments;
    'token.ApplyInflation': TokenReferenceArguments;
    'token.UpdateTokenMetadata': UpdateTokenMetadataArguments;
    'token.GetNextTokenInflation': TokenReferenceArguments;
    'token.SetTokensConfig': TokensConfigArguments;
    'token.UpdateSeriesMetadata': UpdateSeriesMetadataArguments;
    'token.MintPhantasmaNonFungible': MintPhantasmaNonFungibleArguments;
}

phantasma-sdk-ts/rpc/interfaces/stake

Source: dist/types/rpc/interfaces/stake.d.ts

Declarations

export interface Stake {
    amount: string;
    time: number;
    unclaimed: string;
}

phantasma-sdk-ts/rpc/interfaces/storage

Source: dist/types/rpc/interfaces/storage.d.ts

Declarations

export interface Storage {
    available: number;
    used: number;
    avatar: string;
    archives: Array<Archive>;
}

phantasma-sdk-ts/rpc/interfaces/swap

Source: dist/types/rpc/interfaces/swap.d.ts

Declarations

export interface Swap {
    sourcePlatform: string;
    sourceChain: string;
    sourceHash: string;
    sourceAddress: string;
    destinationPlatform: string;
    destinationChain: string;
    destinationHash: string;
    destinationAddress: string;
    symbol: string;
    value: string;
}

phantasma-sdk-ts/rpc/interfaces/token-data

Source: dist/types/rpc/interfaces/token-data.d.ts

Declarations

export interface TokenData {
    id: string;
    series: string;
    carbonTokenId: string;
    carbonSeriesId: string;
    carbonNftAddress: string;
    mint: string;
    chainName: string;
    ownerAddress: string;
    creatorAddress: string;
    ram: string;
    rom: string;
    status: string;
    infusion: KeyValue[];
    properties: KeyValue[];
}

phantasma-sdk-ts/rpc/interfaces/token-external

Source: dist/types/rpc/interfaces/token-external.d.ts

Declarations

export interface TokenExternal {
    platform: string;
    hash: string;
}

phantasma-sdk-ts/rpc/interfaces/token-price

Source: dist/types/rpc/interfaces/token-price.d.ts

Declarations

export interface TokenPrice {
    Timestamp: number;
    Open: string;
    High: string;
    Low: string;
    Close: string;
}

phantasma-sdk-ts/rpc/interfaces/token-schemas-result

Source: dist/types/rpc/interfaces/token-schemas-result.d.ts

Declarations

export interface TokenSchemasResult {
    seriesMetadata: VmStructSchemaResult;
    rom: VmStructSchemaResult;
    ram: VmStructSchemaResult;
}

phantasma-sdk-ts/rpc/interfaces/token-series-result

Source: dist/types/rpc/interfaces/token-series-result.d.ts

Declarations

export interface TokenSeriesResult {
    seriesId: string;
    carbonTokenId: string;
    carbonSeriesId: string;
    ownerAddress: string;
    maxMint: string;
    mintCount: string;
    currentSupply: string;
    maxSupply: string;
    burnedSupply?: string;
    mode?: string;
    script?: string;
    methods?: ABIMethod[];
    metadata: KeyValue[];
}

phantasma-sdk-ts/rpc/interfaces/token-series

Source: dist/types/rpc/interfaces/token-series.d.ts

Declarations

export type TokenSeries = TokenSeriesResult;

phantasma-sdk-ts/rpc/interfaces/token

Source: dist/types/rpc/interfaces/token.d.ts

Declarations

export interface Token {
    symbol: string;
    name: string;
    decimals: number;
    currentSupply: string;
    maxSupply: string;
    burnedSupply: string;
    address: string;
    owner: string;
    flags: string;
    script?: string;
    series: Array<TokenSeries>;
    carbonId: string;
    metadata?: KeyValue[];
    tokenSchemas?: TokenSchemasResult;
    external?: Array<TokenExternal>;
    price?: Array<TokenPrice>;
}

phantasma-sdk-ts/rpc/interfaces/transaction-data

Source: dist/types/rpc/interfaces/transaction-data.d.ts

Declarations

export interface TransactionData {
    hash: string;
    chainAddress: string;
    timestamp: number;
    blockHeight: number;
    blockHash: string;
    script: string;
    payload: string;
    carbonTxType: number;
    carbonTxData: string;
    events: Array<Event>;
    extendedEvents?: Array<EventExtended>;
    result: string;
    debugComment?: string;
    fee: string;
    state: string;
    signatures: Array<SignatureResult>;
    sender: string;
    gasPayer: string;
    gasTarget: string;
    gasPrice: string;
    gasLimit: string;
    expiration: number;
}

phantasma-sdk-ts/rpc/interfaces/validator

Source: dist/types/rpc/interfaces/validator.d.ts

Declarations

export interface Validator {
    address: string;
    type: string;
}

phantasma-sdk-ts/rpc/interfaces/vm-named-variable-schema-result

Source: dist/types/rpc/interfaces/vm-named-variable-schema-result.d.ts

Declarations

export interface VmNamedVariableSchemaResult {
    name: string;
    schema: VmVariableSchemaResult;
}

phantasma-sdk-ts/rpc/interfaces/vm-struct-schema-result

Source: dist/types/rpc/interfaces/vm-struct-schema-result.d.ts

Declarations

export interface VmStructSchemaResult {
    fields: VmNamedVariableSchemaResult[];
    flags: number;
}

phantasma-sdk-ts/rpc/interfaces/vm-value

Source: dist/types/rpc/interfaces/vm-value.d.ts

Declarations

export type VmValue = string | VmValue[] | {
    [field: string]: VmValue;
};

phantasma-sdk-ts/rpc/interfaces/vm-variable-schema-result

Source: dist/types/rpc/interfaces/vm-variable-schema-result.d.ts

Declarations

export interface VmVariableSchemaResult {
    type: string;
    schema?: VmStructSchemaResult;
}

phantasma-sdk-ts/rpc/phantasma

Source: dist/types/rpc/phantasma.d.ts

Declarations

export interface SendTransactionOptions extends PlanRequestOptions {
    /**
     * For a token creation, ask the chain whether the symbol is already taken. The send goes ahead
     * only when the chain answered that the symbol is free, see `preflightTransaction`. Every other
     * message is unaffected. Default true. `false` skips the lookup.
     *
     * The send is also refused when the lookup answered nothing at all. The policy fee is spent before
     * the contract looks at the symbol, so sending on an unestablished state is the outcome worth
     * paying a round trip to avoid.
     */
    preflight?: boolean;
}
export interface PhantasmaAPIOptions {
    maxRpcResponseBytes?: number;
    /** Optional API key sent in the X-Api-Key header on every RPC request. */
    apiKey?: string;
}
export declare const DEFAULT_MAX_RPC_RESPONSE_BYTES: number;
export declare class PhantasmaAPI {
    host: string;
    rpcName: string;
    nexus: string;
    availableHosts: RpcPeer[];
    maxRpcResponseBytes: number;
    pingAsync(host: string): Promise<number>;
    constructor(defHost: string, peersUrlJson: string | undefined | null, nexus: string, options?: PhantasmaAPIOptions);
    JSONRPCResult<T = unknown>(method: string, params: JsonRpcParam[]): Promise<RpcResult<T>>;
    JSONRPC(method: string, params: JsonRpcParam[]): Promise<unknown>;
    setMaxRpcResponseBytes(maxBytes: number): this;
    setApiKey(apiKey: string): this;
    setRpcHost(rpcHost: string): void;
    setRpcByName(rpcName: string): void;
    setNexus(nexus: string): void;
    updateRpc(): void;
    /**
     * @deprecated Use `formatUnits` instead. This method will be removed in v1.0.
     *
     * It divides in binary floating point, so it cannot express an amount exactly. KCAL has ten
     * decimals, and above roughly 900,720 KCAL a `number` can no longer hold an integer count of
     * atoms. `formatUnits` takes the atoms as a `bigint` and returns a decimal string. That is exact
     * for every amount and every token.
     */
    convertDecimals(amount: number, decimals: number): number;
    /**
     * Returns the account name and staking info of a given address.
     *
     * Cost is independent of how much the address holds, which makes this the endpoint to use in
     * wallet refresh loops; balances and NFTs are fetched separately through the cursor-paginated
     * account endpoints.
     */
    getAccountInfo(account: string): Promise<AccountInfo>;
    /**
     * Returns the account name and staking info for a batch of up to 100 addresses in one call.
     *
     * Batch counterpart of {@link getAccountInfo} with the same per-account record: the node answers
     * every address from a single state snapshot and returns results in request order. The addresses
     * travel as a native JSON array parameter; a malformed address rejects the whole batch.
     */
    getAccountInfos(accounts: string[]): Promise<AccountInfo[]>;
    /**
     * Returns the account name and balance of given address.
     *
     * @deprecated The response embeds every NFT id the address owns, so it grows without bound with
     * the size of the account; the node caps each `balances[].ids` list at 10000 entries while
     * `balances[].amount` keeps the true count, meaning the list is silently partial for large
     * holders. Use {@link getAccountInfo} together with {@link getAccountFungibleTokens} and
     * {@link getAccountNFTs}.
     */
    getAccount(account: string, extended?: boolean): Promise<Account>;
    /**
     * Returns the accounts name and balance of given addresses.
     *
     * @deprecated Same unbounded-response problem as {@link getAccount}, multiplied by the number of
     * addresses in one call. Use {@link getAccountInfo} together with
     * {@link getAccountFungibleTokens} and {@link getAccountNFTs}.
     */
    getAccounts(accounts: string[], extended?: boolean): Promise<Account[]>;
    lookUpName(name: string): Promise<string>;
    getBlockHeight(chainInput: string): Promise<number>;
    getBlockTransactionCountByHash(chainAddressOrName: string, blockHash: string): Promise<number>;
    getBlockByHash(blockHash: string): Promise<Block>;
    getBlockByHeight(chainInput: string, height: number): Promise<Block>;
    getLatestBlock(chainInput: string): Promise<Block>;
    getTransactionByBlockHashAndIndex(chainAddressOrName: string, blockHash: string, index: number): Promise<TransactionData>;
    getAddressTransactions(account: string, page: number, pageSize: number): Promise<Paginated<AccountTransactions>>;
    getAddressTransactionCount(account: string, chainInput: string): Promise<number>;
    sendRawTransaction(txData: string): Promise<string>;
    sendCarbonTransaction(txData: string): Promise<string>;
    invokeRawScript(chainInput: string, scriptData: string): Promise<Script>;
    getTransaction(hashText: string): Promise<TransactionData>;
    getChains(extended?: boolean): Promise<Chain[]>;
    getChain(name: string, extended?: boolean): Promise<Chain>;
    /**
     * Returns the current on-chain gas configuration plus the chain parameters fee estimation
     * needs (block rate target, expiry window). Changes only via governance resolutions, so the
     * result is safe to cache. `api.fees` reads it to plan fees.
     */
    getGasConfig(): Promise<GasConfigResult>;
    /**
     * Dry-runs a serialized transaction envelope against current chain state and returns its exact
     * fee bill with recommended maxGas/maxData ceilings (gas-model-v2 Tier-2 estimate). Signatures
     * inside the envelope may be zero-filled dummies of the correct length - the simulation skips
     * signature checks, and dummies preserve the exact envelope byte length the bill depends on.
     * A node with the estimate service switched off answers with a standard RPC error.
     * `api.fees.plan(msg)` plans a fee without that service.
     */
    estimateTransaction(txData: string): Promise<EstimateTransactionResult>;
    /**
     * The fee planner of the chain this client talks to. It reads the chain's gas config through this
     * client, caches it briefly, and prices messages with it. Call it as `api.fees.plan(msg)`.
     */
    get fees(): FeePlanner;
    /**
     * The gas token's id. The pre-flight uses it as its control lookup, because that token certainly
     * exists on any live chain. The id comes from the same cached gas config the planner reads, so
     * asking for it costs a round trip only once a minute. It is undefined when this client cannot
     * read that config, and the pre-flight then reports `unknown`.
     */
    controlTokenId(): Promise<bigint | undefined>;
    /**
     * Returns what NFT `instanceId` of token `tokenId` holds at its own address, in the form the fee
     * planner prices. A burn of that NFT returns every one of these to the burner and pays for each.
     *
     * The assets are read through the account queries, with the address in its Carbon form. Fungible
     * balances are resolved to token ids, so the free rows of the gas and data tokens are recognised.
     * Whether the burner already holds a returned token is left at the costlier reading, and that
     * moves the escrow ceiling alone.
     */
    infusedAssets(tokenId: bigint, instanceId: bigint): Promise<InfusedAsset[]>;
    /**
     * Sends a message in one step. The steps are pre-flight, fee plan, signatures and broadcast.
     * Returns the transaction hash.
     *
     * A message whose `maxGas` is still zero is planned against this chain's prices with `fees.plan`.
     * A message the caller already planned is sent as it is. Every witness signs through its
     * {@link TxSigner}, which can hold keys, drive hardware or call a remote service.
     *
     * The pre-flight refuses a token creation whose symbol the chain says is taken. It also refuses
     * one it could establish nothing about. See the `preflight` option.
     */
    sendTransaction(msg: TxMsg, signers: TxSigner | TxSigner[], options?: SendTransactionOptions): Promise<string>;
    getNexus(extended?: boolean): Promise<Nexus>;
    getContracts(chainAddressOrName?: string, extended?: boolean): Promise<Contract[]>;
    getContract(chainAddressOrName: string | undefined, contractName: string): Promise<Contract>;
    getContractByAddress(chainAddressOrName: string | undefined, contractAddress: string): Promise<Contract>;
    getOrganization(name: string, includeMemberCount?: boolean): Promise<Organization>;
    getOrganizations(pageSize?: number, cursor?: string, includeMemberCount?: boolean): Promise<CursorPaginatedResult<Organization[]>>;
    getOrganizationMembers(name: string, pageSize?: number, cursor?: string, includeMemberTime?: boolean): Promise<CursorPaginatedResult<OrganizationMember[]>>;
    getOrganizationMember(name: string, address: string, checkAddressReservedByte?: boolean, addressType?: RpcAddressType): Promise<OrganizationMember>;
    getLeaderboard(name: string): Promise<Leaderboard>;
    getTokens(ownerAddress: string | undefined | null, extended?: boolean): Promise<Token[]>;
    getToken(symbol: string, extended?: boolean, carbonTokenId?: bigint): Promise<Token>;
    /**
     * Returns data of a non-fungible token, in hexadecimal format.
     *
     * @deprecated The node serves this as a strict subset of `getNFT` - same response, with property
     * loading forced off - so {@link getNFT} covers it entirely.
     */
    getTokenData(symbol: string, IDtext: string): Promise<TokenData>;
    getTokenBalance(account: string, tokenSymbol: string, chainInput: string, checkAddressResevedByte?: boolean, addressType?: RpcAddressType): Promise<Balance>;
    getTokenSeries(symbol: string, carbonTokenId: bigint, pageSize?: number, cursor?: string): Promise<CursorPaginatedResult<TokenSeriesResult[]>>;
    getTokenSeriesById(symbol: string, carbonTokenId: bigint, seriesId: string, carbonSeriesId: number): Promise<TokenSeriesResult>;
    getTokenNFTs(carbonTokenId: bigint, carbonSeriesId?: number, pageSize?: number, cursor?: string, extended?: boolean): Promise<CursorPaginatedResult<NFT[]>>;
    getAccountFungibleTokens(account: string, tokenSymbol?: string, carbonTokenId?: bigint, pageSize?: number, cursor?: string, checkAddressReservedByte?: boolean, addressType?: RpcAddressType): Promise<CursorPaginatedResult<Balance[]>>;
    getAccountNFTs(account: string, tokenSymbol?: string, carbonTokenId?: bigint, carbonSeriesId?: number, pageSize?: number, cursor?: string, extended?: boolean, checkAddressReservedByte?: boolean): Promise<CursorPaginatedResult<NFT[]>>;
    getAccountOwnedTokens(account: string, tokenSymbol?: string, carbonTokenId?: bigint, pageSize?: number, cursor?: string, checkAddressReservedByte?: boolean, addressType?: RpcAddressType): Promise<CursorPaginatedResult<Token[]>>;
    getAccountOwnedTokenSeries(account: string, tokenSymbol?: string, carbonTokenId?: bigint, pageSize?: number, cursor?: string, checkAddressReservedByte?: boolean): Promise<CursorPaginatedResult<TokenSeriesResult[]>>;
    getAuctionsCount(chainAddressOrName: string, symbol: string): Promise<number>;
    getAuctions(chainAddressOrName: string, symbol: string, page: number, pageSize: number): Promise<Paginated<Auction[]>>;
    getAuction(chainAddressOrName: string, symbol: string, IDtext: string): Promise<Auction>;
    getArchive(hashText: string): Promise<Archive>;
    writeArchive(hashText: string, blockIndex: number, blockContent: string): Promise<boolean>;
    getNFT(symbol: string, nftId: string, extended?: boolean): Promise<NFT>;
    getNFTs(symbol: string, nftIDs: string[], extended?: boolean): Promise<NFT[]>;
    getVersion(): Promise<BuildInfoResult>;
    getPhantasmaVmConfig(chainAddressOrName: string): Promise<PhantasmaVmConfig>;
}
export {};

phantasma-sdk-ts/rpc/rpc-result

Source: dist/types/rpc/rpc-result.d.ts

Declarations

export type JsonRpcParam = string | number | boolean | null | undefined | string[];
export interface JsonRpcErrorObject {
    code?: number;
    message?: string;
    data?: unknown;
}
export interface JsonRpcSuccessResponse<T> {
    jsonrpc?: string;
    id?: string | number | null;
    result: T;
}
export interface JsonRpcErrorResponse {
    jsonrpc?: string;
    id?: string | number | null;
    error: string | JsonRpcErrorObject;
}
export type JsonRpcResponse<T> = JsonRpcSuccessResponse<T> | JsonRpcErrorResponse;
export interface RpcErrorResult {
    error: string;
    code?: number;
    data?: unknown;
    status?: number;
    statusText?: string;
}
export type RpcResult<T> = T | RpcErrorResult;
export declare function isRpcErrorResult(value: unknown): value is RpcErrorResult;
export declare function getRpcErrorMessage(value: unknown, fallback?: string): string;
export declare function normalizeRpcError(error: unknown, fallback?: string): RpcErrorResult;
export declare function unwrapRpcResult<T>(result: RpcResult<T>): T;

phantasma-sdk-ts/rpc/transaction-preflight

Source: dist/types/rpc/transaction-preflight.d.ts

Declarations

export declare class TransactionPreflightError extends Error {
    constructor(message: string);
}
export interface PreflightSource {
    getToken(symbol: string, extended?: boolean, carbonTokenId?: bigint): Promise<Token>;
    /**
     * Id of a token that certainly exists on this chain, which is the gas token. The symbol lookup
     * needs it as a CONTROL, see {@link preflightTransaction}. A source that cannot supply one still
     * works. A free symbol is then reported as `unknown`.
     */
    controlTokenId?(): Promise<bigint | undefined>;
}
export type PreflightVerdict = 'not-applicable' | 'taken' | 'free' | 'unknown';
export interface PreflightResult {
    verdict: PreflightVerdict;
    /** What was being checked, for example `token symbol GPX`. Absent when nothing was checked. */
    subject?: string;
    /** Why the lookup established nothing, in the node's own words. Present only on `unknown`. */
    reason?: string;
}
export declare function preflightTransaction(source: PreflightSource, msg: TxMsg): Promise<PreflightResult>;

phantasma-sdk-ts/tx/contract-artifacts

Source: dist/types/tx/contract-artifacts.d.ts

Declarations

export type ContractBinaryInput = Uint8Array | string;
export interface ContractArtifactFileEntry {
    path: string;
    size: number;
    sha256: string;
}
export interface ContractArtifactManifest {
    format: 'pha.contract.artifacts/v1';
    contractName: string;
    createdAtUtc: string;
    compiler: {
        name: string;
        version: string;
    };
    sourceFile?: string;
    files: {
        script: ContractArtifactFileEntry;
        abi: ContractArtifactFileEntry;
        debug?: ContractArtifactFileEntry;
    };
}
export interface ContractArtifactBundle {
    contractName: string;
    script: Uint8Array;
    abi: Uint8Array;
    debug?: Uint8Array;
    manifest?: ContractArtifactManifest;
}
export interface BuildContractArtifactManifestParams {
    contractName: string;
    compilerName: string;
    compilerVersion: string;
    scriptPath: string;
    script: ContractBinaryInput;
    abiPath: string;
    abi: ContractBinaryInput;
    sourceFile?: string;
    debugPath?: string;
    debug?: ContractBinaryInput;
    createdAtUtc?: string;
}
export interface BuildContractArtifactBundleParams {
    contractName: string;
    script: ContractBinaryInput;
    abi: ContractBinaryInput;
    debug?: ContractBinaryInput;
    manifest?: ContractArtifactManifest;
}
export declare function normalizeContractName(contractName: string): string;
export declare function coerceContractBytes(input: ContractBinaryInput, label: string): Uint8Array;
export declare function buildContractArtifactManifest(params: BuildContractArtifactManifestParams): ContractArtifactManifest;
export declare function buildContractArtifactBundle(params: BuildContractArtifactBundleParams): ContractArtifactBundle;

phantasma-sdk-ts/tx/contract-tx-helper

Source: dist/types/tx/contract-tx-helper.d.ts

Declarations

export interface ContractScriptBuildParams {
    from: string | Address;
    contractName: string;
    script: ContractBinaryInput;
    abi: ContractBinaryInput;
    gasPrice?: number | bigint;
    gasLimit?: number | bigint;
}
export interface ContractTransactionBuildParams extends ContractScriptBuildParams {
    nexus: string;
    chain?: string;
    /**
     * Moment the transaction stops being admissible. Default {@link DEFAULT_TX_EXPIRY_MS} from now,
     * the same lifetime a Carbon transaction gets.
     *
     * A flow with a person in it should set this from the chain's own window instead. Examples are a
     * hardware wallet confirming and a wallet-link round trip. See `expiryWithin`.
     */
    expiration?: Date;
    payloadHex?: string;
}
export interface ContractTransactionSignParams extends ContractTransactionBuildParams {
    signer: string | PhantasmaKeys;
    proofOfWork?: number;
}
export declare class ContractTxHelper {
    static readonly DefaultGasPrice: number;
    static readonly DefaultGasLimit = 100000;
    static buildDeployScript(params: ContractScriptBuildParams): string;
    static buildUpgradeScript(params: ContractScriptBuildParams): string;
    static buildDeployTransaction(params: ContractTransactionBuildParams): Transaction;
    static buildUpgradeTransaction(params: ContractTransactionBuildParams): Transaction;
    static buildDeployTransactionAndEncode(params: ContractTransactionSignParams): string;
    static buildUpgradeTransactionAndEncode(params: ContractTransactionSignParams): string;
    static buildDeployScriptFromBundle(bundle: ContractArtifactBundle, from: string | Address, gasPrice?: number | bigint, gasLimit?: number | bigint): string;
    static buildUpgradeScriptFromBundle(bundle: ContractArtifactBundle, from: string | Address, gasPrice?: number | bigint, gasLimit?: number | bigint): string;
    static encodePayloadText(text: string): string;
}

phantasma-sdk-ts/tx/execution-state

Source: dist/types/tx/execution-state.d.ts

Declarations

export declare enum ExecutionState {
    Running = 0,
    Break = 1,
    Fault = 2,
    Halt = 3
}

phantasma-sdk-ts/tx

Source: dist/types/tx/index.d.ts

Declarations

export * from './execution-state.js';
export * from './contract-artifacts.js';
export * from './contract-tx-helper.js';
export * from './transaction.js';
export * from './utils.js';

phantasma-sdk-ts/tx/transaction

Source: dist/types/tx/transaction.d.ts

Declarations

export declare class Transaction implements ISerializable {
    script: string;
    nexusName: string;
    chainName: string;
    payload: string;
    expiration: Date;
    signatures: Array<Signature>;
    hash: string;
    static fromHex(serializedData: string): Transaction;
    static fromBytes(serializedData: Uint8Array): Transaction;
    /** @deprecated Use `fromHex` for serialized hex strings. This alias will be removed in v1.0. */
    static FromBytes(serializedData: string): Transaction;
    constructor(nexusName: string, chainName: string, script: string, // Should be HexString
    expiration: Date, payload: string);
    sign(wif: string): void;
    signWithPrivateKey(privateKey: string): void;
    signWithKeys(keys: PhantasmaKeys): void;
    verifySignature(address: Address | string): boolean;
    /** @deprecated Use `verifySignature` instead. This alias will be removed in v1.0. */
    VerifySignature(address: Address | string): boolean;
    verifySignatures(addresses: Array<Address | string>): {
        ok: boolean;
        matched: string[];
    };
    /** @deprecated Use `verifySignatures` instead. This alias will be removed in v1.0. */
    VerifySignatures(addresses: Array<Address | string>): {
        ok: boolean;
        matched: string[];
    };
    getUnsignedBytes(): Uint8Array;
    /** @deprecated Use `getUnsignedBytes` instead. This alias will be removed in v1.0. */
    GetUnsignedBytes(): Uint8Array;
    getSignatureInfo(): Array<{
        kind: number;
        length: number;
    }>;
    /** @deprecated Use `getSignatureInfo` instead. This alias will be removed in v1.0. */
    GetSignatureInfo(): Array<{
        kind: number;
        length: number;
    }>;
    toByteArray(withSignature: boolean): Uint8Array;
    /** @deprecated Use `toByteArray` instead. This typoed alias will be removed in v1.0. */
    ToByteAray(withSignature: boolean): Uint8Array;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    toString(withSignature: boolean): string;
    toStringEncoded(withSignature: boolean): string;
    /** @deprecated Use `toStringEncoded` instead. This alias will be removed in v1.0. */
    ToStringEncoded(withSignature: boolean): string;
    getHash(): string;
    mineTransaction(difficulty: number): void;
    unserialize(serializedData: string): Transaction;
    static deserialize(serialized: Uint8Array): Transaction;
    /** @deprecated Use `deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize(serialized: Uint8Array): Transaction;
}

phantasma-sdk-ts/tx/utils

Source: dist/types/tx/utils.d.ts

Declarations

export declare function getPrivateKeyFromWif(wif: string): string;
export declare function getAddressFromWif(wif: string): string;
export declare function getPublicKeyFromPrivateKey(privateKey: string): string;
export declare function generateNewSeed(): string;
export declare function generateNewSeedWords(): string[];
export declare function generateNewWif(): string;
export declare function getWifFromPrivateKey(privateKey: string): string;
export declare function signData(msgHex: string, privateKey: string): string;
export declare function verifyData(msgHex: string, phaSig: string, address: string): boolean;

phantasma-sdk-ts/types/address

Source: dist/types/types/address.d.ts

Declarations

export declare enum AddressKind {
    Invalid = 0,
    User = 1,
    System = 2,
    Interop = 3
}
export declare class Address implements ISerializable {
    static readonly nullText: string;
    /** @deprecated Use `nullText` instead. This alias will be removed in v1.0. */
    static readonly NullText: string;
    static readonly lengthInBytes: number;
    /** @deprecated Use `lengthInBytes` instead. This alias will be removed in v1.0. */
    static readonly LengthInBytes: number;
    static readonly maxPlatformNameLength: number;
    /** @deprecated Use `maxPlatformNameLength` instead. This alias will be removed in v1.0. */
    static readonly MaxPlatformNameLength: number;
    static readonly nullAddress: Address;
    /** @deprecated Use `nullAddress` instead. This alias will be removed in v1.0. */
    static readonly Null: Address;
    get kind(): AddressKind;
    /** @deprecated Use `kind` instead. This alias will be removed in v1.0. */
    get Kind(): AddressKind;
    get isSystem(): boolean;
    /** @deprecated Use `isSystem` instead. This alias will be removed in v1.0. */
    get IsSystem(): boolean;
    get isInterop(): boolean;
    /** @deprecated Use `isInterop` instead. This alias will be removed in v1.0. */
    get IsInterop(): boolean;
    get isUser(): boolean;
    /** @deprecated Use `isUser` instead. This alias will be removed in v1.0. */
    get IsUser(): boolean;
    get isNull(): boolean;
    /** @deprecated Use `isNull` instead. This alias will be removed in v1.0. */
    get IsNull(): boolean;
    get text(): string;
    /** @deprecated Use `text` instead. This alias will be removed in v1.0. */
    get Text(): string;
    static fromPublicKey(publicKey: Uint8Array): Address;
    /** @deprecated Use `fromBytes` for 34-byte address data. This typoed alias will be removed in v1.0. */
    static FromPublickKey(bytes: Uint8Array): Address;
    static fromText(text: string): Address;
    /** @deprecated Use `fromText` instead. This alias will be removed in v1.0. */
    static FromText(text: string): Address;
    static parse(text: string): Address;
    /** @deprecated Use `parse` instead. This alias will be removed in v1.0. */
    static Parse(text: string): Address;
    static isValidAddress(text: string): boolean;
    /** @deprecated Use `isValidAddress` instead. This alias will be removed in v1.0. */
    static IsValidAddress(text: string): boolean;
    static fromBytes(bytes: Uint8Array): Address;
    /** @deprecated Use `fromBytes` instead. This alias will be removed in v1.0. */
    static FromBytes(bytes: Uint8Array): Address;
    static fromKey(key: KeyPair): Address;
    static fromKey(key: IKeyPair): Address;
    /** @deprecated Use `fromKey` instead. This alias will be removed in v1.0. */
    static FromKey(key: IKeyPair): Address;
    static fromHash(str: string): Address;
    static fromHash(input: Uint8Array): Address;
    /** @deprecated Use `fromHash` instead. This alias will be removed in v1.0. */
    static FromHash(str: string): Address;
    static FromHash(input: Uint8Array): Address;
    static fromWif(wif: string): Address;
    /** @deprecated Use `fromWif` instead. This alias will be removed in v1.0. */
    static FromWif(wif: string): Address;
    compareTo(other: Address): number;
    equals(other: unknown): boolean;
    toString(): string;
    getPublicKey(): Uint8Array;
    /** @deprecated Use `getPublicKey` instead. This alias will be removed in v1.0. */
    GetPublicKey(): Uint8Array;
    toByteArray(): Uint8Array;
    /** @deprecated Use `toByteArray` instead. This alias will be removed in v1.0. */
    ToByteArray(): Uint8Array;
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
}

phantasma-sdk-ts/types/carbon/blockchain/carbon-token-flags

Source: dist/types/types/carbon/blockchain/carbon-token-flags.d.ts

Declarations

export declare enum CarbonTokenFlags {
    None = 0,
    BigFungible = 1,
    NonFungible = 2
}

phantasma-sdk-ts/types/carbon/blockchain/extensions

Source: dist/types/types/carbon/blockchain/extensions/index.d.ts

Declarations

export * from './tx-msg-signer.js';
export * from './tx-signer.js';

phantasma-sdk-ts/types/carbon/blockchain/extensions/tx-msg-signer

Source: dist/types/types/carbon/blockchain/extensions/tx-msg-signer.d.ts

Declarations

export declare class TxMsgSigner {
    /** Signs a single-witness message with in-memory keys. */
    static sign(msg: TxMsg, key: PhantasmaKeys): SignedTxMsg;
    static signAndSerialize(msg: TxMsg, key: PhantasmaKeys): Uint8Array;
    /**
     * Signs a message with in-memory keys, one per witness the message needs. It works for every
     * transaction type. A gas-payer transfer takes the gas payer's key and the owner's key in any
     * order. A Call takes the keys of every witness the contract will check.
     */
    static signWithKeys(msg: TxMsg, keys: PhantasmaKeys[]): SignedTxMsg;
    static signAndSerializeWithKeys(msg: TxMsg, keys: PhantasmaKeys[]): Uint8Array;
    /**
     * Signs a message with any {@link TxSigner}, one per witness. A signer can hold keys, drive a
     * hardware wallet or call a remote service. Every signer signs the same serialized message.
     *
     * One account can fill two witness slots, when it pays the gas and owns the tokens. Such a signer
     * is asked once and its signature is reused.
     */
    static signWith(msg: TxMsg, signers: TxSigner[]): Promise<SignedTxMsg>;
    static signAndSerializeWith(msg: TxMsg, signers: TxSigner[]): Promise<Uint8Array>;
}

phantasma-sdk-ts/types/carbon/blockchain/extensions/tx-signer

Source: dist/types/types/carbon/blockchain/extensions/tx-signer.d.ts

Declarations

export interface TxSigner {
    /** The 32-byte Ed25519 public key that identifies this witness in the transaction. */
    readonly publicKey: Uint8Array;
    sign(message: Uint8Array): Signature | Promise<Signature>;
}

phantasma-sdk-ts/types/carbon/blockchain/gas-config

Source: dist/types/types/carbon/blockchain/gas-config.d.ts

Declarations

export declare class GasConfig implements CarbonBlobLike {
    version: number;
    maxNameLength: number;
    maxTokenSymbolLength: number;
    feeShift: number;
    maxStructureSize: number;
    feeMultiplier: bigint;
    gasTokenId: bigint;
    dataTokenId: bigint;
    minimumGasOffer: bigint;
    dataEscrowPerRow: bigint;
    gasFeeTransfer: bigint;
    gasFeeQuery: bigint;
    gasFeeCreateTokenBase: bigint;
    gasFeeCreateTokenSymbol: bigint;
    gasFeeCreateTokenSeries: bigint;
    gasFeePerByte: bigint;
    gasFeeRegisterName: bigint;
    gasBurnRatioMul: bigint;
    gasBurnRatioShift: number;
    /** Floor applied to every settled gas bill (kcal-base). 0 = no floor (v1-equivalent). */
    minimumGasBill: bigint;
    /** Producer fee-split ratio, same mul/shift fixed-point form as the burn ratio. */
    gasProducerRatioMul: bigint;
    gasProducerRatioShift: number;
    /** Dapp (tx gasTarget) fee-split ratio. */
    gasDappRatioMul: bigint;
    gasDappRatioShift: number;
    /**
     * Product-decision prices ("policy fees") in kcal-base, charged directly with no fee
     * multiplier stage. Under v2 they replace the unit-priced gasFeeCreateToken and
     * gasFeeRegisterName fields, which stay serialized for version-0 replay.
     */
    policyFeeCreateTokenBase: bigint;
    /** Halved per symbol char after the first (v1 rule kept). */
    policyFeeCreateTokenSymbol: bigint;
    policyFeeCreateTokenSeries: bigint;
    /** Shifted right by (nameLength-1) like the v1 field (v1 rule kept). */
    policyFeeRegisterName: bigint;
    /**
     * The frozen pre-flip dataEscrowPerRow: storage rows existing before the v2 flip refund at
     * this price (exactly what they escrowed under v1). Immutable after the flip.
     */
    legacyDataEscrowPerRow: bigint;
    constructor(init?: Partial<GasConfig>);
    /**
     * True when this config activates the gas-model-v2 billing rules (config version >= 1). The
     * gas model is gated by the config version, not by a chain feature level.
     */
    get hasGasModelV2(): boolean;
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): GasConfig;
}

phantasma-sdk-ts/types/carbon/blockchain

Source: dist/types/types/carbon/blockchain/index.d.ts

Declarations

export * from './extensions/index.js';
export * from './modules/index.js';
export * from './tx-helpers/index.js';
export * from './vm/index.js';
export * from './carbon-token-flags.js';
export * from './gas-config.js';
export * from './module-id.js';
export * from './signed-tx-msg.js';
export * from './tx-msg.js';
export * from './tx-msg-call.js';
export * from './tx-msg-call-multi.js';
export * from './tx-msg-special-resolution.js';
export * from './tx-msg-trade.js';
export * from './tx-msg-mint-fungible.js';
export * from './tx-msg-mint-non-fungible.js';
export * from './tx-msg-burn-fungible.js';
export * from './tx-msg-burn-fungible-gas-payer.js';
export * from './tx-msg-burn-non-fungible.js';
export * from './tx-msg-burn-non-fungible-gas-payer.js';
export * from './tx-msg-transfer-fungible.js';
export * from './tx-msg-transfer-fungible-gas-payer.js';
export * from './tx-msg-transfer-non-fungible-single.js';
export * from './tx-msg-transfer-non-fungible-single-gas-payer.js';
export * from './tx-msg-transfer-non-fungible-multi.js';
export * from './tx-msg-transfer-non-fungible-multi-gas-payer.js';
export * from './tx-msg-phantasma.js';
export * from './tx-msg-phantasma-raw.js';

phantasma-sdk-ts/types/carbon/blockchain/module-id

Source: dist/types/types/carbon/blockchain/module-id.d.ts

Declarations

export declare enum ModuleId {
    Governance = 0,
    Token = 1,
    PhantasmaVm = 2,
    Organization = 3
}

phantasma-sdk-ts/types/carbon/blockchain/modules/builders/id-helper

Source: dist/types/types/carbon/blockchain/modules/builders/id-helper.d.ts

Declarations

export declare function getRandomPhantasmaId(): Promise<bigint>;

phantasma-sdk-ts/types/carbon/blockchain/modules/builders

Source: dist/types/types/carbon/blockchain/modules/builders/index.d.ts

Declarations

export * from './id-helper.js';
export * from './nft-rom-builder.js';
export * from './phantasma-nft-rom-builder.js';
export * from './series-info-builder.js';
export * from './token-info-builder.js';
export * from './token-metadata-builder.js';
export * from './token-schemas-builder.js';
export * from './token-series-metadata-builder.js';
export * from './metadata-helper.js';

phantasma-sdk-ts/types/carbon/blockchain/modules/builders/metadata-helper

Source: dist/types/types/carbon/blockchain/modules/builders/metadata-helper.d.ts

Declarations

export declare class MetadataField {
    name: string;
    value: MetadataValueInput;
}
export declare class FieldType {
    name: string;
    type: VmType;
}
export declare const seriesDefaultMetadataFields: readonly FieldType[];
export declare const nftDefaultMetadataFields: readonly FieldType[];
export declare const standardMetadataFields: readonly FieldType[];
export declare function findMetadataField(fields: MetadataField[], name: string): MetadataField | undefined;
export declare function pushMetadataField(fieldSchema: VmNamedVariableSchema, metadata: VmDynamicStruct, metadataFields: MetadataField[]): void;
export type MetadataValueInput = MetadataPlainValue | MetadataStructInput | MetadataValueArray;
export {};

phantasma-sdk-ts/types/carbon/blockchain/modules/builders/nft-rom-builder

Source: dist/types/types/carbon/blockchain/modules/builders/nft-rom-builder.d.ts

Declarations

export declare class NftRomBuilder {
    static buildAndSerialize(nftRomSchema: VmStructSchema, phantasmaNftId: bigint, metadata: MetadataField[]): Uint8Array;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/builders/phantasma-nft-rom-builder

Source: dist/types/types/carbon/blockchain/modules/builders/phantasma-nft-rom-builder.d.ts

Declarations

export declare class PhantasmaNftRomBuilder {
    static buildPublicMintSchema(nftRomSchema: VmStructSchema): VmStructSchema;
    static buildAndSerialize(nftRomSchema: VmStructSchema, metadata: MetadataField[]): Uint8Array;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/builders/series-info-builder

Source: dist/types/types/carbon/blockchain/modules/builders/series-info-builder.d.ts

Declarations

export declare class SeriesInfoBuilder {
    static build(seriesSchema: VmStructSchema, phantasmaSeriesId: bigint, maxMint: number, maxSupply: number, ownerPublicKey: Bytes32, metadata: MetadataField[]): SeriesInfo;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/builders/token-info-builder

Source: dist/types/types/carbon/blockchain/modules/builders/token-info-builder.d.ts

Declarations

export declare class TokenInfoBuilder {
    static build(symbol: string, maxSupply: IntX, isNFT: boolean, decimals: number, creatorPublicKey: Bytes32, metadata?: Uint8Array | null | undefined, tokenSchemas?: TokenSchemas | null | undefined): TokenInfo;
    static maxSymbolLength: number;
    /**
     * Mirrors the chain's own symbol validation, so a symbol this accepts is one CreateToken accepts.
     * Returns true when valid, or false when the symbol must be rejected.
     */
    static checkIsValidSymbol(symbol: string): {
        ok: boolean;
        error: string | null;
    };
}

phantasma-sdk-ts/types/carbon/blockchain/modules/builders/token-metadata-builder

Source: dist/types/types/carbon/blockchain/modules/builders/token-metadata-builder.d.ts

Declarations

export declare class TokenMetadataBuilder {
    static buildAndSerialize(fields?: Record<string, unknown>): Uint8Array;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/builders/token-schemas-builder

Source: dist/types/types/carbon/blockchain/modules/builders/token-schemas-builder.d.ts

Declarations

export declare class TokenSchemasJson {
    seriesMetadata: FieldType[];
    rom: FieldType[];
    ram: FieldType[];
}
export declare function parseTokenSchemasJson(json: string): TokenSchemasJson;
export declare class TokenSchemasBuilder {
    static prepareStandard(sharedMetadata: boolean): TokenSchemas;
    static fromJson(json: string): TokenSchemas;
    static verify(schemas: TokenSchemas): Readonly<{
        ok: boolean;
        error: string | null;
    }>;
    static serialize(tokenSchemas: TokenSchemas): Readonly<Uint8Array>;
    static serializeHex(tokenSchemas: TokenSchemas): Readonly<string>;
    static logSchema(schema: VmStructSchema): void;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/builders/token-series-metadata-builder

Source: dist/types/types/carbon/blockchain/modules/builders/token-series-metadata-builder.d.ts

Declarations

export declare class TokenSeriesMetadataBuilder {
    static buildAndSerialize(seriesMetadataSchema: VmStructSchema, newPhantasmaSeriesId: bigint, metadata: MetadataField[]): Uint8Array;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/governance-contract-methods

Source: dist/types/types/carbon/blockchain/modules/governance-contract-methods.d.ts

Declarations

export declare enum GovernanceContractMethods {
    RegisterName = 1,
    SetGasConfig = 3
}

phantasma-sdk-ts/types/carbon/blockchain/modules

Source: dist/types/types/carbon/blockchain/modules/index.d.ts

Declarations

export * from './builders/index.js';
export * from './governance-contract-methods.js';
export * from './mint-phantasma-non-fungible-args.js';
export * from './phantasma-nft-mint-info.js';
export * from './phantasma-nft-mint-result.js';
export * from './series-info.js';
export * from './standard-meta.js';
export * from './token-call-args.js';
export * from './token-contract-methods.js';
export * from './token-helper.js';
export * from './token-info.js';
export * from './token-listing.js';
export * from './token-schemas.js';

phantasma-sdk-ts/types/carbon/blockchain/modules/mint-phantasma-non-fungible-args

Source: dist/types/types/carbon/blockchain/modules/mint-phantasma-non-fungible-args.d.ts

Declarations

export declare class MintPhantasmaNonFungibleArgs implements CarbonBlobLike {
    tokenId: bigint;
    address: Bytes32;
    tokens: PhantasmaNftMintInfo[];
    constructor(init?: Partial<MintPhantasmaNonFungibleArgs>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): MintPhantasmaNonFungibleArgs;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/phantasma-nft-mint-info

Source: dist/types/types/carbon/blockchain/modules/phantasma-nft-mint-info.d.ts

Declarations

export declare class PhantasmaNftMintInfo implements CarbonBlobLike {
    phantasmaSeriesId: IntX;
    rom: Uint8Array;
    ram: Uint8Array;
    constructor(init?: Partial<PhantasmaNftMintInfo>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): PhantasmaNftMintInfo;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/phantasma-nft-mint-result

Source: dist/types/types/carbon/blockchain/modules/phantasma-nft-mint-result.d.ts

Declarations

export declare class PhantasmaNftMintResult implements CarbonBlobLike {
    phantasmaNftId: Bytes32;
    carbonInstanceId: bigint;
    constructor(init?: Partial<PhantasmaNftMintResult>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): PhantasmaNftMintResult;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/series-info

Source: dist/types/types/carbon/blockchain/modules/series-info.d.ts

Declarations

export declare class SeriesInfo implements CarbonBlobLike {
    maxMint: number;
    maxSupply: number;
    owner: Bytes32;
    metadata: Uint8Array;
    rom: VmStructSchema;
    ram: VmStructSchema;
    constructor(init?: Partial<SeriesInfo>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): SeriesInfo;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/standard-meta

Source: dist/types/types/carbon/blockchain/modules/standard-meta.d.ts

Declarations

export declare const StandardMeta: {
    readonly id: SmallString;
    readonly Chain: {
        readonly address: SmallString;
        readonly name: SmallString;
        readonly nexus: SmallString;
        readonly tokenomics: SmallString;
    };
    readonly Token: {
        readonly staking_org_id: SmallString;
        readonly staking_org_threshold: SmallString;
        readonly staking_reward_token: SmallString;
        readonly staking_reward_period: SmallString;
        readonly staking_reward_mul: SmallString;
        readonly staking_reward_div: SmallString;
        readonly staking_lock: SmallString;
        readonly staking_booster_token: SmallString;
        readonly staking_booster_mul: SmallString;
        readonly staking_booster_div: SmallString;
        readonly staking_booster_limit: SmallString;
        readonly phantasma_script: SmallString;
        readonly phantasma_abi: SmallString;
        readonly pre_burn: SmallString;
        readonly inflation_period: SmallString;
    };
};

phantasma-sdk-ts/types/carbon/blockchain/modules/token-call-args

Source: dist/types/types/carbon/blockchain/modules/token-call-args.d.ts

Declarations

export declare class TokenCallArgs {
    /** `Token.TransferFungible(to, from, tokenId, amount)`. */
    static transferFungible(args: Uint8Array): {
        to: Uint8Array;
        tokenId: bigint;
    };
    /** `Token.TransferNonFungible(to, from, tokenId, instanceIds)`. */
    static transferNonFungible(args: Uint8Array): {
        to: Uint8Array;
        tokenId: bigint;
        instanceCount: number;
    };
    /** `Token.MintFungible(tokenId, to, amount)`. */
    static mintFungible(args: Uint8Array): {
        to: Uint8Array;
        tokenId: bigint;
    };
    /** `Token.BurnFungible(tokenId, from, amount)`. */
    static burnFungible(args: Uint8Array): {
        tokenId: bigint;
    };
    /** `Token.BurnNonFungible(tokenId, address, instanceIds)`. */
    static burnNonFungible(args: Uint8Array): {
        tokenId: bigint;
        instanceIds: bigint[];
    };
}

phantasma-sdk-ts/types/carbon/blockchain/modules/token-contract-methods

Source: dist/types/types/carbon/blockchain/modules/token-contract-methods.d.ts

Declarations

export declare enum TokenContractMethods {
    TransferFungible = 0,
    TransferNonFungible = 1,
    CreateToken = 2,
    MintFungible = 3,
    BurnFungible = 4,
    GetBalance = 5,
    CreateTokenSeries = 6,
    DeleteTokenSeries = 7,
    MintNonFungible = 8,
    BurnNonFungible = 9,
    GetInstances = 10,
    GetNonFungibleInfo = 11,
    GetNonFungibleInfoByRomId = 12,
    GetSeriesInfo = 13,
    GetSeriesInfoByMetaId = 14,
    GetTokenInfo = 15,
    GetTokenInfoBySymbol = 16,
    GetTokenSupply = 17,
    GetSeriesSupply = 18,
    GetTokenIdBySymbol = 19,
    GetBalances = 20,
    CreateMintedTokenSeries = 21,
    ApplyInflation = 22,
    UpdateTokenMetadata = 23,
    GetNextTokenInflation = 24,
    SetTokensConfig = 25,
    UpdateSeriesMetadata = 26,
    MintPhantasmaNonFungible = 27
}
export { TokenContractMethods as TokenContract_Methods };

phantasma-sdk-ts/types/carbon/blockchain/modules/token-helper

Source: dist/types/types/carbon/blockchain/modules/token-helper.d.ts

Declarations

export type CarbonNftAddressInfo = {
    carbonTokenId: bigint;
    instanceId: bigint;
    seriesId: number;
    mintNumber: number;
};
export declare class TokenHelper {
    static getNftAddress(carbonTokenId: bigint, instanceId: bigint): Bytes32;
    /**
     * Returns true if a 32-byte address is an NFT-derived address. Every minted instance owns such an
     * address, and assets infused into that NFT are sent to it.
     *
     * The test is syntactic and is the one the chain applies: fifteen zero bytes, a 0x01 marker, then
     * a nonzero token id and a nonzero instance id. `planFees` uses it to price the recipient's owner
     * lookup.
     */
    static isNftAddress(address: Bytes32 | Uint8Array): boolean;
    /**
     * Unpacks a Carbon NFT address (32 bytes) into its logical parts:
     * - carbonTokenId: identifies the NFT token contract
     * - instanceId: 64-bit composite id (series + mint)
     * - seriesId / mintNumber: 32-bit halves of instanceId
     */
    static unpackNftAddress(address: Uint8Array): CarbonNftAddressInfo;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/token-info

Source: dist/types/types/carbon/blockchain/modules/token-info.d.ts

Declarations

export declare class TokenInfo implements CarbonBlobLike {
    maxSupply: IntX;
    flags: CarbonTokenFlags;
    decimals: number;
    owner: Bytes32;
    symbol: SmallString;
    metadata: Uint8Array;
    tokenSchemas?: Uint8Array;
    constructor(init?: Partial<TokenInfo>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TokenInfo;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/token-listing

Source: dist/types/types/carbon/blockchain/modules/token-listing.d.ts

Declarations

export declare enum ListingType {
    FixedPrice = 0
}
export declare class TokenListing implements CarbonBlobLike {
    type: ListingType;
    seller: Bytes32;
    quoteTokenId: bigint;
    price: IntX;
    startDate: bigint;
    endDate: bigint;
    constructor(type?: ListingType, seller?: Bytes32, quoteTokenId?: bigint, price?: IntX, startDate?: bigint, endDate?: bigint);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TokenListing;
}

phantasma-sdk-ts/types/carbon/blockchain/modules/token-schemas

Source: dist/types/types/carbon/blockchain/modules/token-schemas.d.ts

Declarations

export declare class TokenSchemas implements CarbonBlobLike {
    seriesMetadata: VmStructSchema;
    rom: VmStructSchema;
    ram: VmStructSchema;
    constructor(init?: Partial<TokenSchemas>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TokenSchemas;
}

phantasma-sdk-ts/types/carbon/blockchain/signed-tx-msg

Source: dist/types/types/carbon/blockchain/signed-tx-msg.d.ts

Declarations

export declare class SignedTxMsg implements CarbonBlobLike {
    msg: TxMsg;
    witnesses: Witness[];
    constructor(msg?: TxMsg, witnesses?: Witness[]);
    /**
     * Returns the addresses whose signatures the envelope of `msg` must carry, in envelope order.
     * This works for the types whose witness set the message fixes. It returns `undefined` for the
     * witness-array types, which are Call, Call_Multi, Trade and Phantasma. The caller chooses the
     * witnesses of those four.
     */
    static requiredWitnesses(msg: TxMsg): Bytes32[] | undefined;
    /**
     * Returns the size in bytes of `msg` once signed. That is the envelope the block carries and gas
     * model v2 bills. No key is needed. Signatures are fixed-width, so zero-filled placeholder
     * witnesses serialize to exactly the signed length.
     *
     * The witness set is the one the message requires. For the witness-array types, which are Call,
     * Call_Multi, Trade and Phantasma, pass how many witnesses will sign.
     */
    static envelopeBytes(msg: TxMsg, witnessCount?: number): number;
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): SignedTxMsg;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers/create-token-series-tx-helper

Source: dist/types/types/carbon/blockchain/tx-helpers/create-token-series-tx-helper.d.ts

Declarations

export declare class CreateTokenSeriesTxHelper {
    /** Builds the Token.CreateTokenSeries call. Fees are planned from the message afterwards. */
    static buildTx(tokenId: bigint, // ulong
    seriesInfo: SeriesInfo, creatorPublicKey: Bytes32, limits?: TxLimits): TxMsg;
    /** Builds, plans against `config` and signs with in-memory keys, returning the envelope bytes. */
    static buildTxAndSign(tokenId: bigint, seriesInfo: SeriesInfo, signer: PhantasmaKeys, config: GasConfig, options?: PlanAndSignOptions): Uint8Array;
    static buildTxAndSignHex(tokenId: bigint, seriesInfo: SeriesInfo, signer: PhantasmaKeys, config: GasConfig, options?: PlanAndSignOptions): string;
    static parseResult(resultHex: string): number;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers/create-token-tx-helper

Source: dist/types/types/carbon/blockchain/tx-helpers/create-token-tx-helper.d.ts

Declarations

export declare class CreateTokenTxHelper {
    /** Builds the Token.CreateToken call. Fees are planned from the message afterwards. */
    static buildTx(tokenInfo: TokenInfo, creatorPublicKey: Bytes32, limits?: TxLimits): TxMsg;
    /** Builds the call, plans it against `config`, signs it with in-memory keys and returns the
     * envelope bytes. */
    static buildTxAndSign(tokenInfo: TokenInfo, signer: PhantasmaKeys, config: GasConfig, options?: PlanAndSignOptions): Uint8Array;
    static buildTxAndSignHex(tokenInfo: TokenInfo, signer: PhantasmaKeys, config: GasConfig, options?: PlanAndSignOptions): string;
    /**
     * The token id the creation returned. Token.CreateToken answers with a u64, and a token id is a
     * `bigint` everywhere else in the SDK. A `number` cannot hold the whole range. Reading only its
     * low half would return a wrong id and would not fail.
     */
    static parseResult(resultHex: string): bigint;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers/fee-plan-summary

Source: dist/types/types/carbon/blockchain/tx-helpers/fee-plan-summary.d.ts

Declarations

export interface FeePlanSummary {
    /** What the transaction will cost in gas, as a decimal KCAL amount. */
    gasBill: string;
    /** The gas offer written into the transaction. The difference to `gasBill` is refunded. */
    gasOffer: string;
    /**
     * The storage deposit the transaction may take, as a decimal SOUL amount. The chain escrows it
     * while the transaction settles and refunds it when the rows it paid for are deleted. A wallet
     * shows it apart from the fee, as a refundable deposit.
     */
    storageCeiling: string;
}
export interface FeePlanSummaryDecimals {
    /** Decimals of the chain's gas token. The default is 10, which is what KCAL has. */
    gas?: number;
    /** Decimals of the chain's data token. The default is 8, which is what SOUL has. */
    data?: number;
}
export declare function summarizeFeePlan(plan: FeePlan, decimals?: FeePlanSummaryDecimals): FeePlanSummary;

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers/fee-plan

Source: dist/types/types/carbon/blockchain/tx-helpers/fee-plan.d.ts

Declarations

export interface FeePlanOptions extends Pick<NativeFeeParams, 'recipientHoldsToken' | 'bigFungible' | 'tokenBurnedBefore' | 'supplyRowExists' | 'duplicatedSeries' | 'romHasMetaId' | 'seriesHasMetaId' | 'infusions' | 'scriptUnitsAllowance' | 'scriptEventBytes' | 'scriptStorageQuanta'> {
    /**
     * How many witnesses will sign a Call / Call_Multi / Trade / Phantasma message. Required for those
     * four types and for no other.
     *
     * The caller chooses the witness set of those four, and nothing in the message says how large it
     * will be. Each witness adds 96 bytes that the chain bills. Every other type fixes its own witness
     * set, so passing this for one of them is an error. `PhantasmaAPI.sendTransaction` fills it in
     * from the signers it was given.
     */
    witnessCount?: number;
}
export interface FeePlan extends NativeFeeEstimate {
    /**
     * The operations the message was recognised as, in call order. The bill was computed from them. An
     * ordinary message has one entry. A `Call_Multi` has one entry per inner call.
     *
     * Every kind except {@link NativeFeeKind.Script} is priced with the chain's own formula for that
     * operation. `Script` covers VM scripts and unmodelled calls. Their work depends on execution, so
     * they can only be budgeted (see `scriptUnitsAllowance` and its neighbours).
     *
     * This field says what was priced. How firm the number is, {@link FeePlan.exact} answers. That
     * field accounts for both causes: a budgeted part, and a state fact the plan had to assume.
     */
    kinds: readonly NativeFeeKind[];
    /**
     * True when this bill is a prediction of the settlement. False when it is an upper bound on it. A
     * wallet showing a fee reads this one field to choose between "0.0073 KCAL" and "up to 0.0073
     * KCAL".
     *
     * The field is false in two cases. A chain-state fact was left unstated and its assumed reading
     * decided part of the price. Or some part of the message had to be budgeted.
     *
     * The field says nothing about facts the caller stated. A stated fact that is wrong produces a
     * wrong bill, and the transaction then aborts if the mistake was on the cheap side. `true` means
     * only that the plan did not have to guess.
     *
     * `bigFungible: true` is the one exception. It claims nothing about chain state. It asks the model
     * to price the widest answer a variable-length balance can have. A plan that rests on it reports
     * `false` however it was arrived at.
     */
    exact: boolean;
    /** The signed size the plan was computed for. These are the bytes the block will carry. */
    envelopeBytes: number;
    /** A copy of `msg` with `maxGas` and `maxData` set to the plan. The input is left untouched. */
    apply(msg: TxMsg): TxMsg;
}
export declare function planFees(msg: TxMsg, config: GasConfig, options?: FeePlanOptions): FeePlan;
export declare function burnedInstances(msg: TxMsg): {
    tokenId: bigint;
    instanceId: bigint;
}[];

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers

Source: dist/types/types/carbon/blockchain/tx-helpers/index.d.ts

Declarations

export * from './create-token-series-tx-helper.js';
export * from './create-token-tx-helper.js';
export * from './fee-plan-summary.js';
export * from './fee-plan.js';
export * from './mint-phantasma-non-fungible-tx-helper.js';
export * from './native-fee-estimator.js';
export * from './native-tx-helper.js';
export * from './plan-and-sign.js';
export { DEFAULT_TX_EXPIRY_MS, expiryWithin, type TxLimits } from './tx-limits.js';

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers/mint-phantasma-non-fungible-tx-helper

Source: dist/types/types/carbon/blockchain/tx-helpers/mint-phantasma-non-fungible-tx-helper.d.ts

Declarations

export interface PhantasmaNftMintParams {
    tokenId: bigint;
    /** The account that pays the gas and signs the mint. */
    sender: Bytes32;
    /** The account that receives every instance this call mints. */
    to: Bytes32;
    /**
     * One entry per instance. Each entry names the Phantasma series the instance is minted into and
     * carries the public ROM. Instances of several series may share one call. A single mint passes
     * one entry.
     */
    tokens: readonly PhantasmaNftMintInfo[];
}
export declare class MintPhantasmaNonFungibleTxHelper {
    /** Builds the Token.MintPhantasmaNonFungible call. Fees are planned from the message
     * afterwards. */
    static buildTx(p: PhantasmaNftMintParams, limits?: TxLimits): TxMsg;
    /** Builds the call, plans it against `config`, signs it with in-memory keys and returns the
     * envelope bytes. */
    static buildTxAndSign(p: PhantasmaNftMintParams, signer: PhantasmaKeys, config: GasConfig, options?: PlanAndSignOptions): Uint8Array;
    static buildTxAndSignHex(p: PhantasmaNftMintParams, signer: PhantasmaKeys, config: GasConfig, options?: PlanAndSignOptions): string;
    static parseResult(resultHex: string): PhantasmaNftMintResult[];
}

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers/native-fee-estimator

Source: dist/types/types/carbon/blockchain/tx-helpers/native-fee-estimator.d.ts

Declarations

export declare enum NativeFeeKind {
    /** Fungible token transfer (TxTypes.TransferFungible and its _GasPayer variant). */
    TransferFungible = "TransferFungible",
    /** NFT transfer of `count` instances (TxTypes.TransferNonFungible_* and _GasPayer variants). */
    TransferNonFungible = "TransferNonFungible",
    /** Fungible mint (TxTypes.MintFungible). */
    MintFungible = "MintFungible",
    /**
     * NFT mint of `count` instances with caller-supplied ROM (TxTypes.MintNonFungible). The ROM is
     * stored exactly as submitted. A deterministic Phantasma mint stores a canonical ROM.
     *
     * The chain refuses this operation where governance has not allowed caller-supplied ROM ids, and
     * that is the state of the public chains today. The SDK carries no builder for it. The model is
     * kept because the calculator prices the operation correctly wherever it is allowed.
     */
    MintNonFungible = "MintNonFungible",
    /**
     * Deterministic Phantasma NFT mint of `count` instances (TokenContract.MintPhantasmaNonFungible).
     * The chain stores a canonical ROM. It holds the public ROM, the derived Phantasma NFT id and a
     * second copy of the public ROM, so storage grows at twice the ROM size.
     */
    MintPhantasmaNonFungible = "MintPhantasmaNonFungible",
    /** Fungible burn (TxTypes.BurnFungible and its _GasPayer variant). */
    BurnFungible = "BurnFungible",
    /** NFT burn of `count` instances (TxTypes.BurnNonFungible and its _GasPayer variant). */
    BurnNonFungible = "BurnNonFungible",
    /** TokenContract.CreateToken call. Requires `symbolLength` when a symbol is set. */
    CreateToken = "CreateToken",
    /** TokenContract.CreateTokenSeries call. */
    CreateTokenSeries = "CreateTokenSeries",
    /** GovernanceContract.RegisterName call. Requires `nameLength`. */
    RegisterName = "RegisterName",
    /**
     * Generic Phantasma VM script transaction (AllowGas/SpendGas pattern: stake, marketplace, custom
     * contract calls). Script opcode costs depend on chain state, and no formula gives them. The
     * estimate budgets `scriptUnitsAllowance` VM work units and `scriptEventBytes` of events on top
     * of the byte fee. For an exact script bill use the node-side estimator (`estimateTransaction`).
     */
    Script = "Script"
}
export interface NativeFeeParams {
    /**
     * Full signed transaction size in bytes. This is the envelope the block carries. Required under
     * gas model v2 (see {@link envelopeBytesFor} and `SignedTxMsg`). Ignored under v1, which billed
     * the payload note alone.
     */
    envelopeBytes?: number;
    /** Instance count for NFT kinds (transferred / minted / burned instances). Default 1. */
    count?: number;
    /**
     * Token moved by a transfer / mint / burn. Balance rows of the chain's gas and data tokens are
     * free, so with the token id known the estimate escrows nothing for them.
     */
    tokenId?: bigint;
    /** The recipient already holds this token, so its balance row exists and costs nothing. Default false. */
    recipientHoldsToken?: boolean;
    /**
     * The recipient is an NFT-derived address, which means an infusion. The chain reads that NFT's
     * owner, and that costs one extra query fee. Transfers and every mint kind pay it. A burn has no
     * recipient.
     *
     * This is a fact of the recipient's address form. It says nothing about chain state. `planFees`
     * derives it from the message's own recipient with `TokenHelper.isNftAddress`, so only direct
     * callers of this calculator pass it.
     */
    toIsNftAddress?: boolean;
    /**
     * The token's balances can exceed int64. Such a token is called big-fungible.
     *
     * A fungible mint or burn answers with the RESULTING balance as a variable-length integer. That is
     * 9 bytes while the balance fits int64, and up to 33 bytes for an int256 balance. The resulting
     * balance is chain state, so the default prices the 33-byte maximum. The offer then covers the
     * bill and the difference is refunded. Pass `false` for an ordinary int64 token and the estimate
     * is exact.
     */
    bigFungible?: boolean;
    /** The token has been burned before, so its burnt counter row exists. Default false (first burn creates it). */
    tokenBurnedBefore?: boolean;
    /**
     * The token's supply-tracking row exists. The chain drops that row when its balance reaches
     * exactly zero, so the row can be absent in two cases. A limited-supply token has its entire
     * supply in circulation, and the next burn recreates the row. An unlimited token has nothing
     * outstanding, and the next mint recreates it.
     *
     * When this fact is unstated, every mint and burn prices the recreation. That is one more storage
     * quantum in the bill and in the escrow ceiling, and it covers both cases. Pass `true` for the
     * exact quote whenever the token is in neither of them. Rows of the chain's gas and data tokens
     * are free either way.
     */
    supplyRowExists?: boolean;
    /**
     * What the burned NFTs hold at their own addresses (BurnNonFungible). There is one entry per
     * asset per burned instance.
     *
     * The burn returns every one of them to the burner, and the chain charges for each. A fungible
     * token costs a transfer fee plus the owner-lookup query of the NFT-address source. An NFT token
     * costs an instance query, a transfer per instance, and that same lookup. A returned token the
     * burner does not hold also costs the burner's new balance row.
     *
     * This is chain state that the message does not carry, and an NFT can hold any number of assets,
     * so there is no costlier bound to assume. Undefined prices an empty address, because a direct
     * caller of this calculator states what it knows. `planFees` demands the list, and `api.fees`
     * reads it from the chain.
     */
    infusions?: readonly InfusedAsset[];
    /** Token symbol length in characters (CreateToken). 0 = no symbol. */
    symbolLength?: number;
    /** Serialized `TokenInfo` length (CreateToken). These are the Call arguments, and they become the
     * token-info row. */
    tokenInfoBytes?: number;
    /** The token being created is non-fungible (CreateToken). It costs one more row, the series
     * counter. */
    nonFungible?: boolean;
    /** The token metadata carries `pre_burn` (CreateToken). The burnt counter row is then created at
     * once. */
    hasPreBurn?: boolean;
    /** The token metadata carries an inflation schedule (CreateToken). The next-inflation row is then
     * created. */
    hasInflationSchedule?: boolean;
    /** The token metadata names a staking organisation (CreateToken). The creation looks that
     * organisation up, which costs one query fee. */
    hasStakingOrganisation?: boolean;
    /** The token metadata names a staking reward token (CreateToken). The creation reads that token's
     * info, which costs one query fee. */
    hasStakingRewardToken?: boolean;
    /** Serialized `SeriesInfo` length (CreateTokenSeries). These are the Call arguments after the
     * token id. */
    seriesInfoBytes?: number;
    /**
     * The series metadata carries a `_i` id (CreateTokenSeries). The meta-id lookup row is then
     * created. The metadata is schema-encoded like the ROM, so a caller holding only the bytes cannot
     * tell. The default is true, which is the reading that pays for the row.
     */
    seriesHasMetaId?: boolean;
    /** Registered name length in characters (RegisterName). Required for that kind. */
    nameLength?: number;
    /** ROM bytes per minted or burned instance (MintNonFungible / BurnNonFungible: as stored; MintPhantasmaNonFungible: the public ROM). */
    romBytes?: number | readonly number[];
    /** RAM bytes per instance. Default 0 (no RAM row). */
    ramBytes?: number | readonly number[];
    /**
     * The raw ROM carries a `_i` id, and the chain indexes it in one more row (MintNonFungible /
     * BurnNonFungible). The ROM is schema-encoded, so a caller holding only the bytes cannot tell.
     *
     * The default is true. On a mint that is the reading which escrows for the row. On a burn it is
     * the reading that mirrors what the mint created. A burn never prices on this fact either way
     * (see {@link NativeFeeEstimate.deletedStorageQuanta}). A Phantasma mint always has such an id and
     * ignores this input.
     */
    romHasMetaId?: boolean;
    /**
     * The series mints duplicated NFTs (MintPhantasmaNonFungible). A duplicated series costs one more
     * query fee per instance than a unique one, plus one per distinct series (see
     * {@link distinctSeriesCount}). A call whose instances mix duplicated and unique series is priced
     * as if every instance were duplicated.
     *
     * Default true. A series' mode is chain state that the message does not carry, so only the
     * costlier reading is safe. A duplicated mint priced as unique is short by exactly those query
     * fees, and the planner offers the bill with no headroom, so the transaction aborts. Pass `false`
     * only when the series is known to be unique. The saving is a few query fees.
     */
    duplicatedSeries?: boolean;
    /**
     * How many distinct series a duplicated Phantasma mint writes into (MintPhantasmaNonFungible with
     * `duplicatedSeries`). The chain reads each series' supply once per transaction, not once per
     * instance, so this is the count of distinct series ids in the call. It is never more than
     * `count`. Default 1. Ignored for a unique series, which does not read the supply at all.
     */
    distinctSeriesCount?: number;
    /** User payload bytes attached to the tx (billed under gas model v1 only). */
    payloadBytes?: number;
    /**
     * VM work-unit allowance for the Script kind. The default (5000) exceeds every script seen in
     * mainnet history (max 3392 units) with margin.
     *
     * In a `Call_Multi` the allowance counts once per unmodelled call, because each of them can do
     * that much work. A batch of calls the model does not price therefore offers several times what it
     * will spend. The localnet measured 4.2x for one such call and 10.1x for ten. The difference is
     * refunded, and a caller who knows the calls can bring the offer down with this field.
     */
    scriptUnitsAllowance?: bigint;
    /**
     * Event bytes allowance for the Script kind (Notify payloads count as block data). Default 512,
     * per unmodelled call like {@link scriptUnitsAllowance}.
     */
    scriptEventBytes?: number;
    /**
     * New storage quanta allowance for the Script kind. Default 4, per unmodelled call like
     * {@link scriptUnitsAllowance}.
     */
    scriptStorageQuanta?: number;
}
export interface NativeFeePart {
    kind: NativeFeeKind;
    params?: NativeFeeParams;
}
export type NativeFeeTransactionParams = Pick<NativeFeeParams, 'envelopeBytes' | 'payloadBytes'>;
export interface InfusedAsset {
    /**
     * The token's id. Rows of the chain's gas and data tokens are free, and only the id tells which
     * token this is. Undefined prices the rows as paid, so the escrow ceiling can only come out too
     * high.
     */
    tokenId?: bigint;
    /** True for an NFT token. The burn returns every instance the address holds, see
     * `instanceCount`. */
    nonFungible?: boolean;
    /** How many instances of an NFT token the address holds. Each one costs a transfer and moves a
     * lookup row. Default 1. */
    instanceCount?: number;
    /**
     * The burner already holds this token, so no balance row is created when it comes back. Default
     * false, which is the costlier reading. It moves the escrow ceiling and never the bill, because a
     * burn refunds more rows than the return creates.
     */
    burnerHoldsToken?: boolean;
}
export interface FeeQuote {
    /**
     * The gas offer that covers the bill (`TxMsg.maxGas`). The Tier-1 calculator returns the bill
     * itself, floored at the chain's minimum offer. Unused gas is refunded, so a caller who wants
     * headroom adds it on top.
     */
    maxGas: bigint;
    /** The storage-escrow ceiling (`TxMsg.maxData`). It prices every new row at the current row
     * price. */
    maxData: bigint;
    /**
     * The bill the chain formula yields for exactly the provided inputs. It is exact for every native
     * operation when the inputs describe the transaction and the state facts are right. For the Script
     * kind it is the budgeted allowance, and the chain settles below it.
     *
     * One caveat on the word exact. The chain scales each charge as it is made and adds the results.
     * This calculator scales their sum. The two agree when `feeShift` is zero, and that is the case on
     * every network running the v2 model today. Under a non-zero shift the rounding differs. The
     * difference always goes one way: this calculator quotes a few units MORE than the chain settles,
     * so the offer still covers the bill.
     */
    expectedGasBill: bigint;
}
export interface NativeFeeEstimate extends FeeQuote {
    /** Storage quanta the operation creates. One quantum is 1024 bytes of a new paid row. */
    newStorageQuanta: number;
    /**
     * Storage quanta the operation deletes. Their escrow is refunded at each row's own price.
     *
     * The field is informational and does not enter the bill. `maxData` covers the rows an operation
     * CREATES. The block-data term uses the net growth, and an operation that deletes more than it
     * creates floors that growth at zero anyway.
     *
     * A burn's figure is a lower bound, because the stored ROM is chain state that the message does
     * not carry. Nothing depends on tightening it.
     */
    deletedStorageQuanta: number;
}
export declare const GAS_MODEL_V2_UNITS_PER_BLOCK_DATA_BYTE = 25n;
export declare const STORAGE_QUANTUM_BYTES = 1024;
export declare const WITNESS_ARRAY_ENTRY_BYTES = 96;
export declare const NATIVE_SIGNATURE_BYTES = 64;
export declare function estimateNativeFee(kind: NativeFeeKind, config: GasConfig, params?: NativeFeeParams): NativeFeeEstimate;
export declare function estimateNativeFeeBatch(parts: readonly NativeFeePart[], config: GasConfig, transaction?: NativeFeeTransactionParams): NativeFeeEstimate;
export declare function envelopeBytesFor(kind: NativeFeeKind, serializedMessageLength: number, witnessCount: number): number;
export declare function storageQuantaFor(rowBytes: number): number;
export declare function phantasmaCanonicalRomBytes(publicRomBytes: number): number;

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers/native-tx-helper

Source: dist/types/types/carbon/blockchain/tx-helpers/native-tx-helper.d.ts

Declarations

export interface NativeTxParties extends TxLimits {
    /** The account whose tokens move. It is always a witness. */
    from: Bytes32;
    /** A different account that pays the gas and becomes the first witness. */
    gasPayer?: Bytes32;
}
export interface TransferFungibleParams extends NativeTxParties {
    to: Bytes32;
    tokenId: bigint;
    /** Amount in the token's atoms, as a u64. A big-fungible token moves this way too. The chain
     * reads the amount as a signed 64-bit value, so it refuses one above the int64 maximum. A larger
     * amount needs a script transfer, whose amount is a big integer. */
    amount: bigint;
}
export interface TransferNonFungibleParams extends NativeTxParties {
    to: Bytes32;
    tokenId: bigint;
    /** The instances to move. One instance uses the single-instance type. Several use the
     * multi-instance type. */
    instanceIds: readonly bigint[];
}
export interface MintFungibleParams extends TxLimits {
    /** The token owner. This account pays the gas and signs. */
    owner: Bytes32;
    to: Bytes32;
    tokenId: bigint;
    /** Amount in the token's atoms. Mint and burn carry an IntX, because they also serve
     * big-fungible tokens, whose balances do not fit a u64. `IntX.fromI64` wraps an ordinary
     * amount. */
    amount: IntX;
}
export interface BurnFungibleParams extends NativeTxParties {
    tokenId: bigint;
    /** Amount in the token's atoms, as an IntX. The reason is the same as for a mint. */
    amount: IntX;
}
export interface BurnNonFungibleParams extends NativeTxParties {
    tokenId: bigint;
    instanceId: bigint;
}
export declare class NativeTxHelper {
    static transferFungible(p: TransferFungibleParams): TxMsg;
    static transferNonFungible(p: TransferNonFungibleParams): TxMsg;
    static mintFungible(p: MintFungibleParams): TxMsg;
    static burnFungible(p: BurnFungibleParams): TxMsg;
    static burnNonFungible(p: BurnNonFungibleParams): TxMsg;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers/plan-and-sign

Source: dist/types/types/carbon/blockchain/tx-helpers/plan-and-sign.d.ts

Declarations

export type PlanAndSignOptions = FeePlanOptions & TxLimits;
export declare function planAndSignWithKeys(msg: TxMsg, keys: PhantasmaKeys[], config: GasConfig, options?: PlanAndSignOptions): Uint8Array;

phantasma-sdk-ts/types/carbon/blockchain/tx-helpers/tx-limits

Source: dist/types/types/carbon/blockchain/tx-helpers/tx-limits.d.ts

Declarations

export interface TxLimits {
    /** Gas offer in kcal-base (`TxMsg.maxGas`). Default 0, which means unplanned. */
    maxGas?: bigint;
    /** Storage-escrow ceiling in data-token atoms (`TxMsg.maxData`). Default 0. */
    maxData?: bigint;
    /**
     * Expiry as a millisecond timestamp (`TxMsg.expiry`). Default {@link DEFAULT_TX_EXPIRY_MS} from
     * now.
     *
     * A flow with a person in it should set this from the chain's own window instead. Examples are a
     * hardware wallet confirming and a wallet-link round trip. See {@link expiryWithin}.
     */
    expiry?: bigint;
}
export declare function applyTxLimits(msg: TxMsg, limits?: TxLimits): TxMsg;
export declare const DEFAULT_TX_EXPIRY_MS = 45000;
export declare function defaultExpiry(): bigint;
export declare function expiryWithin(expiryWindowMs: number, marginMs?: number): bigint;

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-burn-fungible-gas-payer

Source: dist/types/types/carbon/blockchain/tx-msg-burn-fungible-gas-payer.d.ts

Declarations

export declare class TxMsgBurnFungibleGasPayer implements CarbonBlobLike {
    tokenId: bigint;
    from: Bytes32;
    amount: IntX;
    constructor(init?: Partial<TxMsgBurnFungibleGasPayer>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgBurnFungibleGasPayer;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-burn-fungible

Source: dist/types/types/carbon/blockchain/tx-msg-burn-fungible.d.ts

Declarations

export declare class TxMsgBurnFungible implements CarbonBlobLike {
    tokenId: bigint;
    amount: IntX;
    constructor(init?: Partial<TxMsgBurnFungible>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgBurnFungible;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-burn-non-fungible-gas-payer

Source: dist/types/types/carbon/blockchain/tx-msg-burn-non-fungible-gas-payer.d.ts

Declarations

export declare class TxMsgBurnNonFungibleGasPayer implements CarbonBlobLike {
    tokenId: bigint;
    from: Bytes32;
    instanceId: bigint;
    constructor(init?: Partial<TxMsgBurnNonFungibleGasPayer>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgBurnNonFungibleGasPayer;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-burn-non-fungible

Source: dist/types/types/carbon/blockchain/tx-msg-burn-non-fungible.d.ts

Declarations

export declare class TxMsgBurnNonFungible implements CarbonBlobLike {
    tokenId: bigint;
    instanceId: bigint;
    constructor(init?: Partial<TxMsgBurnNonFungible>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgBurnNonFungible;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-call-multi

Source: dist/types/types/carbon/blockchain/tx-msg-call-multi.d.ts

Declarations

export declare class TxMsgCallMulti implements CarbonBlobLike {
    calls: TxMsgCall[];
    constructor(calls?: TxMsgCall[]);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgCallMulti;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-call

Source: dist/types/types/carbon/blockchain/tx-msg-call.d.ts

Declarations

export type MsgCallArgs = {
    registerOffset: number;
    args: Uint8Array;
};
export declare class MsgCallArgSections {
    argSections: MsgCallArgs[];
    constructor(argSections?: MsgCallArgs[]);
    hasSections(): boolean;
    write(w: CarbonBinaryWriter): void;
    static readWithCount(r: CarbonBinaryReader, countNegative: number): MsgCallArgSections;
}
export declare class TxMsgCall implements CarbonBlobLike {
    moduleId: number;
    methodId: number;
    args: Uint8Array;
    sections: MsgCallArgSections | null;
    constructor(moduleId?: number, methodId?: number, args?: Uint8Array);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgCall;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-mint-fungible

Source: dist/types/types/carbon/blockchain/tx-msg-mint-fungible.d.ts

Declarations

export declare class TxMsgMintFungible implements CarbonBlobLike {
    tokenId: bigint;
    to: Bytes32;
    amount: IntX;
    constructor(init?: Partial<TxMsgMintFungible>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgMintFungible;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-mint-non-fungible

Source: dist/types/types/carbon/blockchain/tx-msg-mint-non-fungible.d.ts

Declarations

export declare class TxMsgMintNonFungible implements CarbonBlobLike {
    tokenId: bigint;
    to: Bytes32;
    seriesId: number;
    rom: Uint8Array;
    ram: Uint8Array;
    constructor(init?: Partial<TxMsgMintNonFungible>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgMintNonFungible;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-phantasma-raw

Source: dist/types/types/carbon/blockchain/tx-msg-phantasma-raw.d.ts

Declarations

export declare class TxMsgPhantasmaRaw implements CarbonBlobLike {
    transaction: Uint8Array;
    constructor(transaction?: Uint8Array);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgPhantasmaRaw;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-phantasma

Source: dist/types/types/carbon/blockchain/tx-msg-phantasma.d.ts

Declarations

export declare class TxMsgPhantasma implements CarbonBlobLike {
    nexus: SmallString;
    chain: SmallString;
    script: Uint8Array;
    constructor(init?: Partial<TxMsgPhantasma>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgPhantasma;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-special-resolution

Source: dist/types/types/carbon/blockchain/tx-msg-special-resolution.d.ts

Declarations

export declare class TxMsgSpecialResolution implements CarbonBlobLike {
    resolutionId: bigint;
    calls: TxMsgCall[];
    constructor(resolutionId?: bigint, calls?: TxMsgCall[]);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgSpecialResolution;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-trade

Source: dist/types/types/carbon/blockchain/tx-msg-trade.d.ts

Declarations

export declare class TxMsgTrade implements CarbonBlobLike {
    transferF: TxMsgTransferFungibleGasPayer[];
    transferN: TxMsgTransferNonFungibleSingleGasPayer[];
    mintF: TxMsgMintFungible[];
    burnF: TxMsgBurnFungibleGasPayer[];
    mintN: TxMsgMintNonFungible[];
    burnN: TxMsgBurnNonFungibleGasPayer[];
    constructor(init?: Partial<TxMsgTrade>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgTrade;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-transfer-fungible-gas-payer

Source: dist/types/types/carbon/blockchain/tx-msg-transfer-fungible-gas-payer.d.ts

Declarations

export declare class TxMsgTransferFungibleGasPayer implements CarbonBlobLike {
    to: Bytes32;
    from: Bytes32;
    tokenId: bigint;
    amount: bigint;
    constructor(init?: Partial<TxMsgTransferFungibleGasPayer>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgTransferFungibleGasPayer;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-transfer-fungible

Source: dist/types/types/carbon/blockchain/tx-msg-transfer-fungible.d.ts

Declarations

export declare class TxMsgTransferFungible implements CarbonBlobLike {
    to: Bytes32;
    tokenId: bigint;
    amount: bigint;
    constructor(to?: Bytes32, tokenId?: bigint, amount?: bigint);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgTransferFungible;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-transfer-non-fungible-multi-gas-payer

Source: dist/types/types/carbon/blockchain/tx-msg-transfer-non-fungible-multi-gas-payer.d.ts

Declarations

export declare class TxMsgTransferNonFungibleMultiGasPayer implements CarbonBlobLike {
    to: Bytes32;
    from: Bytes32;
    tokenId: bigint;
    instanceIds: bigint[];
    constructor(init?: Partial<TxMsgTransferNonFungibleMultiGasPayer>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgTransferNonFungibleMultiGasPayer;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-transfer-non-fungible-multi

Source: dist/types/types/carbon/blockchain/tx-msg-transfer-non-fungible-multi.d.ts

Declarations

export declare class TxMsgTransferNonFungibleMulti implements CarbonBlobLike {
    to: Bytes32;
    tokenId: bigint;
    instanceIds: bigint[];
    constructor(init?: Partial<TxMsgTransferNonFungibleMulti>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgTransferNonFungibleMulti;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-transfer-non-fungible-single-gas-payer

Source: dist/types/types/carbon/blockchain/tx-msg-transfer-non-fungible-single-gas-payer.d.ts

Declarations

export declare class TxMsgTransferNonFungibleSingleGasPayer implements CarbonBlobLike {
    to: Bytes32;
    from: Bytes32;
    tokenId: bigint;
    instanceId: bigint;
    constructor(init?: Partial<TxMsgTransferNonFungibleSingleGasPayer>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgTransferNonFungibleSingleGasPayer;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg-transfer-non-fungible-single

Source: dist/types/types/carbon/blockchain/tx-msg-transfer-non-fungible-single.d.ts

Declarations

export declare class TxMsgTransferNonFungibleSingle implements CarbonBlobLike {
    to: Bytes32;
    tokenId: bigint;
    instanceId: bigint;
    constructor(init?: Partial<TxMsgTransferNonFungibleSingle>);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsgTransferNonFungibleSingle;
}

phantasma-sdk-ts/types/carbon/blockchain/tx-msg

Source: dist/types/types/carbon/blockchain/tx-msg.d.ts

Declarations

export declare class TxMsg implements CarbonBlobLike {
    type: TxTypes;
    expiry: bigint;
    maxGas: bigint;
    maxData: bigint;
    gasFrom: Bytes32;
    payload: SmallString;
    msg?: TxMsgPayload | undefined;
    constructor(type?: TxTypes, expiry?: bigint, // int64
    maxGas?: bigint, // uint64
    maxData?: bigint, // uint64
    gasFrom?: Bytes32, payload?: SmallString, msg?: TxMsgPayload | undefined);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): TxMsg;
}
export {};

phantasma-sdk-ts/types/carbon/blockchain/vm

Source: dist/types/types/carbon/blockchain/vm/index.d.ts

Declarations

export * from './vm-dynamic-struct.js';
export * from './vm-dynamic-variable.js';
export * from './vm-named-dynamic-variable.js';
export * from './vm-named-variable-schema.js';
export * from './vm-struct-array.js';
export * from './vm-struct-flags.js';
export * from './vm-struct-schema.js';
export * from './vm-type.js';
export * from './vm-variable-schema.js';

phantasma-sdk-ts/types/carbon/blockchain/vm/vm-dynamic-struct

Source: dist/types/types/carbon/blockchain/vm/vm-dynamic-struct.d.ts

Declarations

export declare class VmDynamicStruct implements CarbonBlobLike {
    fields: VmNamedDynamicVariable[];
    getValue(key: SmallString): VmDynamicVariable | undefined;
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): VmDynamicStruct;
    writeWithSchema(schema: VmStructSchema, w: CarbonBinaryWriter): boolean;
    readWithSchema(schema: VmStructSchema, r: CarbonBinaryReader): void;
}

phantasma-sdk-ts/types/carbon/blockchain/vm/vm-dynamic-variable

Source: dist/types/types/carbon/blockchain/vm/vm-dynamic-variable.d.ts

Declarations

export type VmDynamicVariableData = null | VmDynamicVariable | Uint8Array | VmDynamicStruct | number | bigint | Bytes16 | Bytes32 | Bytes64 | string | VmDynamicVariable[] | Uint8Array[] | VmStructArray | number[] | bigint[] | Bytes16[] | Bytes32[] | Bytes64[] | string[];
export declare class VmDynamicVariable implements CarbonBlobLike {
    type: VmType;
    data: VmDynamicVariableData;
    static fromType(t: VmType): VmDynamicVariable;
    write(w: CarbonBinaryWriter): void;
    writeWithSchema(schema: VmVariableSchema, w: CarbonBinaryWriter): boolean;
    read(r: CarbonBinaryReader): void;
    readWithSchema(schema: VmVariableSchema, r: CarbonBinaryReader): void;
    static readStatic(type: VmType, outVar: VmDynamicVariable, schema: VmStructSchema | null, r: CarbonBinaryReader): void;
    static writeStatic(type: VmType, v: VmDynamicVariable, schema: VmStructSchema | null, w: CarbonBinaryWriter): boolean;
}

phantasma-sdk-ts/types/carbon/blockchain/vm/vm-named-dynamic-variable

Source: dist/types/types/carbon/blockchain/vm/vm-named-dynamic-variable.d.ts

Declarations

export declare class VmNamedDynamicVariable implements CarbonBlobLike {
    name: SmallString;
    value: VmDynamicVariable;
    static from(name: string | SmallString, type: VmType, value: VmDynamicVariableData): VmNamedDynamicVariable;
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): VmNamedDynamicVariable;
}

phantasma-sdk-ts/types/carbon/blockchain/vm/vm-named-variable-schema

Source: dist/types/types/carbon/blockchain/vm/vm-named-variable-schema.d.ts

Declarations

export declare class VmNamedVariableSchema implements CarbonBlobLike {
    name: SmallString;
    schema: VmVariableSchema;
    constructor(name?: SmallString | string, schema?: VmVariableSchema | VmType);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): VmNamedVariableSchema;
}

phantasma-sdk-ts/types/carbon/blockchain/vm/vm-struct-array

Source: dist/types/types/carbon/blockchain/vm/vm-struct-array.d.ts

Declarations

export declare class VmStructArray {
    schema: VmStructSchema;
    structs: VmDynamicStruct[];
}

phantasma-sdk-ts/types/carbon/blockchain/vm/vm-struct-flags

Source: dist/types/types/carbon/blockchain/vm/vm-struct-flags.d.ts

Declarations

export declare enum VmStructFlags {
    None = 0,
    DynamicExtras = 1
}

phantasma-sdk-ts/types/carbon/blockchain/vm/vm-struct-schema

Source: dist/types/types/carbon/blockchain/vm/vm-struct-schema.d.ts

Declarations

export declare class VmStructSchema implements CarbonBlobLike {
    static Flags: {
        readonly None: 0;
        readonly DynamicExtras: number;
        readonly IsSorted: number;
    };
    fields: VmNamedVariableSchema[];
    flags: number;
    constructor(fields?: VmNamedVariableSchema[], flags?: number);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): VmStructSchema;
}

phantasma-sdk-ts/types/carbon/blockchain/vm/vm-type

Source: dist/types/types/carbon/blockchain/vm/vm-type.d.ts

Declarations

export declare enum VmType {
    Dynamic = 0,
    Array = 1,
    Bytes = 2,
    Struct = 4,
    Int8 = 6,
    Int16 = 8,
    Int32 = 10,
    Int64 = 12,
    Int256 = 14,
    Bytes16 = 16,
    Bytes32 = 18,
    Bytes64 = 20,
    String = 22,
    Array_Dynamic = 1,
    Array_Bytes = 3,
    Array_Struct = 5,
    Array_Int8 = 7,
    Array_Int16 = 9,
    Array_Int32 = 11,
    Array_Int64 = 13,
    Array_Int256 = 15,
    Array_Bytes16 = 17,
    Array_Bytes32 = 19,
    Array_Bytes64 = 21,
    Array_String = 23
}
export declare function vmTypeFromString(type: string): VmType;

phantasma-sdk-ts/types/carbon/blockchain/vm/vm-variable-schema

Source: dist/types/types/carbon/blockchain/vm/vm-variable-schema.d.ts

Declarations

export declare class VmVariableSchema implements CarbonBlobLike {
    type: VmType;
    structure: VmStructSchema;
    constructor(type?: VmType, structure?: VmStructSchema);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): VmVariableSchema;
}

phantasma-sdk-ts/types/carbon/bytes16

Source: dist/types/types/carbon/bytes16.d.ts

Declarations

export declare class Bytes16 implements CarbonBlobLike {
    bytes: Uint8Array;
    static readonly Empty: Bytes16;
    constructor(bytes?: Uint8Array);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): Bytes16;
    equals(other: Bytes16): boolean;
    toHex(): string;
    /** @deprecated Use `toHex` instead. This alias will be removed in v1.0. */
    ToHex(): string;
}

phantasma-sdk-ts/types/carbon/bytes32

Source: dist/types/types/carbon/bytes32.d.ts

Declarations

export declare class Bytes32 implements CarbonBlobLike {
    bytes: Uint8Array;
    static readonly Empty: Bytes32;
    constructor(bytes?: Uint8Array);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): Bytes32;
    equals(other: Bytes32): boolean;
    toHex(): string;
    /** @deprecated Use `toHex` instead. This alias will be removed in v1.0. */
    ToHex(): string;
}

phantasma-sdk-ts/types/carbon/bytes64

Source: dist/types/types/carbon/bytes64.d.ts

Declarations

export declare class Bytes64 implements CarbonBlobLike {
    bytes: Uint8Array;
    static readonly Empty: Bytes64;
    constructor(bytes?: Uint8Array);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): Bytes64;
    equals(other: Bytes64): boolean;
    toHex(): string;
    /** @deprecated Use `toHex` instead. This alias will be removed in v1.0. */
    ToHex(): string;
}

phantasma-sdk-ts/types/carbon/carbon-blob

Source: dist/types/types/carbon/carbon-blob.d.ts

Declarations

export declare class CarbonBlob {
    static fromReader<T extends CarbonBlobLike>(ctor: Ctor<T>, r: CarbonBinaryReader): T;
    /** @deprecated Use `fromReader` instead. This alias will be removed in v1.0. */
    static New<T extends CarbonBlobLike>(ctor: Ctor<T>, r: CarbonBinaryReader): T;
    static fromBytes<T extends CarbonBlobLike>(ctor: Ctor<T>, bytes: Uint8Array, offset: number): T;
    /** @deprecated Use `fromBytes` instead. This alias will be removed in v1.0. */
    static NewFromBytes<T extends CarbonBlobLike>(ctor: Ctor<T>, bytes: Uint8Array, offset: number): T;
    static fromBytesChecked<T extends CarbonBlobLike>(ctor: Ctor<T>, bytes: Uint8Array, allowTrailingBytes?: boolean, offset?: number): T;
    /** @deprecated Use `fromBytesChecked` instead. This alias will be removed in v1.0. */
    static NewFromBytesEx<T extends CarbonBlobLike>(ctor: Ctor<T>, bytes: Uint8Array, allowTrailingBytes?: boolean, offset?: number): T;
    static serialize<T extends CarbonBlobLike>(carbonBlob: T): Uint8Array;
    /** @deprecated Use `serialize` instead. This alias will be removed in v1.0. */
    static Serialize<T extends CarbonBlobLike>(carbonBlob: T): Uint8Array;
}
export {};

phantasma-sdk-ts/types/carbon

Source: dist/types/types/carbon/index.d.ts

Declarations

export * from './blockchain/index.js';
export * from './bytes16.js';
export * from './bytes32.js';
export * from './bytes64.js';
export * from './carbon-blob.js';
export * from './int-x.js';
export * from './small-string.js';
export * from './tx-types.js';
export * from './witness.js';

phantasma-sdk-ts/types/carbon/int-x

Source: dist/types/types/carbon/int-x.d.ts

Declarations

export declare class IntX implements CarbonBlobLike {
    static fromBigInt(v: bigint): IntX;
    static fromI64(v: number | bigint): IntX;
    toBigInt(): bigint;
    toString(): string;
    is8ByteSafe(): boolean;
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): IntX;
}

phantasma-sdk-ts/types/carbon/small-string

Source: dist/types/types/carbon/small-string.d.ts

Declarations

export declare class SmallString implements CarbonBlobLike {
    data: string;
    constructor(data?: string);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): SmallString;
    static readonly empty: SmallString;
    compareTo(other: SmallString): number;
}

phantasma-sdk-ts/types/carbon/tx-types

Source: dist/types/types/carbon/tx-types.d.ts

Declarations

export declare enum TxTypes {
    Call = 0,
    Call_Multi = 1,
    Trade = 2,
    TransferFungible = 3,
    TransferFungible_GasPayer = 4,
    TransferNonFungible_Single = 5,
    TransferNonFungible_Single_GasPayer = 6,
    TransferNonFungible_Multi = 7,
    TransferNonFungible_Multi_GasPayer = 8,
    MintFungible = 9,
    BurnFungible = 10,
    BurnFungible_GasPayer = 11,
    MintNonFungible = 12,
    BurnNonFungible = 13,
    BurnNonFungible_GasPayer = 14,
    Phantasma = 15,
    Phantasma_Raw = 16
}

phantasma-sdk-ts/types/carbon/witness

Source: dist/types/types/carbon/witness.d.ts

Declarations

export declare class Witness implements CarbonBlobLike {
    address: Bytes32;
    signature: Bytes64;
    constructor(address?: Bytes32, signature?: Bytes64);
    write(w: CarbonBinaryWriter): void;
    read(r: CarbonBinaryReader): void;
    static read(r: CarbonBinaryReader): Witness;
}

phantasma-sdk-ts/types/carbon-serialization

Source: dist/types/types/carbon-serialization.d.ts

Declarations

export declare class Throw {
    static If(cond: boolean, msg: string): void;
    static Assert(cond: boolean, msg?: string): void;
}
export declare class CarbonBinaryWriter {
    toUint8Array(): Uint8Array;
    write(data: Uint8Array): void;
    write1(v: number): void;
    write2(v: number): void;
    write4(v: number): void;
    write4u(v: number): void;
    write8(v: bigint): void;
    write8u(v: bigint): void;
    writeExactly(data: Uint8Array, count: number): void;
    write16(data: Uint8Array | Bytes16): void;
    write32(data: Uint8Array | Bytes32): void;
    write64(data: Uint8Array | Bytes64): void;
    writeBlob<T extends CarbonBlobLike>(data: T): void;
    writeArrayBlob<T extends CarbonBlobLike>(arr: T[]): void;
    writeBigInt(value: bigint): void;
    writeArrayBigInt(items: bigint[]): void;
    writeSz(s: string): void;
    writeArraySz(arr: string[]): void;
    writeArray(bytes: Uint8Array): void;
    writeArray64u(arr: bigint[]): void;
    writeArray64(arr: bigint[]): void;
    writeArray32(arr: number[]): void;
    writeArray16(arr: number[]): void;
    writeArray8(arr: number[]): void;
    writeArrayOfArrays(arr: Uint8Array[]): void;
}
export declare class CarbonBinaryReader {
    constructor(buffer: ArrayBuffer | Uint8Array);
    readRemaining(): Uint8Array;
    read1(): number;
    read2(): number;
    read4(): number;
    read4u(): number;
    read8(): bigint;
    read8u(): bigint;
    readExactly(count: number): Uint8Array;
    read16(): Uint8Array;
    read32(): Uint8Array;
    read64(): Uint8Array;
    readInto16(out: Bytes16): void;
    readInto32(out: Bytes32): void;
    readInto64(out: Bytes64): void;
    readBlob<T extends CarbonBlobLike>(ctor: new () => T): T;
    readArrayBlob<T extends CarbonBlobLike>(ctor: new () => T): T[];
    readBigInt(preReadHeader?: number): bigint;
    readArrayBigInt(): bigint[];
    readSz(): string;
    readArraySz(): string[];
    readArray(): Uint8Array;
    readArrayOfArrays(): Uint8Array[];
    readArray64u(): bigint[];
    readArray64(): bigint[];
    readArray32(): number[];
    readArray16(): number[];
    readArray8(): number[];
}
export declare function bigIntToTwosComplementLE(value: bigint): Uint8Array;
export declare function twosComplementLEToBigInt(bytes: Uint8Array): bigint;
export declare function writeBlob<T extends CarbonBlobLike>(w: CarbonBinaryWriter, data: T): void;
export declare function readBlob<T extends CarbonBlobLike>(r: CarbonBinaryReader, ctor: new () => T): T;

phantasma-sdk-ts/types/consensus

Source: dist/types/types/consensus.d.ts

Declarations

export declare enum ConsensusMode {
    Unanimity = 0,
    Majority = 1,
    Popularity = 2,
    Ranking = 3
}
export declare enum PollState {
    Inactive = 0,
    Active = 1,
    Consensus = 2,
    Failure = 3
}
export declare class PollChoice implements ISerializable {
    value: string;
    constructor(value: string | number[]);
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
    static deserialize(reader: PBinaryReader): PollChoice;
    /** @deprecated Use `deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize(reader: PBinaryReader): PollChoice;
}
export declare class PollValue implements ISerializable {
    value: string;
    ranking: bigint;
    votes: bigint;
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
    static deserialize(reader: PBinaryReader): PollValue;
    /** @deprecated Use `deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize(reader: PBinaryReader): PollValue;
}
export declare class PollVote implements ISerializable {
    index: bigint;
    percentage: bigint;
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
    static deserialize(reader: PBinaryReader): PollVote;
    /** @deprecated Use `deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize(reader: PBinaryReader): PollVote;
}
export declare class ConsensusPoll implements ISerializable {
    subject: string;
    organization: string;
    mode: ConsensusMode;
    state: PollState;
    entries: PollValue[];
    round: bigint;
    startTime: Timestamp;
    endTime: Timestamp;
    choicesPerUser: bigint;
    totalVotes: bigint;
    constructor();
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    static deserialize(reader: PBinaryReader): ConsensusPoll;
    /** @deprecated Use `deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize(reader: PBinaryReader): ConsensusPoll;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
}
export declare class PollPresence implements ISerializable {
    subject: string;
    round: bigint;
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
    static deserialize(reader: PBinaryReader): PollPresence;
    /** @deprecated Use `deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize(reader: PBinaryReader): PollPresence;
}

phantasma-sdk-ts/types/contract

Source: dist/types/types/contract.d.ts

Declarations

export declare class ContractParameter {
    name: string;
    type: VMType;
    constructor(name: string, type: VMType);
}
export declare class ContractInterface implements ISerializable {
    static readonly empty: ContractInterface;
    /** @deprecated Use `empty` instead. This alias will be removed in v1.0. */
    static readonly Empty: ContractInterface;
    get methods(): ContractMethod[];
    set methods(value: ContractMethod[]);
    /** @deprecated Use `methods` instead. This alias will be removed in v1.0. */
    get Methods(): ContractMethod[];
    set Methods(value: ContractMethod[]);
    get methodCount(): number;
    /** @deprecated Use `methodCount` instead. This alias will be removed in v1.0. */
    get MethodCount(): number;
    set MethodCount(_value: number);
    get events(): ContractEvent[];
    set events(value: ContractEvent[]);
    /** @deprecated Use `events` instead. This alias will be removed in v1.0. */
    Events(): ContractEvent[];
    get eventCount(): number;
    /** @deprecated Use `eventCount` instead. This alias will be removed in v1.0. */
    EventCount(): number;
    newEmpty(): void;
    constructor(methods?: ContractMethod[], events?: ContractEvent[]);
    get(name: string): ContractMethod | null;
    hasMethod(name: string): boolean;
    /** @deprecated Use `hasMethod` instead. This alias will be removed in v1.0. */
    HasMethod(name: string): boolean;
    hasTokenTrigger(trigger: TokenTrigger): boolean;
    /** @deprecated Use `hasTokenTrigger` instead. This alias will be removed in v1.0. */
    HasTokenTrigger(trigger: TokenTrigger): boolean;
    findMethod(name: string): ContractMethod | null;
    /** @deprecated Use `findMethod` instead. This alias will be removed in v1.0. */
    FindMethod(name: string): ContractMethod | null;
    findEvent(value: number): ContractEvent | null;
    /** @deprecated Use `findEvent` instead. This alias will be removed in v1.0. */
    FindEvent(value: number): ContractEvent | null;
    implementsEvent(evt: ContractEvent): boolean;
    /** @deprecated Use `implementsEvent` instead. This alias will be removed in v1.0. */
    ImplementsEvent(evt: ContractEvent): boolean;
    implementsMethod(method: ContractMethod): boolean;
    /** @deprecated Use `implementsMethod` instead. This alias will be removed in v1.0. */
    ImplementsMethod(method: ContractMethod): boolean;
    implementsInterface(other: ContractInterface): boolean;
    /** @deprecated Use `implementsInterface` instead. This alias will be removed in v1.0. */
    ImplementsInterface(other: ContractInterface): boolean;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
}
export declare class ContractMethod implements ISerializable {
    name: string;
    returnType: VMType;
    parameters: ContractParameter[];
    offset: number;
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
    constructorOne(name: string, returnType: VMType, labels: Map<string, number>, parameters: ContractParameter[]): void;
    constructor(name?: string, returnType?: VMType, offset?: number, parameters?: ContractParameter[]);
    isProperty(): boolean;
    isTrigger(): boolean;
    toString(): string;
    static fromBytes(bytes: Uint8Array): ContractMethod;
    static deserialize(reader: PBinaryReader): ContractMethod;
    /** @deprecated Use `deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize(reader: PBinaryReader): ContractMethod;
    serialize(writer: PBinaryWriter): void;
    /** @deprecated Use `serialize` instead. This alias will be removed in v1.0. */
    Serialize(writer: PBinaryWriter): void;
    toArray(): Uint8Array;
}
export declare class ContractEvent implements ISerializable {
    value: number;
    name: string;
    returnType: VMType;
    description: Uint8Array;
    constructor(value?: number, name?: string, returnType?: VMType, description?: Uint8Array);
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
    toString(): string;
    static deserialize(reader: PBinaryReader): ContractEvent;
    /** @deprecated Use `deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize(reader: PBinaryReader): ContractEvent;
    serialize(writer: PBinaryWriter): void;
    /** @deprecated Use `serialize` instead. This alias will be removed in v1.0. */
    Serialize(writer: PBinaryWriter): void;
}

phantasma-sdk-ts/types/domain-settings

Source: dist/types/types/domain-settings.d.ts

Declarations

export declare enum TriggerResult {
    Failure = 0,
    Missing = 1,
    Success = 2
}
export declare enum AccountTrigger {
    OnMint = 0,// address, symbol, amount
    OnBurn = 1,// address, symbol, amount
    OnSend = 2,// address, symbol, amount
    OnReceive = 3,// address, symbol, amount
    OnWitness = 4,// address
    OnUpgrade = 5,// address
    OnMigrate = 6,// from, to
    OnKill = 7
}
export declare enum TokenTrigger {
    OnMint = 0,// address, symbol, amount
    OnBurn = 1,// address, symbol, amount
    OnSend = 2,// address, symbol, amount
    OnReceive = 3,// address, symbol, amount
    OnInfuse = 4,// address, symbol, amount
    OnUpgrade = 5,// address
    OnSeries = 6,// address
    OnWrite = 7,// address, data
    OnMigrate = 8,// from, to
    OnKill = 9
}
export declare enum OrganizationTrigger {
    OnAdd = 0,// address
    OnRemove = 1,// address
    OnUpgrade = 2
}
export declare class StakeReward {
    staker: Address;
    date: Timestamp;
    constructor(staker: Address, date: Timestamp);
}
export declare class DomainSettings {
    static LatestKnownProtocol: number;
    static Phantasma20Protocol: number;
    static Phantasma30Protocol: number;
    static MaxTxPerBlock: number;
    static MaxOracleEntriesPerBlock: number;
    static MaxEventsPerBlock: number;
    static MaxEventsPerTx: number;
    static MaxTriggerLoop: number;
    static MAX_TOKEN_DECIMALS: number;
    static DefaultMinimumGasFee: number;
    static InitialValidatorCount: number;
    static FuelTokenSymbol: string;
    static FuelTokenName: string;
    static FuelTokenDecimals: number;
    static NexusMainnet: string;
    static NexusTestnet: string;
    static StakingTokenSymbol: string;
    static StakingTokenName: string;
    static StakingTokenDecimals: number;
    static FiatTokenSymbol: string;
    static FiatTokenName: string;
    static FiatTokenDecimals: number;
    static RewardTokenSymbol: string;
    static RewardTokenName: string;
    static LiquidityTokenSymbol: string;
    static LiquidityTokenName: string;
    static LiquidityTokenDecimals: number;
    static FuelPerContractDeployTag: string;
    static FuelPerTokenDeployTag: string;
    static FuelPerOrganizationDeployTag: string;
    static SystemTokens: string[];
    static RootChainName: string;
    static ValidatorsOrganizationName: string;
    static MastersOrganizationName: string;
    static StakersOrganizationName: string;
    static PhantomForceOrganizationName: string;
    static PlatformName: string;
    static ArchiveMinSize: number;
    static ArchiveMaxSize: number;
    static InfusionName: string;
    static NameMaxLength: number;
    static UrlMaxLength: number;
    static ArgsMax: number;
    static AddressMaxSize: number;
    static ScriptMaxSize: number;
    static FieldMaxLength: number;
    static FieldMinLength: number;
}

phantasma-sdk-ts/types/ed25519-signature

Source: dist/types/types/ed25519-signature.d.ts

Declarations

export declare class Ed25519Signature implements Signature {
    bytes: Uint8Array;
    kind: SignatureKind;
    constructor(bytes?: Uint8Array);
    /** @deprecated Use `bytes` instead. This alias will be removed in v1.0. */
    get Bytes(): Uint8Array;
    set Bytes(value: Uint8Array);
    /** @deprecated Use `kind` instead. This alias will be removed in v1.0. */
    get Kind(): SignatureKind;
    set Kind(value: SignatureKind);
    verify(message: Uint8Array, address: Address): boolean;
    /** @deprecated Use `verify` instead. This alias will be removed in v1.0. */
    Verify(message: Uint8Array, address: Address): boolean;
    verifyMultiple(message: Uint8Array, addresses: Address[]): boolean;
    /** @deprecated Use `verifyMultiple` instead. This alias will be removed in v1.0. */
    VerifyMultiple(message: Uint8Array, addresses: Address[]): boolean;
    serializeData(writer: PBinaryWriter): void;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
    toByteArray(): Uint8Array;
    /** @deprecated Use `toByteArray` instead. This alias will be removed in v1.0. */
    ToByteArray(): Uint8Array;
    static generate(keypair: KeyPair, message: Uint8Array): Ed25519Signature;
    static generate(keypair: IKeyPair, message: Uint8Array): Ed25519Signature;
    /** @deprecated Use `generate` instead. This alias will be removed in v1.0. */
    static Generate(keypair: IKeyPair, message: Uint8Array): Ed25519Signature;
}

phantasma-sdk-ts/types/ed25519

Source: dist/types/types/ed25519.d.ts

Declarations

export declare function getEd25519PublicKey(privateKey: Uint8Array): Uint8Array;
export declare function getEd25519PublicKeyHex(privateKeyHex: string): string;
export declare function signEd25519(message: Uint8Array, privateKey: Uint8Array): Uint8Array;
export declare function verifyEd25519(message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array): boolean;

phantasma-sdk-ts/types/entropy

Source: dist/types/types/entropy.d.ts

Declarations

export declare class Entropy {
    static getRandomBytes(targetLength: number): Buffer;
    /** @deprecated Use `getRandomBytes` instead. This alias will be removed in v1.0. */
    static GetRandomBytes(targetLength: number): Buffer;
}

phantasma-sdk-ts/types/extensions/base16

Source: dist/types/types/extensions/base16.d.ts

Declarations

export declare class Base16 {
    static encode(str: string): string;
    static encodeUint8Array(arr: Uint8Array): string;
    static decode(str: string): string;
    static decodeUint8Array(str: string): Uint8Array;
}

phantasma-sdk-ts/types/extensions/describer

Source: dist/types/types/extensions/describer.d.ts

Declarations

export declare class Describer {
    static describe(val: {
        prototype: object;
        toString(): string;
    }, parent?: boolean): string[];
}

phantasma-sdk-ts/types/extensions

Source: dist/types/types/extensions/index.d.ts

Declarations

export * from './p-binary-reader.js';
export * from './p-binary-writer.js';
export * from './base16.js';
export * from './describer.js';

phantasma-sdk-ts/types/extensions/p-binary-reader

Source: dist/types/types/extensions/p-binary-reader.d.ts

Declarations

export declare class PBinaryReader {
    reader: BinaryReader;
    get length(): number;
    get position(): number;
    set position(value: number);
    get isEndOfStream(): boolean;
    readBoolean(): boolean;
    readByte(): number;
    readBytes(bytesToRead: number): number[];
    readSignedByte(): number;
    readShort(): number;
    readUnsignedShort(): number;
    readInt(): number;
    readUnsignedInt(): number;
    readLongString(): string;
    readLong(): number;
    readUnsignedLongString(): string;
    readUnsignedLong(): number;
    readFloat(): number;
    readDouble(): number;
    readChar(encoding: Encoding): string;
    readChars(charactersToRead: number, encoding: Encoding): string;
    readCharBytes(bytesToRead: number, encoding: Encoding): string;
    constructor(arg1: Buffer | Uint8Array);
    read(numBytes: number): string;
    readString(): string;
    readStringBytes(numBytes: number): string;
    readBigInteger(): bigint;
    readBigIntAccurate(): string;
    readSignatureV2(): Signature | null;
    readSignature(): Signature | null;
    readByteArray(): string;
    readTimestamp(): Timestamp;
    readVarInt(): number;
    readVarString(): string;
    readVmObject(): string | number | boolean | Record<string, unknown>;
}

phantasma-sdk-ts/types/extensions/p-binary-writer

Source: dist/types/types/extensions/p-binary-writer.d.ts

Declarations

export declare class PBinaryWriter {
    constructor(arg1?: Buffer | Uint8Array);
    get length(): number;
    get position(): number;
    set position(value: number);
    writeBoolean(value: boolean): void;
    writeByte(value: number): void;
    writeSameByte(value: number, repeats: number): void;
    writeSignedByte(value: number): void;
    writeShort(value: number): void;
    writeUnsignedShort(value: number): void;
    writeInt(value: number): void;
    writeUnsignedInt(value: number): void;
    writeLong(value: string | number): void;
    writeUnsignedLong(value: string | number): void;
    writeFloat(value: number): void;
    writeDouble(value: number): void;
    writeChar(character: string | number, encoding: Encoding): void;
    writeChars(characters: string | number[], encoding: Encoding): void;
    clear(): void;
    toArray(): number[];
    toUint8Array(): Uint8Array;
    appendByte(value: number): this;
    appendBytes(bytes: Uint8Array): void;
    writeEnum(value: number): this;
    writeBytes(bytes: byte[]): this;
    writeVarInt(value: number): this;
    writeTimestamp(obj: Timestamp): this;
    writeDateTime(obj: Date): this;
    rawString(value: string): number[];
    writeByteArray(bytes: number[] | Uint8Array): this;
    writeString(text: string): this;
    emitUInt32(value: number): this;
    writeBigInteger(value: bigint): this;
    writeBigIntegerString(value: string): this;
    writeSignature(signature: Signature | null): this;
    appendHexEncoded(bytesHex: string): this;
    /** @deprecated Use `appendHexEncoded` instead. This alias will be removed in v1.0. */
    AppendHexEncoded(bytesHex: string): this;
}
export {};

phantasma-sdk-ts/types

Source: dist/types/types/index.d.ts

Declarations

export * from './carbon/index.js';
export * from './carbon-serialization.js';
export * from './consensus.js';
export * from './timestamp.js';
export * from './stack.js';
export * from './address.js';
export * from './contract.js';
export * from './ed25519-signature.js';
export * from './phantasma-keys.js';
export * from './domain-settings.js';
export * from './entropy.js';
export * from './extensions/index.js';
export * from './serialization.js';

phantasma-sdk-ts/types/phantasma-big-int-serialization

Source: dist/types/types/phantasma-big-int-serialization.d.ts

Declarations

export declare function bigIntToCsharpLE(n: bigint): Uint8Array;
export declare function bigIntToTwosComplementLE_phantasma(n: bigint): Uint8Array;
export declare function bigIntFromTwosComplementLE_phantasma(data: Uint8Array): bigint;

phantasma-sdk-ts/types/phantasma-keys

Source: dist/types/types/phantasma-keys.d.ts

Declarations

export declare class PhantasmaKeys implements KeyPair, IKeyPair {
    get privateKey(): Uint8Array<ArrayBufferLike>;
    /** @deprecated Use `privateKey` instead. This alias will be removed in v1.0. */
    get PrivateKey(): Uint8Array<ArrayBufferLike>;
    get publicKey(): Uint8Array<ArrayBufferLike>;
    /** @deprecated Use `publicKey` instead. This alias will be removed in v1.0. */
    get PublicKey(): Uint8Array<ArrayBufferLike>;
    get address(): Address;
    /** @deprecated Use `address` instead. This alias will be removed in v1.0. */
    get Address(): Address;
    static readonly PrivateKeyLength = 32;
    constructor(privateKey: Uint8Array);
    toString(): string;
    static generate(): PhantasmaKeys;
    static fromWIF(wif: string): PhantasmaKeys;
    toWIF(): string;
    static xor(x: Uint8Array, y: Uint8Array): Uint8Array;
    sign(msg: Uint8Array): Signature;
    /** @deprecated Use `sign` instead. This alias will be removed in v1.0. */
    Sign(msg: Uint8Array, customSignFunction?: (msg: Uint8Array, privateKey: Uint8Array, publicKey: Uint8Array) => Uint8Array): Signature;
}

phantasma-sdk-ts/types/serialization

Source: dist/types/types/serialization.d.ts

Declarations

export interface CustomReader {
    (reader: PBinaryReader): unknown;
}
export interface CustomWriter {
    (writer: PBinaryWriter, obj: unknown): void;
}
export declare class CustomSerializer {
    readonly read: CustomReader;
    readonly write: CustomWriter;
    constructor(reader: CustomReader, writer: CustomWriter);
    /** @deprecated Use `read` instead. This alias will be removed in v1.0. */
    get Read(): CustomReader;
    /** @deprecated Use `write` instead. This alias will be removed in v1.0. */
    get Write(): CustomWriter;
}
export declare class Serialization {
    static registerType<T>(type: T, reader: CustomReader, writer: CustomWriter): void;
    /** @deprecated Use `registerType` instead. This alias will be removed in v1.0. */
    static RegisterType<T>(type: T, reader: CustomReader, writer: CustomWriter): void;
    static serializeEnum(obj: unknown): Uint8Array;
    /** @deprecated Use `serializeEnum` instead. This alias will be removed in v1.0. */
    static SerializeEnum(obj: unknown): Uint8Array;
    static serialize(obj: unknown): Uint8Array;
    /** @deprecated Use `serialize` instead. This alias will be removed in v1.0. */
    static Serialize(obj: unknown): Uint8Array;
    static serializeObject(writer: PBinaryWriter, obj: unknown, type: unknown | null): void;
    /** @deprecated Use `serializeObject` instead. This alias will be removed in v1.0. */
    static SerializeObject(writer: PBinaryWriter, obj: unknown, type: unknown | null): void;
    static deserialize<T>(bytesOrBytes: Uint8Array | PBinaryReader, type?: unknown): T;
    /** @deprecated Use `deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize<T>(bytesOrBytes: Uint8Array | PBinaryReader, type?: unknown): T;
    static deserializeObject<T>(reader: PBinaryReader, type: Constructor<T> | unknown): T;
    /** @deprecated Use `deserializeObject` instead. This alias will be removed in v1.0. */
    static UnserializeObject<T>(reader: PBinaryReader, type: Constructor<T> | unknown): T;
}
export {};

phantasma-sdk-ts/types/stack

Source: dist/types/types/stack.d.ts

Declarations

export declare class Stack<T> implements StackLike<T> {
    constructor(capacity?: number);
    push(item: T): void;
    pop(): T | undefined;
    peek(): T | undefined;
    size(): number;
    isEmpty(): boolean;
    toArray(): T[];
    clear(): void;
    toString(): string;
    isFull(): boolean;
}

phantasma-sdk-ts/types/timestamp

Source: dist/types/types/timestamp.d.ts

Declarations

export declare class Timestamp {
    value: number;
    constructor(value: number);
    toString(): string;
    toStringFormat(_format?: string): string;
    static now: number;
    static null: Timestamp;
    compareTo(other: Timestamp): 0 | 1 | -1;
    equals(obj: unknown): boolean;
    getHashCode(): number;
    getSize(): number;
    static equal(A: Timestamp, B: Timestamp): boolean;
    static notEqual(A: Timestamp, B: Timestamp): boolean;
    static lessThan(A: Timestamp, B: Timestamp): boolean;
    static greaterThan(A: Timestamp, B: Timestamp): boolean;
    static lessThanOrEqual(A: Timestamp, B: Timestamp): boolean;
    static greaterThanOrEqual(A: Timestamp, B: Timestamp): boolean;
    static subtract(A: Timestamp, B: Timestamp): number;
    static fromNumber(ticks: number): Timestamp;
    static fromDate(time: Date): Timestamp;
    static addTimeSpan(A: Timestamp, B: number): number;
    static subtractTimeSpan(A: Timestamp, B: number): number;
    serializeData(writer: PBinaryWriter): void;
    unserializeData(reader: PBinaryReader): void;
    static serialize(timestamp: Timestamp, writer: PBinaryWriter): void;
    static deserialize(reader: PBinaryReader): Timestamp;
    /** @deprecated Use `serializeData` or `Timestamp.serialize` instead. This alias will be removed in v1.0. */
    static Serialize(timestamp?: Timestamp, writer?: PBinaryWriter): void;
    /** @deprecated Use `Timestamp.deserialize` instead. This alias will be removed in v1.0. */
    static Unserialize(reader?: PBinaryReader): Timestamp | undefined;
}

phantasma-sdk-ts/utils/hex

Source: dist/types/utils/hex.d.ts

Declarations

export declare function bytesToHex(bytes: Uint8Array): string;
export declare function bytesToHex(bytes: readonly number[]): string;
export declare function bytesToHex(bytes: ArrayLike<number>): string;
export declare function hexToBytes(hex: string): Uint8Array;

phantasma-sdk-ts/utils

Source: dist/types/utils/index.d.ts

Declarations

export * from './hex.js';
export * from './validation-utils.js';
export * from './logger.js';
export * from './units.js';
export declare function reverseHex(hex: string): string;
export declare function getDifficulty(transactionHash: string): number;
export declare function decodeBase16(hex: string): string;
export declare function encodeBase16(str: string): string;
export declare function uint8ArrayToString(array: Uint8Array): string;
export declare function uint8ArrayToStringDefault(array: Uint8Array): string;
export declare function uint8ArrayToNumberArray(array: Uint8Array): number[];
export declare function stringToUint8Array(str: string): Uint8Array;
export declare function hexStringToUint8Array(str: string): Uint8Array;
export declare function arrayNumberToUint8Array(arr: number[]): Uint8Array;
export declare function uint8ArrayToBytes(array: Uint8Array): number[];
export declare function numberToByteArray(num: number, size?: number): Uint8Array;
export declare function bigIntToByteArray(bigint: bigint): Uint8Array;
export declare const hex2ascii: (hexx: string) => string;
export declare const Int2Buffer: (i: number) => Buffer;

phantasma-sdk-ts/utils/logger

Source: dist/types/utils/logger.d.ts

Declarations

export interface Logger {
    log?: (...args: unknown[]) => void;
    info?: (...args: unknown[]) => void;
    warn?: (...args: unknown[]) => void;
    error?: (...args: unknown[]) => void;
    debug?: (...args: unknown[]) => void;
    trace?: (...args: unknown[]) => void;
}
export declare const logger: Required<Logger>;
export declare function setLogger(custom?: Logger): void;

phantasma-sdk-ts/utils/units

Source: dist/types/utils/units.d.ts

Declarations

export declare function parseUnits(value: string | number | bigint, decimals: number): bigint;
export declare function formatUnits(atoms: bigint, decimals: number): string;

phantasma-sdk-ts/utils/validation-utils

Source: dist/types/utils/validation-utils.d.ts

Declarations

export declare const ANONYMOUS_NAME = "anonymous";
export declare const GENESIS_NAME = "genesis";
export declare const ENTRY_CONTEXT_NAME = "entry";
export declare const NULL_NAME = "null";
export declare function isReservedIdentifier(name: string): boolean;
export declare function isValidIdentifier(name: string | null | undefined): boolean;
export declare function isValidTicker(name: string | null | undefined): boolean;

phantasma-sdk-ts/vm/contracts

Source: dist/types/vm/contracts.d.ts

Declarations

export declare enum Contracts {
    GasContractName = "gas",
    BlockContractName = "block",
    StakeContractName = "stake",
    SwapContractName = "swap",
    AccountContractName = "account",
    ConsensusContractName = "consensus",
    GovernanceContractName = "governance",
    StorageContractName = "storage",
    ValidatorContractName = "validator",
    InteropContractName = "interop",
    ExchangeContractName = "exchange",
    PrivacyContractName = "privacy",
    RelayContractName = "relay",
    RankingContractName = "ranking"
}

phantasma-sdk-ts/vm/decoder

Source: dist/types/vm/decoder.d.ts

Declarations

export declare class Decoder {
    str: string;
    constructor(str: string);
    isEnd(): boolean;
    readCharPair(): string;
    readByte(): number;
    read(numBytes: number): string;
    readString(): string;
    readStringBytes(numBytes: number): string;
    readByteArray(): string | never[];
    readSignature(): ISignature | null;
    readTimestamp(): number;
    readVarInt(): number;
    readBigInt(): number;
    readBigIntAccurate(): string;
    readVmObject(): string | number | boolean | Record<string, unknown>;
}

phantasma-sdk-ts/vm/disassembler

Source: dist/types/vm/disassembler.d.ts

Declarations

export declare class Disassembler {
}
export declare class Dissassembler extends Disassembler {
}

phantasma-sdk-ts/vm/event-data

Source: dist/types/vm/event-data.d.ts

Declarations

export declare enum EventKind {
    Unknown = 0,
    ChainCreate = 1,
    TokenCreate = 2,
    TokenSend = 3,
    TokenReceive = 4,
    TokenMint = 5,
    TokenBurn = 6,
    TokenStake = 7,
    TokenClaim = 8,
    AddressRegister = 9,
    AddressLink = 10,
    AddressUnlink = 11,
    OrganizationCreate = 12,
    OrganizationAdd = 13,
    OrganizationRemove = 14,
    GasEscrow = 15,
    GasPayment = 16,
    AddressUnregister = 17,
    OrderCreated = 18,
    OrderCancelled = 19,
    OrderFilled = 20,
    OrderClosed = 21,
    FeedCreate = 22,
    FeedUpdate = 23,
    FileCreate = 24,
    FileDelete = 25,
    ValidatorPropose = 26,
    ValidatorElect = 27,
    ValidatorRemove = 28,
    ValidatorSwitch = 29,
    PackedNFT = 30,
    ValueCreate = 31,
    ValueUpdate = 32,
    PollCreated = 33,
    PollClosed = 34,
    PollVote = 35,
    ChannelCreate = 36,
    ChannelRefill = 37,
    ChannelSettle = 38,
    LeaderboardCreate = 39,
    LeaderboardInsert = 40,
    LeaderboardReset = 41,
    PlatformCreate = 42,
    ChainSwap = 43,
    ContractRegister = 44,
    ContractDeploy = 45,
    AddressMigration = 46,
    ContractUpgrade = 47,
    Log = 48,
    Inflation = 49,
    OwnerAdded = 50,
    OwnerRemoved = 51,
    DomainCreate = 52,
    DomainDelete = 53,
    TaskStart = 54,
    TaskStop = 55,
    CrownRewards = 56,
    Infusion = 57,
    Crowdsale = 58,
    OrderBid = 59,
    ContractKill = 60,
    OrganizationKill = 61,
    MasterClaim = 62,
    ExecutionFailure = 63,
    Custom = 64,
    Custom_V2 = 65,
    GovernanceSetGasConfig = 66,
    GovernanceSetChainConfig = 67,
    TokenSeriesCreate = 68,
    SpecialResolution = 69
}
export declare enum TypeAuction {
    Fixed = 0,
    Classic = 1,
    Reserve = 2,
    Dutch = 3
}
export declare function decodeVMObject(str: string): unknown;
export interface TokenEventData {
    symbol: string;
    value: string;
    chainName: string;
}
export declare function getTokenEventData(str: string): TokenEventData;
export interface ChainValueEventData {
    name: string;
    value: number;
}
export declare function getChainValueEventData(str: string): ChainValueEventData;
export interface TransactionSettleEventData {
    hash: string;
    platform: string;
    chain: string;
}
export declare function getTransactionSettleEventData(str: string): TransactionSettleEventData;
export interface GasEventData {
    address: string;
    price: number;
    amount: number;
    endAmount: number;
}
export declare function getGasEventData(str: string): GasEventData;
export interface InfusionEventData {
    baseSymbol: string;
    tokenId: string;
    infusedSymbol: string;
    infusedValue: string;
    chainName: string;
    /** @deprecated Use `tokenId` instead. This alias will be removed in v1.0. */
    TokenID: string;
    /** @deprecated Use `infusedSymbol` instead. This alias will be removed in v1.0. */
    InfusedSymbol: string;
    /** @deprecated Use `infusedValue` instead. This alias will be removed in v1.0. */
    InfusedValue: string;
    /** @deprecated Use `chainName` instead. This alias will be removed in v1.0. */
    ChainName: string;
}
export declare function getInfusionEventData(str: string): InfusionEventData;
export interface MarketEventData {
    baseSymbol: string;
    quoteSymbol: string;
    id: string;
    amount: number;
}
export declare function getMarketEventData(str: string): MarketEventData;
export declare function getString(str: string): string;

phantasma-sdk-ts/vm

Source: dist/types/vm/index.d.ts

Declarations

export * from './script-builder.js';
export * from './contracts.js';
export * from './opcode.js';
export * from './vm-type.js';
export * from './event-data.js';
export * from './decoder.js';
export * from './disassembler.js';
export * from './vm-object.js';

phantasma-sdk-ts/vm/opcode

Source: dist/types/vm/opcode.d.ts

Declarations

export declare enum Opcode {
    NOP = 0,
    MOVE = 1,// copy reference
    COPY = 2,// copy by value
    PUSH = 3,
    POP = 4,
    SWAP = 5,
    CALL = 6,
    EXTCALL = 7,
    JMP = 8,
    JMPIF = 9,
    JMPNOT = 10,
    RET = 11,
    THROW = 12,
    LOAD = 13,
    CAST = 14,
    CAT = 15,
    RANGE = 16,
    LEFT = 17,
    RIGHT = 18,
    SIZE = 19,
    COUNT = 20,
    NOT = 21,
    AND = 22,
    OR = 23,
    XOR = 24,
    EQUAL = 25,
    LT = 26,
    GT = 27,
    LTE = 28,
    GTE = 29,
    INC = 30,
    DEC = 31,
    SIGN = 32,
    NEGATE = 33,
    ABS = 34,
    ADD = 35,
    SUB = 36,
    MUL = 37,
    DIV = 38,
    MOD = 39,
    SHL = 40,
    SHR = 41,
    MIN = 42,
    MAX = 43,
    POW = 44,
    CTX = 45,
    SWITCH = 46,
    PUT = 47,
    GET = 48,// lookups a key and copies a reference into register
    CLEAR = 49,// clears a register
    UNPACK = 50,// unpacks serialized struct based on ref struct
    PACK = 51,// unused for now
    DEBUG = 52,
    SUBSTR = 53
}

phantasma-sdk-ts/vm/script-builder

Source: dist/types/vm/script-builder.d.ts

Declarations

export declare class ScriptBuilder {
    _labelLocations: {
        [id: string]: number;
    };
    _jumpLocations: {
        [id: number]: string;
    };
    str: string;
    writer: PBinaryWriter;
    NullAddress: string;
    static create(): ScriptBuilder;
    /** @deprecated Use `ScriptBuilder.create()` instead. This alias will be removed in v1.0. */
    static ScriptBuilder(): ScriptBuilder;
    constructor();
    beginScript(): this;
    getScript(): string;
    endScript(): string;
    emit(opcode: Opcode, bytes?: number[]): this;
    emitThrow(reg: byte): this;
    emitPush(reg: byte): this;
    emitPop(reg: byte): this;
    emitExtCall(method: string, reg?: byte): this;
    emitBigInteger(value: string): this;
    emitAddress(textAddress: string): this;
    rawString(value: string): number[];
    emitLoad(reg: number, obj: ScriptLoadValue): this;
    emitLoadBytes(reg: number, bytes: byte[], type?: VMType): this;
    emitLoadArray(reg: number, obj: unknown[]): this;
    emitLoadSerializable(reg: number, obj: SerializableLike): this;
    emitLoadVmObject(reg: number, obj: VMObject): this;
    emitLoadEnum(reg: number, enumVal: number): this;
    emitLoadAddress(reg: number, obj: Address): this;
    emitLoadTimestamp(reg: number, obj: Date | Timestamp): this;
    emitLoadVarInt(reg: number, val: number): this;
    emitMove(src_reg: number, dst_reg: number): this;
    emitCopy(src_reg: number, dst_reg: number): this;
    emitLabel(label: string): this;
    emitJump(opcode: Opcode, label: string, reg?: number): this;
    emitCall(label: string, regCount: byte): this;
    emitConditionalJump(opcode: Opcode, src_reg: byte, label: string): this;
    insertMethodArgs(args: ScriptLoadValue[]): void;
    callInterop(method: string, args: ScriptLoadValue[]): this;
    callContract(contractName: string, method: string, args: ScriptLoadValue[]): this;
    allowGas(from: string | Address, to: string | Address, gasPrice: number | bigint, gasLimit: number | bigint): this;
    spendGas(address: string | Address): this;
    mintTokens(symbol: string, from: string | Address, to: string | Address, amount: number | bigint): this;
    transferTokens(symbol: string, from: string | Address, to: string | Address, amount: number | bigint): this;
    transferBalance(symbol: string, from: string | Address, to: string | Address): this;
    transferNft(symbol: string, from: string | Address, to: string | Address, tokenId: number | bigint): this;
    crossTransferToken(destinationChain: string | Address, symbol: string, from: string | Address, to: string | Address, amount: number | bigint): this;
    crossTransferNft(destinationChain: string | Address, symbol: string, from: string | Address, to: string | Address, tokenId: number | bigint): this;
    stake(address: string | Address, amount: number | bigint): this;
    unstake(address: string | Address, amount: number | bigint): this;
    callNft(symbol: string, seriesId: number | bigint, method: string, args?: ScriptLoadValue[]): this;
    emitTimestamp(obj: Date): this;
    emitByteArray(bytes: number[]): this;
    emitVarString(text: string): this;
    emitVarInt(value: number): this;
    emitUInt32(value: number): this;
    emitBytes(bytes: byte[]): this;
    byteToHex(byte: number): string;
    appendByte(byte: number): void;
    appendBytes(bytes: byte[]): void;
    appendUShort(ushort: number): void;
    appendHexEncoded(bytes: string): this;
    /** @deprecated Use `beginScript` instead. This alias will be removed in v1.0. */
    BeginScript(): this;
    /** @deprecated Use `getScript` instead. This alias will be removed in v1.0. */
    GetScript(): string;
    /** @deprecated Use `endScript` instead. This alias will be removed in v1.0. */
    EndScript(): string;
    /** @deprecated Use `emit` instead. This alias will be removed in v1.0. */
    Emit(opcode: Opcode, bytes?: number[]): this;
    /** @deprecated Use `emitThrow` instead. This typoed alias will be removed in v1.0. */
    EmitThorw(reg: byte): this;
    /** @deprecated Use `emitPush` instead. This alias will be removed in v1.0. */
    EmitPush(reg: byte): this;
    /** @deprecated Use `emitPop` instead. This alias will be removed in v1.0. */
    EmitPop(reg: byte): this;
    /** @deprecated Use `emitExtCall` instead. This alias will be removed in v1.0. */
    EmitExtCall(method: string, reg?: byte): this;
    /** @deprecated Use `emitBigInteger` instead. This alias will be removed in v1.0. */
    EmitBigInteger(value: string): this;
    /** @deprecated Use `emitAddress` instead. This alias will be removed in v1.0. */
    EmitAddress(textAddress: string): this;
    /** @deprecated Use `rawString` instead. This alias will be removed in v1.0. */
    RawString(value: string): number[];
    /** @deprecated Use `emitLoad` instead. This alias will be removed in v1.0. */
    EmitLoad(reg: number, obj: ScriptLoadValue): this;
    /** @deprecated Use `emitLoadBytes` instead. This alias will be removed in v1.0. */
    EmitLoadBytes(reg: number, bytes: byte[], type?: VMType): this;
    /** @deprecated Use `emitLoadArray` instead. This alias will be removed in v1.0. */
    EmitLoadArray(reg: number, obj: unknown[]): this;
    /** @deprecated Use `emitLoadSerializable` instead. This alias will be removed in v1.0. */
    EmitLoadISerializable(reg: number, obj: ISerializable): this;
    /** @deprecated Use `emitLoadVmObject` instead. This alias will be removed in v1.0. */
    EmitLoadVMObject(reg: number, obj: VMObject): this;
    /** @deprecated Use `emitLoadEnum` instead. This alias will be removed in v1.0. */
    EmitLoadEnum(reg: number, enumVal: number): this;
    /** @deprecated Use `emitLoadAddress` instead. This alias will be removed in v1.0. */
    EmitLoadAddress(reg: number, obj: Address): this;
    /** @deprecated Use `emitLoadTimestamp` instead. This alias will be removed in v1.0. */
    EmitLoadTimestamp(reg: number, obj: Date | Timestamp): this;
    /** @deprecated Use `emitLoadVarInt` instead. This alias will be removed in v1.0. */
    EmitLoadVarInt(reg: number, val: number): this;
    /** @deprecated Use `emitMove` instead. This alias will be removed in v1.0. */
    EmitMove(src_reg: number, dst_reg: number): this;
    /** @deprecated Use `emitCopy` instead. This alias will be removed in v1.0. */
    EmitCopy(src_reg: number, dst_reg: number): this;
    /** @deprecated Use `emitLabel` instead. This alias will be removed in v1.0. */
    EmitLabel(label: string): this;
    /** @deprecated Use `emitJump` instead. This alias will be removed in v1.0. */
    EmitJump(opcode: Opcode, label: string, reg?: number): this;
    /** @deprecated Use `emitCall` instead. This alias will be removed in v1.0. */
    EmitCall(label: string, regCount: byte): this;
    /** @deprecated Use `emitConditionalJump` instead. This alias will be removed in v1.0. */
    EmitConditionalJump(opcode: Opcode, src_reg: byte, label: string): this;
    /** @deprecated Use `insertMethodArgs` instead. This alias will be removed in v1.0. */
    InsertMethodArgs(args: ScriptLoadValue[]): void;
    /** @deprecated Use `callInterop` instead. This alias will be removed in v1.0. */
    CallInterop(method: string, args: ScriptLoadValue[]): this;
    /** @deprecated Use `callContract` instead. This alias will be removed in v1.0. */
    CallContract(contractName: string, method: string, args: ScriptLoadValue[]): this;
    /** @deprecated Use `allowGas` instead. This alias will be removed in v1.0. */
    AllowGas(from: string | Address, to: string | Address, gasPrice: number | bigint, gasLimit: number | bigint): this;
    /** @deprecated Use `spendGas` instead. This alias will be removed in v1.0. */
    SpendGas(address: string | Address): this;
    /** @deprecated Use `mintTokens` instead. This alias will be removed in v1.0. */
    MintTokens(symbol: string, from: string | Address, to: string | Address, amount: number | bigint): this;
    /** @deprecated Use `transferTokens` instead. This alias will be removed in v1.0. */
    TransferTokens(symbol: string, from: string | Address, to: string | Address, amount: number | bigint): this;
    /** @deprecated Use `transferBalance` instead. This alias will be removed in v1.0. */
    TransferBalance(symbol: string, from: string | Address, to: string | Address): this;
    /** @deprecated Use `transferNft` instead. This alias will be removed in v1.0. */
    TransferNFT(symbol: string, from: string | Address, to: string | Address, tokenId: number | bigint): this;
    /** @deprecated Use `crossTransferToken` instead. This alias will be removed in v1.0. */
    CrossTransferToken(destinationChain: string | Address, symbol: string, from: string | Address, to: string | Address, amount: number | bigint): this;
    /** @deprecated Use `crossTransferNft` instead. This alias will be removed in v1.0. */
    CrossTransferNFT(destinationChain: string | Address, symbol: string, from: string | Address, to: string | Address, tokenId: number | bigint): this;
    /** @deprecated Use `stake` instead. This alias will be removed in v1.0. */
    Stake(address: string | Address, amount: number | bigint): this;
    /** @deprecated Use `unstake` instead. This alias will be removed in v1.0. */
    Unstake(address: string | Address, amount: number | bigint): this;
    /** @deprecated Use `callNft` instead. This alias will be removed in v1.0. */
    CallNFT(symbol: string, seriesId: number | bigint, method: string, args?: ScriptLoadValue[]): this;
    /** @deprecated Use `emitTimestamp` instead. This alias will be removed in v1.0. */
    EmitTimestamp(obj: Date): this;
    /** @deprecated Use `emitByteArray` instead. This alias will be removed in v1.0. */
    EmitByteArray(bytes: number[]): this;
    /** @deprecated Use `emitVarString` instead. This alias will be removed in v1.0. */
    EmitVarString(text: string): this;
    /** @deprecated Use `emitVarInt` instead. This alias will be removed in v1.0. */
    EmitVarInt(value: number): this;
    /** @deprecated Use `emitUInt32` instead. This alias will be removed in v1.0. */
    EmitUInt32(value: number): this;
    /** @deprecated Use `emitBytes` instead. This alias will be removed in v1.0. */
    EmitBytes(bytes: byte[]): this;
    /** @deprecated Use `byteToHex` instead. This alias will be removed in v1.0. */
    ByteToHex(byte: number): string;
    /** @deprecated Use `appendByte` instead. This alias will be removed in v1.0. */
    AppendByte(byte: number): void;
    /** @deprecated Use `appendBytes` instead. This alias will be removed in v1.0. */
    AppendBytes(bytes: byte[]): void;
    /** @deprecated Use `appendUShort` instead. This alias will be removed in v1.0. */
    AppendUshort(ushort: number): void;
    /** @deprecated Use `appendHexEncoded` instead. This alias will be removed in v1.0. */
    AppendHexEncoded(bytes: string): this;
}
export {};

phantasma-sdk-ts/vm/utils/disasm-method-call

Source: dist/types/vm/utils/disasm-method-call.d.ts

Declarations

export declare class DisasmMethodCall {
    contractName: string;
    methodName: string;
    arguments: VMObject[];
    /** @deprecated Use `contractName` instead. This alias will be removed in v1.0. */
    get ContractName(): string;
    set ContractName(value: string);
    /** @deprecated Use `methodName` instead. This alias will be removed in v1.0. */
    get MethodName(): string;
    set MethodName(value: string);
    /** @deprecated Use `arguments` instead. This alias will be removed in v1.0. */
    get Arguments(): VMObject[];
    set Arguments(value: VMObject[]);
    toString(): string;
}

phantasma-sdk-ts/vm/utils/disasm-utils

Source: dist/types/vm/utils/disasm-utils.d.ts

Declarations

export declare class DisasmUtils {
}

phantasma-sdk-ts/vm/utils

Source: dist/types/vm/utils/index.d.ts

Declarations

export * from './disasm-utils.js';
export * from './disasm-method-call.js';

phantasma-sdk-ts/vm/vm-object

Source: dist/types/vm/vm-object.d.ts

Declarations

export declare class VMObject implements ISerializable {
    /** @deprecated Use `type` instead. This alias will be removed in v1.0. */
    Type: VMType;
    /** @deprecated Use `data` instead. This alias will be removed in v1.0. */
    Data: unknown;
    get type(): VMType;
    set type(value: VMType);
    get data(): unknown;
    set data(value: unknown);
    get isEmpty(): boolean;
    getChildren(): Map<VMObject, VMObject> | null;
    get size(): number;
    constructor();
    asTimestamp(): Timestamp;
    asByteArray(): Uint8Array;
    asString(): string;
    asNumber(): bigint;
    asEnum<T>(): T;
    getArrayType(): VMType;
    asType(type: VMType): unknown;
    static isEnum(instance: unknown): boolean;
    asBool(): boolean;
    static isStructOrClass(type: unknown): boolean;
    static isSerializable(type: unknown): boolean;
    static isPrimitive(type: unknown): boolean;
    static isValueType(type: unknown): boolean;
    static isClass(type: unknown): boolean;
    static isInterface(type: unknown): boolean;
    toArray(arrayElementType: unknown): unknown[];
    toObjectType(type: unknown): unknown;
    toObject(): unknown;
    toStruct<T>(structType: VMObjectConstructor<T>): T;
    static getVmType(type: unknown): VMType;
    static isVmType(type: unknown): boolean;
    setValue(value: unknown): VMObject;
    setValue(val: unknown, type: VMType): VMObject;
    static validateStructKey(key: VMObject): void;
    castViaReflection(srcObj: unknown, level: number, dontConvertSerializables?: boolean): VMObject;
    setKey(key: VMObject, obj: VMObject): void;
    copy(other: VMObject): void;
    setType(type: VMType): void;
    static fromArray(array: unknown[]): VMObject;
    static castTo(srcObj: VMObject, type: VMType): VMObject;
    static fromObject(obj: unknown): VMObject | null;
    static fromEnum(obj: unknown): VMObject;
    static fromStruct(obj: unknown): VMObject;
    static fromBytes(bytes: Uint8Array | Buffer): VMObject;
    serializeData(writer: PBinaryWriter): Uint8Array<ArrayBufferLike> | undefined;
    /** @deprecated Use `serializeData` instead. This alias will be removed in v1.0. */
    SerializeData(writer: PBinaryWriter): Uint8Array<ArrayBufferLike> | undefined;
    serializeObjectCall(writer: PBinaryWriter): Uint8Array<ArrayBufferLike> | undefined;
    /** @deprecated Use `isEmpty` instead. This alias will be removed in v1.0. */
    get IsEmpty(): boolean;
    /** @deprecated Use `getChildren` instead. This alias will be removed in v1.0. */
    GetChildren(): Map<VMObject, VMObject> | null;
    /** @deprecated Use `size` instead. This alias will be removed in v1.0. */
    get Size(): number;
    /** @deprecated Use `asTimestamp` instead. This alias will be removed in v1.0. */
    AsTimestamp(): Timestamp;
    /** @deprecated Use `asByteArray` instead. This alias will be removed in v1.0. */
    AsByteArray(): Uint8Array;
    /** @deprecated Use `asString` instead. This alias will be removed in v1.0. */
    AsString(): string;
    /** @deprecated Use `asString` instead. This alias will be removed in v1.0. */
    ToString(): string;
    /** @deprecated Use `asNumber` instead. This alias will be removed in v1.0. */
    AsNumber(): bigint;
    /** @deprecated Use `asEnum` instead. This alias will be removed in v1.0. */
    AsEnum<T>(): T;
    /** @deprecated Use `getArrayType` instead. This alias will be removed in v1.0. */
    GetArrayType(): VMType;
    /** @deprecated Use `asType` instead. This alias will be removed in v1.0. */
    AsType(type: VMType): unknown;
    /** @deprecated Use `asBool` instead. This alias will be removed in v1.0. */
    AsBool(): boolean;
    /** @deprecated Use `toArray` instead. This alias will be removed in v1.0. */
    ToArray(arrayElementType: unknown): unknown[];
    /** @deprecated Use `toObjectType` instead. This alias will be removed in v1.0. */
    ToObjectType(type: unknown): unknown;
    /** @deprecated Use `toObject` instead. This alias will be removed in v1.0. */
    ToObject(): unknown;
    /** @deprecated Use `toStruct` instead. This alias will be removed in v1.0. */
    ToStruct<T>(structType: VMObjectConstructor<T>): T;
    /** @deprecated Use `getVmType` instead. This alias will be removed in v1.0. */
    static GetVMType(type: unknown): VMType;
    /** @deprecated Use `isVmType` instead. This alias will be removed in v1.0. */
    static IsVMType(type: unknown): boolean;
    /** @deprecated Use `setValue` instead. This alias will be removed in v1.0. */
    SetValue(value: unknown): VMObject;
    SetValue(val: unknown, type: VMType): VMObject;
    /** @deprecated Use `validateStructKey` instead. This alias will be removed in v1.0. */
    static ValidateStructKey(key: VMObject): void;
    /** @deprecated Use `castViaReflection` instead. This alias will be removed in v1.0. */
    CastViaReflection(srcObj: unknown, level: number, dontConvertSerializables?: boolean): VMObject;
    /** @deprecated Use `setKey` instead. This alias will be removed in v1.0. */
    SetKey(key: VMObject, obj: VMObject): void;
    /** @deprecated Use `copy` instead. This alias will be removed in v1.0. */
    Copy(other: VMObject): void;
    /** @deprecated Use `setType` instead. This alias will be removed in v1.0. */
    SetType(type: VMType): void;
    /** @deprecated Use `fromArray` instead. This alias will be removed in v1.0. */
    static FromArray(array: unknown[]): VMObject;
    /** @deprecated Use `castTo` instead. This alias will be removed in v1.0. */
    static CastTo(srcObj: VMObject, type: VMType): VMObject;
    /** @deprecated Use `fromObject` instead. This alias will be removed in v1.0. */
    static FromObject(obj: unknown): VMObject | null;
    /** @deprecated Use `fromEnum` instead. This alias will be removed in v1.0. */
    static FromEnum(obj: unknown): VMObject;
    /** @deprecated Use `fromStruct` instead. This alias will be removed in v1.0. */
    static FromStruct(obj: unknown): VMObject;
    /** @deprecated Use `fromBytes` instead. This alias will be removed in v1.0. */
    static FromBytes(bytes: Uint8Array | Buffer): VMObject;
    /** @deprecated Use `serializeObjectCall` instead. This alias will be removed in v1.0. */
    SerializeObjectCall(writer: PBinaryWriter): Uint8Array<ArrayBufferLike> | undefined;
    unserializeData(reader: PBinaryReader): void;
    /** @deprecated Use `unserializeData` instead. This alias will be removed in v1.0. */
    UnserializeData(reader: PBinaryReader): void;
}
export {};

phantasma-sdk-ts/vm/vm-type

Source: dist/types/vm/vm-type.d.ts

Declarations

export declare enum VMType {
    None = 0,
    Struct = 1,
    Bytes = 2,
    Number = 3,
    String = 4,
    Timestamp = 5,
    Bool = 6,
    Enum = 7,
    Object = 8
}