@zebec-network/solana-payroll-sdk 1.0.0-dev.1 → 1.0.1

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/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ # The MIT License (MIT)
2
+
3
+ Copyright © 2025 Zebec Network
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,5 +1,3 @@
1
1
  import type { RpcNetwork } from "./types.js";
2
2
  export declare const PAYROLL_NAME_BUFFER_SIZE = 128;
3
3
  export declare const PAYROLL_PROGRAM_ID: Record<RpcNetwork, string>;
4
- export declare const PAYROLL_PROGRAM_LOOKUP_TABLE_ADDRESS: Record<RpcNetwork, string>;
5
- export declare const SUPERAPP_BACKEND_URL: Record<RpcNetwork, string>;
package/dist/constants.js CHANGED
@@ -3,12 +3,3 @@ export const PAYROLL_PROGRAM_ID = {
3
3
  "mainnet-beta": "zPAY457TttFCcaCoA3imYyEHc2sPvLMTQgVxjAfodSM",
4
4
  devnet: "zPAY457TttFCcaCoA3imYyEHc2sPvLMTQgVxjAfodSM",
5
5
  };
6
- export const PAYROLL_PROGRAM_LOOKUP_TABLE_ADDRESS = {
7
- devnet: "HJmEzSXzJrtSdgBZSaedQ51WaD4LkT1r5zR2yT1QERqv",
8
- "mainnet-beta": "43N5otEu7k7TzkKsdhkwiYGrdKjBejetWQbF9cJPtY6i",
9
- };
10
- export const SUPERAPP_BACKEND_URL = {
11
- // "mainnet-beta": "https://uat-super.api.zebec.io",
12
- "mainnet-beta": "https://api.superapp.zebec.io",
13
- devnet: "https://dev-super.api.zebec.io",
14
- };
@@ -1,61 +1,18 @@
1
1
  import type { BN, Program } from "@coral-xyz/anchor";
2
2
  import type { PublicKey, TransactionInstruction } from "@solana/web3.js";
3
3
  import type { ZebecPayroll as ZebecPayrollIdl } from "@zebec-network/zebec_payroll";
4
- import type { ParsedFeeTier } from "./types.js";
5
- export declare function createInitializeConfigInstruction(program: Program<ZebecPayrollIdl>, accounts: {
6
- streamConfig: PublicKey;
7
- admin: PublicKey;
8
- }, data: {
9
- baseFee: BN;
10
- configName: string;
11
- feeTiers: ParsedFeeTier[];
12
- feeVault: PublicKey;
13
- frequencies: BN[];
14
- platformFee: BN;
15
- withdrawAccount: PublicKey;
16
- }): Promise<TransactionInstruction>;
17
- export declare function createUpdateConfigInstruction(program: Program<ZebecPayrollIdl>, accounts: {
18
- streamConfig: PublicKey;
19
- admin: PublicKey;
20
- }, data: {
21
- baseFee: BN;
22
- configName: string;
23
- feeTiers: ParsedFeeTier[];
24
- feeVault: PublicKey;
25
- frequencies: BN[];
26
- platformFee: BN;
27
- withdrawAccount: PublicKey;
28
- }): Promise<TransactionInstruction>;
29
- export declare function createAddFeeTokenInstruction(program: Program<ZebecPayrollIdl>, accounts: {
30
- streamConfig: PublicKey;
31
- admin: PublicKey;
32
- }, data: {
33
- token: PublicKey;
34
- }): Promise<TransactionInstruction>;
35
- export declare function createWhitelistTokensInstruction(program: Program<ZebecPayrollIdl>, accounts: {
36
- streamConfig: PublicKey;
37
- admin: PublicKey;
38
- }, data: {
39
- tokens: PublicKey[];
40
- }): Promise<TransactionInstruction>;
41
- export declare function createRemoveWhitelistInstruction(program: Program<ZebecPayrollIdl>, accounts: {
42
- streamConfig: PublicKey;
43
- admin: PublicKey;
44
- }, data: {
45
- tokens: PublicKey[];
46
- }): Promise<TransactionInstruction>;
47
- export declare function createCreateStreamInstruction(program: Program<ZebecPayrollIdl>, accounts: {
4
+ export declare function createCreatePayrollInstruction(program: Program<ZebecPayrollIdl>, accounts: {
48
5
  sender: PublicKey;
49
6
  feePayer: PublicKey;
50
7
  senderAta: PublicKey;
51
8
  receiver: PublicKey;
52
9
  receiverAta: PublicKey;
53
- streamMetadata: PublicKey;
54
- streamVault: PublicKey;
55
- streamVaultAta: PublicKey;
56
- streamConfig: PublicKey;
10
+ payrollMetadata: PublicKey;
11
+ payrollVault: PublicKey;
12
+ payrollVaultAta: PublicKey;
13
+ payrollConfig: PublicKey;
57
14
  withdrawAccount: PublicKey;
58
- streamToken: PublicKey;
15
+ payrollToken: PublicKey;
59
16
  }, data: {
60
17
  amount: BN;
61
18
  startTime: BN;
@@ -71,62 +28,73 @@ export declare function createCreateStreamInstruction(program: Program<ZebecPayr
71
28
  isPausable: number;
72
29
  rateUpdatable: number;
73
30
  startNow: number;
74
- streamName: number[];
75
- initialBufferDuration: BN;
31
+ payrollName: number[];
32
+ initialBufferAmount: BN;
76
33
  autoTopupDelegate: number;
77
34
  senderId: number[];
78
35
  receiverId: number[];
79
36
  }): Promise<TransactionInstruction>;
80
- export declare function createCancelStreamInstruction(program: Program<ZebecPayrollIdl>, accounts: {
37
+ export declare function createCancelPayrollInstruction(program: Program<ZebecPayrollIdl>, accounts: {
81
38
  signer: PublicKey;
82
39
  feePayer: PublicKey;
83
40
  otherPartyAta: PublicKey;
84
41
  otherParty: PublicKey;
85
- streamMetadata: PublicKey;
86
- streamVault: PublicKey;
87
- streamVaultAta: PublicKey;
42
+ payrollMetadata: PublicKey;
43
+ payrollVault: PublicKey;
44
+ payrollVaultAta: PublicKey;
88
45
  signerAta: PublicKey;
89
- streamToken: PublicKey;
46
+ payrollToken: PublicKey;
90
47
  }): Promise<TransactionInstruction>;
91
- export declare function createWithdrawStreamInstruction(program: Program<ZebecPayrollIdl>, accounts: {
48
+ export declare function createWithdrawPayrollInstruction(program: Program<ZebecPayrollIdl>, accounts: {
92
49
  withdrawer: PublicKey;
93
50
  feePayer: PublicKey;
94
51
  receiver: PublicKey;
95
52
  receiverAta: PublicKey;
96
- streamMetadata: PublicKey;
97
- streamVault: PublicKey;
98
- streamVaultAta: PublicKey;
99
- streamConfig: PublicKey;
100
- streamToken: PublicKey;
53
+ payrollMetadata: PublicKey;
54
+ payrollVault: PublicKey;
55
+ payrollVaultAta: PublicKey;
56
+ payrollConfig: PublicKey;
57
+ payrollToken: PublicKey;
101
58
  }): Promise<TransactionInstruction>;
102
- export declare function createPauseResumeStreamInstruction(program: Program<ZebecPayrollIdl>, accounts: {
59
+ export declare function createPauseResumePayrollInstruction(program: Program<ZebecPayrollIdl>, accounts: {
103
60
  user: PublicKey;
104
- streamMetadata: PublicKey;
61
+ payrollMetadata: PublicKey;
105
62
  }): Promise<TransactionInstruction>;
106
63
  export declare function createChangeRecipientInstruction(program: Program<ZebecPayrollIdl>, accounts: {
107
64
  signer: PublicKey;
108
- stream: PublicKey;
65
+ payrollMetadata: PublicKey;
109
66
  newRecipient: PublicKey;
110
67
  }): Promise<TransactionInstruction>;
111
- export declare function createTopupStreamInstruction(program: Program<ZebecPayrollIdl>, accounts: {
68
+ export declare function createTopupPayrollInstruction(program: Program<ZebecPayrollIdl>, accounts: {
112
69
  caller: PublicKey;
113
70
  sender: PublicKey;
114
71
  senderAta: PublicKey;
115
- streamMetadata: PublicKey;
116
- streamVault: PublicKey;
117
- streamVaultAta: PublicKey;
118
- streamConfig: PublicKey;
119
- streamToken: PublicKey;
72
+ payrollMetadata: PublicKey;
73
+ payrollVault: PublicKey;
74
+ payrollVaultAta: PublicKey;
75
+ payrollConfig: PublicKey;
76
+ payrollToken: PublicKey;
120
77
  }, data: {
121
78
  extra: BN;
122
79
  }): Promise<TransactionInstruction>;
123
80
  export declare function createSetTopupDelegateInstruction(program: Program<ZebecPayrollIdl>, accounts: {
124
81
  sender: PublicKey;
125
82
  senderAta: PublicKey;
126
- streamMetadata: PublicKey;
127
- streamVault: PublicKey;
128
- streamConfig: PublicKey;
129
- streamToken: PublicKey;
83
+ payrollMetadata: PublicKey;
84
+ payrollVault: PublicKey;
85
+ payrollConfig: PublicKey;
86
+ payrollToken: PublicKey;
130
87
  }, data: {
131
88
  amount: BN;
132
89
  }): Promise<TransactionInstruction>;
90
+ export declare function createTransferFeesInstruction(program: Program<ZebecPayrollIdl>, accounts: {
91
+ feeVault: PublicKey;
92
+ feeVaultTokenAccount: PublicKey;
93
+ payrollConfig: PublicKey;
94
+ sender: PublicKey;
95
+ senderTokenAccount: PublicKey;
96
+ tokenMint: PublicKey;
97
+ }, data: {
98
+ decimals: number;
99
+ feeAmount: BN;
100
+ }): Promise<TransactionInstruction>;
@@ -1,65 +1,4 @@
1
- export async function createInitializeConfigInstruction(program, accounts, data) {
2
- return program.methods
3
- .initializeConfig({
4
- baseFee: data.baseFee,
5
- configName: data.configName,
6
- feeTier: data.feeTiers,
7
- feeVault: data.feeVault,
8
- frequencies: data.frequencies,
9
- platformFee: data.platformFee,
10
- withdrawAccount: data.withdrawAccount,
11
- })
12
- .accountsPartial({
13
- admin: accounts.admin,
14
- streamConfig: accounts.streamConfig,
15
- })
16
- .instruction();
17
- }
18
- export async function createUpdateConfigInstruction(program, accounts, data) {
19
- return program.methods
20
- .updateConfig({
21
- baseFee: data.baseFee,
22
- configName: data.configName,
23
- feeTier: data.feeTiers,
24
- feeVault: data.feeVault,
25
- frequencies: data.frequencies,
26
- platformFee: data.platformFee,
27
- withdrawAccount: data.withdrawAccount,
28
- })
29
- .accountsPartial({
30
- admin: accounts.admin,
31
- streamConfig: accounts.streamConfig,
32
- })
33
- .instruction();
34
- }
35
- export async function createAddFeeTokenInstruction(program, accounts, data) {
36
- return program.methods
37
- .addFeeToken({ token: data.token })
38
- .accountsPartial({
39
- admin: accounts.admin,
40
- streamConfig: accounts.streamConfig,
41
- })
42
- .instruction();
43
- }
44
- export async function createWhitelistTokensInstruction(program, accounts, data) {
45
- return program.methods
46
- .whitelistTokens({ tokens: data.tokens })
47
- .accountsPartial({
48
- admin: accounts.admin,
49
- streamConfig: accounts.streamConfig,
50
- })
51
- .instruction();
52
- }
53
- export async function createRemoveWhitelistInstruction(program, accounts, data) {
54
- return program.methods
55
- .removeWhitelist({ tokens: data.tokens })
56
- .accountsPartial({
57
- admin: accounts.admin,
58
- streamConfig: accounts.streamConfig,
59
- })
60
- .instruction();
61
- }
62
- export async function createCreateStreamInstruction(program, accounts, data) {
1
+ export async function createCreatePayrollInstruction(program, accounts, data) {
63
2
  return program.methods
64
3
  .createStream({
65
4
  amount: data.amount,
@@ -76,8 +15,8 @@ export async function createCreateStreamInstruction(program, accounts, data) {
76
15
  isPausable: data.isPausable,
77
16
  rateUpdatable: data.rateUpdatable,
78
17
  startNow: data.startNow,
79
- streamName: data.streamName,
80
- initialBufferDuration: data.initialBufferDuration,
18
+ streamName: data.payrollName,
19
+ initialBufferAmount: data.initialBufferAmount,
81
20
  autoTopupDelegate: data.autoTopupDelegate,
82
21
  senderId: data.senderId,
83
22
  receiverId: data.receiverId,
@@ -88,16 +27,16 @@ export async function createCreateStreamInstruction(program, accounts, data) {
88
27
  senderAta: accounts.senderAta,
89
28
  receiver: accounts.receiver,
90
29
  receiverAta: accounts.receiverAta,
91
- streamMetadata: accounts.streamMetadata,
92
- streamVault: accounts.streamVault,
93
- streamVaultAta: accounts.streamVaultAta,
94
- streamConfig: accounts.streamConfig,
30
+ streamMetadata: accounts.payrollMetadata,
31
+ streamVault: accounts.payrollVault,
32
+ streamVaultAta: accounts.payrollVaultAta,
33
+ payrollConfig: accounts.payrollConfig,
95
34
  withdrawAccount: accounts.withdrawAccount,
96
- streamToken: accounts.streamToken,
35
+ streamToken: accounts.payrollToken,
97
36
  })
98
37
  .instruction();
99
38
  }
100
- export async function createCancelStreamInstruction(program, accounts) {
39
+ export async function createCancelPayrollInstruction(program, accounts) {
101
40
  return program.methods
102
41
  .cancelStream()
103
42
  .accountsPartial({
@@ -105,15 +44,15 @@ export async function createCancelStreamInstruction(program, accounts) {
105
44
  feePayer: accounts.feePayer,
106
45
  otherPartyAta: accounts.otherPartyAta,
107
46
  otherParty: accounts.otherParty,
108
- streamMetadata: accounts.streamMetadata,
109
- streamVault: accounts.streamVault,
110
- streamVaultAta: accounts.streamVaultAta,
47
+ streamMetadata: accounts.payrollMetadata,
48
+ streamVault: accounts.payrollVault,
49
+ streamVaultAta: accounts.payrollVaultAta,
111
50
  signerAta: accounts.signerAta,
112
- streamToken: accounts.streamToken,
51
+ streamToken: accounts.payrollToken,
113
52
  })
114
53
  .instruction();
115
54
  }
116
- export async function createWithdrawStreamInstruction(program, accounts) {
55
+ export async function createWithdrawPayrollInstruction(program, accounts) {
117
56
  return program.methods
118
57
  .withdrawStream()
119
58
  .accountsPartial({
@@ -121,20 +60,20 @@ export async function createWithdrawStreamInstruction(program, accounts) {
121
60
  feePayer: accounts.feePayer,
122
61
  receiver: accounts.receiver,
123
62
  receiverAta: accounts.receiverAta,
124
- streamMetadata: accounts.streamMetadata,
125
- streamVault: accounts.streamVault,
126
- streamVaultAta: accounts.streamVaultAta,
127
- streamConfig: accounts.streamConfig,
128
- streamToken: accounts.streamToken,
63
+ streamMetadata: accounts.payrollMetadata,
64
+ streamVault: accounts.payrollVault,
65
+ streamVaultAta: accounts.payrollVaultAta,
66
+ payrollConfig: accounts.payrollConfig,
67
+ streamToken: accounts.payrollToken,
129
68
  })
130
69
  .instruction();
131
70
  }
132
- export async function createPauseResumeStreamInstruction(program, accounts) {
71
+ export async function createPauseResumePayrollInstruction(program, accounts) {
133
72
  return program.methods
134
73
  .pauseResumeStream()
135
74
  .accountsPartial({
136
75
  user: accounts.user,
137
- streamMetadata: accounts.streamMetadata,
76
+ streamMetadata: accounts.payrollMetadata,
138
77
  })
139
78
  .instruction();
140
79
  }
@@ -143,23 +82,23 @@ export async function createChangeRecipientInstruction(program, accounts) {
143
82
  .changeRecipient()
144
83
  .accountsPartial({
145
84
  signer: accounts.signer,
146
- stream: accounts.stream,
85
+ stream: accounts.payrollMetadata,
147
86
  newRecipient: accounts.newRecipient,
148
87
  })
149
88
  .instruction();
150
89
  }
151
- export async function createTopupStreamInstruction(program, accounts, data) {
90
+ export async function createTopupPayrollInstruction(program, accounts, data) {
152
91
  return program.methods
153
92
  .topupStream(data.extra)
154
93
  .accountsPartial({
155
94
  caller: accounts.caller,
156
95
  sender: accounts.sender,
157
96
  senderAta: accounts.senderAta,
158
- streamMetadata: accounts.streamMetadata,
159
- streamVault: accounts.streamVault,
160
- streamVaultAta: accounts.streamVaultAta,
161
- streamConfig: accounts.streamConfig,
162
- streamToken: accounts.streamToken,
97
+ streamMetadata: accounts.payrollMetadata,
98
+ streamVault: accounts.payrollVault,
99
+ streamVaultAta: accounts.payrollVaultAta,
100
+ payrollConfig: accounts.payrollConfig,
101
+ streamToken: accounts.payrollToken,
163
102
  })
164
103
  .instruction();
165
104
  }
@@ -169,10 +108,26 @@ export async function createSetTopupDelegateInstruction(program, accounts, data)
169
108
  .accountsPartial({
170
109
  sender: accounts.sender,
171
110
  senderAta: accounts.senderAta,
172
- streamMetadata: accounts.streamMetadata,
173
- streamVault: accounts.streamVault,
174
- streamConfig: accounts.streamConfig,
175
- streamToken: accounts.streamToken,
111
+ streamMetadata: accounts.payrollMetadata,
112
+ streamVault: accounts.payrollVault,
113
+ payrollConfig: accounts.payrollConfig,
114
+ streamToken: accounts.payrollToken,
115
+ })
116
+ .instruction();
117
+ }
118
+ export async function createTransferFeesInstruction(program, accounts, data) {
119
+ return program.methods
120
+ .transferFees({
121
+ decimals: data.decimals,
122
+ feeAmount: data.feeAmount,
123
+ })
124
+ .accountsPartial({
125
+ feeVault: accounts.feeVault,
126
+ feeVaultTokenAccount: accounts.feeVaultTokenAccount,
127
+ payrollConfig: accounts.payrollConfig,
128
+ sender: accounts.sender,
129
+ senderTokenAccount: accounts.senderTokenAccount,
130
+ tokenMint: accounts.tokenMint,
176
131
  })
177
132
  .instruction();
178
133
  }
package/dist/pda.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { type Address } from "@coral-xyz/anchor";
2
2
  import { PublicKey } from "@solana/web3.js";
3
- export declare function deriveStreamConfigPda(configName: string, programId: Address): [PublicKey, number];
4
- export declare function deriveStreamVaultPda(metatadata: Address, programId: Address): [PublicKey, number];
3
+ export declare function derivePayrollConfigPda(configName: string, configProgramId: Address): [PublicKey, number];
4
+ export declare function derivePayrollVaultPda(metatadata: Address, payrollProgramId: Address): [PublicKey, number];
package/dist/pda.js CHANGED
@@ -1,11 +1,14 @@
1
1
  import { translateAddress, utils } from "@coral-xyz/anchor";
2
2
  import { PublicKey } from "@solana/web3.js";
3
- const SEEDS = {
4
- STREAM_CONFIG: utils.bytes.utf8.encode("config"),
3
+ // const SEEDS = {
4
+ // STREAM_CONFIG: utils.bytes.utf8.encode("config"),
5
+ // } as const;
6
+ const PAYROLL_CONFIG_SEEDS = {
7
+ PAYROLL_CONFIG: utils.bytes.utf8.encode("payroll_config"),
5
8
  };
6
- export function deriveStreamConfigPda(configName, programId) {
7
- return PublicKey.findProgramAddressSync([SEEDS.STREAM_CONFIG, utils.bytes.utf8.encode(configName)], translateAddress(programId));
9
+ export function derivePayrollConfigPda(configName, configProgramId) {
10
+ return PublicKey.findProgramAddressSync([PAYROLL_CONFIG_SEEDS.PAYROLL_CONFIG, utils.bytes.utf8.encode(configName)], translateAddress(configProgramId));
8
11
  }
9
- export function deriveStreamVaultPda(metatadata, programId) {
10
- return PublicKey.findProgramAddressSync([translateAddress(metatadata).toBuffer()], translateAddress(programId));
12
+ export function derivePayrollVaultPda(metatadata, payrollProgramId) {
13
+ return PublicKey.findProgramAddressSync([translateAddress(metatadata).toBuffer()], translateAddress(payrollProgramId));
11
14
  }
package/dist/program.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  import { Program, type Provider } from "@coral-xyz/anchor";
2
+ import { type ZebecConfigs as ZebecConfigsIdl } from "@zebec-network/zebec_configs";
2
3
  import { type ZebecPayroll as ZebecPayrollIdl } from "@zebec-network/zebec_payroll";
3
4
  export declare function createPayrollProgram(provider: Provider): Program<ZebecPayrollIdl>;
5
+ export declare function createZebecConfigProgram(provider: Provider): Program<ZebecConfigsIdl>;
package/dist/program.js CHANGED
@@ -1,5 +1,9 @@
1
1
  import { Program } from "@coral-xyz/anchor";
2
+ import { zebecConfigs as ZEBEC_CONFIGS, } from "@zebec-network/zebec_configs";
2
3
  import { zebecPayroll as ZEBEC_PAYROLL, } from "@zebec-network/zebec_payroll";
3
4
  export function createPayrollProgram(provider) {
4
5
  return new Program(ZEBEC_PAYROLL.idl, provider);
5
6
  }
7
+ export function createZebecConfigProgram(provider) {
8
+ return new Program(ZEBEC_CONFIGS.idl, provider);
9
+ }
@@ -1,20 +1,18 @@
1
1
  import { type Address, type Program } from "@coral-xyz/anchor";
2
2
  import { type Commitment } from "@solana/web3.js";
3
3
  import { TransactionPayload } from "@zebec-network/solana-common";
4
+ import type { ZebecConfigs as ZebecConfigsIdl } from "@zebec-network/zebec_configs";
4
5
  import type { ZebecPayroll as ZebecPayrollIdl } from "@zebec-network/zebec_payroll";
5
- import type { CancelStreamParams, ChangeStreamReceiverParams, CreateStreamParams, InitializeStreamConfigParams, PayrollConfigInfo, PayrollMetadataInfo, SetTopupDelegateParams, TokenMetadata, TopupStreamParams, UpdateStreamConfigParams, WhiteListTokensParams, WithdrawStreamParams } from "./types.js";
6
- export declare function getPayrollConfig(program: Program<ZebecPayrollIdl>, configName: string): Promise<PayrollConfigInfo>;
7
- export declare function getWhitelistedTokens(program: Program<ZebecPayrollIdl>, configName: string, commitment?: "processed" | "confirmed" | "finalized"): Promise<TokenMetadata[]>;
8
- export declare function getStreamMetadataInfo(program: Program<ZebecPayrollIdl>, streamMetadata: Address, commitment?: Commitment): Promise<PayrollMetadataInfo>;
9
- export declare function initializePayrollConfig(program: Program<ZebecPayrollIdl>, params: InitializeStreamConfigParams): Promise<TransactionPayload>;
10
- export declare function updatePayrollConfig(program: Program<ZebecPayrollIdl>, params: UpdateStreamConfigParams): Promise<TransactionPayload>;
11
- export declare function whiteListTokens(program: Program<ZebecPayrollIdl>, params: WhiteListTokensParams): Promise<TransactionPayload>;
12
- export declare function createStream(program: Program<ZebecPayrollIdl>, params: CreateStreamParams): Promise<TransactionPayload>;
13
- export declare function cancelStream(program: Program<ZebecPayrollIdl>, params: CancelStreamParams): Promise<TransactionPayload>;
14
- export declare function pauseResumeStream(program: Program<ZebecPayrollIdl>, params: {
15
- streamMetadata: Address;
6
+ import type { CancelPayrollParams, ChangePayrollReceiverParams, CreatePayrollParams, PayrollConfigInfo, PayrollMetadataInfo, SetTopupDelegateParams, TokenMetadata, TopupPayrollParams, WithdrawPayrollParams } from "./types.js";
7
+ export declare function getPayrollConfig(configProgram: Program<ZebecConfigsIdl>, configName: string): Promise<PayrollConfigInfo>;
8
+ export declare function getWhitelistedTokens(configProgram: Program<ZebecConfigsIdl>, configName: string, commitment?: "processed" | "confirmed" | "finalized"): Promise<TokenMetadata[]>;
9
+ export declare function getPayrollMetadataInfo(program: Program<ZebecPayrollIdl>, payrollMetadata: Address, commitment?: Commitment): Promise<PayrollMetadataInfo>;
10
+ export declare function createPayroll(payrollProgram: Program<ZebecPayrollIdl>, configProgram: Program<ZebecConfigsIdl>, params: CreatePayrollParams, payrollFeeBaseUrl: string): Promise<TransactionPayload>;
11
+ export declare function cancelPayroll(program: Program<ZebecPayrollIdl>, params: CancelPayrollParams): Promise<TransactionPayload>;
12
+ export declare function pauseResumePayroll(program: Program<ZebecPayrollIdl>, params: {
13
+ payrollMetadata: Address;
16
14
  }): Promise<TransactionPayload>;
17
- export declare function withdrawStream(program: Program<ZebecPayrollIdl>, params: WithdrawStreamParams): Promise<TransactionPayload>;
18
- export declare function changeStreamReceiver(program: Program<ZebecPayrollIdl>, params: ChangeStreamReceiverParams): Promise<TransactionPayload>;
19
- export declare function setTopupDelegate(program: Program<ZebecPayrollIdl>, params: SetTopupDelegateParams): Promise<TransactionPayload>;
20
- export declare function topupStream(program: Program<ZebecPayrollIdl>, params: TopupStreamParams): Promise<TransactionPayload>;
15
+ export declare function withdrawPayroll(payrollProgram: Program<ZebecPayrollIdl>, configProgram: Program<ZebecConfigsIdl>, params: WithdrawPayrollParams): Promise<TransactionPayload>;
16
+ export declare function changePayrollReceiver(program: Program<ZebecPayrollIdl>, params: ChangePayrollReceiverParams): Promise<TransactionPayload>;
17
+ export declare function setTopupDelegate(payrollProgram: Program<ZebecPayrollIdl>, configProgram: Program<ZebecConfigsIdl>, params: SetTopupDelegateParams): Promise<TransactionPayload>;
18
+ export declare function topupPayroll(payrollProgram: Program<ZebecPayrollIdl>, configProgram: Program<ZebecConfigsIdl>, params: TopupPayrollParams): Promise<TransactionPayload>;