@zebec-network/zebec-vault-sdk 5.0.2 → 5.0.4

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/README.md CHANGED
@@ -1,219 +1,562 @@
1
- # Zebec Vault Sdk
1
+ # Zebec Vault SDK
2
+
3
+ A TypeScript SDK for interacting with Zebec Vault on Solana, enabling secure multi operations, token streaming, staking, and virtual card management.
4
+
5
+ ## Features
6
+
7
+ - **Vault Management**: Create and manage secure vaults with proposal-based execution
8
+ - **Token Operations**: Deposit and withdraw SOL and SPL tokens
9
+ - **Streaming Payments**: Create, manage, and cancel payment streams
10
+ - **Staking**: Stake tokens with customizable lock periods
11
+ - **Virtual Cards**: Create and load Zebec cards with automatic token swapping
12
+ - **Multi-Signature Support**: Execute operations through proposals with multiple signers
13
+ - **Jupiter Integration**: Built-in token swapping for card operations
2
14
 
3
15
  ## Installation
4
16
 
5
17
  ```bash
6
- yarn add @zebec-network/zebec-vault-sdk
18
+ npm install @zebec-network/zebec-vault-sdk
7
19
  ```
8
20
 
9
21
  ```bash
10
- npm install @zebec-network/zebec-vault-sdk
22
+ yarn add @zebec-network/zebec-vault-sdk
11
23
  ```
12
24
 
13
- ## Dependency Map
25
+ ## Quick Start
14
26
 
15
- ![Vault SDK Dependency Map](./assets/VaultSDKDependencyMap.png)
27
+ ### Setup
16
28
 
17
- ## Development
29
+ ```typescript
30
+ import { Connection, Keypair } from "@solana/web3.js";
31
+ import { createAnchorProvider, ZebecVaultService } from "@zebec-network/zebec-vault-sdk";
18
32
 
19
- To build the package
33
+ // Create connection
34
+ const connection = new Connection("https://api.mainnet-beta.solana.com"); // use private dedicatd rpc for production
20
35
 
21
- ```bash
22
- yarn build
36
+ // Create wallet adapter
37
+ // for frontend application you can use wallet provided by the wallet provider
38
+ const wallet = useAnchorWallet();
39
+ // for server side app you can use Wallet class provided by @coral-xyz/anchor
40
+ const wallet = new Wallet(keypair); // create keypair from secret key
41
+
42
+ // Create provider
43
+ const provider = createAnchorProvider(connection, wallet);
44
+
45
+ // Initialize service
46
+ const vaultService = ZebecVaultService.create(provider, "mainnet-beta");
23
47
  ```
24
48
 
25
- To run specific test filess
49
+ ## Core Features
26
50
 
27
- ```bash
28
- yarn test <test file path> -f "<regex for test name>"
29
- // example:
30
- // yarn test ./test/<filename>.test.ts
51
+ ### 1. Vault Operations
52
+
53
+ #### Create a Vault
54
+
55
+ ```typescript
56
+ const payload = await vaultService.createVault({
57
+ payer: wallet.publicKey, // optional if using AnchorProvider
58
+ });
59
+
60
+ const signature = await payload.execute();
61
+ console.log("Vault created:", signature);
31
62
  ```
32
63
 
33
- ## publish
64
+ #### Deposit SOL
34
65
 
35
- Build package and bump package version to specific need and publish
66
+ ```typescript
67
+ const payload = await vaultService.depositSol({
68
+ depositor: wallet.publicKey,
69
+ amount: 1.5, // SOL amount
70
+ });
36
71
 
37
- ```bash
38
- npm publish --access public
72
+ await payload.execute();
39
73
  ```
40
74
 
41
- ## Usage
75
+ #### Deposit SPL Tokens
42
76
 
43
- ### Create Vault Instance
77
+ ```typescript
78
+ const payload = await vaultService.deposit({
79
+ depositor: wallet.publicKey,
80
+ tokenMint: "TOKEN_MINT_ADDRESS",
81
+ amount: 100, // token amount
82
+ });
44
83
 
45
- ```ts
46
- const network = "devnet";
47
- const wallet = <Anchor wallet>;
48
- const connection = <Connection Instance>;
49
- const provider = createAnchorProvider(connection, wallet);
50
- const service = await ZebecVaultService.create(provider, network);
84
+ await payload.execute();
85
+
86
+ // Note: if WSOL address is given in tokenMint, it will wrap SOL to WSOL and deposit.
51
87
  ```
52
88
 
53
- ### Create Vault
89
+ #### Withdraw SOL
54
90
 
55
- ```ts
56
- const vaultKeypair = Keypair.generate();
57
- console.log("Vault Keypair:", vaultKeypair.publicKey.toBase58());
58
- const payload = await service.createVault({
59
- vaultKeypair,
91
+ ```typescript
92
+ const payload = await vaultService.withdrawSol({
93
+ withdrawer: wallet.publicKey,
94
+ amount: 0.5,
60
95
  });
61
96
 
62
- const signature = await payload.execute({ commitment: "finalized" });
63
- console.log("Signature:", signature);
97
+ await payload.execute();
64
98
  ```
65
99
 
66
- ### Get Vault Info of User
100
+ #### Withdraw SPL Tokens
101
+
102
+ ```typescript
103
+ const payload = await vaultService.withdraw({
104
+ withdrawer: wallet.publicKey,
105
+ tokenMint: "TOKEN_MINT_ADDRESS",
106
+ amount: 50,
107
+ });
67
108
 
68
- ```ts
69
- const vaultsInfo = await service.getVaultsInfoOfUser(wallet.publicKey);
70
- console.log("vaults info:", JSON.stringify(vaultsInfo, null, 2));
71
- const vault = vaultsInfo[0].vault;
109
+ await payload.execute();
110
+
111
+ // Note: if WSOL is address in given in tokenMint, it will with withdraw WSOL and unwrap into withdrawer wallet.
72
112
  ```
73
113
 
74
- ### Deposit Sol
114
+ ### 2. Proposal System
115
+
116
+ #### Create a Proposal
75
117
 
76
- ```ts
77
- const vault = <vault public key>;
78
- const amount = 2;
79
- const payload = await service.depositSol({ amount, vault });
80
- const signature = await payload.execute({ commitment: "finalized" });
118
+ ```typescript
119
+ import { SystemProgram } from "@solana/web3.js";
120
+
121
+ // Create custom instructions
122
+ const instruction = SystemProgram.transfer({
123
+ fromPubkey: vaultSigner,
124
+ toPubkey: recipient,
125
+ lamports: 1000000,
126
+ });
127
+
128
+ const payload = await vaultService.createProposal({
129
+ proposer: wallet.publicKey,
130
+ name: "Transfer SOL",
131
+ actions: [instruction],
132
+ });
133
+
134
+ await payload.execute();
81
135
  ```
82
136
 
83
- ### Withdraw Sol
137
+ #### Execute a Proposal
138
+
139
+ ```typescript
140
+ const payload = await vaultService.executeProposal({
141
+ caller: wallet.publicKey,
142
+ proposal: proposalAddress,
143
+ addressLookupTables: [lookupTableAddress], // optional
144
+ });
84
145
 
85
- ```ts
86
- const vault = <vault public key>;
87
- const amount = 0.01;
88
- const payload = await service.withdrawSol({ amount, vault });
89
- const signature = await payload.execute({ commitment: "finalized" });
146
+ await payload.execute();
90
147
  ```
91
148
 
92
- ### Deposit Token
149
+ #### Execute Proposal Directly (Single Transaction)
93
150
 
94
- ```ts
95
- const tokenMint = "De31sBPcDejCVpZZh1fq8SNs7AcuWcBKuU3k2jqnkmKc";
96
- const vault = <vault public key>;
97
- const amount = 1000
98
- const payload = await service.depositToken({ amount, vault, tokenMint });
99
- const signature = await payload.execute({ commitment: "finalized" });
151
+ ```typescript
152
+ const payload = await vaultService.executeProposalDirect({
153
+ proposer: wallet.publicKey,
154
+ actions: [instruction1, instruction2],
155
+ addressLookupTables: [lookupTableAddress],
156
+ });
157
+
158
+ await payload.execute();
100
159
  ```
101
160
 
102
- ### Withdraw Token
161
+ ### 3. Payment Streaming
162
+
163
+ #### Create a Stream
164
+
165
+ ```typescript
166
+ const payload = await vaultService.createStreamFromVault({
167
+ vaultOwner: wallet.publicKey,
168
+ receiver: recipientAddress,
169
+ streamToken: tokenMintAddress,
170
+ amount: 1000, // total amount
171
+ duration: 2592000, // 30 days in seconds
172
+ startNow: true,
173
+ startTime: Math.floor(Date.now() / 1000),
174
+ automaticWithdrawal: false,
175
+ cancelableByRecipient: true,
176
+ cancelableBySender: true,
177
+ isPausable: true,
178
+ transferableByRecipient: false,
179
+ transferableBySender: false,
180
+ canTopup: true,
181
+ rateUpdatable: false,
182
+ cliffPercentage: 0, // 0-100
183
+ autoWithdrawFrequency: 86400, // 1 day
184
+ streamName: "Monthly Payment",
185
+ });
103
186
 
104
- ```ts
105
- const vault = <vault public key>;
106
- const tokenMint = "De31sBPcDejCVpZZh1fq8SNs7AcuWcBKuU3k2jqnkmKc";
107
- const amount = 1;
108
- const payload = await service.withdrawToken({ amount, vault, tokenMint });
109
- const signature = await payload.execute({ commitment: "finalized" });
187
+ await payload.execute();
110
188
  ```
111
189
 
112
- ### Execute Proposal Direct
190
+ #### Create Multiple Streams
191
+
192
+ ```typescript
193
+ const payload = await vaultService.createMultipleStreamFromVault({
194
+ vaultOwner: wallet.publicKey,
195
+ streamInfo: [
196
+ {
197
+ receiver: recipient1,
198
+ streamToken: tokenMint,
199
+ amount: 500,
200
+ duration: 2592000,
201
+ // ... other stream parameters
202
+ },
203
+ {
204
+ receiver: recipient2,
205
+ streamToken: tokenMint,
206
+ amount: 1000,
207
+ duration: 2592000,
208
+ // ... other stream parameters
209
+ },
210
+ ],
211
+ });
212
+
213
+ // Execute all streams in multiple transactions
214
+ await payload.executeAll();
215
+ ```
113
216
 
114
- ```ts
115
- const proposer = <wallet public key>;
116
- const vault = <vault public key>;
217
+ #### Pause/Resume a Stream
117
218
 
118
- const memoInstruction = new TransactionInstruction({
119
- keys: [],
120
- programId: MEMO_PROGRAM_ID,
121
- data: Buffer.from("This is test memo", "utf8"),
219
+ ```typescript
220
+ const payload = await vaultService.pauseResumeStream({
221
+ vaultOwner: wallet.publicKey,
222
+ streamMetadata: streamAddress,
122
223
  });
123
- const actions = [memoInstruction];
124
224
 
125
- const payload = await service.executeProposalDirect({
126
- actions,
127
- proposer,
128
- vault,
225
+ await payload.execute();
226
+ ```
227
+
228
+ #### Cancel a Stream
229
+
230
+ ```typescript
231
+ const payload = await vaultService.cancelStream({
232
+ vaultOwner: wallet.publicKey,
233
+ streamMetadata: streamAddress,
129
234
  });
130
235
 
131
- const signature = await payload.execute({ commitment: "finalized" });
132
- console.log("Execute Proposal Direct Signature:", signature);
236
+ await payload.execute();
133
237
  ```
134
238
 
135
- ### Create Proposal
239
+ #### Withdraw from Stream
136
240
 
137
- ```ts
138
- const proposer = <wallet public key>;
139
- const receiver = <wallet public Key>;
140
- const vault = <vault public key>;
241
+ ```typescript
242
+ const payload = await vaultService.withdrawStream({
243
+ vaultOwner: wallet.publicKey,
244
+ streamMetadata: streamAddress,
245
+ });
141
246
 
142
- const [vaultSigner] = deriveVaultSigner(vault, service.programId);
143
- const name = "Transfer Funds";
144
- const ix = SystemProgram.transfer({
145
- fromPubkey: vaultSigner,
146
- toPubkey: receiver,
147
- lamports: Number(parseSol(1)),
247
+ await payload.execute();
248
+ ```
249
+
250
+ #### Change Stream Receiver
251
+
252
+ ```typescript
253
+ const payload = await vaultService.changeStreamReceiver({
254
+ vaultOwner: wallet.publicKey,
255
+ streamMetadata: streamAddress,
256
+ newRecipient: newRecipientAddress,
257
+ });
258
+
259
+ await payload.execute();
260
+ ```
261
+
262
+ #### Get Stream Information
263
+
264
+ ```typescript
265
+ const streamInfo = await vaultService.getStreamMetadataInfo(streamAddress);
266
+
267
+ console.log("Stream details:", {
268
+ sender: streamInfo.parties.sender,
269
+ receiver: streamInfo.parties.receiver,
270
+ token: streamInfo.financials.streamToken,
271
+ deposited: streamInfo.financials.depositedAmount,
272
+ withdrawn: streamInfo.financials.withdrawnAmount,
273
+ startTime: new Date(streamInfo.schedule.startTime * 1000),
274
+ endTime: new Date(streamInfo.schedule.endTime * 1000),
275
+ isPaused: streamInfo.schedule.pausedTimestamp > 0,
276
+ });
277
+ ```
278
+
279
+ ### 4. Staking
280
+
281
+ #### Stake Tokens
282
+
283
+ ```typescript
284
+ const payload = await vaultService.stake({
285
+ lockupName: "main-lockup",
286
+ vaultOwner: wallet.publicKey,
287
+ amount: 1000,
288
+ lockPeriod: 7776000, // 90 days in seconds
289
+ nonce: 0n,
148
290
  });
149
- const actions = [ix];
150
- const proposalKeypair = Keypair.generate();
151
291
 
152
- const createProposalPayload = await service.createProposal({
153
- actions,
154
- name,
155
- proposer,
156
- vault,
157
- proposalKeypair,
292
+ await payload.execute();
293
+ ```
294
+
295
+ #### Unstake Tokens
296
+
297
+ ```typescript
298
+ const payload = await vaultService.unstake({
299
+ lockupName: "main-lockup",
300
+ vaultOwner: wallet.publicKey,
301
+ nonce: 0n,
158
302
  });
159
303
 
160
- const signature = await createProposalPayload.execute({ commitment: "finalized" });
304
+ await payload.execute();
305
+ ```
306
+
307
+ #### Get Stake Nonce Information
308
+
309
+ ```typescript
310
+ const nonceInfo = await vaultService.getStakeUserNonceInfo("main-lockup", wallet.publicKey);
311
+
312
+ console.log("Current nonce:", nonceInfo?.nonce);
161
313
  ```
162
314
 
163
- ### Append Actions
315
+ ### 5. Virtual Cards
316
+
317
+ #### Create a Silver Card
164
318
 
165
- ```ts
166
- const proposal = <proposal public key>;
319
+ ```typescript
320
+ const nextIndex = await vaultService.getNextCardIndex();
167
321
 
168
- const ixB = new TransactionInstruction({
169
- keys: [],
170
- programId: MEMO_PROGRAM_ID,
171
- data: Buffer.from("This is test memo", "utf8"),
322
+ const payload = await vaultService.createSilverCard({
323
+ vaultOwnerAddress: wallet.publicKey,
324
+ nextCardIndex: nextIndex,
325
+ amount: 100, // USDC amount
326
+ usdcAddress: USDC_MINT_ADDRESS,
327
+ emailHash: Buffer.from("your-32-byte-hash"),
328
+ currency: "USD",
172
329
  });
173
- const actionsB = [ixB];
174
330
 
175
- const appendActionsPayload = await service.appendActions({
176
- actions: actionsB,
177
- proposal,
331
+ await payload.execute();
332
+ ```
333
+
334
+ #### Load a Carbon Card
335
+
336
+ ```typescript
337
+ const nextIndex = await vaultService.getNextCardIndex();
338
+
339
+ const payload = await vaultService.loadCarbonCard({
340
+ vaultOwnerAddress: wallet.publicKey,
341
+ nextCardIndex: nextIndex,
342
+ amount: 50,
343
+ usdcAddress: USDC_MINT_ADDRESS,
344
+ emailHash: Buffer.from("your-32-byte-hash"),
345
+ currency: "USD",
346
+ reloadCardId: "CARD_ID",
178
347
  });
179
348
 
180
- const appendActionsSignature = await appendActionsPayload.execute({ commitment: "confirmed" });
349
+ await payload.execute();
181
350
  ```
182
351
 
183
- ### Execute Proposal
352
+ #### Swap and Create Silver Card
353
+
354
+ ```typescript
355
+ // First, get a Jupiter quote
356
+ const quoteResponse = await fetch(
357
+ `https://quote-api.jup.ag/v6/quote?inputMint=${inputMint}&outputMint=${USDC}&amount=${amount}&slippageBps=50`,
358
+ );
359
+ const quoteInfo = await quoteResponse.json();
360
+
361
+ const payload = await vaultService.swapAndCreateSilverCard({
362
+ vaultOwnerAddress: wallet.publicKey,
363
+ quoteInfo: quoteInfo,
364
+ nextCardCounter: nextIndex,
365
+ emailHash: Buffer.from("your-32-byte-hash"),
366
+ currency: "USD",
367
+ wrapAndUnwrapSol: true, // if swapping SOL
368
+ });
369
+
370
+ await payload.execute();
371
+ ```
184
372
 
185
- ```ts
186
- const proposal = <proposal public key>;
187
- const payload = await service.executeProposal({
188
- proposal,
373
+ #### Swap and Load Carbon Card
374
+
375
+ ```typescript
376
+ const payload = await vaultService.swapAndLoadCarbonCard({
377
+ vaultOwnerAddress: wallet.publicKey,
378
+ quoteInfo: quoteInfo,
379
+ nextCardCounter: nextIndex,
380
+ emailHash: Buffer.from("your-32-byte-hash"),
381
+ currency: "USD",
382
+ reloadCardId: "CARD_ID",
383
+ wrapAndUnwrapSol: true,
189
384
  });
190
385
 
191
- const signature = await payload.execute({ commitment: "confirmed" });
192
- console.log("Execute Proposal Signature:", signature);
386
+ await payload.execute();
193
387
  ```
194
388
 
195
- ### Delete Proposal
389
+ #### Get Card Custom Token Fees
196
390
 
197
- ```ts
198
- const proposal = <proposal public key>;
391
+ ```typescript
392
+ const tokenFees = await vaultService.getCardCustomTokenFees();
199
393
 
200
- const deleteProposalPayload = await service.deleteProposal({ proposal });
201
- const deleteProposalSignature = await deleteProposalPayload.execute({
202
- commitment: "confirmed",
394
+ tokenFees.forEach((fee) => {
395
+ console.log(`Token: ${fee.tokenAddress}, Fee: ${fee.fee}%`);
203
396
  });
204
- console.log("Delete Proposal Signature:", deleteProposalSignature);
205
397
  ```
206
398
 
207
- ### Get Proposals Info of a Vault
399
+ ## Query Functions
208
400
 
209
- ```ts
210
- const vault = <vault public key>;
401
+ ### Get Vault Information
211
402
 
212
- const proposalsInfo = await service.getProposalsInfoOfVault(vault);
403
+ ```typescript
404
+ // Get specific user's vault
405
+ const vaultInfo = await vaultService.getVaultInfoOfUser(userAddress);
406
+
407
+ if (vaultInfo) {
408
+ console.log("Vault:", vaultInfo.vault.toString());
409
+ console.log("Owner:", vaultInfo.owner.toString());
410
+ console.log("Created:", new Date(vaultInfo.createdDate * 1000));
411
+ }
412
+
413
+ // Get all vaults
414
+ const allVaults = await vaultService.getAllVaultsInfo();
415
+ console.log(`Total vaults: ${allVaults.length}`);
416
+ ```
417
+
418
+ ### Get Proposals
419
+
420
+ ```typescript
421
+ const proposals = await vaultService.getProposalsInfoOfVault(vaultAddress);
422
+
423
+ proposals.forEach((proposal) => {
424
+ console.log("Proposal:", proposal.name);
425
+ console.log("Status:", proposal.proposalStage);
426
+ console.log("Actions:", proposal.actions.length);
427
+ console.log("Executed:", proposal.isExecuted);
428
+ });
213
429
  ```
214
430
 
215
- ### Get All Vaults Info
431
+ ## Readonly Provider
216
432
 
217
- ```ts
218
- const vaultsInfo = await service.getAllVaultsInfo();
433
+ For read-only operations without a wallet:
434
+
435
+ ```typescript
436
+ import { createReadonlyProvider } from "@zebec-network/zebec-vault-sdk";
437
+
438
+ const readonlyProvider = createReadonlyProvider(connection, optionalWalletAddress);
439
+
440
+ const service = ZebecVaultService.create(readonlyProvider, "mainnet-beta");
441
+
442
+ // Can only call query methods
443
+ const vaultInfo = await service.getVaultInfoOfUser(someAddress);
219
444
  ```
445
+
446
+ ## Error Handling
447
+
448
+ The SDK provides custom error types:
449
+
450
+ ```typescript
451
+ import {
452
+ AmountOutOfRangeError,
453
+ DailyCardLimitReachedError,
454
+ NotEnoughBalanceError,
455
+ AssociatedTokenAccountDoesNotExistsError,
456
+ } from "@zebec-network/zebec-vault-sdk";
457
+
458
+ try {
459
+ await payload.execute();
460
+ } catch (error) {
461
+ if (error instanceof AmountOutOfRangeError) {
462
+ console.error("Amount must be between", error.minRange, "and", error.maxRange);
463
+ } else if (error instanceof DailyCardLimitReachedError) {
464
+ console.error("Daily limit:", error.dailyCardLimit);
465
+ } else if (error instanceof NotEnoughBalanceError) {
466
+ console.error("Insufficient balance");
467
+ }
468
+ }
469
+ ```
470
+
471
+ ## Advanced Features
472
+
473
+ ### Program Derived Addresses (PDAs)
474
+
475
+ ```typescript
476
+ import {
477
+ deriveUserVault,
478
+ deriveVaultSigner,
479
+ deriveStreamConfigPda,
480
+ deriveCardConfigPda,
481
+ deriveLockupAddress,
482
+ } from "@zebec-network/zebec-vault-sdk";
483
+
484
+ const [vaultAddress, vaultBump] = deriveUserVault(userAddress, vaultProgramId);
485
+
486
+ const [signerAddress, signerBump] = deriveVaultSigner(vaultAddress, vaultProgramId);
487
+ ```
488
+
489
+ ### Transaction Utilities
490
+
491
+ ```typescript
492
+ import { calculateProposalSize, transactionInstructionToProposalAction } from "@zebec-network/zebec-vault-sdk";
493
+
494
+ // Calculate proposal size
495
+ const size = calculateProposalSize("proposal-name", actions);
496
+
497
+ // Convert instruction to proposal action
498
+ const action = transactionInstructionToProposalAction(instruction);
499
+ ```
500
+
501
+ ## Network Configuration
502
+
503
+ ```typescript
504
+ // Mainnet
505
+ const mainnetService = ZebecVaultService.create(provider, "mainnet-beta");
506
+
507
+ // Devnet
508
+ const devnetService = ZebecVaultService.create(provider, "devnet");
509
+ ```
510
+
511
+ ## Constants
512
+
513
+ ```typescript
514
+ import {
515
+ ZEBEC_VAULT_PROGRAM_ID,
516
+ JUPITER_AGGREGATOR_PROGRAM_ID,
517
+ CARD_LOOKUP_TABLE_ADDRESS,
518
+ STAKE_LOOKUP_TABLE_ADDRESS,
519
+ } from "@zebec-network/zebec-vault-sdk";
520
+
521
+ console.log("Vault Program:", ZEBEC_VAULT_PROGRAM_ID["mainnet-beta"]);
522
+ ```
523
+
524
+ ## Types
525
+
526
+ The SDK exports comprehensive TypeScript types:
527
+
528
+ ```typescript
529
+ import type {
530
+ VaultInfo,
531
+ ProposalInfo,
532
+ ProposalAction,
533
+ CreateStreamFromVaultParams,
534
+ StreamMetadataInfo,
535
+ TokenFeeRecord,
536
+ QuoteInfo,
537
+ StakeUserNonceInfo,
538
+ } from "@zebec-network/zebec-vault-sdk";
539
+ ```
540
+
541
+ ## Best Practices
542
+
543
+ 1. **Always check balances** before operations
544
+ 2. **Use proposals** for critical operations requiring multiple approvals
545
+ 3. **Handle errors** appropriately with the provided error types
546
+ 4. **Verify stream parameters** before creation (duration, amounts, permissions)
547
+ 5. **Test on devnet** before deploying to mainnet
548
+ 6. **Use address lookup tables** for complex transactions to reduce size
549
+
550
+ ## Support
551
+
552
+ - **Documentation**: [Zebec Network Docs](https://docs.zebec.io)
553
+ - **GitHub**: [zebec-network](https://github.com/zebec-network)
554
+ - **Discord**: [Join our community](https://discord.gg/zebec)
555
+
556
+ ## License
557
+
558
+ MIT
559
+
560
+ ## Contributing
561
+
562
+ Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
package/dist/constants.js CHANGED
@@ -9,7 +9,7 @@ exports.ZEBEC_VAULT_PROGRAM_ID = {
9
9
  exports.TEN_BIGNUM = (0, bignumber_js_1.BigNumber)(10);
10
10
  exports.JUPITER_AGGREGATOR_PROGRAM_ID = "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4";
11
11
  exports.CARD_LOOKUP_TABLE_ADDRESS = {
12
- "mainnet-beta": "CgPARkLEbygMJ8C9Z1u6MP57gvdnUERCxdhmR9bTFUSJ",
12
+ "mainnet-beta": "9BSK7XgPgAZJK6BEdiFDV8WKGye31uffvGjhQ1Zxob7F",
13
13
  devnet: "CgPARkLEbygMJ8C9Z1u6MP57gvdnUERCxdhmR9bTFUSJ",
14
14
  };
15
15
  exports.JUPITER_SWAP_API = "https://lite-api.jup.ag/swap/v1/swap";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zebec-network/zebec-vault-sdk",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "An SDK for zebec vault solana program",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  "@solana/web3.js": "^1.98.2",
42
42
  "@types/bn.js": "^5.2.0",
43
43
  "@zebec-network/core-utils": "^1.1.1",
44
- "@zebec-network/solana-common": "^2.3.0",
44
+ "@zebec-network/solana-common": "^2.3.1",
45
45
  "bignumber.js": "^9.3.1",
46
46
  "buffer": "^6.0.3"
47
47
  }