@sign-global/tokentable-core 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @sign-global/tokentable-core
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat: add Sui blockchain support
8
+
9
+ ## 1.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - feat: update Arbitrum chain configuration
14
+
15
+ ## 0.0.0-beta-20250625021659
16
+
17
+ ### Major Changes
18
+
19
+ - ✨ feat: add beta version script and improve claim fee calculation
20
+
21
+ ## 0.0.0-beta-20250624084326
22
+
23
+ ### Minor Changes
24
+
25
+ - ✨ feat: add fee handling for TokenTableMerkleDistributorWithFees
26
+
3
27
  ## 1.0.0
4
28
 
5
29
  ### Major Changes
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # TokenTable Core Package
2
+
3
+ Core utilities and functions for the TokenTable SDK.
4
+
5
+ ## Development
6
+
7
+ ### Testing
8
+
9
+ This package uses [Vitest](https://vitest.dev/) for testing.
10
+
11
+ #### Running Tests
12
+
13
+ ```bash
14
+ # Run tests once
15
+ pnpm test:run
16
+
17
+ # Run tests in watch mode
18
+ pnpm test
19
+
20
+ # Run tests with UI
21
+ pnpm vitest --ui
22
+ ```
23
+
24
+ #### Test Structure
25
+
26
+ Tests are located in `src/**/__tests__/` directories following the pattern `*.test.ts`.
27
+
28
+ #### Current Test Coverage
29
+
30
+ - `getOrCreateAssociatedTokenAccount` - Comprehensive tests for Solana associated token account creation
31
+ - Tests existing account retrieval
32
+ - Tests new account creation when account doesn't exist
33
+ - Tests error handling for invalid mint/owner
34
+ - Tests custom parameter handling
35
+ - Tests unexpected error propagation
36
+
37
+ ### Building
38
+
39
+ ```bash
40
+ # Build the package
41
+ pnpm build
42
+
43
+ # Build in watch mode
44
+ pnpm build:watch
45
+ ```
46
+
47
+ ### Cleaning
48
+
49
+ ```bash
50
+ # Clean build artifacts
51
+ pnpm clean
52
+ ```
53
+
54
+ ## Testing Philosophy
55
+
56
+ The tests use comprehensive mocking to isolate the unit under test while ensuring all code paths are covered. Key testing principles:
57
+
58
+ 1. **Isolation**: External dependencies are mocked to focus on the function logic
59
+ 2. **Coverage**: All branches and error conditions are tested
60
+ 3. **Realistic Data**: Valid Solana public keys and realistic mock data are used
61
+ 4. **Error Handling**: Both expected and unexpected errors are tested
62
+
63
+ ## Dependencies
64
+
65
+ This package depends on:
66
+ - `@solana/web3.js` - Solana blockchain interaction
67
+ - `@solana/spl-token` - SPL Token program utilities
68
+ - Various other blockchain and utility libraries
69
+
70
+ Dev dependencies include:
71
+ - `vitest` - Testing framework
72
+ - `jsdom` - DOM environment for tests