Skip to main content
The @ankarachain/sdk package is fully typed. Every class method, factory function, and utility accepts and returns named TypeScript types — no any, no guesswork. This page is the authoritative reference for every exported type, interface, and enum. Import them directly from the package root:

Config Types

These types control how the SDK connects to a network and locates factory contracts. You pass one of these to every top-level SDK class (TokenFactory, AssetRegistry, EscrowManager, etc.).

AnkaraChainConfig

A discriminated union narrowed by the network field. When network is an EVMSupportedNetwork the SDK constructs an EVMAdapter; when it is a StellarSupportedNetwork it constructs a StellarAdapter.

EVMAnkaraChainConfig

StellarAnkaraChainConfig

Never set stellarSecretKey in a browser application. Use stellarSigner with Freighter or another SEP-43-compatible wallet instead — the raw secret seed never has to touch your frontend code.

StellarExternalSigner

Matches the Freighter wallet API shape exactly. Any SEP-43-compatible wallet can be passed straight through.

Network Types

SupportedNetwork

EVMNetworkConfig

Returned by getNetwork() when you pass an EVMSupportedNetwork.

StellarNetworkConfig

Returned by getNetwork() when you pass a StellarSupportedNetwork.

NetworkConfig


Asset Enums

AssetTemplate

The six ERC-20 / SEP-41 asset classes supported by TokenFactory.

NFTAssetTemplate

The four NFT (ERC-721 / Soroban NFT) asset classes supported by NFTFactory.

MultiTokenTemplate

The two ERC-1155 / multi-token asset classes supported by MultiTokenFactory.

AssetStatus

On-chain lifecycle state stored in every deployed token. Managed via AssetRegistry.setStatus().
Tokens are deployed in DRAFT state. Call AssetRegistry.setStatus(address, AssetStatus.ACTIVE) before opening transfers to investors.

Metadata Types

Each asset template has a dedicated metadata interface that mirrors the corresponding on-chain struct. All bigint fields are in wei (1e18 = 1 unit) unless noted otherwise. All bytes32 fields are hex strings (0x-prefixed, 32 bytes).

FarmlandMetadata

CommodityMetadata

RealEstateMetadata

InvoiceMetadata

CarbonCreditMetadata

MiningRightsMetadata


Deploy Options

All deploy-options types extend BaseDeployOptions with a mandatory metadata field typed to the corresponding metadata interface.

BaseDeployOptions

Template-specific deploy options


Deploy Results

DeployResult

Returned by all six TokenFactory.deploy*() methods.

NFTDeployResult

Returned by NFTFactory.deploy*NFT() methods.

MultiTokenDeployResult

Returned by MultiTokenFactory.deployCommodityBatch() and deployPoolVault().

EscrowDeployResult

Returned by EscrowManager.deployEscrow().

RampSettlementDeployResult

Returned by RampManager.deployRampSettlement().

Escrow Types

MilestoneStatus

On-chain state machine for each milestone. Mirrors the MilestoneEscrow.MilestoneStatus enum.

Milestone

Returned by EscrowManager.getMilestone(). Mirrors the on-chain struct.

EscrowActivityType

All possible event types in an escrow’s on-chain history.

EscrowActivityEvent

A single normalized lifecycle event from an escrow’s history, returned by EscrowManager.getActivity().

Ramp Types

RampDirection

RampSessionStatus

RampQuoteInput

RampQuote

RampSession

InitiateOnRampInput / InitiateOffRampInput

RampPayoutAccount

RampProviderSelection

Declarative provider descriptor passed to createRampProvider(). Lets you select a provider by name plus credentials from config — no direct class import needed.

Loan Types

Loan types are used with CollateralVault, which is currently deployed on Stellar testnet only.

LoanStatus

Mirrors the CollateralVault.LoanStatus enum.

Loan


Indexer Types

These types are used with IndexerClient, which talks to a running @ankarachain/indexer service rather than directly to a chain.

IndexedEvent

EventQueryFilter

RegisteredWebhook