Skip to content
Complete API Reference

TypeScript SDK Complete API Reference

The public API of phantasma-sdk-ts: method groups, result shapes, wire structures, compatibility notes and lower-level helpers. The setup and task pages cover the common flows.

Pages

PageUse it when
RPC ClientYou need PhantasmaAPI methods, raw JSON-RPC result handling, broadcast helpers, or pagination behavior.
RPC Result ModelsYou need result interface fields returned by account, token, block, transaction, NFT, auction, archive, or network calls.
VM and Transaction APIsYou need key/address handling, VM scripts, transactions, signatures, event decoding, binary helpers, or compatibility aliases.
Carbon API and Wire FormatYou need Carbon serializers, schemas, token/series/NFT builders, fee plans, signed messages, or result parsers.
Public API InventoryYou need the complete declaration list across package exports and deep-import declaration files.

Import Policy

Use /public for new code:

import { PhantasmaAPI, PhantasmaKeys, ScriptBuilder } from "phantasma-sdk-ts/public";

Lowercase deep imports are also available for stable areas:

import { PhantasmaAPI } from "phantasma-sdk-ts/rpc";
import { Transaction } from "phantasma-sdk-ts/tx";
import { ScriptBuilder } from "phantasma-sdk-ts/vm";

Use /types for the few Carbon helpers that are not runtime exports of /public:

import { getRandomPhantasmaId } from "phantasma-sdk-ts/types";

The package root and core/** deep imports remain compatibility paths. New code should not add new dependencies on those paths.

Compatibility Aliases

The SDK keeps legacy PascalCase methods and old typoed aliases where existing consumers may still use them. Canonical APIs are camelCase. Deprecated aliases are declared with @deprecated and are planned for removal at v1.0.