@zebec-network/zebec-vault-sdk 5.0.1 → 5.0.3

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,577 @@
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
+ });
108
+
109
+ await payload.execute();
67
110
 
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;
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
117
+
118
+ ```typescript
119
+ import { SystemProgram } from '@solana/web3.js';
75
120
 
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" });
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();
135
+ ```
136
+
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
+ });
145
+
146
+ await payload.execute();
147
+ ```
148
+
149
+ #### Execute Proposal Directly (Single Transaction)
150
+
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();
81
159
  ```
82
160
 
83
- ### Withdraw Sol
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
+ });
84
186
 
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" });
187
+ await payload.execute();
90
188
  ```
91
189
 
92
- ### Deposit Token
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
+ });
93
212
 
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" });
213
+ // Execute all streams in multiple transactions
214
+ await payload.executeAll();
100
215
  ```
101
216
 
102
- ### Withdraw Token
217
+ #### Pause/Resume a Stream
218
+
219
+ ```typescript
220
+ const payload = await vaultService.pauseResumeStream({
221
+ vaultOwner: wallet.publicKey,
222
+ streamMetadata: streamAddress
223
+ });
103
224
 
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" });
225
+ await payload.execute();
110
226
  ```
111
227
 
112
- ### Execute Proposal Direct
228
+ #### Cancel a Stream
229
+
230
+ ```typescript
231
+ const payload = await vaultService.cancelStream({
232
+ vaultOwner: wallet.publicKey,
233
+ streamMetadata: streamAddress
234
+ });
113
235
 
114
- ```ts
115
- const proposer = <wallet public key>;
116
- const vault = <vault public key>;
236
+ await payload.execute();
237
+ ```
117
238
 
118
- const memoInstruction = new TransactionInstruction({
119
- keys: [],
120
- programId: MEMO_PROGRAM_ID,
121
- data: Buffer.from("This is test memo", "utf8"),
239
+ #### Withdraw from Stream
240
+
241
+ ```typescript
242
+ const payload = await vaultService.withdrawStream({
243
+ vaultOwner: wallet.publicKey,
244
+ streamMetadata: streamAddress
122
245
  });
123
- const actions = [memoInstruction];
124
246
 
125
- const payload = await service.executeProposalDirect({
126
- actions,
127
- proposer,
128
- vault,
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
129
257
  });
130
258
 
131
- const signature = await payload.execute({ commitment: "finalized" });
132
- console.log("Execute Proposal Direct Signature:", signature);
259
+ await payload.execute();
133
260
  ```
134
261
 
135
- ### Create Proposal
262
+ #### Get Stream Information
136
263
 
137
- ```ts
138
- const proposer = <wallet public key>;
139
- const receiver = <wallet public Key>;
140
- const vault = <vault public key>;
264
+ ```typescript
265
+ const streamInfo = await vaultService.getStreamMetadataInfo(streamAddress);
141
266
 
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)),
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
148
276
  });
149
- const actions = [ix];
150
- const proposalKeypair = Keypair.generate();
277
+ ```
278
+
279
+ ### 4. Staking
280
+
281
+ #### Stake Tokens
151
282
 
152
- const createProposalPayload = await service.createProposal({
153
- actions,
154
- name,
155
- proposer,
156
- vault,
157
- proposalKeypair,
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
158
290
  });
159
291
 
160
- const signature = await createProposalPayload.execute({ commitment: "finalized" });
292
+ await payload.execute();
161
293
  ```
162
294
 
163
- ### Append Actions
295
+ #### Unstake Tokens
164
296
 
165
- ```ts
166
- const proposal = <proposal public key>;
297
+ ```typescript
298
+ const payload = await vaultService.unstake({
299
+ lockupName: 'main-lockup',
300
+ vaultOwner: wallet.publicKey,
301
+ nonce: 0n
302
+ });
303
+
304
+ await payload.execute();
305
+ ```
167
306
 
168
- const ixB = new TransactionInstruction({
169
- keys: [],
170
- programId: MEMO_PROGRAM_ID,
171
- data: Buffer.from("This is test memo", "utf8"),
307
+ #### Get Stake Nonce Information
308
+
309
+ ```typescript
310
+ const nonceInfo = await vaultService.getStakeUserNonceInfo(
311
+ 'main-lockup',
312
+ wallet.publicKey
313
+ );
314
+
315
+ console.log('Current nonce:', nonceInfo?.nonce);
316
+ ```
317
+
318
+ ### 5. Virtual Cards
319
+
320
+ #### Create a Silver Card
321
+
322
+ ```typescript
323
+ const nextIndex = await vaultService.getNextCardIndex();
324
+
325
+ const payload = await vaultService.createSilverCard({
326
+ vaultOwnerAddress: wallet.publicKey,
327
+ nextCardIndex: nextIndex,
328
+ amount: 100, // USDC amount
329
+ usdcAddress: USDC_MINT_ADDRESS,
330
+ emailHash: Buffer.from('your-32-byte-hash'),
331
+ currency: 'USD'
332
+ });
333
+
334
+ await payload.execute();
335
+ ```
336
+
337
+ #### Load a Carbon Card
338
+
339
+ ```typescript
340
+ const nextIndex = await vaultService.getNextCardIndex();
341
+
342
+ const payload = await vaultService.loadCarbonCard({
343
+ vaultOwnerAddress: wallet.publicKey,
344
+ nextCardIndex: nextIndex,
345
+ amount: 50,
346
+ usdcAddress: USDC_MINT_ADDRESS,
347
+ emailHash: Buffer.from('your-32-byte-hash'),
348
+ currency: 'USD',
349
+ reloadCardId: 'CARD_ID'
350
+ });
351
+
352
+ await payload.execute();
353
+ ```
354
+
355
+ #### Swap and Create Silver Card
356
+
357
+ ```typescript
358
+ // First, get a Jupiter quote
359
+ const quoteResponse = await fetch(
360
+ `https://quote-api.jup.ag/v6/quote?inputMint=${inputMint}&outputMint=${USDC}&amount=${amount}&slippageBps=50`
361
+ );
362
+ const quoteInfo = await quoteResponse.json();
363
+
364
+ const payload = await vaultService.swapAndCreateSilverCard({
365
+ vaultOwnerAddress: wallet.publicKey,
366
+ quoteInfo: quoteInfo,
367
+ nextCardCounter: nextIndex,
368
+ emailHash: Buffer.from('your-32-byte-hash'),
369
+ currency: 'USD',
370
+ wrapAndUnwrapSol: true // if swapping SOL
172
371
  });
173
- const actionsB = [ixB];
174
372
 
175
- const appendActionsPayload = await service.appendActions({
176
- actions: actionsB,
177
- proposal,
373
+ await payload.execute();
374
+ ```
375
+
376
+ #### Swap and Load Carbon Card
377
+
378
+ ```typescript
379
+ const payload = await vaultService.swapAndLoadCarbonCard({
380
+ vaultOwnerAddress: wallet.publicKey,
381
+ quoteInfo: quoteInfo,
382
+ nextCardCounter: nextIndex,
383
+ emailHash: Buffer.from('your-32-byte-hash'),
384
+ currency: 'USD',
385
+ reloadCardId: 'CARD_ID',
386
+ wrapAndUnwrapSol: true
178
387
  });
179
388
 
180
- const appendActionsSignature = await appendActionsPayload.execute({ commitment: "confirmed" });
389
+ await payload.execute();
181
390
  ```
182
391
 
183
- ### Execute Proposal
392
+ #### Get Card Custom Token Fees
393
+
394
+ ```typescript
395
+ const tokenFees = await vaultService.getCardCustomTokenFees();
184
396
 
185
- ```ts
186
- const proposal = <proposal public key>;
187
- const payload = await service.executeProposal({
188
- proposal,
397
+ tokenFees.forEach(fee => {
398
+ console.log(`Token: ${fee.tokenAddress}, Fee: ${fee.fee}%`);
189
399
  });
400
+ ```
190
401
 
191
- const signature = await payload.execute({ commitment: "confirmed" });
192
- console.log("Execute Proposal Signature:", signature);
402
+ ## Query Functions
403
+
404
+ ### Get Vault Information
405
+
406
+ ```typescript
407
+ // Get specific user's vault
408
+ const vaultInfo = await vaultService.getVaultInfoOfUser(userAddress);
409
+
410
+ if (vaultInfo) {
411
+ console.log('Vault:', vaultInfo.vault.toString());
412
+ console.log('Owner:', vaultInfo.owner.toString());
413
+ console.log('Created:', new Date(vaultInfo.createdDate * 1000));
414
+ }
415
+
416
+ // Get all vaults
417
+ const allVaults = await vaultService.getAllVaultsInfo();
418
+ console.log(`Total vaults: ${allVaults.length}`);
193
419
  ```
194
420
 
195
- ### Delete Proposal
421
+ ### Get Proposals
196
422
 
197
- ```ts
198
- const proposal = <proposal public key>;
423
+ ```typescript
424
+ const proposals = await vaultService.getProposalsInfoOfVault(vaultAddress);
199
425
 
200
- const deleteProposalPayload = await service.deleteProposal({ proposal });
201
- const deleteProposalSignature = await deleteProposalPayload.execute({
202
- commitment: "confirmed",
426
+ proposals.forEach(proposal => {
427
+ console.log('Proposal:', proposal.name);
428
+ console.log('Status:', proposal.proposalStage);
429
+ console.log('Actions:', proposal.actions.length);
430
+ console.log('Executed:', proposal.isExecuted);
203
431
  });
204
- console.log("Delete Proposal Signature:", deleteProposalSignature);
205
432
  ```
206
433
 
207
- ### Get Proposals Info of a Vault
434
+ ## Readonly Provider
435
+
436
+ For read-only operations without a wallet:
437
+
438
+ ```typescript
439
+ import { createReadonlyProvider } from '@zebec-network/zebec-vault-sdk';
440
+
441
+ const readonlyProvider = createReadonlyProvider(
442
+ connection,
443
+ optionalWalletAddress
444
+ );
445
+
446
+ const service = ZebecVaultService.create(readonlyProvider, 'mainnet-beta');
447
+
448
+ // Can only call query methods
449
+ const vaultInfo = await service.getVaultInfoOfUser(someAddress);
450
+ ```
451
+
452
+ ## Error Handling
453
+
454
+ The SDK provides custom error types:
455
+
456
+ ```typescript
457
+ import {
458
+ AmountOutOfRangeError,
459
+ DailyCardLimitReachedError,
460
+ NotEnoughBalanceError,
461
+ AssociatedTokenAccountDoesNotExistsError
462
+ } from '@zebec-network/zebec-vault-sdk';
463
+
464
+ try {
465
+ await payload.execute();
466
+ } catch (error) {
467
+ if (error instanceof AmountOutOfRangeError) {
468
+ console.error('Amount must be between', error.minRange, 'and', error.maxRange);
469
+ } else if (error instanceof DailyCardLimitReachedError) {
470
+ console.error('Daily limit:', error.dailyCardLimit);
471
+ } else if (error instanceof NotEnoughBalanceError) {
472
+ console.error('Insufficient balance');
473
+ }
474
+ }
475
+ ```
476
+
477
+ ## Advanced Features
478
+
479
+ ### Program Derived Addresses (PDAs)
480
+
481
+ ```typescript
482
+ import {
483
+ deriveUserVault,
484
+ deriveVaultSigner,
485
+ deriveStreamConfigPda,
486
+ deriveCardConfigPda,
487
+ deriveLockupAddress
488
+ } from '@zebec-network/zebec-vault-sdk';
489
+
490
+ const [vaultAddress, vaultBump] = deriveUserVault(
491
+ userAddress,
492
+ vaultProgramId
493
+ );
494
+
495
+ const [signerAddress, signerBump] = deriveVaultSigner(
496
+ vaultAddress,
497
+ vaultProgramId
498
+ );
499
+ ```
500
+
501
+ ### Transaction Utilities
502
+
503
+ ```typescript
504
+ import {
505
+ calculateProposalSize,
506
+ transactionInstructionToProposalAction
507
+ } from '@zebec-network/zebec-vault-sdk';
508
+
509
+ // Calculate proposal size
510
+ const size = calculateProposalSize('proposal-name', actions);
511
+
512
+ // Convert instruction to proposal action
513
+ const action = transactionInstructionToProposalAction(instruction);
514
+ ```
515
+
516
+ ## Network Configuration
208
517
 
209
- ```ts
210
- const vault = <vault public key>;
518
+ ```typescript
519
+ // Mainnet
520
+ const mainnetService = ZebecVaultService.create(provider, 'mainnet-beta');
211
521
 
212
- const proposalsInfo = await service.getProposalsInfoOfVault(vault);
522
+ // Devnet
523
+ const devnetService = ZebecVaultService.create(provider, 'devnet');
213
524
  ```
214
525
 
215
- ### Get All Vaults Info
526
+ ## Constants
527
+
528
+ ```typescript
529
+ import {
530
+ ZEBEC_VAULT_PROGRAM_ID,
531
+ JUPITER_AGGREGATOR_PROGRAM_ID,
532
+ CARD_LOOKUP_TABLE_ADDRESS,
533
+ STAKE_LOOKUP_TABLE_ADDRESS
534
+ } from '@zebec-network/zebec-vault-sdk';
216
535
 
217
- ```ts
218
- const vaultsInfo = await service.getAllVaultsInfo();
536
+ console.log('Vault Program:', ZEBEC_VAULT_PROGRAM_ID['mainnet-beta']);
219
537
  ```
538
+
539
+ ## Types
540
+
541
+ The SDK exports comprehensive TypeScript types:
542
+
543
+ ```typescript
544
+ import type {
545
+ VaultInfo,
546
+ ProposalInfo,
547
+ ProposalAction,
548
+ CreateStreamFromVaultParams,
549
+ StreamMetadataInfo,
550
+ TokenFeeRecord,
551
+ QuoteInfo,
552
+ StakeUserNonceInfo
553
+ } from '@zebec-network/zebec-vault-sdk';
554
+ ```
555
+
556
+ ## Best Practices
557
+
558
+ 1. **Always check balances** before operations
559
+ 2. **Use proposals** for critical operations requiring multiple approvals
560
+ 3. **Handle errors** appropriately with the provided error types
561
+ 4. **Verify stream parameters** before creation (duration, amounts, permissions)
562
+ 5. **Test on devnet** before deploying to mainnet
563
+ 6. **Use address lookup tables** for complex transactions to reduce size
564
+
565
+ ## Support
566
+
567
+ - **Documentation**: [Zebec Network Docs](https://docs.zebec.io)
568
+ - **GitHub**: [zebec-network](https://github.com/zebec-network)
569
+ - **Discord**: [Join our community](https://discord.gg/zebec)
570
+
571
+ ## License
572
+
573
+ MIT
574
+
575
+ ## Contributing
576
+
577
+ Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
package/dist/constants.js CHANGED
@@ -9,11 +9,11 @@ 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";
16
16
  exports.STAKE_LOOKUP_TABLE_ADDRESS = {
17
- "mainnet-beta": "C4R2sL6yj7bzKfbdfwCfH68DZZ3QnzdmedE9wQqTfAAA",
17
+ "mainnet-beta": "EoKjJejKr4XsBdtUuYwzZcYd6tpGNijxCGgQocxtxQ8t",
18
18
  devnet: "C4R2sL6yj7bzKfbdfwCfH68DZZ3QnzdmedE9wQqTfAAA",
19
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zebec-network/zebec-vault-sdk",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "An SDK for zebec vault solana program",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",