allset-sdk

AllSet SDK (@fastxyz/allset-sdk) — TypeScript SDK for bridging tokens between Fast and EVM chains. Provides deposit (EVM → Fast), withdraw (Fast → EVM), and custom intent execution.

GitHub: fastxyz/fast-sdkarrow-up-right

What You Can Do

AllSet is the bridge SDK for moving tokens between the Fast payment network and EVM-compatible chains. Use it when you need to:

  • Deposit tokens into Fast — move tokens from an EVM chain (Ethereum, Arbitrum, Base, etc.) onto the Fast network for fast, low-cost payments

  • Withdraw tokens from Fast — move tokens from Fast back to an EVM chain to access DeFi, CEXs, or external services

  • Execute custom intents — define arbitrary EVM operations (swap, supply, any contract call) that get executed on your behalf on the destination chain after funds settle on Fast

AllSet is designed to be pure — no embedded chain configs, no environment variables, no file system access. You pass all addresses, RPC URLs, and credentials explicitly, making it easy to test and predictable in any environment.

Installation

Install from npm as @fastxyz/allset-sdk. The package README on GitHub includes the current install command, dependency expectations, and integration examples.

Architecture

AllSet bridges two ecosystems: EVM chains and the Fast payment network. The key abstraction is the intent — a declaration of what you want to happen on the destination chain, paired with funds on Fast to pay for it.

Function
Role

createEvmWallet()

Creates an EVM wallet from a private key, or generates a fresh random wallet for one-time bridging operations

createEvmExecutor()

Creates a viem PublicClient + WalletClient bound to a specific EVM chain

executeDeposit()

Locks tokens on the EVM chain and issues a corresponding balance on Fast

executeWithdraw()

Releases or debits tokens on Fast and unlocks them on the destination EVM chain

executeIntent()

Combines a Fast-side token transfer with a predefined EVM execution plan; the intent is processed by the AllSet payment processor

Supported Chains

Chain
Chain ID
Role in AllSet

Ethereum Mainnet

1

Primary production EVM endpoint

Sepolia

11155111

Testnet for EVM side

Arbitrum

42161

L2 deposit target

Arbitrum Sepolia

421614

Testnet for L2 side

Base

8453

L2 deposit target

How Deposits Work (EVM → Fast)

Depositing moves value from an EVM chain onto Fast. The tokens are locked in a lock contract on the EVM side, and an equivalent amount is issued or credited on Fast.

Key properties:

  • Deposits require EVM gas — budget for that in your UX

  • Finality on Fast is fast (seconds), but EVM event observation takes 1-3 minutes depending on chain

  • Track deposit progress using the response returned by the SDK together with your application or relayer-side status handling

How Withdrawals Work (Fast → EVM)

Withdrawing moves value from Fast back to an EVM chain. Tokens are released or debited on Fast, and the AllSet payment processor submits a transaction on the EVM destination chain to release the tokens to your wallet.

Key properties:

  • Withdrawals are asynchronous — the Fast side settles quickly, but EVM delivery depends on payment processor queuing and EVM gas

  • The payment processor takes a small fee in FAST for the forwarding service

  • Use the returned order identifier to track payment status in your integration

How Custom Intents Work

Intents unlock powerful composeability. Instead of just bridging tokens, you can specify what should happen on the destination EVM chain — a swap, a lending deposit, a specific contract call — and AllSet executes it automatically after your Fast funds are credited.

The payment processor detects the intent on Fast, credits the funds, and executes the described operation on the EVM destination chain — all as one atomic cross-chain workflow from the user's perspective. For intent examples with complete code, see the AllSet SDK README on GitHubarrow-up-right.

Design Principles

All functions are pure — the SDK never reads from process.env, never reads a config file, and never embeds chain IDs or contract addresses. This means:

  • You control exactly which chain and contract addresses your app uses

  • Tests can swap in mock executors without SDK changes

  • No surprises when new chains are added — you opt in explicitly


For complete API documentation, runnable examples for deposits, withdrawals, and intents, and current configuration details, see the AllSet SDK README on GitHubarrow-up-right.

Last updated

Was this helpful?