@solana/subscriptions 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.cjs +411 -177
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +140 -71
- package/dist/index.d.ts +140 -71
- package/dist/index.js +393 -156
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -159,11 +159,13 @@ type CreateFixedDelegationData = {
|
|
|
159
159
|
nonce: bigint;
|
|
160
160
|
amount: bigint;
|
|
161
161
|
expiryTs: bigint;
|
|
162
|
+
expectedSubscriptionAuthorityInitId: bigint;
|
|
162
163
|
};
|
|
163
164
|
type CreateFixedDelegationDataArgs = {
|
|
164
165
|
nonce: number | bigint;
|
|
165
166
|
amount: number | bigint;
|
|
166
167
|
expiryTs: number | bigint;
|
|
168
|
+
expectedSubscriptionAuthorityInitId: number | bigint;
|
|
167
169
|
};
|
|
168
170
|
declare function getCreateFixedDelegationDataEncoder(): FixedSizeEncoder<CreateFixedDelegationDataArgs>;
|
|
169
171
|
declare function getCreateFixedDelegationDataDecoder(): FixedSizeDecoder<CreateFixedDelegationData>;
|
|
@@ -183,6 +185,7 @@ type CreateRecurringDelegationData = {
|
|
|
183
185
|
periodLengthS: bigint;
|
|
184
186
|
startTs: bigint;
|
|
185
187
|
expiryTs: bigint;
|
|
188
|
+
expectedSubscriptionAuthorityInitId: bigint;
|
|
186
189
|
};
|
|
187
190
|
type CreateRecurringDelegationDataArgs = {
|
|
188
191
|
nonce: number | bigint;
|
|
@@ -190,6 +193,7 @@ type CreateRecurringDelegationDataArgs = {
|
|
|
190
193
|
periodLengthS: number | bigint;
|
|
191
194
|
startTs: number | bigint;
|
|
192
195
|
expiryTs: number | bigint;
|
|
196
|
+
expectedSubscriptionAuthorityInitId: number | bigint;
|
|
193
197
|
};
|
|
194
198
|
declare function getCreateRecurringDelegationDataEncoder(): FixedSizeEncoder<CreateRecurringDelegationDataArgs>;
|
|
195
199
|
declare function getCreateRecurringDelegationDataDecoder(): FixedSizeDecoder<CreateRecurringDelegationData>;
|
|
@@ -309,6 +313,7 @@ type SubscribeData = {
|
|
|
309
313
|
expectedAmount: bigint;
|
|
310
314
|
expectedPeriodHours: bigint;
|
|
311
315
|
expectedCreatedAt: bigint;
|
|
316
|
+
expectedSubscriptionAuthorityInitId: bigint;
|
|
312
317
|
};
|
|
313
318
|
type SubscribeDataArgs = {
|
|
314
319
|
planId: number | bigint;
|
|
@@ -317,6 +322,7 @@ type SubscribeDataArgs = {
|
|
|
317
322
|
expectedAmount: number | bigint;
|
|
318
323
|
expectedPeriodHours: number | bigint;
|
|
319
324
|
expectedCreatedAt: number | bigint;
|
|
325
|
+
expectedSubscriptionAuthorityInitId: number | bigint;
|
|
320
326
|
};
|
|
321
327
|
declare function getSubscribeDataEncoder(): FixedSizeEncoder<SubscribeDataArgs>;
|
|
322
328
|
declare function getSubscribeDataDecoder(): FixedSizeDecoder<SubscribeData>;
|
|
@@ -703,7 +709,8 @@ declare enum SubscriptionsInstruction {
|
|
|
703
709
|
DeletePlan = 9,
|
|
704
710
|
TransferSubscription = 10,
|
|
705
711
|
Subscribe = 11,
|
|
706
|
-
CancelSubscription = 12
|
|
712
|
+
CancelSubscription = 12,
|
|
713
|
+
ResumeSubscription = 13
|
|
707
714
|
}
|
|
708
715
|
declare function identifySubscriptionsInstruction(instruction: {
|
|
709
716
|
data: ReadonlyUint8Array;
|
|
@@ -734,7 +741,9 @@ type ParsedSubscriptionsInstruction<TProgram extends string = 'De1egAFMkMWZSN5rY
|
|
|
734
741
|
instructionType: SubscriptionsInstruction.Subscribe;
|
|
735
742
|
} & ParsedSubscribeInstruction<TProgram>) | ({
|
|
736
743
|
instructionType: SubscriptionsInstruction.CancelSubscription;
|
|
737
|
-
} & ParsedCancelSubscriptionInstruction<TProgram>)
|
|
744
|
+
} & ParsedCancelSubscriptionInstruction<TProgram>) | ({
|
|
745
|
+
instructionType: SubscriptionsInstruction.ResumeSubscription;
|
|
746
|
+
} & ParsedResumeSubscriptionInstruction<TProgram>);
|
|
738
747
|
declare function parseSubscriptionsInstruction<TProgram extends string>(instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>): ParsedSubscriptionsInstruction<TProgram>;
|
|
739
748
|
type SubscriptionsPlugin$1 = {
|
|
740
749
|
accounts: SubscriptionsPluginAccounts;
|
|
@@ -763,6 +772,7 @@ type SubscriptionsPluginInstructions$1 = {
|
|
|
763
772
|
transferSubscription: (input: TransferSubscriptionInput$1) => ReturnType<typeof getTransferSubscriptionInstruction> & SelfPlanAndSendFunctions;
|
|
764
773
|
subscribe: (input: SubscribeAsyncInput) => ReturnType<typeof getSubscribeInstructionAsync> & SelfPlanAndSendFunctions;
|
|
765
774
|
cancelSubscription: (input: CancelSubscriptionAsyncInput) => ReturnType<typeof getCancelSubscriptionInstructionAsync> & SelfPlanAndSendFunctions;
|
|
775
|
+
resumeSubscription: (input: ResumeSubscriptionAsyncInput) => ReturnType<typeof getResumeSubscriptionInstructionAsync> & SelfPlanAndSendFunctions;
|
|
766
776
|
};
|
|
767
777
|
type SubscriptionsPluginPdas = {
|
|
768
778
|
fixedDelegation: typeof findFixedDelegationPda;
|
|
@@ -1199,6 +1209,79 @@ type ParsedInitSubscriptionAuthorityInstruction<TProgram extends string = typeof
|
|
|
1199
1209
|
};
|
|
1200
1210
|
declare function parseInitSubscriptionAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedInitSubscriptionAuthorityInstruction<TProgram, TAccountMetas>;
|
|
1201
1211
|
|
|
1212
|
+
/**
|
|
1213
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1214
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1215
|
+
* to add features, then rerun Codama to update it.
|
|
1216
|
+
*
|
|
1217
|
+
* @see https://github.com/codama-idl/codama
|
|
1218
|
+
*/
|
|
1219
|
+
|
|
1220
|
+
declare const RESUME_SUBSCRIPTION_DISCRIMINATOR = 13;
|
|
1221
|
+
declare function getResumeSubscriptionDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1222
|
+
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<[
|
|
1223
|
+
TAccountSubscriber extends string ? ReadonlySignerAccount<TAccountSubscriber> & AccountSignerMeta<TAccountSubscriber> : TAccountSubscriber,
|
|
1224
|
+
TAccountPlanPda extends string ? ReadonlyAccount<TAccountPlanPda> : TAccountPlanPda,
|
|
1225
|
+
TAccountSubscriptionPda extends string ? WritableAccount<TAccountSubscriptionPda> : TAccountSubscriptionPda,
|
|
1226
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
1227
|
+
TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
|
|
1228
|
+
...TRemainingAccounts
|
|
1229
|
+
]>;
|
|
1230
|
+
type ResumeSubscriptionInstructionData = {
|
|
1231
|
+
discriminator: number;
|
|
1232
|
+
};
|
|
1233
|
+
type ResumeSubscriptionInstructionDataArgs = {};
|
|
1234
|
+
declare function getResumeSubscriptionInstructionDataEncoder(): FixedSizeEncoder<ResumeSubscriptionInstructionDataArgs>;
|
|
1235
|
+
declare function getResumeSubscriptionInstructionDataDecoder(): FixedSizeDecoder<ResumeSubscriptionInstructionData>;
|
|
1236
|
+
declare function getResumeSubscriptionInstructionDataCodec(): FixedSizeCodec<ResumeSubscriptionInstructionDataArgs, ResumeSubscriptionInstructionData>;
|
|
1237
|
+
type ResumeSubscriptionAsyncInput<TAccountSubscriber extends string = string, TAccountPlanPda extends string = string, TAccountSubscriptionPda extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1238
|
+
/** The subscriber resuming the subscription */
|
|
1239
|
+
subscriber: TransactionSigner<TAccountSubscriber>;
|
|
1240
|
+
/** The plan PDA for the subscription */
|
|
1241
|
+
planPda: Address<TAccountPlanPda>;
|
|
1242
|
+
/** The subscription PDA being resumed */
|
|
1243
|
+
subscriptionPda?: Address<TAccountSubscriptionPda>;
|
|
1244
|
+
/** The event authority PDA */
|
|
1245
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
1246
|
+
/** This program (for self-CPI) */
|
|
1247
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
1248
|
+
};
|
|
1249
|
+
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?: {
|
|
1250
|
+
programAddress?: TProgramAddress;
|
|
1251
|
+
}): Promise<ResumeSubscriptionInstruction<TProgramAddress, TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>>;
|
|
1252
|
+
type ResumeSubscriptionInput$1<TAccountSubscriber extends string = string, TAccountPlanPda extends string = string, TAccountSubscriptionPda extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1253
|
+
/** The subscriber resuming the subscription */
|
|
1254
|
+
subscriber: TransactionSigner<TAccountSubscriber>;
|
|
1255
|
+
/** The plan PDA for the subscription */
|
|
1256
|
+
planPda: Address<TAccountPlanPda>;
|
|
1257
|
+
/** The subscription PDA being resumed */
|
|
1258
|
+
subscriptionPda: Address<TAccountSubscriptionPda>;
|
|
1259
|
+
/** The event authority PDA */
|
|
1260
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
1261
|
+
/** This program (for self-CPI) */
|
|
1262
|
+
selfProgram?: Address<TAccountSelfProgram>;
|
|
1263
|
+
};
|
|
1264
|
+
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?: {
|
|
1265
|
+
programAddress?: TProgramAddress;
|
|
1266
|
+
}): ResumeSubscriptionInstruction<TProgramAddress, TAccountSubscriber, TAccountPlanPda, TAccountSubscriptionPda, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1267
|
+
type ParsedResumeSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1268
|
+
programAddress: Address<TProgram>;
|
|
1269
|
+
accounts: {
|
|
1270
|
+
/** The subscriber resuming the subscription */
|
|
1271
|
+
subscriber: TAccountMetas[0];
|
|
1272
|
+
/** The plan PDA for the subscription */
|
|
1273
|
+
planPda: TAccountMetas[1];
|
|
1274
|
+
/** The subscription PDA being resumed */
|
|
1275
|
+
subscriptionPda: TAccountMetas[2];
|
|
1276
|
+
/** The event authority PDA */
|
|
1277
|
+
eventAuthority: TAccountMetas[3];
|
|
1278
|
+
/** This program (for self-CPI) */
|
|
1279
|
+
selfProgram: TAccountMetas[4];
|
|
1280
|
+
};
|
|
1281
|
+
data: ResumeSubscriptionInstructionData;
|
|
1282
|
+
};
|
|
1283
|
+
declare function parseResumeSubscriptionInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedResumeSubscriptionInstruction<TProgram, TAccountMetas>;
|
|
1284
|
+
|
|
1202
1285
|
/**
|
|
1203
1286
|
* This code was AUTOGENERATED using the Codama library.
|
|
1204
1287
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
@@ -1351,11 +1434,12 @@ declare function parseSubscribeInstruction<TProgram extends string, TAccountMeta
|
|
|
1351
1434
|
|
|
1352
1435
|
declare const TRANSFER_FIXED_DISCRIMINATOR = 4;
|
|
1353
1436
|
declare function getTransferFixedDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1354
|
-
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<[
|
|
1437
|
+
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, TAccountTokenMint 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<[
|
|
1355
1438
|
TAccountDelegationPda extends string ? WritableAccount<TAccountDelegationPda> : TAccountDelegationPda,
|
|
1356
1439
|
TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
1357
1440
|
TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
|
|
1358
1441
|
TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
|
|
1442
|
+
TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
|
|
1359
1443
|
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
1360
1444
|
TAccountDelegatee extends string ? ReadonlySignerAccount<TAccountDelegatee> & AccountSignerMeta<TAccountDelegatee> : TAccountDelegatee,
|
|
1361
1445
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
@@ -1372,7 +1456,7 @@ type TransferFixedInstructionDataArgs = {
|
|
|
1372
1456
|
declare function getTransferFixedInstructionDataEncoder(): FixedSizeEncoder<TransferFixedInstructionDataArgs>;
|
|
1373
1457
|
declare function getTransferFixedInstructionDataDecoder(): FixedSizeDecoder<TransferFixedInstructionData>;
|
|
1374
1458
|
declare function getTransferFixedInstructionDataCodec(): FixedSizeCodec<TransferFixedInstructionDataArgs, TransferFixedInstructionData>;
|
|
1375
|
-
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> = {
|
|
1459
|
+
type TransferFixedInput<TAccountDelegationPda extends string = string, TAccountSubscriptionAuthority extends string = string, TAccountDelegatorAta extends string = string, TAccountReceiverAta extends string = string, TAccountTokenMint extends string = string, TAccountTokenProgram extends string = string, TAccountDelegatee extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1376
1460
|
/** The fixed delegation PDA to transfer from */
|
|
1377
1461
|
delegationPda: Address<TAccountDelegationPda>;
|
|
1378
1462
|
/** The subscription-authority PDA */
|
|
@@ -1381,6 +1465,8 @@ type TransferFixedInput<TAccountDelegationPda extends string = string, TAccountS
|
|
|
1381
1465
|
delegatorAta: Address<TAccountDelegatorAta>;
|
|
1382
1466
|
/** The receiver's ATA to transfer to */
|
|
1383
1467
|
receiverAta: Address<TAccountReceiverAta>;
|
|
1468
|
+
/** The token mint */
|
|
1469
|
+
tokenMint: Address<TAccountTokenMint>;
|
|
1384
1470
|
/** Token program */
|
|
1385
1471
|
tokenProgram: Address<TAccountTokenProgram>;
|
|
1386
1472
|
/** The delegatee signing the transfer */
|
|
@@ -1391,9 +1477,9 @@ type TransferFixedInput<TAccountDelegationPda extends string = string, TAccountS
|
|
|
1391
1477
|
selfProgram?: Address<TAccountSelfProgram>;
|
|
1392
1478
|
transferData: TransferFixedInstructionDataArgs['transferData'];
|
|
1393
1479
|
};
|
|
1394
|
-
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?: {
|
|
1480
|
+
declare function getTransferFixedInstruction<TAccountDelegationPda extends string, TAccountSubscriptionAuthority extends string, TAccountDelegatorAta extends string, TAccountReceiverAta extends string, TAccountTokenMint 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, TAccountTokenMint, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1395
1481
|
programAddress?: TProgramAddress;
|
|
1396
|
-
}): TransferFixedInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1482
|
+
}): TransferFixedInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenMint, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1397
1483
|
type ParsedTransferFixedInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1398
1484
|
programAddress: Address<TProgram>;
|
|
1399
1485
|
accounts: {
|
|
@@ -1405,14 +1491,16 @@ type ParsedTransferFixedInstruction<TProgram extends string = typeof SUBSCRIPTIO
|
|
|
1405
1491
|
delegatorAta: TAccountMetas[2];
|
|
1406
1492
|
/** The receiver's ATA to transfer to */
|
|
1407
1493
|
receiverAta: TAccountMetas[3];
|
|
1494
|
+
/** The token mint */
|
|
1495
|
+
tokenMint: TAccountMetas[4];
|
|
1408
1496
|
/** Token program */
|
|
1409
|
-
tokenProgram: TAccountMetas[
|
|
1497
|
+
tokenProgram: TAccountMetas[5];
|
|
1410
1498
|
/** The delegatee signing the transfer */
|
|
1411
|
-
delegatee: TAccountMetas[
|
|
1499
|
+
delegatee: TAccountMetas[6];
|
|
1412
1500
|
/** The event authority PDA */
|
|
1413
|
-
eventAuthority: TAccountMetas[
|
|
1501
|
+
eventAuthority: TAccountMetas[7];
|
|
1414
1502
|
/** This program (for self-CPI) */
|
|
1415
|
-
selfProgram: TAccountMetas[
|
|
1503
|
+
selfProgram: TAccountMetas[8];
|
|
1416
1504
|
};
|
|
1417
1505
|
data: TransferFixedInstructionData;
|
|
1418
1506
|
};
|
|
@@ -1428,11 +1516,12 @@ declare function parseTransferFixedInstruction<TProgram extends string, TAccount
|
|
|
1428
1516
|
|
|
1429
1517
|
declare const TRANSFER_RECURRING_DISCRIMINATOR = 5;
|
|
1430
1518
|
declare function getTransferRecurringDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1431
|
-
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<[
|
|
1519
|
+
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, TAccountTokenMint 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
1520
|
TAccountDelegationPda extends string ? WritableAccount<TAccountDelegationPda> : TAccountDelegationPda,
|
|
1433
1521
|
TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
1434
1522
|
TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
|
|
1435
1523
|
TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
|
|
1524
|
+
TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
|
|
1436
1525
|
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
1437
1526
|
TAccountDelegatee extends string ? ReadonlySignerAccount<TAccountDelegatee> & AccountSignerMeta<TAccountDelegatee> : TAccountDelegatee,
|
|
1438
1527
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
@@ -1449,7 +1538,7 @@ type TransferRecurringInstructionDataArgs = {
|
|
|
1449
1538
|
declare function getTransferRecurringInstructionDataEncoder(): FixedSizeEncoder<TransferRecurringInstructionDataArgs>;
|
|
1450
1539
|
declare function getTransferRecurringInstructionDataDecoder(): FixedSizeDecoder<TransferRecurringInstructionData>;
|
|
1451
1540
|
declare function getTransferRecurringInstructionDataCodec(): FixedSizeCodec<TransferRecurringInstructionDataArgs, TransferRecurringInstructionData>;
|
|
1452
|
-
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> = {
|
|
1541
|
+
type TransferRecurringInput<TAccountDelegationPda extends string = string, TAccountSubscriptionAuthority extends string = string, TAccountDelegatorAta extends string = string, TAccountReceiverAta extends string = string, TAccountTokenMint extends string = string, TAccountTokenProgram extends string = string, TAccountDelegatee extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1453
1542
|
/** The recurring delegation PDA to transfer from */
|
|
1454
1543
|
delegationPda: Address<TAccountDelegationPda>;
|
|
1455
1544
|
/** The subscription-authority PDA */
|
|
@@ -1458,6 +1547,8 @@ type TransferRecurringInput<TAccountDelegationPda extends string = string, TAcco
|
|
|
1458
1547
|
delegatorAta: Address<TAccountDelegatorAta>;
|
|
1459
1548
|
/** The receiver's ATA to transfer to */
|
|
1460
1549
|
receiverAta: Address<TAccountReceiverAta>;
|
|
1550
|
+
/** The token mint */
|
|
1551
|
+
tokenMint: Address<TAccountTokenMint>;
|
|
1461
1552
|
/** Token program */
|
|
1462
1553
|
tokenProgram: Address<TAccountTokenProgram>;
|
|
1463
1554
|
/** The delegatee signing the transfer */
|
|
@@ -1468,9 +1559,9 @@ type TransferRecurringInput<TAccountDelegationPda extends string = string, TAcco
|
|
|
1468
1559
|
selfProgram?: Address<TAccountSelfProgram>;
|
|
1469
1560
|
transferData: TransferRecurringInstructionDataArgs['transferData'];
|
|
1470
1561
|
};
|
|
1471
|
-
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?: {
|
|
1562
|
+
declare function getTransferRecurringInstruction<TAccountDelegationPda extends string, TAccountSubscriptionAuthority extends string, TAccountDelegatorAta extends string, TAccountReceiverAta extends string, TAccountTokenMint 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, TAccountTokenMint, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1472
1563
|
programAddress?: TProgramAddress;
|
|
1473
|
-
}): TransferRecurringInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1564
|
+
}): TransferRecurringInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenMint, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1474
1565
|
type ParsedTransferRecurringInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1475
1566
|
programAddress: Address<TProgram>;
|
|
1476
1567
|
accounts: {
|
|
@@ -1482,14 +1573,16 @@ type ParsedTransferRecurringInstruction<TProgram extends string = typeof SUBSCRI
|
|
|
1482
1573
|
delegatorAta: TAccountMetas[2];
|
|
1483
1574
|
/** The receiver's ATA to transfer to */
|
|
1484
1575
|
receiverAta: TAccountMetas[3];
|
|
1576
|
+
/** The token mint */
|
|
1577
|
+
tokenMint: TAccountMetas[4];
|
|
1485
1578
|
/** Token program */
|
|
1486
|
-
tokenProgram: TAccountMetas[
|
|
1579
|
+
tokenProgram: TAccountMetas[5];
|
|
1487
1580
|
/** The delegatee signing the transfer */
|
|
1488
|
-
delegatee: TAccountMetas[
|
|
1581
|
+
delegatee: TAccountMetas[6];
|
|
1489
1582
|
/** The event authority PDA */
|
|
1490
|
-
eventAuthority: TAccountMetas[
|
|
1583
|
+
eventAuthority: TAccountMetas[7];
|
|
1491
1584
|
/** This program (for self-CPI) */
|
|
1492
|
-
selfProgram: TAccountMetas[
|
|
1585
|
+
selfProgram: TAccountMetas[8];
|
|
1493
1586
|
};
|
|
1494
1587
|
data: TransferRecurringInstructionData;
|
|
1495
1588
|
};
|
|
@@ -1505,13 +1598,14 @@ declare function parseTransferRecurringInstruction<TProgram extends string, TAcc
|
|
|
1505
1598
|
|
|
1506
1599
|
declare const TRANSFER_SUBSCRIPTION_DISCRIMINATOR = 10;
|
|
1507
1600
|
declare function getTransferSubscriptionDiscriminatorBytes(): ReadonlyUint8Array;
|
|
1508
|
-
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<[
|
|
1601
|
+
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, TAccountTokenMint 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<[
|
|
1509
1602
|
TAccountSubscriptionPda extends string ? WritableAccount<TAccountSubscriptionPda> : TAccountSubscriptionPda,
|
|
1510
1603
|
TAccountPlanPda extends string ? ReadonlyAccount<TAccountPlanPda> : TAccountPlanPda,
|
|
1511
1604
|
TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
|
|
1512
1605
|
TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
|
|
1513
1606
|
TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
|
|
1514
1607
|
TAccountCaller extends string ? ReadonlySignerAccount<TAccountCaller> & AccountSignerMeta<TAccountCaller> : TAccountCaller,
|
|
1608
|
+
TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
|
|
1515
1609
|
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
1516
1610
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
1517
1611
|
TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
|
|
@@ -1527,7 +1621,7 @@ type TransferSubscriptionInstructionDataArgs = {
|
|
|
1527
1621
|
declare function getTransferSubscriptionInstructionDataEncoder(): FixedSizeEncoder<TransferSubscriptionInstructionDataArgs>;
|
|
1528
1622
|
declare function getTransferSubscriptionInstructionDataDecoder(): FixedSizeDecoder<TransferSubscriptionInstructionData>;
|
|
1529
1623
|
declare function getTransferSubscriptionInstructionDataCodec(): FixedSizeCodec<TransferSubscriptionInstructionDataArgs, TransferSubscriptionInstructionData>;
|
|
1530
|
-
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> = {
|
|
1624
|
+
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, TAccountTokenMint extends string = string, TAccountTokenProgram extends string = string, TAccountEventAuthority extends string = string, TAccountSelfProgram extends string = string> = {
|
|
1531
1625
|
/** The subscription delegation PDA */
|
|
1532
1626
|
subscriptionPda: Address<TAccountSubscriptionPda>;
|
|
1533
1627
|
/** The plan PDA */
|
|
@@ -1540,6 +1634,8 @@ type TransferSubscriptionInput$1<TAccountSubscriptionPda extends string = string
|
|
|
1540
1634
|
receiverAta: Address<TAccountReceiverAta>;
|
|
1541
1635
|
/** The authorized puller (plan owner or whitelisted) */
|
|
1542
1636
|
caller: TransactionSigner<TAccountCaller>;
|
|
1637
|
+
/** The token mint */
|
|
1638
|
+
tokenMint: Address<TAccountTokenMint>;
|
|
1543
1639
|
/** Token program */
|
|
1544
1640
|
tokenProgram: Address<TAccountTokenProgram>;
|
|
1545
1641
|
/** The event authority PDA */
|
|
@@ -1548,9 +1644,9 @@ type TransferSubscriptionInput$1<TAccountSubscriptionPda extends string = string
|
|
|
1548
1644
|
selfProgram?: Address<TAccountSelfProgram>;
|
|
1549
1645
|
transferData: TransferSubscriptionInstructionDataArgs['transferData'];
|
|
1550
1646
|
};
|
|
1551
|
-
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?: {
|
|
1647
|
+
declare function getTransferSubscriptionInstruction<TAccountSubscriptionPda extends string, TAccountPlanPda extends string, TAccountSubscriptionAuthority extends string, TAccountDelegatorAta extends string, TAccountReceiverAta extends string, TAccountCaller extends string, TAccountTokenMint 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, TAccountTokenMint, TAccountTokenProgram, TAccountEventAuthority, TAccountSelfProgram>, config?: {
|
|
1552
1648
|
programAddress?: TProgramAddress;
|
|
1553
|
-
}): TransferSubscriptionInstruction<TProgramAddress, TAccountSubscriptionPda, TAccountPlanPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountCaller, TAccountTokenProgram, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1649
|
+
}): TransferSubscriptionInstruction<TProgramAddress, TAccountSubscriptionPda, TAccountPlanPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountCaller, TAccountTokenMint, TAccountTokenProgram, TAccountEventAuthority, TAccountSelfProgram>;
|
|
1554
1650
|
type ParsedTransferSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1555
1651
|
programAddress: Address<TProgram>;
|
|
1556
1652
|
accounts: {
|
|
@@ -1566,12 +1662,14 @@ type ParsedTransferSubscriptionInstruction<TProgram extends string = typeof SUBS
|
|
|
1566
1662
|
receiverAta: TAccountMetas[4];
|
|
1567
1663
|
/** The authorized puller (plan owner or whitelisted) */
|
|
1568
1664
|
caller: TAccountMetas[5];
|
|
1665
|
+
/** The token mint */
|
|
1666
|
+
tokenMint: TAccountMetas[6];
|
|
1569
1667
|
/** Token program */
|
|
1570
|
-
tokenProgram: TAccountMetas[
|
|
1668
|
+
tokenProgram: TAccountMetas[7];
|
|
1571
1669
|
/** The event authority PDA */
|
|
1572
|
-
eventAuthority: TAccountMetas[
|
|
1670
|
+
eventAuthority: TAccountMetas[8];
|
|
1573
1671
|
/** This program (for self-CPI) */
|
|
1574
|
-
selfProgram: TAccountMetas[
|
|
1672
|
+
selfProgram: TAccountMetas[9];
|
|
1575
1673
|
};
|
|
1576
1674
|
data: TransferSubscriptionInstructionData;
|
|
1577
1675
|
};
|
|
@@ -1742,50 +1840,6 @@ declare const METADATA_URI_LEN = 128;
|
|
|
1742
1840
|
/** On-chain delegation variant identifier (matches the `kind` tag in the `Delegation` union). */
|
|
1743
1841
|
type DelegationKindId = 'fixed' | 'recurring' | 'subscription';
|
|
1744
1842
|
|
|
1745
|
-
/**
|
|
1746
|
-
* `subscriptionsProgram()` — `@solana/kit` plugin that wraps the Codama-generated
|
|
1747
|
-
* `subscriptionsProgram()` plugin with higher-level instruction overlays
|
|
1748
|
-
* (PDA derivation, sponsor `payer` trailing accounts, ATA derivation, validators)
|
|
1749
|
-
* and a `queries` namespace for common account fetches.
|
|
1750
|
-
*
|
|
1751
|
-
* Each overlay defaults its actor field (`owner` / `delegator` / `subscriber`
|
|
1752
|
-
* / `authority` / `delegatee` / `caller`) to `client.identity`, and any
|
|
1753
|
-
* `payer` slot to `client.payer`. Sponsor flows install separate signers via
|
|
1754
|
-
* `payer()` + `identity()` instead of `signer()`.
|
|
1755
|
-
*
|
|
1756
|
-
* @example Same signer for everything
|
|
1757
|
-
* ```ts
|
|
1758
|
-
* import { createClient } from '@solana/kit';
|
|
1759
|
-
* import { signer } from '@solana/kit-plugin-signer';
|
|
1760
|
-
* import { solanaLocalRpc } from '@solana/kit-plugin-rpc';
|
|
1761
|
-
* import { subscriptionsProgram } from '@solana/subscriptions';
|
|
1762
|
-
*
|
|
1763
|
-
* const client = createClient()
|
|
1764
|
-
* .use(signer(mySigner))
|
|
1765
|
-
* .use(solanaLocalRpc())
|
|
1766
|
-
* .use(subscriptionsProgram());
|
|
1767
|
-
*
|
|
1768
|
-
* await client.subscriptions.instructions
|
|
1769
|
-
* .createPlan({ planId, mint, amount, periodHours, endTs, destinations, pullers, metadataUri })
|
|
1770
|
-
* .sendTransaction();
|
|
1771
|
-
* ```
|
|
1772
|
-
*
|
|
1773
|
-
* @example Sponsor pays fees + rent on behalf of the user
|
|
1774
|
-
* ```ts
|
|
1775
|
-
* import { payer, identity } from '@solana/kit-plugin-signer';
|
|
1776
|
-
*
|
|
1777
|
-
* const client = createClient()
|
|
1778
|
-
* .use(payer(sponsorSigner)) // pays gas + rent
|
|
1779
|
-
* .use(identity(userSigner)) // signs as delegator
|
|
1780
|
-
* .use(solanaLocalRpc())
|
|
1781
|
-
* .use(subscriptionsProgram());
|
|
1782
|
-
*
|
|
1783
|
-
* await client.subscriptions.instructions
|
|
1784
|
-
* .createFixedDelegation({ delegatee, nonce, amount, expiryTs, tokenMint })
|
|
1785
|
-
* .sendTransaction();
|
|
1786
|
-
* ```
|
|
1787
|
-
*/
|
|
1788
|
-
|
|
1789
1843
|
type WithProgramAddress = {
|
|
1790
1844
|
programAddress?: Address;
|
|
1791
1845
|
};
|
|
@@ -1810,6 +1864,7 @@ type CreateFixedDelegationInput = WithProgramAddress & {
|
|
|
1810
1864
|
amount: bigint | number;
|
|
1811
1865
|
delegatee: Address;
|
|
1812
1866
|
delegator: TransactionSigner;
|
|
1867
|
+
expectedSubscriptionAuthorityInitId?: bigint | number;
|
|
1813
1868
|
expiryTs: bigint | number;
|
|
1814
1869
|
nonce: bigint | number;
|
|
1815
1870
|
payer?: TransactionSigner;
|
|
@@ -1819,6 +1874,7 @@ type CreateRecurringDelegationInput = WithProgramAddress & {
|
|
|
1819
1874
|
amountPerPeriod: bigint | number;
|
|
1820
1875
|
delegatee: Address;
|
|
1821
1876
|
delegator: TransactionSigner;
|
|
1877
|
+
expectedSubscriptionAuthorityInitId?: bigint | number;
|
|
1822
1878
|
expiryTs: bigint | number;
|
|
1823
1879
|
nonce: bigint | number;
|
|
1824
1880
|
payer?: TransactionSigner;
|
|
@@ -1890,6 +1946,7 @@ type SubscribeInput = WithProgramAddress & {
|
|
|
1890
1946
|
expectedAmount?: bigint | number;
|
|
1891
1947
|
expectedCreatedAt?: bigint | number;
|
|
1892
1948
|
expectedPeriodHours?: bigint | number;
|
|
1949
|
+
expectedSubscriptionAuthorityInitId?: bigint | number;
|
|
1893
1950
|
merchant: Address;
|
|
1894
1951
|
payer?: TransactionSigner;
|
|
1895
1952
|
planId: bigint | number;
|
|
@@ -1901,6 +1958,11 @@ type CancelSubscriptionInput = WithProgramAddress & {
|
|
|
1901
1958
|
subscriber: TransactionSigner;
|
|
1902
1959
|
subscriptionPda?: Address;
|
|
1903
1960
|
};
|
|
1961
|
+
type ResumeSubscriptionInput = WithProgramAddress & {
|
|
1962
|
+
planPda: Address;
|
|
1963
|
+
subscriber: TransactionSigner;
|
|
1964
|
+
subscriptionPda?: Address;
|
|
1965
|
+
};
|
|
1904
1966
|
declare function getInitSubscriptionAuthorityOverlayInstructionAsync(input: InitSubscriptionAuthorityInput): Promise<Instruction>;
|
|
1905
1967
|
declare function getCloseSubscriptionAuthorityOverlayInstructionAsync(input: CloseSubscriptionAuthorityInput): Promise<Instruction>;
|
|
1906
1968
|
declare function getCreateFixedDelegationOverlayInstructionAsync(input: CreateFixedDelegationInput): Promise<Instruction>;
|
|
@@ -1920,6 +1982,7 @@ declare function getUpdatePlanOverlayInstruction(input: UpdatePlanInput): Instru
|
|
|
1920
1982
|
declare function getDeletePlanOverlayInstruction(input: DeletePlanInput): Instruction;
|
|
1921
1983
|
declare function getSubscribeOverlayInstructionAsync(input: SubscribeInput): Promise<Instruction>;
|
|
1922
1984
|
declare function getCancelSubscriptionOverlayInstructionAsync(input: CancelSubscriptionInput): Promise<Instruction>;
|
|
1985
|
+
declare function getResumeSubscriptionOverlayInstructionAsync(input: ResumeSubscriptionInput): Promise<Instruction>;
|
|
1923
1986
|
type SubscriptionsPluginRequirements = ClientWithIdentity & ClientWithPayer & ClientWithRpc<GetProgramAccountsApi> & SubscriptionsPluginRequirements$1;
|
|
1924
1987
|
type Self<T> = SelfPlanAndSendFunctions & T;
|
|
1925
1988
|
type SubscriptionsPluginInstructions = {
|
|
@@ -1930,6 +1993,7 @@ type SubscriptionsPluginInstructions = {
|
|
|
1930
1993
|
createRecurringDelegation: (input: MakeOptional<CreateRecurringDelegationInput, 'delegator' | 'payer'>) => Self<Promise<Instruction>>;
|
|
1931
1994
|
deletePlan: (input: MakeOptional<DeletePlanInput, 'owner'>) => Self<Instruction>;
|
|
1932
1995
|
initSubscriptionAuthority: (input: MakeOptional<InitSubscriptionAuthorityInput, 'owner' | 'payer'>) => Self<Promise<Instruction>>;
|
|
1996
|
+
resumeSubscription: (input: MakeOptional<ResumeSubscriptionInput, 'subscriber'>) => Self<Promise<Instruction>>;
|
|
1933
1997
|
revokeDelegation: (input: MakeOptional<RevokeDelegationInput, 'authority'>) => Self<Instruction>;
|
|
1934
1998
|
revokeSubscription: (input: MakeOptional<RevokeSubscriptionInput, 'authority'>) => Self<Instruction>;
|
|
1935
1999
|
subscribe: (input: MakeOptional<SubscribeInput, 'payer' | 'subscriber'>) => Self<Promise<Instruction>>;
|
|
@@ -1963,7 +2027,12 @@ type SubscriptionsPlugin = Omit<SubscriptionsPlugin$1, 'instructions'> & {
|
|
|
1963
2027
|
queries: SubscriptionsPluginQueries;
|
|
1964
2028
|
};
|
|
1965
2029
|
declare function subscriptionsProgram(): <T extends SubscriptionsPluginRequirements>(client: T) => Omit<T, "subscriptions"> & {
|
|
1966
|
-
subscriptions:
|
|
2030
|
+
subscriptions: {
|
|
2031
|
+
instructions: SubscriptionsPluginInstructions;
|
|
2032
|
+
queries: SubscriptionsPluginQueries;
|
|
2033
|
+
accounts: SubscriptionsPluginAccounts;
|
|
2034
|
+
pdas: SubscriptionsPluginPdas;
|
|
2035
|
+
};
|
|
1967
2036
|
};
|
|
1968
2037
|
|
|
1969
2038
|
/** Client-side validation failure (e.g. max destinations exceeded). */
|
|
@@ -1971,4 +2040,4 @@ declare class ValidationError extends Error {
|
|
|
1971
2040
|
constructor(message: string);
|
|
1972
2041
|
}
|
|
1973
2042
|
|
|
1974
|
-
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 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, REVOKE_DELEGATION_DISCRIMINATOR, type RawProgramAccount, type RecurringDelegation, type RecurringDelegationArgs, type RecurringDelegationSeeds, 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, 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, parseRevokeDelegationInstruction, parseSubscribeInstruction, parseSubscriptionsInstruction, parseTransferFixedInstruction, parseTransferRecurringInstruction, parseTransferSubscriptionInstruction, parseUpdatePlanInstruction, subscriptionsProgram, toEncodedAccount };
|
|
2043
|
+
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 };
|