@zebec-network/solana-payroll-sdk 2.3.0 → 2.4.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/README.md +0 -0
- package/dist/instructions.d.ts +6 -20
- package/dist/instructions.js +6 -25
- package/dist/pda.d.ts +1 -0
- package/dist/pda.js +3 -0
- package/dist/services.d.ts +1 -3
- package/dist/services.js +27 -54
- package/dist/types.d.ts +3 -12
- package/package.json +5 -5
package/README.md
CHANGED
|
Binary file
|
package/dist/instructions.d.ts
CHANGED
|
@@ -112,19 +112,6 @@ export declare function createYieldDepositInstruction(program: Program<ZebecPayr
|
|
|
112
112
|
nonce: BN;
|
|
113
113
|
companyId: number[];
|
|
114
114
|
}): Promise<TransactionInstruction>;
|
|
115
|
-
export declare function createUnlockNowInstruction(program: Program<ZebecPayrollIdl>, accounts: {
|
|
116
|
-
feePayer: PublicKey;
|
|
117
|
-
company: PublicKey;
|
|
118
|
-
companyDeposit: PublicKey;
|
|
119
|
-
yieldConfig: PublicKey;
|
|
120
|
-
admin: PublicKey;
|
|
121
|
-
centralVaultTokenAta: PublicKey;
|
|
122
|
-
companyTokenAta: PublicKey;
|
|
123
|
-
depositMint: PublicKey;
|
|
124
|
-
}, data: {
|
|
125
|
-
nonce: BN;
|
|
126
|
-
companyId: number[];
|
|
127
|
-
}): Promise<TransactionInstruction>;
|
|
128
115
|
export declare function createRequestUnlockInstruction(program: Program<ZebecPayrollIdl>, accounts: {
|
|
129
116
|
company: PublicKey;
|
|
130
117
|
companyDeposit: PublicKey;
|
|
@@ -133,13 +120,6 @@ export declare function createRequestUnlockInstruction(program: Program<ZebecPay
|
|
|
133
120
|
companyId: number[];
|
|
134
121
|
nonce: BN;
|
|
135
122
|
}): Promise<TransactionInstruction>;
|
|
136
|
-
export declare function createCancelUnlockInstruction(program: Program<ZebecPayrollIdl>, accounts: {
|
|
137
|
-
company: PublicKey;
|
|
138
|
-
companyDeposit: PublicKey;
|
|
139
|
-
}, data: {
|
|
140
|
-
companyId: number[];
|
|
141
|
-
nonce: BN;
|
|
142
|
-
}): Promise<TransactionInstruction>;
|
|
143
123
|
export declare function createCompleteUnlockInstruction(program: Program<ZebecPayrollIdl>, accounts: {
|
|
144
124
|
admin: PublicKey;
|
|
145
125
|
feePayer: PublicKey;
|
|
@@ -149,6 +129,10 @@ export declare function createCompleteUnlockInstruction(program: Program<ZebecPa
|
|
|
149
129
|
centralVaultTokenAta: PublicKey;
|
|
150
130
|
companyTokenAta: PublicKey;
|
|
151
131
|
depositMint: PublicKey;
|
|
132
|
+
centralVault: PublicKey;
|
|
133
|
+
centralVaultUsxAta: PublicKey;
|
|
134
|
+
usxMint: PublicKey;
|
|
135
|
+
companyUsxAta: PublicKey;
|
|
152
136
|
}, data: {
|
|
153
137
|
companyId: number[];
|
|
154
138
|
nonce: BN;
|
|
@@ -156,10 +140,12 @@ export declare function createCompleteUnlockInstruction(program: Program<ZebecPa
|
|
|
156
140
|
export declare function createDistributeRewardsInstruction(program: Program<ZebecPayrollIdl>, accounts: {
|
|
157
141
|
admin: PublicKey;
|
|
158
142
|
yieldConfig: PublicKey;
|
|
143
|
+
checkAccount: PublicKey;
|
|
159
144
|
}, data: {
|
|
160
145
|
distributions: {
|
|
161
146
|
companyId: number[];
|
|
162
147
|
nonce: BN;
|
|
163
148
|
amount: BN;
|
|
164
149
|
}[];
|
|
150
|
+
checkId: number[];
|
|
165
151
|
}, remainingAccounts: AccountMeta[]): Promise<TransactionInstruction>;
|
package/dist/instructions.js
CHANGED
|
@@ -146,21 +146,6 @@ export async function createYieldDepositInstruction(program, accounts, data) {
|
|
|
146
146
|
})
|
|
147
147
|
.instruction();
|
|
148
148
|
}
|
|
149
|
-
export async function createUnlockNowInstruction(program, accounts, data) {
|
|
150
|
-
return program.methods
|
|
151
|
-
.unlockNow(data.companyId, data.nonce)
|
|
152
|
-
.accountsPartial({
|
|
153
|
-
feePayer: accounts.feePayer,
|
|
154
|
-
company: accounts.company,
|
|
155
|
-
companyDeposit: accounts.companyDeposit,
|
|
156
|
-
yieldConfig: accounts.yieldConfig,
|
|
157
|
-
admin: accounts.admin,
|
|
158
|
-
centralVaultTokenAta: accounts.centralVaultTokenAta,
|
|
159
|
-
companyTokenAta: accounts.companyTokenAta,
|
|
160
|
-
depositMint: accounts.depositMint,
|
|
161
|
-
})
|
|
162
|
-
.instruction();
|
|
163
|
-
}
|
|
164
149
|
export async function createRequestUnlockInstruction(program, accounts, data) {
|
|
165
150
|
return program.methods
|
|
166
151
|
.requestUnlock(data.companyId, data.nonce)
|
|
@@ -171,15 +156,6 @@ export async function createRequestUnlockInstruction(program, accounts, data) {
|
|
|
171
156
|
})
|
|
172
157
|
.instruction();
|
|
173
158
|
}
|
|
174
|
-
export async function createCancelUnlockInstruction(program, accounts, data) {
|
|
175
|
-
return program.methods
|
|
176
|
-
.cancelUnlock(data.companyId, data.nonce)
|
|
177
|
-
.accountsPartial({
|
|
178
|
-
company: accounts.company,
|
|
179
|
-
companyDeposit: accounts.companyDeposit,
|
|
180
|
-
})
|
|
181
|
-
.instruction();
|
|
182
|
-
}
|
|
183
159
|
export async function createCompleteUnlockInstruction(program, accounts, data) {
|
|
184
160
|
return program.methods
|
|
185
161
|
.completeUnlock(data.companyId, data.nonce)
|
|
@@ -192,15 +168,20 @@ export async function createCompleteUnlockInstruction(program, accounts, data) {
|
|
|
192
168
|
centralVaultTokenAta: accounts.centralVaultTokenAta,
|
|
193
169
|
companyTokenAta: accounts.companyTokenAta,
|
|
194
170
|
depositMint: accounts.depositMint,
|
|
171
|
+
centralVault: accounts.centralVault,
|
|
172
|
+
centralVaultUsxAta: accounts.centralVaultUsxAta,
|
|
173
|
+
usxMint: accounts.usxMint,
|
|
174
|
+
companyUsxAta: accounts.companyUsxAta,
|
|
195
175
|
})
|
|
196
176
|
.instruction();
|
|
197
177
|
}
|
|
198
178
|
export async function createDistributeRewardsInstruction(program, accounts, data, remainingAccounts) {
|
|
199
179
|
return program.methods
|
|
200
|
-
.distributeRewards(data.distributions)
|
|
180
|
+
.distributeRewards(data.checkId, data.distributions)
|
|
201
181
|
.accountsPartial({
|
|
202
182
|
admin: accounts.admin,
|
|
203
183
|
yieldConfig: accounts.yieldConfig,
|
|
184
|
+
checkAccount: accounts.checkAccount,
|
|
204
185
|
})
|
|
205
186
|
.remainingAccounts(remainingAccounts)
|
|
206
187
|
.instruction();
|
package/dist/pda.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export declare function derivePayrollVaultPda(metatadata: Address, payrollProgra
|
|
|
5
5
|
export declare function deriveYieldConfigPda(configProgramId: Address): [PublicKey, number];
|
|
6
6
|
export declare function deriveCompanyDepositPda(companyId: Buffer, nonce: bigint, payrollProgramId: Address): [PublicKey, number];
|
|
7
7
|
export declare function deriveCompanyNoncePda(companyId: Buffer, payrollProgramId: Address): [PublicKey, number];
|
|
8
|
+
export declare function deriveCheckAccountPda(checkId: Buffer | Uint8Array, payrollProgramId: Address): [PublicKey, number];
|
package/dist/pda.js
CHANGED
|
@@ -30,3 +30,6 @@ export function deriveCompanyDepositPda(companyId, nonce, payrollProgramId) {
|
|
|
30
30
|
export function deriveCompanyNoncePda(companyId, payrollProgramId) {
|
|
31
31
|
return PublicKey.findProgramAddressSync([companyId], translateAddress(payrollProgramId));
|
|
32
32
|
}
|
|
33
|
+
export function deriveCheckAccountPda(checkId, payrollProgramId) {
|
|
34
|
+
return PublicKey.findProgramAddressSync([checkId], translateAddress(payrollProgramId));
|
|
35
|
+
}
|
package/dist/services.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type Commitment } from "@solana/web3.js";
|
|
|
3
3
|
import { MultiTransactionPayload, TransactionPayload } from "@zebec-network/solana-common";
|
|
4
4
|
import type { ZebecConfigs as ZebecConfigsIdl } from "@zebec-network/zebec_configs";
|
|
5
5
|
import type { ZebecPayroll as ZebecPayrollIdl } from "@zebec-network/zebec_payroll";
|
|
6
|
-
import type { CancelMultiplePayrollParams, CancelPayrollParams,
|
|
6
|
+
import type { CancelMultiplePayrollParams, CancelPayrollParams, ChangePayrollReceiverParams, CompanyDepositInfo, CompanyNonceInfo, CompleteUnlockParams, CreateMultiplePayrollParams, CreatePayrollParams, DistributeRewardsParams, PauseResumeMultiplePayrollParams, PauseResumePayrollParams, PayrollConfigInfo, PayrollMetadataInfo, RequestUnlockParams, SetMultipleTopupDelegateParams, SetTopupDelegateParams, TokenMetadata, TopupMultiplePayrollParams, TopupPayrollParams, WithdrawMultiplePayrollParams, WithdrawPayrollParams, YieldDepositParams } from "./types.js";
|
|
7
7
|
export declare function getPayrollConfig(configProgram: Program<ZebecConfigsIdl>, configName: string): Promise<PayrollConfigInfo>;
|
|
8
8
|
export declare function getWhitelistedTokens(configProgram: Program<ZebecConfigsIdl>, configName: string, commitment?: "processed" | "confirmed" | "finalized"): Promise<TokenMetadata[]>;
|
|
9
9
|
export declare function getPayrollMetadataInfo(program: Program<ZebecPayrollIdl>, payrollMetadata: Address, commitment?: Commitment): Promise<PayrollMetadataInfo>;
|
|
@@ -22,9 +22,7 @@ export declare function topupPayroll(payrollProgram: Program<ZebecPayrollIdl>, c
|
|
|
22
22
|
export declare function topupMultiplePayroll(payrollProgram: Program<ZebecPayrollIdl>, configProgram: Program<ZebecConfigsIdl>, params: TopupMultiplePayrollParams): Promise<MultiTransactionPayload>;
|
|
23
23
|
export declare function getCompanyNonceInfo(payrollProgram: Program<ZebecPayrollIdl>, companyIdBuffer: Buffer, commitment?: Commitment): Promise<CompanyNonceInfo | null>;
|
|
24
24
|
export declare function yieldDeposit(payrollProgram: Program<ZebecPayrollIdl>, configsProgram: Program<ZebecConfigsIdl>, params: YieldDepositParams, commitment?: Commitment): Promise<TransactionPayload>;
|
|
25
|
-
export declare function unlockNow(payrollProgram: Program<ZebecPayrollIdl>, configsProgram: Program<ZebecConfigsIdl>, params: UnlockNowParams, commitment?: Commitment): Promise<TransactionPayload>;
|
|
26
25
|
export declare function requestUnlock(payrollProgram: Program<ZebecPayrollIdl>, configsProgram: Program<ZebecConfigsIdl>, params: RequestUnlockParams): Promise<TransactionPayload>;
|
|
27
|
-
export declare function cancelUnlock(payrollProgram: Program<ZebecPayrollIdl>, params: CancelUnlockParams): Promise<TransactionPayload>;
|
|
28
26
|
export declare function completeUnlock(payrollProgram: Program<ZebecPayrollIdl>, configsProgram: Program<ZebecConfigsIdl>, params: CompleteUnlockParams, commitment?: Commitment): Promise<TransactionPayload>;
|
|
29
27
|
export declare function distributeRewards(payrollProgram: Program<ZebecPayrollIdl>, configsProgram: Program<ZebecConfigsIdl>, params: DistributeRewardsParams): Promise<TransactionPayload>;
|
|
30
28
|
export declare function getCompanyDeposit(payrollProgram: Program<ZebecPayrollIdl>, company: Address): Promise<CompanyDepositInfo | null>;
|
package/dist/services.js
CHANGED
|
@@ -8,8 +8,8 @@ import { createAssociatedTokenAccountInstruction, getAssociatedTokenAddressSync,
|
|
|
8
8
|
import { BigNumber } from "bignumber.js";
|
|
9
9
|
import { BN } from "bn.js";
|
|
10
10
|
import { PAYROLL_NAME_BUFFER_SIZE, USX_DECIMALS } from "./constants.js";
|
|
11
|
-
import { createCancelPayrollInstruction,
|
|
12
|
-
import { deriveCompanyDepositPda, deriveCompanyNoncePda, derivePayrollConfigPda, derivePayrollVaultPda, deriveYieldConfigPda, } from "./pda.js";
|
|
11
|
+
import { createCancelPayrollInstruction, createChangeRecipientInstruction, createCompleteUnlockInstruction, createCreatePayrollInstruction, createDistributeRewardsInstruction, createPauseResumePayrollInstruction, createRequestUnlockInstruction, createSetTopupDelegateInstruction, createTopupPayrollInstruction, createTransferFeesInstruction, createWithdrawPayrollInstruction, createYieldDepositInstruction, } from "./instructions.js";
|
|
12
|
+
import { deriveCheckAccountPda, deriveCompanyDepositPda, deriveCompanyNoncePda, derivePayrollConfigPda, derivePayrollVaultPda, deriveYieldConfigPda, } from "./pda.js";
|
|
13
13
|
import { getFeeInfoForPayroll } from "./utils.js";
|
|
14
14
|
export async function getPayrollConfig(configProgram, configName) {
|
|
15
15
|
const [payrollConfigPda] = derivePayrollConfigPda(configName, configProgram.programId);
|
|
@@ -734,40 +734,6 @@ export async function yieldDeposit(payrollProgram, configsProgram, params, commi
|
|
|
734
734
|
});
|
|
735
735
|
return createTransactionPayload(payrollProgram, company, [ix]);
|
|
736
736
|
}
|
|
737
|
-
export async function unlockNow(payrollProgram, configsProgram, params, commitment) {
|
|
738
|
-
commitment = commitment ?? payrollProgram.provider.connection.commitment;
|
|
739
|
-
const company = translateAddress(params.company);
|
|
740
|
-
const feePayer = translateAddress(params.feePayer);
|
|
741
|
-
const [yieldConfig] = deriveYieldConfigPda(configsProgram.programId);
|
|
742
|
-
const configData = await configsProgram.account.yieldConfig.fetchNullable(yieldConfig, commitment);
|
|
743
|
-
if (!configData) {
|
|
744
|
-
throw new Error("YieldConfigNotFound: Yield config is not initialized in Zebec Configs Program");
|
|
745
|
-
}
|
|
746
|
-
// central vault is also the admin
|
|
747
|
-
const admin = configData.centralVault;
|
|
748
|
-
const [companyDeposit] = deriveCompanyDepositPda(Buffer.from(params.companyId), params.nonce, payrollProgram.programId);
|
|
749
|
-
const companyDepositData = await payrollProgram.account.companyDeposit.fetchNullable(companyDeposit, commitment);
|
|
750
|
-
if (!companyDepositData) {
|
|
751
|
-
throw new Error(`CompanyDepositNotFound: Company Deposit does not exists for nonce: ${params.nonce.toString()}n and companyId: [${Array.from(params.companyId).toString()}]`);
|
|
752
|
-
}
|
|
753
|
-
const depositMint = companyDepositData.depositMint;
|
|
754
|
-
const adminTokenAta = getAssociatedTokenAddressSync(depositMint, admin, true);
|
|
755
|
-
const companyTokenAta = getAssociatedTokenAddressSync(depositMint, company, true);
|
|
756
|
-
const ix = await createUnlockNowInstruction(payrollProgram, {
|
|
757
|
-
feePayer,
|
|
758
|
-
company,
|
|
759
|
-
companyDeposit,
|
|
760
|
-
yieldConfig,
|
|
761
|
-
admin,
|
|
762
|
-
centralVaultTokenAta: adminTokenAta,
|
|
763
|
-
companyTokenAta,
|
|
764
|
-
depositMint,
|
|
765
|
-
}, {
|
|
766
|
-
companyId: Array.from(params.companyId),
|
|
767
|
-
nonce: new BN(params.nonce),
|
|
768
|
-
});
|
|
769
|
-
return createTransactionPayload(payrollProgram, feePayer, [ix]);
|
|
770
|
-
}
|
|
771
737
|
export async function requestUnlock(payrollProgram, configsProgram, params) {
|
|
772
738
|
const company = translateAddress(params.company);
|
|
773
739
|
const feePayer = translateAddress(params.feePayer);
|
|
@@ -783,19 +749,6 @@ export async function requestUnlock(payrollProgram, configsProgram, params) {
|
|
|
783
749
|
});
|
|
784
750
|
return createTransactionPayload(payrollProgram, feePayer, [ix]);
|
|
785
751
|
}
|
|
786
|
-
export async function cancelUnlock(payrollProgram, params) {
|
|
787
|
-
const company = translateAddress(params.company);
|
|
788
|
-
const feePayer = translateAddress(params.feePayer);
|
|
789
|
-
const [companyDeposit] = deriveCompanyDepositPda(Buffer.from(params.companyId), params.nonce, payrollProgram.programId);
|
|
790
|
-
const ix = await createCancelUnlockInstruction(payrollProgram, {
|
|
791
|
-
company,
|
|
792
|
-
companyDeposit,
|
|
793
|
-
}, {
|
|
794
|
-
companyId: Array.from(params.companyId),
|
|
795
|
-
nonce: new BN(params.nonce.toString()),
|
|
796
|
-
});
|
|
797
|
-
return createTransactionPayload(payrollProgram, feePayer, [ix]);
|
|
798
|
-
}
|
|
799
752
|
export async function completeUnlock(payrollProgram, configsProgram, params, commitment) {
|
|
800
753
|
commitment = commitment ?? payrollProgram.provider.connection.commitment;
|
|
801
754
|
const company = translateAddress(params.company);
|
|
@@ -805,35 +758,51 @@ export async function completeUnlock(payrollProgram, configsProgram, params, com
|
|
|
805
758
|
if (!configData) {
|
|
806
759
|
throw new Error("YieldConfigNotFound: Yield config is not initialized in Zebec Configs Program");
|
|
807
760
|
}
|
|
808
|
-
|
|
809
|
-
const
|
|
761
|
+
const admin = configData.admin;
|
|
762
|
+
const centralVault = configData.centralVault;
|
|
763
|
+
const usxMint = configData.usxMint;
|
|
764
|
+
if (params.companyVaultKeypair &&
|
|
765
|
+
!centralVault.equals(params.companyVaultKeypair.publicKey)) {
|
|
766
|
+
throw new Error("Given keypair is not of companyVault");
|
|
767
|
+
}
|
|
810
768
|
const [companyDeposit] = deriveCompanyDepositPda(Buffer.from(params.companyId), params.nonce, payrollProgram.programId);
|
|
811
769
|
const companyDepositData = await payrollProgram.account.companyDeposit.fetchNullable(companyDeposit, commitment);
|
|
812
770
|
if (!companyDepositData) {
|
|
813
771
|
throw new Error(`CompanyDepositNotFound: Company Deposit does not exists for nonce: ${params.nonce.toString()}n and companyId: [${Array.from(params.companyId).toString()}]`);
|
|
814
772
|
}
|
|
815
773
|
const depositMint = companyDepositData.depositMint;
|
|
816
|
-
const centralVaultTokenAta = getAssociatedTokenAddressSync(depositMint,
|
|
774
|
+
const centralVaultTokenAta = getAssociatedTokenAddressSync(depositMint, centralVault, true);
|
|
775
|
+
const centralVaultUsxAta = getAssociatedTokenAddressSync(usxMint, centralVault, true);
|
|
817
776
|
const companyTokenAta = getAssociatedTokenAddressSync(depositMint, company, true);
|
|
777
|
+
const companyUsxAta = getAssociatedTokenAddressSync(usxMint, company, true);
|
|
818
778
|
const ix = await createCompleteUnlockInstruction(payrollProgram, {
|
|
819
779
|
admin,
|
|
820
780
|
feePayer,
|
|
821
781
|
company,
|
|
822
782
|
companyDeposit,
|
|
823
783
|
yieldConfig,
|
|
784
|
+
centralVault,
|
|
824
785
|
centralVaultTokenAta,
|
|
786
|
+
centralVaultUsxAta,
|
|
825
787
|
companyTokenAta,
|
|
788
|
+
companyUsxAta,
|
|
826
789
|
depositMint,
|
|
790
|
+
usxMint,
|
|
827
791
|
}, {
|
|
828
792
|
companyId: Array.from(params.companyId),
|
|
829
793
|
nonce: new BN(params.nonce.toString()),
|
|
830
794
|
});
|
|
831
|
-
|
|
795
|
+
const partialSigners = [];
|
|
796
|
+
if (params.companyVaultKeypair) {
|
|
797
|
+
partialSigners.push(params.companyVaultKeypair);
|
|
798
|
+
}
|
|
799
|
+
return createTransactionPayload(payrollProgram, feePayer, [ix], partialSigners);
|
|
832
800
|
}
|
|
833
801
|
export async function distributeRewards(payrollProgram, configsProgram, params) {
|
|
834
802
|
const admin = translateAddress(params.admin);
|
|
835
803
|
const feePayer = translateAddress(params.feePayer);
|
|
836
804
|
const [yieldConfig] = deriveYieldConfigPda(configsProgram.programId);
|
|
805
|
+
const [checkAccount] = deriveCheckAccountPda(params.checkId, payrollProgram.programId);
|
|
837
806
|
const distributions = params.distributions.map((d) => ({
|
|
838
807
|
companyId: Array.from(d.companyId),
|
|
839
808
|
nonce: new BN(d.nonce.toString()),
|
|
@@ -849,7 +818,11 @@ export async function distributeRewards(payrollProgram, configsProgram, params)
|
|
|
849
818
|
const ix = await createDistributeRewardsInstruction(payrollProgram, {
|
|
850
819
|
admin,
|
|
851
820
|
yieldConfig,
|
|
852
|
-
|
|
821
|
+
checkAccount,
|
|
822
|
+
}, {
|
|
823
|
+
distributions,
|
|
824
|
+
checkId: Array.from(params.checkId),
|
|
825
|
+
}, remainingAccounts);
|
|
853
826
|
return createTransactionPayload(payrollProgram, feePayer, [ix]);
|
|
854
827
|
}
|
|
855
828
|
export async function getCompanyDeposit(payrollProgram, company) {
|
package/dist/types.d.ts
CHANGED
|
@@ -205,33 +205,24 @@ export type YieldDepositParams = {
|
|
|
205
205
|
depoistMint: Address;
|
|
206
206
|
amount: Numeric;
|
|
207
207
|
};
|
|
208
|
-
export type UnlockNowParams = {
|
|
209
|
-
feePayer: Address;
|
|
210
|
-
company: Address;
|
|
211
|
-
nonce: bigint;
|
|
212
|
-
companyId: Buffer | Uint8Array;
|
|
213
|
-
};
|
|
214
208
|
export type RequestUnlockParams = {
|
|
215
209
|
feePayer: Address;
|
|
216
210
|
company: Address;
|
|
217
211
|
companyId: Buffer | Uint8Array;
|
|
218
212
|
nonce: bigint;
|
|
219
213
|
};
|
|
220
|
-
export type CancelUnlockParams = {
|
|
221
|
-
feePayer: Address;
|
|
222
|
-
company: Address;
|
|
223
|
-
companyId: Buffer | Uint8Array;
|
|
224
|
-
nonce: bigint;
|
|
225
|
-
};
|
|
226
214
|
export type CompleteUnlockParams = {
|
|
227
215
|
feePayer: Address;
|
|
228
216
|
company: Address;
|
|
229
217
|
companyId: Buffer | Uint8Array;
|
|
230
218
|
nonce: bigint;
|
|
219
|
+
companyVaultKeypair?: Keypair;
|
|
231
220
|
};
|
|
232
221
|
export type DistributeRewardsParams = {
|
|
233
222
|
admin: Address;
|
|
234
223
|
feePayer: Address;
|
|
224
|
+
/** Check id used to derive the check account that prevents duplicate distributions. */
|
|
225
|
+
checkId: Buffer | Uint8Array;
|
|
235
226
|
distributions: {
|
|
236
227
|
companyId: Buffer | Uint8Array;
|
|
237
228
|
nonce: bigint;
|
package/package.json
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"@metaplex-foundation/umi-web3js-adapters": "^1.5.1",
|
|
9
9
|
"@solana/spl-token": "^0.4.14",
|
|
10
10
|
"@solana/web3.js": "^1.98.2",
|
|
11
|
-
"@zebec-network/core-utils": "^1.
|
|
11
|
+
"@zebec-network/core-utils": "^1.3.1",
|
|
12
12
|
"@zebec-network/solana-common": "^2.6.0",
|
|
13
|
-
"@zebec-network/zebec_configs": "^1.2.
|
|
14
|
-
"@zebec-network/zebec_payroll": "^1.4.
|
|
15
|
-
"bignumber.js": "^11.
|
|
13
|
+
"@zebec-network/zebec_configs": "^1.2.3",
|
|
14
|
+
"@zebec-network/zebec_payroll": "^1.4.9",
|
|
15
|
+
"bignumber.js": "^11.1.1"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/bn.js": "^5.2.0",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
},
|
|
44
44
|
"type": "module",
|
|
45
45
|
"types": "dist/index.d.ts",
|
|
46
|
-
"version": "2.
|
|
46
|
+
"version": "2.4.0"
|
|
47
47
|
}
|