1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! # Light Token SDK
//!
//! The base library to use Light Token Accounts, Light Mints, and compressed token accounts.
//!
//! ## Light Token Accounts
//! - are on Solana devnet.
//! - are Solana accounts.
//! - can hold Light Mint and SPL Mint tokens.
//! - cost 17,288 lamports to create with 24 hours rent.
//! - are rentfree:
//! - rent exemption is sponsored by the protocol.
//! - rent is 388 lamports per rent epoch (1.5 hours).
//! - once the account's lamports balance is insufficient, it is compressed to a compressed token account.
//! - compressed tokens can be decompressed to a Light Token account.
//! - configurable lamports per write (eg transfer) keep the Light Token account perpetually funded when used. So you don't have to worry about funding rent.
//!
//! ## Compressed Token Accounts
//! - are on Solana mainnet.
//! - are compressed accounts.
//! - can hold Light Mint and SPL Mint tokens.
//! - cost 5,000 lamports to create.
//! - are well suited for airdrops and reward distribution.
//!
//! ## Light Mints
//! - are on Solana devnet.
//! - are Compressed accounts.
//! - cost 15,000 lamports to create.
//! - support `TokenMetadata`.
//!
//!
//! For full program examples, see the [Light Token Examples](https://github.com/Lightprotocol/examples-light-token).
//! For detailed documentation, visit [zkcompression.com](https://www.zkcompression.com/).
//! For rust client development see [`light-client`](https://docs.rs/light-client).
//! For rust program testing see [`light-program-test`](https://docs.rs/light-program-test).
//! For local test validator with light system programs see [Light CLI](https://www.npmjs.com/package/@lightprotocol/zk-compression-cli).
//!
//!
//!
//! ## Features
//!
//! 1. anchor - Derives AnchorSerialize, AnchorDeserialize instead of BorshSerialize, BorshDeserialize.
//! 2. compressible - utility functions for compressible sdk macros.
//!
//! ## Common Operations
//!
//! | Operation | Instruction Builder | CPI Builder |
//! |-----------|----------------|-------------|
//! | Create Associated Token Account | [`CreateAssociatedTokenAccount`](instruction::CreateAssociatedTokenAccount) | [`CreateAssociatedAccountCpi`](instruction::CreateAssociatedAccountCpi) |
//! | Create Token Account | [`CreateTokenAccount`](instruction::CreateTokenAccount) | [`CreateTokenAccountCpi`](instruction::CreateTokenAccountCpi) |
//! | Transfer | [`Transfer`](instruction::Transfer) | [`TransferCpi`](instruction::TransferCpi) |
//! | Transfer Interface (auto-detect) | [`TransferInterface`](instruction::TransferInterface) | [`TransferInterfaceCpi`](instruction::TransferInterfaceCpi) |
//! | Close Token account | [`CloseAccount`](instruction::CloseAccount) | [`CloseAccountCpi`](instruction::CloseAccountCpi) |
//! | Create Mint | [`CreateMint`](instruction::CreateMint) | [`CreateMintCpi`](instruction::CreateMintCpi) |
//! | MintTo | [`MintTo`](instruction::MintTo) | [`MintToCpi`](instruction::MintToCpi) |
//!
//!
//! # Disclaimer
//! This library is not audited and in a beta state. Use at your own risk and expect breaking changes.
// Conditional anchor re-exports
use ;
use ;
pub use ;
pub use ;
pub use compat;