You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-24Lines changed: 41 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,31 +8,48 @@ Light token is a high-performance token standard that reduces the cost of mint a
8
8
9
9
## Toolkits
10
10
11
-
***[Payments and Wallets](toolkits/payments-and-wallets/)** - All you need for wallet integrations and payment flows. Minimal API differences to SPL.
12
-
***[Streaming Tokens](toolkits/streaming-tokens/)** - Stream mint events using Laserstream
11
+
|| Description |
12
+
|---------|-------------|
13
+
|[Payments and Wallets](toolkits/payments-and-wallets/)| All you need for wallet integrations and payment flows. Minimal API differences to SPL. |
14
+
|[Streaming Tokens](toolkits/streaming-tokens/)| Stream mint events using Laserstream |
13
15
14
16
## Client Examples
15
17
16
-
| Example | Action | Instruction | Description |
18
+
### TypeScript
19
+
20
+
|||| Description |
21
+
|---------|--------|-------------|-------------|
22
+
| create-mint |[Action](typescript-client/actions/create-mint.ts)|[Instruction](typescript-client/instructions/create-mint.ts)| Create a light-token mint with metadata |
23
+
| create-ata |[Action](typescript-client/actions/create-ata.ts)|[Instruction](typescript-client/instructions/create-ata.ts)| Create an associated light-token account |
24
+
| load-ata |[Action](typescript-client/actions/load-ata.ts)|[Instruction](typescript-client/instructions/load-ata.ts)| Load token accounts from light-token, compressed tokens, SPL/T22 to one unified balance |
25
+
| mint-to |[Action](typescript-client/actions/mint-to.ts)|[Instruction](typescript-client/instructions/mint-to.ts)| Mint tokens to a light-account |
26
+
| transfer-interface |[Action](typescript-client/actions/transfer-interface.ts)|[Instruction](typescript-client/instructions/transfer-interface.ts)| Transfer between light-token, T22, and SPL accounts |
27
+
| wrap |[Action](typescript-client/actions/wrap.ts)|[Instruction](typescript-client/instructions/wrap.ts)| Wrap SPL/T22 to light-token |
28
+
| unwrap |[Action](typescript-client/actions/unwrap.ts)|[Instruction](typescript-client/instructions/unwrap.ts)| Unwrap light-token to SPL/T22 |
|**create-mint**|[.ts](typescript-client/actions/create-mint.ts)[.rs](rust-client/actions/create_mint.rs)|[.ts](typescript-client/instructions/create-mint.ts)[.rs](rust-client/instructions/create_mint.rs)| Create a light-token mint with metadata |
19
-
|**create-ata**|[.ts](typescript-client/actions/create-ata.ts)[.rs](rust-client/actions/create_ata.rs)|[.ts](typescript-client/instructions/create-ata.ts)[.rs](rust-client/instructions/create_ata.rs)| Create an associated light-token account |
20
-
|**create-token-account**| — |[.rs](rust-client/instructions/create_token_account.rs)| Create a light-token account with custom owner |
21
-
|**load-ata**|[.ts](typescript-client/actions/load-ata.ts)|[.ts](typescript-client/instructions/load-ata.ts)| Load token accounts from light-token, compressed tokens, SPL/T22 to one unified balance |
22
-
|**mint-to**|[.ts](typescript-client/actions/mint-to.ts)[.rs](rust-client/actions/mint_to.rs)|[.ts](typescript-client/instructions/mint-to.ts)[.rs](rust-client/instructions/mint_to.rs)| Mint tokens to a light-account |
23
-
|**mint-to-checked**| — |[.rs](rust-client/instructions/mint_to_checked.rs)| Mint tokens with decimal validation |
24
-
|**transfer-interface**|[.ts](typescript-client/actions/transfer-interface.ts)[.rs](rust-client/actions/transfer_interface.rs)|[.ts](typescript-client/instructions/transfer-interface.ts)[.rs](rust-client/instructions/transfer_interface.rs)| Transfer between light-token, T22, and SPL accounts |
25
-
|**transfer-checked**|[.rs](rust-client/actions/transfer_checked.rs)|[.rs](rust-client/instructions/transfer_checked.rs)| Transfer with decimal validation |
26
-
|**spl-to-light-transfer**| — |[.rs](rust-client/instructions/spl_to_light_transfer.rs)| Transfer from SPL to Light via TransferInterface |
27
-
|**wrap**|[.ts](typescript-client/actions/wrap.ts)[.rs](rust-client/actions/wrap.rs)|[.ts](typescript-client/instructions/wrap.ts)| Wrap SPL/T22 to light-token |
28
-
|**unwrap**|[.ts](typescript-client/actions/unwrap.ts)[.rs](rust-client/actions/unwrap.rs)|[.ts](typescript-client/instructions/unwrap.ts)| Unwrap light-token to SPL/T22 |
|**freeze**| — |[.rs](rust-client/instructions/freeze.rs)| Freeze a token account |
34
-
|**thaw**| — |[.rs](rust-client/instructions/thaw.rs)| Thaw a frozen token account |
35
-
|**close**| — |[.rs](rust-client/instructions/close.rs)| Close a token account |
36
+
| create-mint |[Action](rust-client/actions/create_mint.rs)|[Instruction](rust-client/instructions/create_mint.rs)| Create a light-token mint with metadata |
37
+
| create-ata |[Action](rust-client/actions/create_ata.rs)|[Instruction](rust-client/instructions/create_ata.rs)| Create an associated light-token account |
38
+
| create-token-account ||[Instruction](rust-client/instructions/create_token_account.rs)| Create a light-token account with custom owner |
39
+
| mint-to |[Action](rust-client/actions/mint_to.rs)|[Instruction](rust-client/instructions/mint_to.rs)| Mint tokens to a light-account |
40
+
| mint-to-checked ||[Instruction](rust-client/instructions/mint_to_checked.rs)| Mint tokens with decimal validation |
41
+
| transfer-interface |[Action](rust-client/actions/transfer_interface.rs)|[Instruction](rust-client/instructions/transfer_interface.rs)| Transfer between light-token, T22, and SPL accounts |
42
+
| transfer-checked |[Action](rust-client/actions/transfer_checked.rs)|[Instruction](rust-client/instructions/transfer_checked.rs)| Transfer with decimal validation |
43
+
| spl-to-light-transfer ||[Instruction](rust-client/instructions/spl_to_light_transfer.rs)| Transfer from SPL to Light via TransferInterface |
44
+
| wrap |[Action](rust-client/actions/wrap.rs)|| Wrap SPL/T22 to light-token |
45
+
| unwrap |[Action](rust-client/actions/unwrap.rs)|| Unwrap light-token to SPL/T22 |
| freeze ||[Instruction](rust-client/instructions/freeze.rs)| Freeze a token account |
51
+
| thaw ||[Instruction](rust-client/instructions/thaw.rs)| Thaw a frozen token account |
52
+
| close ||[Instruction](rust-client/instructions/close.rs)| Close a token account |
36
53
37
54
## Program Examples
38
55
@@ -41,7 +58,7 @@ Light token is a high-performance token standard that reduces the cost of mint a
41
58
The instructions use pure CPI calls which you can combine with existing and / or light macros.
42
59
For existing programs, you can replace spl_token with light_token instructions as you need. The API is a superset of SPL-token so switching is straightforward.
43
60
44
-
|Example| Description |
61
+
|| Description |
45
62
|---------|-------------|
46
63
|[approve](programs/anchor/basic-instructions/approve/src/lib.rs)| Approve delegate via CPI |
47
64
|[burn](programs/anchor/basic-instructions/burn/src/lib.rs)| Burn tokens via CPI |
@@ -58,7 +75,7 @@ For existing programs, you can replace spl_token with light_token instructions a
58
75
59
76
### Macros
60
77
61
-
|Example| Description |
78
+
|| Description |
62
79
|---------|-------------|
63
80
|[counter](programs/anchor/basic-macros/counter)| Create PDA with sponsored rent-exemption |
0 commit comments