@nosana/kit 1.0.7 ā 1.0.9
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/dist/services/SolanaService.js +23 -1
- package/package.json +7 -2
- package/.gitlab-ci.yml +0 -54
- package/.prettierignore +0 -17
- package/eslint.config.js +0 -47
- package/examples/browser/.gitlab-ci.yml +0 -78
- package/examples/browser/FEATURES.md +0 -141
- package/examples/browser/QUICK_START.md +0 -76
- package/examples/browser/README.md +0 -182
- package/examples/browser/app.vue +0 -1840
- package/examples/browser/assets/css/main.css +0 -7
- package/examples/browser/nuxt.config.ts +0 -30
- package/examples/browser/package-lock.json +0 -12230
- package/examples/browser/package.json +0 -31
- package/examples/browser/public/favicon.ico +0 -0
- package/examples/browser/public/robots.txt +0 -2
- package/examples/browser/start.sh +0 -38
- package/examples/browser/tailwind.config.js +0 -26
- package/examples/node/README.md +0 -261
- package/examples/node/example-keypair.json +0 -1
- package/examples/node/monitor.ts +0 -143
- package/examples/node/nos-service.ts +0 -117
- package/examples/node/package-lock.json +0 -589
- package/examples/node/package.json +0 -20
- package/examples/node/post-job.ts +0 -160
- package/examples/node/retrieve.ts +0 -18
- package/examples/node/set-wallet.ts +0 -87
- package/examples/node/stake-program.ts +0 -84
- package/scripts/generate-clients.ts +0 -33
- package/vitest.config.ts +0 -31
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { NosanaClient, NosanaNetwork } from '@nosana/kit';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
|
|
4
|
-
async function main() {
|
|
5
|
-
console.log('š Nosana Job Posting Example');
|
|
6
|
-
console.log('===============================\n');
|
|
7
|
-
|
|
8
|
-
try {
|
|
9
|
-
// Initialize the client
|
|
10
|
-
console.log('š” Initializing Nosana client...');
|
|
11
|
-
const client = new NosanaClient(NosanaNetwork.DEVNET);
|
|
12
|
-
|
|
13
|
-
// Set up the wallet using the example keypair
|
|
14
|
-
const keypairPath = path.join(__dirname, 'example-keypair.json');
|
|
15
|
-
console.log('š Setting up wallet from:', keypairPath);
|
|
16
|
-
|
|
17
|
-
const wallet = await client.setWallet(keypairPath);
|
|
18
|
-
console.log('ā
Wallet address:', wallet?.address);
|
|
19
|
-
|
|
20
|
-
// Get available markets
|
|
21
|
-
console.log('\nš Fetching available markets...');
|
|
22
|
-
const markets = await client.jobs.markets();
|
|
23
|
-
|
|
24
|
-
if (markets.length === 0) {
|
|
25
|
-
throw new Error('No markets available. Please check your network connection and try again.');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
console.log(`ā
Found ${markets.length} market(s)`);
|
|
29
|
-
const market = markets[0]; // Use the first available market
|
|
30
|
-
console.log(`š Using market: ${market.address}`);
|
|
31
|
-
|
|
32
|
-
// Example job configuration
|
|
33
|
-
const jobConfig = {
|
|
34
|
-
// Market to post the job to
|
|
35
|
-
market: market.address,
|
|
36
|
-
|
|
37
|
-
// Job timeout in seconds (1 hour)
|
|
38
|
-
timeout: 3600,
|
|
39
|
-
|
|
40
|
-
// IPFS hash of the job specification
|
|
41
|
-
// In a real scenario, you would upload your job specification to IPFS first
|
|
42
|
-
ipfsHash: 'QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N', // Example IPFS hash
|
|
43
|
-
|
|
44
|
-
// Optional: specify a particular node (leave undefined for open market)
|
|
45
|
-
// node: 'NodeAddressHere'
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
console.log('\nš Job Configuration:');
|
|
49
|
-
console.log(' Market:', jobConfig.market.toString());
|
|
50
|
-
console.log(' Timeout:', jobConfig.timeout, 'seconds');
|
|
51
|
-
console.log(' IPFS Hash:', jobConfig.ipfsHash);
|
|
52
|
-
|
|
53
|
-
// Step 1: Create the job listing instruction
|
|
54
|
-
console.log('\nš§ Creating job listing instruction...');
|
|
55
|
-
const instruction = await client.jobs.post(jobConfig);
|
|
56
|
-
console.log('ā
Instruction created successfully');
|
|
57
|
-
console.log(' Program Address:', instruction.programAddress);
|
|
58
|
-
console.log(' Accounts:', instruction.accounts.length);
|
|
59
|
-
|
|
60
|
-
// Step 2: Send the instruction using the send utility
|
|
61
|
-
console.log('\nš¤ Sending job listing transaction...');
|
|
62
|
-
const signature = await client.solana.send(instruction);
|
|
63
|
-
console.log('ā
Transaction sent successfully!');
|
|
64
|
-
console.log(' Transaction Signature:', signature);
|
|
65
|
-
|
|
66
|
-
// You can view the transaction on Solana Explorer
|
|
67
|
-
const explorerUrl = `https://explorer.solana.com/tx/${signature}?cluster=${client.config.solana.cluster}`;
|
|
68
|
-
console.log(' View on Explorer:', explorerUrl);
|
|
69
|
-
|
|
70
|
-
console.log('\nš Job posted successfully!');
|
|
71
|
-
console.log('š” Your job is now listed on the Nosana network and waiting for nodes to pick it up.');
|
|
72
|
-
|
|
73
|
-
} catch (error) {
|
|
74
|
-
console.error('\nā Error posting job:', error);
|
|
75
|
-
process.exit(1);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Advanced example showing multiple instructions in one transaction
|
|
80
|
-
async function advancedExample() {
|
|
81
|
-
console.log('\n\nš¬ Advanced Example: Multiple Instructions');
|
|
82
|
-
console.log('==========================================\n');
|
|
83
|
-
|
|
84
|
-
try {
|
|
85
|
-
const client = new NosanaClient(NosanaNetwork.DEVNET);
|
|
86
|
-
const keypairPath = path.join(__dirname, 'example-keypair.json');
|
|
87
|
-
await client.setWallet(keypairPath);
|
|
88
|
-
|
|
89
|
-
const markets = await client.jobs.markets();
|
|
90
|
-
if (markets.length === 0) {
|
|
91
|
-
throw new Error('No markets available');
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Create multiple job instructions
|
|
95
|
-
const instructions = [];
|
|
96
|
-
|
|
97
|
-
for (let i = 0; i < 2; i++) {
|
|
98
|
-
const jobConfig = {
|
|
99
|
-
market: markets[0].address,
|
|
100
|
-
timeout: 3600,
|
|
101
|
-
ipfsHash: `QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx${i}N`, // Different IPFS hashes
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
console.log(`š§ Creating job ${i + 1} instruction...`);
|
|
105
|
-
const instruction = await client.jobs.post(jobConfig);
|
|
106
|
-
instructions.push(instruction);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Send all instructions in a single transaction
|
|
110
|
-
console.log('\nš¤ Sending batch transaction with multiple jobs...');
|
|
111
|
-
const signature = await client.solana.send(instructions);
|
|
112
|
-
console.log('ā
Batch transaction sent successfully!');
|
|
113
|
-
console.log(' Transaction Signature:', signature);
|
|
114
|
-
|
|
115
|
-
console.log('\nš Multiple jobs posted in a single transaction!');
|
|
116
|
-
|
|
117
|
-
} catch (error) {
|
|
118
|
-
console.error('\nā Error in advanced example:', error);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Example of error handling
|
|
123
|
-
async function errorHandlingExample() {
|
|
124
|
-
console.log('\n\nā ļø Error Handling Example');
|
|
125
|
-
console.log('==========================\n');
|
|
126
|
-
|
|
127
|
-
try {
|
|
128
|
-
const client = new NosanaClient(NosanaNetwork.DEVNET);
|
|
129
|
-
|
|
130
|
-
// Try to post without setting a wallet (this will fail)
|
|
131
|
-
console.log('š§ Attempting to post job without wallet...');
|
|
132
|
-
|
|
133
|
-
const jobConfig = {
|
|
134
|
-
market: 'InvalidMarketAddress' as any,
|
|
135
|
-
timeout: 3600,
|
|
136
|
-
ipfsHash: 'QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N',
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
await client.jobs.post(jobConfig);
|
|
140
|
-
|
|
141
|
-
} catch (error) {
|
|
142
|
-
console.log('ā
Caught expected error:', error.message);
|
|
143
|
-
console.log('š” Always ensure your wallet is set before posting jobs!');
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Run all examples
|
|
148
|
-
if (require.main === module) {
|
|
149
|
-
main()
|
|
150
|
-
.then(() => advancedExample())
|
|
151
|
-
.then(() => errorHandlingExample())
|
|
152
|
-
.then(() => {
|
|
153
|
-
console.log('\n⨠All examples completed!');
|
|
154
|
-
process.exit(0);
|
|
155
|
-
})
|
|
156
|
-
.catch((error) => {
|
|
157
|
-
console.error('Fatal error:', error);
|
|
158
|
-
process.exit(1);
|
|
159
|
-
});
|
|
160
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { address, NosanaClient, NosanaNetwork } from '@nosana/kit';
|
|
2
|
-
|
|
3
|
-
async function main() {
|
|
4
|
-
// Initialize the client with devnet for testing
|
|
5
|
-
const client = new NosanaClient(NosanaNetwork.DEVNET);
|
|
6
|
-
|
|
7
|
-
try {
|
|
8
|
-
// Example: Get job details
|
|
9
|
-
const jobAddress = 'FMbwxyhhAwXzixRqoSFhYzbx6RAQE4kgoTCdHXkNQ6AR'; // Replace with actual job address
|
|
10
|
-
const jobDetails = await client.jobs.get(address(jobAddress));
|
|
11
|
-
console.log('Job details:', jobDetails);
|
|
12
|
-
|
|
13
|
-
} catch (error) {
|
|
14
|
-
console.error('Error:', error);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
main();
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { NosanaClient, NosanaNetwork } from '@nosana/kit';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = path.dirname(__filename);
|
|
7
|
-
|
|
8
|
-
async function main() {
|
|
9
|
-
console.log('š Nosana Client setWallet Examples\n');
|
|
10
|
-
|
|
11
|
-
// Initialize the client
|
|
12
|
-
const client = new NosanaClient(NosanaNetwork.DEVNET);
|
|
13
|
-
|
|
14
|
-
// Example 1: Set wallet from file path
|
|
15
|
-
console.log('1. Setting wallet from file path...');
|
|
16
|
-
try {
|
|
17
|
-
const keypairPath = path.join(__dirname, 'example-keypair.json');
|
|
18
|
-
|
|
19
|
-
const wallet1 = await client.setWallet(keypairPath);
|
|
20
|
-
console.log('ā
Wallet set from file path successfully');
|
|
21
|
-
console.log(' Address:', wallet1?.address);
|
|
22
|
-
} catch (error) {
|
|
23
|
-
console.error('ā Error setting wallet from file:', error);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Example 2: Set wallet from JSON array string
|
|
27
|
-
console.log('\n2. Setting wallet from JSON array string...');
|
|
28
|
-
try {
|
|
29
|
-
const jsonArrayString = '[66,240,117,68,169,30,179,62,57,123,28,249,122,218,186,173,196,222,208,58,126,168,32,91,126,64,102,33,220,51,49,97,6,197,228,206,210,117,23,184,89,48,217,110,194,137,242,129,112,23,140,120,148,249,210,18,105,192,40,197,250,132,40,149]';
|
|
30
|
-
const wallet2 = await client.setWallet(jsonArrayString);
|
|
31
|
-
console.log('ā
Wallet set from JSON array string successfully');
|
|
32
|
-
console.log(' Address:', wallet2?.address);
|
|
33
|
-
} catch (error) {
|
|
34
|
-
console.error('ā Error setting wallet from JSON array string:', error);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Example 3: Set wallet from number array
|
|
38
|
-
console.log('\n3. Setting wallet from number array...');
|
|
39
|
-
try {
|
|
40
|
-
const numberArray = [66, 240, 117, 68, 169, 30, 179, 62, 57, 123, 28, 249, 122, 218, 186, 173, 196, 222, 208, 58, 126, 168, 32, 91, 126, 64, 102, 33, 220, 51, 49, 97, 6, 197, 228, 206, 210, 117, 23, 184, 89, 48, 217, 110, 194, 137, 242, 129, 112, 23, 140, 120, 148, 249, 210, 18, 105, 192, 40, 197, 250, 132, 40, 149];
|
|
41
|
-
const wallet3 = await client.setWallet(numberArray);
|
|
42
|
-
console.log('ā
Wallet set from number array successfully');
|
|
43
|
-
console.log(' Address:', wallet3?.address);
|
|
44
|
-
} catch (error) {
|
|
45
|
-
console.error('ā Error setting wallet from number array:', error);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Example 4: Set wallet from base58 string
|
|
49
|
-
console.log('\n4. Setting wallet from base58 string...');
|
|
50
|
-
try {
|
|
51
|
-
// This is the base58 encoded version of the same keypair
|
|
52
|
-
const base58String = '2Ld9Q8E9TxsSPf9Zkxn55u2EuuXBZUiV3XJf1duTnKmH1GgEfhW4tYoTRh5GKMWSd8j853YrtJMN74hixjLsnkRJ';
|
|
53
|
-
const wallet4 = await client.setWallet(base58String);
|
|
54
|
-
console.log('ā
Wallet set from base58 string successfully');
|
|
55
|
-
console.log(' Address:', wallet4?.address);
|
|
56
|
-
} catch (error) {
|
|
57
|
-
console.error('ā Error setting wallet from base58 string:', error);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Example 5: Set wallet from environment variable
|
|
61
|
-
console.log('\n5. Setting wallet from environment variable...');
|
|
62
|
-
try {
|
|
63
|
-
// Set an environment variable with the keypair
|
|
64
|
-
process.env.EXAMPLE_WALLET_KEY = '[66,240,117,68,169,30,179,62,57,123,28,249,122,218,186,173,196,222,208,58,126,168,32,91,126,64,102,33,220,51,49,97,6,197,228,206,210,117,23,184,89,48,217,110,194,137,242,129,112,23,140,120,148,249,210,18,105,192,40,197,250,132,40,149]';
|
|
65
|
-
|
|
66
|
-
const wallet5 = await client.setWallet('EXAMPLE_WALLET_KEY');
|
|
67
|
-
console.log('ā
Wallet set from environment variable successfully');
|
|
68
|
-
console.log(' Address:', wallet5?.address);
|
|
69
|
-
|
|
70
|
-
// Clean up
|
|
71
|
-
delete process.env.EXAMPLE_WALLET_KEY;
|
|
72
|
-
} catch (error) {
|
|
73
|
-
console.error('ā Error setting wallet from environment variable:', error);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Example 6: Demonstrate error handling
|
|
77
|
-
console.log('\n6. Demonstrating error handling...');
|
|
78
|
-
try {
|
|
79
|
-
await client.setWallet('invalid-wallet-data');
|
|
80
|
-
} catch (error) {
|
|
81
|
-
console.log('ā
Error handling works correctly:', error instanceof Error ? error.message : error);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
console.log('\nš All setWallet examples completed!');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
main().catch(console.error);
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Example: Using the StakeProgram to interact with staking accounts
|
|
3
|
-
*
|
|
4
|
-
* This example demonstrates how to use the StakeProgram to:
|
|
5
|
-
* 1. Get all stake accounts
|
|
6
|
-
* 2. Get stake accounts for a specific authority
|
|
7
|
-
* 3. Get a single stake account by address
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { NosanaClient, NosanaNetwork } from '@nosana/kit';
|
|
11
|
-
|
|
12
|
-
async function main() {
|
|
13
|
-
// Initialize the client
|
|
14
|
-
const client = new NosanaClient(NosanaNetwork.MAINNET);
|
|
15
|
-
|
|
16
|
-
console.log('=== Stake Program Example ===\n');
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
// Example 1: Get all stake accounts
|
|
20
|
-
console.log('1. Fetching all stake accounts...');
|
|
21
|
-
const allStakes = await client.stake.all();
|
|
22
|
-
console.log(` Found ${allStakes.length} stake accounts`);
|
|
23
|
-
|
|
24
|
-
if (allStakes.length > 0) {
|
|
25
|
-
const firstStake = allStakes[0];
|
|
26
|
-
console.log(' First stake account:');
|
|
27
|
-
console.log(` - Address: ${firstStake.address}`);
|
|
28
|
-
console.log(` - Authority: ${firstStake.authority}`);
|
|
29
|
-
console.log(` - Amount: ${firstStake.amount}`);
|
|
30
|
-
console.log(` - xNOS: ${firstStake.xnos}`);
|
|
31
|
-
console.log(` - Duration: ${firstStake.duration}`);
|
|
32
|
-
console.log(` - Time Unstake: ${firstStake.timeUnstake}`);
|
|
33
|
-
console.log(` - Vault: ${firstStake.vault}`);
|
|
34
|
-
console.log(` - Vault Bump: ${firstStake.vaultBump}`);
|
|
35
|
-
}
|
|
36
|
-
console.log();
|
|
37
|
-
|
|
38
|
-
// Example 2: Get a single stake account (if you know a stake account address)
|
|
39
|
-
if (allStakes.length > 0) {
|
|
40
|
-
console.log('2. Fetching single stake account...');
|
|
41
|
-
const stakeAddress = allStakes[0].address;
|
|
42
|
-
const stake = await client.stake.get(stakeAddress);
|
|
43
|
-
console.log(` Retrieved stake account: ${stake.address}`);
|
|
44
|
-
console.log(` - Authority: ${stake.authority}`);
|
|
45
|
-
console.log(` - Staked Amount: ${stake.amount}`);
|
|
46
|
-
console.log(` - xNOS Tokens: ${stake.xnos}`);
|
|
47
|
-
console.log();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Example 3: Get multiple stake accounts by address
|
|
51
|
-
if (allStakes.length >= 2) {
|
|
52
|
-
console.log('3. Fetching multiple stake accounts...');
|
|
53
|
-
const addresses = allStakes.slice(0, 2).map(s => s.address);
|
|
54
|
-
const stakes = await client.stake.multiple(addresses);
|
|
55
|
-
console.log(` Retrieved ${stakes.length} stake accounts`);
|
|
56
|
-
stakes.forEach((stake, i) => {
|
|
57
|
-
console.log(` Stake ${i + 1}:`);
|
|
58
|
-
console.log(` - Address: ${stake.address}`);
|
|
59
|
-
console.log(` - Authority: ${stake.authority}`);
|
|
60
|
-
console.log(` - Amount: ${stake.amount}`);
|
|
61
|
-
});
|
|
62
|
-
console.log();
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Example 4: Analyze staking distribution
|
|
66
|
-
console.log('4. Analyzing staking distribution...');
|
|
67
|
-
const totalStaked = allStakes.reduce((sum, stake) => sum + stake.amount, 0);
|
|
68
|
-
const averageStake = allStakes.length > 0 ? totalStaked / allStakes.length : 0;
|
|
69
|
-
const largestStake = allStakes.reduce((max, stake) =>
|
|
70
|
-
stake.amount > max ? stake.amount : max, 0
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
console.log(` Total staked: ${totalStaked}`);
|
|
74
|
-
console.log(` Average stake: ${averageStake.toFixed(2)}`);
|
|
75
|
-
console.log(` Largest stake: ${largestStake}`);
|
|
76
|
-
console.log(` Number of stakers: ${allStakes.length}`);
|
|
77
|
-
|
|
78
|
-
} catch (error) {
|
|
79
|
-
console.error('Error:', error);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
main();
|
|
84
|
-
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { createFromRoot } from 'codama';
|
|
2
|
-
import { rootNodeFromAnchor, AnchorIdl } from '@codama/nodes-from-anchor';
|
|
3
|
-
import { renderVisitor as renderJavaScriptVisitor } from '@codama/renderers-js';
|
|
4
|
-
import anchorJobsIdl from '../../spl/target/idl/nosana_jobs.json';
|
|
5
|
-
import anchorStakingIdl from '../../spl/target/idl/nosana_staking.json';
|
|
6
|
-
import merkleDistributorIdl from '../src/idl/merkle_distributor.json';
|
|
7
|
-
import path from 'path';
|
|
8
|
-
import { fileURLToPath } from 'url';
|
|
9
|
-
|
|
10
|
-
// Get __dirname equivalent in ES modules
|
|
11
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
-
|
|
13
|
-
const codamaJobs = createFromRoot(rootNodeFromAnchor(anchorJobsIdl as AnchorIdl));
|
|
14
|
-
|
|
15
|
-
codamaJobs.accept(
|
|
16
|
-
renderJavaScriptVisitor(path.join(__dirname, '..', 'src', 'generated_clients', 'jobs'))
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
const codamaStaking = createFromRoot(rootNodeFromAnchor(anchorStakingIdl as AnchorIdl));
|
|
20
|
-
|
|
21
|
-
codamaStaking.accept(
|
|
22
|
-
renderJavaScriptVisitor(path.join(__dirname, '..', 'src', 'generated_clients', 'staking'))
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
const codamaMerkleDistributor = createFromRoot(
|
|
26
|
-
rootNodeFromAnchor(merkleDistributorIdl as AnchorIdl)
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
codamaMerkleDistributor.accept(
|
|
30
|
-
renderJavaScriptVisitor(
|
|
31
|
-
path.join(__dirname, '..', 'src', 'generated_clients', 'merkle_distributor')
|
|
32
|
-
)
|
|
33
|
-
);
|
package/vitest.config.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
environment: 'node',
|
|
6
|
-
globals: true,
|
|
7
|
-
include: ['tests/**/*.test.ts'],
|
|
8
|
-
coverage: {
|
|
9
|
-
provider: 'v8',
|
|
10
|
-
reporter: ['text', 'json', 'html'],
|
|
11
|
-
include: ['src/**/*.ts'],
|
|
12
|
-
exclude: [
|
|
13
|
-
'node_modules/',
|
|
14
|
-
'dist/',
|
|
15
|
-
'tests/',
|
|
16
|
-
'scripts/',
|
|
17
|
-
'examples/',
|
|
18
|
-
'**/*.d.ts',
|
|
19
|
-
'**/*.config.*',
|
|
20
|
-
'**/generated_clients/**',
|
|
21
|
-
'**/.nuxt/**',
|
|
22
|
-
],
|
|
23
|
-
thresholds: {
|
|
24
|
-
lines: 70,
|
|
25
|
-
functions: 70,
|
|
26
|
-
branches: 60,
|
|
27
|
-
statements: 70,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
});
|