@solana/subscriptions 0.2.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/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>;
@@ -1428,11 +1434,12 @@ declare function parseSubscribeInstruction<TProgram extends string, TAccountMeta
1428
1434
 
1429
1435
  declare const TRANSFER_FIXED_DISCRIMINATOR = 4;
1430
1436
  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<[
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<[
1432
1438
  TAccountDelegationPda extends string ? WritableAccount<TAccountDelegationPda> : TAccountDelegationPda,
1433
1439
  TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
1434
1440
  TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
1435
1441
  TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
1442
+ TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
1436
1443
  TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
1437
1444
  TAccountDelegatee extends string ? ReadonlySignerAccount<TAccountDelegatee> & AccountSignerMeta<TAccountDelegatee> : TAccountDelegatee,
1438
1445
  TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
@@ -1449,7 +1456,7 @@ type TransferFixedInstructionDataArgs = {
1449
1456
  declare function getTransferFixedInstructionDataEncoder(): FixedSizeEncoder<TransferFixedInstructionDataArgs>;
1450
1457
  declare function getTransferFixedInstructionDataDecoder(): FixedSizeDecoder<TransferFixedInstructionData>;
1451
1458
  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> = {
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> = {
1453
1460
  /** The fixed delegation PDA to transfer from */
1454
1461
  delegationPda: Address<TAccountDelegationPda>;
1455
1462
  /** The subscription-authority PDA */
@@ -1458,6 +1465,8 @@ type TransferFixedInput<TAccountDelegationPda extends string = string, TAccountS
1458
1465
  delegatorAta: Address<TAccountDelegatorAta>;
1459
1466
  /** The receiver's ATA to transfer to */
1460
1467
  receiverAta: Address<TAccountReceiverAta>;
1468
+ /** The token mint */
1469
+ tokenMint: Address<TAccountTokenMint>;
1461
1470
  /** Token program */
1462
1471
  tokenProgram: Address<TAccountTokenProgram>;
1463
1472
  /** The delegatee signing the transfer */
@@ -1468,9 +1477,9 @@ type TransferFixedInput<TAccountDelegationPda extends string = string, TAccountS
1468
1477
  selfProgram?: Address<TAccountSelfProgram>;
1469
1478
  transferData: TransferFixedInstructionDataArgs['transferData'];
1470
1479
  };
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?: {
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?: {
1472
1481
  programAddress?: TProgramAddress;
1473
- }): TransferFixedInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
1482
+ }): TransferFixedInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenMint, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
1474
1483
  type ParsedTransferFixedInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
1475
1484
  programAddress: Address<TProgram>;
1476
1485
  accounts: {
@@ -1482,14 +1491,16 @@ type ParsedTransferFixedInstruction<TProgram extends string = typeof SUBSCRIPTIO
1482
1491
  delegatorAta: TAccountMetas[2];
1483
1492
  /** The receiver's ATA to transfer to */
1484
1493
  receiverAta: TAccountMetas[3];
1494
+ /** The token mint */
1495
+ tokenMint: TAccountMetas[4];
1485
1496
  /** Token program */
1486
- tokenProgram: TAccountMetas[4];
1497
+ tokenProgram: TAccountMetas[5];
1487
1498
  /** The delegatee signing the transfer */
1488
- delegatee: TAccountMetas[5];
1499
+ delegatee: TAccountMetas[6];
1489
1500
  /** The event authority PDA */
1490
- eventAuthority: TAccountMetas[6];
1501
+ eventAuthority: TAccountMetas[7];
1491
1502
  /** This program (for self-CPI) */
1492
- selfProgram: TAccountMetas[7];
1503
+ selfProgram: TAccountMetas[8];
1493
1504
  };
1494
1505
  data: TransferFixedInstructionData;
1495
1506
  };
@@ -1505,11 +1516,12 @@ declare function parseTransferFixedInstruction<TProgram extends string, TAccount
1505
1516
 
1506
1517
  declare const TRANSFER_RECURRING_DISCRIMINATOR = 5;
1507
1518
  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<[
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<[
1509
1520
  TAccountDelegationPda extends string ? WritableAccount<TAccountDelegationPda> : TAccountDelegationPda,
1510
1521
  TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
1511
1522
  TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
1512
1523
  TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
1524
+ TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
1513
1525
  TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
1514
1526
  TAccountDelegatee extends string ? ReadonlySignerAccount<TAccountDelegatee> & AccountSignerMeta<TAccountDelegatee> : TAccountDelegatee,
1515
1527
  TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
@@ -1526,7 +1538,7 @@ type TransferRecurringInstructionDataArgs = {
1526
1538
  declare function getTransferRecurringInstructionDataEncoder(): FixedSizeEncoder<TransferRecurringInstructionDataArgs>;
1527
1539
  declare function getTransferRecurringInstructionDataDecoder(): FixedSizeDecoder<TransferRecurringInstructionData>;
1528
1540
  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> = {
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> = {
1530
1542
  /** The recurring delegation PDA to transfer from */
1531
1543
  delegationPda: Address<TAccountDelegationPda>;
1532
1544
  /** The subscription-authority PDA */
@@ -1535,6 +1547,8 @@ type TransferRecurringInput<TAccountDelegationPda extends string = string, TAcco
1535
1547
  delegatorAta: Address<TAccountDelegatorAta>;
1536
1548
  /** The receiver's ATA to transfer to */
1537
1549
  receiverAta: Address<TAccountReceiverAta>;
1550
+ /** The token mint */
1551
+ tokenMint: Address<TAccountTokenMint>;
1538
1552
  /** Token program */
1539
1553
  tokenProgram: Address<TAccountTokenProgram>;
1540
1554
  /** The delegatee signing the transfer */
@@ -1545,9 +1559,9 @@ type TransferRecurringInput<TAccountDelegationPda extends string = string, TAcco
1545
1559
  selfProgram?: Address<TAccountSelfProgram>;
1546
1560
  transferData: TransferRecurringInstructionDataArgs['transferData'];
1547
1561
  };
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?: {
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?: {
1549
1563
  programAddress?: TProgramAddress;
1550
- }): TransferRecurringInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
1564
+ }): TransferRecurringInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenMint, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
1551
1565
  type ParsedTransferRecurringInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
1552
1566
  programAddress: Address<TProgram>;
1553
1567
  accounts: {
@@ -1559,14 +1573,16 @@ type ParsedTransferRecurringInstruction<TProgram extends string = typeof SUBSCRI
1559
1573
  delegatorAta: TAccountMetas[2];
1560
1574
  /** The receiver's ATA to transfer to */
1561
1575
  receiverAta: TAccountMetas[3];
1576
+ /** The token mint */
1577
+ tokenMint: TAccountMetas[4];
1562
1578
  /** Token program */
1563
- tokenProgram: TAccountMetas[4];
1579
+ tokenProgram: TAccountMetas[5];
1564
1580
  /** The delegatee signing the transfer */
1565
- delegatee: TAccountMetas[5];
1581
+ delegatee: TAccountMetas[6];
1566
1582
  /** The event authority PDA */
1567
- eventAuthority: TAccountMetas[6];
1583
+ eventAuthority: TAccountMetas[7];
1568
1584
  /** This program (for self-CPI) */
1569
- selfProgram: TAccountMetas[7];
1585
+ selfProgram: TAccountMetas[8];
1570
1586
  };
1571
1587
  data: TransferRecurringInstructionData;
1572
1588
  };
@@ -1582,13 +1598,14 @@ declare function parseTransferRecurringInstruction<TProgram extends string, TAcc
1582
1598
 
1583
1599
  declare const TRANSFER_SUBSCRIPTION_DISCRIMINATOR = 10;
1584
1600
  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<[
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<[
1586
1602
  TAccountSubscriptionPda extends string ? WritableAccount<TAccountSubscriptionPda> : TAccountSubscriptionPda,
1587
1603
  TAccountPlanPda extends string ? ReadonlyAccount<TAccountPlanPda> : TAccountPlanPda,
1588
1604
  TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
1589
1605
  TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
1590
1606
  TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
1591
1607
  TAccountCaller extends string ? ReadonlySignerAccount<TAccountCaller> & AccountSignerMeta<TAccountCaller> : TAccountCaller,
1608
+ TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
1592
1609
  TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
1593
1610
  TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
1594
1611
  TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
@@ -1604,7 +1621,7 @@ type TransferSubscriptionInstructionDataArgs = {
1604
1621
  declare function getTransferSubscriptionInstructionDataEncoder(): FixedSizeEncoder<TransferSubscriptionInstructionDataArgs>;
1605
1622
  declare function getTransferSubscriptionInstructionDataDecoder(): FixedSizeDecoder<TransferSubscriptionInstructionData>;
1606
1623
  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> = {
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> = {
1608
1625
  /** The subscription delegation PDA */
1609
1626
  subscriptionPda: Address<TAccountSubscriptionPda>;
1610
1627
  /** The plan PDA */
@@ -1617,6 +1634,8 @@ type TransferSubscriptionInput$1<TAccountSubscriptionPda extends string = string
1617
1634
  receiverAta: Address<TAccountReceiverAta>;
1618
1635
  /** The authorized puller (plan owner or whitelisted) */
1619
1636
  caller: TransactionSigner<TAccountCaller>;
1637
+ /** The token mint */
1638
+ tokenMint: Address<TAccountTokenMint>;
1620
1639
  /** Token program */
1621
1640
  tokenProgram: Address<TAccountTokenProgram>;
1622
1641
  /** The event authority PDA */
@@ -1625,9 +1644,9 @@ type TransferSubscriptionInput$1<TAccountSubscriptionPda extends string = string
1625
1644
  selfProgram?: Address<TAccountSelfProgram>;
1626
1645
  transferData: TransferSubscriptionInstructionDataArgs['transferData'];
1627
1646
  };
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?: {
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?: {
1629
1648
  programAddress?: TProgramAddress;
1630
- }): TransferSubscriptionInstruction<TProgramAddress, TAccountSubscriptionPda, TAccountPlanPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountCaller, TAccountTokenProgram, TAccountEventAuthority, TAccountSelfProgram>;
1649
+ }): TransferSubscriptionInstruction<TProgramAddress, TAccountSubscriptionPda, TAccountPlanPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountCaller, TAccountTokenMint, TAccountTokenProgram, TAccountEventAuthority, TAccountSelfProgram>;
1631
1650
  type ParsedTransferSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
1632
1651
  programAddress: Address<TProgram>;
1633
1652
  accounts: {
@@ -1643,12 +1662,14 @@ type ParsedTransferSubscriptionInstruction<TProgram extends string = typeof SUBS
1643
1662
  receiverAta: TAccountMetas[4];
1644
1663
  /** The authorized puller (plan owner or whitelisted) */
1645
1664
  caller: TAccountMetas[5];
1665
+ /** The token mint */
1666
+ tokenMint: TAccountMetas[6];
1646
1667
  /** Token program */
1647
- tokenProgram: TAccountMetas[6];
1668
+ tokenProgram: TAccountMetas[7];
1648
1669
  /** The event authority PDA */
1649
- eventAuthority: TAccountMetas[7];
1670
+ eventAuthority: TAccountMetas[8];
1650
1671
  /** This program (for self-CPI) */
1651
- selfProgram: TAccountMetas[8];
1672
+ selfProgram: TAccountMetas[9];
1652
1673
  };
1653
1674
  data: TransferSubscriptionInstructionData;
1654
1675
  };
@@ -1843,6 +1864,7 @@ type CreateFixedDelegationInput = WithProgramAddress & {
1843
1864
  amount: bigint | number;
1844
1865
  delegatee: Address;
1845
1866
  delegator: TransactionSigner;
1867
+ expectedSubscriptionAuthorityInitId?: bigint | number;
1846
1868
  expiryTs: bigint | number;
1847
1869
  nonce: bigint | number;
1848
1870
  payer?: TransactionSigner;
@@ -1852,6 +1874,7 @@ type CreateRecurringDelegationInput = WithProgramAddress & {
1852
1874
  amountPerPeriod: bigint | number;
1853
1875
  delegatee: Address;
1854
1876
  delegator: TransactionSigner;
1877
+ expectedSubscriptionAuthorityInitId?: bigint | number;
1855
1878
  expiryTs: bigint | number;
1856
1879
  nonce: bigint | number;
1857
1880
  payer?: TransactionSigner;
@@ -1923,6 +1946,7 @@ type SubscribeInput = WithProgramAddress & {
1923
1946
  expectedAmount?: bigint | number;
1924
1947
  expectedCreatedAt?: bigint | number;
1925
1948
  expectedPeriodHours?: bigint | number;
1949
+ expectedSubscriptionAuthorityInitId?: bigint | number;
1926
1950
  merchant: Address;
1927
1951
  payer?: TransactionSigner;
1928
1952
  planId: bigint | number;
package/dist/index.d.ts 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>;
@@ -1428,11 +1434,12 @@ declare function parseSubscribeInstruction<TProgram extends string, TAccountMeta
1428
1434
 
1429
1435
  declare const TRANSFER_FIXED_DISCRIMINATOR = 4;
1430
1436
  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<[
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<[
1432
1438
  TAccountDelegationPda extends string ? WritableAccount<TAccountDelegationPda> : TAccountDelegationPda,
1433
1439
  TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
1434
1440
  TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
1435
1441
  TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
1442
+ TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
1436
1443
  TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
1437
1444
  TAccountDelegatee extends string ? ReadonlySignerAccount<TAccountDelegatee> & AccountSignerMeta<TAccountDelegatee> : TAccountDelegatee,
1438
1445
  TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
@@ -1449,7 +1456,7 @@ type TransferFixedInstructionDataArgs = {
1449
1456
  declare function getTransferFixedInstructionDataEncoder(): FixedSizeEncoder<TransferFixedInstructionDataArgs>;
1450
1457
  declare function getTransferFixedInstructionDataDecoder(): FixedSizeDecoder<TransferFixedInstructionData>;
1451
1458
  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> = {
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> = {
1453
1460
  /** The fixed delegation PDA to transfer from */
1454
1461
  delegationPda: Address<TAccountDelegationPda>;
1455
1462
  /** The subscription-authority PDA */
@@ -1458,6 +1465,8 @@ type TransferFixedInput<TAccountDelegationPda extends string = string, TAccountS
1458
1465
  delegatorAta: Address<TAccountDelegatorAta>;
1459
1466
  /** The receiver's ATA to transfer to */
1460
1467
  receiverAta: Address<TAccountReceiverAta>;
1468
+ /** The token mint */
1469
+ tokenMint: Address<TAccountTokenMint>;
1461
1470
  /** Token program */
1462
1471
  tokenProgram: Address<TAccountTokenProgram>;
1463
1472
  /** The delegatee signing the transfer */
@@ -1468,9 +1477,9 @@ type TransferFixedInput<TAccountDelegationPda extends string = string, TAccountS
1468
1477
  selfProgram?: Address<TAccountSelfProgram>;
1469
1478
  transferData: TransferFixedInstructionDataArgs['transferData'];
1470
1479
  };
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?: {
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?: {
1472
1481
  programAddress?: TProgramAddress;
1473
- }): TransferFixedInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
1482
+ }): TransferFixedInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenMint, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
1474
1483
  type ParsedTransferFixedInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
1475
1484
  programAddress: Address<TProgram>;
1476
1485
  accounts: {
@@ -1482,14 +1491,16 @@ type ParsedTransferFixedInstruction<TProgram extends string = typeof SUBSCRIPTIO
1482
1491
  delegatorAta: TAccountMetas[2];
1483
1492
  /** The receiver's ATA to transfer to */
1484
1493
  receiverAta: TAccountMetas[3];
1494
+ /** The token mint */
1495
+ tokenMint: TAccountMetas[4];
1485
1496
  /** Token program */
1486
- tokenProgram: TAccountMetas[4];
1497
+ tokenProgram: TAccountMetas[5];
1487
1498
  /** The delegatee signing the transfer */
1488
- delegatee: TAccountMetas[5];
1499
+ delegatee: TAccountMetas[6];
1489
1500
  /** The event authority PDA */
1490
- eventAuthority: TAccountMetas[6];
1501
+ eventAuthority: TAccountMetas[7];
1491
1502
  /** This program (for self-CPI) */
1492
- selfProgram: TAccountMetas[7];
1503
+ selfProgram: TAccountMetas[8];
1493
1504
  };
1494
1505
  data: TransferFixedInstructionData;
1495
1506
  };
@@ -1505,11 +1516,12 @@ declare function parseTransferFixedInstruction<TProgram extends string, TAccount
1505
1516
 
1506
1517
  declare const TRANSFER_RECURRING_DISCRIMINATOR = 5;
1507
1518
  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<[
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<[
1509
1520
  TAccountDelegationPda extends string ? WritableAccount<TAccountDelegationPda> : TAccountDelegationPda,
1510
1521
  TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
1511
1522
  TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
1512
1523
  TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
1524
+ TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
1513
1525
  TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
1514
1526
  TAccountDelegatee extends string ? ReadonlySignerAccount<TAccountDelegatee> & AccountSignerMeta<TAccountDelegatee> : TAccountDelegatee,
1515
1527
  TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
@@ -1526,7 +1538,7 @@ type TransferRecurringInstructionDataArgs = {
1526
1538
  declare function getTransferRecurringInstructionDataEncoder(): FixedSizeEncoder<TransferRecurringInstructionDataArgs>;
1527
1539
  declare function getTransferRecurringInstructionDataDecoder(): FixedSizeDecoder<TransferRecurringInstructionData>;
1528
1540
  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> = {
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> = {
1530
1542
  /** The recurring delegation PDA to transfer from */
1531
1543
  delegationPda: Address<TAccountDelegationPda>;
1532
1544
  /** The subscription-authority PDA */
@@ -1535,6 +1547,8 @@ type TransferRecurringInput<TAccountDelegationPda extends string = string, TAcco
1535
1547
  delegatorAta: Address<TAccountDelegatorAta>;
1536
1548
  /** The receiver's ATA to transfer to */
1537
1549
  receiverAta: Address<TAccountReceiverAta>;
1550
+ /** The token mint */
1551
+ tokenMint: Address<TAccountTokenMint>;
1538
1552
  /** Token program */
1539
1553
  tokenProgram: Address<TAccountTokenProgram>;
1540
1554
  /** The delegatee signing the transfer */
@@ -1545,9 +1559,9 @@ type TransferRecurringInput<TAccountDelegationPda extends string = string, TAcco
1545
1559
  selfProgram?: Address<TAccountSelfProgram>;
1546
1560
  transferData: TransferRecurringInstructionDataArgs['transferData'];
1547
1561
  };
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?: {
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?: {
1549
1563
  programAddress?: TProgramAddress;
1550
- }): TransferRecurringInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
1564
+ }): TransferRecurringInstruction<TProgramAddress, TAccountDelegationPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountTokenMint, TAccountTokenProgram, TAccountDelegatee, TAccountEventAuthority, TAccountSelfProgram>;
1551
1565
  type ParsedTransferRecurringInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
1552
1566
  programAddress: Address<TProgram>;
1553
1567
  accounts: {
@@ -1559,14 +1573,16 @@ type ParsedTransferRecurringInstruction<TProgram extends string = typeof SUBSCRI
1559
1573
  delegatorAta: TAccountMetas[2];
1560
1574
  /** The receiver's ATA to transfer to */
1561
1575
  receiverAta: TAccountMetas[3];
1576
+ /** The token mint */
1577
+ tokenMint: TAccountMetas[4];
1562
1578
  /** Token program */
1563
- tokenProgram: TAccountMetas[4];
1579
+ tokenProgram: TAccountMetas[5];
1564
1580
  /** The delegatee signing the transfer */
1565
- delegatee: TAccountMetas[5];
1581
+ delegatee: TAccountMetas[6];
1566
1582
  /** The event authority PDA */
1567
- eventAuthority: TAccountMetas[6];
1583
+ eventAuthority: TAccountMetas[7];
1568
1584
  /** This program (for self-CPI) */
1569
- selfProgram: TAccountMetas[7];
1585
+ selfProgram: TAccountMetas[8];
1570
1586
  };
1571
1587
  data: TransferRecurringInstructionData;
1572
1588
  };
@@ -1582,13 +1598,14 @@ declare function parseTransferRecurringInstruction<TProgram extends string, TAcc
1582
1598
 
1583
1599
  declare const TRANSFER_SUBSCRIPTION_DISCRIMINATOR = 10;
1584
1600
  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<[
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<[
1586
1602
  TAccountSubscriptionPda extends string ? WritableAccount<TAccountSubscriptionPda> : TAccountSubscriptionPda,
1587
1603
  TAccountPlanPda extends string ? ReadonlyAccount<TAccountPlanPda> : TAccountPlanPda,
1588
1604
  TAccountSubscriptionAuthority extends string ? ReadonlyAccount<TAccountSubscriptionAuthority> : TAccountSubscriptionAuthority,
1589
1605
  TAccountDelegatorAta extends string ? WritableAccount<TAccountDelegatorAta> : TAccountDelegatorAta,
1590
1606
  TAccountReceiverAta extends string ? WritableAccount<TAccountReceiverAta> : TAccountReceiverAta,
1591
1607
  TAccountCaller extends string ? ReadonlySignerAccount<TAccountCaller> & AccountSignerMeta<TAccountCaller> : TAccountCaller,
1608
+ TAccountTokenMint extends string ? ReadonlyAccount<TAccountTokenMint> : TAccountTokenMint,
1592
1609
  TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
1593
1610
  TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
1594
1611
  TAccountSelfProgram extends string ? ReadonlyAccount<TAccountSelfProgram> : TAccountSelfProgram,
@@ -1604,7 +1621,7 @@ type TransferSubscriptionInstructionDataArgs = {
1604
1621
  declare function getTransferSubscriptionInstructionDataEncoder(): FixedSizeEncoder<TransferSubscriptionInstructionDataArgs>;
1605
1622
  declare function getTransferSubscriptionInstructionDataDecoder(): FixedSizeDecoder<TransferSubscriptionInstructionData>;
1606
1623
  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> = {
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> = {
1608
1625
  /** The subscription delegation PDA */
1609
1626
  subscriptionPda: Address<TAccountSubscriptionPda>;
1610
1627
  /** The plan PDA */
@@ -1617,6 +1634,8 @@ type TransferSubscriptionInput$1<TAccountSubscriptionPda extends string = string
1617
1634
  receiverAta: Address<TAccountReceiverAta>;
1618
1635
  /** The authorized puller (plan owner or whitelisted) */
1619
1636
  caller: TransactionSigner<TAccountCaller>;
1637
+ /** The token mint */
1638
+ tokenMint: Address<TAccountTokenMint>;
1620
1639
  /** Token program */
1621
1640
  tokenProgram: Address<TAccountTokenProgram>;
1622
1641
  /** The event authority PDA */
@@ -1625,9 +1644,9 @@ type TransferSubscriptionInput$1<TAccountSubscriptionPda extends string = string
1625
1644
  selfProgram?: Address<TAccountSelfProgram>;
1626
1645
  transferData: TransferSubscriptionInstructionDataArgs['transferData'];
1627
1646
  };
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?: {
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?: {
1629
1648
  programAddress?: TProgramAddress;
1630
- }): TransferSubscriptionInstruction<TProgramAddress, TAccountSubscriptionPda, TAccountPlanPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountCaller, TAccountTokenProgram, TAccountEventAuthority, TAccountSelfProgram>;
1649
+ }): TransferSubscriptionInstruction<TProgramAddress, TAccountSubscriptionPda, TAccountPlanPda, TAccountSubscriptionAuthority, TAccountDelegatorAta, TAccountReceiverAta, TAccountCaller, TAccountTokenMint, TAccountTokenProgram, TAccountEventAuthority, TAccountSelfProgram>;
1631
1650
  type ParsedTransferSubscriptionInstruction<TProgram extends string = typeof SUBSCRIPTIONS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
1632
1651
  programAddress: Address<TProgram>;
1633
1652
  accounts: {
@@ -1643,12 +1662,14 @@ type ParsedTransferSubscriptionInstruction<TProgram extends string = typeof SUBS
1643
1662
  receiverAta: TAccountMetas[4];
1644
1663
  /** The authorized puller (plan owner or whitelisted) */
1645
1664
  caller: TAccountMetas[5];
1665
+ /** The token mint */
1666
+ tokenMint: TAccountMetas[6];
1646
1667
  /** Token program */
1647
- tokenProgram: TAccountMetas[6];
1668
+ tokenProgram: TAccountMetas[7];
1648
1669
  /** The event authority PDA */
1649
- eventAuthority: TAccountMetas[7];
1670
+ eventAuthority: TAccountMetas[8];
1650
1671
  /** This program (for self-CPI) */
1651
- selfProgram: TAccountMetas[8];
1672
+ selfProgram: TAccountMetas[9];
1652
1673
  };
1653
1674
  data: TransferSubscriptionInstructionData;
1654
1675
  };
@@ -1843,6 +1864,7 @@ type CreateFixedDelegationInput = WithProgramAddress & {
1843
1864
  amount: bigint | number;
1844
1865
  delegatee: Address;
1845
1866
  delegator: TransactionSigner;
1867
+ expectedSubscriptionAuthorityInitId?: bigint | number;
1846
1868
  expiryTs: bigint | number;
1847
1869
  nonce: bigint | number;
1848
1870
  payer?: TransactionSigner;
@@ -1852,6 +1874,7 @@ type CreateRecurringDelegationInput = WithProgramAddress & {
1852
1874
  amountPerPeriod: bigint | number;
1853
1875
  delegatee: Address;
1854
1876
  delegator: TransactionSigner;
1877
+ expectedSubscriptionAuthorityInitId?: bigint | number;
1855
1878
  expiryTs: bigint | number;
1856
1879
  nonce: bigint | number;
1857
1880
  payer?: TransactionSigner;
@@ -1923,6 +1946,7 @@ type SubscribeInput = WithProgramAddress & {
1923
1946
  expectedAmount?: bigint | number;
1924
1947
  expectedCreatedAt?: bigint | number;
1925
1948
  expectedPeriodHours?: bigint | number;
1949
+ expectedSubscriptionAuthorityInitId?: bigint | number;
1926
1950
  merchant: Address;
1927
1951
  payer?: TransactionSigner;
1928
1952
  planId: bigint | number;