@solana/subscriptions 0.0.0 → 0.2.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/LICENSE +9 -0
- package/README.md +118 -0
- package/dist/index.cjs +3576 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2019 -0
- package/dist/index.d.ts +2019 -0
- package/dist/index.js +3581 -0
- package/dist/index.js.map +1 -0
- package/package.json +59 -8
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,2019 @@
|
|
|
1
|
+
import * as _solana_kit from '@solana/kit';
|
|
2
|
+
import { FixedSizeCodec, EncodedAccount, Account, MaybeEncodedAccount, MaybeAccount, fetchEncodedAccounts, Address, FetchAccountsConfig, fetchEncodedAccount, FetchAccountConfig, FixedSizeDecoder, FixedSizeEncoder, ProgramDerivedAddress, SolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, ClientWithRpc, GetAccountInfoApi, GetMultipleAccountsApi, ClientWithTransactionPlanning, ClientWithTransactionSending, ReadonlyUint8Array, Instruction, InstructionWithData, TransactionSigner, AccountMeta, InstructionWithAccounts, ReadonlySignerAccount, AccountSignerMeta, ReadonlyAccount, WritableAccount, WritableSignerAccount, AccountInfoWithPubkey, AccountInfoBase, AccountInfoWithBase64EncodedData, Rpc, GetProgramAccountsApi, ClientWithIdentity, ClientWithPayer } from '@solana/kit';
|
|
3
|
+
import { SelfFetchFunctions, SelfPlanAndSendFunctions } from '@solana/program-client-core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
7
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
8
|
+
* to add features, then rerun Codama to update it.
|
|
9
|
+
*
|
|
10
|
+
* @see https://github.com/codama-idl/codama
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
type EventAuthority = {};
|
|
14
|
+
type EventAuthorityArgs = EventAuthority;
|
|
15
|
+
/** Gets the encoder for {@link EventAuthorityArgs} account data. */
|
|
16
|
+
declare function getEventAuthorityEncoder(): FixedSizeEncoder<EventAuthorityArgs>;
|
|
17
|
+
/** Gets the decoder for {@link EventAuthority} account data. */
|
|
18
|
+
declare function getEventAuthorityDecoder(): FixedSizeDecoder<EventAuthority>;
|
|
19
|
+
/** Gets the codec for {@link EventAuthority} account data. */
|
|
20
|
+
declare function getEventAuthorityCodec(): FixedSizeCodec<EventAuthorityArgs, EventAuthority>;
|
|
21
|
+
declare function decodeEventAuthority<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<EventAuthority, TAddress>;
|
|
22
|
+
declare function decodeEventAuthority<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<EventAuthority, TAddress>;
|
|
23
|
+
declare function fetchEventAuthority<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<EventAuthority, TAddress>>;
|
|
24
|
+
declare function fetchMaybeEventAuthority<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<EventAuthority, TAddress>>;
|
|
25
|
+
declare function fetchAllEventAuthority(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<EventAuthority>[]>;
|
|
26
|
+
declare function fetchAllMaybeEventAuthority(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<EventAuthority>[]>;
|
|
27
|
+
declare function fetchEventAuthorityFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], config?: FetchAccountConfig & {
|
|
28
|
+
programAddress?: Address;
|
|
29
|
+
}): Promise<Account<EventAuthority>>;
|
|
30
|
+
declare function fetchMaybeEventAuthorityFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], config?: FetchAccountConfig & {
|
|
31
|
+
programAddress?: Address;
|
|
32
|
+
}): Promise<MaybeAccount<EventAuthority>>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
36
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
37
|
+
* to add features, then rerun Codama to update it.
|
|
38
|
+
*
|
|
39
|
+
* @see https://github.com/codama-idl/codama
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
declare function findEventAuthorityPda(config?: {
|
|
43
|
+
programAddress?: Address | undefined;
|
|
44
|
+
}): Promise<ProgramDerivedAddress>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
48
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
49
|
+
* to add features, then rerun Codama to update it.
|
|
50
|
+
*
|
|
51
|
+
* @see https://github.com/codama-idl/codama
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
type FixedDelegationSeeds = {
|
|
55
|
+
subscriptionAuthority: Address;
|
|
56
|
+
delegator: Address;
|
|
57
|
+
delegatee: Address;
|
|
58
|
+
nonce: number | bigint;
|
|
59
|
+
};
|
|
60
|
+
declare function findFixedDelegationPda(seeds: FixedDelegationSeeds, config?: {
|
|
61
|
+
programAddress?: Address | undefined;
|
|
62
|
+
}): Promise<ProgramDerivedAddress>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
66
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
67
|
+
* to add features, then rerun Codama to update it.
|
|
68
|
+
*
|
|
69
|
+
* @see https://github.com/codama-idl/codama
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
type PlanSeeds = {
|
|
73
|
+
owner: Address;
|
|
74
|
+
planId: number | bigint;
|
|
75
|
+
};
|
|
76
|
+
declare function findPlanPda(seeds: PlanSeeds, config?: {
|
|
77
|
+
programAddress?: Address | undefined;
|
|
78
|
+
}): Promise<ProgramDerivedAddress>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
82
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
83
|
+
* to add features, then rerun Codama to update it.
|
|
84
|
+
*
|
|
85
|
+
* @see https://github.com/codama-idl/codama
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
type RecurringDelegationSeeds = {
|
|
89
|
+
subscriptionAuthority: Address;
|
|
90
|
+
delegator: Address;
|
|
91
|
+
delegatee: Address;
|
|
92
|
+
nonce: number | bigint;
|
|
93
|
+
};
|
|
94
|
+
declare function findRecurringDelegationPda(seeds: RecurringDelegationSeeds, config?: {
|
|
95
|
+
programAddress?: Address | undefined;
|
|
96
|
+
}): Promise<ProgramDerivedAddress>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
100
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
101
|
+
* to add features, then rerun Codama to update it.
|
|
102
|
+
*
|
|
103
|
+
* @see https://github.com/codama-idl/codama
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
type SubscriptionAuthoritySeeds = {
|
|
107
|
+
user: Address;
|
|
108
|
+
tokenMint: Address;
|
|
109
|
+
};
|
|
110
|
+
declare function findSubscriptionAuthorityPda(seeds: SubscriptionAuthoritySeeds, config?: {
|
|
111
|
+
programAddress?: Address | undefined;
|
|
112
|
+
}): Promise<ProgramDerivedAddress>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
116
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
117
|
+
* to add features, then rerun Codama to update it.
|
|
118
|
+
*
|
|
119
|
+
* @see https://github.com/codama-idl/codama
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
type SubscriptionDelegationSeeds = {
|
|
123
|
+
planPda: Address;
|
|
124
|
+
subscriber: Address;
|
|
125
|
+
};
|
|
126
|
+
declare function findSubscriptionDelegationPda(seeds: SubscriptionDelegationSeeds, config?: {
|
|
127
|
+
programAddress?: Address | undefined;
|
|
128
|
+
}): Promise<ProgramDerivedAddress>;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
132
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
133
|
+
* to add features, then rerun Codama to update it.
|
|
134
|
+
*
|
|
135
|
+
* @see https://github.com/codama-idl/codama
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
declare enum AccountDiscriminator {
|
|
139
|
+
SubscriptionAuthority = 0,
|
|
140
|
+
Plan = 1,
|
|
141
|
+
FixedDelegation = 2,
|
|
142
|
+
RecurringDelegation = 3,
|
|
143
|
+
SubscriptionDelegation = 4
|
|
144
|
+
}
|
|
145
|
+
type AccountDiscriminatorArgs = AccountDiscriminator;
|
|
146
|
+
declare function getAccountDiscriminatorEncoder(): FixedSizeEncoder<AccountDiscriminatorArgs>;
|
|
147
|
+
declare function getAccountDiscriminatorDecoder(): FixedSizeDecoder<AccountDiscriminator>;
|
|
148
|
+
declare function getAccountDiscriminatorCodec(): FixedSizeCodec<AccountDiscriminatorArgs, AccountDiscriminator>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
152
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
153
|
+
* to add features, then rerun Codama to update it.
|
|
154
|
+
*
|
|
155
|
+
* @see https://github.com/codama-idl/codama
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
type CreateFixedDelegationData = {
|
|
159
|
+
nonce: bigint;
|
|
160
|
+
amount: bigint;
|
|
161
|
+
expiryTs: bigint;
|
|
162
|
+
};
|
|
163
|
+
type CreateFixedDelegationDataArgs = {
|
|
164
|
+
nonce: number | bigint;
|
|
165
|
+
amount: number | bigint;
|
|
166
|
+
expiryTs: number | bigint;
|
|
167
|
+
};
|
|
168
|
+
declare function getCreateFixedDelegationDataEncoder(): FixedSizeEncoder<CreateFixedDelegationDataArgs>;
|
|
169
|
+
declare function getCreateFixedDelegationDataDecoder(): FixedSizeDecoder<CreateFixedDelegationData>;
|
|
170
|
+
declare function getCreateFixedDelegationDataCodec(): FixedSizeCodec<CreateFixedDelegationDataArgs, CreateFixedDelegationData>;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
174
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
175
|
+
* to add features, then rerun Codama to update it.
|
|
176
|
+
*
|
|
177
|
+
* @see https://github.com/codama-idl/codama
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
type CreateRecurringDelegationData = {
|
|
181
|
+
nonce: bigint;
|
|
182
|
+
amountPerPeriod: bigint;
|
|
183
|
+
periodLengthS: bigint;
|
|
184
|
+
startTs: bigint;
|
|
185
|
+
expiryTs: bigint;
|
|
186
|
+
};
|
|
187
|
+
type CreateRecurringDelegationDataArgs = {
|
|
188
|
+
nonce: number | bigint;
|
|
189
|
+
amountPerPeriod: number | bigint;
|
|
190
|
+
periodLengthS: number | bigint;
|
|
191
|
+
startTs: number | bigint;
|
|
192
|
+
expiryTs: number | bigint;
|
|
193
|
+
};
|
|
194
|
+
declare function getCreateRecurringDelegationDataEncoder(): FixedSizeEncoder<CreateRecurringDelegationDataArgs>;
|
|
195
|
+
declare function getCreateRecurringDelegationDataDecoder(): FixedSizeDecoder<CreateRecurringDelegationData>;
|
|
196
|
+
declare function getCreateRecurringDelegationDataCodec(): FixedSizeCodec<CreateRecurringDelegationDataArgs, CreateRecurringDelegationData>;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
200
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
201
|
+
* to add features, then rerun Codama to update it.
|
|
202
|
+
*
|
|
203
|
+
* @see https://github.com/codama-idl/codama
|
|
204
|
+
*/
|
|
205
|
+
|
|
206
|
+
type Header = {
|
|
207
|
+
discriminator: number;
|
|
208
|
+
version: number;
|
|
209
|
+
bump: number;
|
|
210
|
+
delegator: Address;
|
|
211
|
+
delegatee: Address;
|
|
212
|
+
payer: Address;
|
|
213
|
+
initId: bigint;
|
|
214
|
+
};
|
|
215
|
+
type HeaderArgs = {
|
|
216
|
+
discriminator: number;
|
|
217
|
+
version: number;
|
|
218
|
+
bump: number;
|
|
219
|
+
delegator: Address;
|
|
220
|
+
delegatee: Address;
|
|
221
|
+
payer: Address;
|
|
222
|
+
initId: number | bigint;
|
|
223
|
+
};
|
|
224
|
+
declare function getHeaderEncoder(): FixedSizeEncoder<HeaderArgs>;
|
|
225
|
+
declare function getHeaderDecoder(): FixedSizeDecoder<Header>;
|
|
226
|
+
declare function getHeaderCodec(): FixedSizeCodec<HeaderArgs, Header>;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
230
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
231
|
+
* to add features, then rerun Codama to update it.
|
|
232
|
+
*
|
|
233
|
+
* @see https://github.com/codama-idl/codama
|
|
234
|
+
*/
|
|
235
|
+
|
|
236
|
+
type PlanData = {
|
|
237
|
+
planId: bigint;
|
|
238
|
+
mint: Address;
|
|
239
|
+
terms: PlanTerms;
|
|
240
|
+
endTs: bigint;
|
|
241
|
+
destinations: Array<Address>;
|
|
242
|
+
pullers: Array<Address>;
|
|
243
|
+
metadataUri: string;
|
|
244
|
+
};
|
|
245
|
+
type PlanDataArgs = {
|
|
246
|
+
planId: number | bigint;
|
|
247
|
+
mint: Address;
|
|
248
|
+
terms: PlanTermsArgs;
|
|
249
|
+
endTs: number | bigint;
|
|
250
|
+
destinations: Array<Address>;
|
|
251
|
+
pullers: Array<Address>;
|
|
252
|
+
metadataUri: string;
|
|
253
|
+
};
|
|
254
|
+
declare function getPlanDataEncoder(): FixedSizeEncoder<PlanDataArgs>;
|
|
255
|
+
declare function getPlanDataDecoder(): FixedSizeDecoder<PlanData>;
|
|
256
|
+
declare function getPlanDataCodec(): FixedSizeCodec<PlanDataArgs, PlanData>;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
260
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
261
|
+
* to add features, then rerun Codama to update it.
|
|
262
|
+
*
|
|
263
|
+
* @see https://github.com/codama-idl/codama
|
|
264
|
+
*/
|
|
265
|
+
|
|
266
|
+
declare enum PlanStatus {
|
|
267
|
+
Sunset = 0,
|
|
268
|
+
Active = 1
|
|
269
|
+
}
|
|
270
|
+
type PlanStatusArgs = PlanStatus;
|
|
271
|
+
declare function getPlanStatusEncoder(): FixedSizeEncoder<PlanStatusArgs>;
|
|
272
|
+
declare function getPlanStatusDecoder(): FixedSizeDecoder<PlanStatus>;
|
|
273
|
+
declare function getPlanStatusCodec(): FixedSizeCodec<PlanStatusArgs, PlanStatus>;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
277
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
278
|
+
* to add features, then rerun Codama to update it.
|
|
279
|
+
*
|
|
280
|
+
* @see https://github.com/codama-idl/codama
|
|
281
|
+
*/
|
|
282
|
+
|
|
283
|
+
type PlanTerms = {
|
|
284
|
+
amount: bigint;
|
|
285
|
+
periodHours: bigint;
|
|
286
|
+
createdAt: bigint;
|
|
287
|
+
};
|
|
288
|
+
type PlanTermsArgs = {
|
|
289
|
+
amount: number | bigint;
|
|
290
|
+
periodHours: number | bigint;
|
|
291
|
+
createdAt: number | bigint;
|
|
292
|
+
};
|
|
293
|
+
declare function getPlanTermsEncoder(): FixedSizeEncoder<PlanTermsArgs>;
|
|
294
|
+
declare function getPlanTermsDecoder(): FixedSizeDecoder<PlanTerms>;
|
|
295
|
+
declare function getPlanTermsCodec(): FixedSizeCodec<PlanTermsArgs, PlanTerms>;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
299
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
300
|
+
* to add features, then rerun Codama to update it.
|
|
301
|
+
*
|
|
302
|
+
* @see https://github.com/codama-idl/codama
|
|
303
|
+
*/
|
|
304
|
+
|
|
305
|
+
type SubscribeData = {
|
|
306
|
+
planId: bigint;
|
|
307
|
+
planBump: number;
|
|
308
|
+
expectedMint: Address;
|
|
309
|
+
expectedAmount: bigint;
|
|
310
|
+
expectedPeriodHours: bigint;
|
|
311
|
+
expectedCreatedAt: bigint;
|
|
312
|
+
};
|
|
313
|
+
type SubscribeDataArgs = {
|
|
314
|
+
planId: number | bigint;
|
|
315
|
+
planBump: number;
|
|
316
|
+
expectedMint: Address;
|
|
317
|
+
expectedAmount: number | bigint;
|
|
318
|
+
expectedPeriodHours: number | bigint;
|
|
319
|
+
expectedCreatedAt: number | bigint;
|
|
320
|
+
};
|
|
321
|
+
declare function getSubscribeDataEncoder(): FixedSizeEncoder<SubscribeDataArgs>;
|
|
322
|
+
declare function getSubscribeDataDecoder(): FixedSizeDecoder<SubscribeData>;
|
|
323
|
+
declare function getSubscribeDataCodec(): FixedSizeCodec<SubscribeDataArgs, SubscribeData>;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
327
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
328
|
+
* to add features, then rerun Codama to update it.
|
|
329
|
+
*
|
|
330
|
+
* @see https://github.com/codama-idl/codama
|
|
331
|
+
*/
|
|
332
|
+
|
|
333
|
+
type TransferData = {
|
|
334
|
+
amount: bigint;
|
|
335
|
+
delegator: Address;
|
|
336
|
+
mint: Address;
|
|
337
|
+
};
|
|
338
|
+
type TransferDataArgs = {
|
|
339
|
+
amount: number | bigint;
|
|
340
|
+
delegator: Address;
|
|
341
|
+
mint: Address;
|
|
342
|
+
};
|
|
343
|
+
declare function getTransferDataEncoder(): FixedSizeEncoder<TransferDataArgs>;
|
|
344
|
+
declare function getTransferDataDecoder(): FixedSizeDecoder<TransferData>;
|
|
345
|
+
declare function getTransferDataCodec(): FixedSizeCodec<TransferDataArgs, TransferData>;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
349
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
350
|
+
* to add features, then rerun Codama to update it.
|
|
351
|
+
*
|
|
352
|
+
* @see https://github.com/codama-idl/codama
|
|
353
|
+
*/
|
|
354
|
+
|
|
355
|
+
type UpdatePlanData = {
|
|
356
|
+
status: number;
|
|
357
|
+
endTs: bigint;
|
|
358
|
+
pullers: Array<Address>;
|
|
359
|
+
metadataUri: string;
|
|
360
|
+
};
|
|
361
|
+
type UpdatePlanDataArgs = {
|
|
362
|
+
status: number;
|
|
363
|
+
endTs: number | bigint;
|
|
364
|
+
pullers: Array<Address>;
|
|
365
|
+
metadataUri: string;
|
|
366
|
+
};
|
|
367
|
+
declare function getUpdatePlanDataEncoder(): FixedSizeEncoder<UpdatePlanDataArgs>;
|
|
368
|
+
declare function getUpdatePlanDataDecoder(): FixedSizeDecoder<UpdatePlanData>;
|
|
369
|
+
declare function getUpdatePlanDataCodec(): FixedSizeCodec<UpdatePlanDataArgs, UpdatePlanData>;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
373
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
374
|
+
* to add features, then rerun Codama to update it.
|
|
375
|
+
*
|
|
376
|
+
* @see https://github.com/codama-idl/codama
|
|
377
|
+
*/
|
|
378
|
+
|
|
379
|
+
type FixedDelegation = {
|
|
380
|
+
header: Header;
|
|
381
|
+
subscriptionAuthority: Address;
|
|
382
|
+
mint: Address;
|
|
383
|
+
amount: bigint;
|
|
384
|
+
expiryTs: bigint;
|
|
385
|
+
};
|
|
386
|
+
type FixedDelegationArgs = {
|
|
387
|
+
header: HeaderArgs;
|
|
388
|
+
subscriptionAuthority: Address;
|
|
389
|
+
mint: Address;
|
|
390
|
+
amount: number | bigint;
|
|
391
|
+
expiryTs: number | bigint;
|
|
392
|
+
};
|
|
393
|
+
/** Gets the encoder for {@link FixedDelegationArgs} account data. */
|
|
394
|
+
declare function getFixedDelegationEncoder(): FixedSizeEncoder<FixedDelegationArgs>;
|
|
395
|
+
/** Gets the decoder for {@link FixedDelegation} account data. */
|
|
396
|
+
declare function getFixedDelegationDecoder(): FixedSizeDecoder<FixedDelegation>;
|
|
397
|
+
/** Gets the codec for {@link FixedDelegation} account data. */
|
|
398
|
+
declare function getFixedDelegationCodec(): FixedSizeCodec<FixedDelegationArgs, FixedDelegation>;
|
|
399
|
+
declare function decodeFixedDelegation<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<FixedDelegation, TAddress>;
|
|
400
|
+
declare function decodeFixedDelegation<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<FixedDelegation, TAddress>;
|
|
401
|
+
declare function fetchFixedDelegation<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<FixedDelegation, TAddress>>;
|
|
402
|
+
declare function fetchMaybeFixedDelegation<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<FixedDelegation, TAddress>>;
|
|
403
|
+
declare function fetchAllFixedDelegation(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<FixedDelegation>[]>;
|
|
404
|
+
declare function fetchAllMaybeFixedDelegation(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<FixedDelegation>[]>;
|
|
405
|
+
declare function fetchFixedDelegationFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: FixedDelegationSeeds, config?: FetchAccountConfig & {
|
|
406
|
+
programAddress?: Address;
|
|
407
|
+
}): Promise<Account<FixedDelegation>>;
|
|
408
|
+
declare function fetchMaybeFixedDelegationFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: FixedDelegationSeeds, config?: FetchAccountConfig & {
|
|
409
|
+
programAddress?: Address;
|
|
410
|
+
}): Promise<MaybeAccount<FixedDelegation>>;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
414
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
415
|
+
* to add features, then rerun Codama to update it.
|
|
416
|
+
*
|
|
417
|
+
* @see https://github.com/codama-idl/codama
|
|
418
|
+
*/
|
|
419
|
+
|
|
420
|
+
type Plan = {
|
|
421
|
+
discriminator: number;
|
|
422
|
+
owner: Address;
|
|
423
|
+
bump: number;
|
|
424
|
+
status: number;
|
|
425
|
+
data: PlanData;
|
|
426
|
+
};
|
|
427
|
+
type PlanArgs = {
|
|
428
|
+
discriminator: number;
|
|
429
|
+
owner: Address;
|
|
430
|
+
bump: number;
|
|
431
|
+
status: number;
|
|
432
|
+
data: PlanDataArgs;
|
|
433
|
+
};
|
|
434
|
+
/** Gets the encoder for {@link PlanArgs} account data. */
|
|
435
|
+
declare function getPlanEncoder(): FixedSizeEncoder<PlanArgs>;
|
|
436
|
+
/** Gets the decoder for {@link Plan} account data. */
|
|
437
|
+
declare function getPlanDecoder(): FixedSizeDecoder<Plan>;
|
|
438
|
+
/** Gets the codec for {@link Plan} account data. */
|
|
439
|
+
declare function getPlanCodec(): FixedSizeCodec<PlanArgs, Plan>;
|
|
440
|
+
declare function decodePlan<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<Plan, TAddress>;
|
|
441
|
+
declare function decodePlan<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<Plan, TAddress>;
|
|
442
|
+
declare function fetchPlan<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<Plan, TAddress>>;
|
|
443
|
+
declare function fetchMaybePlan<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<Plan, TAddress>>;
|
|
444
|
+
declare function fetchAllPlan(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<Plan>[]>;
|
|
445
|
+
declare function fetchAllMaybePlan(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<Plan>[]>;
|
|
446
|
+
declare function fetchPlanFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: PlanSeeds, config?: FetchAccountConfig & {
|
|
447
|
+
programAddress?: Address;
|
|
448
|
+
}): Promise<Account<Plan>>;
|
|
449
|
+
declare function fetchMaybePlanFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: PlanSeeds, config?: FetchAccountConfig & {
|
|
450
|
+
programAddress?: Address;
|
|
451
|
+
}): Promise<MaybeAccount<Plan>>;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
455
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
456
|
+
* to add features, then rerun Codama to update it.
|
|
457
|
+
*
|
|
458
|
+
* @see https://github.com/codama-idl/codama
|
|
459
|
+
*/
|
|
460
|
+
|
|
461
|
+
type RecurringDelegation = {
|
|
462
|
+
header: Header;
|
|
463
|
+
subscriptionAuthority: Address;
|
|
464
|
+
mint: Address;
|
|
465
|
+
currentPeriodStartTs: bigint;
|
|
466
|
+
periodLengthS: bigint;
|
|
467
|
+
expiryTs: bigint;
|
|
468
|
+
amountPerPeriod: bigint;
|
|
469
|
+
amountPulledInPeriod: bigint;
|
|
470
|
+
};
|
|
471
|
+
type RecurringDelegationArgs = {
|
|
472
|
+
header: HeaderArgs;
|
|
473
|
+
subscriptionAuthority: Address;
|
|
474
|
+
mint: Address;
|
|
475
|
+
currentPeriodStartTs: number | bigint;
|
|
476
|
+
periodLengthS: number | bigint;
|
|
477
|
+
expiryTs: number | bigint;
|
|
478
|
+
amountPerPeriod: number | bigint;
|
|
479
|
+
amountPulledInPeriod: number | bigint;
|
|
480
|
+
};
|
|
481
|
+
/** Gets the encoder for {@link RecurringDelegationArgs} account data. */
|
|
482
|
+
declare function getRecurringDelegationEncoder(): FixedSizeEncoder<RecurringDelegationArgs>;
|
|
483
|
+
/** Gets the decoder for {@link RecurringDelegation} account data. */
|
|
484
|
+
declare function getRecurringDelegationDecoder(): FixedSizeDecoder<RecurringDelegation>;
|
|
485
|
+
/** Gets the codec for {@link RecurringDelegation} account data. */
|
|
486
|
+
declare function getRecurringDelegationCodec(): FixedSizeCodec<RecurringDelegationArgs, RecurringDelegation>;
|
|
487
|
+
declare function decodeRecurringDelegation<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<RecurringDelegation, TAddress>;
|
|
488
|
+
declare function decodeRecurringDelegation<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<RecurringDelegation, TAddress>;
|
|
489
|
+
declare function fetchRecurringDelegation<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<RecurringDelegation, TAddress>>;
|
|
490
|
+
declare function fetchMaybeRecurringDelegation<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<RecurringDelegation, TAddress>>;
|
|
491
|
+
declare function fetchAllRecurringDelegation(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<RecurringDelegation>[]>;
|
|
492
|
+
declare function fetchAllMaybeRecurringDelegation(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<RecurringDelegation>[]>;
|
|
493
|
+
declare function fetchRecurringDelegationFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: RecurringDelegationSeeds, config?: FetchAccountConfig & {
|
|
494
|
+
programAddress?: Address;
|
|
495
|
+
}): Promise<Account<RecurringDelegation>>;
|
|
496
|
+
declare function fetchMaybeRecurringDelegationFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: RecurringDelegationSeeds, config?: FetchAccountConfig & {
|
|
497
|
+
programAddress?: Address;
|
|
498
|
+
}): Promise<MaybeAccount<RecurringDelegation>>;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
502
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
503
|
+
* to add features, then rerun Codama to update it.
|
|
504
|
+
*
|
|
505
|
+
* @see https://github.com/codama-idl/codama
|
|
506
|
+
*/
|
|
507
|
+
|
|
508
|
+
type SubscriptionAuthority = {
|
|
509
|
+
discriminator: number;
|
|
510
|
+
user: Address;
|
|
511
|
+
tokenMint: Address;
|
|
512
|
+
payer: Address;
|
|
513
|
+
bump: number;
|
|
514
|
+
initId: bigint;
|
|
515
|
+
};
|
|
516
|
+
type SubscriptionAuthorityArgs = {
|
|
517
|
+
discriminator: number;
|
|
518
|
+
user: Address;
|
|
519
|
+
tokenMint: Address;
|
|
520
|
+
payer: Address;
|
|
521
|
+
bump: number;
|
|
522
|
+
initId: number | bigint;
|
|
523
|
+
};
|
|
524
|
+
/** Gets the encoder for {@link SubscriptionAuthorityArgs} account data. */
|
|
525
|
+
declare function getSubscriptionAuthorityEncoder(): FixedSizeEncoder<SubscriptionAuthorityArgs>;
|
|
526
|
+
/** Gets the decoder for {@link SubscriptionAuthority} account data. */
|
|
527
|
+
declare function getSubscriptionAuthorityDecoder(): FixedSizeDecoder<SubscriptionAuthority>;
|
|
528
|
+
/** Gets the codec for {@link SubscriptionAuthority} account data. */
|
|
529
|
+
declare function getSubscriptionAuthorityCodec(): FixedSizeCodec<SubscriptionAuthorityArgs, SubscriptionAuthority>;
|
|
530
|
+
declare function decodeSubscriptionAuthority<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<SubscriptionAuthority, TAddress>;
|
|
531
|
+
declare function decodeSubscriptionAuthority<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<SubscriptionAuthority, TAddress>;
|
|
532
|
+
declare function fetchSubscriptionAuthority<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<SubscriptionAuthority, TAddress>>;
|
|
533
|
+
declare function fetchMaybeSubscriptionAuthority<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<SubscriptionAuthority, TAddress>>;
|
|
534
|
+
declare function fetchAllSubscriptionAuthority(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<SubscriptionAuthority>[]>;
|
|
535
|
+
declare function fetchAllMaybeSubscriptionAuthority(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<SubscriptionAuthority>[]>;
|
|
536
|
+
declare function fetchSubscriptionAuthorityFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: SubscriptionAuthoritySeeds, config?: FetchAccountConfig & {
|
|
537
|
+
programAddress?: Address;
|
|
538
|
+
}): Promise<Account<SubscriptionAuthority>>;
|
|
539
|
+
declare function fetchMaybeSubscriptionAuthorityFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: SubscriptionAuthoritySeeds, config?: FetchAccountConfig & {
|
|
540
|
+
programAddress?: Address;
|
|
541
|
+
}): Promise<MaybeAccount<SubscriptionAuthority>>;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
545
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
546
|
+
* to add features, then rerun Codama to update it.
|
|
547
|
+
*
|
|
548
|
+
* @see https://github.com/codama-idl/codama
|
|
549
|
+
*/
|
|
550
|
+
|
|
551
|
+
type SubscriptionDelegation = {
|
|
552
|
+
header: Header;
|
|
553
|
+
terms: PlanTerms;
|
|
554
|
+
amountPulledInPeriod: bigint;
|
|
555
|
+
currentPeriodStartTs: bigint;
|
|
556
|
+
expiresAtTs: bigint;
|
|
557
|
+
};
|
|
558
|
+
type SubscriptionDelegationArgs = {
|
|
559
|
+
header: HeaderArgs;
|
|
560
|
+
terms: PlanTermsArgs;
|
|
561
|
+
amountPulledInPeriod: number | bigint;
|
|
562
|
+
currentPeriodStartTs: number | bigint;
|
|
563
|
+
expiresAtTs: number | bigint;
|
|
564
|
+
};
|
|
565
|
+
/** Gets the encoder for {@link SubscriptionDelegationArgs} account data. */
|
|
566
|
+
declare function getSubscriptionDelegationEncoder(): FixedSizeEncoder<SubscriptionDelegationArgs>;
|
|
567
|
+
/** Gets the decoder for {@link SubscriptionDelegation} account data. */
|
|
568
|
+
declare function getSubscriptionDelegationDecoder(): FixedSizeDecoder<SubscriptionDelegation>;
|
|
569
|
+
/** Gets the codec for {@link SubscriptionDelegation} account data. */
|
|
570
|
+
declare function getSubscriptionDelegationCodec(): FixedSizeCodec<SubscriptionDelegationArgs, SubscriptionDelegation>;
|
|
571
|
+
declare function decodeSubscriptionDelegation<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<SubscriptionDelegation, TAddress>;
|
|
572
|
+
declare function decodeSubscriptionDelegation<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<SubscriptionDelegation, TAddress>;
|
|
573
|
+
declare function fetchSubscriptionDelegation<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<SubscriptionDelegation, TAddress>>;
|
|
574
|
+
declare function fetchMaybeSubscriptionDelegation<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<SubscriptionDelegation, TAddress>>;
|
|
575
|
+
declare function fetchAllSubscriptionDelegation(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<SubscriptionDelegation>[]>;
|
|
576
|
+
declare function fetchAllMaybeSubscriptionDelegation(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<SubscriptionDelegation>[]>;
|
|
577
|
+
declare function fetchSubscriptionDelegationFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: SubscriptionDelegationSeeds, config?: FetchAccountConfig & {
|
|
578
|
+
programAddress?: Address;
|
|
579
|
+
}): Promise<Account<SubscriptionDelegation>>;
|
|
580
|
+
declare function fetchMaybeSubscriptionDelegationFromSeeds(rpc: Parameters<typeof fetchEncodedAccount>[0], seeds: SubscriptionDelegationSeeds, config?: FetchAccountConfig & {
|
|
581
|
+
programAddress?: Address;
|
|
582
|
+
}): Promise<MaybeAccount<SubscriptionDelegation>>;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
586
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
587
|
+
* to add features, then rerun Codama to update it.
|
|
588
|
+
*
|
|
589
|
+
* @see https://github.com/codama-idl/codama
|
|
590
|
+
*/
|
|
591
|
+
|
|
592
|
+
declare const SUBSCRIPTIONS_ERROR__NOT_SIGNER = 100;
|
|
593
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_ADDRESS = 101;
|
|
594
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_ESCROW_PDA = 102;
|
|
595
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_SUBSCRIPTION_AUTHORITY_PDA = 103;
|
|
596
|
+
declare const SUBSCRIPTIONS_ERROR__NOT_SYSTEM_PROGRAM = 104;
|
|
597
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_TOKEN_PROGRAM = 105;
|
|
598
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_TOKEN2022_MINT_ACCOUNT_DATA = 106;
|
|
599
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_TOKEN2022_TOKEN_ACCOUNT_DATA = 107;
|
|
600
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_ASSOCIATED_TOKEN_ACCOUNT_DERIVED_ADDRESS = 108;
|
|
601
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_TOKEN_SPL_MINT_ACCOUNT_DATA = 109;
|
|
602
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_TOKEN_SPL_TOKEN_ACCOUNT_DATA = 110;
|
|
603
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_ACCOUNT_DATA = 111;
|
|
604
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_INSTRUCTION_DATA = 112;
|
|
605
|
+
declare const SUBSCRIPTIONS_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = 113;
|
|
606
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_INSTRUCTION = 114;
|
|
607
|
+
declare const SUBSCRIPTIONS_ERROR__ARITHMETIC_OVERFLOW = 115;
|
|
608
|
+
declare const SUBSCRIPTIONS_ERROR__ARITHMETIC_UNDERFLOW = 116;
|
|
609
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_ACCOUNT_DISCRIMINATOR = 117;
|
|
610
|
+
declare const SUBSCRIPTIONS_ERROR__MINT_HAS_CONFIDENTIAL_TRANSFER = 118;
|
|
611
|
+
declare const SUBSCRIPTIONS_ERROR__MINT_HAS_NON_TRANSFERABLE = 119;
|
|
612
|
+
declare const SUBSCRIPTIONS_ERROR__MINT_HAS_PERMANENT_DELEGATE = 120;
|
|
613
|
+
declare const SUBSCRIPTIONS_ERROR__MINT_HAS_TRANSFER_HOOK = 121;
|
|
614
|
+
declare const SUBSCRIPTIONS_ERROR__MINT_HAS_TRANSFER_FEE = 122;
|
|
615
|
+
declare const SUBSCRIPTIONS_ERROR__MINT_HAS_MINT_CLOSE_AUTHORITY = 123;
|
|
616
|
+
declare const SUBSCRIPTIONS_ERROR__MINT_HAS_PAUSABLE = 124;
|
|
617
|
+
declare const SUBSCRIPTIONS_ERROR__MINT_MISMATCH = 125;
|
|
618
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_DELEGATE_PDA = 126;
|
|
619
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_HEADER_DATA = 127;
|
|
620
|
+
declare const SUBSCRIPTIONS_ERROR__DELEGATION_EXPIRED = 128;
|
|
621
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_AMOUNT = 129;
|
|
622
|
+
declare const SUBSCRIPTIONS_ERROR__UNAUTHORIZED = 130;
|
|
623
|
+
declare const SUBSCRIPTIONS_ERROR__ACCOUNT_NOT_WRITABLE = 131;
|
|
624
|
+
declare const SUBSCRIPTIONS_ERROR__ATA_OWNER_MISMATCH = 132;
|
|
625
|
+
declare const SUBSCRIPTIONS_ERROR__DELEGATION_VERSION_MISMATCH = 133;
|
|
626
|
+
declare const SUBSCRIPTIONS_ERROR__MIGRATION_REQUIRED = 134;
|
|
627
|
+
declare const SUBSCRIPTIONS_ERROR__DELEGATION_ALREADY_EXISTS = 135;
|
|
628
|
+
declare const SUBSCRIPTIONS_ERROR__STALE_SUBSCRIPTION_AUTHORITY = 136;
|
|
629
|
+
declare const SUBSCRIPTIONS_ERROR__AMOUNT_EXCEEDS_LIMIT = 300;
|
|
630
|
+
declare const SUBSCRIPTIONS_ERROR__FIXED_DELEGATION_EXPIRY_IN_PAST = 301;
|
|
631
|
+
declare const SUBSCRIPTIONS_ERROR__FIXED_DELEGATION_AMOUNT_ZERO = 302;
|
|
632
|
+
declare const SUBSCRIPTIONS_ERROR__AMOUNT_EXCEEDS_PERIOD_LIMIT = 400;
|
|
633
|
+
declare const SUBSCRIPTIONS_ERROR__PERIOD_NOT_ELAPSED = 401;
|
|
634
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_PERIOD_LENGTH = 402;
|
|
635
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_PAYER_DATA = 403;
|
|
636
|
+
declare const SUBSCRIPTIONS_ERROR__RECURRING_DELEGATION_START_TIME_IN_PAST = 404;
|
|
637
|
+
declare const SUBSCRIPTIONS_ERROR__RECURRING_DELEGATION_START_TIME_GREATER_THAN_EXPIRY = 405;
|
|
638
|
+
declare const SUBSCRIPTIONS_ERROR__RECURRING_DELEGATION_AMOUNT_ZERO = 406;
|
|
639
|
+
declare const SUBSCRIPTIONS_ERROR__DELEGATION_NOT_STARTED = 407;
|
|
640
|
+
declare const SUBSCRIPTIONS_ERROR__PLAN_SUNSET = 500;
|
|
641
|
+
declare const SUBSCRIPTIONS_ERROR__PLAN_EXPIRED = 501;
|
|
642
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_PLAN_PDA = 502;
|
|
643
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_SUBSCRIPTION_PDA = 503;
|
|
644
|
+
declare const SUBSCRIPTIONS_ERROR__NOT_PLAN_OWNER = 504;
|
|
645
|
+
declare const SUBSCRIPTIONS_ERROR__SUBSCRIPTION_PLAN_MISMATCH = 505;
|
|
646
|
+
declare const SUBSCRIPTIONS_ERROR__UNAUTHORIZED_DESTINATION = 506;
|
|
647
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_NUM_DESTINATIONS = 507;
|
|
648
|
+
declare const SUBSCRIPTIONS_ERROR__SUBSCRIPTION_CANCELLED = 508;
|
|
649
|
+
declare const SUBSCRIPTIONS_ERROR__SUBSCRIPTION_ALREADY_CANCELLED = 509;
|
|
650
|
+
declare const SUBSCRIPTIONS_ERROR__SUBSCRIPTION_NOT_CANCELLED = 510;
|
|
651
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_END_TS = 511;
|
|
652
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_PLAN_STATUS = 512;
|
|
653
|
+
declare const SUBSCRIPTIONS_ERROR__PLAN_IMMUTABLE_AFTER_SUNSET = 513;
|
|
654
|
+
declare const SUBSCRIPTIONS_ERROR__SUNSET_REQUIRES_END_TS = 514;
|
|
655
|
+
declare const SUBSCRIPTIONS_ERROR__PLAN_NOT_EXPIRED = 515;
|
|
656
|
+
declare const SUBSCRIPTIONS_ERROR__PLAN_CLOSED = 516;
|
|
657
|
+
declare const SUBSCRIPTIONS_ERROR__ALREADY_SUBSCRIBED = 517;
|
|
658
|
+
declare const SUBSCRIPTIONS_ERROR__PLAN_ALREADY_EXISTS = 518;
|
|
659
|
+
declare const SUBSCRIPTIONS_ERROR__PLAN_TERMS_MISMATCH = 519;
|
|
660
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_EVENT_AUTHORITY = 600;
|
|
661
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_EVENT_DATA = 601;
|
|
662
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_EVENT_TAG = 602;
|
|
663
|
+
declare const SUBSCRIPTIONS_ERROR__INVALID_EVENT_DISCRIMINATOR = 603;
|
|
664
|
+
type SubscriptionsError = typeof SUBSCRIPTIONS_ERROR__ACCOUNT_NOT_WRITABLE | typeof SUBSCRIPTIONS_ERROR__ALREADY_SUBSCRIBED | typeof SUBSCRIPTIONS_ERROR__AMOUNT_EXCEEDS_LIMIT | typeof SUBSCRIPTIONS_ERROR__AMOUNT_EXCEEDS_PERIOD_LIMIT | typeof SUBSCRIPTIONS_ERROR__ARITHMETIC_OVERFLOW | typeof SUBSCRIPTIONS_ERROR__ARITHMETIC_UNDERFLOW | typeof SUBSCRIPTIONS_ERROR__ATA_OWNER_MISMATCH | typeof SUBSCRIPTIONS_ERROR__DELEGATION_ALREADY_EXISTS | typeof SUBSCRIPTIONS_ERROR__DELEGATION_EXPIRED | typeof SUBSCRIPTIONS_ERROR__DELEGATION_NOT_STARTED | typeof SUBSCRIPTIONS_ERROR__DELEGATION_VERSION_MISMATCH | typeof SUBSCRIPTIONS_ERROR__FIXED_DELEGATION_AMOUNT_ZERO | typeof SUBSCRIPTIONS_ERROR__FIXED_DELEGATION_EXPIRY_IN_PAST | typeof SUBSCRIPTIONS_ERROR__INVALID_ACCOUNT_DATA | typeof SUBSCRIPTIONS_ERROR__INVALID_ACCOUNT_DISCRIMINATOR | typeof SUBSCRIPTIONS_ERROR__INVALID_ADDRESS | typeof SUBSCRIPTIONS_ERROR__INVALID_AMOUNT | typeof SUBSCRIPTIONS_ERROR__INVALID_ASSOCIATED_TOKEN_ACCOUNT_DERIVED_ADDRESS | typeof SUBSCRIPTIONS_ERROR__INVALID_DELEGATE_PDA | typeof SUBSCRIPTIONS_ERROR__INVALID_END_TS | typeof SUBSCRIPTIONS_ERROR__INVALID_ESCROW_PDA | typeof SUBSCRIPTIONS_ERROR__INVALID_EVENT_AUTHORITY | typeof SUBSCRIPTIONS_ERROR__INVALID_EVENT_DATA | typeof SUBSCRIPTIONS_ERROR__INVALID_EVENT_DISCRIMINATOR | typeof SUBSCRIPTIONS_ERROR__INVALID_EVENT_TAG | typeof SUBSCRIPTIONS_ERROR__INVALID_HEADER_DATA | typeof SUBSCRIPTIONS_ERROR__INVALID_INSTRUCTION | typeof SUBSCRIPTIONS_ERROR__INVALID_INSTRUCTION_DATA | typeof SUBSCRIPTIONS_ERROR__INVALID_NUM_DESTINATIONS | typeof SUBSCRIPTIONS_ERROR__INVALID_PAYER_DATA | typeof SUBSCRIPTIONS_ERROR__INVALID_PERIOD_LENGTH | typeof SUBSCRIPTIONS_ERROR__INVALID_PLAN_PDA | typeof SUBSCRIPTIONS_ERROR__INVALID_PLAN_STATUS | typeof SUBSCRIPTIONS_ERROR__INVALID_SUBSCRIPTION_AUTHORITY_PDA | typeof SUBSCRIPTIONS_ERROR__INVALID_SUBSCRIPTION_PDA | typeof SUBSCRIPTIONS_ERROR__INVALID_TOKEN2022_MINT_ACCOUNT_DATA | typeof SUBSCRIPTIONS_ERROR__INVALID_TOKEN2022_TOKEN_ACCOUNT_DATA | typeof SUBSCRIPTIONS_ERROR__INVALID_TOKEN_PROGRAM | typeof SUBSCRIPTIONS_ERROR__INVALID_TOKEN_SPL_MINT_ACCOUNT_DATA | typeof SUBSCRIPTIONS_ERROR__INVALID_TOKEN_SPL_TOKEN_ACCOUNT_DATA | typeof SUBSCRIPTIONS_ERROR__MIGRATION_REQUIRED | typeof SUBSCRIPTIONS_ERROR__MINT_HAS_CONFIDENTIAL_TRANSFER | typeof SUBSCRIPTIONS_ERROR__MINT_HAS_MINT_CLOSE_AUTHORITY | typeof SUBSCRIPTIONS_ERROR__MINT_HAS_NON_TRANSFERABLE | typeof SUBSCRIPTIONS_ERROR__MINT_HAS_PAUSABLE | typeof SUBSCRIPTIONS_ERROR__MINT_HAS_PERMANENT_DELEGATE | typeof SUBSCRIPTIONS_ERROR__MINT_HAS_TRANSFER_FEE | typeof SUBSCRIPTIONS_ERROR__MINT_HAS_TRANSFER_HOOK | typeof SUBSCRIPTIONS_ERROR__MINT_MISMATCH | typeof SUBSCRIPTIONS_ERROR__NOT_ENOUGH_ACCOUNT_KEYS | typeof SUBSCRIPTIONS_ERROR__NOT_PLAN_OWNER | typeof SUBSCRIPTIONS_ERROR__NOT_SIGNER | typeof SUBSCRIPTIONS_ERROR__NOT_SYSTEM_PROGRAM | typeof SUBSCRIPTIONS_ERROR__PERIOD_NOT_ELAPSED | typeof SUBSCRIPTIONS_ERROR__PLAN_ALREADY_EXISTS | typeof SUBSCRIPTIONS_ERROR__PLAN_CLOSED | typeof SUBSCRIPTIONS_ERROR__PLAN_EXPIRED | typeof SUBSCRIPTIONS_ERROR__PLAN_IMMUTABLE_AFTER_SUNSET | typeof SUBSCRIPTIONS_ERROR__PLAN_NOT_EXPIRED | typeof SUBSCRIPTIONS_ERROR__PLAN_SUNSET | typeof SUBSCRIPTIONS_ERROR__PLAN_TERMS_MISMATCH | typeof SUBSCRIPTIONS_ERROR__RECURRING_DELEGATION_AMOUNT_ZERO | typeof SUBSCRIPTIONS_ERROR__RECURRING_DELEGATION_START_TIME_GREATER_THAN_EXPIRY | typeof SUBSCRIPTIONS_ERROR__RECURRING_DELEGATION_START_TIME_IN_PAST | typeof SUBSCRIPTIONS_ERROR__STALE_SUBSCRIPTION_AUTHORITY | typeof SUBSCRIPTIONS_ERROR__SUBSCRIPTION_ALREADY_CANCELLED | typeof SUBSCRIPTIONS_ERROR__SUBSCRIPTION_CANCELLED | typeof SUBSCRIPTIONS_ERROR__SUBSCRIPTION_NOT_CANCELLED | typeof SUBSCRIPTIONS_ERROR__SUBSCRIPTION_PLAN_MISMATCH | typeof SUBSCRIPTIONS_ERROR__SUNSET_REQUIRES_END_TS | typeof SUBSCRIPTIONS_ERROR__UNAUTHORIZED | typeof SUBSCRIPTIONS_ERROR__UNAUTHORIZED_DESTINATION;
|
|
665
|
+
declare function getSubscriptionsErrorMessage(code: SubscriptionsError): string;
|
|
666
|
+
declare function isSubscriptionsError<TProgramErrorCode extends SubscriptionsError>(error: unknown, transactionMessage: {
|
|
667
|
+
instructions: Record<number, {
|
|
668
|
+
programAddress: Address;
|
|
669
|
+
}>;
|
|
670
|
+
}, code?: TProgramErrorCode): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{
|
|
671
|
+
context: Readonly<{
|
|
672
|
+
code: TProgramErrorCode;
|
|
673
|
+
}>;
|
|
674
|
+
}>;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
678
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
679
|
+
* to add features, then rerun Codama to update it.
|
|
680
|
+
*
|
|
681
|
+
* @see https://github.com/codama-idl/codama
|
|
682
|
+
*/
|
|
683
|
+
|
|
684
|
+
declare const SUBSCRIPTIONS_PROGRAM_ADDRESS: Address<"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44">;
|
|
685
|
+
declare enum SubscriptionsAccount {
|
|
686
|
+
FixedDelegation = 0,
|
|
687
|
+
Plan = 1,
|
|
688
|
+
RecurringDelegation = 2,
|
|
689
|
+
SubscriptionAuthority = 3,
|
|
690
|
+
SubscriptionDelegation = 4,
|
|
691
|
+
EventAuthority = 5
|
|
692
|
+
}
|
|
693
|
+
declare enum SubscriptionsInstruction {
|
|
694
|
+
InitSubscriptionAuthority = 0,
|
|
695
|
+
CreateFixedDelegation = 1,
|
|
696
|
+
CreateRecurringDelegation = 2,
|
|
697
|
+
RevokeDelegation = 3,
|
|
698
|
+
TransferFixed = 4,
|
|
699
|
+
TransferRecurring = 5,
|
|
700
|
+
CloseSubscriptionAuthority = 6,
|
|
701
|
+
CreatePlan = 7,
|
|
702
|
+
UpdatePlan = 8,
|
|
703
|
+
DeletePlan = 9,
|
|
704
|
+
TransferSubscription = 10,
|
|
705
|
+
Subscribe = 11,
|
|
706
|
+
CancelSubscription = 12,
|
|
707
|
+
ResumeSubscription = 13
|
|
708
|
+
}
|
|
709
|
+
declare function identifySubscriptionsInstruction(instruction: {
|
|
710
|
+
data: ReadonlyUint8Array;
|
|
711
|
+
} | ReadonlyUint8Array): SubscriptionsInstruction;
|
|
712
|
+
type ParsedSubscriptionsInstruction<TProgram extends string = 'De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44'> = ({
|
|
713
|
+
instructionType: SubscriptionsInstruction.InitSubscriptionAuthority;
|
|
714
|
+
} & ParsedInitSubscriptionAuthorityInstruction<TProgram>) | ({
|
|
715
|
+
instructionType: SubscriptionsInstruction.CreateFixedDelegation;
|
|
716
|
+
} & ParsedCreateFixedDelegationInstruction<TProgram>) | ({
|
|
717
|
+
instructionType: SubscriptionsInstruction.CreateRecurringDelegation;
|
|
718
|
+
} & ParsedCreateRecurringDelegationInstruction<TProgram>) | ({
|
|
719
|
+
instructionType: SubscriptionsInstruction.RevokeDelegation;
|
|
720
|
+
} & ParsedRevokeDelegationInstruction<TProgram>) | ({
|
|
721
|
+
instructionType: SubscriptionsInstruction.TransferFixed;
|
|
722
|
+
} & ParsedTransferFixedInstruction<TProgram>) | ({
|
|
723
|
+
instructionType: SubscriptionsInstruction.TransferRecurring;
|
|
724
|
+
} & ParsedTransferRecurringInstruction<TProgram>) | ({
|
|
725
|
+
instructionType: SubscriptionsInstruction.CloseSubscriptionAuthority;
|
|
726
|
+
} & ParsedCloseSubscriptionAuthorityInstruction<TProgram>) | ({
|
|
727
|
+
instructionType: SubscriptionsInstruction.CreatePlan;
|
|
728
|
+
} & ParsedCreatePlanInstruction<TProgram>) | ({
|
|
729
|
+
instructionType: SubscriptionsInstruction.UpdatePlan;
|
|
730
|
+
} & ParsedUpdatePlanInstruction<TProgram>) | ({
|
|
731
|
+
instructionType: SubscriptionsInstruction.DeletePlan;
|
|
732
|
+
} & ParsedDeletePlanInstruction<TProgram>) | ({
|
|
733
|
+
instructionType: SubscriptionsInstruction.TransferSubscription;
|
|
734
|
+
} & ParsedTransferSubscriptionInstruction<TProgram>) | ({
|
|
735
|
+
instructionType: SubscriptionsInstruction.Subscribe;
|
|
736
|
+
} & ParsedSubscribeInstruction<TProgram>) | ({
|
|
737
|
+
instructionType: SubscriptionsInstruction.CancelSubscription;
|
|
738
|
+
} & ParsedCancelSubscriptionInstruction<TProgram>) | ({
|
|
739
|
+
instructionType: SubscriptionsInstruction.ResumeSubscription;
|
|
740
|
+
} & ParsedResumeSubscriptionInstruction<TProgram>);
|
|
741
|
+
declare function parseSubscriptionsInstruction<TProgram extends string>(instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>): ParsedSubscriptionsInstruction<TProgram>;
|
|
742
|
+
type SubscriptionsPlugin$1 = {
|
|
743
|
+
accounts: SubscriptionsPluginAccounts;
|
|
744
|
+
instructions: SubscriptionsPluginInstructions$1;
|
|
745
|
+
pdas: SubscriptionsPluginPdas;
|
|
746
|
+
};
|
|
747
|
+
type SubscriptionsPluginAccounts = {
|
|
748
|
+
fixedDelegation: ReturnType<typeof getFixedDelegationCodec> & SelfFetchFunctions<FixedDelegationArgs, FixedDelegation>;
|
|
749
|
+
plan: ReturnType<typeof getPlanCodec> & SelfFetchFunctions<PlanArgs, Plan>;
|
|
750
|
+
recurringDelegation: ReturnType<typeof getRecurringDelegationCodec> & SelfFetchFunctions<RecurringDelegationArgs, RecurringDelegation>;
|
|
751
|
+
subscriptionAuthority: ReturnType<typeof getSubscriptionAuthorityCodec> & SelfFetchFunctions<SubscriptionAuthorityArgs, SubscriptionAuthority>;
|
|
752
|
+
subscriptionDelegation: ReturnType<typeof getSubscriptionDelegationCodec> & SelfFetchFunctions<SubscriptionDelegationArgs, SubscriptionDelegation>;
|
|
753
|
+
eventAuthority: ReturnType<typeof getEventAuthorityCodec> & SelfFetchFunctions<EventAuthorityArgs, EventAuthority>;
|
|
754
|
+
};
|
|
755
|
+
type SubscriptionsPluginInstructions$1 = {
|
|
756
|
+
initSubscriptionAuthority: (input: InitSubscriptionAuthorityAsyncInput) => ReturnType<typeof getInitSubscriptionAuthorityInstructionAsync> & SelfPlanAndSendFunctions;
|
|
757
|
+
createFixedDelegation: (input: CreateFixedDelegationInput$1) => ReturnType<typeof getCreateFixedDelegationInstruction> & SelfPlanAndSendFunctions;
|
|
758
|
+
createRecurringDelegation: (input: CreateRecurringDelegationInput$1) => ReturnType<typeof getCreateRecurringDelegationInstruction> & SelfPlanAndSendFunctions;
|
|
759
|
+
revokeDelegation: (input: RevokeDelegationInput$1) => ReturnType<typeof getRevokeDelegationInstruction> & SelfPlanAndSendFunctions;
|
|
760
|
+
transferFixed: (input: TransferFixedInput) => ReturnType<typeof getTransferFixedInstruction> & SelfPlanAndSendFunctions;
|
|
761
|
+
transferRecurring: (input: TransferRecurringInput) => ReturnType<typeof getTransferRecurringInstruction> & SelfPlanAndSendFunctions;
|
|
762
|
+
closeSubscriptionAuthority: (input: CloseSubscriptionAuthorityInput$1) => ReturnType<typeof getCloseSubscriptionAuthorityInstruction> & SelfPlanAndSendFunctions;
|
|
763
|
+
createPlan: (input: CreatePlanInput$1) => ReturnType<typeof getCreatePlanInstruction> & SelfPlanAndSendFunctions;
|
|
764
|
+
updatePlan: (input: UpdatePlanInput$1) => ReturnType<typeof getUpdatePlanInstruction> & SelfPlanAndSendFunctions;
|
|
765
|
+
deletePlan: (input: DeletePlanInput$1) => ReturnType<typeof getDeletePlanInstruction> & SelfPlanAndSendFunctions;
|
|
766
|
+
transferSubscription: (input: TransferSubscriptionInput$1) => ReturnType<typeof getTransferSubscriptionInstruction> & SelfPlanAndSendFunctions;
|
|
767
|
+
subscribe: (input: SubscribeAsyncInput) => ReturnType<typeof getSubscribeInstructionAsync> & SelfPlanAndSendFunctions;
|
|
768
|
+
cancelSubscription: (input: CancelSubscriptionAsyncInput) => ReturnType<typeof getCancelSubscriptionInstructionAsync> & SelfPlanAndSendFunctions;
|
|
769
|
+
resumeSubscription: (input: ResumeSubscriptionAsyncInput) => ReturnType<typeof getResumeSubscriptionInstructionAsync> & SelfPlanAndSendFunctions;
|
|
770
|
+
};
|
|
771
|
+
type SubscriptionsPluginPdas = {
|
|
772
|
+
fixedDelegation: typeof findFixedDelegationPda;
|
|
773
|
+
plan: typeof findPlanPda;
|
|
774
|
+
recurringDelegation: typeof findRecurringDelegationPda;
|
|
775
|
+
subscriptionAuthority: typeof findSubscriptionAuthorityPda;
|
|
776
|
+
subscriptionDelegation: typeof findSubscriptionDelegationPda;
|
|
777
|
+
eventAuthority: typeof findEventAuthorityPda;
|
|
778
|
+
};
|
|
779
|
+
type SubscriptionsPluginRequirements$1 = ClientWithRpc<GetAccountInfoApi & GetMultipleAccountsApi> & ClientWithTransactionPlanning & ClientWithTransactionSending;
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
783
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
784
|
+
* to add features, then rerun Codama to update it.
|
|
785
|
+
*
|
|
786
|
+
* @see https://github.com/codama-idl/codama
|
|
787
|
+
*/
|
|
788
|
+
|
|
789
|
+
declare const CANCEL_SUBSCRIPTION_DISCRIMINATOR = 12;
|
|
790
|
+
declare function getCancelSubscriptionDiscriminatorBytes(): ReadonlyUint8Array;
|
|
791
|
+
type CancelSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountSubscriber extends string | AccountMeta<string> = string, TAccountPlanPda extends string | AccountMeta<string> = string, TAccountSubscriptionPda extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = '3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7', TAccountSelfProgram extends string | AccountMeta<string> = 'De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
792
|
+
TAccountSubscriber extends string ? ReadonlySignerAccount<TAccountSubscriber> & AccountSignerMeta<TAccountSubscriber> : TAccountSubscriber,
|
|
793
|
+
TAccountPlanPda extends string ? ReadonlyAccount<TAccountPlanPda> : TAccountPlanPda,
|
|
794
|
+
TAccountSubscriptionPda extends string ? WritableAccount<TAccountSubscriptionPda> : TAccountSubscriptionPda,
|
|
795
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
796
|
+
TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
|
|
797
|
+
...TRemainingAccounts
|
|
798
|
+
]>;
|
|
799
|
+
type CancelSubscriptionInstructionData = {
|
|
800
|
+
discriminator: number;
|
|
801
|
+
};
|
|
802
|
+
type CancelSubscriptionInstructionDataArgs = {};
|
|
803
|
+
declare function getCancelSubscriptionInstructionDataEncoder(): FixedSizeEncoder<CancelSubscriptionInstructionDataArgs>;
|
|
804
|
+
declare function getCancelSubscriptionInstructionDataDecoder(): FixedSizeDecoder<CancelSubscriptionInstructionData>;
|
|
805
|
+
declare function getCancelSubscriptionInstructionDataCodec(): FixedSizeCodec<CancelSubscriptionInstructionDataArgs, CancelSubscriptionInstructionData>;
|
|
806
|
+
type CancelSubscriptionAsyncInput<TAccountSubscriber extends string = string, TAccountPlanPda extends string = string, TAccountSubscriptionPda extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
807
|
+
/** The subscriber cancelling the subscription */
|
|
808
|
+
subscriber: TransactionSigner<TAccountSubscriber>;
|
|
809
|
+
/** The plan PDA for the subscription */
|
|
810
|
+
planPda: Address<TAccountPlanPda>;
|
|
811
|
+
/** The subscription PDA being cancelled */
|
|
812
|
+
subscriptionPda?: Address<TAccountSubscriptionPda>;
|
|
813
|
+
/** The event authority PDA */
|
|
814
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
815
|
+
/** This program (for self-CPI) */
|
|
816
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
817
|
+
};
|
|
818
|
+
declare function getCancelSubscriptionInstructionAsync<TAccountSubscriber extends string, TAccountPlanPda extends string, TAccountSubscriptionPda extends string, TAccountEventAuthority extends string, TAccountSelfProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: CancelSubscriptionAsyncInput<TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
819
|
+
programAddress?: TProgramAddress;
|
|
820
|
+
}): Promise<CancelSubscriptionInstruction<TProgramAddress, TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>>;
|
|
821
|
+
type CancelSubscriptionInput$1<TAccountSubscriber extends string = string, TAccountPlanPda extends string = string, TAccountSubscriptionPda extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
822
|
+
/** The subscriber cancelling the subscription */
|
|
823
|
+
subscriber: TransactionSigner<TAccountSubscriber>;
|
|
824
|
+
/** The plan PDA for the subscription */
|
|
825
|
+
planPda: Address<TAccountPlanPda>;
|
|
826
|
+
/** The subscription PDA being cancelled */
|
|
827
|
+
subscriptionPda: Address<TAccountSubscriptionPda>;
|
|
828
|
+
/** The event authority PDA */
|
|
829
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
830
|
+
/** This program (for self-CPI) */
|
|
831
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
832
|
+
};
|
|
833
|
+
declare function getCancelSubscriptionInstruction<TAccountSubscriber extends string, TAccountPlanPda extends string, TAccountSubscriptionPda extends string, TAccountEventAuthority extends string, TAccountSelfProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: CancelSubscriptionInput$1<TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
834
|
+
programAddress?: TProgramAddress;
|
|
835
|
+
}): CancelSubscriptionInstruction<TProgramAddress, TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>;
|
|
836
|
+
type ParsedCancelSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
837
|
+
programAddress: Address<TProgram>;
|
|
838
|
+
accounts: {
|
|
839
|
+
/** The subscriber cancelling the subscription */
|
|
840
|
+
subscriber: TAccountMetas[0];
|
|
841
|
+
/** The plan PDA for the subscription */
|
|
842
|
+
planPda: TAccountMetas[1];
|
|
843
|
+
/** The subscription PDA being cancelled */
|
|
844
|
+
subscriptionPda: TAccountMetas[2];
|
|
845
|
+
/** The event authority PDA */
|
|
846
|
+
eventAuthority: TAccountMetas[3];
|
|
847
|
+
/** This program (for self-CPI) */
|
|
848
|
+
selfProgram: TAccountMetas[4];
|
|
849
|
+
};
|
|
850
|
+
data: CancelSubscriptionInstructionData;
|
|
851
|
+
};
|
|
852
|
+
declare function parseCancelSubscriptionInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCancelSubscriptionInstruction<TProgram, TAccountMetas>;
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
856
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
857
|
+
* to add features, then rerun Codama to update it.
|
|
858
|
+
*
|
|
859
|
+
* @see https://github.com/codama-idl/codama
|
|
860
|
+
*/
|
|
861
|
+
|
|
862
|
+
declare const CLOSE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR = 6;
|
|
863
|
+
declare function getCloseSubscriptionAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
|
|
864
|
+
type CloseSubscriptionAuthorityInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountUser extends string | AccountMeta<string> = string, TAccountSubscriptionAuthority extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
865
|
+
TAccountUser extends string ? WritableSignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser> : TAccountUser,
|
|
866
|
+
TAccountSubscriptionAuthority extends string ? WritableAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
867
|
+
...TRemainingAccounts
|
|
868
|
+
]>;
|
|
869
|
+
type CloseSubscriptionAuthorityInstructionData = {
|
|
870
|
+
discriminator: number;
|
|
871
|
+
};
|
|
872
|
+
type CloseSubscriptionAuthorityInstructionDataArgs = {};
|
|
873
|
+
declare function getCloseSubscriptionAuthorityInstructionDataEncoder(): FixedSizeEncoder<CloseSubscriptionAuthorityInstructionDataArgs>;
|
|
874
|
+
declare function getCloseSubscriptionAuthorityInstructionDataDecoder(): FixedSizeDecoder<CloseSubscriptionAuthorityInstructionData>;
|
|
875
|
+
declare function getCloseSubscriptionAuthorityInstructionDataCodec(): FixedSizeCodec<CloseSubscriptionAuthorityInstructionDataArgs, CloseSubscriptionAuthorityInstructionData>;
|
|
876
|
+
type CloseSubscriptionAuthorityInput$1<TAccountUser extends string = string, TAccountSubscriptionAuthority extends string = string> = {
|
|
877
|
+
/** The user who owns the SubscriptionAuthority PDA (receives rent) */
|
|
878
|
+
user: TransactionSigner<TAccountUser>;
|
|
879
|
+
/** The SubscriptionAuthority PDA to close */
|
|
880
|
+
subscriptionAuthority: Address<TAccountSubscriptionAuthority>;
|
|
881
|
+
};
|
|
882
|
+
declare function getCloseSubscriptionAuthorityInstruction<TAccountUser extends string, TAccountSubscriptionAuthority extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: CloseSubscriptionAuthorityInput$1<TAccountUser, TAccountSubscriptionAuthority>, config?: {
|
|
883
|
+
programAddress?: TProgramAddress;
|
|
884
|
+
}): CloseSubscriptionAuthorityInstruction<TProgramAddress, TAccountUser, TAccountSubscriptionAuthority>;
|
|
885
|
+
type ParsedCloseSubscriptionAuthorityInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
886
|
+
programAddress: Address<TProgram>;
|
|
887
|
+
accounts: {
|
|
888
|
+
/** The user who owns the SubscriptionAuthority PDA (receives rent) */
|
|
889
|
+
user: TAccountMetas[0];
|
|
890
|
+
/** The SubscriptionAuthority PDA to close */
|
|
891
|
+
subscriptionAuthority: TAccountMetas[1];
|
|
892
|
+
};
|
|
893
|
+
data: CloseSubscriptionAuthorityInstructionData;
|
|
894
|
+
};
|
|
895
|
+
declare function parseCloseSubscriptionAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCloseSubscriptionAuthorityInstruction<TProgram, TAccountMetas>;
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
899
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
900
|
+
* to add features, then rerun Codama to update it.
|
|
901
|
+
*
|
|
902
|
+
* @see https://github.com/codama-idl/codama
|
|
903
|
+
*/
|
|
904
|
+
|
|
905
|
+
declare const CREATE_FIXED_DELEGATION_DISCRIMINATOR = 1;
|
|
906
|
+
declare function getCreateFixedDelegationDiscriminatorBytes(): ReadonlyUint8Array;
|
|
907
|
+
type CreateFixedDelegationInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountDelegator extends string | AccountMeta<string> = string, TAccountSubscriptionAuthority extends string | AccountMeta<string> = string, TAccountDelegationAccount extends string | AccountMeta<string> = string, TAccountDelegatee extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
908
|
+
TAccountDelegator extends string ? WritableSignerAccount<TAccountDelegator> & AccountSignerMeta<TAccountDelegator> : TAccountDelegator,
|
|
909
|
+
TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
910
|
+
TAccountDelegationAccount extends string ? WritableAccount<TAccountDelegationAccount> : TAccountDelegationAccount,
|
|
911
|
+
TAccountDelegatee extends string ? ReadonlyAccount<TAccountDelegatee> : TAccountDelegatee,
|
|
912
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
913
|
+
...TRemainingAccounts
|
|
914
|
+
]>;
|
|
915
|
+
type CreateFixedDelegationInstructionData = {
|
|
916
|
+
discriminator: number;
|
|
917
|
+
fixedDelegation: CreateFixedDelegationData;
|
|
918
|
+
};
|
|
919
|
+
type CreateFixedDelegationInstructionDataArgs = {
|
|
920
|
+
fixedDelegation: CreateFixedDelegationDataArgs;
|
|
921
|
+
};
|
|
922
|
+
declare function getCreateFixedDelegationInstructionDataEncoder(): FixedSizeEncoder<CreateFixedDelegationInstructionDataArgs>;
|
|
923
|
+
declare function getCreateFixedDelegationInstructionDataDecoder(): FixedSizeDecoder<CreateFixedDelegationInstructionData>;
|
|
924
|
+
declare function getCreateFixedDelegationInstructionDataCodec(): FixedSizeCodec<CreateFixedDelegationInstructionDataArgs, CreateFixedDelegationInstructionData>;
|
|
925
|
+
type CreateFixedDelegationInput$1<TAccountDelegator extends string = string, TAccountSubscriptionAuthority extends string = string, TAccountDelegationAccount extends string = string, TAccountDelegatee extends string = string, TAccountSystemProgram extends string = string> = {
|
|
926
|
+
/** The user creating the delegation */
|
|
927
|
+
delegator: TransactionSigner<TAccountDelegator>;
|
|
928
|
+
/** The subscription_authority PDA for this token */
|
|
929
|
+
subscriptionAuthority: Address<TAccountSubscriptionAuthority>;
|
|
930
|
+
/** The fixed delegation PDA being created */
|
|
931
|
+
delegationAccount: Address<TAccountDelegationAccount>;
|
|
932
|
+
/** The user receiving delegation rights */
|
|
933
|
+
delegatee: Address<TAccountDelegatee>;
|
|
934
|
+
/** The system program */
|
|
935
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
936
|
+
fixedDelegation: CreateFixedDelegationInstructionDataArgs['fixedDelegation'];
|
|
937
|
+
};
|
|
938
|
+
declare function getCreateFixedDelegationInstruction<TAccountDelegator extends string, TAccountSubscriptionAuthority extends string, TAccountDelegationAccount extends string, TAccountDelegatee extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: CreateFixedDelegationInput$1<TAccountDelegator, TAccountSubscriptionAuthority, TAccountDelegationAccount, TAccountDelegatee, TAccountSystemProgram>, config?: {
|
|
939
|
+
programAddress?: TProgramAddress;
|
|
940
|
+
}): CreateFixedDelegationInstruction<TProgramAddress, TAccountDelegator, TAccountSubscriptionAuthority, TAccountDelegationAccount, TAccountDelegatee, TAccountSystemProgram>;
|
|
941
|
+
type ParsedCreateFixedDelegationInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
942
|
+
programAddress: Address<TProgram>;
|
|
943
|
+
accounts: {
|
|
944
|
+
/** The user creating the delegation */
|
|
945
|
+
delegator: TAccountMetas[0];
|
|
946
|
+
/** The subscription_authority PDA for this token */
|
|
947
|
+
subscriptionAuthority: TAccountMetas[1];
|
|
948
|
+
/** The fixed delegation PDA being created */
|
|
949
|
+
delegationAccount: TAccountMetas[2];
|
|
950
|
+
/** The user receiving delegation rights */
|
|
951
|
+
delegatee: TAccountMetas[3];
|
|
952
|
+
/** The system program */
|
|
953
|
+
systemProgram: TAccountMetas[4];
|
|
954
|
+
};
|
|
955
|
+
data: CreateFixedDelegationInstructionData;
|
|
956
|
+
};
|
|
957
|
+
declare function parseCreateFixedDelegationInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCreateFixedDelegationInstruction<TProgram, TAccountMetas>;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
961
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
962
|
+
* to add features, then rerun Codama to update it.
|
|
963
|
+
*
|
|
964
|
+
* @see https://github.com/codama-idl/codama
|
|
965
|
+
*/
|
|
966
|
+
|
|
967
|
+
declare const CREATE_PLAN_DISCRIMINATOR = 7;
|
|
968
|
+
declare function getCreatePlanDiscriminatorBytes(): ReadonlyUint8Array;
|
|
969
|
+
type CreatePlanInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMerchant extends string | AccountMeta<string> = string, TAccountPlanPda extends string | AccountMeta<string> = string, TAccountTokenMint extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
970
|
+
TAccountMerchant extends string ? WritableSignerAccount<TAccountMerchant> & AccountSignerMeta<TAccountMerchant> : TAccountMerchant,
|
|
971
|
+
TAccountPlanPda extends string ? WritableAccount<TAccountPlanPda> : TAccountPlanPda,
|
|
972
|
+
TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
|
|
973
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
974
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
975
|
+
...TRemainingAccounts
|
|
976
|
+
]>;
|
|
977
|
+
type CreatePlanInstructionData = {
|
|
978
|
+
discriminator: number;
|
|
979
|
+
planData: PlanData;
|
|
980
|
+
};
|
|
981
|
+
type CreatePlanInstructionDataArgs = {
|
|
982
|
+
planData: PlanDataArgs;
|
|
983
|
+
};
|
|
984
|
+
declare function getCreatePlanInstructionDataEncoder(): FixedSizeEncoder<CreatePlanInstructionDataArgs>;
|
|
985
|
+
declare function getCreatePlanInstructionDataDecoder(): FixedSizeDecoder<CreatePlanInstructionData>;
|
|
986
|
+
declare function getCreatePlanInstructionDataCodec(): FixedSizeCodec<CreatePlanInstructionDataArgs, CreatePlanInstructionData>;
|
|
987
|
+
type CreatePlanInput$1<TAccountMerchant extends string = string, TAccountPlanPda extends string = string, TAccountTokenMint extends string = string, TAccountSystemProgram extends string = string, TAccountTokenProgram extends string = string> = {
|
|
988
|
+
/** The merchant creating the plan */
|
|
989
|
+
merchant: TransactionSigner<TAccountMerchant>;
|
|
990
|
+
/** The plan PDA being created */
|
|
991
|
+
planPda: Address<TAccountPlanPda>;
|
|
992
|
+
/** The token mint */
|
|
993
|
+
tokenMint: Address<TAccountTokenMint>;
|
|
994
|
+
/** The system program */
|
|
995
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
996
|
+
/** The token program */
|
|
997
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
998
|
+
planData: CreatePlanInstructionDataArgs['planData'];
|
|
999
|
+
};
|
|
1000
|
+
declare function getCreatePlanInstruction<TAccountMerchant extends string, TAccountPlanPda extends string, TAccountTokenMint extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: CreatePlanInput$1<TAccountMerchant, TAccountPlanPda, TAccountTokenMint, TAccountSystemProgram, TAccountTokenProgram>, config?: {
|
|
1001
|
+
programAddress?: TProgramAddress;
|
|
1002
|
+
}): CreatePlanInstruction<TProgramAddress, TAccountMerchant, TAccountPlanPda, TAccountTokenMint, TAccountSystemProgram, TAccountTokenProgram>;
|
|
1003
|
+
type ParsedCreatePlanInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1004
|
+
programAddress: Address<TProgram>;
|
|
1005
|
+
accounts: {
|
|
1006
|
+
/** The merchant creating the plan */
|
|
1007
|
+
merchant: TAccountMetas[0];
|
|
1008
|
+
/** The plan PDA being created */
|
|
1009
|
+
planPda: TAccountMetas[1];
|
|
1010
|
+
/** The token mint */
|
|
1011
|
+
tokenMint: TAccountMetas[2];
|
|
1012
|
+
/** The system program */
|
|
1013
|
+
systemProgram: TAccountMetas[3];
|
|
1014
|
+
/** The token program */
|
|
1015
|
+
tokenProgram: TAccountMetas[4];
|
|
1016
|
+
};
|
|
1017
|
+
data: CreatePlanInstructionData;
|
|
1018
|
+
};
|
|
1019
|
+
declare function parseCreatePlanInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCreatePlanInstruction<TProgram, TAccountMetas>;
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1023
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1024
|
+
* to add features, then rerun Codama to update it.
|
|
1025
|
+
*
|
|
1026
|
+
* @see https://github.com/codama-idl/codama
|
|
1027
|
+
*/
|
|
1028
|
+
|
|
1029
|
+
declare const CREATE_RECURRING_DELEGATION_DISCRIMINATOR = 2;
|
|
1030
|
+
declare function getCreateRecurringDelegationDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1031
|
+
type CreateRecurringDelegationInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountDelegator extends string | AccountMeta<string> = string, TAccountSubscriptionAuthority extends string | AccountMeta<string> = string, TAccountDelegationAccount extends string | AccountMeta<string> = string, TAccountDelegatee extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1032
|
+
TAccountDelegator extends string ? WritableSignerAccount<TAccountDelegator> & AccountSignerMeta<TAccountDelegator> : TAccountDelegator,
|
|
1033
|
+
TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
1034
|
+
TAccountDelegationAccount extends string ? WritableAccount<TAccountDelegationAccount> : TAccountDelegationAccount,
|
|
1035
|
+
TAccountDelegatee extends string ? ReadonlyAccount<TAccountDelegatee> : TAccountDelegatee,
|
|
1036
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
1037
|
+
...TRemainingAccounts
|
|
1038
|
+
]>;
|
|
1039
|
+
type CreateRecurringDelegationInstructionData = {
|
|
1040
|
+
discriminator: number;
|
|
1041
|
+
recurringDelegation: CreateRecurringDelegationData;
|
|
1042
|
+
};
|
|
1043
|
+
type CreateRecurringDelegationInstructionDataArgs = {
|
|
1044
|
+
recurringDelegation: CreateRecurringDelegationDataArgs;
|
|
1045
|
+
};
|
|
1046
|
+
declare function getCreateRecurringDelegationInstructionDataEncoder(): FixedSizeEncoder<CreateRecurringDelegationInstructionDataArgs>;
|
|
1047
|
+
declare function getCreateRecurringDelegationInstructionDataDecoder(): FixedSizeDecoder<CreateRecurringDelegationInstructionData>;
|
|
1048
|
+
declare function getCreateRecurringDelegationInstructionDataCodec(): FixedSizeCodec<CreateRecurringDelegationInstructionDataArgs, CreateRecurringDelegationInstructionData>;
|
|
1049
|
+
type CreateRecurringDelegationInput$1<TAccountDelegator extends string = string, TAccountSubscriptionAuthority extends string = string, TAccountDelegationAccount extends string = string, TAccountDelegatee extends string = string, TAccountSystemProgram extends string = string> = {
|
|
1050
|
+
/** The user creating the delegation */
|
|
1051
|
+
delegator: TransactionSigner<TAccountDelegator>;
|
|
1052
|
+
/** The subscription_authority PDA for this token */
|
|
1053
|
+
subscriptionAuthority: Address<TAccountSubscriptionAuthority>;
|
|
1054
|
+
/** The recurring delegation PDA being created */
|
|
1055
|
+
delegationAccount: Address<TAccountDelegationAccount>;
|
|
1056
|
+
/** The user receiving delegation rights */
|
|
1057
|
+
delegatee: Address<TAccountDelegatee>;
|
|
1058
|
+
/** The system program */
|
|
1059
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
1060
|
+
recurringDelegation: CreateRecurringDelegationInstructionDataArgs['recurringDelegation'];
|
|
1061
|
+
};
|
|
1062
|
+
declare function getCreateRecurringDelegationInstruction<TAccountDelegator extends string, TAccountSubscriptionAuthority extends string, TAccountDelegationAccount extends string, TAccountDelegatee extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: CreateRecurringDelegationInput$1<TAccountDelegator, TAccountSubscriptionAuthority, TAccountDelegationAccount, TAccountDelegatee, TAccountSystemProgram>, config?: {
|
|
1063
|
+
programAddress?: TProgramAddress;
|
|
1064
|
+
}): CreateRecurringDelegationInstruction<TProgramAddress, TAccountDelegator, TAccountSubscriptionAuthority, TAccountDelegationAccount, TAccountDelegatee, TAccountSystemProgram>;
|
|
1065
|
+
type ParsedCreateRecurringDelegationInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1066
|
+
programAddress: Address<TProgram>;
|
|
1067
|
+
accounts: {
|
|
1068
|
+
/** The user creating the delegation */
|
|
1069
|
+
delegator: TAccountMetas[0];
|
|
1070
|
+
/** The subscription_authority PDA for this token */
|
|
1071
|
+
subscriptionAuthority: TAccountMetas[1];
|
|
1072
|
+
/** The recurring delegation PDA being created */
|
|
1073
|
+
delegationAccount: TAccountMetas[2];
|
|
1074
|
+
/** The user receiving delegation rights */
|
|
1075
|
+
delegatee: TAccountMetas[3];
|
|
1076
|
+
/** The system program */
|
|
1077
|
+
systemProgram: TAccountMetas[4];
|
|
1078
|
+
};
|
|
1079
|
+
data: CreateRecurringDelegationInstructionData;
|
|
1080
|
+
};
|
|
1081
|
+
declare function parseCreateRecurringDelegationInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCreateRecurringDelegationInstruction<TProgram, TAccountMetas>;
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1085
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1086
|
+
* to add features, then rerun Codama to update it.
|
|
1087
|
+
*
|
|
1088
|
+
* @see https://github.com/codama-idl/codama
|
|
1089
|
+
*/
|
|
1090
|
+
|
|
1091
|
+
declare const DELETE_PLAN_DISCRIMINATOR = 9;
|
|
1092
|
+
declare function getDeletePlanDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1093
|
+
type DeletePlanInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountPlanPda extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1094
|
+
TAccountOwner extends string ? WritableSignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner,
|
|
1095
|
+
TAccountPlanPda extends string ? WritableAccount<TAccountPlanPda> : TAccountPlanPda,
|
|
1096
|
+
...TRemainingAccounts
|
|
1097
|
+
]>;
|
|
1098
|
+
type DeletePlanInstructionData = {
|
|
1099
|
+
discriminator: number;
|
|
1100
|
+
};
|
|
1101
|
+
type DeletePlanInstructionDataArgs = {};
|
|
1102
|
+
declare function getDeletePlanInstructionDataEncoder(): FixedSizeEncoder<DeletePlanInstructionDataArgs>;
|
|
1103
|
+
declare function getDeletePlanInstructionDataDecoder(): FixedSizeDecoder<DeletePlanInstructionData>;
|
|
1104
|
+
declare function getDeletePlanInstructionDataCodec(): FixedSizeCodec<DeletePlanInstructionDataArgs, DeletePlanInstructionData>;
|
|
1105
|
+
type DeletePlanInput$1<TAccountOwner extends string = string, TAccountPlanPda extends string = string> = {
|
|
1106
|
+
/** The plan owner deleting the plan (receives rent) */
|
|
1107
|
+
owner: TransactionSigner<TAccountOwner>;
|
|
1108
|
+
/** The plan PDA being deleted */
|
|
1109
|
+
planPda: Address<TAccountPlanPda>;
|
|
1110
|
+
};
|
|
1111
|
+
declare function getDeletePlanInstruction<TAccountOwner extends string, TAccountPlanPda extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: DeletePlanInput$1<TAccountOwner, TAccountPlanPda>, config?: {
|
|
1112
|
+
programAddress?: TProgramAddress;
|
|
1113
|
+
}): DeletePlanInstruction<TProgramAddress, TAccountOwner, TAccountPlanPda>;
|
|
1114
|
+
type ParsedDeletePlanInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1115
|
+
programAddress: Address<TProgram>;
|
|
1116
|
+
accounts: {
|
|
1117
|
+
/** The plan owner deleting the plan (receives rent) */
|
|
1118
|
+
owner: TAccountMetas[0];
|
|
1119
|
+
/** The plan PDA being deleted */
|
|
1120
|
+
planPda: TAccountMetas[1];
|
|
1121
|
+
};
|
|
1122
|
+
data: DeletePlanInstructionData;
|
|
1123
|
+
};
|
|
1124
|
+
declare function parseDeletePlanInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedDeletePlanInstruction<TProgram, TAccountMetas>;
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1128
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1129
|
+
* to add features, then rerun Codama to update it.
|
|
1130
|
+
*
|
|
1131
|
+
* @see https://github.com/codama-idl/codama
|
|
1132
|
+
*/
|
|
1133
|
+
|
|
1134
|
+
declare const INIT_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR = 0;
|
|
1135
|
+
declare function getInitSubscriptionAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1136
|
+
type InitSubscriptionAuthorityInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountSubscriptionAuthority extends string | AccountMeta<string> = string, TAccountTokenMint extends string | AccountMeta<string> = string, TAccountUserAta extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountTokenProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1137
|
+
TAccountOwner extends string ? WritableSignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner,
|
|
1138
|
+
TAccountSubscriptionAuthority extends string ? WritableAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
1139
|
+
TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
|
|
1140
|
+
TAccountUserAta extends string ? WritableAccount<TAccountUserAta> : TAccountUserAta,
|
|
1141
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
1142
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
1143
|
+
...TRemainingAccounts
|
|
1144
|
+
]>;
|
|
1145
|
+
type InitSubscriptionAuthorityInstructionData = {
|
|
1146
|
+
discriminator: number;
|
|
1147
|
+
};
|
|
1148
|
+
type InitSubscriptionAuthorityInstructionDataArgs = {};
|
|
1149
|
+
declare function getInitSubscriptionAuthorityInstructionDataEncoder(): FixedSizeEncoder<InitSubscriptionAuthorityInstructionDataArgs>;
|
|
1150
|
+
declare function getInitSubscriptionAuthorityInstructionDataDecoder(): FixedSizeDecoder<InitSubscriptionAuthorityInstructionData>;
|
|
1151
|
+
declare function getInitSubscriptionAuthorityInstructionDataCodec(): FixedSizeCodec<InitSubscriptionAuthorityInstructionDataArgs, InitSubscriptionAuthorityInstructionData>;
|
|
1152
|
+
type InitSubscriptionAuthorityAsyncInput<TAccountOwner extends string = string, TAccountSubscriptionAuthority extends string = string, TAccountTokenMint extends string = string, TAccountUserAta extends string = string, TAccountSystemProgram extends string = string, TAccountTokenProgram extends string = string> = {
|
|
1153
|
+
/** The owner of the subscription-authority program */
|
|
1154
|
+
owner: TransactionSigner<TAccountOwner>;
|
|
1155
|
+
/** The subscription_authority PDA that will be the delegate instance for this token */
|
|
1156
|
+
subscriptionAuthority?: Address<TAccountSubscriptionAuthority>;
|
|
1157
|
+
/** The token mint that we are creating a subscription-authority account for */
|
|
1158
|
+
tokenMint: Address<TAccountTokenMint>;
|
|
1159
|
+
/** The ata that we are setting up delegation for */
|
|
1160
|
+
userAta: Address<TAccountUserAta>;
|
|
1161
|
+
/** The system program */
|
|
1162
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
1163
|
+
/** Token program */
|
|
1164
|
+
tokenProgram: Address<TAccountTokenProgram>;
|
|
1165
|
+
};
|
|
1166
|
+
declare function getInitSubscriptionAuthorityInstructionAsync<TAccountOwner extends string, TAccountSubscriptionAuthority extends string, TAccountTokenMint extends string, TAccountUserAta extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: InitSubscriptionAuthorityAsyncInput<TAccountOwner, TAccountSubscriptionAuthority, TAccountTokenMint, TAccountUserAta, TAccountSystemProgram, TAccountTokenProgram>, config?: {
|
|
1167
|
+
programAddress?: TProgramAddress;
|
|
1168
|
+
}): Promise<InitSubscriptionAuthorityInstruction<TProgramAddress, TAccountOwner, TAccountSubscriptionAuthority, TAccountTokenMint, TAccountUserAta, TAccountSystemProgram, TAccountTokenProgram>>;
|
|
1169
|
+
type InitSubscriptionAuthorityInput$1<TAccountOwner extends string = string, TAccountSubscriptionAuthority extends string = string, TAccountTokenMint extends string = string, TAccountUserAta extends string = string, TAccountSystemProgram extends string = string, TAccountTokenProgram extends string = string> = {
|
|
1170
|
+
/** The owner of the subscription-authority program */
|
|
1171
|
+
owner: TransactionSigner<TAccountOwner>;
|
|
1172
|
+
/** The subscription_authority PDA that will be the delegate instance for this token */
|
|
1173
|
+
subscriptionAuthority: Address<TAccountSubscriptionAuthority>;
|
|
1174
|
+
/** The token mint that we are creating a subscription-authority account for */
|
|
1175
|
+
tokenMint: Address<TAccountTokenMint>;
|
|
1176
|
+
/** The ata that we are setting up delegation for */
|
|
1177
|
+
userAta: Address<TAccountUserAta>;
|
|
1178
|
+
/** The system program */
|
|
1179
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
1180
|
+
/** Token program */
|
|
1181
|
+
tokenProgram: Address<TAccountTokenProgram>;
|
|
1182
|
+
};
|
|
1183
|
+
declare function getInitSubscriptionAuthorityInstruction<TAccountOwner extends string, TAccountSubscriptionAuthority extends string, TAccountTokenMint extends string, TAccountUserAta extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: InitSubscriptionAuthorityInput$1<TAccountOwner, TAccountSubscriptionAuthority, TAccountTokenMint, TAccountUserAta, TAccountSystemProgram, TAccountTokenProgram>, config?: {
|
|
1184
|
+
programAddress?: TProgramAddress;
|
|
1185
|
+
}): InitSubscriptionAuthorityInstruction<TProgramAddress, TAccountOwner, TAccountSubscriptionAuthority, TAccountTokenMint, TAccountUserAta, TAccountSystemProgram, TAccountTokenProgram>;
|
|
1186
|
+
type ParsedInitSubscriptionAuthorityInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1187
|
+
programAddress: Address<TProgram>;
|
|
1188
|
+
accounts: {
|
|
1189
|
+
/** The owner of the subscription-authority program */
|
|
1190
|
+
owner: TAccountMetas[0];
|
|
1191
|
+
/** The subscription_authority PDA that will be the delegate instance for this token */
|
|
1192
|
+
subscriptionAuthority: TAccountMetas[1];
|
|
1193
|
+
/** The token mint that we are creating a subscription-authority account for */
|
|
1194
|
+
tokenMint: TAccountMetas[2];
|
|
1195
|
+
/** The ata that we are setting up delegation for */
|
|
1196
|
+
userAta: TAccountMetas[3];
|
|
1197
|
+
/** The system program */
|
|
1198
|
+
systemProgram: TAccountMetas[4];
|
|
1199
|
+
/** Token program */
|
|
1200
|
+
tokenProgram: TAccountMetas[5];
|
|
1201
|
+
};
|
|
1202
|
+
data: InitSubscriptionAuthorityInstructionData;
|
|
1203
|
+
};
|
|
1204
|
+
declare function parseInitSubscriptionAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedInitSubscriptionAuthorityInstruction<TProgram, TAccountMetas>;
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1208
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1209
|
+
* to add features, then rerun Codama to update it.
|
|
1210
|
+
*
|
|
1211
|
+
* @see https://github.com/codama-idl/codama
|
|
1212
|
+
*/
|
|
1213
|
+
|
|
1214
|
+
declare const RESUME_SUBSCRIPTION_DISCRIMINATOR = 13;
|
|
1215
|
+
declare function getResumeSubscriptionDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1216
|
+
type ResumeSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountSubscriber extends string | AccountMeta<string> = string, TAccountPlanPda extends string | AccountMeta<string> = string, TAccountSubscriptionPda extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = '3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7', TAccountSelfProgram extends string | AccountMeta<string> = 'De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1217
|
+
TAccountSubscriber extends string ? ReadonlySignerAccount<TAccountSubscriber> & AccountSignerMeta<TAccountSubscriber> : TAccountSubscriber,
|
|
1218
|
+
TAccountPlanPda extends string ? ReadonlyAccount<TAccountPlanPda> : TAccountPlanPda,
|
|
1219
|
+
TAccountSubscriptionPda extends string ? WritableAccount<TAccountSubscriptionPda> : TAccountSubscriptionPda,
|
|
1220
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
1221
|
+
TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
|
|
1222
|
+
...TRemainingAccounts
|
|
1223
|
+
]>;
|
|
1224
|
+
type ResumeSubscriptionInstructionData = {
|
|
1225
|
+
discriminator: number;
|
|
1226
|
+
};
|
|
1227
|
+
type ResumeSubscriptionInstructionDataArgs = {};
|
|
1228
|
+
declare function getResumeSubscriptionInstructionDataEncoder(): FixedSizeEncoder<ResumeSubscriptionInstructionDataArgs>;
|
|
1229
|
+
declare function getResumeSubscriptionInstructionDataDecoder(): FixedSizeDecoder<ResumeSubscriptionInstructionData>;
|
|
1230
|
+
declare function getResumeSubscriptionInstructionDataCodec(): FixedSizeCodec<ResumeSubscriptionInstructionDataArgs, ResumeSubscriptionInstructionData>;
|
|
1231
|
+
type ResumeSubscriptionAsyncInput<TAccountSubscriber extends string = string, TAccountPlanPda extends string = string, TAccountSubscriptionPda extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1232
|
+
/** The subscriber resuming the subscription */
|
|
1233
|
+
subscriber: TransactionSigner<TAccountSubscriber>;
|
|
1234
|
+
/** The plan PDA for the subscription */
|
|
1235
|
+
planPda: Address<TAccountPlanPda>;
|
|
1236
|
+
/** The subscription PDA being resumed */
|
|
1237
|
+
subscriptionPda?: Address<TAccountSubscriptionPda>;
|
|
1238
|
+
/** The event authority PDA */
|
|
1239
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
1240
|
+
/** This program (for self-CPI) */
|
|
1241
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
1242
|
+
};
|
|
1243
|
+
declare function getResumeSubscriptionInstructionAsync<TAccountSubscriber extends string, TAccountPlanPda extends string, TAccountSubscriptionPda extends string, TAccountEventAuthority extends string, TAccountSelfProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: ResumeSubscriptionAsyncInput<TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1244
|
+
programAddress?: TProgramAddress;
|
|
1245
|
+
}): Promise<ResumeSubscriptionInstruction<TProgramAddress, TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>>;
|
|
1246
|
+
type ResumeSubscriptionInput$1<TAccountSubscriber extends string = string, TAccountPlanPda extends string = string, TAccountSubscriptionPda extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1247
|
+
/** The subscriber resuming the subscription */
|
|
1248
|
+
subscriber: TransactionSigner<TAccountSubscriber>;
|
|
1249
|
+
/** The plan PDA for the subscription */
|
|
1250
|
+
planPda: Address<TAccountPlanPda>;
|
|
1251
|
+
/** The subscription PDA being resumed */
|
|
1252
|
+
subscriptionPda: Address<TAccountSubscriptionPda>;
|
|
1253
|
+
/** The event authority PDA */
|
|
1254
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
1255
|
+
/** This program (for self-CPI) */
|
|
1256
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
1257
|
+
};
|
|
1258
|
+
declare function getResumeSubscriptionInstruction<TAccountSubscriber extends string, TAccountPlanPda extends string, TAccountSubscriptionPda extends string, TAccountEventAuthority extends string, TAccountSelfProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: ResumeSubscriptionInput$1<TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1259
|
+
programAddress?: TProgramAddress;
|
|
1260
|
+
}): ResumeSubscriptionInstruction<TProgramAddress, TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1261
|
+
type ParsedResumeSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1262
|
+
programAddress: Address<TProgram>;
|
|
1263
|
+
accounts: {
|
|
1264
|
+
/** The subscriber resuming the subscription */
|
|
1265
|
+
subscriber: TAccountMetas[0];
|
|
1266
|
+
/** The plan PDA for the subscription */
|
|
1267
|
+
planPda: TAccountMetas[1];
|
|
1268
|
+
/** The subscription PDA being resumed */
|
|
1269
|
+
subscriptionPda: TAccountMetas[2];
|
|
1270
|
+
/** The event authority PDA */
|
|
1271
|
+
eventAuthority: TAccountMetas[3];
|
|
1272
|
+
/** This program (for self-CPI) */
|
|
1273
|
+
selfProgram: TAccountMetas[4];
|
|
1274
|
+
};
|
|
1275
|
+
data: ResumeSubscriptionInstructionData;
|
|
1276
|
+
};
|
|
1277
|
+
declare function parseResumeSubscriptionInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedResumeSubscriptionInstruction<TProgram, TAccountMetas>;
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1281
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1282
|
+
* to add features, then rerun Codama to update it.
|
|
1283
|
+
*
|
|
1284
|
+
* @see https://github.com/codama-idl/codama
|
|
1285
|
+
*/
|
|
1286
|
+
|
|
1287
|
+
declare const REVOKE_DELEGATION_DISCRIMINATOR = 3;
|
|
1288
|
+
declare function getRevokeDelegationDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1289
|
+
type RevokeDelegationInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountDelegationAccount extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1290
|
+
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
1291
|
+
TAccountDelegationAccount extends string ? WritableAccount<TAccountDelegationAccount> : TAccountDelegationAccount,
|
|
1292
|
+
...TRemainingAccounts
|
|
1293
|
+
]>;
|
|
1294
|
+
type RevokeDelegationInstructionData = {
|
|
1295
|
+
discriminator: number;
|
|
1296
|
+
};
|
|
1297
|
+
type RevokeDelegationInstructionDataArgs = {};
|
|
1298
|
+
declare function getRevokeDelegationInstructionDataEncoder(): FixedSizeEncoder<RevokeDelegationInstructionDataArgs>;
|
|
1299
|
+
declare function getRevokeDelegationInstructionDataDecoder(): FixedSizeDecoder<RevokeDelegationInstructionData>;
|
|
1300
|
+
declare function getRevokeDelegationInstructionDataCodec(): FixedSizeCodec<RevokeDelegationInstructionDataArgs, RevokeDelegationInstructionData>;
|
|
1301
|
+
type RevokeDelegationInput$1<TAccountAuthority extends string = string, TAccountDelegationAccount extends string = string> = {
|
|
1302
|
+
/** The delegator revoking the delegation (receives rent) */
|
|
1303
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
1304
|
+
/** The delegation PDA to close */
|
|
1305
|
+
delegationAccount: Address<TAccountDelegationAccount>;
|
|
1306
|
+
};
|
|
1307
|
+
declare function getRevokeDelegationInstruction<TAccountAuthority extends string, TAccountDelegationAccount extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: RevokeDelegationInput$1<TAccountAuthority, TAccountDelegationAccount>, config?: {
|
|
1308
|
+
programAddress?: TProgramAddress;
|
|
1309
|
+
}): RevokeDelegationInstruction<TProgramAddress, TAccountAuthority, TAccountDelegationAccount>;
|
|
1310
|
+
type ParsedRevokeDelegationInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1311
|
+
programAddress: Address<TProgram>;
|
|
1312
|
+
accounts: {
|
|
1313
|
+
/** The delegator revoking the delegation (receives rent) */
|
|
1314
|
+
authority: TAccountMetas[0];
|
|
1315
|
+
/** The delegation PDA to close */
|
|
1316
|
+
delegationAccount: TAccountMetas[1];
|
|
1317
|
+
};
|
|
1318
|
+
data: RevokeDelegationInstructionData;
|
|
1319
|
+
};
|
|
1320
|
+
declare function parseRevokeDelegationInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRevokeDelegationInstruction<TProgram, TAccountMetas>;
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1324
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1325
|
+
* to add features, then rerun Codama to update it.
|
|
1326
|
+
*
|
|
1327
|
+
* @see https://github.com/codama-idl/codama
|
|
1328
|
+
*/
|
|
1329
|
+
|
|
1330
|
+
declare const SUBSCRIBE_DISCRIMINATOR = 11;
|
|
1331
|
+
declare function getSubscribeDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1332
|
+
type SubscribeInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountSubscriber extends string | AccountMeta<string> = string, TAccountMerchant extends string | AccountMeta<string> = string, TAccountPlanPda extends string | AccountMeta<string> = string, TAccountSubscriptionPda extends string | AccountMeta<string> = string, TAccountSubscriptionAuthorityPda extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | AccountMeta<string> = '3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7', TAccountSelfProgram extends string | AccountMeta<string> = 'De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1333
|
+
TAccountSubscriber extends string ? WritableSignerAccount<TAccountSubscriber> & AccountSignerMeta<TAccountSubscriber> : TAccountSubscriber,
|
|
1334
|
+
TAccountMerchant extends string ? ReadonlyAccount<TAccountMerchant> : TAccountMerchant,
|
|
1335
|
+
TAccountPlanPda extends string ? ReadonlyAccount<TAccountPlanPda> : TAccountPlanPda,
|
|
1336
|
+
TAccountSubscriptionPda extends string ? WritableAccount<TAccountSubscriptionPda> : TAccountSubscriptionPda,
|
|
1337
|
+
TAccountSubscriptionAuthorityPda extends string ? ReadonlyAccount<TAccountSubscriptionAuthorityPda> : TAccountSubscriptionAuthorityPda,
|
|
1338
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
1339
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
1340
|
+
TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
|
|
1341
|
+
...TRemainingAccounts
|
|
1342
|
+
]>;
|
|
1343
|
+
type SubscribeInstructionData = {
|
|
1344
|
+
discriminator: number;
|
|
1345
|
+
subscribeData: SubscribeData;
|
|
1346
|
+
};
|
|
1347
|
+
type SubscribeInstructionDataArgs = {
|
|
1348
|
+
subscribeData: SubscribeDataArgs;
|
|
1349
|
+
};
|
|
1350
|
+
declare function getSubscribeInstructionDataEncoder(): FixedSizeEncoder<SubscribeInstructionDataArgs>;
|
|
1351
|
+
declare function getSubscribeInstructionDataDecoder(): FixedSizeDecoder<SubscribeInstructionData>;
|
|
1352
|
+
declare function getSubscribeInstructionDataCodec(): FixedSizeCodec<SubscribeInstructionDataArgs, SubscribeInstructionData>;
|
|
1353
|
+
type SubscribeAsyncInput<TAccountSubscriber extends string = string, TAccountMerchant extends string = string, TAccountPlanPda extends string = string, TAccountSubscriptionPda extends string = string, TAccountSubscriptionAuthorityPda extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1354
|
+
/** The subscriber creating the subscription (pays rent) */
|
|
1355
|
+
subscriber: TransactionSigner<TAccountSubscriber>;
|
|
1356
|
+
/** The merchant who owns the plan */
|
|
1357
|
+
merchant: Address<TAccountMerchant>;
|
|
1358
|
+
/** The plan PDA to subscribe to */
|
|
1359
|
+
planPda: Address<TAccountPlanPda>;
|
|
1360
|
+
/** The subscription PDA being created */
|
|
1361
|
+
subscriptionPda?: Address<TAccountSubscriptionPda>;
|
|
1362
|
+
/** The subscriber's SubscriptionAuthority PDA for the plan's mint */
|
|
1363
|
+
subscriptionAuthorityPda: Address<TAccountSubscriptionAuthorityPda>;
|
|
1364
|
+
/** The system program */
|
|
1365
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
1366
|
+
/** The event authority PDA */
|
|
1367
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
1368
|
+
/** This program (for self-CPI) */
|
|
1369
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
1370
|
+
subscribeData: SubscribeInstructionDataArgs['subscribeData'];
|
|
1371
|
+
};
|
|
1372
|
+
declare function getSubscribeInstructionAsync<TAccountSubscriber extends string, TAccountMerchant extends string, TAccountPlanPda extends string, TAccountSubscriptionPda extends string, TAccountSubscriptionAuthorityPda extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountSelfProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: SubscribeAsyncInput<TAccountSubscriber, TAccountMerchant, TAccountPlanPda, TAccountSubscriptionPda, TAccountSubscriptionAuthorityPda, TAccountSystemProgram, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1373
|
+
programAddress?: TProgramAddress;
|
|
1374
|
+
}): Promise<SubscribeInstruction<TProgramAddress, TAccountSubscriber, TAccountMerchant, TAccountPlanPda, TAccountSubscriptionPda, TAccountSubscriptionAuthorityPda, TAccountSystemProgram, TAccountEventAuthority, TAccountSelfProgram>>;
|
|
1375
|
+
type SubscribeInput$1<TAccountSubscriber extends string = string, TAccountMerchant extends string = string, TAccountPlanPda extends string = string, TAccountSubscriptionPda extends string = string, TAccountSubscriptionAuthorityPda extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1376
|
+
/** The subscriber creating the subscription (pays rent) */
|
|
1377
|
+
subscriber: TransactionSigner<TAccountSubscriber>;
|
|
1378
|
+
/** The merchant who owns the plan */
|
|
1379
|
+
merchant: Address<TAccountMerchant>;
|
|
1380
|
+
/** The plan PDA to subscribe to */
|
|
1381
|
+
planPda: Address<TAccountPlanPda>;
|
|
1382
|
+
/** The subscription PDA being created */
|
|
1383
|
+
subscriptionPda: Address<TAccountSubscriptionPda>;
|
|
1384
|
+
/** The subscriber's SubscriptionAuthority PDA for the plan's mint */
|
|
1385
|
+
subscriptionAuthorityPda: Address<TAccountSubscriptionAuthorityPda>;
|
|
1386
|
+
/** The system program */
|
|
1387
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
1388
|
+
/** The event authority PDA */
|
|
1389
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
1390
|
+
/** This program (for self-CPI) */
|
|
1391
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
1392
|
+
subscribeData: SubscribeInstructionDataArgs['subscribeData'];
|
|
1393
|
+
};
|
|
1394
|
+
declare function getSubscribeInstruction<TAccountSubscriber extends string, TAccountMerchant extends string, TAccountPlanPda extends string, TAccountSubscriptionPda extends string, TAccountSubscriptionAuthorityPda extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountSelfProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: SubscribeInput$1<TAccountSubscriber, TAccountMerchant, TAccountPlanPda, TAccountSubscriptionPda, TAccountSubscriptionAuthorityPda, TAccountSystemProgram, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1395
|
+
programAddress?: TProgramAddress;
|
|
1396
|
+
}): SubscribeInstruction<TProgramAddress, TAccountSubscriber, TAccountMerchant, TAccountPlanPda, TAccountSubscriptionPda, TAccountSubscriptionAuthorityPda, TAccountSystemProgram, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1397
|
+
type ParsedSubscribeInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1398
|
+
programAddress: Address<TProgram>;
|
|
1399
|
+
accounts: {
|
|
1400
|
+
/** The subscriber creating the subscription (pays rent) */
|
|
1401
|
+
subscriber: TAccountMetas[0];
|
|
1402
|
+
/** The merchant who owns the plan */
|
|
1403
|
+
merchant: TAccountMetas[1];
|
|
1404
|
+
/** The plan PDA to subscribe to */
|
|
1405
|
+
planPda: TAccountMetas[2];
|
|
1406
|
+
/** The subscription PDA being created */
|
|
1407
|
+
subscriptionPda: TAccountMetas[3];
|
|
1408
|
+
/** The subscriber's SubscriptionAuthority PDA for the plan's mint */
|
|
1409
|
+
subscriptionAuthorityPda: TAccountMetas[4];
|
|
1410
|
+
/** The system program */
|
|
1411
|
+
systemProgram: TAccountMetas[5];
|
|
1412
|
+
/** The event authority PDA */
|
|
1413
|
+
eventAuthority: TAccountMetas[6];
|
|
1414
|
+
/** This program (for self-CPI) */
|
|
1415
|
+
selfProgram: TAccountMetas[7];
|
|
1416
|
+
};
|
|
1417
|
+
data: SubscribeInstructionData;
|
|
1418
|
+
};
|
|
1419
|
+
declare function parseSubscribeInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSubscribeInstruction<TProgram, TAccountMetas>;
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1423
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1424
|
+
* to add features, then rerun Codama to update it.
|
|
1425
|
+
*
|
|
1426
|
+
* @see https://github.com/codama-idl/codama
|
|
1427
|
+
*/
|
|
1428
|
+
|
|
1429
|
+
declare const TRANSFER_FIXED_DISCRIMINATOR = 4;
|
|
1430
|
+
declare function getTransferFixedDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1431
|
+
type TransferFixedInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountDelegationPda extends string | AccountMeta<string> = string, TAccountSubscriptionAuthority extends string | AccountMeta<string> = string, TAccountDelegatorAta extends string | AccountMeta<string> = string, TAccountReceiverAta extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = string, TAccountDelegatee extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = '3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7', TAccountSelfProgram extends string | AccountMeta<string> = 'De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1432
|
+
TAccountDelegationPda extends string ? WritableAccount<TAccountDelegationPda> : TAccountDelegationPda,
|
|
1433
|
+
TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
1434
|
+
TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
|
|
1435
|
+
TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
|
|
1436
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
1437
|
+
TAccountDelegatee extends string ? ReadonlySignerAccount<TAccountDelegatee> & AccountSignerMeta<TAccountDelegatee> : TAccountDelegatee,
|
|
1438
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
1439
|
+
TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
|
|
1440
|
+
...TRemainingAccounts
|
|
1441
|
+
]>;
|
|
1442
|
+
type TransferFixedInstructionData = {
|
|
1443
|
+
discriminator: number;
|
|
1444
|
+
transferData: TransferData;
|
|
1445
|
+
};
|
|
1446
|
+
type TransferFixedInstructionDataArgs = {
|
|
1447
|
+
transferData: TransferDataArgs;
|
|
1448
|
+
};
|
|
1449
|
+
declare function getTransferFixedInstructionDataEncoder(): FixedSizeEncoder<TransferFixedInstructionDataArgs>;
|
|
1450
|
+
declare function getTransferFixedInstructionDataDecoder(): FixedSizeDecoder<TransferFixedInstructionData>;
|
|
1451
|
+
declare function getTransferFixedInstructionDataCodec(): FixedSizeCodec<TransferFixedInstructionDataArgs, TransferFixedInstructionData>;
|
|
1452
|
+
type TransferFixedInput<TAccountDelegationPda extends string = string, TAccountSubscriptionAuthority extends string = string, TAccountDelegatorAta extends string = string, TAccountReceiverAta extends string = string, TAccountTokenProgram extends string = string, TAccountDelegatee extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1453
|
+
/** The fixed delegation PDA to transfer from */
|
|
1454
|
+
delegationPda: Address<TAccountDelegationPda>;
|
|
1455
|
+
/** The subscription-authority PDA */
|
|
1456
|
+
subscriptionAuthority: Address<TAccountSubscriptionAuthority>;
|
|
1457
|
+
/** The delegator's ATA to transfer from */
|
|
1458
|
+
delegatorAta: Address<TAccountDelegatorAta>;
|
|
1459
|
+
/** The receiver's ATA to transfer to */
|
|
1460
|
+
receiverAta: Address<TAccountReceiverAta>;
|
|
1461
|
+
/** Token program */
|
|
1462
|
+
tokenProgram: Address<TAccountTokenProgram>;
|
|
1463
|
+
/** The delegatee signing the transfer */
|
|
1464
|
+
delegatee: TransactionSigner<TAccountDelegatee>;
|
|
1465
|
+
/** The event authority PDA */
|
|
1466
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
1467
|
+
/** This program (for self-CPI) */
|
|
1468
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
1469
|
+
transferData: TransferFixedInstructionDataArgs['transferData'];
|
|
1470
|
+
};
|
|
1471
|
+
declare function getTransferFixedInstruction<TAccountDelegationPda extends string, TAccountSubscriptionAuthority extends string, TAccountDelegatorAta extends string, TAccountReceiverAta extends string, TAccountTokenProgram extends string, TAccountDelegatee extends string, TAccountEventAuthority extends string, TAccountSelfProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: TransferFixedInput<TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1472
|
+
programAddress?: TProgramAddress;
|
|
1473
|
+
}): TransferFixedInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1474
|
+
type ParsedTransferFixedInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1475
|
+
programAddress: Address<TProgram>;
|
|
1476
|
+
accounts: {
|
|
1477
|
+
/** The fixed delegation PDA to transfer from */
|
|
1478
|
+
delegationPda: TAccountMetas[0];
|
|
1479
|
+
/** The subscription-authority PDA */
|
|
1480
|
+
subscriptionAuthority: TAccountMetas[1];
|
|
1481
|
+
/** The delegator's ATA to transfer from */
|
|
1482
|
+
delegatorAta: TAccountMetas[2];
|
|
1483
|
+
/** The receiver's ATA to transfer to */
|
|
1484
|
+
receiverAta: TAccountMetas[3];
|
|
1485
|
+
/** Token program */
|
|
1486
|
+
tokenProgram: TAccountMetas[4];
|
|
1487
|
+
/** The delegatee signing the transfer */
|
|
1488
|
+
delegatee: TAccountMetas[5];
|
|
1489
|
+
/** The event authority PDA */
|
|
1490
|
+
eventAuthority: TAccountMetas[6];
|
|
1491
|
+
/** This program (for self-CPI) */
|
|
1492
|
+
selfProgram: TAccountMetas[7];
|
|
1493
|
+
};
|
|
1494
|
+
data: TransferFixedInstructionData;
|
|
1495
|
+
};
|
|
1496
|
+
declare function parseTransferFixedInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedTransferFixedInstruction<TProgram, TAccountMetas>;
|
|
1497
|
+
|
|
1498
|
+
/**
|
|
1499
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1500
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1501
|
+
* to add features, then rerun Codama to update it.
|
|
1502
|
+
*
|
|
1503
|
+
* @see https://github.com/codama-idl/codama
|
|
1504
|
+
*/
|
|
1505
|
+
|
|
1506
|
+
declare const TRANSFER_RECURRING_DISCRIMINATOR = 5;
|
|
1507
|
+
declare function getTransferRecurringDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1508
|
+
type TransferRecurringInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountDelegationPda extends string | AccountMeta<string> = string, TAccountSubscriptionAuthority extends string | AccountMeta<string> = string, TAccountDelegatorAta extends string | AccountMeta<string> = string, TAccountReceiverAta extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = string, TAccountDelegatee extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = '3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7', TAccountSelfProgram extends string | AccountMeta<string> = 'De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1509
|
+
TAccountDelegationPda extends string ? WritableAccount<TAccountDelegationPda> : TAccountDelegationPda,
|
|
1510
|
+
TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
1511
|
+
TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
|
|
1512
|
+
TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
|
|
1513
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
1514
|
+
TAccountDelegatee extends string ? ReadonlySignerAccount<TAccountDelegatee> & AccountSignerMeta<TAccountDelegatee> : TAccountDelegatee,
|
|
1515
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
1516
|
+
TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
|
|
1517
|
+
...TRemainingAccounts
|
|
1518
|
+
]>;
|
|
1519
|
+
type TransferRecurringInstructionData = {
|
|
1520
|
+
discriminator: number;
|
|
1521
|
+
transferData: TransferData;
|
|
1522
|
+
};
|
|
1523
|
+
type TransferRecurringInstructionDataArgs = {
|
|
1524
|
+
transferData: TransferDataArgs;
|
|
1525
|
+
};
|
|
1526
|
+
declare function getTransferRecurringInstructionDataEncoder(): FixedSizeEncoder<TransferRecurringInstructionDataArgs>;
|
|
1527
|
+
declare function getTransferRecurringInstructionDataDecoder(): FixedSizeDecoder<TransferRecurringInstructionData>;
|
|
1528
|
+
declare function getTransferRecurringInstructionDataCodec(): FixedSizeCodec<TransferRecurringInstructionDataArgs, TransferRecurringInstructionData>;
|
|
1529
|
+
type TransferRecurringInput<TAccountDelegationPda extends string = string, TAccountSubscriptionAuthority extends string = string, TAccountDelegatorAta extends string = string, TAccountReceiverAta extends string = string, TAccountTokenProgram extends string = string, TAccountDelegatee extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1530
|
+
/** The recurring delegation PDA to transfer from */
|
|
1531
|
+
delegationPda: Address<TAccountDelegationPda>;
|
|
1532
|
+
/** The subscription-authority PDA */
|
|
1533
|
+
subscriptionAuthority: Address<TAccountSubscriptionAuthority>;
|
|
1534
|
+
/** The delegator's ATA to transfer from */
|
|
1535
|
+
delegatorAta: Address<TAccountDelegatorAta>;
|
|
1536
|
+
/** The receiver's ATA to transfer to */
|
|
1537
|
+
receiverAta: Address<TAccountReceiverAta>;
|
|
1538
|
+
/** Token program */
|
|
1539
|
+
tokenProgram: Address<TAccountTokenProgram>;
|
|
1540
|
+
/** The delegatee signing the transfer */
|
|
1541
|
+
delegatee: TransactionSigner<TAccountDelegatee>;
|
|
1542
|
+
/** The event authority PDA */
|
|
1543
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
1544
|
+
/** This program (for self-CPI) */
|
|
1545
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
1546
|
+
transferData: TransferRecurringInstructionDataArgs['transferData'];
|
|
1547
|
+
};
|
|
1548
|
+
declare function getTransferRecurringInstruction<TAccountDelegationPda extends string, TAccountSubscriptionAuthority extends string, TAccountDelegatorAta extends string, TAccountReceiverAta extends string, TAccountTokenProgram extends string, TAccountDelegatee extends string, TAccountEventAuthority extends string, TAccountSelfProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: TransferRecurringInput<TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1549
|
+
programAddress?: TProgramAddress;
|
|
1550
|
+
}): TransferRecurringInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1551
|
+
type ParsedTransferRecurringInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1552
|
+
programAddress: Address<TProgram>;
|
|
1553
|
+
accounts: {
|
|
1554
|
+
/** The recurring delegation PDA to transfer from */
|
|
1555
|
+
delegationPda: TAccountMetas[0];
|
|
1556
|
+
/** The subscription-authority PDA */
|
|
1557
|
+
subscriptionAuthority: TAccountMetas[1];
|
|
1558
|
+
/** The delegator's ATA to transfer from */
|
|
1559
|
+
delegatorAta: TAccountMetas[2];
|
|
1560
|
+
/** The receiver's ATA to transfer to */
|
|
1561
|
+
receiverAta: TAccountMetas[3];
|
|
1562
|
+
/** Token program */
|
|
1563
|
+
tokenProgram: TAccountMetas[4];
|
|
1564
|
+
/** The delegatee signing the transfer */
|
|
1565
|
+
delegatee: TAccountMetas[5];
|
|
1566
|
+
/** The event authority PDA */
|
|
1567
|
+
eventAuthority: TAccountMetas[6];
|
|
1568
|
+
/** This program (for self-CPI) */
|
|
1569
|
+
selfProgram: TAccountMetas[7];
|
|
1570
|
+
};
|
|
1571
|
+
data: TransferRecurringInstructionData;
|
|
1572
|
+
};
|
|
1573
|
+
declare function parseTransferRecurringInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedTransferRecurringInstruction<TProgram, TAccountMetas>;
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1577
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1578
|
+
* to add features, then rerun Codama to update it.
|
|
1579
|
+
*
|
|
1580
|
+
* @see https://github.com/codama-idl/codama
|
|
1581
|
+
*/
|
|
1582
|
+
|
|
1583
|
+
declare const TRANSFER_SUBSCRIPTION_DISCRIMINATOR = 10;
|
|
1584
|
+
declare function getTransferSubscriptionDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1585
|
+
type TransferSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountSubscriptionPda extends string | AccountMeta<string> = string, TAccountPlanPda extends string | AccountMeta<string> = string, TAccountSubscriptionAuthority extends string | AccountMeta<string> = string, TAccountDelegatorAta extends string | AccountMeta<string> = string, TAccountReceiverAta extends string | AccountMeta<string> = string, TAccountCaller extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = '3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7', TAccountSelfProgram extends string | AccountMeta<string> = 'De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1586
|
+
TAccountSubscriptionPda extends string ? WritableAccount<TAccountSubscriptionPda> : TAccountSubscriptionPda,
|
|
1587
|
+
TAccountPlanPda extends string ? ReadonlyAccount<TAccountPlanPda> : TAccountPlanPda,
|
|
1588
|
+
TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
1589
|
+
TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
|
|
1590
|
+
TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
|
|
1591
|
+
TAccountCaller extends string ? ReadonlySignerAccount<TAccountCaller> & AccountSignerMeta<TAccountCaller> : TAccountCaller,
|
|
1592
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
1593
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
1594
|
+
TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
|
|
1595
|
+
...TRemainingAccounts
|
|
1596
|
+
]>;
|
|
1597
|
+
type TransferSubscriptionInstructionData = {
|
|
1598
|
+
discriminator: number;
|
|
1599
|
+
transferData: TransferData;
|
|
1600
|
+
};
|
|
1601
|
+
type TransferSubscriptionInstructionDataArgs = {
|
|
1602
|
+
transferData: TransferDataArgs;
|
|
1603
|
+
};
|
|
1604
|
+
declare function getTransferSubscriptionInstructionDataEncoder(): FixedSizeEncoder<TransferSubscriptionInstructionDataArgs>;
|
|
1605
|
+
declare function getTransferSubscriptionInstructionDataDecoder(): FixedSizeDecoder<TransferSubscriptionInstructionData>;
|
|
1606
|
+
declare function getTransferSubscriptionInstructionDataCodec(): FixedSizeCodec<TransferSubscriptionInstructionDataArgs, TransferSubscriptionInstructionData>;
|
|
1607
|
+
type TransferSubscriptionInput$1<TAccountSubscriptionPda extends string = string, TAccountPlanPda extends string = string, TAccountSubscriptionAuthority extends string = string, TAccountDelegatorAta extends string = string, TAccountReceiverAta extends string = string, TAccountCaller extends string = string, TAccountTokenProgram extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1608
|
+
/** The subscription delegation PDA */
|
|
1609
|
+
subscriptionPda: Address<TAccountSubscriptionPda>;
|
|
1610
|
+
/** The plan PDA */
|
|
1611
|
+
planPda: Address<TAccountPlanPda>;
|
|
1612
|
+
/** The subscription-authority PDA */
|
|
1613
|
+
subscriptionAuthority: Address<TAccountSubscriptionAuthority>;
|
|
1614
|
+
/** The delegator's ATA to transfer from */
|
|
1615
|
+
delegatorAta: Address<TAccountDelegatorAta>;
|
|
1616
|
+
/** The receiver's ATA to transfer to */
|
|
1617
|
+
receiverAta: Address<TAccountReceiverAta>;
|
|
1618
|
+
/** The authorized puller (plan owner or whitelisted) */
|
|
1619
|
+
caller: TransactionSigner<TAccountCaller>;
|
|
1620
|
+
/** Token program */
|
|
1621
|
+
tokenProgram: Address<TAccountTokenProgram>;
|
|
1622
|
+
/** The event authority PDA */
|
|
1623
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
1624
|
+
/** This program (for self-CPI) */
|
|
1625
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
1626
|
+
transferData: TransferSubscriptionInstructionDataArgs['transferData'];
|
|
1627
|
+
};
|
|
1628
|
+
declare function getTransferSubscriptionInstruction<TAccountSubscriptionPda extends string, TAccountPlanPda extends string, TAccountSubscriptionAuthority extends string, TAccountDelegatorAta extends string, TAccountReceiverAta extends string, TAccountCaller extends string, TAccountTokenProgram extends string, TAccountEventAuthority extends string, TAccountSelfProgram extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: TransferSubscriptionInput$1<TAccountSubscriptionPda, TAccountPlanPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountCaller, TAccountTokenProgram, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1629
|
+
programAddress?: TProgramAddress;
|
|
1630
|
+
}): TransferSubscriptionInstruction<TProgramAddress, TAccountSubscriptionPda, TAccountPlanPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountCaller, TAccountTokenProgram, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1631
|
+
type ParsedTransferSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1632
|
+
programAddress: Address<TProgram>;
|
|
1633
|
+
accounts: {
|
|
1634
|
+
/** The subscription delegation PDA */
|
|
1635
|
+
subscriptionPda: TAccountMetas[0];
|
|
1636
|
+
/** The plan PDA */
|
|
1637
|
+
planPda: TAccountMetas[1];
|
|
1638
|
+
/** The subscription-authority PDA */
|
|
1639
|
+
subscriptionAuthority: TAccountMetas[2];
|
|
1640
|
+
/** The delegator's ATA to transfer from */
|
|
1641
|
+
delegatorAta: TAccountMetas[3];
|
|
1642
|
+
/** The receiver's ATA to transfer to */
|
|
1643
|
+
receiverAta: TAccountMetas[4];
|
|
1644
|
+
/** The authorized puller (plan owner or whitelisted) */
|
|
1645
|
+
caller: TAccountMetas[5];
|
|
1646
|
+
/** Token program */
|
|
1647
|
+
tokenProgram: TAccountMetas[6];
|
|
1648
|
+
/** The event authority PDA */
|
|
1649
|
+
eventAuthority: TAccountMetas[7];
|
|
1650
|
+
/** This program (for self-CPI) */
|
|
1651
|
+
selfProgram: TAccountMetas[8];
|
|
1652
|
+
};
|
|
1653
|
+
data: TransferSubscriptionInstructionData;
|
|
1654
|
+
};
|
|
1655
|
+
declare function parseTransferSubscriptionInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedTransferSubscriptionInstruction<TProgram, TAccountMetas>;
|
|
1656
|
+
|
|
1657
|
+
/**
|
|
1658
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1659
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1660
|
+
* to add features, then rerun Codama to update it.
|
|
1661
|
+
*
|
|
1662
|
+
* @see https://github.com/codama-idl/codama
|
|
1663
|
+
*/
|
|
1664
|
+
|
|
1665
|
+
declare const UPDATE_PLAN_DISCRIMINATOR = 8;
|
|
1666
|
+
declare function getUpdatePlanDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1667
|
+
type UpdatePlanInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountPlanPda extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
1668
|
+
TAccountOwner extends string ? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner,
|
|
1669
|
+
TAccountPlanPda extends string ? WritableAccount<TAccountPlanPda> : TAccountPlanPda,
|
|
1670
|
+
...TRemainingAccounts
|
|
1671
|
+
]>;
|
|
1672
|
+
type UpdatePlanInstructionData = {
|
|
1673
|
+
discriminator: number;
|
|
1674
|
+
updatePlanData: UpdatePlanData;
|
|
1675
|
+
};
|
|
1676
|
+
type UpdatePlanInstructionDataArgs = {
|
|
1677
|
+
updatePlanData: UpdatePlanDataArgs;
|
|
1678
|
+
};
|
|
1679
|
+
declare function getUpdatePlanInstructionDataEncoder(): FixedSizeEncoder<UpdatePlanInstructionDataArgs>;
|
|
1680
|
+
declare function getUpdatePlanInstructionDataDecoder(): FixedSizeDecoder<UpdatePlanInstructionData>;
|
|
1681
|
+
declare function getUpdatePlanInstructionDataCodec(): FixedSizeCodec<UpdatePlanInstructionDataArgs, UpdatePlanInstructionData>;
|
|
1682
|
+
type UpdatePlanInput$1<TAccountOwner extends string = string, TAccountPlanPda extends string = string> = {
|
|
1683
|
+
/** The plan owner updating the plan */
|
|
1684
|
+
owner: TransactionSigner<TAccountOwner>;
|
|
1685
|
+
/** The plan PDA being updated */
|
|
1686
|
+
planPda: Address<TAccountPlanPda>;
|
|
1687
|
+
updatePlanData: UpdatePlanInstructionDataArgs['updatePlanData'];
|
|
1688
|
+
};
|
|
1689
|
+
declare function getUpdatePlanInstruction<TAccountOwner extends string, TAccountPlanPda extends string, TProgramAddress extends Address = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS>(input: UpdatePlanInput$1<TAccountOwner, TAccountPlanPda>, config?: {
|
|
1690
|
+
programAddress?: TProgramAddress;
|
|
1691
|
+
}): UpdatePlanInstruction<TProgramAddress, TAccountOwner, TAccountPlanPda>;
|
|
1692
|
+
type ParsedUpdatePlanInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1693
|
+
programAddress: Address<TProgram>;
|
|
1694
|
+
accounts: {
|
|
1695
|
+
/** The plan owner updating the plan */
|
|
1696
|
+
owner: TAccountMetas[0];
|
|
1697
|
+
/** The plan PDA being updated */
|
|
1698
|
+
planPda: TAccountMetas[1];
|
|
1699
|
+
};
|
|
1700
|
+
data: UpdatePlanInstructionData;
|
|
1701
|
+
};
|
|
1702
|
+
declare function parseUpdatePlanInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedUpdatePlanInstruction<TProgram, TAccountMetas>;
|
|
1703
|
+
|
|
1704
|
+
/** Discriminated union pairing each delegation variant with its on-chain address. */
|
|
1705
|
+
type Delegation = {
|
|
1706
|
+
address: Address;
|
|
1707
|
+
data: FixedDelegation;
|
|
1708
|
+
kind: 'fixed';
|
|
1709
|
+
} | {
|
|
1710
|
+
address: Address;
|
|
1711
|
+
data: RecurringDelegation;
|
|
1712
|
+
kind: 'recurring';
|
|
1713
|
+
} | {
|
|
1714
|
+
address: Address;
|
|
1715
|
+
data: SubscriptionDelegation;
|
|
1716
|
+
kind: 'subscription';
|
|
1717
|
+
};
|
|
1718
|
+
|
|
1719
|
+
/** Raw account shape returned by `getProgramAccounts` RPC calls. */
|
|
1720
|
+
type RawProgramAccount = AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase64EncodedData>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Converts a {@link RawProgramAccount} into Kit's `EncodedAccount` format for use with Codama decoders.
|
|
1723
|
+
*
|
|
1724
|
+
* @param raw - The raw account as returned by `getProgramAccounts`.
|
|
1725
|
+
* @param programAddress - The program address that owns the account.
|
|
1726
|
+
* @returns An `EncodedAccount` with base64-decoded data.
|
|
1727
|
+
*/
|
|
1728
|
+
declare function toEncodedAccount(raw: RawProgramAccount, programAddress: Address): EncodedAccount;
|
|
1729
|
+
/**
|
|
1730
|
+
* Decodes a raw program account into a {@link Delegation} by inspecting the discriminator byte.
|
|
1731
|
+
*
|
|
1732
|
+
* @param raw - The raw account as returned by `getProgramAccounts`.
|
|
1733
|
+
* @param programAddress - The program address that owns the account.
|
|
1734
|
+
* @returns The decoded {@link Delegation}, or `null` if the discriminator is unrecognized.
|
|
1735
|
+
*/
|
|
1736
|
+
declare function decodeDelegationAccount(raw: RawProgramAccount, programAddress: Address): Delegation | null;
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* Fetches all delegation accounts (fixed, recurring, and subscription) for a delegator.
|
|
1740
|
+
*
|
|
1741
|
+
* @param rpc - An RPC client supporting `getProgramAccounts`.
|
|
1742
|
+
* @param wallet - The delegator's wallet address.
|
|
1743
|
+
* @returns All decoded delegations owned by the wallet.
|
|
1744
|
+
*/
|
|
1745
|
+
declare function fetchDelegationsByDelegator(rpc: Rpc<GetProgramAccountsApi>, wallet: Address, programAddress?: Address): Promise<Delegation[]>;
|
|
1746
|
+
/**
|
|
1747
|
+
* Fetches all delegation accounts (fixed, recurring, and subscription) for a delegatee.
|
|
1748
|
+
*
|
|
1749
|
+
* @param rpc - An RPC client supporting `getProgramAccounts`.
|
|
1750
|
+
* @param wallet - The delegatee's wallet address.
|
|
1751
|
+
* @param programAddress - Optional program address override.
|
|
1752
|
+
* @returns All decoded delegations where the wallet is the delegatee.
|
|
1753
|
+
*/
|
|
1754
|
+
declare function fetchDelegationsByDelegatee(rpc: Rpc<GetProgramAccountsApi>, wallet: Address, programAddress?: Address): Promise<Delegation[]>;
|
|
1755
|
+
|
|
1756
|
+
/** A plan account with its on-chain address. */
|
|
1757
|
+
type PlanWithAddress = {
|
|
1758
|
+
address: Address;
|
|
1759
|
+
data: Plan;
|
|
1760
|
+
};
|
|
1761
|
+
|
|
1762
|
+
/**
|
|
1763
|
+
* Fetches all plan accounts owned by a given address, filtered by account size.
|
|
1764
|
+
*
|
|
1765
|
+
* @param rpc - An RPC client supporting `getProgramAccounts`.
|
|
1766
|
+
* @param owner - The plan owner's wallet address.
|
|
1767
|
+
* @returns All decoded plans belonging to the owner.
|
|
1768
|
+
*/
|
|
1769
|
+
declare function fetchPlansForOwner(rpc: Rpc<GetProgramAccountsApi>, owner: Address, programAddress?: Address): Promise<PlanWithAddress[]>;
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* Fetches all subscription delegation accounts for a given subscriber wallet.
|
|
1773
|
+
*
|
|
1774
|
+
* @param rpc - An RPC client supporting `getProgramAccounts`.
|
|
1775
|
+
* @param user - The subscriber's (delegator's) wallet address.
|
|
1776
|
+
* @returns Decoded subscription delegations paired with their on-chain addresses.
|
|
1777
|
+
*/
|
|
1778
|
+
declare function fetchSubscriptionsForUser(rpc: Rpc<GetProgramAccountsApi>, user: Address, programAddress?: Address): Promise<Array<{
|
|
1779
|
+
address: Address;
|
|
1780
|
+
data: SubscriptionDelegation;
|
|
1781
|
+
}>>;
|
|
1782
|
+
|
|
1783
|
+
/** Deployed program address, sourced from Codama-generated bindings. */
|
|
1784
|
+
declare const PROGRAM_ID: _solana_kit.Address<"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44">;
|
|
1785
|
+
/** Current on-chain account schema version. */
|
|
1786
|
+
declare const CURRENT_PROGRAM_VERSION = 1;
|
|
1787
|
+
/** Default zero address used for padding arrays (e.g. empty puller/destination slots). */
|
|
1788
|
+
declare const ZERO_ADDRESS: _solana_kit.Address<"11111111111111111111111111111111">;
|
|
1789
|
+
/** Byte offset of the account discriminator in the Header struct. */
|
|
1790
|
+
declare const DISCRIMINATOR_OFFSET = 0;
|
|
1791
|
+
/** Byte offset of the delegator pubkey in the Header struct. */
|
|
1792
|
+
declare const DELEGATOR_OFFSET = 3;
|
|
1793
|
+
/** Byte offset of the delegatee pubkey in the Header struct. */
|
|
1794
|
+
declare const DELEGATEE_OFFSET = 35;
|
|
1795
|
+
/** Byte size of a u64 value (used in nonce encoding). */
|
|
1796
|
+
declare const U64_BYTE_SIZE = 8;
|
|
1797
|
+
/** PDA seed for SubscriptionAuthority accounts. */
|
|
1798
|
+
declare const SUBSCRIPTION_AUTHORITY_SEED = "SubscriptionAuthority";
|
|
1799
|
+
/** PDA seed for delegation accounts (FixedDelegation, RecurringDelegation). */
|
|
1800
|
+
declare const DELEGATION_SEED = "delegation";
|
|
1801
|
+
/** PDA seed for Plan accounts. */
|
|
1802
|
+
declare const PLAN_SEED = "plan";
|
|
1803
|
+
/** PDA seed for SubscriptionDelegation accounts. */
|
|
1804
|
+
declare const SUBSCRIPTION_SEED = "subscription";
|
|
1805
|
+
/** PDA seed for the event authority (self-CPI). */
|
|
1806
|
+
declare const EVENT_AUTHORITY_SEED = "event_authority";
|
|
1807
|
+
/** On-chain Plan account size in bytes: discriminator(1) + owner(32) + bump(1) + status(1) + planData(456). */
|
|
1808
|
+
declare const PLAN_SIZE = 491;
|
|
1809
|
+
/** On-chain SubscriptionDelegation account size in bytes: header(107) + terms(24) + pulled(8) + periodStart(8) + expiresAt(8). */
|
|
1810
|
+
declare const SUBSCRIPTION_SIZE = 155;
|
|
1811
|
+
/** Byte offset of the owner pubkey in a Plan account. */
|
|
1812
|
+
declare const PLAN_OWNER_OFFSET = 1;
|
|
1813
|
+
/** Maximum number of destination addresses in a Plan. */
|
|
1814
|
+
declare const MAX_PLAN_DESTINATIONS = 4;
|
|
1815
|
+
/** Maximum number of puller addresses in a Plan. */
|
|
1816
|
+
declare const MAX_PLAN_PULLERS = 4;
|
|
1817
|
+
/** Maximum byte length of a Plan's metadata URI. */
|
|
1818
|
+
declare const METADATA_URI_LEN = 128;
|
|
1819
|
+
/** On-chain delegation variant identifier (matches the `kind` tag in the `Delegation` union). */
|
|
1820
|
+
type DelegationKindId = 'fixed' | 'recurring' | 'subscription';
|
|
1821
|
+
|
|
1822
|
+
type WithProgramAddress = {
|
|
1823
|
+
programAddress?: Address;
|
|
1824
|
+
};
|
|
1825
|
+
/** Mark `K` keys of `T` as optional (used to relax overlay inputs that the
|
|
1826
|
+
* plugin can fill from `client.identity` / `client.payer`). */
|
|
1827
|
+
type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
1828
|
+
[P in K]?: T[P];
|
|
1829
|
+
};
|
|
1830
|
+
type InitSubscriptionAuthorityInput = WithProgramAddress & {
|
|
1831
|
+
owner: TransactionSigner;
|
|
1832
|
+
payer?: TransactionSigner;
|
|
1833
|
+
tokenMint: Address;
|
|
1834
|
+
tokenProgram: Address;
|
|
1835
|
+
userAta: Address;
|
|
1836
|
+
};
|
|
1837
|
+
type CloseSubscriptionAuthorityInput = WithProgramAddress & {
|
|
1838
|
+
receiver?: Address;
|
|
1839
|
+
tokenMint: Address;
|
|
1840
|
+
user: TransactionSigner;
|
|
1841
|
+
};
|
|
1842
|
+
type CreateFixedDelegationInput = WithProgramAddress & {
|
|
1843
|
+
amount: bigint | number;
|
|
1844
|
+
delegatee: Address;
|
|
1845
|
+
delegator: TransactionSigner;
|
|
1846
|
+
expiryTs: bigint | number;
|
|
1847
|
+
nonce: bigint | number;
|
|
1848
|
+
payer?: TransactionSigner;
|
|
1849
|
+
tokenMint: Address;
|
|
1850
|
+
};
|
|
1851
|
+
type CreateRecurringDelegationInput = WithProgramAddress & {
|
|
1852
|
+
amountPerPeriod: bigint | number;
|
|
1853
|
+
delegatee: Address;
|
|
1854
|
+
delegator: TransactionSigner;
|
|
1855
|
+
expiryTs: bigint | number;
|
|
1856
|
+
nonce: bigint | number;
|
|
1857
|
+
payer?: TransactionSigner;
|
|
1858
|
+
periodLengthS: bigint | number;
|
|
1859
|
+
startTs: bigint | number;
|
|
1860
|
+
tokenMint: Address;
|
|
1861
|
+
};
|
|
1862
|
+
type RevokeDelegationInput = WithProgramAddress & {
|
|
1863
|
+
authority: TransactionSigner;
|
|
1864
|
+
delegationAccount: Address;
|
|
1865
|
+
receiver?: Address;
|
|
1866
|
+
};
|
|
1867
|
+
type RevokeSubscriptionInput = WithProgramAddress & {
|
|
1868
|
+
authority: TransactionSigner;
|
|
1869
|
+
planPda: Address;
|
|
1870
|
+
receiver?: Address;
|
|
1871
|
+
subscriptionPda: Address;
|
|
1872
|
+
};
|
|
1873
|
+
type TransferDelegationInput = WithProgramAddress & {
|
|
1874
|
+
amount: bigint | number;
|
|
1875
|
+
delegatee: TransactionSigner;
|
|
1876
|
+
delegationPda: Address;
|
|
1877
|
+
delegator: Address;
|
|
1878
|
+
delegatorAta: Address;
|
|
1879
|
+
receiverAta: Address;
|
|
1880
|
+
tokenMint: Address;
|
|
1881
|
+
tokenProgram: Address;
|
|
1882
|
+
};
|
|
1883
|
+
type TransferSubscriptionInput = WithProgramAddress & {
|
|
1884
|
+
amount: bigint | number;
|
|
1885
|
+
caller: TransactionSigner;
|
|
1886
|
+
delegator: Address;
|
|
1887
|
+
planPda: Address;
|
|
1888
|
+
receiverAta: Address;
|
|
1889
|
+
subscriptionPda: Address;
|
|
1890
|
+
tokenMint: Address;
|
|
1891
|
+
tokenProgram: Address;
|
|
1892
|
+
};
|
|
1893
|
+
type CreatePlanInput = WithProgramAddress & {
|
|
1894
|
+
amount: bigint | number;
|
|
1895
|
+
destinations: Address[];
|
|
1896
|
+
endTs: bigint | number;
|
|
1897
|
+
metadataUri: string;
|
|
1898
|
+
mint: Address;
|
|
1899
|
+
owner: TransactionSigner;
|
|
1900
|
+
periodHours: bigint | number;
|
|
1901
|
+
planId: bigint | number;
|
|
1902
|
+
pullers: Address[];
|
|
1903
|
+
tokenProgram?: Address;
|
|
1904
|
+
};
|
|
1905
|
+
type UpdatePlanInput = WithProgramAddress & {
|
|
1906
|
+
endTs: bigint | number;
|
|
1907
|
+
metadataUri: string;
|
|
1908
|
+
owner: TransactionSigner;
|
|
1909
|
+
planPda: Address;
|
|
1910
|
+
pullers?: Address[];
|
|
1911
|
+
status: PlanStatus;
|
|
1912
|
+
};
|
|
1913
|
+
type DeletePlanInput = WithProgramAddress & {
|
|
1914
|
+
owner: TransactionSigner;
|
|
1915
|
+
planPda: Address;
|
|
1916
|
+
};
|
|
1917
|
+
type SubscribeInput = WithProgramAddress & {
|
|
1918
|
+
/**
|
|
1919
|
+
* Live plan terms snapshot the subscriber consents to. If omitted, the
|
|
1920
|
+
* caller must use the plugin client's `subscribe` (which fetches the live
|
|
1921
|
+
* plan via rpc); the standalone overlay cannot fetch on its own.
|
|
1922
|
+
*/
|
|
1923
|
+
expectedAmount?: bigint | number;
|
|
1924
|
+
expectedCreatedAt?: bigint | number;
|
|
1925
|
+
expectedPeriodHours?: bigint | number;
|
|
1926
|
+
merchant: Address;
|
|
1927
|
+
payer?: TransactionSigner;
|
|
1928
|
+
planId: bigint | number;
|
|
1929
|
+
subscriber: TransactionSigner;
|
|
1930
|
+
tokenMint: Address;
|
|
1931
|
+
};
|
|
1932
|
+
type CancelSubscriptionInput = WithProgramAddress & {
|
|
1933
|
+
planPda: Address;
|
|
1934
|
+
subscriber: TransactionSigner;
|
|
1935
|
+
subscriptionPda?: Address;
|
|
1936
|
+
};
|
|
1937
|
+
type ResumeSubscriptionInput = WithProgramAddress & {
|
|
1938
|
+
planPda: Address;
|
|
1939
|
+
subscriber: TransactionSigner;
|
|
1940
|
+
subscriptionPda?: Address;
|
|
1941
|
+
};
|
|
1942
|
+
declare function getInitSubscriptionAuthorityOverlayInstructionAsync(input: InitSubscriptionAuthorityInput): Promise<Instruction>;
|
|
1943
|
+
declare function getCloseSubscriptionAuthorityOverlayInstructionAsync(input: CloseSubscriptionAuthorityInput): Promise<Instruction>;
|
|
1944
|
+
declare function getCreateFixedDelegationOverlayInstructionAsync(input: CreateFixedDelegationInput): Promise<Instruction>;
|
|
1945
|
+
declare function getCreateRecurringDelegationOverlayInstructionAsync(input: CreateRecurringDelegationInput): Promise<Instruction>;
|
|
1946
|
+
/** Revoke a fixed/recurring delegation. For subscription PDAs use {@link getRevokeSubscriptionOverlayInstruction}. */
|
|
1947
|
+
declare function getRevokeDelegationOverlayInstruction(input: RevokeDelegationInput): Instruction;
|
|
1948
|
+
/**
|
|
1949
|
+
* Revoke a subscription PDA. Trailing-account layout: `[planPda, receiver?]`.
|
|
1950
|
+
* For fixed/recurring delegations use {@link getRevokeDelegationOverlayInstruction}.
|
|
1951
|
+
*/
|
|
1952
|
+
declare function getRevokeSubscriptionOverlayInstruction(input: RevokeSubscriptionInput): Instruction;
|
|
1953
|
+
declare function getTransferFixedOverlayInstructionAsync(input: TransferDelegationInput): Promise<Instruction>;
|
|
1954
|
+
declare function getTransferRecurringOverlayInstructionAsync(input: TransferDelegationInput): Promise<Instruction>;
|
|
1955
|
+
declare function getTransferSubscriptionOverlayInstructionAsync(input: TransferSubscriptionInput): Promise<Instruction>;
|
|
1956
|
+
declare function getCreatePlanOverlayInstructionAsync(input: CreatePlanInput): Promise<Instruction>;
|
|
1957
|
+
declare function getUpdatePlanOverlayInstruction(input: UpdatePlanInput): Instruction;
|
|
1958
|
+
declare function getDeletePlanOverlayInstruction(input: DeletePlanInput): Instruction;
|
|
1959
|
+
declare function getSubscribeOverlayInstructionAsync(input: SubscribeInput): Promise<Instruction>;
|
|
1960
|
+
declare function getCancelSubscriptionOverlayInstructionAsync(input: CancelSubscriptionInput): Promise<Instruction>;
|
|
1961
|
+
declare function getResumeSubscriptionOverlayInstructionAsync(input: ResumeSubscriptionInput): Promise<Instruction>;
|
|
1962
|
+
type SubscriptionsPluginRequirements = ClientWithIdentity & ClientWithPayer & ClientWithRpc<GetProgramAccountsApi> & SubscriptionsPluginRequirements$1;
|
|
1963
|
+
type Self<T> = SelfPlanAndSendFunctions & T;
|
|
1964
|
+
type SubscriptionsPluginInstructions = {
|
|
1965
|
+
cancelSubscription: (input: MakeOptional<CancelSubscriptionInput, 'subscriber'>) => Self<Promise<Instruction>>;
|
|
1966
|
+
closeSubscriptionAuthority: (input: MakeOptional<CloseSubscriptionAuthorityInput, 'user'>) => Self<Promise<Instruction>>;
|
|
1967
|
+
createFixedDelegation: (input: MakeOptional<CreateFixedDelegationInput, 'delegator' | 'payer'>) => Self<Promise<Instruction>>;
|
|
1968
|
+
createPlan: (input: MakeOptional<CreatePlanInput, 'owner'>) => Self<Promise<Instruction>>;
|
|
1969
|
+
createRecurringDelegation: (input: MakeOptional<CreateRecurringDelegationInput, 'delegator' | 'payer'>) => Self<Promise<Instruction>>;
|
|
1970
|
+
deletePlan: (input: MakeOptional<DeletePlanInput, 'owner'>) => Self<Instruction>;
|
|
1971
|
+
initSubscriptionAuthority: (input: MakeOptional<InitSubscriptionAuthorityInput, 'owner' | 'payer'>) => Self<Promise<Instruction>>;
|
|
1972
|
+
resumeSubscription: (input: MakeOptional<ResumeSubscriptionInput, 'subscriber'>) => Self<Promise<Instruction>>;
|
|
1973
|
+
revokeDelegation: (input: MakeOptional<RevokeDelegationInput, 'authority'>) => Self<Instruction>;
|
|
1974
|
+
revokeSubscription: (input: MakeOptional<RevokeSubscriptionInput, 'authority'>) => Self<Instruction>;
|
|
1975
|
+
subscribe: (input: MakeOptional<SubscribeInput, 'payer' | 'subscriber'>) => Self<Promise<Instruction>>;
|
|
1976
|
+
transferFixed: (input: MakeOptional<TransferDelegationInput, 'delegatee'>) => Self<Promise<Instruction>>;
|
|
1977
|
+
transferRecurring: (input: MakeOptional<TransferDelegationInput, 'delegatee'>) => Self<Promise<Instruction>>;
|
|
1978
|
+
transferSubscription: (input: MakeOptional<TransferSubscriptionInput, 'caller'>) => Self<Promise<Instruction>>;
|
|
1979
|
+
updatePlan: (input: MakeOptional<UpdatePlanInput, 'owner'>) => Self<Instruction>;
|
|
1980
|
+
};
|
|
1981
|
+
type SubscriptionsPluginQueries = {
|
|
1982
|
+
/** Counts of active delegations grouped by kind. */
|
|
1983
|
+
activeDelegationSummary: (wallet: Address) => Promise<{
|
|
1984
|
+
fixed: number;
|
|
1985
|
+
recurring: number;
|
|
1986
|
+
subscriptions: number;
|
|
1987
|
+
total: number;
|
|
1988
|
+
}>;
|
|
1989
|
+
/** All delegations where `wallet` is the delegatee. */
|
|
1990
|
+
delegationsByDelegatee: (wallet: Address) => Promise<Delegation[]>;
|
|
1991
|
+
/** All delegations where `wallet` is the delegator. */
|
|
1992
|
+
delegationsByDelegator: (wallet: Address) => Promise<Delegation[]>;
|
|
1993
|
+
/** Whether the SubscriptionAuthority PDA exists for `(user, tokenMint)`. */
|
|
1994
|
+
isSubscriptionAuthorityInitialized: (user: Address, tokenMint: Address, programAddress?: Address) => Promise<{
|
|
1995
|
+
initialized: boolean;
|
|
1996
|
+
pda: Address;
|
|
1997
|
+
}>;
|
|
1998
|
+
/** Plans owned by `owner`. */
|
|
1999
|
+
plansForOwner: (owner: Address) => Promise<PlanWithAddress[]>;
|
|
2000
|
+
};
|
|
2001
|
+
type SubscriptionsPlugin = Omit<SubscriptionsPlugin$1, 'instructions'> & {
|
|
2002
|
+
instructions: SubscriptionsPluginInstructions;
|
|
2003
|
+
queries: SubscriptionsPluginQueries;
|
|
2004
|
+
};
|
|
2005
|
+
declare function subscriptionsProgram(): <T extends SubscriptionsPluginRequirements>(client: T) => Omit<T, "subscriptions"> & {
|
|
2006
|
+
subscriptions: {
|
|
2007
|
+
instructions: SubscriptionsPluginInstructions;
|
|
2008
|
+
queries: SubscriptionsPluginQueries;
|
|
2009
|
+
accounts: SubscriptionsPluginAccounts;
|
|
2010
|
+
pdas: SubscriptionsPluginPdas;
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
|
|
2014
|
+
/** Client-side validation failure (e.g. max destinations exceeded). */
|
|
2015
|
+
declare class ValidationError extends Error {
|
|
2016
|
+
constructor(message: string);
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
export { AccountDiscriminator, type AccountDiscriminatorArgs, CANCEL_SUBSCRIPTION_DISCRIMINATOR, CLOSE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR, CREATE_FIXED_DELEGATION_DISCRIMINATOR, CREATE_PLAN_DISCRIMINATOR, CREATE_RECURRING_DELEGATION_DISCRIMINATOR, CURRENT_PROGRAM_VERSION, type CancelSubscriptionAsyncInput, type CancelSubscriptionInput, type CancelSubscriptionInstruction, type CancelSubscriptionInstructionData, type CancelSubscriptionInstructionDataArgs, type CloseSubscriptionAuthorityInput, type CloseSubscriptionAuthorityInstruction, type CloseSubscriptionAuthorityInstructionData, type CloseSubscriptionAuthorityInstructionDataArgs, type CreateFixedDelegationData, type CreateFixedDelegationDataArgs, type CreateFixedDelegationInput, type CreateFixedDelegationInstruction, type CreateFixedDelegationInstructionData, type CreateFixedDelegationInstructionDataArgs, type CreatePlanInput, type CreatePlanInstruction, type CreatePlanInstructionData, type CreatePlanInstructionDataArgs, type CreateRecurringDelegationData, type CreateRecurringDelegationDataArgs, type CreateRecurringDelegationInput, type CreateRecurringDelegationInstruction, type CreateRecurringDelegationInstructionData, type CreateRecurringDelegationInstructionDataArgs, DELEGATEE_OFFSET, DELEGATION_SEED, DELEGATOR_OFFSET, DELETE_PLAN_DISCRIMINATOR, DISCRIMINATOR_OFFSET, type Delegation, type DelegationKindId, type DeletePlanInput, type DeletePlanInstruction, type DeletePlanInstructionData, type DeletePlanInstructionDataArgs, EVENT_AUTHORITY_SEED, type EventAuthority, type EventAuthorityArgs, type FixedDelegation, type FixedDelegationArgs, type FixedDelegationSeeds, type Header, type HeaderArgs, INIT_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR, type InitSubscriptionAuthorityAsyncInput, type InitSubscriptionAuthorityInput, type InitSubscriptionAuthorityInstruction, type InitSubscriptionAuthorityInstructionData, type InitSubscriptionAuthorityInstructionDataArgs, MAX_PLAN_DESTINATIONS, MAX_PLAN_PULLERS, METADATA_URI_LEN, PLAN_OWNER_OFFSET, PLAN_SEED, PLAN_SIZE, PROGRAM_ID, type ParsedCancelSubscriptionInstruction, type ParsedCloseSubscriptionAuthorityInstruction, type ParsedCreateFixedDelegationInstruction, type ParsedCreatePlanInstruction, type ParsedCreateRecurringDelegationInstruction, type ParsedDeletePlanInstruction, type ParsedInitSubscriptionAuthorityInstruction, type ParsedResumeSubscriptionInstruction, type ParsedRevokeDelegationInstruction, type ParsedSubscribeInstruction, type ParsedSubscriptionsInstruction, type ParsedTransferFixedInstruction, type ParsedTransferRecurringInstruction, type ParsedTransferSubscriptionInstruction, type ParsedUpdatePlanInstruction, type Plan, type PlanArgs, type PlanData, type PlanDataArgs, type PlanSeeds, PlanStatus, type PlanStatusArgs, type PlanTerms, type PlanTermsArgs, type PlanWithAddress, RESUME_SUBSCRIPTION_DISCRIMINATOR, REVOKE_DELEGATION_DISCRIMINATOR, type RawProgramAccount, type RecurringDelegation, type RecurringDelegationArgs, type RecurringDelegationSeeds, type ResumeSubscriptionAsyncInput, type ResumeSubscriptionInput, type ResumeSubscriptionInstruction, type ResumeSubscriptionInstructionData, type ResumeSubscriptionInstructionDataArgs, type RevokeDelegationInput, type RevokeDelegationInstruction, type RevokeDelegationInstructionData, type RevokeDelegationInstructionDataArgs, type RevokeSubscriptionInput, SUBSCRIBE_DISCRIMINATOR, SUBSCRIPTIONS_ERROR__ACCOUNT_NOT_WRITABLE, SUBSCRIPTIONS_ERROR__ALREADY_SUBSCRIBED, SUBSCRIPTIONS_ERROR__AMOUNT_EXCEEDS_LIMIT, SUBSCRIPTIONS_ERROR__AMOUNT_EXCEEDS_PERIOD_LIMIT, SUBSCRIPTIONS_ERROR__ARITHMETIC_OVERFLOW, SUBSCRIPTIONS_ERROR__ARITHMETIC_UNDERFLOW, SUBSCRIPTIONS_ERROR__ATA_OWNER_MISMATCH, SUBSCRIPTIONS_ERROR__DELEGATION_ALREADY_EXISTS, SUBSCRIPTIONS_ERROR__DELEGATION_EXPIRED, SUBSCRIPTIONS_ERROR__DELEGATION_NOT_STARTED, SUBSCRIPTIONS_ERROR__DELEGATION_VERSION_MISMATCH, SUBSCRIPTIONS_ERROR__FIXED_DELEGATION_AMOUNT_ZERO, SUBSCRIPTIONS_ERROR__FIXED_DELEGATION_EXPIRY_IN_PAST, SUBSCRIPTIONS_ERROR__INVALID_ACCOUNT_DATA, SUBSCRIPTIONS_ERROR__INVALID_ACCOUNT_DISCRIMINATOR, SUBSCRIPTIONS_ERROR__INVALID_ADDRESS, SUBSCRIPTIONS_ERROR__INVALID_AMOUNT, SUBSCRIPTIONS_ERROR__INVALID_ASSOCIATED_TOKEN_ACCOUNT_DERIVED_ADDRESS, SUBSCRIPTIONS_ERROR__INVALID_DELEGATE_PDA, SUBSCRIPTIONS_ERROR__INVALID_END_TS, SUBSCRIPTIONS_ERROR__INVALID_ESCROW_PDA, SUBSCRIPTIONS_ERROR__INVALID_EVENT_AUTHORITY, SUBSCRIPTIONS_ERROR__INVALID_EVENT_DATA, SUBSCRIPTIONS_ERROR__INVALID_EVENT_DISCRIMINATOR, SUBSCRIPTIONS_ERROR__INVALID_EVENT_TAG, SUBSCRIPTIONS_ERROR__INVALID_HEADER_DATA, SUBSCRIPTIONS_ERROR__INVALID_INSTRUCTION, SUBSCRIPTIONS_ERROR__INVALID_INSTRUCTION_DATA, SUBSCRIPTIONS_ERROR__INVALID_NUM_DESTINATIONS, SUBSCRIPTIONS_ERROR__INVALID_PAYER_DATA, SUBSCRIPTIONS_ERROR__INVALID_PERIOD_LENGTH, SUBSCRIPTIONS_ERROR__INVALID_PLAN_PDA, SUBSCRIPTIONS_ERROR__INVALID_PLAN_STATUS, SUBSCRIPTIONS_ERROR__INVALID_SUBSCRIPTION_AUTHORITY_PDA, SUBSCRIPTIONS_ERROR__INVALID_SUBSCRIPTION_PDA, SUBSCRIPTIONS_ERROR__INVALID_TOKEN2022_MINT_ACCOUNT_DATA, SUBSCRIPTIONS_ERROR__INVALID_TOKEN2022_TOKEN_ACCOUNT_DATA, SUBSCRIPTIONS_ERROR__INVALID_TOKEN_PROGRAM, SUBSCRIPTIONS_ERROR__INVALID_TOKEN_SPL_MINT_ACCOUNT_DATA, SUBSCRIPTIONS_ERROR__INVALID_TOKEN_SPL_TOKEN_ACCOUNT_DATA, SUBSCRIPTIONS_ERROR__MIGRATION_REQUIRED, SUBSCRIPTIONS_ERROR__MINT_HAS_CONFIDENTIAL_TRANSFER, SUBSCRIPTIONS_ERROR__MINT_HAS_MINT_CLOSE_AUTHORITY, SUBSCRIPTIONS_ERROR__MINT_HAS_NON_TRANSFERABLE, SUBSCRIPTIONS_ERROR__MINT_HAS_PAUSABLE, SUBSCRIPTIONS_ERROR__MINT_HAS_PERMANENT_DELEGATE, SUBSCRIPTIONS_ERROR__MINT_HAS_TRANSFER_FEE, SUBSCRIPTIONS_ERROR__MINT_HAS_TRANSFER_HOOK, SUBSCRIPTIONS_ERROR__MINT_MISMATCH, SUBSCRIPTIONS_ERROR__NOT_ENOUGH_ACCOUNT_KEYS, SUBSCRIPTIONS_ERROR__NOT_PLAN_OWNER, SUBSCRIPTIONS_ERROR__NOT_SIGNER, SUBSCRIPTIONS_ERROR__NOT_SYSTEM_PROGRAM, SUBSCRIPTIONS_ERROR__PERIOD_NOT_ELAPSED, SUBSCRIPTIONS_ERROR__PLAN_ALREADY_EXISTS, SUBSCRIPTIONS_ERROR__PLAN_CLOSED, SUBSCRIPTIONS_ERROR__PLAN_EXPIRED, SUBSCRIPTIONS_ERROR__PLAN_IMMUTABLE_AFTER_SUNSET, SUBSCRIPTIONS_ERROR__PLAN_NOT_EXPIRED, SUBSCRIPTIONS_ERROR__PLAN_SUNSET, SUBSCRIPTIONS_ERROR__PLAN_TERMS_MISMATCH, SUBSCRIPTIONS_ERROR__RECURRING_DELEGATION_AMOUNT_ZERO, SUBSCRIPTIONS_ERROR__RECURRING_DELEGATION_START_TIME_GREATER_THAN_EXPIRY, SUBSCRIPTIONS_ERROR__RECURRING_DELEGATION_START_TIME_IN_PAST, SUBSCRIPTIONS_ERROR__STALE_SUBSCRIPTION_AUTHORITY, SUBSCRIPTIONS_ERROR__SUBSCRIPTION_ALREADY_CANCELLED, SUBSCRIPTIONS_ERROR__SUBSCRIPTION_CANCELLED, SUBSCRIPTIONS_ERROR__SUBSCRIPTION_NOT_CANCELLED, SUBSCRIPTIONS_ERROR__SUBSCRIPTION_PLAN_MISMATCH, SUBSCRIPTIONS_ERROR__SUNSET_REQUIRES_END_TS, SUBSCRIPTIONS_ERROR__UNAUTHORIZED, SUBSCRIPTIONS_ERROR__UNAUTHORIZED_DESTINATION, SUBSCRIPTIONS_PROGRAM_ADDRESS, SUBSCRIPTION_AUTHORITY_SEED, SUBSCRIPTION_SEED, SUBSCRIPTION_SIZE, type SubscribeAsyncInput, type SubscribeData, type SubscribeDataArgs, type SubscribeInput, type SubscribeInstruction, type SubscribeInstructionData, type SubscribeInstructionDataArgs, type SubscriptionAuthority, type SubscriptionAuthorityArgs, type SubscriptionAuthoritySeeds, type SubscriptionDelegation, type SubscriptionDelegationArgs, type SubscriptionDelegationSeeds, SubscriptionsAccount, type SubscriptionsError, SubscriptionsInstruction, type SubscriptionsPlugin, type SubscriptionsPluginAccounts, type SubscriptionsPluginInstructions, type SubscriptionsPluginPdas, type SubscriptionsPluginQueries, type SubscriptionsPluginRequirements, TRANSFER_FIXED_DISCRIMINATOR, TRANSFER_RECURRING_DISCRIMINATOR, TRANSFER_SUBSCRIPTION_DISCRIMINATOR, type TransferData, type TransferDataArgs, type TransferDelegationInput, type TransferFixedInput, type TransferFixedInstruction, type TransferFixedInstructionData, type TransferFixedInstructionDataArgs, type TransferRecurringInput, type TransferRecurringInstruction, type TransferRecurringInstructionData, type TransferRecurringInstructionDataArgs, type TransferSubscriptionInput, type TransferSubscriptionInstruction, type TransferSubscriptionInstructionData, type TransferSubscriptionInstructionDataArgs, U64_BYTE_SIZE, UPDATE_PLAN_DISCRIMINATOR, type UpdatePlanData, type UpdatePlanDataArgs, type UpdatePlanInput, type UpdatePlanInstruction, type UpdatePlanInstructionData, type UpdatePlanInstructionDataArgs, ValidationError, ZERO_ADDRESS, decodeDelegationAccount, decodeEventAuthority, decodeFixedDelegation, decodePlan, decodeRecurringDelegation, decodeSubscriptionAuthority, decodeSubscriptionDelegation, fetchAllEventAuthority, fetchAllFixedDelegation, fetchAllMaybeEventAuthority, fetchAllMaybeFixedDelegation, fetchAllMaybePlan, fetchAllMaybeRecurringDelegation, fetchAllMaybeSubscriptionAuthority, fetchAllMaybeSubscriptionDelegation, fetchAllPlan, fetchAllRecurringDelegation, fetchAllSubscriptionAuthority, fetchAllSubscriptionDelegation, fetchDelegationsByDelegatee, fetchDelegationsByDelegator, fetchEventAuthority, fetchEventAuthorityFromSeeds, fetchFixedDelegation, fetchFixedDelegationFromSeeds, fetchMaybeEventAuthority, fetchMaybeEventAuthorityFromSeeds, fetchMaybeFixedDelegation, fetchMaybeFixedDelegationFromSeeds, fetchMaybePlan, fetchMaybePlanFromSeeds, fetchMaybeRecurringDelegation, fetchMaybeRecurringDelegationFromSeeds, fetchMaybeSubscriptionAuthority, fetchMaybeSubscriptionAuthorityFromSeeds, fetchMaybeSubscriptionDelegation, fetchMaybeSubscriptionDelegationFromSeeds, fetchPlan, fetchPlanFromSeeds, fetchPlansForOwner, fetchRecurringDelegation, fetchRecurringDelegationFromSeeds, fetchSubscriptionAuthority, fetchSubscriptionAuthorityFromSeeds, fetchSubscriptionDelegation, fetchSubscriptionDelegationFromSeeds, fetchSubscriptionsForUser, findEventAuthorityPda, findFixedDelegationPda, findPlanPda, findRecurringDelegationPda, findSubscriptionAuthorityPda, findSubscriptionDelegationPda, getAccountDiscriminatorCodec, getAccountDiscriminatorDecoder, getAccountDiscriminatorEncoder, getCancelSubscriptionDiscriminatorBytes, getCancelSubscriptionInstruction, getCancelSubscriptionInstructionAsync, getCancelSubscriptionInstructionDataCodec, getCancelSubscriptionInstructionDataDecoder, getCancelSubscriptionInstructionDataEncoder, getCancelSubscriptionOverlayInstructionAsync, getCloseSubscriptionAuthorityDiscriminatorBytes, getCloseSubscriptionAuthorityInstruction, getCloseSubscriptionAuthorityInstructionDataCodec, getCloseSubscriptionAuthorityInstructionDataDecoder, getCloseSubscriptionAuthorityInstructionDataEncoder, getCloseSubscriptionAuthorityOverlayInstructionAsync, getCreateFixedDelegationDataCodec, getCreateFixedDelegationDataDecoder, getCreateFixedDelegationDataEncoder, getCreateFixedDelegationDiscriminatorBytes, getCreateFixedDelegationInstruction, getCreateFixedDelegationInstructionDataCodec, getCreateFixedDelegationInstructionDataDecoder, getCreateFixedDelegationInstructionDataEncoder, getCreateFixedDelegationOverlayInstructionAsync, getCreatePlanDiscriminatorBytes, getCreatePlanInstruction, getCreatePlanInstructionDataCodec, getCreatePlanInstructionDataDecoder, getCreatePlanInstructionDataEncoder, getCreatePlanOverlayInstructionAsync, getCreateRecurringDelegationDataCodec, getCreateRecurringDelegationDataDecoder, getCreateRecurringDelegationDataEncoder, getCreateRecurringDelegationDiscriminatorBytes, getCreateRecurringDelegationInstruction, getCreateRecurringDelegationInstructionDataCodec, getCreateRecurringDelegationInstructionDataDecoder, getCreateRecurringDelegationInstructionDataEncoder, getCreateRecurringDelegationOverlayInstructionAsync, getDeletePlanDiscriminatorBytes, getDeletePlanInstruction, getDeletePlanInstructionDataCodec, getDeletePlanInstructionDataDecoder, getDeletePlanInstructionDataEncoder, getDeletePlanOverlayInstruction, getEventAuthorityCodec, getEventAuthorityDecoder, getEventAuthorityEncoder, getFixedDelegationCodec, getFixedDelegationDecoder, getFixedDelegationEncoder, getHeaderCodec, getHeaderDecoder, getHeaderEncoder, getInitSubscriptionAuthorityDiscriminatorBytes, getInitSubscriptionAuthorityInstruction, getInitSubscriptionAuthorityInstructionAsync, getInitSubscriptionAuthorityInstructionDataCodec, getInitSubscriptionAuthorityInstructionDataDecoder, getInitSubscriptionAuthorityInstructionDataEncoder, getInitSubscriptionAuthorityOverlayInstructionAsync, getPlanCodec, getPlanDataCodec, getPlanDataDecoder, getPlanDataEncoder, getPlanDecoder, getPlanEncoder, getPlanStatusCodec, getPlanStatusDecoder, getPlanStatusEncoder, getPlanTermsCodec, getPlanTermsDecoder, getPlanTermsEncoder, getRecurringDelegationCodec, getRecurringDelegationDecoder, getRecurringDelegationEncoder, getResumeSubscriptionDiscriminatorBytes, getResumeSubscriptionInstruction, getResumeSubscriptionInstructionAsync, getResumeSubscriptionInstructionDataCodec, getResumeSubscriptionInstructionDataDecoder, getResumeSubscriptionInstructionDataEncoder, getResumeSubscriptionOverlayInstructionAsync, getRevokeDelegationDiscriminatorBytes, getRevokeDelegationInstruction, getRevokeDelegationInstructionDataCodec, getRevokeDelegationInstructionDataDecoder, getRevokeDelegationInstructionDataEncoder, getRevokeDelegationOverlayInstruction, getRevokeSubscriptionOverlayInstruction, getSubscribeDataCodec, getSubscribeDataDecoder, getSubscribeDataEncoder, getSubscribeDiscriminatorBytes, getSubscribeInstruction, getSubscribeInstructionAsync, getSubscribeInstructionDataCodec, getSubscribeInstructionDataDecoder, getSubscribeInstructionDataEncoder, getSubscribeOverlayInstructionAsync, getSubscriptionAuthorityCodec, getSubscriptionAuthorityDecoder, getSubscriptionAuthorityEncoder, getSubscriptionDelegationCodec, getSubscriptionDelegationDecoder, getSubscriptionDelegationEncoder, getSubscriptionsErrorMessage, getTransferDataCodec, getTransferDataDecoder, getTransferDataEncoder, getTransferFixedDiscriminatorBytes, getTransferFixedInstruction, getTransferFixedInstructionDataCodec, getTransferFixedInstructionDataDecoder, getTransferFixedInstructionDataEncoder, getTransferFixedOverlayInstructionAsync, getTransferRecurringDiscriminatorBytes, getTransferRecurringInstruction, getTransferRecurringInstructionDataCodec, getTransferRecurringInstructionDataDecoder, getTransferRecurringInstructionDataEncoder, getTransferRecurringOverlayInstructionAsync, getTransferSubscriptionDiscriminatorBytes, getTransferSubscriptionInstruction, getTransferSubscriptionInstructionDataCodec, getTransferSubscriptionInstructionDataDecoder, getTransferSubscriptionInstructionDataEncoder, getTransferSubscriptionOverlayInstructionAsync, getUpdatePlanDataCodec, getUpdatePlanDataDecoder, getUpdatePlanDataEncoder, getUpdatePlanDiscriminatorBytes, getUpdatePlanInstruction, getUpdatePlanInstructionDataCodec, getUpdatePlanInstructionDataDecoder, getUpdatePlanInstructionDataEncoder, getUpdatePlanOverlayInstruction, identifySubscriptionsInstruction, isSubscriptionsError, parseCancelSubscriptionInstruction, parseCloseSubscriptionAuthorityInstruction, parseCreateFixedDelegationInstruction, parseCreatePlanInstruction, parseCreateRecurringDelegationInstruction, parseDeletePlanInstruction, parseInitSubscriptionAuthorityInstruction, parseResumeSubscriptionInstruction, parseRevokeDelegationInstruction, parseSubscribeInstruction, parseSubscriptionsInstruction, parseTransferFixedInstruction, parseTransferRecurringInstruction, parseTransferSubscriptionInstruction, parseUpdatePlanInstruction, subscriptionsProgram, toEncodedAccount };
|