light_sdk 0.1.0-beta.1
light_sdk: ^0.1.0-beta.1 copied to clipboard
Dart SDK for Light Protocol ZK Compression on Solana. Provides type-safe compressed account operations, compressed token transfers, and seamless integration with the Light Protocol compression infrastructure.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0-beta.1 - 2026-01-15 #
Added #
- Initial SDK implementation with full TypeScript parity
- Core state types (BN254, CompressedAccount, TreeInfo, ValidityProof)
- Cryptographic utilities (Keccak256, address derivation)
- Complete RPC layer with Photon API support
- Light System Program instruction builders
- Compressed Token Program instruction builders
- High-level actions (compress, decompress, transfer)
- Transaction building and signing utilities
- Account selection algorithms
- Comprehensive error handling
- 275+ unit tests
- Integration test suite
- Documentation and examples
- TypeScript migration guide
0.1.0 - 2026-01-11 #
Added #
Core SDK
Rpcclass for Solana RPC with compression API (Photon) supportBN254- 254-bit field element for ZK proofsCompressedAccountandCompressedAccountWithMerkleContexttypesTreeInfoandTreeTypefor state tree metadataValidityProofandCompressedProoffor ZK validity proofsTokenDataandParsedTokenAccountfor compressed tokens
Programs
LightSystemProgram- Core compression program instructionscompress()- Compress SOLdecompress()- Decompress SOLtransfer()- Transfer compressed SOLcreateAccount()- Create compressed accounts
CompressedTokenProgram- Token compression instructionscreateSplInterface()- Create token poolmintTo()- Mint compressed tokenstransfer()- Transfer compressed tokenscompress()- Compress SPL tokensdecompress()- Decompress to SPL tokensapprove()/revoke()- Delegation support
High-Level Actions
compress()- Compress SOL with automatic tree selectiondecompress()- Decompress SOL with balance validationtransfer()- Transfer compressed SOL with account selection- Account selection algorithms for optimal UTXO management
RPC Methods
getCompressedAccount()- Get single compressed accountgetCompressedAccountsByOwner()- Get accounts by ownergetCompressedBalanceByOwner()- Get compressed SOL balancegetCompressedTokenAccountsByOwner()- Get token accountsgetCompressedTokenBalancesByOwner()- Get token balancesgetValidityProof()- Get ZK validity proofsgetMultipleNewAddressProofs()- Get address proofs
Utilities
deriveAddress()/deriveAddressV2()- Address derivationbuildAndSignTransaction()- Transaction buildingsendAndConfirmTransaction()- Transaction submission- Borsh serialization for all instruction data
Error Handling
LightExceptionbase class with error codesInsufficientBalanceExceptionfor balance checksTransactionFailedException/TransactionTimeoutExceptionProofGenerationError/ProverUnavailableErrorparseLightError()for RPC error conversion
Dependencies #
solanafrom espresso-cash for Solana primitivescoral_xyzfor Anchor program interactionspointycastlefor Keccak256 cryptography
Version History #
| Version | Date | Description |
|---|---|---|
| 0.1.0 | 2026-01-11 | Initial release |