@solana/subscriptions 0.5.0-beta.1 → 0.6.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -34,6 +34,8 @@ __export(index_exports, {
34
34
  DELETE_PLAN_DISCRIMINATOR: () => DELETE_PLAN_DISCRIMINATOR,
35
35
  DISCRIMINATOR_OFFSET: () => DISCRIMINATOR_OFFSET,
36
36
  EVENT_AUTHORITY_SEED: () => EVENT_AUTHORITY_SEED,
37
+ FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR: () => FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR,
38
+ FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR2: () => FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR2,
37
39
  INIT_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR: () => INIT_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR,
38
40
  MAX_PLAN_DESTINATIONS: () => MAX_PLAN_DESTINATIONS,
39
41
  MAX_PLAN_PULLERS: () => MAX_PLAN_PULLERS,
@@ -41,8 +43,13 @@ __export(index_exports, {
41
43
  PLAN_OWNER_OFFSET: () => PLAN_OWNER_OFFSET,
42
44
  PLAN_SEED: () => PLAN_SEED,
43
45
  PLAN_SIZE: () => PLAN_SIZE,
46
+ PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR: () => PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR,
47
+ PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR2: () => PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR2,
44
48
  PROGRAM_ID: () => PROGRAM_ID,
45
49
  PlanStatus: () => PlanStatus,
50
+ RECLAIM_EXCESS_RENT_DISCRIMINATOR: () => RECLAIM_EXCESS_RENT_DISCRIMINATOR,
51
+ RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR: () => RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR,
52
+ RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR2: () => RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR2,
46
53
  RESUME_SUBSCRIPTION_DISCRIMINATOR: () => RESUME_SUBSCRIPTION_DISCRIMINATOR,
47
54
  REVOKE_ABANDONED_DELEGATION_DISCRIMINATOR: () => REVOKE_ABANDONED_DELEGATION_DISCRIMINATOR,
48
55
  REVOKE_ABANDONED_SUBSCRIPTION_DISCRIMINATOR: () => REVOKE_ABANDONED_SUBSCRIPTION_DISCRIMINATOR,
@@ -103,6 +110,7 @@ __export(index_exports, {
103
110
  SUBSCRIPTIONS_ERROR__NOT_PLAN_OWNER: () => SUBSCRIPTIONS_ERROR__NOT_PLAN_OWNER,
104
111
  SUBSCRIPTIONS_ERROR__NOT_SIGNER: () => SUBSCRIPTIONS_ERROR__NOT_SIGNER,
105
112
  SUBSCRIPTIONS_ERROR__NOT_SYSTEM_PROGRAM: () => SUBSCRIPTIONS_ERROR__NOT_SYSTEM_PROGRAM,
113
+ SUBSCRIPTIONS_ERROR__NO_EXCESS_LAMPORTS: () => SUBSCRIPTIONS_ERROR__NO_EXCESS_LAMPORTS,
106
114
  SUBSCRIPTIONS_ERROR__PERIOD_NOT_ELAPSED: () => SUBSCRIPTIONS_ERROR__PERIOD_NOT_ELAPSED,
107
115
  SUBSCRIPTIONS_ERROR__PLAN_ALREADY_EXISTS: () => SUBSCRIPTIONS_ERROR__PLAN_ALREADY_EXISTS,
108
116
  SUBSCRIPTIONS_ERROR__PLAN_CLOSED: () => SUBSCRIPTIONS_ERROR__PLAN_CLOSED,
@@ -129,9 +137,18 @@ __export(index_exports, {
129
137
  SUBSCRIPTIONS_ERROR__UNAUTHORIZED_DESTINATION: () => SUBSCRIPTIONS_ERROR__UNAUTHORIZED_DESTINATION,
130
138
  SUBSCRIPTIONS_PROGRAM_ADDRESS: () => SUBSCRIPTIONS_PROGRAM_ADDRESS,
131
139
  SUBSCRIPTION_AUTHORITY_SEED: () => SUBSCRIPTION_AUTHORITY_SEED,
140
+ SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR: () => SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR,
141
+ SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR2: () => SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR2,
142
+ SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR: () => SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR,
143
+ SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR2: () => SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR2,
144
+ SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR: () => SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR,
145
+ SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR2: () => SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR2,
132
146
  SUBSCRIPTION_SEED: () => SUBSCRIPTION_SEED,
133
147
  SUBSCRIPTION_SIZE: () => SUBSCRIPTION_SIZE,
148
+ SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR: () => SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR,
149
+ SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR2: () => SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR2,
134
150
  SubscriptionsAccount: () => SubscriptionsAccount,
151
+ SubscriptionsEvent: () => SubscriptionsEvent,
135
152
  SubscriptionsInstruction: () => SubscriptionsInstruction,
136
153
  TRANSFER_FIXED_DISCRIMINATOR: () => TRANSFER_FIXED_DISCRIMINATOR,
137
154
  TRANSFER_RECURRING_DISCRIMINATOR: () => TRANSFER_RECURRING_DISCRIMINATOR,
@@ -141,6 +158,7 @@ __export(index_exports, {
141
158
  UPDATE_PLAN_DISCRIMINATOR: () => UPDATE_PLAN_DISCRIMINATOR,
142
159
  ValidationError: () => ValidationError,
143
160
  ZERO_ADDRESS: () => ZERO_ADDRESS,
161
+ buildPendingTransferContext: () => buildPendingTransferContext,
144
162
  decodeDelegationAccount: () => decodeDelegationAccount,
145
163
  decodeEventAuthority: () => decodeEventAuthority,
146
164
  decodeFixedDelegation: () => decodeFixedDelegation,
@@ -148,6 +166,7 @@ __export(index_exports, {
148
166
  decodeRecurringDelegation: () => decodeRecurringDelegation,
149
167
  decodeSubscriptionAuthority: () => decodeSubscriptionAuthority,
150
168
  decodeSubscriptionDelegation: () => decodeSubscriptionDelegation,
169
+ decodeTransferContext: () => decodeTransferContext,
151
170
  fetchAllEventAuthority: () => fetchAllEventAuthority,
152
171
  fetchAllFixedDelegation: () => fetchAllFixedDelegation,
153
172
  fetchAllMaybeEventAuthority: () => fetchAllMaybeEventAuthority,
@@ -156,10 +175,12 @@ __export(index_exports, {
156
175
  fetchAllMaybeRecurringDelegation: () => fetchAllMaybeRecurringDelegation,
157
176
  fetchAllMaybeSubscriptionAuthority: () => fetchAllMaybeSubscriptionAuthority,
158
177
  fetchAllMaybeSubscriptionDelegation: () => fetchAllMaybeSubscriptionDelegation,
178
+ fetchAllMaybeTransferContext: () => fetchAllMaybeTransferContext,
159
179
  fetchAllPlan: () => fetchAllPlan,
160
180
  fetchAllRecurringDelegation: () => fetchAllRecurringDelegation,
161
181
  fetchAllSubscriptionAuthority: () => fetchAllSubscriptionAuthority,
162
182
  fetchAllSubscriptionDelegation: () => fetchAllSubscriptionDelegation,
183
+ fetchAllTransferContext: () => fetchAllTransferContext,
163
184
  fetchDelegationsByDelegatee: () => fetchDelegationsByDelegatee,
164
185
  fetchDelegationsByDelegator: () => fetchDelegationsByDelegator,
165
186
  fetchEventAuthority: () => fetchEventAuthority,
@@ -178,6 +199,8 @@ __export(index_exports, {
178
199
  fetchMaybeSubscriptionAuthorityFromSeeds: () => fetchMaybeSubscriptionAuthorityFromSeeds,
179
200
  fetchMaybeSubscriptionDelegation: () => fetchMaybeSubscriptionDelegation,
180
201
  fetchMaybeSubscriptionDelegationFromSeeds: () => fetchMaybeSubscriptionDelegationFromSeeds,
202
+ fetchMaybeTransferContext: () => fetchMaybeTransferContext,
203
+ fetchMaybeTransferContextFromSeeds: () => fetchMaybeTransferContextFromSeeds,
181
204
  fetchPlan: () => fetchPlan,
182
205
  fetchPlanFromSeeds: () => fetchPlanFromSeeds,
183
206
  fetchPlansForOwner: () => fetchPlansForOwner,
@@ -188,12 +211,15 @@ __export(index_exports, {
188
211
  fetchSubscriptionDelegation: () => fetchSubscriptionDelegation,
189
212
  fetchSubscriptionDelegationFromSeeds: () => fetchSubscriptionDelegationFromSeeds,
190
213
  fetchSubscriptionsForUser: () => fetchSubscriptionsForUser,
214
+ fetchTransferContext: () => fetchTransferContext,
215
+ fetchTransferContextFromSeeds: () => fetchTransferContextFromSeeds,
191
216
  findEventAuthorityPda: () => findEventAuthorityPda,
192
217
  findFixedDelegationPda: () => findFixedDelegationPda,
193
218
  findPlanPda: () => findPlanPda,
194
219
  findRecurringDelegationPda: () => findRecurringDelegationPda,
195
220
  findSubscriptionAuthorityPda: () => findSubscriptionAuthorityPda,
196
221
  findSubscriptionDelegationPda: () => findSubscriptionDelegationPda,
222
+ findTransferContextPda: () => findTransferContextPda,
197
223
  getAccountDiscriminatorCodec: () => getAccountDiscriminatorCodec,
198
224
  getAccountDiscriminatorDecoder: () => getAccountDiscriminatorDecoder,
199
225
  getAccountDiscriminatorEncoder: () => getAccountDiscriminatorEncoder,
@@ -256,6 +282,11 @@ __export(index_exports, {
256
282
  getFixedDelegationCodec: () => getFixedDelegationCodec,
257
283
  getFixedDelegationDecoder: () => getFixedDelegationDecoder,
258
284
  getFixedDelegationEncoder: () => getFixedDelegationEncoder,
285
+ getFixedTransferEventEventCodec: () => getFixedTransferEventEventCodec,
286
+ getFixedTransferEventEventDecoder: () => getFixedTransferEventEventDecoder,
287
+ getFixedTransferEventEventDiscriminator2Bytes: () => getFixedTransferEventEventDiscriminator2Bytes,
288
+ getFixedTransferEventEventDiscriminatorBytes: () => getFixedTransferEventEventDiscriminatorBytes,
289
+ getFixedTransferEventEventEncoder: () => getFixedTransferEventEventEncoder,
259
290
  getHeaderCodec: () => getHeaderCodec,
260
291
  getHeaderDecoder: () => getHeaderDecoder,
261
292
  getHeaderEncoder: () => getHeaderEncoder,
@@ -278,9 +309,24 @@ __export(index_exports, {
278
309
  getPlanTermsCodec: () => getPlanTermsCodec,
279
310
  getPlanTermsDecoder: () => getPlanTermsDecoder,
280
311
  getPlanTermsEncoder: () => getPlanTermsEncoder,
312
+ getPlanUpdatedEventEventCodec: () => getPlanUpdatedEventEventCodec,
313
+ getPlanUpdatedEventEventDecoder: () => getPlanUpdatedEventEventDecoder,
314
+ getPlanUpdatedEventEventDiscriminator2Bytes: () => getPlanUpdatedEventEventDiscriminator2Bytes,
315
+ getPlanUpdatedEventEventDiscriminatorBytes: () => getPlanUpdatedEventEventDiscriminatorBytes,
316
+ getPlanUpdatedEventEventEncoder: () => getPlanUpdatedEventEventEncoder,
317
+ getReclaimExcessRentDiscriminatorBytes: () => getReclaimExcessRentDiscriminatorBytes,
318
+ getReclaimExcessRentInstruction: () => getReclaimExcessRentInstruction,
319
+ getReclaimExcessRentInstructionDataCodec: () => getReclaimExcessRentInstructionDataCodec,
320
+ getReclaimExcessRentInstructionDataDecoder: () => getReclaimExcessRentInstructionDataDecoder,
321
+ getReclaimExcessRentInstructionDataEncoder: () => getReclaimExcessRentInstructionDataEncoder,
281
322
  getRecurringDelegationCodec: () => getRecurringDelegationCodec,
282
323
  getRecurringDelegationDecoder: () => getRecurringDelegationDecoder,
283
324
  getRecurringDelegationEncoder: () => getRecurringDelegationEncoder,
325
+ getRecurringTransferEventEventCodec: () => getRecurringTransferEventEventCodec,
326
+ getRecurringTransferEventEventDecoder: () => getRecurringTransferEventEventDecoder,
327
+ getRecurringTransferEventEventDiscriminator2Bytes: () => getRecurringTransferEventEventDiscriminator2Bytes,
328
+ getRecurringTransferEventEventDiscriminatorBytes: () => getRecurringTransferEventEventDiscriminatorBytes,
329
+ getRecurringTransferEventEventEncoder: () => getRecurringTransferEventEventEncoder,
284
330
  getResumeDataCodec: () => getResumeDataCodec,
285
331
  getResumeDataDecoder: () => getResumeDataDecoder,
286
332
  getResumeDataEncoder: () => getResumeDataEncoder,
@@ -328,10 +374,33 @@ __export(index_exports, {
328
374
  getSubscriptionAuthorityCodec: () => getSubscriptionAuthorityCodec,
329
375
  getSubscriptionAuthorityDecoder: () => getSubscriptionAuthorityDecoder,
330
376
  getSubscriptionAuthorityEncoder: () => getSubscriptionAuthorityEncoder,
377
+ getSubscriptionCancelledEventEventCodec: () => getSubscriptionCancelledEventEventCodec,
378
+ getSubscriptionCancelledEventEventDecoder: () => getSubscriptionCancelledEventEventDecoder,
379
+ getSubscriptionCancelledEventEventDiscriminator2Bytes: () => getSubscriptionCancelledEventEventDiscriminator2Bytes,
380
+ getSubscriptionCancelledEventEventDiscriminatorBytes: () => getSubscriptionCancelledEventEventDiscriminatorBytes,
381
+ getSubscriptionCancelledEventEventEncoder: () => getSubscriptionCancelledEventEventEncoder,
382
+ getSubscriptionCreatedEventEventCodec: () => getSubscriptionCreatedEventEventCodec,
383
+ getSubscriptionCreatedEventEventDecoder: () => getSubscriptionCreatedEventEventDecoder,
384
+ getSubscriptionCreatedEventEventDiscriminator2Bytes: () => getSubscriptionCreatedEventEventDiscriminator2Bytes,
385
+ getSubscriptionCreatedEventEventDiscriminatorBytes: () => getSubscriptionCreatedEventEventDiscriminatorBytes,
386
+ getSubscriptionCreatedEventEventEncoder: () => getSubscriptionCreatedEventEventEncoder,
331
387
  getSubscriptionDelegationCodec: () => getSubscriptionDelegationCodec,
332
388
  getSubscriptionDelegationDecoder: () => getSubscriptionDelegationDecoder,
333
389
  getSubscriptionDelegationEncoder: () => getSubscriptionDelegationEncoder,
390
+ getSubscriptionResumedEventEventCodec: () => getSubscriptionResumedEventEventCodec,
391
+ getSubscriptionResumedEventEventDecoder: () => getSubscriptionResumedEventEventDecoder,
392
+ getSubscriptionResumedEventEventDiscriminator2Bytes: () => getSubscriptionResumedEventEventDiscriminator2Bytes,
393
+ getSubscriptionResumedEventEventDiscriminatorBytes: () => getSubscriptionResumedEventEventDiscriminatorBytes,
394
+ getSubscriptionResumedEventEventEncoder: () => getSubscriptionResumedEventEventEncoder,
395
+ getSubscriptionTransferEventEventCodec: () => getSubscriptionTransferEventEventCodec,
396
+ getSubscriptionTransferEventEventDecoder: () => getSubscriptionTransferEventEventDecoder,
397
+ getSubscriptionTransferEventEventDiscriminator2Bytes: () => getSubscriptionTransferEventEventDiscriminator2Bytes,
398
+ getSubscriptionTransferEventEventDiscriminatorBytes: () => getSubscriptionTransferEventEventDiscriminatorBytes,
399
+ getSubscriptionTransferEventEventEncoder: () => getSubscriptionTransferEventEventEncoder,
334
400
  getSubscriptionsErrorMessage: () => getSubscriptionsErrorMessage,
401
+ getTransferContextCodec: () => getTransferContextCodec,
402
+ getTransferContextDecoder: () => getTransferContextDecoder,
403
+ getTransferContextEncoder: () => getTransferContextEncoder,
335
404
  getTransferDataCodec: () => getTransferDataCodec,
336
405
  getTransferDataDecoder: () => getTransferDataDecoder,
337
406
  getTransferDataEncoder: () => getTransferDataEncoder,
@@ -366,6 +435,7 @@ __export(index_exports, {
366
435
  getUpdatePlanInstructionDataDecoder: () => getUpdatePlanInstructionDataDecoder,
367
436
  getUpdatePlanInstructionDataEncoder: () => getUpdatePlanInstructionDataEncoder,
368
437
  getUpdatePlanOverlayInstruction: () => getUpdatePlanOverlayInstruction,
438
+ identifySubscriptionsEvent: () => identifySubscriptionsEvent,
369
439
  identifySubscriptionsInstruction: () => identifySubscriptionsInstruction,
370
440
  isSubscriptionsError: () => isSubscriptionsError,
371
441
  parseCancelSubscriptionInstruction: () => parseCancelSubscriptionInstruction,
@@ -375,13 +445,21 @@ __export(index_exports, {
375
445
  parseCreatePlanInstruction: () => parseCreatePlanInstruction,
376
446
  parseCreateRecurringDelegationInstruction: () => parseCreateRecurringDelegationInstruction,
377
447
  parseDeletePlanInstruction: () => parseDeletePlanInstruction,
448
+ parseFixedTransferEventEvent: () => parseFixedTransferEventEvent,
378
449
  parseInitSubscriptionAuthorityInstruction: () => parseInitSubscriptionAuthorityInstruction,
450
+ parsePlanUpdatedEventEvent: () => parsePlanUpdatedEventEvent,
451
+ parseReclaimExcessRentInstruction: () => parseReclaimExcessRentInstruction,
452
+ parseRecurringTransferEventEvent: () => parseRecurringTransferEventEvent,
379
453
  parseResumeSubscriptionInstruction: () => parseResumeSubscriptionInstruction,
380
454
  parseRevokeAbandonedDelegationInstruction: () => parseRevokeAbandonedDelegationInstruction,
381
455
  parseRevokeAbandonedSubscriptionInstruction: () => parseRevokeAbandonedSubscriptionInstruction,
382
456
  parseRevokeDelegationInstruction: () => parseRevokeDelegationInstruction,
383
457
  parseRevokeSubscriptionAuthorityInstruction: () => parseRevokeSubscriptionAuthorityInstruction,
384
458
  parseSubscribeInstruction: () => parseSubscribeInstruction,
459
+ parseSubscriptionCancelledEventEvent: () => parseSubscriptionCancelledEventEvent,
460
+ parseSubscriptionCreatedEventEvent: () => parseSubscriptionCreatedEventEvent,
461
+ parseSubscriptionResumedEventEvent: () => parseSubscriptionResumedEventEvent,
462
+ parseSubscriptionTransferEventEvent: () => parseSubscriptionTransferEventEvent,
385
463
  parseSubscriptionsInstruction: () => parseSubscriptionsInstruction,
386
464
  parseTransferFixedInstruction: () => parseTransferFixedInstruction,
387
465
  parseTransferRecurringInstruction: () => parseTransferRecurringInstruction,
@@ -394,17 +472,18 @@ __export(index_exports, {
394
472
  module.exports = __toCommonJS(index_exports);
395
473
 
396
474
  // src/accounts/decode.ts
397
- var import_kit45 = require("@solana/kit");
475
+ var import_kit55 = require("@solana/kit");
398
476
 
399
477
  // src/generated/accounts/eventAuthority.ts
400
- var import_kit7 = require("@solana/kit");
478
+ var import_kit8 = require("@solana/kit");
401
479
 
402
480
  // src/generated/pdas/eventAuthority.ts
403
481
  var import_kit = require("@solana/kit");
404
482
  async function findEventAuthorityPda(config = {}) {
405
483
  const {
406
- programAddress = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
484
+ programAddress: programAddressInput = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
407
485
  } = config;
486
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
408
487
  return await (0, import_kit.getProgramDerivedAddress)({ programAddress, seeds: [(0, import_kit.getUtf8Encoder)().encode("event_authority")] });
409
488
  }
410
489
 
@@ -412,8 +491,9 @@ async function findEventAuthorityPda(config = {}) {
412
491
  var import_kit2 = require("@solana/kit");
413
492
  async function findFixedDelegationPda(seeds, config = {}) {
414
493
  const {
415
- programAddress = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
494
+ programAddress: programAddressInput = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
416
495
  } = config;
496
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
417
497
  return await (0, import_kit2.getProgramDerivedAddress)({
418
498
  programAddress,
419
499
  seeds: [
@@ -430,8 +510,9 @@ async function findFixedDelegationPda(seeds, config = {}) {
430
510
  var import_kit3 = require("@solana/kit");
431
511
  async function findPlanPda(seeds, config = {}) {
432
512
  const {
433
- programAddress = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
513
+ programAddress: programAddressInput = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
434
514
  } = config;
515
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
435
516
  return await (0, import_kit3.getProgramDerivedAddress)({
436
517
  programAddress,
437
518
  seeds: [
@@ -446,8 +527,9 @@ async function findPlanPda(seeds, config = {}) {
446
527
  var import_kit4 = require("@solana/kit");
447
528
  async function findRecurringDelegationPda(seeds, config = {}) {
448
529
  const {
449
- programAddress = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
530
+ programAddress: programAddressInput = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
450
531
  } = config;
532
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
451
533
  return await (0, import_kit4.getProgramDerivedAddress)({
452
534
  programAddress,
453
535
  seeds: [
@@ -464,8 +546,9 @@ async function findRecurringDelegationPda(seeds, config = {}) {
464
546
  var import_kit5 = require("@solana/kit");
465
547
  async function findSubscriptionAuthorityPda(seeds, config = {}) {
466
548
  const {
467
- programAddress = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
549
+ programAddress: programAddressInput = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
468
550
  } = config;
551
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
469
552
  return await (0, import_kit5.getProgramDerivedAddress)({
470
553
  programAddress,
471
554
  seeds: [
@@ -480,8 +563,9 @@ async function findSubscriptionAuthorityPda(seeds, config = {}) {
480
563
  var import_kit6 = require("@solana/kit");
481
564
  async function findSubscriptionDelegationPda(seeds, config = {}) {
482
565
  const {
483
- programAddress = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
566
+ programAddress: programAddressInput = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
484
567
  } = config;
568
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
485
569
  return await (0, import_kit6.getProgramDerivedAddress)({
486
570
  programAddress,
487
571
  seeds: [
@@ -492,40 +576,61 @@ async function findSubscriptionDelegationPda(seeds, config = {}) {
492
576
  });
493
577
  }
494
578
 
579
+ // src/generated/pdas/transferContext.ts
580
+ var import_kit7 = require("@solana/kit");
581
+ async function findTransferContextPda(seeds, config = {}) {
582
+ const {
583
+ programAddress: programAddressInput = "De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"
584
+ } = config;
585
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
586
+ return await (0, import_kit7.getProgramDerivedAddress)({
587
+ programAddress,
588
+ seeds: [(0, import_kit7.getUtf8Encoder)().encode("TransferContext"), (0, import_kit7.getAddressEncoder)().encode(seeds.subscriptionAuthority)]
589
+ });
590
+ }
591
+
495
592
  // src/generated/accounts/eventAuthority.ts
496
593
  function getEventAuthorityEncoder() {
497
- return (0, import_kit7.getStructEncoder)([]);
594
+ return (0, import_kit8.getStructEncoder)([]);
498
595
  }
499
596
  function getEventAuthorityDecoder() {
500
- return (0, import_kit7.getStructDecoder)([]);
597
+ return (0, import_kit8.getStructDecoder)([]);
501
598
  }
502
599
  function getEventAuthorityCodec() {
503
- return (0, import_kit7.combineCodec)(getEventAuthorityEncoder(), getEventAuthorityDecoder());
600
+ return (0, import_kit8.combineCodec)(getEventAuthorityEncoder(), getEventAuthorityDecoder());
504
601
  }
505
602
  function decodeEventAuthority(encodedAccount) {
506
- return (0, import_kit7.decodeAccount)(encodedAccount, getEventAuthorityDecoder());
603
+ return (0, import_kit8.decodeAccount)(encodedAccount, getEventAuthorityDecoder());
507
604
  }
508
605
  async function fetchEventAuthority(rpc, address, config) {
509
606
  const maybeAccount = await fetchMaybeEventAuthority(rpc, address, config);
510
- (0, import_kit7.assertAccountExists)(maybeAccount);
607
+ (0, import_kit8.assertAccountExists)(maybeAccount);
511
608
  return maybeAccount;
512
609
  }
513
610
  async function fetchMaybeEventAuthority(rpc, address, config) {
514
- const maybeAccount = await (0, import_kit7.fetchEncodedAccount)(rpc, address, config);
611
+ const maybeAccount = await (0, import_kit8.fetchEncodedAccount)(
612
+ "rpc" in rpc ? rpc.rpc : rpc,
613
+ typeof address === "string" ? address : address.address,
614
+ config
615
+ );
515
616
  return decodeEventAuthority(maybeAccount);
516
617
  }
517
618
  async function fetchAllEventAuthority(rpc, addresses, config) {
518
619
  const maybeAccounts = await fetchAllMaybeEventAuthority(rpc, addresses, config);
519
- (0, import_kit7.assertAccountsExist)(maybeAccounts);
620
+ (0, import_kit8.assertAccountsExist)(maybeAccounts);
520
621
  return maybeAccounts;
521
622
  }
522
623
  async function fetchAllMaybeEventAuthority(rpc, addresses, config) {
523
- const maybeAccounts = await (0, import_kit7.fetchEncodedAccounts)(rpc, addresses, config);
624
+ const maybeAccounts = await (0, import_kit8.fetchEncodedAccounts)(
625
+ "rpc" in rpc ? rpc.rpc : rpc,
626
+ addresses.map((a) => typeof a === "string" ? a : a.address),
627
+ config
628
+ );
524
629
  return maybeAccounts.map((maybeAccount) => decodeEventAuthority(maybeAccount));
525
630
  }
526
631
  async function fetchEventAuthorityFromSeeds(rpc, config = {}) {
527
632
  const maybeAccount = await fetchMaybeEventAuthorityFromSeeds(rpc, config);
528
- (0, import_kit7.assertAccountExists)(maybeAccount);
633
+ (0, import_kit8.assertAccountExists)(maybeAccount);
529
634
  return maybeAccount;
530
635
  }
531
636
  async function fetchMaybeEventAuthorityFromSeeds(rpc, config = {}) {
@@ -535,317 +640,326 @@ async function fetchMaybeEventAuthorityFromSeeds(rpc, config = {}) {
535
640
  }
536
641
 
537
642
  // src/generated/accounts/fixedDelegation.ts
538
- var import_kit20 = require("@solana/kit");
643
+ var import_kit21 = require("@solana/kit");
539
644
 
540
645
  // src/generated/types/accountDiscriminator.ts
541
- var import_kit8 = require("@solana/kit");
646
+ var import_kit9 = require("@solana/kit");
542
647
  var AccountDiscriminator = /* @__PURE__ */ ((AccountDiscriminator2) => {
543
648
  AccountDiscriminator2[AccountDiscriminator2["SubscriptionAuthority"] = 0] = "SubscriptionAuthority";
544
649
  AccountDiscriminator2[AccountDiscriminator2["Plan"] = 1] = "Plan";
545
650
  AccountDiscriminator2[AccountDiscriminator2["FixedDelegation"] = 2] = "FixedDelegation";
546
651
  AccountDiscriminator2[AccountDiscriminator2["RecurringDelegation"] = 3] = "RecurringDelegation";
547
652
  AccountDiscriminator2[AccountDiscriminator2["SubscriptionDelegation"] = 4] = "SubscriptionDelegation";
653
+ AccountDiscriminator2[AccountDiscriminator2["TransferContext"] = 5] = "TransferContext";
548
654
  return AccountDiscriminator2;
549
655
  })(AccountDiscriminator || {});
550
656
  function getAccountDiscriminatorEncoder() {
551
- return (0, import_kit8.getEnumEncoder)(AccountDiscriminator);
657
+ return (0, import_kit9.getEnumEncoder)(AccountDiscriminator);
552
658
  }
553
659
  function getAccountDiscriminatorDecoder() {
554
- return (0, import_kit8.getEnumDecoder)(AccountDiscriminator);
660
+ return (0, import_kit9.getEnumDecoder)(AccountDiscriminator);
555
661
  }
556
662
  function getAccountDiscriminatorCodec() {
557
- return (0, import_kit8.combineCodec)(getAccountDiscriminatorEncoder(), getAccountDiscriminatorDecoder());
663
+ return (0, import_kit9.combineCodec)(getAccountDiscriminatorEncoder(), getAccountDiscriminatorDecoder());
558
664
  }
559
665
 
560
666
  // src/generated/types/cancelSubscriptionNowData.ts
561
- var import_kit9 = require("@solana/kit");
667
+ var import_kit10 = require("@solana/kit");
562
668
  function getCancelSubscriptionNowDataEncoder() {
563
- return (0, import_kit9.getStructEncoder)([["expectedCurrentPeriodStartTs", (0, import_kit9.getI64Encoder)()]]);
669
+ return (0, import_kit10.getStructEncoder)([["expectedCurrentPeriodStartTs", (0, import_kit10.getI64Encoder)()]]);
564
670
  }
565
671
  function getCancelSubscriptionNowDataDecoder() {
566
- return (0, import_kit9.getStructDecoder)([["expectedCurrentPeriodStartTs", (0, import_kit9.getI64Decoder)()]]);
672
+ return (0, import_kit10.getStructDecoder)([["expectedCurrentPeriodStartTs", (0, import_kit10.getI64Decoder)()]]);
567
673
  }
568
674
  function getCancelSubscriptionNowDataCodec() {
569
- return (0, import_kit9.combineCodec)(getCancelSubscriptionNowDataEncoder(), getCancelSubscriptionNowDataDecoder());
675
+ return (0, import_kit10.combineCodec)(getCancelSubscriptionNowDataEncoder(), getCancelSubscriptionNowDataDecoder());
570
676
  }
571
677
 
572
678
  // src/generated/types/createFixedDelegationData.ts
573
- var import_kit10 = require("@solana/kit");
679
+ var import_kit11 = require("@solana/kit");
574
680
  function getCreateFixedDelegationDataEncoder() {
575
- return (0, import_kit10.getStructEncoder)([
576
- ["nonce", (0, import_kit10.getU64Encoder)()],
577
- ["amount", (0, import_kit10.getU64Encoder)()],
578
- ["expiryTs", (0, import_kit10.getI64Encoder)()],
579
- ["expectedSubscriptionAuthorityInitId", (0, import_kit10.getI64Encoder)()]
681
+ return (0, import_kit11.getStructEncoder)([
682
+ ["nonce", (0, import_kit11.getU64Encoder)()],
683
+ ["amount", (0, import_kit11.getU64Encoder)()],
684
+ ["expiryTs", (0, import_kit11.getI64Encoder)()],
685
+ ["expectedSubscriptionAuthorityInitId", (0, import_kit11.getI64Encoder)()]
580
686
  ]);
581
687
  }
582
688
  function getCreateFixedDelegationDataDecoder() {
583
- return (0, import_kit10.getStructDecoder)([
584
- ["nonce", (0, import_kit10.getU64Decoder)()],
585
- ["amount", (0, import_kit10.getU64Decoder)()],
586
- ["expiryTs", (0, import_kit10.getI64Decoder)()],
587
- ["expectedSubscriptionAuthorityInitId", (0, import_kit10.getI64Decoder)()]
689
+ return (0, import_kit11.getStructDecoder)([
690
+ ["nonce", (0, import_kit11.getU64Decoder)()],
691
+ ["amount", (0, import_kit11.getU64Decoder)()],
692
+ ["expiryTs", (0, import_kit11.getI64Decoder)()],
693
+ ["expectedSubscriptionAuthorityInitId", (0, import_kit11.getI64Decoder)()]
588
694
  ]);
589
695
  }
590
696
  function getCreateFixedDelegationDataCodec() {
591
- return (0, import_kit10.combineCodec)(getCreateFixedDelegationDataEncoder(), getCreateFixedDelegationDataDecoder());
697
+ return (0, import_kit11.combineCodec)(getCreateFixedDelegationDataEncoder(), getCreateFixedDelegationDataDecoder());
592
698
  }
593
699
 
594
700
  // src/generated/types/createRecurringDelegationData.ts
595
- var import_kit11 = require("@solana/kit");
701
+ var import_kit12 = require("@solana/kit");
596
702
  function getCreateRecurringDelegationDataEncoder() {
597
- return (0, import_kit11.getStructEncoder)([
598
- ["nonce", (0, import_kit11.getU64Encoder)()],
599
- ["amountPerPeriod", (0, import_kit11.getU64Encoder)()],
600
- ["periodLengthS", (0, import_kit11.getU64Encoder)()],
601
- ["startTs", (0, import_kit11.getI64Encoder)()],
602
- ["expiryTs", (0, import_kit11.getI64Encoder)()],
603
- ["expectedSubscriptionAuthorityInitId", (0, import_kit11.getI64Encoder)()]
703
+ return (0, import_kit12.getStructEncoder)([
704
+ ["nonce", (0, import_kit12.getU64Encoder)()],
705
+ ["amountPerPeriod", (0, import_kit12.getU64Encoder)()],
706
+ ["periodLengthS", (0, import_kit12.getU64Encoder)()],
707
+ ["startTs", (0, import_kit12.getI64Encoder)()],
708
+ ["expiryTs", (0, import_kit12.getI64Encoder)()],
709
+ ["expectedSubscriptionAuthorityInitId", (0, import_kit12.getI64Encoder)()]
604
710
  ]);
605
711
  }
606
712
  function getCreateRecurringDelegationDataDecoder() {
607
- return (0, import_kit11.getStructDecoder)([
608
- ["nonce", (0, import_kit11.getU64Decoder)()],
609
- ["amountPerPeriod", (0, import_kit11.getU64Decoder)()],
610
- ["periodLengthS", (0, import_kit11.getU64Decoder)()],
611
- ["startTs", (0, import_kit11.getI64Decoder)()],
612
- ["expiryTs", (0, import_kit11.getI64Decoder)()],
613
- ["expectedSubscriptionAuthorityInitId", (0, import_kit11.getI64Decoder)()]
713
+ return (0, import_kit12.getStructDecoder)([
714
+ ["nonce", (0, import_kit12.getU64Decoder)()],
715
+ ["amountPerPeriod", (0, import_kit12.getU64Decoder)()],
716
+ ["periodLengthS", (0, import_kit12.getU64Decoder)()],
717
+ ["startTs", (0, import_kit12.getI64Decoder)()],
718
+ ["expiryTs", (0, import_kit12.getI64Decoder)()],
719
+ ["expectedSubscriptionAuthorityInitId", (0, import_kit12.getI64Decoder)()]
614
720
  ]);
615
721
  }
616
722
  function getCreateRecurringDelegationDataCodec() {
617
- return (0, import_kit11.combineCodec)(getCreateRecurringDelegationDataEncoder(), getCreateRecurringDelegationDataDecoder());
723
+ return (0, import_kit12.combineCodec)(getCreateRecurringDelegationDataEncoder(), getCreateRecurringDelegationDataDecoder());
618
724
  }
619
725
 
620
726
  // src/generated/types/header.ts
621
- var import_kit12 = require("@solana/kit");
727
+ var import_kit13 = require("@solana/kit");
622
728
  function getHeaderEncoder() {
623
- return (0, import_kit12.getStructEncoder)([
624
- ["discriminator", (0, import_kit12.getU8Encoder)()],
625
- ["version", (0, import_kit12.getU8Encoder)()],
626
- ["bump", (0, import_kit12.getU8Encoder)()],
627
- ["delegator", (0, import_kit12.getAddressEncoder)()],
628
- ["delegatee", (0, import_kit12.getAddressEncoder)()],
629
- ["payer", (0, import_kit12.getAddressEncoder)()],
630
- ["initId", (0, import_kit12.getI64Encoder)()]
729
+ return (0, import_kit13.getStructEncoder)([
730
+ ["discriminator", (0, import_kit13.getU8Encoder)()],
731
+ ["version", (0, import_kit13.getU8Encoder)()],
732
+ ["bump", (0, import_kit13.getU8Encoder)()],
733
+ ["delegator", (0, import_kit13.getAddressEncoder)()],
734
+ ["delegatee", (0, import_kit13.getAddressEncoder)()],
735
+ ["payer", (0, import_kit13.getAddressEncoder)()],
736
+ ["initId", (0, import_kit13.getI64Encoder)()]
631
737
  ]);
632
738
  }
633
739
  function getHeaderDecoder() {
634
- return (0, import_kit12.getStructDecoder)([
635
- ["discriminator", (0, import_kit12.getU8Decoder)()],
636
- ["version", (0, import_kit12.getU8Decoder)()],
637
- ["bump", (0, import_kit12.getU8Decoder)()],
638
- ["delegator", (0, import_kit12.getAddressDecoder)()],
639
- ["delegatee", (0, import_kit12.getAddressDecoder)()],
640
- ["payer", (0, import_kit12.getAddressDecoder)()],
641
- ["initId", (0, import_kit12.getI64Decoder)()]
740
+ return (0, import_kit13.getStructDecoder)([
741
+ ["discriminator", (0, import_kit13.getU8Decoder)()],
742
+ ["version", (0, import_kit13.getU8Decoder)()],
743
+ ["bump", (0, import_kit13.getU8Decoder)()],
744
+ ["delegator", (0, import_kit13.getAddressDecoder)()],
745
+ ["delegatee", (0, import_kit13.getAddressDecoder)()],
746
+ ["payer", (0, import_kit13.getAddressDecoder)()],
747
+ ["initId", (0, import_kit13.getI64Decoder)()]
642
748
  ]);
643
749
  }
644
750
  function getHeaderCodec() {
645
- return (0, import_kit12.combineCodec)(getHeaderEncoder(), getHeaderDecoder());
751
+ return (0, import_kit13.combineCodec)(getHeaderEncoder(), getHeaderDecoder());
646
752
  }
647
753
 
648
754
  // src/generated/types/planData.ts
649
- var import_kit13 = require("@solana/kit");
755
+ var import_kit14 = require("@solana/kit");
650
756
  function getPlanDataEncoder() {
651
- return (0, import_kit13.getStructEncoder)([
652
- ["planId", (0, import_kit13.getU64Encoder)()],
653
- ["mint", (0, import_kit13.getAddressEncoder)()],
757
+ return (0, import_kit14.getStructEncoder)([
758
+ ["planId", (0, import_kit14.getU64Encoder)()],
759
+ ["mint", (0, import_kit14.getAddressEncoder)()],
654
760
  ["terms", getPlanTermsEncoder()],
655
- ["endTs", (0, import_kit13.getI64Encoder)()],
656
- ["destinations", (0, import_kit13.getArrayEncoder)((0, import_kit13.getAddressEncoder)(), { size: 4 })],
657
- ["pullers", (0, import_kit13.getArrayEncoder)((0, import_kit13.getAddressEncoder)(), { size: 4 })],
658
- ["metadataUri", (0, import_kit13.fixEncoderSize)((0, import_kit13.getUtf8Encoder)(), 128)]
761
+ ["endTs", (0, import_kit14.getI64Encoder)()],
762
+ ["destinations", (0, import_kit14.getArrayEncoder)((0, import_kit14.getAddressEncoder)(), { size: 4 })],
763
+ ["pullers", (0, import_kit14.getArrayEncoder)((0, import_kit14.getAddressEncoder)(), { size: 4 })],
764
+ ["metadataUri", (0, import_kit14.fixEncoderSize)((0, import_kit14.getUtf8Encoder)(), 128)]
659
765
  ]);
660
766
  }
661
767
  function getPlanDataDecoder() {
662
- return (0, import_kit13.getStructDecoder)([
663
- ["planId", (0, import_kit13.getU64Decoder)()],
664
- ["mint", (0, import_kit13.getAddressDecoder)()],
768
+ return (0, import_kit14.getStructDecoder)([
769
+ ["planId", (0, import_kit14.getU64Decoder)()],
770
+ ["mint", (0, import_kit14.getAddressDecoder)()],
665
771
  ["terms", getPlanTermsDecoder()],
666
- ["endTs", (0, import_kit13.getI64Decoder)()],
667
- ["destinations", (0, import_kit13.getArrayDecoder)((0, import_kit13.getAddressDecoder)(), { size: 4 })],
668
- ["pullers", (0, import_kit13.getArrayDecoder)((0, import_kit13.getAddressDecoder)(), { size: 4 })],
669
- ["metadataUri", (0, import_kit13.fixDecoderSize)((0, import_kit13.getUtf8Decoder)(), 128)]
772
+ ["endTs", (0, import_kit14.getI64Decoder)()],
773
+ ["destinations", (0, import_kit14.getArrayDecoder)((0, import_kit14.getAddressDecoder)(), { size: 4 })],
774
+ ["pullers", (0, import_kit14.getArrayDecoder)((0, import_kit14.getAddressDecoder)(), { size: 4 })],
775
+ ["metadataUri", (0, import_kit14.fixDecoderSize)((0, import_kit14.getUtf8Decoder)(), 128)]
670
776
  ]);
671
777
  }
672
778
  function getPlanDataCodec() {
673
- return (0, import_kit13.combineCodec)(getPlanDataEncoder(), getPlanDataDecoder());
779
+ return (0, import_kit14.combineCodec)(getPlanDataEncoder(), getPlanDataDecoder());
674
780
  }
675
781
 
676
782
  // src/generated/types/planStatus.ts
677
- var import_kit14 = require("@solana/kit");
783
+ var import_kit15 = require("@solana/kit");
678
784
  var PlanStatus = /* @__PURE__ */ ((PlanStatus2) => {
679
785
  PlanStatus2[PlanStatus2["Sunset"] = 0] = "Sunset";
680
786
  PlanStatus2[PlanStatus2["Active"] = 1] = "Active";
681
787
  return PlanStatus2;
682
788
  })(PlanStatus || {});
683
789
  function getPlanStatusEncoder() {
684
- return (0, import_kit14.getEnumEncoder)(PlanStatus);
790
+ return (0, import_kit15.getEnumEncoder)(PlanStatus);
685
791
  }
686
792
  function getPlanStatusDecoder() {
687
- return (0, import_kit14.getEnumDecoder)(PlanStatus);
793
+ return (0, import_kit15.getEnumDecoder)(PlanStatus);
688
794
  }
689
795
  function getPlanStatusCodec() {
690
- return (0, import_kit14.combineCodec)(getPlanStatusEncoder(), getPlanStatusDecoder());
796
+ return (0, import_kit15.combineCodec)(getPlanStatusEncoder(), getPlanStatusDecoder());
691
797
  }
692
798
 
693
799
  // src/generated/types/planTerms.ts
694
- var import_kit15 = require("@solana/kit");
800
+ var import_kit16 = require("@solana/kit");
695
801
  function getPlanTermsEncoder() {
696
- return (0, import_kit15.getStructEncoder)([
697
- ["amount", (0, import_kit15.getU64Encoder)()],
698
- ["periodHours", (0, import_kit15.getU64Encoder)()],
699
- ["createdAt", (0, import_kit15.getI64Encoder)()]
802
+ return (0, import_kit16.getStructEncoder)([
803
+ ["amount", (0, import_kit16.getU64Encoder)()],
804
+ ["periodHours", (0, import_kit16.getU64Encoder)()],
805
+ ["createdAt", (0, import_kit16.getI64Encoder)()]
700
806
  ]);
701
807
  }
702
808
  function getPlanTermsDecoder() {
703
- return (0, import_kit15.getStructDecoder)([
704
- ["amount", (0, import_kit15.getU64Decoder)()],
705
- ["periodHours", (0, import_kit15.getU64Decoder)()],
706
- ["createdAt", (0, import_kit15.getI64Decoder)()]
809
+ return (0, import_kit16.getStructDecoder)([
810
+ ["amount", (0, import_kit16.getU64Decoder)()],
811
+ ["periodHours", (0, import_kit16.getU64Decoder)()],
812
+ ["createdAt", (0, import_kit16.getI64Decoder)()]
707
813
  ]);
708
814
  }
709
815
  function getPlanTermsCodec() {
710
- return (0, import_kit15.combineCodec)(getPlanTermsEncoder(), getPlanTermsDecoder());
816
+ return (0, import_kit16.combineCodec)(getPlanTermsEncoder(), getPlanTermsDecoder());
711
817
  }
712
818
 
713
819
  // src/generated/types/resumeData.ts
714
- var import_kit16 = require("@solana/kit");
820
+ var import_kit17 = require("@solana/kit");
715
821
  function getResumeDataEncoder() {
716
- return (0, import_kit16.getStructEncoder)([["expectedExpiresAtTs", (0, import_kit16.getI64Encoder)()]]);
822
+ return (0, import_kit17.getStructEncoder)([["expectedExpiresAtTs", (0, import_kit17.getI64Encoder)()]]);
717
823
  }
718
824
  function getResumeDataDecoder() {
719
- return (0, import_kit16.getStructDecoder)([["expectedExpiresAtTs", (0, import_kit16.getI64Decoder)()]]);
825
+ return (0, import_kit17.getStructDecoder)([["expectedExpiresAtTs", (0, import_kit17.getI64Decoder)()]]);
720
826
  }
721
827
  function getResumeDataCodec() {
722
- return (0, import_kit16.combineCodec)(getResumeDataEncoder(), getResumeDataDecoder());
828
+ return (0, import_kit17.combineCodec)(getResumeDataEncoder(), getResumeDataDecoder());
723
829
  }
724
830
 
725
831
  // src/generated/types/subscribeData.ts
726
- var import_kit17 = require("@solana/kit");
832
+ var import_kit18 = require("@solana/kit");
727
833
  function getSubscribeDataEncoder() {
728
- return (0, import_kit17.getStructEncoder)([
729
- ["planId", (0, import_kit17.getU64Encoder)()],
730
- ["planBump", (0, import_kit17.getU8Encoder)()],
731
- ["expectedMint", (0, import_kit17.getAddressEncoder)()],
732
- ["expectedAmount", (0, import_kit17.getU64Encoder)()],
733
- ["expectedPeriodHours", (0, import_kit17.getU64Encoder)()],
734
- ["expectedCreatedAt", (0, import_kit17.getI64Encoder)()],
735
- ["expectedSubscriptionAuthorityInitId", (0, import_kit17.getI64Encoder)()]
834
+ return (0, import_kit18.getStructEncoder)([
835
+ ["planId", (0, import_kit18.getU64Encoder)()],
836
+ ["planBump", (0, import_kit18.getU8Encoder)()],
837
+ ["expectedMint", (0, import_kit18.getAddressEncoder)()],
838
+ ["expectedAmount", (0, import_kit18.getU64Encoder)()],
839
+ ["expectedPeriodHours", (0, import_kit18.getU64Encoder)()],
840
+ ["expectedCreatedAt", (0, import_kit18.getI64Encoder)()],
841
+ ["expectedSubscriptionAuthorityInitId", (0, import_kit18.getI64Encoder)()]
736
842
  ]);
737
843
  }
738
844
  function getSubscribeDataDecoder() {
739
- return (0, import_kit17.getStructDecoder)([
740
- ["planId", (0, import_kit17.getU64Decoder)()],
741
- ["planBump", (0, import_kit17.getU8Decoder)()],
742
- ["expectedMint", (0, import_kit17.getAddressDecoder)()],
743
- ["expectedAmount", (0, import_kit17.getU64Decoder)()],
744
- ["expectedPeriodHours", (0, import_kit17.getU64Decoder)()],
745
- ["expectedCreatedAt", (0, import_kit17.getI64Decoder)()],
746
- ["expectedSubscriptionAuthorityInitId", (0, import_kit17.getI64Decoder)()]
845
+ return (0, import_kit18.getStructDecoder)([
846
+ ["planId", (0, import_kit18.getU64Decoder)()],
847
+ ["planBump", (0, import_kit18.getU8Decoder)()],
848
+ ["expectedMint", (0, import_kit18.getAddressDecoder)()],
849
+ ["expectedAmount", (0, import_kit18.getU64Decoder)()],
850
+ ["expectedPeriodHours", (0, import_kit18.getU64Decoder)()],
851
+ ["expectedCreatedAt", (0, import_kit18.getI64Decoder)()],
852
+ ["expectedSubscriptionAuthorityInitId", (0, import_kit18.getI64Decoder)()]
747
853
  ]);
748
854
  }
749
855
  function getSubscribeDataCodec() {
750
- return (0, import_kit17.combineCodec)(getSubscribeDataEncoder(), getSubscribeDataDecoder());
856
+ return (0, import_kit18.combineCodec)(getSubscribeDataEncoder(), getSubscribeDataDecoder());
751
857
  }
752
858
 
753
859
  // src/generated/types/transferData.ts
754
- var import_kit18 = require("@solana/kit");
860
+ var import_kit19 = require("@solana/kit");
755
861
  function getTransferDataEncoder() {
756
- return (0, import_kit18.getStructEncoder)([
757
- ["amount", (0, import_kit18.getU64Encoder)()],
758
- ["delegator", (0, import_kit18.getAddressEncoder)()],
759
- ["mint", (0, import_kit18.getAddressEncoder)()]
862
+ return (0, import_kit19.getStructEncoder)([
863
+ ["amount", (0, import_kit19.getU64Encoder)()],
864
+ ["delegator", (0, import_kit19.getAddressEncoder)()],
865
+ ["mint", (0, import_kit19.getAddressEncoder)()]
760
866
  ]);
761
867
  }
762
868
  function getTransferDataDecoder() {
763
- return (0, import_kit18.getStructDecoder)([
764
- ["amount", (0, import_kit18.getU64Decoder)()],
765
- ["delegator", (0, import_kit18.getAddressDecoder)()],
766
- ["mint", (0, import_kit18.getAddressDecoder)()]
869
+ return (0, import_kit19.getStructDecoder)([
870
+ ["amount", (0, import_kit19.getU64Decoder)()],
871
+ ["delegator", (0, import_kit19.getAddressDecoder)()],
872
+ ["mint", (0, import_kit19.getAddressDecoder)()]
767
873
  ]);
768
874
  }
769
875
  function getTransferDataCodec() {
770
- return (0, import_kit18.combineCodec)(getTransferDataEncoder(), getTransferDataDecoder());
876
+ return (0, import_kit19.combineCodec)(getTransferDataEncoder(), getTransferDataDecoder());
771
877
  }
772
878
 
773
879
  // src/generated/types/updatePlanData.ts
774
- var import_kit19 = require("@solana/kit");
880
+ var import_kit20 = require("@solana/kit");
775
881
  function getUpdatePlanDataEncoder() {
776
- return (0, import_kit19.getStructEncoder)([
777
- ["status", (0, import_kit19.getU8Encoder)()],
778
- ["endTs", (0, import_kit19.getI64Encoder)()],
779
- ["pullers", (0, import_kit19.getArrayEncoder)((0, import_kit19.getAddressEncoder)(), { size: 4 })],
780
- ["metadataUri", (0, import_kit19.fixEncoderSize)((0, import_kit19.getUtf8Encoder)(), 128)],
781
- ["expectedCreatedAt", (0, import_kit19.getI64Encoder)()],
782
- ["expectedEndTs", (0, import_kit19.getI64Encoder)()],
783
- ["expectedPullers", (0, import_kit19.getArrayEncoder)((0, import_kit19.getAddressEncoder)(), { size: 4 })],
784
- ["expectedMetadataUri", (0, import_kit19.fixEncoderSize)((0, import_kit19.getUtf8Encoder)(), 128)]
882
+ return (0, import_kit20.getStructEncoder)([
883
+ ["status", (0, import_kit20.getU8Encoder)()],
884
+ ["endTs", (0, import_kit20.getI64Encoder)()],
885
+ ["pullers", (0, import_kit20.getArrayEncoder)((0, import_kit20.getAddressEncoder)(), { size: 4 })],
886
+ ["metadataUri", (0, import_kit20.fixEncoderSize)((0, import_kit20.getUtf8Encoder)(), 128)],
887
+ ["expectedCreatedAt", (0, import_kit20.getI64Encoder)()],
888
+ ["expectedEndTs", (0, import_kit20.getI64Encoder)()],
889
+ ["expectedPullers", (0, import_kit20.getArrayEncoder)((0, import_kit20.getAddressEncoder)(), { size: 4 })],
890
+ ["expectedMetadataUri", (0, import_kit20.fixEncoderSize)((0, import_kit20.getUtf8Encoder)(), 128)]
785
891
  ]);
786
892
  }
787
893
  function getUpdatePlanDataDecoder() {
788
- return (0, import_kit19.getStructDecoder)([
789
- ["status", (0, import_kit19.getU8Decoder)()],
790
- ["endTs", (0, import_kit19.getI64Decoder)()],
791
- ["pullers", (0, import_kit19.getArrayDecoder)((0, import_kit19.getAddressDecoder)(), { size: 4 })],
792
- ["metadataUri", (0, import_kit19.fixDecoderSize)((0, import_kit19.getUtf8Decoder)(), 128)],
793
- ["expectedCreatedAt", (0, import_kit19.getI64Decoder)()],
794
- ["expectedEndTs", (0, import_kit19.getI64Decoder)()],
795
- ["expectedPullers", (0, import_kit19.getArrayDecoder)((0, import_kit19.getAddressDecoder)(), { size: 4 })],
796
- ["expectedMetadataUri", (0, import_kit19.fixDecoderSize)((0, import_kit19.getUtf8Decoder)(), 128)]
894
+ return (0, import_kit20.getStructDecoder)([
895
+ ["status", (0, import_kit20.getU8Decoder)()],
896
+ ["endTs", (0, import_kit20.getI64Decoder)()],
897
+ ["pullers", (0, import_kit20.getArrayDecoder)((0, import_kit20.getAddressDecoder)(), { size: 4 })],
898
+ ["metadataUri", (0, import_kit20.fixDecoderSize)((0, import_kit20.getUtf8Decoder)(), 128)],
899
+ ["expectedCreatedAt", (0, import_kit20.getI64Decoder)()],
900
+ ["expectedEndTs", (0, import_kit20.getI64Decoder)()],
901
+ ["expectedPullers", (0, import_kit20.getArrayDecoder)((0, import_kit20.getAddressDecoder)(), { size: 4 })],
902
+ ["expectedMetadataUri", (0, import_kit20.fixDecoderSize)((0, import_kit20.getUtf8Decoder)(), 128)]
797
903
  ]);
798
904
  }
799
905
  function getUpdatePlanDataCodec() {
800
- return (0, import_kit19.combineCodec)(getUpdatePlanDataEncoder(), getUpdatePlanDataDecoder());
906
+ return (0, import_kit20.combineCodec)(getUpdatePlanDataEncoder(), getUpdatePlanDataDecoder());
801
907
  }
802
908
 
803
909
  // src/generated/accounts/fixedDelegation.ts
804
910
  function getFixedDelegationEncoder() {
805
- return (0, import_kit20.getStructEncoder)([
911
+ return (0, import_kit21.getStructEncoder)([
806
912
  ["header", getHeaderEncoder()],
807
- ["subscriptionAuthority", (0, import_kit20.getAddressEncoder)()],
808
- ["mint", (0, import_kit20.getAddressEncoder)()],
809
- ["amount", (0, import_kit20.getU64Encoder)()],
810
- ["expiryTs", (0, import_kit20.getI64Encoder)()]
913
+ ["subscriptionAuthority", (0, import_kit21.getAddressEncoder)()],
914
+ ["mint", (0, import_kit21.getAddressEncoder)()],
915
+ ["amount", (0, import_kit21.getU64Encoder)()],
916
+ ["expiryTs", (0, import_kit21.getI64Encoder)()]
811
917
  ]);
812
918
  }
813
919
  function getFixedDelegationDecoder() {
814
- return (0, import_kit20.getStructDecoder)([
920
+ return (0, import_kit21.getStructDecoder)([
815
921
  ["header", getHeaderDecoder()],
816
- ["subscriptionAuthority", (0, import_kit20.getAddressDecoder)()],
817
- ["mint", (0, import_kit20.getAddressDecoder)()],
818
- ["amount", (0, import_kit20.getU64Decoder)()],
819
- ["expiryTs", (0, import_kit20.getI64Decoder)()]
922
+ ["subscriptionAuthority", (0, import_kit21.getAddressDecoder)()],
923
+ ["mint", (0, import_kit21.getAddressDecoder)()],
924
+ ["amount", (0, import_kit21.getU64Decoder)()],
925
+ ["expiryTs", (0, import_kit21.getI64Decoder)()]
820
926
  ]);
821
927
  }
822
928
  function getFixedDelegationCodec() {
823
- return (0, import_kit20.combineCodec)(getFixedDelegationEncoder(), getFixedDelegationDecoder());
929
+ return (0, import_kit21.combineCodec)(getFixedDelegationEncoder(), getFixedDelegationDecoder());
824
930
  }
825
931
  function decodeFixedDelegation(encodedAccount) {
826
- return (0, import_kit20.decodeAccount)(encodedAccount, getFixedDelegationDecoder());
932
+ return (0, import_kit21.decodeAccount)(encodedAccount, getFixedDelegationDecoder());
827
933
  }
828
934
  async function fetchFixedDelegation(rpc, address, config) {
829
935
  const maybeAccount = await fetchMaybeFixedDelegation(rpc, address, config);
830
- (0, import_kit20.assertAccountExists)(maybeAccount);
936
+ (0, import_kit21.assertAccountExists)(maybeAccount);
831
937
  return maybeAccount;
832
938
  }
833
939
  async function fetchMaybeFixedDelegation(rpc, address, config) {
834
- const maybeAccount = await (0, import_kit20.fetchEncodedAccount)(rpc, address, config);
940
+ const maybeAccount = await (0, import_kit21.fetchEncodedAccount)(
941
+ "rpc" in rpc ? rpc.rpc : rpc,
942
+ typeof address === "string" ? address : address.address,
943
+ config
944
+ );
835
945
  return decodeFixedDelegation(maybeAccount);
836
946
  }
837
947
  async function fetchAllFixedDelegation(rpc, addresses, config) {
838
948
  const maybeAccounts = await fetchAllMaybeFixedDelegation(rpc, addresses, config);
839
- (0, import_kit20.assertAccountsExist)(maybeAccounts);
949
+ (0, import_kit21.assertAccountsExist)(maybeAccounts);
840
950
  return maybeAccounts;
841
951
  }
842
952
  async function fetchAllMaybeFixedDelegation(rpc, addresses, config) {
843
- const maybeAccounts = await (0, import_kit20.fetchEncodedAccounts)(rpc, addresses, config);
953
+ const maybeAccounts = await (0, import_kit21.fetchEncodedAccounts)(
954
+ "rpc" in rpc ? rpc.rpc : rpc,
955
+ addresses.map((a) => typeof a === "string" ? a : a.address),
956
+ config
957
+ );
844
958
  return maybeAccounts.map((maybeAccount) => decodeFixedDelegation(maybeAccount));
845
959
  }
846
960
  async function fetchFixedDelegationFromSeeds(rpc, seeds, config = {}) {
847
961
  const maybeAccount = await fetchMaybeFixedDelegationFromSeeds(rpc, seeds, config);
848
- (0, import_kit20.assertAccountExists)(maybeAccount);
962
+ (0, import_kit21.assertAccountExists)(maybeAccount);
849
963
  return maybeAccount;
850
964
  }
851
965
  async function fetchMaybeFixedDelegationFromSeeds(rpc, seeds, config = {}) {
@@ -855,52 +969,60 @@ async function fetchMaybeFixedDelegationFromSeeds(rpc, seeds, config = {}) {
855
969
  }
856
970
 
857
971
  // src/generated/accounts/plan.ts
858
- var import_kit21 = require("@solana/kit");
972
+ var import_kit22 = require("@solana/kit");
859
973
  function getPlanEncoder() {
860
- return (0, import_kit21.getStructEncoder)([
861
- ["discriminator", (0, import_kit21.getU8Encoder)()],
862
- ["owner", (0, import_kit21.getAddressEncoder)()],
863
- ["bump", (0, import_kit21.getU8Encoder)()],
864
- ["status", (0, import_kit21.getU8Encoder)()],
974
+ return (0, import_kit22.getStructEncoder)([
975
+ ["discriminator", (0, import_kit22.getU8Encoder)()],
976
+ ["owner", (0, import_kit22.getAddressEncoder)()],
977
+ ["bump", (0, import_kit22.getU8Encoder)()],
978
+ ["status", (0, import_kit22.getU8Encoder)()],
865
979
  ["data", getPlanDataEncoder()]
866
980
  ]);
867
981
  }
868
982
  function getPlanDecoder() {
869
- return (0, import_kit21.getStructDecoder)([
870
- ["discriminator", (0, import_kit21.getU8Decoder)()],
871
- ["owner", (0, import_kit21.getAddressDecoder)()],
872
- ["bump", (0, import_kit21.getU8Decoder)()],
873
- ["status", (0, import_kit21.getU8Decoder)()],
983
+ return (0, import_kit22.getStructDecoder)([
984
+ ["discriminator", (0, import_kit22.getU8Decoder)()],
985
+ ["owner", (0, import_kit22.getAddressDecoder)()],
986
+ ["bump", (0, import_kit22.getU8Decoder)()],
987
+ ["status", (0, import_kit22.getU8Decoder)()],
874
988
  ["data", getPlanDataDecoder()]
875
989
  ]);
876
990
  }
877
991
  function getPlanCodec() {
878
- return (0, import_kit21.combineCodec)(getPlanEncoder(), getPlanDecoder());
992
+ return (0, import_kit22.combineCodec)(getPlanEncoder(), getPlanDecoder());
879
993
  }
880
994
  function decodePlan(encodedAccount) {
881
- return (0, import_kit21.decodeAccount)(encodedAccount, getPlanDecoder());
995
+ return (0, import_kit22.decodeAccount)(encodedAccount, getPlanDecoder());
882
996
  }
883
997
  async function fetchPlan(rpc, address, config) {
884
998
  const maybeAccount = await fetchMaybePlan(rpc, address, config);
885
- (0, import_kit21.assertAccountExists)(maybeAccount);
999
+ (0, import_kit22.assertAccountExists)(maybeAccount);
886
1000
  return maybeAccount;
887
1001
  }
888
1002
  async function fetchMaybePlan(rpc, address, config) {
889
- const maybeAccount = await (0, import_kit21.fetchEncodedAccount)(rpc, address, config);
1003
+ const maybeAccount = await (0, import_kit22.fetchEncodedAccount)(
1004
+ "rpc" in rpc ? rpc.rpc : rpc,
1005
+ typeof address === "string" ? address : address.address,
1006
+ config
1007
+ );
890
1008
  return decodePlan(maybeAccount);
891
1009
  }
892
1010
  async function fetchAllPlan(rpc, addresses, config) {
893
1011
  const maybeAccounts = await fetchAllMaybePlan(rpc, addresses, config);
894
- (0, import_kit21.assertAccountsExist)(maybeAccounts);
1012
+ (0, import_kit22.assertAccountsExist)(maybeAccounts);
895
1013
  return maybeAccounts;
896
1014
  }
897
1015
  async function fetchAllMaybePlan(rpc, addresses, config) {
898
- const maybeAccounts = await (0, import_kit21.fetchEncodedAccounts)(rpc, addresses, config);
1016
+ const maybeAccounts = await (0, import_kit22.fetchEncodedAccounts)(
1017
+ "rpc" in rpc ? rpc.rpc : rpc,
1018
+ addresses.map((a) => typeof a === "string" ? a : a.address),
1019
+ config
1020
+ );
899
1021
  return maybeAccounts.map((maybeAccount) => decodePlan(maybeAccount));
900
1022
  }
901
1023
  async function fetchPlanFromSeeds(rpc, seeds, config = {}) {
902
1024
  const maybeAccount = await fetchMaybePlanFromSeeds(rpc, seeds, config);
903
- (0, import_kit21.assertAccountExists)(maybeAccount);
1025
+ (0, import_kit22.assertAccountExists)(maybeAccount);
904
1026
  return maybeAccount;
905
1027
  }
906
1028
  async function fetchMaybePlanFromSeeds(rpc, seeds, config = {}) {
@@ -910,58 +1032,66 @@ async function fetchMaybePlanFromSeeds(rpc, seeds, config = {}) {
910
1032
  }
911
1033
 
912
1034
  // src/generated/accounts/recurringDelegation.ts
913
- var import_kit22 = require("@solana/kit");
1035
+ var import_kit23 = require("@solana/kit");
914
1036
  function getRecurringDelegationEncoder() {
915
- return (0, import_kit22.getStructEncoder)([
1037
+ return (0, import_kit23.getStructEncoder)([
916
1038
  ["header", getHeaderEncoder()],
917
- ["subscriptionAuthority", (0, import_kit22.getAddressEncoder)()],
918
- ["mint", (0, import_kit22.getAddressEncoder)()],
919
- ["currentPeriodStartTs", (0, import_kit22.getI64Encoder)()],
920
- ["periodLengthS", (0, import_kit22.getU64Encoder)()],
921
- ["expiryTs", (0, import_kit22.getI64Encoder)()],
922
- ["amountPerPeriod", (0, import_kit22.getU64Encoder)()],
923
- ["amountPulledInPeriod", (0, import_kit22.getU64Encoder)()]
1039
+ ["subscriptionAuthority", (0, import_kit23.getAddressEncoder)()],
1040
+ ["mint", (0, import_kit23.getAddressEncoder)()],
1041
+ ["currentPeriodStartTs", (0, import_kit23.getI64Encoder)()],
1042
+ ["periodLengthS", (0, import_kit23.getU64Encoder)()],
1043
+ ["expiryTs", (0, import_kit23.getI64Encoder)()],
1044
+ ["amountPerPeriod", (0, import_kit23.getU64Encoder)()],
1045
+ ["amountPulledInPeriod", (0, import_kit23.getU64Encoder)()]
924
1046
  ]);
925
1047
  }
926
1048
  function getRecurringDelegationDecoder() {
927
- return (0, import_kit22.getStructDecoder)([
1049
+ return (0, import_kit23.getStructDecoder)([
928
1050
  ["header", getHeaderDecoder()],
929
- ["subscriptionAuthority", (0, import_kit22.getAddressDecoder)()],
930
- ["mint", (0, import_kit22.getAddressDecoder)()],
931
- ["currentPeriodStartTs", (0, import_kit22.getI64Decoder)()],
932
- ["periodLengthS", (0, import_kit22.getU64Decoder)()],
933
- ["expiryTs", (0, import_kit22.getI64Decoder)()],
934
- ["amountPerPeriod", (0, import_kit22.getU64Decoder)()],
935
- ["amountPulledInPeriod", (0, import_kit22.getU64Decoder)()]
1051
+ ["subscriptionAuthority", (0, import_kit23.getAddressDecoder)()],
1052
+ ["mint", (0, import_kit23.getAddressDecoder)()],
1053
+ ["currentPeriodStartTs", (0, import_kit23.getI64Decoder)()],
1054
+ ["periodLengthS", (0, import_kit23.getU64Decoder)()],
1055
+ ["expiryTs", (0, import_kit23.getI64Decoder)()],
1056
+ ["amountPerPeriod", (0, import_kit23.getU64Decoder)()],
1057
+ ["amountPulledInPeriod", (0, import_kit23.getU64Decoder)()]
936
1058
  ]);
937
1059
  }
938
1060
  function getRecurringDelegationCodec() {
939
- return (0, import_kit22.combineCodec)(getRecurringDelegationEncoder(), getRecurringDelegationDecoder());
1061
+ return (0, import_kit23.combineCodec)(getRecurringDelegationEncoder(), getRecurringDelegationDecoder());
940
1062
  }
941
1063
  function decodeRecurringDelegation(encodedAccount) {
942
- return (0, import_kit22.decodeAccount)(encodedAccount, getRecurringDelegationDecoder());
1064
+ return (0, import_kit23.decodeAccount)(encodedAccount, getRecurringDelegationDecoder());
943
1065
  }
944
1066
  async function fetchRecurringDelegation(rpc, address, config) {
945
1067
  const maybeAccount = await fetchMaybeRecurringDelegation(rpc, address, config);
946
- (0, import_kit22.assertAccountExists)(maybeAccount);
1068
+ (0, import_kit23.assertAccountExists)(maybeAccount);
947
1069
  return maybeAccount;
948
1070
  }
949
1071
  async function fetchMaybeRecurringDelegation(rpc, address, config) {
950
- const maybeAccount = await (0, import_kit22.fetchEncodedAccount)(rpc, address, config);
1072
+ const maybeAccount = await (0, import_kit23.fetchEncodedAccount)(
1073
+ "rpc" in rpc ? rpc.rpc : rpc,
1074
+ typeof address === "string" ? address : address.address,
1075
+ config
1076
+ );
951
1077
  return decodeRecurringDelegation(maybeAccount);
952
1078
  }
953
1079
  async function fetchAllRecurringDelegation(rpc, addresses, config) {
954
1080
  const maybeAccounts = await fetchAllMaybeRecurringDelegation(rpc, addresses, config);
955
- (0, import_kit22.assertAccountsExist)(maybeAccounts);
1081
+ (0, import_kit23.assertAccountsExist)(maybeAccounts);
956
1082
  return maybeAccounts;
957
1083
  }
958
1084
  async function fetchAllMaybeRecurringDelegation(rpc, addresses, config) {
959
- const maybeAccounts = await (0, import_kit22.fetchEncodedAccounts)(rpc, addresses, config);
1085
+ const maybeAccounts = await (0, import_kit23.fetchEncodedAccounts)(
1086
+ "rpc" in rpc ? rpc.rpc : rpc,
1087
+ addresses.map((a) => typeof a === "string" ? a : a.address),
1088
+ config
1089
+ );
960
1090
  return maybeAccounts.map((maybeAccount) => decodeRecurringDelegation(maybeAccount));
961
1091
  }
962
1092
  async function fetchRecurringDelegationFromSeeds(rpc, seeds, config = {}) {
963
1093
  const maybeAccount = await fetchMaybeRecurringDelegationFromSeeds(rpc, seeds, config);
964
- (0, import_kit22.assertAccountExists)(maybeAccount);
1094
+ (0, import_kit23.assertAccountExists)(maybeAccount);
965
1095
  return maybeAccount;
966
1096
  }
967
1097
  async function fetchMaybeRecurringDelegationFromSeeds(rpc, seeds, config = {}) {
@@ -971,54 +1101,62 @@ async function fetchMaybeRecurringDelegationFromSeeds(rpc, seeds, config = {}) {
971
1101
  }
972
1102
 
973
1103
  // src/generated/accounts/subscriptionAuthority.ts
974
- var import_kit23 = require("@solana/kit");
1104
+ var import_kit24 = require("@solana/kit");
975
1105
  function getSubscriptionAuthorityEncoder() {
976
- return (0, import_kit23.getStructEncoder)([
977
- ["discriminator", (0, import_kit23.getU8Encoder)()],
978
- ["user", (0, import_kit23.getAddressEncoder)()],
979
- ["tokenMint", (0, import_kit23.getAddressEncoder)()],
980
- ["payer", (0, import_kit23.getAddressEncoder)()],
981
- ["bump", (0, import_kit23.getU8Encoder)()],
982
- ["initId", (0, import_kit23.getI64Encoder)()]
1106
+ return (0, import_kit24.getStructEncoder)([
1107
+ ["discriminator", (0, import_kit24.getU8Encoder)()],
1108
+ ["user", (0, import_kit24.getAddressEncoder)()],
1109
+ ["tokenMint", (0, import_kit24.getAddressEncoder)()],
1110
+ ["payer", (0, import_kit24.getAddressEncoder)()],
1111
+ ["bump", (0, import_kit24.getU8Encoder)()],
1112
+ ["initId", (0, import_kit24.getI64Encoder)()]
983
1113
  ]);
984
1114
  }
985
1115
  function getSubscriptionAuthorityDecoder() {
986
- return (0, import_kit23.getStructDecoder)([
987
- ["discriminator", (0, import_kit23.getU8Decoder)()],
988
- ["user", (0, import_kit23.getAddressDecoder)()],
989
- ["tokenMint", (0, import_kit23.getAddressDecoder)()],
990
- ["payer", (0, import_kit23.getAddressDecoder)()],
991
- ["bump", (0, import_kit23.getU8Decoder)()],
992
- ["initId", (0, import_kit23.getI64Decoder)()]
1116
+ return (0, import_kit24.getStructDecoder)([
1117
+ ["discriminator", (0, import_kit24.getU8Decoder)()],
1118
+ ["user", (0, import_kit24.getAddressDecoder)()],
1119
+ ["tokenMint", (0, import_kit24.getAddressDecoder)()],
1120
+ ["payer", (0, import_kit24.getAddressDecoder)()],
1121
+ ["bump", (0, import_kit24.getU8Decoder)()],
1122
+ ["initId", (0, import_kit24.getI64Decoder)()]
993
1123
  ]);
994
1124
  }
995
1125
  function getSubscriptionAuthorityCodec() {
996
- return (0, import_kit23.combineCodec)(getSubscriptionAuthorityEncoder(), getSubscriptionAuthorityDecoder());
1126
+ return (0, import_kit24.combineCodec)(getSubscriptionAuthorityEncoder(), getSubscriptionAuthorityDecoder());
997
1127
  }
998
1128
  function decodeSubscriptionAuthority(encodedAccount) {
999
- return (0, import_kit23.decodeAccount)(encodedAccount, getSubscriptionAuthorityDecoder());
1129
+ return (0, import_kit24.decodeAccount)(encodedAccount, getSubscriptionAuthorityDecoder());
1000
1130
  }
1001
1131
  async function fetchSubscriptionAuthority(rpc, address, config) {
1002
1132
  const maybeAccount = await fetchMaybeSubscriptionAuthority(rpc, address, config);
1003
- (0, import_kit23.assertAccountExists)(maybeAccount);
1133
+ (0, import_kit24.assertAccountExists)(maybeAccount);
1004
1134
  return maybeAccount;
1005
1135
  }
1006
1136
  async function fetchMaybeSubscriptionAuthority(rpc, address, config) {
1007
- const maybeAccount = await (0, import_kit23.fetchEncodedAccount)(rpc, address, config);
1137
+ const maybeAccount = await (0, import_kit24.fetchEncodedAccount)(
1138
+ "rpc" in rpc ? rpc.rpc : rpc,
1139
+ typeof address === "string" ? address : address.address,
1140
+ config
1141
+ );
1008
1142
  return decodeSubscriptionAuthority(maybeAccount);
1009
1143
  }
1010
1144
  async function fetchAllSubscriptionAuthority(rpc, addresses, config) {
1011
1145
  const maybeAccounts = await fetchAllMaybeSubscriptionAuthority(rpc, addresses, config);
1012
- (0, import_kit23.assertAccountsExist)(maybeAccounts);
1146
+ (0, import_kit24.assertAccountsExist)(maybeAccounts);
1013
1147
  return maybeAccounts;
1014
1148
  }
1015
1149
  async function fetchAllMaybeSubscriptionAuthority(rpc, addresses, config) {
1016
- const maybeAccounts = await (0, import_kit23.fetchEncodedAccounts)(rpc, addresses, config);
1150
+ const maybeAccounts = await (0, import_kit24.fetchEncodedAccounts)(
1151
+ "rpc" in rpc ? rpc.rpc : rpc,
1152
+ addresses.map((a) => typeof a === "string" ? a : a.address),
1153
+ config
1154
+ );
1017
1155
  return maybeAccounts.map((maybeAccount) => decodeSubscriptionAuthority(maybeAccount));
1018
1156
  }
1019
1157
  async function fetchSubscriptionAuthorityFromSeeds(rpc, seeds, config = {}) {
1020
1158
  const maybeAccount = await fetchMaybeSubscriptionAuthorityFromSeeds(rpc, seeds, config);
1021
- (0, import_kit23.assertAccountExists)(maybeAccount);
1159
+ (0, import_kit24.assertAccountExists)(maybeAccount);
1022
1160
  return maybeAccount;
1023
1161
  }
1024
1162
  async function fetchMaybeSubscriptionAuthorityFromSeeds(rpc, seeds, config = {}) {
@@ -1028,52 +1166,60 @@ async function fetchMaybeSubscriptionAuthorityFromSeeds(rpc, seeds, config = {})
1028
1166
  }
1029
1167
 
1030
1168
  // src/generated/accounts/subscriptionDelegation.ts
1031
- var import_kit24 = require("@solana/kit");
1169
+ var import_kit25 = require("@solana/kit");
1032
1170
  function getSubscriptionDelegationEncoder() {
1033
- return (0, import_kit24.getStructEncoder)([
1171
+ return (0, import_kit25.getStructEncoder)([
1034
1172
  ["header", getHeaderEncoder()],
1035
1173
  ["terms", getPlanTermsEncoder()],
1036
- ["amountPulledInPeriod", (0, import_kit24.getU64Encoder)()],
1037
- ["currentPeriodStartTs", (0, import_kit24.getI64Encoder)()],
1038
- ["expiresAtTs", (0, import_kit24.getI64Encoder)()]
1174
+ ["amountPulledInPeriod", (0, import_kit25.getU64Encoder)()],
1175
+ ["currentPeriodStartTs", (0, import_kit25.getI64Encoder)()],
1176
+ ["expiresAtTs", (0, import_kit25.getI64Encoder)()]
1039
1177
  ]);
1040
1178
  }
1041
1179
  function getSubscriptionDelegationDecoder() {
1042
- return (0, import_kit24.getStructDecoder)([
1180
+ return (0, import_kit25.getStructDecoder)([
1043
1181
  ["header", getHeaderDecoder()],
1044
1182
  ["terms", getPlanTermsDecoder()],
1045
- ["amountPulledInPeriod", (0, import_kit24.getU64Decoder)()],
1046
- ["currentPeriodStartTs", (0, import_kit24.getI64Decoder)()],
1047
- ["expiresAtTs", (0, import_kit24.getI64Decoder)()]
1183
+ ["amountPulledInPeriod", (0, import_kit25.getU64Decoder)()],
1184
+ ["currentPeriodStartTs", (0, import_kit25.getI64Decoder)()],
1185
+ ["expiresAtTs", (0, import_kit25.getI64Decoder)()]
1048
1186
  ]);
1049
1187
  }
1050
1188
  function getSubscriptionDelegationCodec() {
1051
- return (0, import_kit24.combineCodec)(getSubscriptionDelegationEncoder(), getSubscriptionDelegationDecoder());
1189
+ return (0, import_kit25.combineCodec)(getSubscriptionDelegationEncoder(), getSubscriptionDelegationDecoder());
1052
1190
  }
1053
1191
  function decodeSubscriptionDelegation(encodedAccount) {
1054
- return (0, import_kit24.decodeAccount)(encodedAccount, getSubscriptionDelegationDecoder());
1192
+ return (0, import_kit25.decodeAccount)(encodedAccount, getSubscriptionDelegationDecoder());
1055
1193
  }
1056
1194
  async function fetchSubscriptionDelegation(rpc, address, config) {
1057
1195
  const maybeAccount = await fetchMaybeSubscriptionDelegation(rpc, address, config);
1058
- (0, import_kit24.assertAccountExists)(maybeAccount);
1196
+ (0, import_kit25.assertAccountExists)(maybeAccount);
1059
1197
  return maybeAccount;
1060
1198
  }
1061
1199
  async function fetchMaybeSubscriptionDelegation(rpc, address, config) {
1062
- const maybeAccount = await (0, import_kit24.fetchEncodedAccount)(rpc, address, config);
1200
+ const maybeAccount = await (0, import_kit25.fetchEncodedAccount)(
1201
+ "rpc" in rpc ? rpc.rpc : rpc,
1202
+ typeof address === "string" ? address : address.address,
1203
+ config
1204
+ );
1063
1205
  return decodeSubscriptionDelegation(maybeAccount);
1064
1206
  }
1065
1207
  async function fetchAllSubscriptionDelegation(rpc, addresses, config) {
1066
1208
  const maybeAccounts = await fetchAllMaybeSubscriptionDelegation(rpc, addresses, config);
1067
- (0, import_kit24.assertAccountsExist)(maybeAccounts);
1209
+ (0, import_kit25.assertAccountsExist)(maybeAccounts);
1068
1210
  return maybeAccounts;
1069
1211
  }
1070
1212
  async function fetchAllMaybeSubscriptionDelegation(rpc, addresses, config) {
1071
- const maybeAccounts = await (0, import_kit24.fetchEncodedAccounts)(rpc, addresses, config);
1213
+ const maybeAccounts = await (0, import_kit25.fetchEncodedAccounts)(
1214
+ "rpc" in rpc ? rpc.rpc : rpc,
1215
+ addresses.map((a) => typeof a === "string" ? a : a.address),
1216
+ config
1217
+ );
1072
1218
  return maybeAccounts.map((maybeAccount) => decodeSubscriptionDelegation(maybeAccount));
1073
1219
  }
1074
1220
  async function fetchSubscriptionDelegationFromSeeds(rpc, seeds, config = {}) {
1075
1221
  const maybeAccount = await fetchMaybeSubscriptionDelegationFromSeeds(rpc, seeds, config);
1076
- (0, import_kit24.assertAccountExists)(maybeAccount);
1222
+ (0, import_kit25.assertAccountExists)(maybeAccount);
1077
1223
  return maybeAccount;
1078
1224
  }
1079
1225
  async function fetchMaybeSubscriptionDelegationFromSeeds(rpc, seeds, config = {}) {
@@ -1082,59 +1228,126 @@ async function fetchMaybeSubscriptionDelegationFromSeeds(rpc, seeds, config = {}
1082
1228
  return await fetchMaybeSubscriptionDelegation(rpc, address, fetchConfig);
1083
1229
  }
1084
1230
 
1231
+ // src/generated/accounts/transferContext.ts
1232
+ var import_kit26 = require("@solana/kit");
1233
+ function getTransferContextEncoder() {
1234
+ return (0, import_kit26.getStructEncoder)([
1235
+ ["discriminator", (0, import_kit26.getU8Encoder)()],
1236
+ ["version", (0, import_kit26.getU8Encoder)()],
1237
+ ["initiator", (0, import_kit26.getAddressEncoder)()],
1238
+ ["delegation", (0, import_kit26.getAddressEncoder)()],
1239
+ ["delegationKind", (0, import_kit26.getU8Encoder)()]
1240
+ ]);
1241
+ }
1242
+ function getTransferContextDecoder() {
1243
+ return (0, import_kit26.getStructDecoder)([
1244
+ ["discriminator", (0, import_kit26.getU8Decoder)()],
1245
+ ["version", (0, import_kit26.getU8Decoder)()],
1246
+ ["initiator", (0, import_kit26.getAddressDecoder)()],
1247
+ ["delegation", (0, import_kit26.getAddressDecoder)()],
1248
+ ["delegationKind", (0, import_kit26.getU8Decoder)()]
1249
+ ]);
1250
+ }
1251
+ function getTransferContextCodec() {
1252
+ return (0, import_kit26.combineCodec)(getTransferContextEncoder(), getTransferContextDecoder());
1253
+ }
1254
+ function decodeTransferContext(encodedAccount) {
1255
+ return (0, import_kit26.decodeAccount)(encodedAccount, getTransferContextDecoder());
1256
+ }
1257
+ async function fetchTransferContext(rpc, address, config) {
1258
+ const maybeAccount = await fetchMaybeTransferContext(rpc, address, config);
1259
+ (0, import_kit26.assertAccountExists)(maybeAccount);
1260
+ return maybeAccount;
1261
+ }
1262
+ async function fetchMaybeTransferContext(rpc, address, config) {
1263
+ const maybeAccount = await (0, import_kit26.fetchEncodedAccount)(
1264
+ "rpc" in rpc ? rpc.rpc : rpc,
1265
+ typeof address === "string" ? address : address.address,
1266
+ config
1267
+ );
1268
+ return decodeTransferContext(maybeAccount);
1269
+ }
1270
+ async function fetchAllTransferContext(rpc, addresses, config) {
1271
+ const maybeAccounts = await fetchAllMaybeTransferContext(rpc, addresses, config);
1272
+ (0, import_kit26.assertAccountsExist)(maybeAccounts);
1273
+ return maybeAccounts;
1274
+ }
1275
+ async function fetchAllMaybeTransferContext(rpc, addresses, config) {
1276
+ const maybeAccounts = await (0, import_kit26.fetchEncodedAccounts)(
1277
+ "rpc" in rpc ? rpc.rpc : rpc,
1278
+ addresses.map((a) => typeof a === "string" ? a : a.address),
1279
+ config
1280
+ );
1281
+ return maybeAccounts.map((maybeAccount) => decodeTransferContext(maybeAccount));
1282
+ }
1283
+ async function fetchTransferContextFromSeeds(rpc, seeds, config = {}) {
1284
+ const maybeAccount = await fetchMaybeTransferContextFromSeeds(rpc, seeds, config);
1285
+ (0, import_kit26.assertAccountExists)(maybeAccount);
1286
+ return maybeAccount;
1287
+ }
1288
+ async function fetchMaybeTransferContextFromSeeds(rpc, seeds, config = {}) {
1289
+ const { programAddress, ...fetchConfig } = config;
1290
+ const [address] = await findTransferContextPda(seeds, { programAddress });
1291
+ return await fetchMaybeTransferContext(rpc, address, fetchConfig);
1292
+ }
1293
+
1085
1294
  // src/generated/errors/subscriptions.ts
1086
- var import_kit44 = require("@solana/kit");
1295
+ var import_kit47 = require("@solana/kit");
1087
1296
 
1088
1297
  // src/generated/programs/subscriptions.ts
1089
- var import_kit43 = require("@solana/kit");
1090
- var import_program_client_core19 = require("@solana/program-client-core");
1298
+ var import_kit46 = require("@solana/kit");
1299
+ var import_program_client_core20 = require("@solana/program-client-core");
1091
1300
 
1092
1301
  // src/generated/instructions/cancelSubscription.ts
1093
- var import_kit25 = require("@solana/kit");
1302
+ var import_kit27 = require("@solana/kit");
1094
1303
  var import_program_client_core = require("@solana/program-client-core");
1095
1304
  var CANCEL_SUBSCRIPTION_DISCRIMINATOR = 12;
1096
1305
  function getCancelSubscriptionDiscriminatorBytes() {
1097
- return (0, import_kit25.getU8Encoder)().encode(CANCEL_SUBSCRIPTION_DISCRIMINATOR);
1306
+ return (0, import_kit27.getU8Encoder)().encode(CANCEL_SUBSCRIPTION_DISCRIMINATOR);
1098
1307
  }
1099
1308
  function getCancelSubscriptionInstructionDataEncoder() {
1100
- return (0, import_kit25.transformEncoder)((0, import_kit25.getStructEncoder)([["discriminator", (0, import_kit25.getU8Encoder)()]]), (value) => ({
1309
+ return (0, import_kit27.transformEncoder)((0, import_kit27.getStructEncoder)([["discriminator", (0, import_kit27.getU8Encoder)()]]), (value) => ({
1101
1310
  ...value,
1102
1311
  discriminator: CANCEL_SUBSCRIPTION_DISCRIMINATOR
1103
1312
  }));
1104
1313
  }
1105
1314
  function getCancelSubscriptionInstructionDataDecoder() {
1106
- return (0, import_kit25.getStructDecoder)([["discriminator", (0, import_kit25.getU8Decoder)()]]);
1315
+ return (0, import_kit27.getStructDecoder)([["discriminator", (0, import_kit27.getU8Decoder)()]]);
1107
1316
  }
1108
1317
  function getCancelSubscriptionInstructionDataCodec() {
1109
- return (0, import_kit25.combineCodec)(getCancelSubscriptionInstructionDataEncoder(), getCancelSubscriptionInstructionDataDecoder());
1318
+ return (0, import_kit27.combineCodec)(getCancelSubscriptionInstructionDataEncoder(), getCancelSubscriptionInstructionDataDecoder());
1110
1319
  }
1111
1320
  async function getCancelSubscriptionInstructionAsync(input, config) {
1112
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1321
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1322
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1323
+ const getAccountMeta = (0, import_program_client_core.getAccountMetaFactory)(programAddress, "programId");
1113
1324
  const originalAccounts = {
1114
- subscriber: { value: input.subscriber ?? null, isWritable: false },
1115
- planPda: { value: input.planPda ?? null, isWritable: false },
1116
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
1117
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
1118
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
1325
+ subscriber: { value: input.subscriber ?? null, isSigner: true, isWritable: false },
1326
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
1327
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
1328
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
1329
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
1119
1330
  };
1120
1331
  const accounts = originalAccounts;
1121
1332
  if (!accounts.subscriptionPda.value) {
1122
- accounts.subscriptionPda.value = await findSubscriptionDelegationPda({
1123
- planPda: (0, import_program_client_core.getAddressFromResolvedInstructionAccount)("planPda", accounts.planPda.value),
1124
- subscriber: (0, import_program_client_core.getAddressFromResolvedInstructionAccount)("subscriber", accounts.subscriber.value)
1125
- });
1333
+ accounts.subscriptionPda.value = await findSubscriptionDelegationPda(
1334
+ {
1335
+ planPda: (0, import_program_client_core.getAddressFromResolvedInstructionAccount)("planPda", accounts.planPda.value),
1336
+ subscriber: (0, import_program_client_core.getAddressFromResolvedInstructionAccount)("subscriber", accounts.subscriber.value)
1337
+ },
1338
+ { programAddress }
1339
+ );
1126
1340
  }
1127
1341
  if (!accounts.eventAuthority.value) {
1128
- accounts.eventAuthority.value = await (0, import_kit25.getProgramDerivedAddress)({
1342
+ accounts.eventAuthority.value = await (0, import_kit27.getProgramDerivedAddress)({
1129
1343
  programAddress,
1130
- seeds: [(0, import_kit25.getUtf8Encoder)().encode("event_authority")]
1344
+ seeds: [(0, import_kit27.getUtf8Encoder)().encode("event_authority")]
1131
1345
  });
1132
1346
  }
1133
1347
  if (!accounts.selfProgram.value) {
1134
1348
  accounts.selfProgram.value = programAddress;
1135
1349
  accounts.selfProgram.isWritable = false;
1136
1350
  }
1137
- const getAccountMeta = (0, import_program_client_core.getAccountMetaFactory)(programAddress, "programId");
1138
1351
  return Object.freeze({
1139
1352
  accounts: [
1140
1353
  getAccountMeta("subscriber", accounts.subscriber),
@@ -1148,20 +1361,21 @@ async function getCancelSubscriptionInstructionAsync(input, config) {
1148
1361
  });
1149
1362
  }
1150
1363
  function getCancelSubscriptionInstruction(input, config) {
1151
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1364
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1365
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1366
+ const getAccountMeta = (0, import_program_client_core.getAccountMetaFactory)(programAddress, "programId");
1152
1367
  const originalAccounts = {
1153
- subscriber: { value: input.subscriber ?? null, isWritable: false },
1154
- planPda: { value: input.planPda ?? null, isWritable: false },
1155
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
1156
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
1157
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
1368
+ subscriber: { value: input.subscriber ?? null, isSigner: true, isWritable: false },
1369
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
1370
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
1371
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
1372
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
1158
1373
  };
1159
1374
  const accounts = originalAccounts;
1160
1375
  if (!accounts.selfProgram.value) {
1161
1376
  accounts.selfProgram.value = programAddress;
1162
1377
  accounts.selfProgram.isWritable = false;
1163
1378
  }
1164
- const getAccountMeta = (0, import_program_client_core.getAccountMetaFactory)(programAddress, "programId");
1165
1379
  return Object.freeze({
1166
1380
  accounts: [
1167
1381
  getAccountMeta("subscriber", accounts.subscriber),
@@ -1176,7 +1390,7 @@ function getCancelSubscriptionInstruction(input, config) {
1176
1390
  }
1177
1391
  function parseCancelSubscriptionInstruction(instruction) {
1178
1392
  if (instruction.accounts.length < 5) {
1179
- throw new import_kit25.SolanaError(import_kit25.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1393
+ throw new import_kit27.SolanaError(import_kit27.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1180
1394
  actualAccountMetas: instruction.accounts.length,
1181
1395
  expectedAccountMetas: 5
1182
1396
  });
@@ -1201,62 +1415,66 @@ function parseCancelSubscriptionInstruction(instruction) {
1201
1415
  }
1202
1416
 
1203
1417
  // src/generated/instructions/cancelSubscriptionNow.ts
1204
- var import_kit26 = require("@solana/kit");
1418
+ var import_kit28 = require("@solana/kit");
1205
1419
  var import_program_client_core2 = require("@solana/program-client-core");
1206
1420
  var CANCEL_SUBSCRIPTION_NOW_DISCRIMINATOR = 17;
1207
1421
  function getCancelSubscriptionNowDiscriminatorBytes() {
1208
- return (0, import_kit26.getU8Encoder)().encode(CANCEL_SUBSCRIPTION_NOW_DISCRIMINATOR);
1422
+ return (0, import_kit28.getU8Encoder)().encode(CANCEL_SUBSCRIPTION_NOW_DISCRIMINATOR);
1209
1423
  }
1210
1424
  function getCancelSubscriptionNowInstructionDataEncoder() {
1211
- return (0, import_kit26.transformEncoder)(
1212
- (0, import_kit26.getStructEncoder)([
1213
- ["discriminator", (0, import_kit26.getU8Encoder)()],
1425
+ return (0, import_kit28.transformEncoder)(
1426
+ (0, import_kit28.getStructEncoder)([
1427
+ ["discriminator", (0, import_kit28.getU8Encoder)()],
1214
1428
  ["cancelSubscriptionNowData", getCancelSubscriptionNowDataEncoder()]
1215
1429
  ]),
1216
1430
  (value) => ({ ...value, discriminator: CANCEL_SUBSCRIPTION_NOW_DISCRIMINATOR })
1217
1431
  );
1218
1432
  }
1219
1433
  function getCancelSubscriptionNowInstructionDataDecoder() {
1220
- return (0, import_kit26.getStructDecoder)([
1221
- ["discriminator", (0, import_kit26.getU8Decoder)()],
1434
+ return (0, import_kit28.getStructDecoder)([
1435
+ ["discriminator", (0, import_kit28.getU8Decoder)()],
1222
1436
  ["cancelSubscriptionNowData", getCancelSubscriptionNowDataDecoder()]
1223
1437
  ]);
1224
1438
  }
1225
1439
  function getCancelSubscriptionNowInstructionDataCodec() {
1226
- return (0, import_kit26.combineCodec)(
1440
+ return (0, import_kit28.combineCodec)(
1227
1441
  getCancelSubscriptionNowInstructionDataEncoder(),
1228
1442
  getCancelSubscriptionNowInstructionDataDecoder()
1229
1443
  );
1230
1444
  }
1231
1445
  async function getCancelSubscriptionNowInstructionAsync(input, config) {
1232
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1446
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1447
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1448
+ const getAccountMeta = (0, import_program_client_core2.getAccountMetaFactory)(programAddress, "programId");
1233
1449
  const originalAccounts = {
1234
- subscriber: { value: input.subscriber ?? null, isWritable: false },
1235
- merchant: { value: input.merchant ?? null, isWritable: false },
1236
- planPda: { value: input.planPda ?? null, isWritable: false },
1237
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
1238
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
1239
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
1450
+ subscriber: { value: input.subscriber ?? null, isSigner: true, isWritable: false },
1451
+ merchant: { value: input.merchant ?? null, isSigner: true, isWritable: false },
1452
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
1453
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
1454
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
1455
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
1240
1456
  };
1241
1457
  const accounts = originalAccounts;
1242
1458
  const args = { ...input };
1243
1459
  if (!accounts.subscriptionPda.value) {
1244
- accounts.subscriptionPda.value = await findSubscriptionDelegationPda({
1245
- planPda: (0, import_program_client_core2.getAddressFromResolvedInstructionAccount)("planPda", accounts.planPda.value),
1246
- subscriber: (0, import_program_client_core2.getAddressFromResolvedInstructionAccount)("subscriber", accounts.subscriber.value)
1247
- });
1460
+ accounts.subscriptionPda.value = await findSubscriptionDelegationPda(
1461
+ {
1462
+ planPda: (0, import_program_client_core2.getAddressFromResolvedInstructionAccount)("planPda", accounts.planPda.value),
1463
+ subscriber: (0, import_program_client_core2.getAddressFromResolvedInstructionAccount)("subscriber", accounts.subscriber.value)
1464
+ },
1465
+ { programAddress }
1466
+ );
1248
1467
  }
1249
1468
  if (!accounts.eventAuthority.value) {
1250
- accounts.eventAuthority.value = await (0, import_kit26.getProgramDerivedAddress)({
1469
+ accounts.eventAuthority.value = await (0, import_kit28.getProgramDerivedAddress)({
1251
1470
  programAddress,
1252
- seeds: [(0, import_kit26.getUtf8Encoder)().encode("event_authority")]
1471
+ seeds: [(0, import_kit28.getUtf8Encoder)().encode("event_authority")]
1253
1472
  });
1254
1473
  }
1255
1474
  if (!accounts.selfProgram.value) {
1256
1475
  accounts.selfProgram.value = programAddress;
1257
1476
  accounts.selfProgram.isWritable = false;
1258
1477
  }
1259
- const getAccountMeta = (0, import_program_client_core2.getAccountMetaFactory)(programAddress, "programId");
1260
1478
  return Object.freeze({
1261
1479
  accounts: [
1262
1480
  getAccountMeta("subscriber", accounts.subscriber),
@@ -1271,14 +1489,16 @@ async function getCancelSubscriptionNowInstructionAsync(input, config) {
1271
1489
  });
1272
1490
  }
1273
1491
  function getCancelSubscriptionNowInstruction(input, config) {
1274
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1492
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1493
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1494
+ const getAccountMeta = (0, import_program_client_core2.getAccountMetaFactory)(programAddress, "programId");
1275
1495
  const originalAccounts = {
1276
- subscriber: { value: input.subscriber ?? null, isWritable: false },
1277
- merchant: { value: input.merchant ?? null, isWritable: false },
1278
- planPda: { value: input.planPda ?? null, isWritable: false },
1279
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
1280
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
1281
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
1496
+ subscriber: { value: input.subscriber ?? null, isSigner: true, isWritable: false },
1497
+ merchant: { value: input.merchant ?? null, isSigner: true, isWritable: false },
1498
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
1499
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
1500
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
1501
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
1282
1502
  };
1283
1503
  const accounts = originalAccounts;
1284
1504
  const args = { ...input };
@@ -1286,7 +1506,6 @@ function getCancelSubscriptionNowInstruction(input, config) {
1286
1506
  accounts.selfProgram.value = programAddress;
1287
1507
  accounts.selfProgram.isWritable = false;
1288
1508
  }
1289
- const getAccountMeta = (0, import_program_client_core2.getAccountMetaFactory)(programAddress, "programId");
1290
1509
  return Object.freeze({
1291
1510
  accounts: [
1292
1511
  getAccountMeta("subscriber", accounts.subscriber),
@@ -1302,7 +1521,7 @@ function getCancelSubscriptionNowInstruction(input, config) {
1302
1521
  }
1303
1522
  function parseCancelSubscriptionNowInstruction(instruction) {
1304
1523
  if (instruction.accounts.length < 6) {
1305
- throw new import_kit26.SolanaError(import_kit26.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1524
+ throw new import_kit28.SolanaError(import_kit28.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1306
1525
  actualAccountMetas: instruction.accounts.length,
1307
1526
  expectedAccountMetas: 6
1308
1527
  });
@@ -1328,36 +1547,37 @@ function parseCancelSubscriptionNowInstruction(instruction) {
1328
1547
  }
1329
1548
 
1330
1549
  // src/generated/instructions/closeSubscriptionAuthority.ts
1331
- var import_kit27 = require("@solana/kit");
1550
+ var import_kit29 = require("@solana/kit");
1332
1551
  var import_program_client_core3 = require("@solana/program-client-core");
1333
1552
  var CLOSE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR = 6;
1334
1553
  function getCloseSubscriptionAuthorityDiscriminatorBytes() {
1335
- return (0, import_kit27.getU8Encoder)().encode(CLOSE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR);
1554
+ return (0, import_kit29.getU8Encoder)().encode(CLOSE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR);
1336
1555
  }
1337
1556
  function getCloseSubscriptionAuthorityInstructionDataEncoder() {
1338
- return (0, import_kit27.transformEncoder)((0, import_kit27.getStructEncoder)([["discriminator", (0, import_kit27.getU8Encoder)()]]), (value) => ({
1557
+ return (0, import_kit29.transformEncoder)((0, import_kit29.getStructEncoder)([["discriminator", (0, import_kit29.getU8Encoder)()]]), (value) => ({
1339
1558
  ...value,
1340
1559
  discriminator: CLOSE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR
1341
1560
  }));
1342
1561
  }
1343
1562
  function getCloseSubscriptionAuthorityInstructionDataDecoder() {
1344
- return (0, import_kit27.getStructDecoder)([["discriminator", (0, import_kit27.getU8Decoder)()]]);
1563
+ return (0, import_kit29.getStructDecoder)([["discriminator", (0, import_kit29.getU8Decoder)()]]);
1345
1564
  }
1346
1565
  function getCloseSubscriptionAuthorityInstructionDataCodec() {
1347
- return (0, import_kit27.combineCodec)(
1566
+ return (0, import_kit29.combineCodec)(
1348
1567
  getCloseSubscriptionAuthorityInstructionDataEncoder(),
1349
1568
  getCloseSubscriptionAuthorityInstructionDataDecoder()
1350
1569
  );
1351
1570
  }
1352
1571
  function getCloseSubscriptionAuthorityInstruction(input, config) {
1353
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1572
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1573
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1574
+ const getAccountMeta = (0, import_program_client_core3.getAccountMetaFactory)(programAddress, "omitted");
1354
1575
  const originalAccounts = {
1355
- user: { value: input.user ?? null, isWritable: true },
1356
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: true },
1357
- receiver: { value: input.receiver ?? null, isWritable: true }
1576
+ user: { value: input.user ?? null, isSigner: true, isWritable: true },
1577
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: true },
1578
+ receiver: { value: input.receiver ?? null, isSigner: false, isWritable: true }
1358
1579
  };
1359
1580
  const accounts = originalAccounts;
1360
- const getAccountMeta = (0, import_program_client_core3.getAccountMetaFactory)(programAddress, "omitted");
1361
1581
  return Object.freeze({
1362
1582
  accounts: [
1363
1583
  getAccountMeta("user", accounts.user),
@@ -1370,7 +1590,7 @@ function getCloseSubscriptionAuthorityInstruction(input, config) {
1370
1590
  }
1371
1591
  function parseCloseSubscriptionAuthorityInstruction(instruction) {
1372
1592
  if (instruction.accounts.length < 2) {
1373
- throw new import_kit27.SolanaError(import_kit27.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1593
+ throw new import_kit29.SolanaError(import_kit29.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1374
1594
  actualAccountMetas: instruction.accounts.length,
1375
1595
  expectedAccountMetas: 2
1376
1596
  });
@@ -1399,49 +1619,50 @@ function parseCloseSubscriptionAuthorityInstruction(instruction) {
1399
1619
  }
1400
1620
 
1401
1621
  // src/generated/instructions/createFixedDelegation.ts
1402
- var import_kit28 = require("@solana/kit");
1622
+ var import_kit30 = require("@solana/kit");
1403
1623
  var import_program_client_core4 = require("@solana/program-client-core");
1404
1624
  var CREATE_FIXED_DELEGATION_DISCRIMINATOR = 1;
1405
1625
  function getCreateFixedDelegationDiscriminatorBytes() {
1406
- return (0, import_kit28.getU8Encoder)().encode(CREATE_FIXED_DELEGATION_DISCRIMINATOR);
1626
+ return (0, import_kit30.getU8Encoder)().encode(CREATE_FIXED_DELEGATION_DISCRIMINATOR);
1407
1627
  }
1408
1628
  function getCreateFixedDelegationInstructionDataEncoder() {
1409
- return (0, import_kit28.transformEncoder)(
1410
- (0, import_kit28.getStructEncoder)([
1411
- ["discriminator", (0, import_kit28.getU8Encoder)()],
1629
+ return (0, import_kit30.transformEncoder)(
1630
+ (0, import_kit30.getStructEncoder)([
1631
+ ["discriminator", (0, import_kit30.getU8Encoder)()],
1412
1632
  ["fixedDelegation", getCreateFixedDelegationDataEncoder()]
1413
1633
  ]),
1414
1634
  (value) => ({ ...value, discriminator: CREATE_FIXED_DELEGATION_DISCRIMINATOR })
1415
1635
  );
1416
1636
  }
1417
1637
  function getCreateFixedDelegationInstructionDataDecoder() {
1418
- return (0, import_kit28.getStructDecoder)([
1419
- ["discriminator", (0, import_kit28.getU8Decoder)()],
1638
+ return (0, import_kit30.getStructDecoder)([
1639
+ ["discriminator", (0, import_kit30.getU8Decoder)()],
1420
1640
  ["fixedDelegation", getCreateFixedDelegationDataDecoder()]
1421
1641
  ]);
1422
1642
  }
1423
1643
  function getCreateFixedDelegationInstructionDataCodec() {
1424
- return (0, import_kit28.combineCodec)(
1644
+ return (0, import_kit30.combineCodec)(
1425
1645
  getCreateFixedDelegationInstructionDataEncoder(),
1426
1646
  getCreateFixedDelegationInstructionDataDecoder()
1427
1647
  );
1428
1648
  }
1429
1649
  function getCreateFixedDelegationInstruction(input, config) {
1430
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1650
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1651
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1652
+ const getAccountMeta = (0, import_program_client_core4.getAccountMetaFactory)(programAddress, "omitted");
1431
1653
  const originalAccounts = {
1432
- delegator: { value: input.delegator ?? null, isWritable: true },
1433
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
1434
- delegationAccount: { value: input.delegationAccount ?? null, isWritable: true },
1435
- delegatee: { value: input.delegatee ?? null, isWritable: false },
1436
- systemProgram: { value: input.systemProgram ?? null, isWritable: false },
1437
- payer: { value: input.payer ?? null, isWritable: true }
1654
+ delegator: { value: input.delegator ?? null, isSigner: true, isWritable: true },
1655
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
1656
+ delegationAccount: { value: input.delegationAccount ?? null, isSigner: false, isWritable: true },
1657
+ delegatee: { value: input.delegatee ?? null, isSigner: false, isWritable: false },
1658
+ systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false },
1659
+ payer: { value: input.payer ?? null, isSigner: true, isWritable: true }
1438
1660
  };
1439
1661
  const accounts = originalAccounts;
1440
1662
  const args = { ...input };
1441
1663
  if (!accounts.systemProgram.value) {
1442
1664
  accounts.systemProgram.value = "11111111111111111111111111111111";
1443
1665
  }
1444
- const getAccountMeta = (0, import_program_client_core4.getAccountMetaFactory)(programAddress, "omitted");
1445
1666
  return Object.freeze({
1446
1667
  accounts: [
1447
1668
  getAccountMeta("delegator", accounts.delegator),
@@ -1457,7 +1678,7 @@ function getCreateFixedDelegationInstruction(input, config) {
1457
1678
  }
1458
1679
  function parseCreateFixedDelegationInstruction(instruction) {
1459
1680
  if (instruction.accounts.length < 5) {
1460
- throw new import_kit28.SolanaError(import_kit28.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1681
+ throw new import_kit30.SolanaError(import_kit30.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1461
1682
  actualAccountMetas: instruction.accounts.length,
1462
1683
  expectedAccountMetas: 5
1463
1684
  });
@@ -1489,39 +1710,41 @@ function parseCreateFixedDelegationInstruction(instruction) {
1489
1710
  }
1490
1711
 
1491
1712
  // src/generated/instructions/createPlan.ts
1492
- var import_kit29 = require("@solana/kit");
1713
+ var import_kit31 = require("@solana/kit");
1493
1714
  var import_program_client_core5 = require("@solana/program-client-core");
1494
1715
  var CREATE_PLAN_DISCRIMINATOR = 7;
1495
1716
  function getCreatePlanDiscriminatorBytes() {
1496
- return (0, import_kit29.getU8Encoder)().encode(CREATE_PLAN_DISCRIMINATOR);
1717
+ return (0, import_kit31.getU8Encoder)().encode(CREATE_PLAN_DISCRIMINATOR);
1497
1718
  }
1498
1719
  function getCreatePlanInstructionDataEncoder() {
1499
- return (0, import_kit29.transformEncoder)(
1500
- (0, import_kit29.getStructEncoder)([
1501
- ["discriminator", (0, import_kit29.getU8Encoder)()],
1720
+ return (0, import_kit31.transformEncoder)(
1721
+ (0, import_kit31.getStructEncoder)([
1722
+ ["discriminator", (0, import_kit31.getU8Encoder)()],
1502
1723
  ["planData", getPlanDataEncoder()]
1503
1724
  ]),
1504
1725
  (value) => ({ ...value, discriminator: CREATE_PLAN_DISCRIMINATOR })
1505
1726
  );
1506
1727
  }
1507
1728
  function getCreatePlanInstructionDataDecoder() {
1508
- return (0, import_kit29.getStructDecoder)([
1509
- ["discriminator", (0, import_kit29.getU8Decoder)()],
1729
+ return (0, import_kit31.getStructDecoder)([
1730
+ ["discriminator", (0, import_kit31.getU8Decoder)()],
1510
1731
  ["planData", getPlanDataDecoder()]
1511
1732
  ]);
1512
1733
  }
1513
1734
  function getCreatePlanInstructionDataCodec() {
1514
- return (0, import_kit29.combineCodec)(getCreatePlanInstructionDataEncoder(), getCreatePlanInstructionDataDecoder());
1735
+ return (0, import_kit31.combineCodec)(getCreatePlanInstructionDataEncoder(), getCreatePlanInstructionDataDecoder());
1515
1736
  }
1516
1737
  function getCreatePlanInstruction(input, config) {
1517
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1738
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1739
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1740
+ const getAccountMeta = (0, import_program_client_core5.getAccountMetaFactory)(programAddress, "omitted");
1518
1741
  const originalAccounts = {
1519
- merchant: { value: input.merchant ?? null, isWritable: true },
1520
- planPda: { value: input.planPda ?? null, isWritable: true },
1521
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
1522
- systemProgram: { value: input.systemProgram ?? null, isWritable: false },
1523
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
1524
- payer: { value: input.payer ?? null, isWritable: true }
1742
+ merchant: { value: input.merchant ?? null, isSigner: true, isWritable: true },
1743
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: true },
1744
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
1745
+ systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false },
1746
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
1747
+ payer: { value: input.payer ?? null, isSigner: true, isWritable: true }
1525
1748
  };
1526
1749
  const accounts = originalAccounts;
1527
1750
  const args = { ...input };
@@ -1531,7 +1754,6 @@ function getCreatePlanInstruction(input, config) {
1531
1754
  if (!accounts.tokenProgram.value) {
1532
1755
  accounts.tokenProgram.value = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1533
1756
  }
1534
- const getAccountMeta = (0, import_program_client_core5.getAccountMetaFactory)(programAddress, "omitted");
1535
1757
  return Object.freeze({
1536
1758
  accounts: [
1537
1759
  getAccountMeta("merchant", accounts.merchant),
@@ -1547,7 +1769,7 @@ function getCreatePlanInstruction(input, config) {
1547
1769
  }
1548
1770
  function parseCreatePlanInstruction(instruction) {
1549
1771
  if (instruction.accounts.length < 5) {
1550
- throw new import_kit29.SolanaError(import_kit29.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1772
+ throw new import_kit31.SolanaError(import_kit31.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1551
1773
  actualAccountMetas: instruction.accounts.length,
1552
1774
  expectedAccountMetas: 5
1553
1775
  });
@@ -1579,49 +1801,50 @@ function parseCreatePlanInstruction(instruction) {
1579
1801
  }
1580
1802
 
1581
1803
  // src/generated/instructions/createRecurringDelegation.ts
1582
- var import_kit30 = require("@solana/kit");
1804
+ var import_kit32 = require("@solana/kit");
1583
1805
  var import_program_client_core6 = require("@solana/program-client-core");
1584
1806
  var CREATE_RECURRING_DELEGATION_DISCRIMINATOR = 2;
1585
1807
  function getCreateRecurringDelegationDiscriminatorBytes() {
1586
- return (0, import_kit30.getU8Encoder)().encode(CREATE_RECURRING_DELEGATION_DISCRIMINATOR);
1808
+ return (0, import_kit32.getU8Encoder)().encode(CREATE_RECURRING_DELEGATION_DISCRIMINATOR);
1587
1809
  }
1588
1810
  function getCreateRecurringDelegationInstructionDataEncoder() {
1589
- return (0, import_kit30.transformEncoder)(
1590
- (0, import_kit30.getStructEncoder)([
1591
- ["discriminator", (0, import_kit30.getU8Encoder)()],
1811
+ return (0, import_kit32.transformEncoder)(
1812
+ (0, import_kit32.getStructEncoder)([
1813
+ ["discriminator", (0, import_kit32.getU8Encoder)()],
1592
1814
  ["recurringDelegation", getCreateRecurringDelegationDataEncoder()]
1593
1815
  ]),
1594
1816
  (value) => ({ ...value, discriminator: CREATE_RECURRING_DELEGATION_DISCRIMINATOR })
1595
1817
  );
1596
1818
  }
1597
1819
  function getCreateRecurringDelegationInstructionDataDecoder() {
1598
- return (0, import_kit30.getStructDecoder)([
1599
- ["discriminator", (0, import_kit30.getU8Decoder)()],
1820
+ return (0, import_kit32.getStructDecoder)([
1821
+ ["discriminator", (0, import_kit32.getU8Decoder)()],
1600
1822
  ["recurringDelegation", getCreateRecurringDelegationDataDecoder()]
1601
1823
  ]);
1602
1824
  }
1603
1825
  function getCreateRecurringDelegationInstructionDataCodec() {
1604
- return (0, import_kit30.combineCodec)(
1826
+ return (0, import_kit32.combineCodec)(
1605
1827
  getCreateRecurringDelegationInstructionDataEncoder(),
1606
1828
  getCreateRecurringDelegationInstructionDataDecoder()
1607
1829
  );
1608
1830
  }
1609
1831
  function getCreateRecurringDelegationInstruction(input, config) {
1610
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1832
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1833
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1834
+ const getAccountMeta = (0, import_program_client_core6.getAccountMetaFactory)(programAddress, "omitted");
1611
1835
  const originalAccounts = {
1612
- delegator: { value: input.delegator ?? null, isWritable: true },
1613
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
1614
- delegationAccount: { value: input.delegationAccount ?? null, isWritable: true },
1615
- delegatee: { value: input.delegatee ?? null, isWritable: false },
1616
- systemProgram: { value: input.systemProgram ?? null, isWritable: false },
1617
- payer: { value: input.payer ?? null, isWritable: true }
1836
+ delegator: { value: input.delegator ?? null, isSigner: true, isWritable: true },
1837
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
1838
+ delegationAccount: { value: input.delegationAccount ?? null, isSigner: false, isWritable: true },
1839
+ delegatee: { value: input.delegatee ?? null, isSigner: false, isWritable: false },
1840
+ systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false },
1841
+ payer: { value: input.payer ?? null, isSigner: true, isWritable: true }
1618
1842
  };
1619
1843
  const accounts = originalAccounts;
1620
1844
  const args = { ...input };
1621
1845
  if (!accounts.systemProgram.value) {
1622
1846
  accounts.systemProgram.value = "11111111111111111111111111111111";
1623
1847
  }
1624
- const getAccountMeta = (0, import_program_client_core6.getAccountMetaFactory)(programAddress, "omitted");
1625
1848
  return Object.freeze({
1626
1849
  accounts: [
1627
1850
  getAccountMeta("delegator", accounts.delegator),
@@ -1639,7 +1862,7 @@ function getCreateRecurringDelegationInstruction(input, config) {
1639
1862
  }
1640
1863
  function parseCreateRecurringDelegationInstruction(instruction) {
1641
1864
  if (instruction.accounts.length < 5) {
1642
- throw new import_kit30.SolanaError(import_kit30.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1865
+ throw new import_kit32.SolanaError(import_kit32.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1643
1866
  actualAccountMetas: instruction.accounts.length,
1644
1867
  expectedAccountMetas: 5
1645
1868
  });
@@ -1671,32 +1894,33 @@ function parseCreateRecurringDelegationInstruction(instruction) {
1671
1894
  }
1672
1895
 
1673
1896
  // src/generated/instructions/deletePlan.ts
1674
- var import_kit31 = require("@solana/kit");
1897
+ var import_kit33 = require("@solana/kit");
1675
1898
  var import_program_client_core7 = require("@solana/program-client-core");
1676
1899
  var DELETE_PLAN_DISCRIMINATOR = 9;
1677
1900
  function getDeletePlanDiscriminatorBytes() {
1678
- return (0, import_kit31.getU8Encoder)().encode(DELETE_PLAN_DISCRIMINATOR);
1901
+ return (0, import_kit33.getU8Encoder)().encode(DELETE_PLAN_DISCRIMINATOR);
1679
1902
  }
1680
1903
  function getDeletePlanInstructionDataEncoder() {
1681
- return (0, import_kit31.transformEncoder)((0, import_kit31.getStructEncoder)([["discriminator", (0, import_kit31.getU8Encoder)()]]), (value) => ({
1904
+ return (0, import_kit33.transformEncoder)((0, import_kit33.getStructEncoder)([["discriminator", (0, import_kit33.getU8Encoder)()]]), (value) => ({
1682
1905
  ...value,
1683
1906
  discriminator: DELETE_PLAN_DISCRIMINATOR
1684
1907
  }));
1685
1908
  }
1686
1909
  function getDeletePlanInstructionDataDecoder() {
1687
- return (0, import_kit31.getStructDecoder)([["discriminator", (0, import_kit31.getU8Decoder)()]]);
1910
+ return (0, import_kit33.getStructDecoder)([["discriminator", (0, import_kit33.getU8Decoder)()]]);
1688
1911
  }
1689
1912
  function getDeletePlanInstructionDataCodec() {
1690
- return (0, import_kit31.combineCodec)(getDeletePlanInstructionDataEncoder(), getDeletePlanInstructionDataDecoder());
1913
+ return (0, import_kit33.combineCodec)(getDeletePlanInstructionDataEncoder(), getDeletePlanInstructionDataDecoder());
1691
1914
  }
1692
1915
  function getDeletePlanInstruction(input, config) {
1693
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1916
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1917
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1918
+ const getAccountMeta = (0, import_program_client_core7.getAccountMetaFactory)(programAddress, "programId");
1694
1919
  const originalAccounts = {
1695
- owner: { value: input.owner ?? null, isWritable: true },
1696
- planPda: { value: input.planPda ?? null, isWritable: true }
1920
+ owner: { value: input.owner ?? null, isSigner: true, isWritable: true },
1921
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: true }
1697
1922
  };
1698
1923
  const accounts = originalAccounts;
1699
- const getAccountMeta = (0, import_program_client_core7.getAccountMetaFactory)(programAddress, "programId");
1700
1924
  return Object.freeze({
1701
1925
  accounts: [getAccountMeta("owner", accounts.owner), getAccountMeta("planPda", accounts.planPda)],
1702
1926
  data: getDeletePlanInstructionDataEncoder().encode({}),
@@ -1705,7 +1929,7 @@ function getDeletePlanInstruction(input, config) {
1705
1929
  }
1706
1930
  function parseDeletePlanInstruction(instruction) {
1707
1931
  if (instruction.accounts.length < 2) {
1708
- throw new import_kit31.SolanaError(import_kit31.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1932
+ throw new import_kit33.SolanaError(import_kit33.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1709
1933
  actualAccountMetas: instruction.accounts.length,
1710
1934
  expectedAccountMetas: 2
1711
1935
  });
@@ -1724,49 +1948,53 @@ function parseDeletePlanInstruction(instruction) {
1724
1948
  }
1725
1949
 
1726
1950
  // src/generated/instructions/initSubscriptionAuthority.ts
1727
- var import_kit32 = require("@solana/kit");
1951
+ var import_kit34 = require("@solana/kit");
1728
1952
  var import_program_client_core8 = require("@solana/program-client-core");
1729
1953
  var INIT_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR = 0;
1730
1954
  function getInitSubscriptionAuthorityDiscriminatorBytes() {
1731
- return (0, import_kit32.getU8Encoder)().encode(INIT_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR);
1955
+ return (0, import_kit34.getU8Encoder)().encode(INIT_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR);
1732
1956
  }
1733
1957
  function getInitSubscriptionAuthorityInstructionDataEncoder() {
1734
- return (0, import_kit32.transformEncoder)((0, import_kit32.getStructEncoder)([["discriminator", (0, import_kit32.getU8Encoder)()]]), (value) => ({
1958
+ return (0, import_kit34.transformEncoder)((0, import_kit34.getStructEncoder)([["discriminator", (0, import_kit34.getU8Encoder)()]]), (value) => ({
1735
1959
  ...value,
1736
1960
  discriminator: INIT_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR
1737
1961
  }));
1738
1962
  }
1739
1963
  function getInitSubscriptionAuthorityInstructionDataDecoder() {
1740
- return (0, import_kit32.getStructDecoder)([["discriminator", (0, import_kit32.getU8Decoder)()]]);
1964
+ return (0, import_kit34.getStructDecoder)([["discriminator", (0, import_kit34.getU8Decoder)()]]);
1741
1965
  }
1742
1966
  function getInitSubscriptionAuthorityInstructionDataCodec() {
1743
- return (0, import_kit32.combineCodec)(
1967
+ return (0, import_kit34.combineCodec)(
1744
1968
  getInitSubscriptionAuthorityInstructionDataEncoder(),
1745
1969
  getInitSubscriptionAuthorityInstructionDataDecoder()
1746
1970
  );
1747
1971
  }
1748
1972
  async function getInitSubscriptionAuthorityInstructionAsync(input, config) {
1749
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1973
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
1974
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
1975
+ const getAccountMeta = (0, import_program_client_core8.getAccountMetaFactory)(programAddress, "omitted");
1750
1976
  const originalAccounts = {
1751
- owner: { value: input.owner ?? null, isWritable: true },
1752
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: true },
1753
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
1754
- userAta: { value: input.userAta ?? null, isWritable: true },
1755
- systemProgram: { value: input.systemProgram ?? null, isWritable: false },
1756
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
1757
- payer: { value: input.payer ?? null, isWritable: true }
1977
+ owner: { value: input.owner ?? null, isSigner: true, isWritable: true },
1978
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: true },
1979
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
1980
+ userAta: { value: input.userAta ?? null, isSigner: false, isWritable: true },
1981
+ systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false },
1982
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
1983
+ payer: { value: input.payer ?? null, isSigner: true, isWritable: true }
1758
1984
  };
1759
1985
  const accounts = originalAccounts;
1760
1986
  if (!accounts.subscriptionAuthority.value) {
1761
- accounts.subscriptionAuthority.value = await findSubscriptionAuthorityPda({
1762
- user: (0, import_program_client_core8.getAddressFromResolvedInstructionAccount)("owner", accounts.owner.value),
1763
- tokenMint: (0, import_program_client_core8.getAddressFromResolvedInstructionAccount)("tokenMint", accounts.tokenMint.value)
1764
- });
1987
+ accounts.subscriptionAuthority.value = await findSubscriptionAuthorityPda(
1988
+ {
1989
+ user: (0, import_program_client_core8.getAddressFromResolvedInstructionAccount)("owner", accounts.owner.value),
1990
+ tokenMint: (0, import_program_client_core8.getAddressFromResolvedInstructionAccount)("tokenMint", accounts.tokenMint.value)
1991
+ },
1992
+ { programAddress }
1993
+ );
1765
1994
  }
1766
1995
  if (!accounts.systemProgram.value) {
1767
1996
  accounts.systemProgram.value = "11111111111111111111111111111111";
1768
1997
  }
1769
- const getAccountMeta = (0, import_program_client_core8.getAccountMetaFactory)(programAddress, "omitted");
1770
1998
  return Object.freeze({
1771
1999
  accounts: [
1772
2000
  getAccountMeta("owner", accounts.owner),
@@ -1782,40 +2010,112 @@ async function getInitSubscriptionAuthorityInstructionAsync(input, config) {
1782
2010
  });
1783
2011
  }
1784
2012
  function getInitSubscriptionAuthorityInstruction(input, config) {
1785
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2013
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2014
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2015
+ const getAccountMeta = (0, import_program_client_core8.getAccountMetaFactory)(programAddress, "omitted");
1786
2016
  const originalAccounts = {
1787
- owner: { value: input.owner ?? null, isWritable: true },
1788
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: true },
1789
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
1790
- userAta: { value: input.userAta ?? null, isWritable: true },
1791
- systemProgram: { value: input.systemProgram ?? null, isWritable: false },
1792
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
1793
- payer: { value: input.payer ?? null, isWritable: true }
2017
+ owner: { value: input.owner ?? null, isSigner: true, isWritable: true },
2018
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: true },
2019
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
2020
+ userAta: { value: input.userAta ?? null, isSigner: false, isWritable: true },
2021
+ systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false },
2022
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
2023
+ payer: { value: input.payer ?? null, isSigner: true, isWritable: true }
1794
2024
  };
1795
2025
  const accounts = originalAccounts;
1796
2026
  if (!accounts.systemProgram.value) {
1797
2027
  accounts.systemProgram.value = "11111111111111111111111111111111";
1798
2028
  }
1799
- const getAccountMeta = (0, import_program_client_core8.getAccountMetaFactory)(programAddress, "omitted");
1800
2029
  return Object.freeze({
1801
2030
  accounts: [
1802
- getAccountMeta("owner", accounts.owner),
1803
- getAccountMeta("subscriptionAuthority", accounts.subscriptionAuthority),
1804
- getAccountMeta("tokenMint", accounts.tokenMint),
1805
- getAccountMeta("userAta", accounts.userAta),
1806
- getAccountMeta("systemProgram", accounts.systemProgram),
1807
- getAccountMeta("tokenProgram", accounts.tokenProgram),
1808
- getAccountMeta("payer", accounts.payer)
1809
- ].filter((x) => x !== void 0),
1810
- data: getInitSubscriptionAuthorityInstructionDataEncoder().encode({}),
2031
+ getAccountMeta("owner", accounts.owner),
2032
+ getAccountMeta("subscriptionAuthority", accounts.subscriptionAuthority),
2033
+ getAccountMeta("tokenMint", accounts.tokenMint),
2034
+ getAccountMeta("userAta", accounts.userAta),
2035
+ getAccountMeta("systemProgram", accounts.systemProgram),
2036
+ getAccountMeta("tokenProgram", accounts.tokenProgram),
2037
+ getAccountMeta("payer", accounts.payer)
2038
+ ].filter((x) => x !== void 0),
2039
+ data: getInitSubscriptionAuthorityInstructionDataEncoder().encode({}),
2040
+ programAddress
2041
+ });
2042
+ }
2043
+ function parseInitSubscriptionAuthorityInstruction(instruction) {
2044
+ if (instruction.accounts.length < 6) {
2045
+ throw new import_kit34.SolanaError(import_kit34.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2046
+ actualAccountMetas: instruction.accounts.length,
2047
+ expectedAccountMetas: 6
2048
+ });
2049
+ }
2050
+ let accountIndex = 0;
2051
+ const getNextAccount = () => {
2052
+ const accountMeta = instruction.accounts[accountIndex];
2053
+ accountIndex += 1;
2054
+ return accountMeta;
2055
+ };
2056
+ let optionalAccountsRemaining = instruction.accounts.length - 6;
2057
+ const getNextOptionalAccount = () => {
2058
+ if (optionalAccountsRemaining === 0) return void 0;
2059
+ optionalAccountsRemaining -= 1;
2060
+ return getNextAccount();
2061
+ };
2062
+ return {
2063
+ programAddress: instruction.programAddress,
2064
+ accounts: {
2065
+ owner: getNextAccount(),
2066
+ subscriptionAuthority: getNextAccount(),
2067
+ tokenMint: getNextAccount(),
2068
+ userAta: getNextAccount(),
2069
+ systemProgram: getNextAccount(),
2070
+ tokenProgram: getNextAccount(),
2071
+ payer: getNextOptionalAccount()
2072
+ },
2073
+ data: getInitSubscriptionAuthorityInstructionDataDecoder().decode(instruction.data)
2074
+ };
2075
+ }
2076
+
2077
+ // src/generated/instructions/reclaimExcessRent.ts
2078
+ var import_kit35 = require("@solana/kit");
2079
+ var import_program_client_core9 = require("@solana/program-client-core");
2080
+ var RECLAIM_EXCESS_RENT_DISCRIMINATOR = 18;
2081
+ function getReclaimExcessRentDiscriminatorBytes() {
2082
+ return (0, import_kit35.getU8Encoder)().encode(RECLAIM_EXCESS_RENT_DISCRIMINATOR);
2083
+ }
2084
+ function getReclaimExcessRentInstructionDataEncoder() {
2085
+ return (0, import_kit35.transformEncoder)((0, import_kit35.getStructEncoder)([["discriminator", (0, import_kit35.getU8Encoder)()]]), (value) => ({
2086
+ ...value,
2087
+ discriminator: RECLAIM_EXCESS_RENT_DISCRIMINATOR
2088
+ }));
2089
+ }
2090
+ function getReclaimExcessRentInstructionDataDecoder() {
2091
+ return (0, import_kit35.getStructDecoder)([["discriminator", (0, import_kit35.getU8Decoder)()]]);
2092
+ }
2093
+ function getReclaimExcessRentInstructionDataCodec() {
2094
+ return (0, import_kit35.combineCodec)(getReclaimExcessRentInstructionDataEncoder(), getReclaimExcessRentInstructionDataDecoder());
2095
+ }
2096
+ function getReclaimExcessRentInstruction(input, config) {
2097
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2098
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2099
+ const getAccountMeta = (0, import_program_client_core9.getAccountMetaFactory)(programAddress, "programId");
2100
+ const originalAccounts = {
2101
+ targetAccount: { value: input.targetAccount ?? null, isSigner: false, isWritable: true },
2102
+ receiver: { value: input.receiver ?? null, isSigner: false, isWritable: true }
2103
+ };
2104
+ const accounts = originalAccounts;
2105
+ return Object.freeze({
2106
+ accounts: [
2107
+ getAccountMeta("targetAccount", accounts.targetAccount),
2108
+ getAccountMeta("receiver", accounts.receiver)
2109
+ ],
2110
+ data: getReclaimExcessRentInstructionDataEncoder().encode({}),
1811
2111
  programAddress
1812
2112
  });
1813
2113
  }
1814
- function parseInitSubscriptionAuthorityInstruction(instruction) {
1815
- if (instruction.accounts.length < 6) {
1816
- throw new import_kit32.SolanaError(import_kit32.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2114
+ function parseReclaimExcessRentInstruction(instruction) {
2115
+ if (instruction.accounts.length < 2) {
2116
+ throw new import_kit35.SolanaError(import_kit35.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1817
2117
  actualAccountMetas: instruction.accounts.length,
1818
- expectedAccountMetas: 6
2118
+ expectedAccountMetas: 2
1819
2119
  });
1820
2120
  }
1821
2121
  let accountIndex = 0;
@@ -1824,81 +2124,71 @@ function parseInitSubscriptionAuthorityInstruction(instruction) {
1824
2124
  accountIndex += 1;
1825
2125
  return accountMeta;
1826
2126
  };
1827
- let optionalAccountsRemaining = instruction.accounts.length - 6;
1828
- const getNextOptionalAccount = () => {
1829
- if (optionalAccountsRemaining === 0) return void 0;
1830
- optionalAccountsRemaining -= 1;
1831
- return getNextAccount();
1832
- };
1833
2127
  return {
1834
2128
  programAddress: instruction.programAddress,
1835
- accounts: {
1836
- owner: getNextAccount(),
1837
- subscriptionAuthority: getNextAccount(),
1838
- tokenMint: getNextAccount(),
1839
- userAta: getNextAccount(),
1840
- systemProgram: getNextAccount(),
1841
- tokenProgram: getNextAccount(),
1842
- payer: getNextOptionalAccount()
1843
- },
1844
- data: getInitSubscriptionAuthorityInstructionDataDecoder().decode(instruction.data)
2129
+ accounts: { targetAccount: getNextAccount(), receiver: getNextAccount() },
2130
+ data: getReclaimExcessRentInstructionDataDecoder().decode(instruction.data)
1845
2131
  };
1846
2132
  }
1847
2133
 
1848
2134
  // src/generated/instructions/resumeSubscription.ts
1849
- var import_kit33 = require("@solana/kit");
1850
- var import_program_client_core9 = require("@solana/program-client-core");
2135
+ var import_kit36 = require("@solana/kit");
2136
+ var import_program_client_core10 = require("@solana/program-client-core");
1851
2137
  var RESUME_SUBSCRIPTION_DISCRIMINATOR = 13;
1852
2138
  function getResumeSubscriptionDiscriminatorBytes() {
1853
- return (0, import_kit33.getU8Encoder)().encode(RESUME_SUBSCRIPTION_DISCRIMINATOR);
2139
+ return (0, import_kit36.getU8Encoder)().encode(RESUME_SUBSCRIPTION_DISCRIMINATOR);
1854
2140
  }
1855
2141
  function getResumeSubscriptionInstructionDataEncoder() {
1856
- return (0, import_kit33.transformEncoder)(
1857
- (0, import_kit33.getStructEncoder)([
1858
- ["discriminator", (0, import_kit33.getU8Encoder)()],
2142
+ return (0, import_kit36.transformEncoder)(
2143
+ (0, import_kit36.getStructEncoder)([
2144
+ ["discriminator", (0, import_kit36.getU8Encoder)()],
1859
2145
  ["resumeData", getResumeDataEncoder()]
1860
2146
  ]),
1861
2147
  (value) => ({ ...value, discriminator: RESUME_SUBSCRIPTION_DISCRIMINATOR })
1862
2148
  );
1863
2149
  }
1864
2150
  function getResumeSubscriptionInstructionDataDecoder() {
1865
- return (0, import_kit33.getStructDecoder)([
1866
- ["discriminator", (0, import_kit33.getU8Decoder)()],
2151
+ return (0, import_kit36.getStructDecoder)([
2152
+ ["discriminator", (0, import_kit36.getU8Decoder)()],
1867
2153
  ["resumeData", getResumeDataDecoder()]
1868
2154
  ]);
1869
2155
  }
1870
2156
  function getResumeSubscriptionInstructionDataCodec() {
1871
- return (0, import_kit33.combineCodec)(getResumeSubscriptionInstructionDataEncoder(), getResumeSubscriptionInstructionDataDecoder());
2157
+ return (0, import_kit36.combineCodec)(getResumeSubscriptionInstructionDataEncoder(), getResumeSubscriptionInstructionDataDecoder());
1872
2158
  }
1873
2159
  async function getResumeSubscriptionInstructionAsync(input, config) {
1874
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2160
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2161
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2162
+ const getAccountMeta = (0, import_program_client_core10.getAccountMetaFactory)(programAddress, "programId");
1875
2163
  const originalAccounts = {
1876
- subscriber: { value: input.subscriber ?? null, isWritable: false },
1877
- planPda: { value: input.planPda ?? null, isWritable: false },
1878
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
1879
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
1880
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
1881
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
2164
+ subscriber: { value: input.subscriber ?? null, isSigner: true, isWritable: false },
2165
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
2166
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
2167
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
2168
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
2169
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
1882
2170
  };
1883
2171
  const accounts = originalAccounts;
1884
2172
  const args = { ...input };
1885
2173
  if (!accounts.subscriptionPda.value) {
1886
- accounts.subscriptionPda.value = await findSubscriptionDelegationPda({
1887
- planPda: (0, import_program_client_core9.getAddressFromResolvedInstructionAccount)("planPda", accounts.planPda.value),
1888
- subscriber: (0, import_program_client_core9.getAddressFromResolvedInstructionAccount)("subscriber", accounts.subscriber.value)
1889
- });
2174
+ accounts.subscriptionPda.value = await findSubscriptionDelegationPda(
2175
+ {
2176
+ planPda: (0, import_program_client_core10.getAddressFromResolvedInstructionAccount)("planPda", accounts.planPda.value),
2177
+ subscriber: (0, import_program_client_core10.getAddressFromResolvedInstructionAccount)("subscriber", accounts.subscriber.value)
2178
+ },
2179
+ { programAddress }
2180
+ );
1890
2181
  }
1891
2182
  if (!accounts.eventAuthority.value) {
1892
- accounts.eventAuthority.value = await (0, import_kit33.getProgramDerivedAddress)({
2183
+ accounts.eventAuthority.value = await (0, import_kit36.getProgramDerivedAddress)({
1893
2184
  programAddress,
1894
- seeds: [(0, import_kit33.getUtf8Encoder)().encode("event_authority")]
2185
+ seeds: [(0, import_kit36.getUtf8Encoder)().encode("event_authority")]
1895
2186
  });
1896
2187
  }
1897
2188
  if (!accounts.selfProgram.value) {
1898
2189
  accounts.selfProgram.value = programAddress;
1899
2190
  accounts.selfProgram.isWritable = false;
1900
2191
  }
1901
- const getAccountMeta = (0, import_program_client_core9.getAccountMetaFactory)(programAddress, "programId");
1902
2192
  return Object.freeze({
1903
2193
  accounts: [
1904
2194
  getAccountMeta("subscriber", accounts.subscriber),
@@ -1913,14 +2203,16 @@ async function getResumeSubscriptionInstructionAsync(input, config) {
1913
2203
  });
1914
2204
  }
1915
2205
  function getResumeSubscriptionInstruction(input, config) {
1916
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2206
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2207
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2208
+ const getAccountMeta = (0, import_program_client_core10.getAccountMetaFactory)(programAddress, "programId");
1917
2209
  const originalAccounts = {
1918
- subscriber: { value: input.subscriber ?? null, isWritable: false },
1919
- planPda: { value: input.planPda ?? null, isWritable: false },
1920
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
1921
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
1922
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
1923
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
2210
+ subscriber: { value: input.subscriber ?? null, isSigner: true, isWritable: false },
2211
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
2212
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
2213
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
2214
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
2215
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
1924
2216
  };
1925
2217
  const accounts = originalAccounts;
1926
2218
  const args = { ...input };
@@ -1928,7 +2220,6 @@ function getResumeSubscriptionInstruction(input, config) {
1928
2220
  accounts.selfProgram.value = programAddress;
1929
2221
  accounts.selfProgram.isWritable = false;
1930
2222
  }
1931
- const getAccountMeta = (0, import_program_client_core9.getAccountMetaFactory)(programAddress, "programId");
1932
2223
  return Object.freeze({
1933
2224
  accounts: [
1934
2225
  getAccountMeta("subscriber", accounts.subscriber),
@@ -1944,7 +2235,7 @@ function getResumeSubscriptionInstruction(input, config) {
1944
2235
  }
1945
2236
  function parseResumeSubscriptionInstruction(instruction) {
1946
2237
  if (instruction.accounts.length < 6) {
1947
- throw new import_kit33.SolanaError(import_kit33.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2238
+ throw new import_kit36.SolanaError(import_kit36.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
1948
2239
  actualAccountMetas: instruction.accounts.length,
1949
2240
  expectedAccountMetas: 6
1950
2241
  });
@@ -1970,36 +2261,37 @@ function parseResumeSubscriptionInstruction(instruction) {
1970
2261
  }
1971
2262
 
1972
2263
  // src/generated/instructions/revokeAbandonedDelegation.ts
1973
- var import_kit34 = require("@solana/kit");
1974
- var import_program_client_core10 = require("@solana/program-client-core");
2264
+ var import_kit37 = require("@solana/kit");
2265
+ var import_program_client_core11 = require("@solana/program-client-core");
1975
2266
  var REVOKE_ABANDONED_DELEGATION_DISCRIMINATOR = 15;
1976
2267
  function getRevokeAbandonedDelegationDiscriminatorBytes() {
1977
- return (0, import_kit34.getU8Encoder)().encode(REVOKE_ABANDONED_DELEGATION_DISCRIMINATOR);
2268
+ return (0, import_kit37.getU8Encoder)().encode(REVOKE_ABANDONED_DELEGATION_DISCRIMINATOR);
1978
2269
  }
1979
2270
  function getRevokeAbandonedDelegationInstructionDataEncoder() {
1980
- return (0, import_kit34.transformEncoder)((0, import_kit34.getStructEncoder)([["discriminator", (0, import_kit34.getU8Encoder)()]]), (value) => ({
2271
+ return (0, import_kit37.transformEncoder)((0, import_kit37.getStructEncoder)([["discriminator", (0, import_kit37.getU8Encoder)()]]), (value) => ({
1981
2272
  ...value,
1982
2273
  discriminator: REVOKE_ABANDONED_DELEGATION_DISCRIMINATOR
1983
2274
  }));
1984
2275
  }
1985
2276
  function getRevokeAbandonedDelegationInstructionDataDecoder() {
1986
- return (0, import_kit34.getStructDecoder)([["discriminator", (0, import_kit34.getU8Decoder)()]]);
2277
+ return (0, import_kit37.getStructDecoder)([["discriminator", (0, import_kit37.getU8Decoder)()]]);
1987
2278
  }
1988
2279
  function getRevokeAbandonedDelegationInstructionDataCodec() {
1989
- return (0, import_kit34.combineCodec)(
2280
+ return (0, import_kit37.combineCodec)(
1990
2281
  getRevokeAbandonedDelegationInstructionDataEncoder(),
1991
2282
  getRevokeAbandonedDelegationInstructionDataDecoder()
1992
2283
  );
1993
2284
  }
1994
2285
  function getRevokeAbandonedDelegationInstruction(input, config) {
1995
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2286
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2287
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2288
+ const getAccountMeta = (0, import_program_client_core11.getAccountMetaFactory)(programAddress, "programId");
1996
2289
  const originalAccounts = {
1997
- payer: { value: input.payer ?? null, isWritable: true },
1998
- delegationAccount: { value: input.delegationAccount ?? null, isWritable: true },
1999
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false }
2290
+ payer: { value: input.payer ?? null, isSigner: true, isWritable: true },
2291
+ delegationAccount: { value: input.delegationAccount ?? null, isSigner: false, isWritable: true },
2292
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false }
2000
2293
  };
2001
2294
  const accounts = originalAccounts;
2002
- const getAccountMeta = (0, import_program_client_core10.getAccountMetaFactory)(programAddress, "programId");
2003
2295
  return Object.freeze({
2004
2296
  accounts: [
2005
2297
  getAccountMeta("payer", accounts.payer),
@@ -2012,7 +2304,7 @@ function getRevokeAbandonedDelegationInstruction(input, config) {
2012
2304
  }
2013
2305
  function parseRevokeAbandonedDelegationInstruction(instruction) {
2014
2306
  if (instruction.accounts.length < 3) {
2015
- throw new import_kit34.SolanaError(import_kit34.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2307
+ throw new import_kit37.SolanaError(import_kit37.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2016
2308
  actualAccountMetas: instruction.accounts.length,
2017
2309
  expectedAccountMetas: 3
2018
2310
  });
@@ -2035,37 +2327,38 @@ function parseRevokeAbandonedDelegationInstruction(instruction) {
2035
2327
  }
2036
2328
 
2037
2329
  // src/generated/instructions/revokeAbandonedSubscription.ts
2038
- var import_kit35 = require("@solana/kit");
2039
- var import_program_client_core11 = require("@solana/program-client-core");
2330
+ var import_kit38 = require("@solana/kit");
2331
+ var import_program_client_core12 = require("@solana/program-client-core");
2040
2332
  var REVOKE_ABANDONED_SUBSCRIPTION_DISCRIMINATOR = 16;
2041
2333
  function getRevokeAbandonedSubscriptionDiscriminatorBytes() {
2042
- return (0, import_kit35.getU8Encoder)().encode(REVOKE_ABANDONED_SUBSCRIPTION_DISCRIMINATOR);
2334
+ return (0, import_kit38.getU8Encoder)().encode(REVOKE_ABANDONED_SUBSCRIPTION_DISCRIMINATOR);
2043
2335
  }
2044
2336
  function getRevokeAbandonedSubscriptionInstructionDataEncoder() {
2045
- return (0, import_kit35.transformEncoder)((0, import_kit35.getStructEncoder)([["discriminator", (0, import_kit35.getU8Encoder)()]]), (value) => ({
2337
+ return (0, import_kit38.transformEncoder)((0, import_kit38.getStructEncoder)([["discriminator", (0, import_kit38.getU8Encoder)()]]), (value) => ({
2046
2338
  ...value,
2047
2339
  discriminator: REVOKE_ABANDONED_SUBSCRIPTION_DISCRIMINATOR
2048
2340
  }));
2049
2341
  }
2050
2342
  function getRevokeAbandonedSubscriptionInstructionDataDecoder() {
2051
- return (0, import_kit35.getStructDecoder)([["discriminator", (0, import_kit35.getU8Decoder)()]]);
2343
+ return (0, import_kit38.getStructDecoder)([["discriminator", (0, import_kit38.getU8Decoder)()]]);
2052
2344
  }
2053
2345
  function getRevokeAbandonedSubscriptionInstructionDataCodec() {
2054
- return (0, import_kit35.combineCodec)(
2346
+ return (0, import_kit38.combineCodec)(
2055
2347
  getRevokeAbandonedSubscriptionInstructionDataEncoder(),
2056
2348
  getRevokeAbandonedSubscriptionInstructionDataDecoder()
2057
2349
  );
2058
2350
  }
2059
2351
  function getRevokeAbandonedSubscriptionInstruction(input, config) {
2060
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2352
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2353
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2354
+ const getAccountMeta = (0, import_program_client_core12.getAccountMetaFactory)(programAddress, "programId");
2061
2355
  const originalAccounts = {
2062
- payer: { value: input.payer ?? null, isWritable: true },
2063
- subscriptionAccount: { value: input.subscriptionAccount ?? null, isWritable: true },
2064
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
2065
- planPda: { value: input.planPda ?? null, isWritable: false }
2356
+ payer: { value: input.payer ?? null, isSigner: true, isWritable: true },
2357
+ subscriptionAccount: { value: input.subscriptionAccount ?? null, isSigner: false, isWritable: true },
2358
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
2359
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false }
2066
2360
  };
2067
2361
  const accounts = originalAccounts;
2068
- const getAccountMeta = (0, import_program_client_core11.getAccountMetaFactory)(programAddress, "programId");
2069
2362
  return Object.freeze({
2070
2363
  accounts: [
2071
2364
  getAccountMeta("payer", accounts.payer),
@@ -2079,7 +2372,7 @@ function getRevokeAbandonedSubscriptionInstruction(input, config) {
2079
2372
  }
2080
2373
  function parseRevokeAbandonedSubscriptionInstruction(instruction) {
2081
2374
  if (instruction.accounts.length < 4) {
2082
- throw new import_kit35.SolanaError(import_kit35.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2375
+ throw new import_kit38.SolanaError(import_kit38.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2083
2376
  actualAccountMetas: instruction.accounts.length,
2084
2377
  expectedAccountMetas: 4
2085
2378
  });
@@ -2103,32 +2396,33 @@ function parseRevokeAbandonedSubscriptionInstruction(instruction) {
2103
2396
  }
2104
2397
 
2105
2398
  // src/generated/instructions/revokeDelegation.ts
2106
- var import_kit36 = require("@solana/kit");
2107
- var import_program_client_core12 = require("@solana/program-client-core");
2399
+ var import_kit39 = require("@solana/kit");
2400
+ var import_program_client_core13 = require("@solana/program-client-core");
2108
2401
  var REVOKE_DELEGATION_DISCRIMINATOR = 3;
2109
2402
  function getRevokeDelegationDiscriminatorBytes() {
2110
- return (0, import_kit36.getU8Encoder)().encode(REVOKE_DELEGATION_DISCRIMINATOR);
2403
+ return (0, import_kit39.getU8Encoder)().encode(REVOKE_DELEGATION_DISCRIMINATOR);
2111
2404
  }
2112
2405
  function getRevokeDelegationInstructionDataEncoder() {
2113
- return (0, import_kit36.transformEncoder)((0, import_kit36.getStructEncoder)([["discriminator", (0, import_kit36.getU8Encoder)()]]), (value) => ({
2406
+ return (0, import_kit39.transformEncoder)((0, import_kit39.getStructEncoder)([["discriminator", (0, import_kit39.getU8Encoder)()]]), (value) => ({
2114
2407
  ...value,
2115
2408
  discriminator: REVOKE_DELEGATION_DISCRIMINATOR
2116
2409
  }));
2117
2410
  }
2118
2411
  function getRevokeDelegationInstructionDataDecoder() {
2119
- return (0, import_kit36.getStructDecoder)([["discriminator", (0, import_kit36.getU8Decoder)()]]);
2412
+ return (0, import_kit39.getStructDecoder)([["discriminator", (0, import_kit39.getU8Decoder)()]]);
2120
2413
  }
2121
2414
  function getRevokeDelegationInstructionDataCodec() {
2122
- return (0, import_kit36.combineCodec)(getRevokeDelegationInstructionDataEncoder(), getRevokeDelegationInstructionDataDecoder());
2415
+ return (0, import_kit39.combineCodec)(getRevokeDelegationInstructionDataEncoder(), getRevokeDelegationInstructionDataDecoder());
2123
2416
  }
2124
2417
  function getRevokeDelegationInstruction(input, config) {
2125
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2418
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2419
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2420
+ const getAccountMeta = (0, import_program_client_core13.getAccountMetaFactory)(programAddress, "programId");
2126
2421
  const originalAccounts = {
2127
- authority: { value: input.authority ?? null, isWritable: true },
2128
- delegationAccount: { value: input.delegationAccount ?? null, isWritable: true }
2422
+ authority: { value: input.authority ?? null, isSigner: true, isWritable: true },
2423
+ delegationAccount: { value: input.delegationAccount ?? null, isSigner: false, isWritable: true }
2129
2424
  };
2130
2425
  const accounts = originalAccounts;
2131
- const getAccountMeta = (0, import_program_client_core12.getAccountMetaFactory)(programAddress, "programId");
2132
2426
  return Object.freeze({
2133
2427
  accounts: [
2134
2428
  getAccountMeta("authority", accounts.authority),
@@ -2140,7 +2434,7 @@ function getRevokeDelegationInstruction(input, config) {
2140
2434
  }
2141
2435
  function parseRevokeDelegationInstruction(instruction) {
2142
2436
  if (instruction.accounts.length < 2) {
2143
- throw new import_kit36.SolanaError(import_kit36.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2437
+ throw new import_kit39.SolanaError(import_kit39.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2144
2438
  actualAccountMetas: instruction.accounts.length,
2145
2439
  expectedAccountMetas: 2
2146
2440
  });
@@ -2159,45 +2453,49 @@ function parseRevokeDelegationInstruction(instruction) {
2159
2453
  }
2160
2454
 
2161
2455
  // src/generated/instructions/revokeSubscriptionAuthority.ts
2162
- var import_kit37 = require("@solana/kit");
2163
- var import_program_client_core13 = require("@solana/program-client-core");
2456
+ var import_kit40 = require("@solana/kit");
2457
+ var import_program_client_core14 = require("@solana/program-client-core");
2164
2458
  var REVOKE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR = 14;
2165
2459
  function getRevokeSubscriptionAuthorityDiscriminatorBytes() {
2166
- return (0, import_kit37.getU8Encoder)().encode(REVOKE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR);
2460
+ return (0, import_kit40.getU8Encoder)().encode(REVOKE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR);
2167
2461
  }
2168
2462
  function getRevokeSubscriptionAuthorityInstructionDataEncoder() {
2169
- return (0, import_kit37.transformEncoder)((0, import_kit37.getStructEncoder)([["discriminator", (0, import_kit37.getU8Encoder)()]]), (value) => ({
2463
+ return (0, import_kit40.transformEncoder)((0, import_kit40.getStructEncoder)([["discriminator", (0, import_kit40.getU8Encoder)()]]), (value) => ({
2170
2464
  ...value,
2171
2465
  discriminator: REVOKE_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR
2172
2466
  }));
2173
2467
  }
2174
2468
  function getRevokeSubscriptionAuthorityInstructionDataDecoder() {
2175
- return (0, import_kit37.getStructDecoder)([["discriminator", (0, import_kit37.getU8Decoder)()]]);
2469
+ return (0, import_kit40.getStructDecoder)([["discriminator", (0, import_kit40.getU8Decoder)()]]);
2176
2470
  }
2177
2471
  function getRevokeSubscriptionAuthorityInstructionDataCodec() {
2178
- return (0, import_kit37.combineCodec)(
2472
+ return (0, import_kit40.combineCodec)(
2179
2473
  getRevokeSubscriptionAuthorityInstructionDataEncoder(),
2180
2474
  getRevokeSubscriptionAuthorityInstructionDataDecoder()
2181
2475
  );
2182
2476
  }
2183
2477
  async function getRevokeSubscriptionAuthorityInstructionAsync(input, config) {
2184
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2478
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2479
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2480
+ const getAccountMeta = (0, import_program_client_core14.getAccountMetaFactory)(programAddress, "omitted");
2185
2481
  const originalAccounts = {
2186
- user: { value: input.user ?? null, isWritable: true },
2187
- userAta: { value: input.userAta ?? null, isWritable: true },
2188
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
2189
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
2190
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: true },
2191
- receiver: { value: input.receiver ?? null, isWritable: true }
2482
+ user: { value: input.user ?? null, isSigner: true, isWritable: true },
2483
+ userAta: { value: input.userAta ?? null, isSigner: false, isWritable: true },
2484
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
2485
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
2486
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: true },
2487
+ receiver: { value: input.receiver ?? null, isSigner: false, isWritable: true }
2192
2488
  };
2193
2489
  const accounts = originalAccounts;
2194
2490
  if (!accounts.subscriptionAuthority.value) {
2195
- accounts.subscriptionAuthority.value = await findSubscriptionAuthorityPda({
2196
- user: (0, import_program_client_core13.getAddressFromResolvedInstructionAccount)("user", accounts.user.value),
2197
- tokenMint: (0, import_program_client_core13.getAddressFromResolvedInstructionAccount)("tokenMint", accounts.tokenMint.value)
2198
- });
2491
+ accounts.subscriptionAuthority.value = await findSubscriptionAuthorityPda(
2492
+ {
2493
+ user: (0, import_program_client_core14.getAddressFromResolvedInstructionAccount)("user", accounts.user.value),
2494
+ tokenMint: (0, import_program_client_core14.getAddressFromResolvedInstructionAccount)("tokenMint", accounts.tokenMint.value)
2495
+ },
2496
+ { programAddress }
2497
+ );
2199
2498
  }
2200
- const getAccountMeta = (0, import_program_client_core13.getAccountMetaFactory)(programAddress, "omitted");
2201
2499
  return Object.freeze({
2202
2500
  accounts: [
2203
2501
  getAccountMeta("user", accounts.user),
@@ -2212,17 +2510,18 @@ async function getRevokeSubscriptionAuthorityInstructionAsync(input, config) {
2212
2510
  });
2213
2511
  }
2214
2512
  function getRevokeSubscriptionAuthorityInstruction(input, config) {
2215
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2513
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2514
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2515
+ const getAccountMeta = (0, import_program_client_core14.getAccountMetaFactory)(programAddress, "omitted");
2216
2516
  const originalAccounts = {
2217
- user: { value: input.user ?? null, isWritable: true },
2218
- userAta: { value: input.userAta ?? null, isWritable: true },
2219
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
2220
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
2221
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: true },
2222
- receiver: { value: input.receiver ?? null, isWritable: true }
2517
+ user: { value: input.user ?? null, isSigner: true, isWritable: true },
2518
+ userAta: { value: input.userAta ?? null, isSigner: false, isWritable: true },
2519
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
2520
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
2521
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: true },
2522
+ receiver: { value: input.receiver ?? null, isSigner: false, isWritable: true }
2223
2523
  };
2224
2524
  const accounts = originalAccounts;
2225
- const getAccountMeta = (0, import_program_client_core13.getAccountMetaFactory)(programAddress, "omitted");
2226
2525
  return Object.freeze({
2227
2526
  accounts: [
2228
2527
  getAccountMeta("user", accounts.user),
@@ -2238,7 +2537,7 @@ function getRevokeSubscriptionAuthorityInstruction(input, config) {
2238
2537
  }
2239
2538
  function parseRevokeSubscriptionAuthorityInstruction(instruction) {
2240
2539
  if (instruction.accounts.length < 5) {
2241
- throw new import_kit37.SolanaError(import_kit37.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2540
+ throw new import_kit40.SolanaError(import_kit40.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2242
2541
  actualAccountMetas: instruction.accounts.length,
2243
2542
  expectedAccountMetas: 5
2244
2543
  });
@@ -2270,65 +2569,69 @@ function parseRevokeSubscriptionAuthorityInstruction(instruction) {
2270
2569
  }
2271
2570
 
2272
2571
  // src/generated/instructions/subscribe.ts
2273
- var import_kit38 = require("@solana/kit");
2274
- var import_program_client_core14 = require("@solana/program-client-core");
2572
+ var import_kit41 = require("@solana/kit");
2573
+ var import_program_client_core15 = require("@solana/program-client-core");
2275
2574
  var SUBSCRIBE_DISCRIMINATOR = 11;
2276
2575
  function getSubscribeDiscriminatorBytes() {
2277
- return (0, import_kit38.getU8Encoder)().encode(SUBSCRIBE_DISCRIMINATOR);
2576
+ return (0, import_kit41.getU8Encoder)().encode(SUBSCRIBE_DISCRIMINATOR);
2278
2577
  }
2279
2578
  function getSubscribeInstructionDataEncoder() {
2280
- return (0, import_kit38.transformEncoder)(
2281
- (0, import_kit38.getStructEncoder)([
2282
- ["discriminator", (0, import_kit38.getU8Encoder)()],
2579
+ return (0, import_kit41.transformEncoder)(
2580
+ (0, import_kit41.getStructEncoder)([
2581
+ ["discriminator", (0, import_kit41.getU8Encoder)()],
2283
2582
  ["subscribeData", getSubscribeDataEncoder()]
2284
2583
  ]),
2285
2584
  (value) => ({ ...value, discriminator: SUBSCRIBE_DISCRIMINATOR })
2286
2585
  );
2287
2586
  }
2288
2587
  function getSubscribeInstructionDataDecoder() {
2289
- return (0, import_kit38.getStructDecoder)([
2290
- ["discriminator", (0, import_kit38.getU8Decoder)()],
2588
+ return (0, import_kit41.getStructDecoder)([
2589
+ ["discriminator", (0, import_kit41.getU8Decoder)()],
2291
2590
  ["subscribeData", getSubscribeDataDecoder()]
2292
2591
  ]);
2293
2592
  }
2294
2593
  function getSubscribeInstructionDataCodec() {
2295
- return (0, import_kit38.combineCodec)(getSubscribeInstructionDataEncoder(), getSubscribeInstructionDataDecoder());
2594
+ return (0, import_kit41.combineCodec)(getSubscribeInstructionDataEncoder(), getSubscribeInstructionDataDecoder());
2296
2595
  }
2297
2596
  async function getSubscribeInstructionAsync(input, config) {
2298
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2597
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2598
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2599
+ const getAccountMeta = (0, import_program_client_core15.getAccountMetaFactory)(programAddress, "omitted");
2299
2600
  const originalAccounts = {
2300
- subscriber: { value: input.subscriber ?? null, isWritable: true },
2301
- merchant: { value: input.merchant ?? null, isWritable: false },
2302
- planPda: { value: input.planPda ?? null, isWritable: false },
2303
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
2304
- subscriptionAuthorityPda: { value: input.subscriptionAuthorityPda ?? null, isWritable: false },
2305
- systemProgram: { value: input.systemProgram ?? null, isWritable: false },
2306
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2307
- selfProgram: { value: input.selfProgram ?? null, isWritable: false },
2308
- payer: { value: input.payer ?? null, isWritable: true }
2601
+ subscriber: { value: input.subscriber ?? null, isSigner: true, isWritable: true },
2602
+ merchant: { value: input.merchant ?? null, isSigner: false, isWritable: false },
2603
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
2604
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
2605
+ subscriptionAuthorityPda: { value: input.subscriptionAuthorityPda ?? null, isSigner: false, isWritable: false },
2606
+ systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false },
2607
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
2608
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false },
2609
+ payer: { value: input.payer ?? null, isSigner: true, isWritable: true }
2309
2610
  };
2310
2611
  const accounts = originalAccounts;
2311
2612
  const args = { ...input };
2312
2613
  if (!accounts.subscriptionPda.value) {
2313
- accounts.subscriptionPda.value = await findSubscriptionDelegationPda({
2314
- planPda: (0, import_program_client_core14.getAddressFromResolvedInstructionAccount)("planPda", accounts.planPda.value),
2315
- subscriber: (0, import_program_client_core14.getAddressFromResolvedInstructionAccount)("subscriber", accounts.subscriber.value)
2316
- });
2614
+ accounts.subscriptionPda.value = await findSubscriptionDelegationPda(
2615
+ {
2616
+ planPda: (0, import_program_client_core15.getAddressFromResolvedInstructionAccount)("planPda", accounts.planPda.value),
2617
+ subscriber: (0, import_program_client_core15.getAddressFromResolvedInstructionAccount)("subscriber", accounts.subscriber.value)
2618
+ },
2619
+ { programAddress }
2620
+ );
2317
2621
  }
2318
2622
  if (!accounts.systemProgram.value) {
2319
2623
  accounts.systemProgram.value = "11111111111111111111111111111111";
2320
2624
  }
2321
2625
  if (!accounts.eventAuthority.value) {
2322
- accounts.eventAuthority.value = await (0, import_kit38.getProgramDerivedAddress)({
2626
+ accounts.eventAuthority.value = await (0, import_kit41.getProgramDerivedAddress)({
2323
2627
  programAddress,
2324
- seeds: [(0, import_kit38.getUtf8Encoder)().encode("event_authority")]
2628
+ seeds: [(0, import_kit41.getUtf8Encoder)().encode("event_authority")]
2325
2629
  });
2326
2630
  }
2327
2631
  if (!accounts.selfProgram.value) {
2328
2632
  accounts.selfProgram.value = programAddress;
2329
2633
  accounts.selfProgram.isWritable = false;
2330
2634
  }
2331
- const getAccountMeta = (0, import_program_client_core14.getAccountMetaFactory)(programAddress, "omitted");
2332
2635
  return Object.freeze({
2333
2636
  accounts: [
2334
2637
  getAccountMeta("subscriber", accounts.subscriber),
@@ -2346,17 +2649,19 @@ async function getSubscribeInstructionAsync(input, config) {
2346
2649
  });
2347
2650
  }
2348
2651
  function getSubscribeInstruction(input, config) {
2349
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2652
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2653
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2654
+ const getAccountMeta = (0, import_program_client_core15.getAccountMetaFactory)(programAddress, "omitted");
2350
2655
  const originalAccounts = {
2351
- subscriber: { value: input.subscriber ?? null, isWritable: true },
2352
- merchant: { value: input.merchant ?? null, isWritable: false },
2353
- planPda: { value: input.planPda ?? null, isWritable: false },
2354
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
2355
- subscriptionAuthorityPda: { value: input.subscriptionAuthorityPda ?? null, isWritable: false },
2356
- systemProgram: { value: input.systemProgram ?? null, isWritable: false },
2357
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2358
- selfProgram: { value: input.selfProgram ?? null, isWritable: false },
2359
- payer: { value: input.payer ?? null, isWritable: true }
2656
+ subscriber: { value: input.subscriber ?? null, isSigner: true, isWritable: true },
2657
+ merchant: { value: input.merchant ?? null, isSigner: false, isWritable: false },
2658
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
2659
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
2660
+ subscriptionAuthorityPda: { value: input.subscriptionAuthorityPda ?? null, isSigner: false, isWritable: false },
2661
+ systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false },
2662
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
2663
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false },
2664
+ payer: { value: input.payer ?? null, isSigner: true, isWritable: true }
2360
2665
  };
2361
2666
  const accounts = originalAccounts;
2362
2667
  const args = { ...input };
@@ -2367,7 +2672,6 @@ function getSubscribeInstruction(input, config) {
2367
2672
  accounts.selfProgram.value = programAddress;
2368
2673
  accounts.selfProgram.isWritable = false;
2369
2674
  }
2370
- const getAccountMeta = (0, import_program_client_core14.getAccountMetaFactory)(programAddress, "omitted");
2371
2675
  return Object.freeze({
2372
2676
  accounts: [
2373
2677
  getAccountMeta("subscriber", accounts.subscriber),
@@ -2386,7 +2690,7 @@ function getSubscribeInstruction(input, config) {
2386
2690
  }
2387
2691
  function parseSubscribeInstruction(instruction) {
2388
2692
  if (instruction.accounts.length < 8) {
2389
- throw new import_kit38.SolanaError(import_kit38.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2693
+ throw new import_kit41.SolanaError(import_kit41.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2390
2694
  actualAccountMetas: instruction.accounts.length,
2391
2695
  expectedAccountMetas: 8
2392
2696
  });
@@ -2421,56 +2725,57 @@ function parseSubscribeInstruction(instruction) {
2421
2725
  }
2422
2726
 
2423
2727
  // src/generated/instructions/transferFixed.ts
2424
- var import_kit39 = require("@solana/kit");
2425
- var import_program_client_core15 = require("@solana/program-client-core");
2728
+ var import_kit42 = require("@solana/kit");
2729
+ var import_program_client_core16 = require("@solana/program-client-core");
2426
2730
  var TRANSFER_FIXED_DISCRIMINATOR = 4;
2427
2731
  function getTransferFixedDiscriminatorBytes() {
2428
- return (0, import_kit39.getU8Encoder)().encode(TRANSFER_FIXED_DISCRIMINATOR);
2732
+ return (0, import_kit42.getU8Encoder)().encode(TRANSFER_FIXED_DISCRIMINATOR);
2429
2733
  }
2430
2734
  function getTransferFixedInstructionDataEncoder() {
2431
- return (0, import_kit39.transformEncoder)(
2432
- (0, import_kit39.getStructEncoder)([
2433
- ["discriminator", (0, import_kit39.getU8Encoder)()],
2735
+ return (0, import_kit42.transformEncoder)(
2736
+ (0, import_kit42.getStructEncoder)([
2737
+ ["discriminator", (0, import_kit42.getU8Encoder)()],
2434
2738
  ["transferData", getTransferDataEncoder()]
2435
2739
  ]),
2436
2740
  (value) => ({ ...value, discriminator: TRANSFER_FIXED_DISCRIMINATOR })
2437
2741
  );
2438
2742
  }
2439
2743
  function getTransferFixedInstructionDataDecoder() {
2440
- return (0, import_kit39.getStructDecoder)([
2441
- ["discriminator", (0, import_kit39.getU8Decoder)()],
2744
+ return (0, import_kit42.getStructDecoder)([
2745
+ ["discriminator", (0, import_kit42.getU8Decoder)()],
2442
2746
  ["transferData", getTransferDataDecoder()]
2443
2747
  ]);
2444
2748
  }
2445
2749
  function getTransferFixedInstructionDataCodec() {
2446
- return (0, import_kit39.combineCodec)(getTransferFixedInstructionDataEncoder(), getTransferFixedInstructionDataDecoder());
2750
+ return (0, import_kit42.combineCodec)(getTransferFixedInstructionDataEncoder(), getTransferFixedInstructionDataDecoder());
2447
2751
  }
2448
2752
  async function getTransferFixedInstructionAsync(input, config) {
2449
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2753
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2754
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2755
+ const getAccountMeta = (0, import_program_client_core16.getAccountMetaFactory)(programAddress, "programId");
2450
2756
  const originalAccounts = {
2451
- delegationPda: { value: input.delegationPda ?? null, isWritable: true },
2452
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
2453
- delegatorAta: { value: input.delegatorAta ?? null, isWritable: true },
2454
- receiverAta: { value: input.receiverAta ?? null, isWritable: true },
2455
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
2456
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
2457
- delegatee: { value: input.delegatee ?? null, isWritable: false },
2458
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2459
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
2757
+ delegationPda: { value: input.delegationPda ?? null, isSigner: false, isWritable: true },
2758
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
2759
+ delegatorAta: { value: input.delegatorAta ?? null, isSigner: false, isWritable: true },
2760
+ receiverAta: { value: input.receiverAta ?? null, isSigner: false, isWritable: true },
2761
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
2762
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
2763
+ delegatee: { value: input.delegatee ?? null, isSigner: true, isWritable: false },
2764
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
2765
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
2460
2766
  };
2461
2767
  const accounts = originalAccounts;
2462
2768
  const args = { ...input };
2463
2769
  if (!accounts.eventAuthority.value) {
2464
- accounts.eventAuthority.value = await (0, import_kit39.getProgramDerivedAddress)({
2770
+ accounts.eventAuthority.value = await (0, import_kit42.getProgramDerivedAddress)({
2465
2771
  programAddress,
2466
- seeds: [(0, import_kit39.getUtf8Encoder)().encode("event_authority")]
2772
+ seeds: [(0, import_kit42.getUtf8Encoder)().encode("event_authority")]
2467
2773
  });
2468
2774
  }
2469
2775
  if (!accounts.selfProgram.value) {
2470
2776
  accounts.selfProgram.value = programAddress;
2471
2777
  accounts.selfProgram.isWritable = false;
2472
2778
  }
2473
- const getAccountMeta = (0, import_program_client_core15.getAccountMetaFactory)(programAddress, "programId");
2474
2779
  return Object.freeze({
2475
2780
  accounts: [
2476
2781
  getAccountMeta("delegationPda", accounts.delegationPda),
@@ -2488,17 +2793,19 @@ async function getTransferFixedInstructionAsync(input, config) {
2488
2793
  });
2489
2794
  }
2490
2795
  function getTransferFixedInstruction(input, config) {
2491
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2796
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2797
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2798
+ const getAccountMeta = (0, import_program_client_core16.getAccountMetaFactory)(programAddress, "programId");
2492
2799
  const originalAccounts = {
2493
- delegationPda: { value: input.delegationPda ?? null, isWritable: true },
2494
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
2495
- delegatorAta: { value: input.delegatorAta ?? null, isWritable: true },
2496
- receiverAta: { value: input.receiverAta ?? null, isWritable: true },
2497
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
2498
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
2499
- delegatee: { value: input.delegatee ?? null, isWritable: false },
2500
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2501
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
2800
+ delegationPda: { value: input.delegationPda ?? null, isSigner: false, isWritable: true },
2801
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
2802
+ delegatorAta: { value: input.delegatorAta ?? null, isSigner: false, isWritable: true },
2803
+ receiverAta: { value: input.receiverAta ?? null, isSigner: false, isWritable: true },
2804
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
2805
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
2806
+ delegatee: { value: input.delegatee ?? null, isSigner: true, isWritable: false },
2807
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
2808
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
2502
2809
  };
2503
2810
  const accounts = originalAccounts;
2504
2811
  const args = { ...input };
@@ -2506,7 +2813,6 @@ function getTransferFixedInstruction(input, config) {
2506
2813
  accounts.selfProgram.value = programAddress;
2507
2814
  accounts.selfProgram.isWritable = false;
2508
2815
  }
2509
- const getAccountMeta = (0, import_program_client_core15.getAccountMetaFactory)(programAddress, "programId");
2510
2816
  return Object.freeze({
2511
2817
  accounts: [
2512
2818
  getAccountMeta("delegationPda", accounts.delegationPda),
@@ -2525,7 +2831,7 @@ function getTransferFixedInstruction(input, config) {
2525
2831
  }
2526
2832
  function parseTransferFixedInstruction(instruction) {
2527
2833
  if (instruction.accounts.length < 9) {
2528
- throw new import_kit39.SolanaError(import_kit39.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2834
+ throw new import_kit42.SolanaError(import_kit42.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2529
2835
  actualAccountMetas: instruction.accounts.length,
2530
2836
  expectedAccountMetas: 9
2531
2837
  });
@@ -2554,56 +2860,57 @@ function parseTransferFixedInstruction(instruction) {
2554
2860
  }
2555
2861
 
2556
2862
  // src/generated/instructions/transferRecurring.ts
2557
- var import_kit40 = require("@solana/kit");
2558
- var import_program_client_core16 = require("@solana/program-client-core");
2863
+ var import_kit43 = require("@solana/kit");
2864
+ var import_program_client_core17 = require("@solana/program-client-core");
2559
2865
  var TRANSFER_RECURRING_DISCRIMINATOR = 5;
2560
2866
  function getTransferRecurringDiscriminatorBytes() {
2561
- return (0, import_kit40.getU8Encoder)().encode(TRANSFER_RECURRING_DISCRIMINATOR);
2867
+ return (0, import_kit43.getU8Encoder)().encode(TRANSFER_RECURRING_DISCRIMINATOR);
2562
2868
  }
2563
2869
  function getTransferRecurringInstructionDataEncoder() {
2564
- return (0, import_kit40.transformEncoder)(
2565
- (0, import_kit40.getStructEncoder)([
2566
- ["discriminator", (0, import_kit40.getU8Encoder)()],
2870
+ return (0, import_kit43.transformEncoder)(
2871
+ (0, import_kit43.getStructEncoder)([
2872
+ ["discriminator", (0, import_kit43.getU8Encoder)()],
2567
2873
  ["transferData", getTransferDataEncoder()]
2568
2874
  ]),
2569
2875
  (value) => ({ ...value, discriminator: TRANSFER_RECURRING_DISCRIMINATOR })
2570
2876
  );
2571
2877
  }
2572
2878
  function getTransferRecurringInstructionDataDecoder() {
2573
- return (0, import_kit40.getStructDecoder)([
2574
- ["discriminator", (0, import_kit40.getU8Decoder)()],
2879
+ return (0, import_kit43.getStructDecoder)([
2880
+ ["discriminator", (0, import_kit43.getU8Decoder)()],
2575
2881
  ["transferData", getTransferDataDecoder()]
2576
2882
  ]);
2577
2883
  }
2578
2884
  function getTransferRecurringInstructionDataCodec() {
2579
- return (0, import_kit40.combineCodec)(getTransferRecurringInstructionDataEncoder(), getTransferRecurringInstructionDataDecoder());
2885
+ return (0, import_kit43.combineCodec)(getTransferRecurringInstructionDataEncoder(), getTransferRecurringInstructionDataDecoder());
2580
2886
  }
2581
2887
  async function getTransferRecurringInstructionAsync(input, config) {
2582
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2888
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2889
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2890
+ const getAccountMeta = (0, import_program_client_core17.getAccountMetaFactory)(programAddress, "programId");
2583
2891
  const originalAccounts = {
2584
- delegationPda: { value: input.delegationPda ?? null, isWritable: true },
2585
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
2586
- delegatorAta: { value: input.delegatorAta ?? null, isWritable: true },
2587
- receiverAta: { value: input.receiverAta ?? null, isWritable: true },
2588
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
2589
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
2590
- delegatee: { value: input.delegatee ?? null, isWritable: false },
2591
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2592
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
2892
+ delegationPda: { value: input.delegationPda ?? null, isSigner: false, isWritable: true },
2893
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
2894
+ delegatorAta: { value: input.delegatorAta ?? null, isSigner: false, isWritable: true },
2895
+ receiverAta: { value: input.receiverAta ?? null, isSigner: false, isWritable: true },
2896
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
2897
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
2898
+ delegatee: { value: input.delegatee ?? null, isSigner: true, isWritable: false },
2899
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
2900
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
2593
2901
  };
2594
2902
  const accounts = originalAccounts;
2595
2903
  const args = { ...input };
2596
2904
  if (!accounts.eventAuthority.value) {
2597
- accounts.eventAuthority.value = await (0, import_kit40.getProgramDerivedAddress)({
2905
+ accounts.eventAuthority.value = await (0, import_kit43.getProgramDerivedAddress)({
2598
2906
  programAddress,
2599
- seeds: [(0, import_kit40.getUtf8Encoder)().encode("event_authority")]
2907
+ seeds: [(0, import_kit43.getUtf8Encoder)().encode("event_authority")]
2600
2908
  });
2601
2909
  }
2602
2910
  if (!accounts.selfProgram.value) {
2603
2911
  accounts.selfProgram.value = programAddress;
2604
2912
  accounts.selfProgram.isWritable = false;
2605
2913
  }
2606
- const getAccountMeta = (0, import_program_client_core16.getAccountMetaFactory)(programAddress, "programId");
2607
2914
  return Object.freeze({
2608
2915
  accounts: [
2609
2916
  getAccountMeta("delegationPda", accounts.delegationPda),
@@ -2621,17 +2928,19 @@ async function getTransferRecurringInstructionAsync(input, config) {
2621
2928
  });
2622
2929
  }
2623
2930
  function getTransferRecurringInstruction(input, config) {
2624
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2931
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
2932
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
2933
+ const getAccountMeta = (0, import_program_client_core17.getAccountMetaFactory)(programAddress, "programId");
2625
2934
  const originalAccounts = {
2626
- delegationPda: { value: input.delegationPda ?? null, isWritable: true },
2627
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
2628
- delegatorAta: { value: input.delegatorAta ?? null, isWritable: true },
2629
- receiverAta: { value: input.receiverAta ?? null, isWritable: true },
2630
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
2631
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
2632
- delegatee: { value: input.delegatee ?? null, isWritable: false },
2633
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2634
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
2935
+ delegationPda: { value: input.delegationPda ?? null, isSigner: false, isWritable: true },
2936
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
2937
+ delegatorAta: { value: input.delegatorAta ?? null, isSigner: false, isWritable: true },
2938
+ receiverAta: { value: input.receiverAta ?? null, isSigner: false, isWritable: true },
2939
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
2940
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
2941
+ delegatee: { value: input.delegatee ?? null, isSigner: true, isWritable: false },
2942
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
2943
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
2635
2944
  };
2636
2945
  const accounts = originalAccounts;
2637
2946
  const args = { ...input };
@@ -2639,7 +2948,6 @@ function getTransferRecurringInstruction(input, config) {
2639
2948
  accounts.selfProgram.value = programAddress;
2640
2949
  accounts.selfProgram.isWritable = false;
2641
2950
  }
2642
- const getAccountMeta = (0, import_program_client_core16.getAccountMetaFactory)(programAddress, "programId");
2643
2951
  return Object.freeze({
2644
2952
  accounts: [
2645
2953
  getAccountMeta("delegationPda", accounts.delegationPda),
@@ -2658,7 +2966,7 @@ function getTransferRecurringInstruction(input, config) {
2658
2966
  }
2659
2967
  function parseTransferRecurringInstruction(instruction) {
2660
2968
  if (instruction.accounts.length < 9) {
2661
- throw new import_kit40.SolanaError(import_kit40.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2969
+ throw new import_kit43.SolanaError(import_kit43.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2662
2970
  actualAccountMetas: instruction.accounts.length,
2663
2971
  expectedAccountMetas: 9
2664
2972
  });
@@ -2687,60 +2995,61 @@ function parseTransferRecurringInstruction(instruction) {
2687
2995
  }
2688
2996
 
2689
2997
  // src/generated/instructions/transferSubscription.ts
2690
- var import_kit41 = require("@solana/kit");
2691
- var import_program_client_core17 = require("@solana/program-client-core");
2998
+ var import_kit44 = require("@solana/kit");
2999
+ var import_program_client_core18 = require("@solana/program-client-core");
2692
3000
  var TRANSFER_SUBSCRIPTION_DISCRIMINATOR = 10;
2693
3001
  function getTransferSubscriptionDiscriminatorBytes() {
2694
- return (0, import_kit41.getU8Encoder)().encode(TRANSFER_SUBSCRIPTION_DISCRIMINATOR);
3002
+ return (0, import_kit44.getU8Encoder)().encode(TRANSFER_SUBSCRIPTION_DISCRIMINATOR);
2695
3003
  }
2696
3004
  function getTransferSubscriptionInstructionDataEncoder() {
2697
- return (0, import_kit41.transformEncoder)(
2698
- (0, import_kit41.getStructEncoder)([
2699
- ["discriminator", (0, import_kit41.getU8Encoder)()],
3005
+ return (0, import_kit44.transformEncoder)(
3006
+ (0, import_kit44.getStructEncoder)([
3007
+ ["discriminator", (0, import_kit44.getU8Encoder)()],
2700
3008
  ["transferData", getTransferDataEncoder()]
2701
3009
  ]),
2702
3010
  (value) => ({ ...value, discriminator: TRANSFER_SUBSCRIPTION_DISCRIMINATOR })
2703
3011
  );
2704
3012
  }
2705
3013
  function getTransferSubscriptionInstructionDataDecoder() {
2706
- return (0, import_kit41.getStructDecoder)([
2707
- ["discriminator", (0, import_kit41.getU8Decoder)()],
3014
+ return (0, import_kit44.getStructDecoder)([
3015
+ ["discriminator", (0, import_kit44.getU8Decoder)()],
2708
3016
  ["transferData", getTransferDataDecoder()]
2709
3017
  ]);
2710
3018
  }
2711
3019
  function getTransferSubscriptionInstructionDataCodec() {
2712
- return (0, import_kit41.combineCodec)(
3020
+ return (0, import_kit44.combineCodec)(
2713
3021
  getTransferSubscriptionInstructionDataEncoder(),
2714
3022
  getTransferSubscriptionInstructionDataDecoder()
2715
3023
  );
2716
3024
  }
2717
3025
  async function getTransferSubscriptionInstructionAsync(input, config) {
2718
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
3026
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
3027
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
3028
+ const getAccountMeta = (0, import_program_client_core18.getAccountMetaFactory)(programAddress, "programId");
2719
3029
  const originalAccounts = {
2720
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
2721
- planPda: { value: input.planPda ?? null, isWritable: false },
2722
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
2723
- delegatorAta: { value: input.delegatorAta ?? null, isWritable: true },
2724
- receiverAta: { value: input.receiverAta ?? null, isWritable: true },
2725
- caller: { value: input.caller ?? null, isWritable: false },
2726
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
2727
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
2728
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2729
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
3030
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
3031
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
3032
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
3033
+ delegatorAta: { value: input.delegatorAta ?? null, isSigner: false, isWritable: true },
3034
+ receiverAta: { value: input.receiverAta ?? null, isSigner: false, isWritable: true },
3035
+ caller: { value: input.caller ?? null, isSigner: true, isWritable: false },
3036
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
3037
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
3038
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
3039
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
2730
3040
  };
2731
3041
  const accounts = originalAccounts;
2732
3042
  const args = { ...input };
2733
3043
  if (!accounts.eventAuthority.value) {
2734
- accounts.eventAuthority.value = await (0, import_kit41.getProgramDerivedAddress)({
3044
+ accounts.eventAuthority.value = await (0, import_kit44.getProgramDerivedAddress)({
2735
3045
  programAddress,
2736
- seeds: [(0, import_kit41.getUtf8Encoder)().encode("event_authority")]
3046
+ seeds: [(0, import_kit44.getUtf8Encoder)().encode("event_authority")]
2737
3047
  });
2738
3048
  }
2739
3049
  if (!accounts.selfProgram.value) {
2740
3050
  accounts.selfProgram.value = programAddress;
2741
3051
  accounts.selfProgram.isWritable = false;
2742
3052
  }
2743
- const getAccountMeta = (0, import_program_client_core17.getAccountMetaFactory)(programAddress, "programId");
2744
3053
  return Object.freeze({
2745
3054
  accounts: [
2746
3055
  getAccountMeta("subscriptionPda", accounts.subscriptionPda),
@@ -2759,18 +3068,20 @@ async function getTransferSubscriptionInstructionAsync(input, config) {
2759
3068
  });
2760
3069
  }
2761
3070
  function getTransferSubscriptionInstruction(input, config) {
2762
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
3071
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
3072
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
3073
+ const getAccountMeta = (0, import_program_client_core18.getAccountMetaFactory)(programAddress, "programId");
2763
3074
  const originalAccounts = {
2764
- subscriptionPda: { value: input.subscriptionPda ?? null, isWritable: true },
2765
- planPda: { value: input.planPda ?? null, isWritable: false },
2766
- subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isWritable: false },
2767
- delegatorAta: { value: input.delegatorAta ?? null, isWritable: true },
2768
- receiverAta: { value: input.receiverAta ?? null, isWritable: true },
2769
- caller: { value: input.caller ?? null, isWritable: false },
2770
- tokenMint: { value: input.tokenMint ?? null, isWritable: false },
2771
- tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
2772
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2773
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
3075
+ subscriptionPda: { value: input.subscriptionPda ?? null, isSigner: false, isWritable: true },
3076
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: false },
3077
+ subscriptionAuthority: { value: input.subscriptionAuthority ?? null, isSigner: false, isWritable: false },
3078
+ delegatorAta: { value: input.delegatorAta ?? null, isSigner: false, isWritable: true },
3079
+ receiverAta: { value: input.receiverAta ?? null, isSigner: false, isWritable: true },
3080
+ caller: { value: input.caller ?? null, isSigner: true, isWritable: false },
3081
+ tokenMint: { value: input.tokenMint ?? null, isSigner: false, isWritable: false },
3082
+ tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false },
3083
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
3084
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
2774
3085
  };
2775
3086
  const accounts = originalAccounts;
2776
3087
  const args = { ...input };
@@ -2778,7 +3089,6 @@ function getTransferSubscriptionInstruction(input, config) {
2778
3089
  accounts.selfProgram.value = programAddress;
2779
3090
  accounts.selfProgram.isWritable = false;
2780
3091
  }
2781
- const getAccountMeta = (0, import_program_client_core17.getAccountMetaFactory)(programAddress, "programId");
2782
3092
  return Object.freeze({
2783
3093
  accounts: [
2784
3094
  getAccountMeta("subscriptionPda", accounts.subscriptionPda),
@@ -2798,7 +3108,7 @@ function getTransferSubscriptionInstruction(input, config) {
2798
3108
  }
2799
3109
  function parseTransferSubscriptionInstruction(instruction) {
2800
3110
  if (instruction.accounts.length < 10) {
2801
- throw new import_kit41.SolanaError(import_kit41.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
3111
+ throw new import_kit44.SolanaError(import_kit44.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2802
3112
  actualAccountMetas: instruction.accounts.length,
2803
3113
  expectedAccountMetas: 10
2804
3114
  });
@@ -2828,51 +3138,52 @@ function parseTransferSubscriptionInstruction(instruction) {
2828
3138
  }
2829
3139
 
2830
3140
  // src/generated/instructions/updatePlan.ts
2831
- var import_kit42 = require("@solana/kit");
2832
- var import_program_client_core18 = require("@solana/program-client-core");
3141
+ var import_kit45 = require("@solana/kit");
3142
+ var import_program_client_core19 = require("@solana/program-client-core");
2833
3143
  var UPDATE_PLAN_DISCRIMINATOR = 8;
2834
3144
  function getUpdatePlanDiscriminatorBytes() {
2835
- return (0, import_kit42.getU8Encoder)().encode(UPDATE_PLAN_DISCRIMINATOR);
3145
+ return (0, import_kit45.getU8Encoder)().encode(UPDATE_PLAN_DISCRIMINATOR);
2836
3146
  }
2837
3147
  function getUpdatePlanInstructionDataEncoder() {
2838
- return (0, import_kit42.transformEncoder)(
2839
- (0, import_kit42.getStructEncoder)([
2840
- ["discriminator", (0, import_kit42.getU8Encoder)()],
3148
+ return (0, import_kit45.transformEncoder)(
3149
+ (0, import_kit45.getStructEncoder)([
3150
+ ["discriminator", (0, import_kit45.getU8Encoder)()],
2841
3151
  ["updatePlanData", getUpdatePlanDataEncoder()]
2842
3152
  ]),
2843
3153
  (value) => ({ ...value, discriminator: UPDATE_PLAN_DISCRIMINATOR })
2844
3154
  );
2845
3155
  }
2846
3156
  function getUpdatePlanInstructionDataDecoder() {
2847
- return (0, import_kit42.getStructDecoder)([
2848
- ["discriminator", (0, import_kit42.getU8Decoder)()],
3157
+ return (0, import_kit45.getStructDecoder)([
3158
+ ["discriminator", (0, import_kit45.getU8Decoder)()],
2849
3159
  ["updatePlanData", getUpdatePlanDataDecoder()]
2850
3160
  ]);
2851
3161
  }
2852
3162
  function getUpdatePlanInstructionDataCodec() {
2853
- return (0, import_kit42.combineCodec)(getUpdatePlanInstructionDataEncoder(), getUpdatePlanInstructionDataDecoder());
3163
+ return (0, import_kit45.combineCodec)(getUpdatePlanInstructionDataEncoder(), getUpdatePlanInstructionDataDecoder());
2854
3164
  }
2855
3165
  async function getUpdatePlanInstructionAsync(input, config) {
2856
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
3166
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
3167
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
3168
+ const getAccountMeta = (0, import_program_client_core19.getAccountMetaFactory)(programAddress, "programId");
2857
3169
  const originalAccounts = {
2858
- owner: { value: input.owner ?? null, isWritable: false },
2859
- planPda: { value: input.planPda ?? null, isWritable: true },
2860
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2861
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
3170
+ owner: { value: input.owner ?? null, isSigner: true, isWritable: false },
3171
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: true },
3172
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
3173
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
2862
3174
  };
2863
3175
  const accounts = originalAccounts;
2864
3176
  const args = { ...input };
2865
3177
  if (!accounts.eventAuthority.value) {
2866
- accounts.eventAuthority.value = await (0, import_kit42.getProgramDerivedAddress)({
3178
+ accounts.eventAuthority.value = await (0, import_kit45.getProgramDerivedAddress)({
2867
3179
  programAddress,
2868
- seeds: [(0, import_kit42.getUtf8Encoder)().encode("event_authority")]
3180
+ seeds: [(0, import_kit45.getUtf8Encoder)().encode("event_authority")]
2869
3181
  });
2870
3182
  }
2871
3183
  if (!accounts.selfProgram.value) {
2872
3184
  accounts.selfProgram.value = programAddress;
2873
3185
  accounts.selfProgram.isWritable = false;
2874
3186
  }
2875
- const getAccountMeta = (0, import_program_client_core18.getAccountMetaFactory)(programAddress, "programId");
2876
3187
  return Object.freeze({
2877
3188
  accounts: [
2878
3189
  getAccountMeta("owner", accounts.owner),
@@ -2885,12 +3196,14 @@ async function getUpdatePlanInstructionAsync(input, config) {
2885
3196
  });
2886
3197
  }
2887
3198
  function getUpdatePlanInstruction(input, config) {
2888
- const programAddress = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
3199
+ const programAddressInput = config?.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
3200
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
3201
+ const getAccountMeta = (0, import_program_client_core19.getAccountMetaFactory)(programAddress, "programId");
2889
3202
  const originalAccounts = {
2890
- owner: { value: input.owner ?? null, isWritable: false },
2891
- planPda: { value: input.planPda ?? null, isWritable: true },
2892
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
2893
- selfProgram: { value: input.selfProgram ?? null, isWritable: false }
3203
+ owner: { value: input.owner ?? null, isSigner: true, isWritable: false },
3204
+ planPda: { value: input.planPda ?? null, isSigner: false, isWritable: true },
3205
+ eventAuthority: { value: input.eventAuthority ?? null, isSigner: false, isWritable: false },
3206
+ selfProgram: { value: input.selfProgram ?? null, isSigner: false, isWritable: false }
2894
3207
  };
2895
3208
  const accounts = originalAccounts;
2896
3209
  const args = { ...input };
@@ -2898,7 +3211,6 @@ function getUpdatePlanInstruction(input, config) {
2898
3211
  accounts.selfProgram.value = programAddress;
2899
3212
  accounts.selfProgram.isWritable = false;
2900
3213
  }
2901
- const getAccountMeta = (0, import_program_client_core18.getAccountMetaFactory)(programAddress, "programId");
2902
3214
  return Object.freeze({
2903
3215
  accounts: [
2904
3216
  getAccountMeta("owner", accounts.owner),
@@ -2912,7 +3224,7 @@ function getUpdatePlanInstruction(input, config) {
2912
3224
  }
2913
3225
  function parseUpdatePlanInstruction(instruction) {
2914
3226
  if (instruction.accounts.length < 4) {
2915
- throw new import_kit42.SolanaError(import_kit42.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
3227
+ throw new import_kit45.SolanaError(import_kit45.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
2916
3228
  actualAccountMetas: instruction.accounts.length,
2917
3229
  expectedAccountMetas: 4
2918
3230
  });
@@ -2943,9 +3255,45 @@ var SubscriptionsAccount = /* @__PURE__ */ ((SubscriptionsAccount2) => {
2943
3255
  SubscriptionsAccount2[SubscriptionsAccount2["RecurringDelegation"] = 2] = "RecurringDelegation";
2944
3256
  SubscriptionsAccount2[SubscriptionsAccount2["SubscriptionAuthority"] = 3] = "SubscriptionAuthority";
2945
3257
  SubscriptionsAccount2[SubscriptionsAccount2["SubscriptionDelegation"] = 4] = "SubscriptionDelegation";
2946
- SubscriptionsAccount2[SubscriptionsAccount2["EventAuthority"] = 5] = "EventAuthority";
3258
+ SubscriptionsAccount2[SubscriptionsAccount2["TransferContext"] = 5] = "TransferContext";
3259
+ SubscriptionsAccount2[SubscriptionsAccount2["EventAuthority"] = 6] = "EventAuthority";
2947
3260
  return SubscriptionsAccount2;
2948
3261
  })(SubscriptionsAccount || {});
3262
+ var SubscriptionsEvent = /* @__PURE__ */ ((SubscriptionsEvent2) => {
3263
+ SubscriptionsEvent2[SubscriptionsEvent2["FixedTransferEvent"] = 0] = "FixedTransferEvent";
3264
+ SubscriptionsEvent2[SubscriptionsEvent2["PlanUpdatedEvent"] = 1] = "PlanUpdatedEvent";
3265
+ SubscriptionsEvent2[SubscriptionsEvent2["RecurringTransferEvent"] = 2] = "RecurringTransferEvent";
3266
+ SubscriptionsEvent2[SubscriptionsEvent2["SubscriptionCancelledEvent"] = 3] = "SubscriptionCancelledEvent";
3267
+ SubscriptionsEvent2[SubscriptionsEvent2["SubscriptionCreatedEvent"] = 4] = "SubscriptionCreatedEvent";
3268
+ SubscriptionsEvent2[SubscriptionsEvent2["SubscriptionResumedEvent"] = 5] = "SubscriptionResumedEvent";
3269
+ SubscriptionsEvent2[SubscriptionsEvent2["SubscriptionTransferEvent"] = 6] = "SubscriptionTransferEvent";
3270
+ return SubscriptionsEvent2;
3271
+ })(SubscriptionsEvent || {});
3272
+ function identifySubscriptionsEvent(event) {
3273
+ const data = "data" in event ? event.data : event;
3274
+ if ((0, import_kit46.containsBytes)(data, new Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]), 0) && (0, import_kit46.containsBytes)(data, new Uint8Array([3]), 8)) {
3275
+ return 0 /* FixedTransferEvent */;
3276
+ }
3277
+ if ((0, import_kit46.containsBytes)(data, new Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]), 0) && (0, import_kit46.containsBytes)(data, new Uint8Array([6]), 8)) {
3278
+ return 1 /* PlanUpdatedEvent */;
3279
+ }
3280
+ if ((0, import_kit46.containsBytes)(data, new Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]), 0) && (0, import_kit46.containsBytes)(data, new Uint8Array([4]), 8)) {
3281
+ return 2 /* RecurringTransferEvent */;
3282
+ }
3283
+ if ((0, import_kit46.containsBytes)(data, new Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]), 0) && (0, import_kit46.containsBytes)(data, new Uint8Array([1]), 8)) {
3284
+ return 3 /* SubscriptionCancelledEvent */;
3285
+ }
3286
+ if ((0, import_kit46.containsBytes)(data, new Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]), 0) && (0, import_kit46.containsBytes)(data, new Uint8Array([0]), 8)) {
3287
+ return 4 /* SubscriptionCreatedEvent */;
3288
+ }
3289
+ if ((0, import_kit46.containsBytes)(data, new Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]), 0) && (0, import_kit46.containsBytes)(data, new Uint8Array([5]), 8)) {
3290
+ return 5 /* SubscriptionResumedEvent */;
3291
+ }
3292
+ if ((0, import_kit46.containsBytes)(data, new Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]), 0) && (0, import_kit46.containsBytes)(data, new Uint8Array([2]), 8)) {
3293
+ return 6 /* SubscriptionTransferEvent */;
3294
+ }
3295
+ throw new Error("The provided event could not be identified as a subscriptions event.");
3296
+ }
2949
3297
  var SubscriptionsInstruction = /* @__PURE__ */ ((SubscriptionsInstruction2) => {
2950
3298
  SubscriptionsInstruction2[SubscriptionsInstruction2["InitSubscriptionAuthority"] = 0] = "InitSubscriptionAuthority";
2951
3299
  SubscriptionsInstruction2[SubscriptionsInstruction2["CreateFixedDelegation"] = 1] = "CreateFixedDelegation";
@@ -2965,65 +3313,69 @@ var SubscriptionsInstruction = /* @__PURE__ */ ((SubscriptionsInstruction2) => {
2965
3313
  SubscriptionsInstruction2[SubscriptionsInstruction2["RevokeAbandonedDelegation"] = 15] = "RevokeAbandonedDelegation";
2966
3314
  SubscriptionsInstruction2[SubscriptionsInstruction2["RevokeAbandonedSubscription"] = 16] = "RevokeAbandonedSubscription";
2967
3315
  SubscriptionsInstruction2[SubscriptionsInstruction2["CancelSubscriptionNow"] = 17] = "CancelSubscriptionNow";
3316
+ SubscriptionsInstruction2[SubscriptionsInstruction2["ReclaimExcessRent"] = 18] = "ReclaimExcessRent";
2968
3317
  return SubscriptionsInstruction2;
2969
3318
  })(SubscriptionsInstruction || {});
2970
3319
  function identifySubscriptionsInstruction(instruction) {
2971
3320
  const data = "data" in instruction ? instruction.data : instruction;
2972
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(0), 0)) {
3321
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(0), 0)) {
2973
3322
  return 0 /* InitSubscriptionAuthority */;
2974
3323
  }
2975
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(1), 0)) {
3324
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(1), 0)) {
2976
3325
  return 1 /* CreateFixedDelegation */;
2977
3326
  }
2978
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(2), 0)) {
3327
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(2), 0)) {
2979
3328
  return 2 /* CreateRecurringDelegation */;
2980
3329
  }
2981
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(3), 0)) {
3330
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(3), 0)) {
2982
3331
  return 3 /* RevokeDelegation */;
2983
3332
  }
2984
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(4), 0)) {
3333
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(4), 0)) {
2985
3334
  return 4 /* TransferFixed */;
2986
3335
  }
2987
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(5), 0)) {
3336
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(5), 0)) {
2988
3337
  return 5 /* TransferRecurring */;
2989
3338
  }
2990
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(6), 0)) {
3339
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(6), 0)) {
2991
3340
  return 6 /* CloseSubscriptionAuthority */;
2992
3341
  }
2993
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(7), 0)) {
3342
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(7), 0)) {
2994
3343
  return 7 /* CreatePlan */;
2995
3344
  }
2996
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(8), 0)) {
3345
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(8), 0)) {
2997
3346
  return 8 /* UpdatePlan */;
2998
3347
  }
2999
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(9), 0)) {
3348
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(9), 0)) {
3000
3349
  return 9 /* DeletePlan */;
3001
3350
  }
3002
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(10), 0)) {
3351
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(10), 0)) {
3003
3352
  return 10 /* TransferSubscription */;
3004
3353
  }
3005
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(11), 0)) {
3354
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(11), 0)) {
3006
3355
  return 11 /* Subscribe */;
3007
3356
  }
3008
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(12), 0)) {
3357
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(12), 0)) {
3009
3358
  return 12 /* CancelSubscription */;
3010
3359
  }
3011
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(13), 0)) {
3360
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(13), 0)) {
3012
3361
  return 13 /* ResumeSubscription */;
3013
3362
  }
3014
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(14), 0)) {
3363
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(14), 0)) {
3015
3364
  return 14 /* RevokeSubscriptionAuthority */;
3016
3365
  }
3017
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(15), 0)) {
3366
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(15), 0)) {
3018
3367
  return 15 /* RevokeAbandonedDelegation */;
3019
3368
  }
3020
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(16), 0)) {
3369
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(16), 0)) {
3021
3370
  return 16 /* RevokeAbandonedSubscription */;
3022
3371
  }
3023
- if ((0, import_kit43.containsBytes)(data, (0, import_kit43.getU8Encoder)().encode(17), 0)) {
3372
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(17), 0)) {
3024
3373
  return 17 /* CancelSubscriptionNow */;
3025
3374
  }
3026
- throw new import_kit43.SolanaError(import_kit43.SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, {
3375
+ if ((0, import_kit46.containsBytes)(data, (0, import_kit46.getU8Encoder)().encode(18), 0)) {
3376
+ return 18 /* ReclaimExcessRent */;
3377
+ }
3378
+ throw new import_kit46.SolanaError(import_kit46.SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, {
3027
3379
  instructionData: data,
3028
3380
  programName: "subscriptions"
3029
3381
  });
@@ -3032,165 +3384,280 @@ function parseSubscriptionsInstruction(instruction) {
3032
3384
  const instructionType = identifySubscriptionsInstruction(instruction);
3033
3385
  switch (instructionType) {
3034
3386
  case 0 /* InitSubscriptionAuthority */: {
3035
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3387
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3036
3388
  return {
3037
3389
  instructionType: 0 /* InitSubscriptionAuthority */,
3038
3390
  ...parseInitSubscriptionAuthorityInstruction(instruction)
3039
3391
  };
3040
3392
  }
3041
3393
  case 1 /* CreateFixedDelegation */: {
3042
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3394
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3043
3395
  return {
3044
3396
  instructionType: 1 /* CreateFixedDelegation */,
3045
3397
  ...parseCreateFixedDelegationInstruction(instruction)
3046
3398
  };
3047
3399
  }
3048
3400
  case 2 /* CreateRecurringDelegation */: {
3049
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3401
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3050
3402
  return {
3051
3403
  instructionType: 2 /* CreateRecurringDelegation */,
3052
3404
  ...parseCreateRecurringDelegationInstruction(instruction)
3053
3405
  };
3054
3406
  }
3055
3407
  case 3 /* RevokeDelegation */: {
3056
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3408
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3057
3409
  return {
3058
3410
  instructionType: 3 /* RevokeDelegation */,
3059
3411
  ...parseRevokeDelegationInstruction(instruction)
3060
3412
  };
3061
3413
  }
3062
3414
  case 4 /* TransferFixed */: {
3063
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3415
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3064
3416
  return {
3065
3417
  instructionType: 4 /* TransferFixed */,
3066
3418
  ...parseTransferFixedInstruction(instruction)
3067
3419
  };
3068
3420
  }
3069
3421
  case 5 /* TransferRecurring */: {
3070
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3422
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3071
3423
  return {
3072
3424
  instructionType: 5 /* TransferRecurring */,
3073
3425
  ...parseTransferRecurringInstruction(instruction)
3074
3426
  };
3075
3427
  }
3076
3428
  case 6 /* CloseSubscriptionAuthority */: {
3077
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3429
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3078
3430
  return {
3079
3431
  instructionType: 6 /* CloseSubscriptionAuthority */,
3080
3432
  ...parseCloseSubscriptionAuthorityInstruction(instruction)
3081
3433
  };
3082
3434
  }
3083
3435
  case 7 /* CreatePlan */: {
3084
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3436
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3085
3437
  return { instructionType: 7 /* CreatePlan */, ...parseCreatePlanInstruction(instruction) };
3086
3438
  }
3087
3439
  case 8 /* UpdatePlan */: {
3088
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3440
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3089
3441
  return { instructionType: 8 /* UpdatePlan */, ...parseUpdatePlanInstruction(instruction) };
3090
3442
  }
3091
3443
  case 9 /* DeletePlan */: {
3092
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3444
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3093
3445
  return { instructionType: 9 /* DeletePlan */, ...parseDeletePlanInstruction(instruction) };
3094
3446
  }
3095
3447
  case 10 /* TransferSubscription */: {
3096
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3448
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3097
3449
  return {
3098
3450
  instructionType: 10 /* TransferSubscription */,
3099
3451
  ...parseTransferSubscriptionInstruction(instruction)
3100
3452
  };
3101
3453
  }
3102
3454
  case 11 /* Subscribe */: {
3103
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3455
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3104
3456
  return { instructionType: 11 /* Subscribe */, ...parseSubscribeInstruction(instruction) };
3105
3457
  }
3106
3458
  case 12 /* CancelSubscription */: {
3107
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3459
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3108
3460
  return {
3109
3461
  instructionType: 12 /* CancelSubscription */,
3110
3462
  ...parseCancelSubscriptionInstruction(instruction)
3111
3463
  };
3112
3464
  }
3113
3465
  case 13 /* ResumeSubscription */: {
3114
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3466
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3115
3467
  return {
3116
3468
  instructionType: 13 /* ResumeSubscription */,
3117
3469
  ...parseResumeSubscriptionInstruction(instruction)
3118
3470
  };
3119
3471
  }
3120
3472
  case 14 /* RevokeSubscriptionAuthority */: {
3121
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3473
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3122
3474
  return {
3123
3475
  instructionType: 14 /* RevokeSubscriptionAuthority */,
3124
3476
  ...parseRevokeSubscriptionAuthorityInstruction(instruction)
3125
3477
  };
3126
3478
  }
3127
3479
  case 15 /* RevokeAbandonedDelegation */: {
3128
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3480
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3129
3481
  return {
3130
3482
  instructionType: 15 /* RevokeAbandonedDelegation */,
3131
3483
  ...parseRevokeAbandonedDelegationInstruction(instruction)
3132
3484
  };
3133
3485
  }
3134
3486
  case 16 /* RevokeAbandonedSubscription */: {
3135
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3487
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3136
3488
  return {
3137
3489
  instructionType: 16 /* RevokeAbandonedSubscription */,
3138
3490
  ...parseRevokeAbandonedSubscriptionInstruction(instruction)
3139
3491
  };
3140
3492
  }
3141
3493
  case 17 /* CancelSubscriptionNow */: {
3142
- (0, import_kit43.assertIsInstructionWithAccounts)(instruction);
3494
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3143
3495
  return {
3144
3496
  instructionType: 17 /* CancelSubscriptionNow */,
3145
3497
  ...parseCancelSubscriptionNowInstruction(instruction)
3146
3498
  };
3147
3499
  }
3500
+ case 18 /* ReclaimExcessRent */: {
3501
+ (0, import_kit46.assertIsInstructionWithAccounts)(instruction);
3502
+ return {
3503
+ instructionType: 18 /* ReclaimExcessRent */,
3504
+ ...parseReclaimExcessRentInstruction(instruction)
3505
+ };
3506
+ }
3148
3507
  default:
3149
- throw new import_kit43.SolanaError(import_kit43.SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, {
3508
+ throw new import_kit46.SolanaError(import_kit46.SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, {
3150
3509
  instructionType,
3151
3510
  programName: "subscriptions"
3152
3511
  });
3153
3512
  }
3154
3513
  }
3155
- function subscriptionsProgram() {
3514
+ function subscriptionsProgram(config = {}) {
3156
3515
  return (client) => {
3157
- return (0, import_kit43.extendClient)(client, {
3516
+ return (0, import_kit46.extendClient)(client, {
3158
3517
  subscriptions: {
3159
3518
  accounts: {
3160
- fixedDelegation: (0, import_program_client_core19.addSelfFetchFunctions)(client, getFixedDelegationCodec()),
3161
- plan: (0, import_program_client_core19.addSelfFetchFunctions)(client, getPlanCodec()),
3162
- recurringDelegation: (0, import_program_client_core19.addSelfFetchFunctions)(client, getRecurringDelegationCodec()),
3163
- subscriptionAuthority: (0, import_program_client_core19.addSelfFetchFunctions)(client, getSubscriptionAuthorityCodec()),
3164
- subscriptionDelegation: (0, import_program_client_core19.addSelfFetchFunctions)(client, getSubscriptionDelegationCodec()),
3165
- eventAuthority: (0, import_program_client_core19.addSelfFetchFunctions)(client, getEventAuthorityCodec())
3519
+ fixedDelegation: (0, import_program_client_core20.addSelfFetchFunctions)(client, getFixedDelegationCodec()),
3520
+ plan: (0, import_program_client_core20.addSelfFetchFunctions)(client, getPlanCodec()),
3521
+ recurringDelegation: (0, import_program_client_core20.addSelfFetchFunctions)(client, getRecurringDelegationCodec()),
3522
+ subscriptionAuthority: (0, import_program_client_core20.addSelfFetchFunctions)(client, getSubscriptionAuthorityCodec()),
3523
+ subscriptionDelegation: (0, import_program_client_core20.addSelfFetchFunctions)(client, getSubscriptionDelegationCodec()),
3524
+ transferContext: (0, import_program_client_core20.addSelfFetchFunctions)(client, getTransferContextCodec()),
3525
+ eventAuthority: (0, import_program_client_core20.addSelfFetchFunctions)(client, getEventAuthorityCodec())
3166
3526
  },
3167
3527
  instructions: {
3168
- initSubscriptionAuthority: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getInitSubscriptionAuthorityInstructionAsync(input)),
3169
- createFixedDelegation: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getCreateFixedDelegationInstruction(input)),
3170
- createRecurringDelegation: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getCreateRecurringDelegationInstruction(input)),
3171
- revokeDelegation: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getRevokeDelegationInstruction(input)),
3172
- transferFixed: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getTransferFixedInstructionAsync(input)),
3173
- transferRecurring: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getTransferRecurringInstructionAsync(input)),
3174
- closeSubscriptionAuthority: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getCloseSubscriptionAuthorityInstruction(input)),
3175
- createPlan: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getCreatePlanInstruction(input)),
3176
- updatePlan: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getUpdatePlanInstructionAsync(input)),
3177
- deletePlan: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getDeletePlanInstruction(input)),
3178
- transferSubscription: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getTransferSubscriptionInstructionAsync(input)),
3179
- subscribe: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getSubscribeInstructionAsync(input)),
3180
- cancelSubscription: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getCancelSubscriptionInstructionAsync(input)),
3181
- resumeSubscription: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getResumeSubscriptionInstructionAsync(input)),
3182
- revokeSubscriptionAuthority: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getRevokeSubscriptionAuthorityInstructionAsync(input)),
3183
- revokeAbandonedDelegation: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getRevokeAbandonedDelegationInstruction(input)),
3184
- revokeAbandonedSubscription: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getRevokeAbandonedSubscriptionInstruction(input)),
3185
- cancelSubscriptionNow: (input) => (0, import_program_client_core19.addSelfPlanAndSendFunctions)(client, getCancelSubscriptionNowInstructionAsync(input))
3528
+ initSubscriptionAuthority: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3529
+ client,
3530
+ getInitSubscriptionAuthorityInstructionAsync(input, {
3531
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3532
+ })
3533
+ ),
3534
+ createFixedDelegation: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3535
+ client,
3536
+ getCreateFixedDelegationInstruction(input, {
3537
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3538
+ })
3539
+ ),
3540
+ createRecurringDelegation: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3541
+ client,
3542
+ getCreateRecurringDelegationInstruction(input, {
3543
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3544
+ })
3545
+ ),
3546
+ revokeDelegation: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3547
+ client,
3548
+ getRevokeDelegationInstruction(input, {
3549
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3550
+ })
3551
+ ),
3552
+ transferFixed: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3553
+ client,
3554
+ getTransferFixedInstructionAsync(input, {
3555
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3556
+ })
3557
+ ),
3558
+ transferRecurring: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3559
+ client,
3560
+ getTransferRecurringInstructionAsync(input, {
3561
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3562
+ })
3563
+ ),
3564
+ closeSubscriptionAuthority: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3565
+ client,
3566
+ getCloseSubscriptionAuthorityInstruction(input, {
3567
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3568
+ })
3569
+ ),
3570
+ createPlan: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3571
+ client,
3572
+ getCreatePlanInstruction(input, {
3573
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3574
+ })
3575
+ ),
3576
+ updatePlan: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3577
+ client,
3578
+ getUpdatePlanInstructionAsync(input, {
3579
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3580
+ })
3581
+ ),
3582
+ deletePlan: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3583
+ client,
3584
+ getDeletePlanInstruction(input, {
3585
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3586
+ })
3587
+ ),
3588
+ transferSubscription: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3589
+ client,
3590
+ getTransferSubscriptionInstructionAsync(input, {
3591
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3592
+ })
3593
+ ),
3594
+ subscribe: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3595
+ client,
3596
+ getSubscribeInstructionAsync(input, {
3597
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3598
+ })
3599
+ ),
3600
+ cancelSubscription: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3601
+ client,
3602
+ getCancelSubscriptionInstructionAsync(input, {
3603
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3604
+ })
3605
+ ),
3606
+ resumeSubscription: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3607
+ client,
3608
+ getResumeSubscriptionInstructionAsync(input, {
3609
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3610
+ })
3611
+ ),
3612
+ revokeSubscriptionAuthority: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3613
+ client,
3614
+ getRevokeSubscriptionAuthorityInstructionAsync(input, {
3615
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3616
+ })
3617
+ ),
3618
+ revokeAbandonedDelegation: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3619
+ client,
3620
+ getRevokeAbandonedDelegationInstruction(input, {
3621
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3622
+ })
3623
+ ),
3624
+ revokeAbandonedSubscription: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3625
+ client,
3626
+ getRevokeAbandonedSubscriptionInstruction(input, {
3627
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3628
+ })
3629
+ ),
3630
+ cancelSubscriptionNow: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3631
+ client,
3632
+ getCancelSubscriptionNowInstructionAsync(input, {
3633
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3634
+ })
3635
+ ),
3636
+ reclaimExcessRent: (input, instructionConfig) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
3637
+ client,
3638
+ getReclaimExcessRentInstruction(input, {
3639
+ programAddress: instructionConfig?.programAddress ?? config.programAddress
3640
+ })
3641
+ )
3186
3642
  },
3187
3643
  pdas: {
3188
- fixedDelegation: findFixedDelegationPda,
3189
- plan: findPlanPda,
3190
- recurringDelegation: findRecurringDelegationPda,
3191
- subscriptionAuthority: findSubscriptionAuthorityPda,
3192
- subscriptionDelegation: findSubscriptionDelegationPda,
3193
- eventAuthority: findEventAuthorityPda
3644
+ fixedDelegation: (seeds, pdaConfig2) => findFixedDelegationPda(seeds, {
3645
+ programAddress: pdaConfig2?.programAddress ?? config.programAddress
3646
+ }),
3647
+ plan: (seeds, pdaConfig2) => findPlanPda(seeds, { programAddress: pdaConfig2?.programAddress ?? config.programAddress }),
3648
+ recurringDelegation: (seeds, pdaConfig2) => findRecurringDelegationPda(seeds, {
3649
+ programAddress: pdaConfig2?.programAddress ?? config.programAddress
3650
+ }),
3651
+ subscriptionAuthority: (seeds, pdaConfig2) => findSubscriptionAuthorityPda(seeds, {
3652
+ programAddress: pdaConfig2?.programAddress ?? config.programAddress
3653
+ }),
3654
+ subscriptionDelegation: (seeds, pdaConfig2) => findSubscriptionDelegationPda(seeds, {
3655
+ programAddress: pdaConfig2?.programAddress ?? config.programAddress
3656
+ }),
3657
+ transferContext: (seeds, pdaConfig2) => findTransferContextPda(seeds, {
3658
+ programAddress: pdaConfig2?.programAddress ?? config.programAddress
3659
+ }),
3660
+ eventAuthority: (pdaConfig2) => findEventAuthorityPda({ programAddress: pdaConfig2?.programAddress ?? config.programAddress })
3194
3661
  },
3195
3662
  identifyInstruction: identifySubscriptionsInstruction,
3196
3663
  parseInstruction: parseSubscriptionsInstruction
@@ -3238,6 +3705,7 @@ var SUBSCRIPTIONS_ERROR__MIGRATION_REQUIRED = 134;
3238
3705
  var SUBSCRIPTIONS_ERROR__DELEGATION_ALREADY_EXISTS = 135;
3239
3706
  var SUBSCRIPTIONS_ERROR__STALE_SUBSCRIPTION_AUTHORITY = 136;
3240
3707
  var SUBSCRIPTIONS_ERROR__TRANSFER_HOOK_TOO_MANY_ACCOUNTS = 137;
3708
+ var SUBSCRIPTIONS_ERROR__NO_EXCESS_LAMPORTS = 138;
3241
3709
  var SUBSCRIPTIONS_ERROR__AMOUNT_EXCEEDS_LIMIT = 300;
3242
3710
  var SUBSCRIPTIONS_ERROR__FIXED_DELEGATION_EXPIRY_IN_PAST = 301;
3243
3711
  var SUBSCRIPTIONS_ERROR__FIXED_DELEGATION_AMOUNT_ZERO = 302;
@@ -3331,6 +3799,7 @@ if (process.env["NODE_ENV"] !== "production") {
3331
3799
  [SUBSCRIPTIONS_ERROR__MINT_HAS_TRANSFER_FEE]: `Mint has TransferFee extension`,
3332
3800
  [SUBSCRIPTIONS_ERROR__MINT_HAS_TRANSFER_HOOK]: `Mint has TransferHook extension`,
3333
3801
  [SUBSCRIPTIONS_ERROR__MINT_MISMATCH]: `Token mint mismatch`,
3802
+ [SUBSCRIPTIONS_ERROR__NO_EXCESS_LAMPORTS]: `Account holds no lamports above the rent-exempt minimum`,
3334
3803
  [SUBSCRIPTIONS_ERROR__NOT_ENOUGH_ACCOUNT_KEYS]: `Not enough account keys provided`,
3335
3804
  [SUBSCRIPTIONS_ERROR__NOT_PLAN_OWNER]: `Caller is not the plan owner`,
3336
3805
  [SUBSCRIPTIONS_ERROR__NOT_SIGNER]: `Account must be a signer`,
@@ -3367,8 +3836,359 @@ function getSubscriptionsErrorMessage(code) {
3367
3836
  }
3368
3837
  return "Error message not available in production bundles.";
3369
3838
  }
3370
- function isSubscriptionsError(error, transactionMessage, code) {
3371
- return (0, import_kit44.isProgramError)(error, transactionMessage, SUBSCRIPTIONS_PROGRAM_ADDRESS, code);
3839
+ function isSubscriptionsError(error, transactionMessage, code, config = {}) {
3840
+ const programAddressInput = config.programAddress ?? SUBSCRIPTIONS_PROGRAM_ADDRESS;
3841
+ const programAddress = typeof programAddressInput === "string" ? programAddressInput : programAddressInput.address;
3842
+ return (0, import_kit47.isProgramError)(error, transactionMessage, programAddress, code);
3843
+ }
3844
+
3845
+ // src/generated/events/fixedTransferEvent.ts
3846
+ var import_kit48 = require("@solana/kit");
3847
+ var FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR = new Uint8Array([
3848
+ 228,
3849
+ 69,
3850
+ 165,
3851
+ 46,
3852
+ 81,
3853
+ 203,
3854
+ 154,
3855
+ 29
3856
+ ]);
3857
+ function getFixedTransferEventEventDiscriminatorBytes() {
3858
+ return (0, import_kit48.getBytesEncoder)().encode(FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR);
3859
+ }
3860
+ var FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR2 = new Uint8Array([3]);
3861
+ function getFixedTransferEventEventDiscriminator2Bytes() {
3862
+ return (0, import_kit48.getBytesEncoder)().encode(FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR2);
3863
+ }
3864
+ function getFixedTransferEventEventEncoder() {
3865
+ return (0, import_kit48.getStructEncoder)([
3866
+ ["delegation", (0, import_kit48.getAddressEncoder)()],
3867
+ ["delegator", (0, import_kit48.getAddressEncoder)()],
3868
+ ["delegatee", (0, import_kit48.getAddressEncoder)()],
3869
+ ["mint", (0, import_kit48.getAddressEncoder)()],
3870
+ ["amount", (0, import_kit48.getU64Encoder)()],
3871
+ ["remainingAmount", (0, import_kit48.getU64Encoder)()],
3872
+ ["receiver", (0, import_kit48.getAddressEncoder)()],
3873
+ ["receiverTokenAccount", (0, import_kit48.getAddressEncoder)()]
3874
+ ]);
3875
+ }
3876
+ function getFixedTransferEventEventDecoder() {
3877
+ return (0, import_kit48.getStructDecoder)([
3878
+ ["delegation", (0, import_kit48.getAddressDecoder)()],
3879
+ ["delegator", (0, import_kit48.getAddressDecoder)()],
3880
+ ["delegatee", (0, import_kit48.getAddressDecoder)()],
3881
+ ["mint", (0, import_kit48.getAddressDecoder)()],
3882
+ ["amount", (0, import_kit48.getU64Decoder)()],
3883
+ ["remainingAmount", (0, import_kit48.getU64Decoder)()],
3884
+ ["receiver", (0, import_kit48.getAddressDecoder)()],
3885
+ ["receiverTokenAccount", (0, import_kit48.getAddressDecoder)()]
3886
+ ]);
3887
+ }
3888
+ function getFixedTransferEventEventCodec() {
3889
+ return (0, import_kit48.combineCodec)(getFixedTransferEventEventEncoder(), getFixedTransferEventEventDecoder());
3890
+ }
3891
+ function parseFixedTransferEventEvent(data) {
3892
+ if ((0, import_kit48.containsBytes)(data, FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR, 0) && (0, import_kit48.containsBytes)(data, FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR2, 8)) {
3893
+ return getFixedTransferEventEventDecoder().decode(data);
3894
+ }
3895
+ throw new Error('The provided data does not match the "FixedTransferEventEvent" event discriminators.');
3896
+ }
3897
+
3898
+ // src/generated/events/planUpdatedEvent.ts
3899
+ var import_kit49 = require("@solana/kit");
3900
+ var PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR = new Uint8Array([
3901
+ 228,
3902
+ 69,
3903
+ 165,
3904
+ 46,
3905
+ 81,
3906
+ 203,
3907
+ 154,
3908
+ 29
3909
+ ]);
3910
+ function getPlanUpdatedEventEventDiscriminatorBytes() {
3911
+ return (0, import_kit49.getBytesEncoder)().encode(PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR);
3912
+ }
3913
+ var PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR2 = new Uint8Array([6]);
3914
+ function getPlanUpdatedEventEventDiscriminator2Bytes() {
3915
+ return (0, import_kit49.getBytesEncoder)().encode(PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR2);
3916
+ }
3917
+ function getPlanUpdatedEventEventEncoder() {
3918
+ return (0, import_kit49.getStructEncoder)([
3919
+ ["plan", (0, import_kit49.getAddressEncoder)()],
3920
+ ["owner", (0, import_kit49.getAddressEncoder)()],
3921
+ ["status", (0, import_kit49.getU8Encoder)()],
3922
+ ["endTs", (0, import_kit49.getI64Encoder)()],
3923
+ ["pullers", (0, import_kit49.getArrayEncoder)((0, import_kit49.getAddressEncoder)(), { size: 4 })]
3924
+ ]);
3925
+ }
3926
+ function getPlanUpdatedEventEventDecoder() {
3927
+ return (0, import_kit49.getStructDecoder)([
3928
+ ["plan", (0, import_kit49.getAddressDecoder)()],
3929
+ ["owner", (0, import_kit49.getAddressDecoder)()],
3930
+ ["status", (0, import_kit49.getU8Decoder)()],
3931
+ ["endTs", (0, import_kit49.getI64Decoder)()],
3932
+ ["pullers", (0, import_kit49.getArrayDecoder)((0, import_kit49.getAddressDecoder)(), { size: 4 })]
3933
+ ]);
3934
+ }
3935
+ function getPlanUpdatedEventEventCodec() {
3936
+ return (0, import_kit49.combineCodec)(getPlanUpdatedEventEventEncoder(), getPlanUpdatedEventEventDecoder());
3937
+ }
3938
+ function parsePlanUpdatedEventEvent(data) {
3939
+ if ((0, import_kit49.containsBytes)(data, PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR, 0) && (0, import_kit49.containsBytes)(data, PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR2, 8)) {
3940
+ return getPlanUpdatedEventEventDecoder().decode(data);
3941
+ }
3942
+ throw new Error('The provided data does not match the "PlanUpdatedEventEvent" event discriminators.');
3943
+ }
3944
+
3945
+ // src/generated/events/recurringTransferEvent.ts
3946
+ var import_kit50 = require("@solana/kit");
3947
+ var RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR = new Uint8Array([
3948
+ 228,
3949
+ 69,
3950
+ 165,
3951
+ 46,
3952
+ 81,
3953
+ 203,
3954
+ 154,
3955
+ 29
3956
+ ]);
3957
+ function getRecurringTransferEventEventDiscriminatorBytes() {
3958
+ return (0, import_kit50.getBytesEncoder)().encode(RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR);
3959
+ }
3960
+ var RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR2 = new Uint8Array([4]);
3961
+ function getRecurringTransferEventEventDiscriminator2Bytes() {
3962
+ return (0, import_kit50.getBytesEncoder)().encode(RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR2);
3963
+ }
3964
+ function getRecurringTransferEventEventEncoder() {
3965
+ return (0, import_kit50.getStructEncoder)([
3966
+ ["delegation", (0, import_kit50.getAddressEncoder)()],
3967
+ ["delegator", (0, import_kit50.getAddressEncoder)()],
3968
+ ["delegatee", (0, import_kit50.getAddressEncoder)()],
3969
+ ["mint", (0, import_kit50.getAddressEncoder)()],
3970
+ ["amount", (0, import_kit50.getU64Encoder)()],
3971
+ ["periodStartTs", (0, import_kit50.getI64Encoder)()],
3972
+ ["periodEndTs", (0, import_kit50.getI64Encoder)()],
3973
+ ["amountPulledInPeriod", (0, import_kit50.getU64Encoder)()],
3974
+ ["receiver", (0, import_kit50.getAddressEncoder)()],
3975
+ ["receiverTokenAccount", (0, import_kit50.getAddressEncoder)()]
3976
+ ]);
3977
+ }
3978
+ function getRecurringTransferEventEventDecoder() {
3979
+ return (0, import_kit50.getStructDecoder)([
3980
+ ["delegation", (0, import_kit50.getAddressDecoder)()],
3981
+ ["delegator", (0, import_kit50.getAddressDecoder)()],
3982
+ ["delegatee", (0, import_kit50.getAddressDecoder)()],
3983
+ ["mint", (0, import_kit50.getAddressDecoder)()],
3984
+ ["amount", (0, import_kit50.getU64Decoder)()],
3985
+ ["periodStartTs", (0, import_kit50.getI64Decoder)()],
3986
+ ["periodEndTs", (0, import_kit50.getI64Decoder)()],
3987
+ ["amountPulledInPeriod", (0, import_kit50.getU64Decoder)()],
3988
+ ["receiver", (0, import_kit50.getAddressDecoder)()],
3989
+ ["receiverTokenAccount", (0, import_kit50.getAddressDecoder)()]
3990
+ ]);
3991
+ }
3992
+ function getRecurringTransferEventEventCodec() {
3993
+ return (0, import_kit50.combineCodec)(getRecurringTransferEventEventEncoder(), getRecurringTransferEventEventDecoder());
3994
+ }
3995
+ function parseRecurringTransferEventEvent(data) {
3996
+ if ((0, import_kit50.containsBytes)(data, RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR, 0) && (0, import_kit50.containsBytes)(data, RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR2, 8)) {
3997
+ return getRecurringTransferEventEventDecoder().decode(data);
3998
+ }
3999
+ throw new Error('The provided data does not match the "RecurringTransferEventEvent" event discriminators.');
4000
+ }
4001
+
4002
+ // src/generated/events/subscriptionCancelledEvent.ts
4003
+ var import_kit51 = require("@solana/kit");
4004
+ var SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR = new Uint8Array([
4005
+ 228,
4006
+ 69,
4007
+ 165,
4008
+ 46,
4009
+ 81,
4010
+ 203,
4011
+ 154,
4012
+ 29
4013
+ ]);
4014
+ function getSubscriptionCancelledEventEventDiscriminatorBytes() {
4015
+ return (0, import_kit51.getBytesEncoder)().encode(SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR);
4016
+ }
4017
+ var SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR2 = new Uint8Array([1]);
4018
+ function getSubscriptionCancelledEventEventDiscriminator2Bytes() {
4019
+ return (0, import_kit51.getBytesEncoder)().encode(SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR2);
4020
+ }
4021
+ function getSubscriptionCancelledEventEventEncoder() {
4022
+ return (0, import_kit51.getStructEncoder)([
4023
+ ["plan", (0, import_kit51.getAddressEncoder)()],
4024
+ ["subscriber", (0, import_kit51.getAddressEncoder)()],
4025
+ ["expiresAtTs", (0, import_kit51.getI64Encoder)()]
4026
+ ]);
4027
+ }
4028
+ function getSubscriptionCancelledEventEventDecoder() {
4029
+ return (0, import_kit51.getStructDecoder)([
4030
+ ["plan", (0, import_kit51.getAddressDecoder)()],
4031
+ ["subscriber", (0, import_kit51.getAddressDecoder)()],
4032
+ ["expiresAtTs", (0, import_kit51.getI64Decoder)()]
4033
+ ]);
4034
+ }
4035
+ function getSubscriptionCancelledEventEventCodec() {
4036
+ return (0, import_kit51.combineCodec)(getSubscriptionCancelledEventEventEncoder(), getSubscriptionCancelledEventEventDecoder());
4037
+ }
4038
+ function parseSubscriptionCancelledEventEvent(data) {
4039
+ if ((0, import_kit51.containsBytes)(data, SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR, 0) && (0, import_kit51.containsBytes)(data, SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR2, 8)) {
4040
+ return getSubscriptionCancelledEventEventDecoder().decode(data);
4041
+ }
4042
+ throw new Error('The provided data does not match the "SubscriptionCancelledEventEvent" event discriminators.');
4043
+ }
4044
+
4045
+ // src/generated/events/subscriptionCreatedEvent.ts
4046
+ var import_kit52 = require("@solana/kit");
4047
+ var SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR = new Uint8Array([
4048
+ 228,
4049
+ 69,
4050
+ 165,
4051
+ 46,
4052
+ 81,
4053
+ 203,
4054
+ 154,
4055
+ 29
4056
+ ]);
4057
+ function getSubscriptionCreatedEventEventDiscriminatorBytes() {
4058
+ return (0, import_kit52.getBytesEncoder)().encode(SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR);
4059
+ }
4060
+ var SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR2 = new Uint8Array([0]);
4061
+ function getSubscriptionCreatedEventEventDiscriminator2Bytes() {
4062
+ return (0, import_kit52.getBytesEncoder)().encode(SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR2);
4063
+ }
4064
+ function getSubscriptionCreatedEventEventEncoder() {
4065
+ return (0, import_kit52.getStructEncoder)([
4066
+ ["plan", (0, import_kit52.getAddressEncoder)()],
4067
+ ["subscriber", (0, import_kit52.getAddressEncoder)()],
4068
+ ["mint", (0, import_kit52.getAddressEncoder)()],
4069
+ ["createdTs", (0, import_kit52.getI64Encoder)()],
4070
+ ["payer", (0, import_kit52.getAddressEncoder)()]
4071
+ ]);
4072
+ }
4073
+ function getSubscriptionCreatedEventEventDecoder() {
4074
+ return (0, import_kit52.getStructDecoder)([
4075
+ ["plan", (0, import_kit52.getAddressDecoder)()],
4076
+ ["subscriber", (0, import_kit52.getAddressDecoder)()],
4077
+ ["mint", (0, import_kit52.getAddressDecoder)()],
4078
+ ["createdTs", (0, import_kit52.getI64Decoder)()],
4079
+ ["payer", (0, import_kit52.getAddressDecoder)()]
4080
+ ]);
4081
+ }
4082
+ function getSubscriptionCreatedEventEventCodec() {
4083
+ return (0, import_kit52.combineCodec)(getSubscriptionCreatedEventEventEncoder(), getSubscriptionCreatedEventEventDecoder());
4084
+ }
4085
+ function parseSubscriptionCreatedEventEvent(data) {
4086
+ if ((0, import_kit52.containsBytes)(data, SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR, 0) && (0, import_kit52.containsBytes)(data, SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR2, 8)) {
4087
+ return getSubscriptionCreatedEventEventDecoder().decode(data);
4088
+ }
4089
+ throw new Error('The provided data does not match the "SubscriptionCreatedEventEvent" event discriminators.');
4090
+ }
4091
+
4092
+ // src/generated/events/subscriptionResumedEvent.ts
4093
+ var import_kit53 = require("@solana/kit");
4094
+ var SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR = new Uint8Array([
4095
+ 228,
4096
+ 69,
4097
+ 165,
4098
+ 46,
4099
+ 81,
4100
+ 203,
4101
+ 154,
4102
+ 29
4103
+ ]);
4104
+ function getSubscriptionResumedEventEventDiscriminatorBytes() {
4105
+ return (0, import_kit53.getBytesEncoder)().encode(SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR);
4106
+ }
4107
+ var SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR2 = new Uint8Array([5]);
4108
+ function getSubscriptionResumedEventEventDiscriminator2Bytes() {
4109
+ return (0, import_kit53.getBytesEncoder)().encode(SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR2);
4110
+ }
4111
+ function getSubscriptionResumedEventEventEncoder() {
4112
+ return (0, import_kit53.getStructEncoder)([
4113
+ ["plan", (0, import_kit53.getAddressEncoder)()],
4114
+ ["subscriber", (0, import_kit53.getAddressEncoder)()],
4115
+ ["resumedTs", (0, import_kit53.getI64Encoder)()]
4116
+ ]);
4117
+ }
4118
+ function getSubscriptionResumedEventEventDecoder() {
4119
+ return (0, import_kit53.getStructDecoder)([
4120
+ ["plan", (0, import_kit53.getAddressDecoder)()],
4121
+ ["subscriber", (0, import_kit53.getAddressDecoder)()],
4122
+ ["resumedTs", (0, import_kit53.getI64Decoder)()]
4123
+ ]);
4124
+ }
4125
+ function getSubscriptionResumedEventEventCodec() {
4126
+ return (0, import_kit53.combineCodec)(getSubscriptionResumedEventEventEncoder(), getSubscriptionResumedEventEventDecoder());
4127
+ }
4128
+ function parseSubscriptionResumedEventEvent(data) {
4129
+ if ((0, import_kit53.containsBytes)(data, SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR, 0) && (0, import_kit53.containsBytes)(data, SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR2, 8)) {
4130
+ return getSubscriptionResumedEventEventDecoder().decode(data);
4131
+ }
4132
+ throw new Error('The provided data does not match the "SubscriptionResumedEventEvent" event discriminators.');
4133
+ }
4134
+
4135
+ // src/generated/events/subscriptionTransferEvent.ts
4136
+ var import_kit54 = require("@solana/kit");
4137
+ var SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR = new Uint8Array([
4138
+ 228,
4139
+ 69,
4140
+ 165,
4141
+ 46,
4142
+ 81,
4143
+ 203,
4144
+ 154,
4145
+ 29
4146
+ ]);
4147
+ function getSubscriptionTransferEventEventDiscriminatorBytes() {
4148
+ return (0, import_kit54.getBytesEncoder)().encode(SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR);
4149
+ }
4150
+ var SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR2 = new Uint8Array([2]);
4151
+ function getSubscriptionTransferEventEventDiscriminator2Bytes() {
4152
+ return (0, import_kit54.getBytesEncoder)().encode(SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR2);
4153
+ }
4154
+ function getSubscriptionTransferEventEventEncoder() {
4155
+ return (0, import_kit54.getStructEncoder)([
4156
+ ["subscription", (0, import_kit54.getAddressEncoder)()],
4157
+ ["plan", (0, import_kit54.getAddressEncoder)()],
4158
+ ["delegator", (0, import_kit54.getAddressEncoder)()],
4159
+ ["mint", (0, import_kit54.getAddressEncoder)()],
4160
+ ["amount", (0, import_kit54.getU64Encoder)()],
4161
+ ["periodStartTs", (0, import_kit54.getI64Encoder)()],
4162
+ ["periodEndTs", (0, import_kit54.getI64Encoder)()],
4163
+ ["amountPulledInPeriod", (0, import_kit54.getU64Encoder)()],
4164
+ ["receiver", (0, import_kit54.getAddressEncoder)()],
4165
+ ["receiverTokenAccount", (0, import_kit54.getAddressEncoder)()],
4166
+ ["puller", (0, import_kit54.getAddressEncoder)()]
4167
+ ]);
4168
+ }
4169
+ function getSubscriptionTransferEventEventDecoder() {
4170
+ return (0, import_kit54.getStructDecoder)([
4171
+ ["subscription", (0, import_kit54.getAddressDecoder)()],
4172
+ ["plan", (0, import_kit54.getAddressDecoder)()],
4173
+ ["delegator", (0, import_kit54.getAddressDecoder)()],
4174
+ ["mint", (0, import_kit54.getAddressDecoder)()],
4175
+ ["amount", (0, import_kit54.getU64Decoder)()],
4176
+ ["periodStartTs", (0, import_kit54.getI64Decoder)()],
4177
+ ["periodEndTs", (0, import_kit54.getI64Decoder)()],
4178
+ ["amountPulledInPeriod", (0, import_kit54.getU64Decoder)()],
4179
+ ["receiver", (0, import_kit54.getAddressDecoder)()],
4180
+ ["receiverTokenAccount", (0, import_kit54.getAddressDecoder)()],
4181
+ ["puller", (0, import_kit54.getAddressDecoder)()]
4182
+ ]);
4183
+ }
4184
+ function getSubscriptionTransferEventEventCodec() {
4185
+ return (0, import_kit54.combineCodec)(getSubscriptionTransferEventEventEncoder(), getSubscriptionTransferEventEventDecoder());
4186
+ }
4187
+ function parseSubscriptionTransferEventEvent(data) {
4188
+ if ((0, import_kit54.containsBytes)(data, SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR, 0) && (0, import_kit54.containsBytes)(data, SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR2, 8)) {
4189
+ return getSubscriptionTransferEventEventDecoder().decode(data);
4190
+ }
4191
+ throw new Error('The provided data does not match the "SubscriptionTransferEventEvent" event discriminators.');
3372
4192
  }
3373
4193
 
3374
4194
  // src/constants.ts
@@ -3394,7 +4214,7 @@ var UNKNOWN_INIT_ID = -9223372036854775808n;
3394
4214
 
3395
4215
  // src/accounts/decode.ts
3396
4216
  function toEncodedAccount(raw, programAddress) {
3397
- const base64Encoder = (0, import_kit45.getBase64Encoder)();
4217
+ const base64Encoder = (0, import_kit55.getBase64Encoder)();
3398
4218
  const data = base64Encoder.encode(raw.account.data[0]);
3399
4219
  return {
3400
4220
  address: raw.pubkey,
@@ -3511,12 +4331,30 @@ async function fetchSubscriptionsForUser(rpc, user, programAddress) {
3511
4331
  }
3512
4332
 
3513
4333
  // src/plugin.ts
3514
- var import_kit47 = require("@solana/kit");
3515
- var import_program_client_core20 = require("@solana/program-client-core");
4334
+ var import_kit57 = require("@solana/kit");
4335
+ var import_program_client_core21 = require("@solana/program-client-core");
3516
4336
  var import_token = require("@solana-program/token");
3517
4337
 
4338
+ // src/transfer-context.ts
4339
+ var TRANSFER_CONTEXT_VERSION = 1;
4340
+ async function buildPendingTransferContext(input) {
4341
+ const [address] = await findTransferContextPda(
4342
+ { subscriptionAuthority: input.subscriptionAuthority },
4343
+ { programAddress: input.programAddress }
4344
+ );
4345
+ const data = getTransferContextEncoder().encode({
4346
+ delegation: input.delegation,
4347
+ delegationKind: input.delegationKind,
4348
+ discriminator: 5 /* TransferContext */,
4349
+ initiator: input.initiator,
4350
+ version: TRANSFER_CONTEXT_VERSION
4351
+ });
4352
+ return { address, data, initiator: input.initiator };
4353
+ }
4354
+
3518
4355
  // src/transfer-hook.ts
3519
- var import_kit46 = require("@solana/kit");
4356
+ var import_kit56 = require("@solana/kit");
4357
+ var import_system = require("@solana-program/system");
3520
4358
  var import_token_2022 = require("@solana-program/token-2022");
3521
4359
  var DEFAULT_ADDRESS = "11111111111111111111111111111111";
3522
4360
  var EXTRA_ACCOUNT_METAS_SEED = "extra-account-metas";
@@ -3526,16 +4364,17 @@ var EXTRA_ACCOUNT_META_LEN = 35;
3526
4364
  var ADDRESS_LEN = 32;
3527
4365
  var PDA_PROGRAM_INDEX_OFFSET = 1 << 7;
3528
4366
  var EXECUTE_DISCRIMINATOR = Uint8Array.from([105, 37, 101, 197, 75, 251, 102, 26]);
3529
- var addressDecoder = (0, import_kit46.getAddressDecoder)();
3530
- var addressEncoder = (0, import_kit46.getAddressEncoder)();
4367
+ var addressDecoder = (0, import_kit56.getAddressDecoder)();
4368
+ var addressEncoder = (0, import_kit56.getAddressEncoder)();
3531
4369
  function roleFor(isSigner, isWritable) {
3532
- if (isSigner && isWritable) return import_kit46.AccountRole.WRITABLE_SIGNER;
3533
- if (isSigner) return import_kit46.AccountRole.READONLY_SIGNER;
3534
- if (isWritable) return import_kit46.AccountRole.WRITABLE;
3535
- return import_kit46.AccountRole.READONLY;
3536
- }
3537
- async function fetchData(rpc, address) {
3538
- const account = await (0, import_kit46.fetchEncodedAccount)(rpc, address);
4370
+ if (isSigner && isWritable) return import_kit56.AccountRole.WRITABLE_SIGNER;
4371
+ if (isSigner) return import_kit56.AccountRole.READONLY_SIGNER;
4372
+ if (isWritable) return import_kit56.AccountRole.WRITABLE;
4373
+ return import_kit56.AccountRole.READONLY;
4374
+ }
4375
+ async function fetchData(rpc, address, pending) {
4376
+ if (pending && pending.address === address) return pending.data;
4377
+ const account = await (0, import_kit56.fetchEncodedAccount)(rpc, address);
3539
4378
  if (!account.exists) throw new Error("transfer hook: referenced account not found");
3540
4379
  return account.data;
3541
4380
  }
@@ -3564,7 +4403,7 @@ function readMetas(data) {
3564
4403
  }
3565
4404
  return metas;
3566
4405
  }
3567
- async function unpackSeeds(config, previous, instructionData, rpc) {
4406
+ async function unpackSeeds(config, previous, instructionData, rpc, pending) {
3568
4407
  const seeds = [];
3569
4408
  let i = 0;
3570
4409
  while (i < 32) {
@@ -3584,7 +4423,7 @@ async function unpackSeeds(config, previous, instructionData, rpc) {
3584
4423
  i += 2;
3585
4424
  } else if (discriminator === 4) {
3586
4425
  const [accountIndex, dataIndex, length] = [rest[0], rest[1], rest[2]];
3587
- const data = await fetchData(rpc, previous[accountIndex].address);
4426
+ const data = await fetchData(rpc, previous[accountIndex].address, pending);
3588
4427
  seeds.push(data.subarray(dataIndex, dataIndex + length));
3589
4428
  i += 4;
3590
4429
  } else {
@@ -3593,7 +4432,7 @@ async function unpackSeeds(config, previous, instructionData, rpc) {
3593
4432
  }
3594
4433
  return seeds;
3595
4434
  }
3596
- async function unpackAddressData(config, previous, instructionData, rpc) {
4435
+ async function unpackAddressData(config, previous, instructionData, rpc, pending) {
3597
4436
  const rest = config.subarray(1);
3598
4437
  if (config[0] === 1) {
3599
4438
  const offset = rest[0];
@@ -3601,22 +4440,22 @@ async function unpackAddressData(config, previous, instructionData, rpc) {
3601
4440
  }
3602
4441
  if (config[0] === 2) {
3603
4442
  const [accountIndex, offset] = [rest[0], rest[1]];
3604
- const data = await fetchData(rpc, previous[accountIndex].address);
4443
+ const data = await fetchData(rpc, previous[accountIndex].address, pending);
3605
4444
  return addressDecoder.decode(data.subarray(offset, offset + ADDRESS_LEN));
3606
4445
  }
3607
4446
  throw new Error("transfer hook: invalid address data");
3608
4447
  }
3609
- async function resolveMeta(meta, previous, instructionData, hookProgram, rpc) {
4448
+ async function resolveMeta(meta, previous, instructionData, hookProgram, rpc, pending) {
3610
4449
  const role = roleFor(meta.isSigner, meta.isWritable);
3611
4450
  if (meta.discriminator === 0) {
3612
4451
  return { address: addressDecoder.decode(meta.addressConfig), role };
3613
4452
  }
3614
4453
  if (meta.discriminator === 2) {
3615
- return { address: await unpackAddressData(meta.addressConfig, previous, instructionData, rpc), role };
4454
+ return { address: await unpackAddressData(meta.addressConfig, previous, instructionData, rpc, pending), role };
3616
4455
  }
3617
4456
  const programId = meta.discriminator === 1 ? hookProgram : previous[meta.discriminator - PDA_PROGRAM_INDEX_OFFSET].address;
3618
- const seeds = await unpackSeeds(meta.addressConfig, previous, instructionData, rpc);
3619
- const [pda] = await (0, import_kit46.getProgramDerivedAddress)({ programAddress: programId, seeds });
4457
+ const seeds = await unpackSeeds(meta.addressConfig, previous, instructionData, rpc, pending);
4458
+ const [pda] = await (0, import_kit56.getProgramDerivedAddress)({ programAddress: programId, seeds });
3620
4459
  return { address: pda, role };
3621
4460
  }
3622
4461
  async function resolveTransferHookAccounts(rpc, args) {
@@ -3627,29 +4466,39 @@ async function resolveTransferHookAccounts(rpc, args) {
3627
4466
  const hook = extensions.find((extension) => extension.__kind === "TransferHook");
3628
4467
  if (!hook || hook.programId === DEFAULT_ADDRESS) return [];
3629
4468
  const hookProgram = hook.programId;
3630
- const [validationPda] = await (0, import_kit46.getProgramDerivedAddress)({
4469
+ const [validationPda] = await (0, import_kit56.getProgramDerivedAddress)({
3631
4470
  programAddress: hookProgram,
3632
4471
  seeds: [EXTRA_ACCOUNT_METAS_SEED, addressEncoder.encode(args.mint)]
3633
4472
  });
3634
4473
  const trailing = [
3635
- { address: hookProgram, role: import_kit46.AccountRole.READONLY },
3636
- { address: validationPda, role: import_kit46.AccountRole.READONLY }
4474
+ { address: hookProgram, role: import_kit56.AccountRole.READONLY },
4475
+ { address: validationPda, role: import_kit56.AccountRole.READONLY }
3637
4476
  ];
3638
- const validationAccount = await (0, import_kit46.fetchEncodedAccount)(rpc, validationPda);
4477
+ const validationAccount = await (0, import_kit56.fetchEncodedAccount)(rpc, validationPda);
3639
4478
  if (!validationAccount.exists) return trailing;
3640
4479
  const instructionData = executeInstructionData(args.amount);
3641
4480
  const previous = [
3642
- { address: args.source, role: import_kit46.AccountRole.READONLY },
3643
- { address: args.mint, role: import_kit46.AccountRole.READONLY },
3644
- { address: args.destination, role: import_kit46.AccountRole.READONLY },
3645
- { address: args.authority, role: import_kit46.AccountRole.READONLY },
3646
- { address: validationPda, role: import_kit46.AccountRole.READONLY }
4481
+ { address: args.source, role: import_kit56.AccountRole.READONLY },
4482
+ { address: args.mint, role: import_kit56.AccountRole.READONLY },
4483
+ { address: args.destination, role: import_kit56.AccountRole.READONLY },
4484
+ { address: args.authority, role: import_kit56.AccountRole.READONLY },
4485
+ { address: validationPda, role: import_kit56.AccountRole.READONLY }
3647
4486
  ];
4487
+ let contextInitiator;
3648
4488
  for (const meta of readMetas(validationAccount.data)) {
3649
- const resolved = await resolveMeta(meta, previous, instructionData, hookProgram, rpc);
4489
+ const resolved = await resolveMeta(meta, previous, instructionData, hookProgram, rpc, args.transferContext);
3650
4490
  previous.push(resolved);
4491
+ if (args.transferContext && resolved.address === args.transferContext.address) {
4492
+ contextInitiator = args.transferContext.initiator;
4493
+ trailing.push({ address: resolved.address, role: import_kit56.AccountRole.WRITABLE });
4494
+ continue;
4495
+ }
3651
4496
  trailing.push(resolved);
3652
4497
  }
4498
+ if (contextInitiator) {
4499
+ trailing.push({ address: import_system.SYSTEM_PROGRAM_ADDRESS, role: import_kit56.AccountRole.READONLY });
4500
+ trailing.push({ address: contextInitiator, role: import_kit56.AccountRole.WRITABLE });
4501
+ }
3653
4502
  return trailing;
3654
4503
  }
3655
4504
 
@@ -3708,7 +4557,7 @@ function appendPayer(instruction, payer) {
3708
4557
  return withTrailing(instruction, [
3709
4558
  {
3710
4559
  address: payer.address,
3711
- role: import_kit47.AccountRole.WRITABLE_SIGNER,
4560
+ role: import_kit57.AccountRole.WRITABLE_SIGNER,
3712
4561
  signer: payer
3713
4562
  }
3714
4563
  ]);
@@ -3737,7 +4586,7 @@ async function getCloseSubscriptionAuthorityOverlayInstructionAsync(input) {
3737
4586
  pdaConfig(input.programAddress)
3738
4587
  );
3739
4588
  if (input.receiver) {
3740
- ix = withTrailing(ix, [{ address: input.receiver, role: import_kit47.AccountRole.WRITABLE }]);
4589
+ ix = withTrailing(ix, [{ address: input.receiver, role: import_kit57.AccountRole.WRITABLE }]);
3741
4590
  }
3742
4591
  return ix;
3743
4592
  }
@@ -3762,7 +4611,7 @@ async function getRevokeSubscriptionAuthorityOverlayInstructionAsync(input) {
3762
4611
  pdaConfig(input.programAddress)
3763
4612
  );
3764
4613
  if (input.receiver) {
3765
- ix = withTrailing(ix, [{ address: input.receiver, role: import_kit47.AccountRole.WRITABLE }]);
4614
+ ix = withTrailing(ix, [{ address: input.receiver, role: import_kit57.AccountRole.WRITABLE }]);
3766
4615
  }
3767
4616
  return ix;
3768
4617
  }
@@ -3856,14 +4705,14 @@ function getRevokeDelegationOverlayInstruction(input) {
3856
4705
  pdaConfig(input.programAddress)
3857
4706
  );
3858
4707
  if (input.receiver) {
3859
- ix = withTrailing(ix, [{ address: input.receiver, role: import_kit47.AccountRole.WRITABLE }]);
4708
+ ix = withTrailing(ix, [{ address: input.receiver, role: import_kit57.AccountRole.WRITABLE }]);
3860
4709
  }
3861
4710
  return ix;
3862
4711
  }
3863
4712
  function getRevokeSubscriptionOverlayInstruction(input) {
3864
- const trailing = [{ address: input.planPda, role: import_kit47.AccountRole.READONLY }];
4713
+ const trailing = [{ address: input.planPda, role: import_kit57.AccountRole.READONLY }];
3865
4714
  if (input.receiver) {
3866
- trailing.push({ address: input.receiver, role: import_kit47.AccountRole.WRITABLE });
4715
+ trailing.push({ address: input.receiver, role: import_kit57.AccountRole.WRITABLE });
3867
4716
  }
3868
4717
  return withTrailing(
3869
4718
  getRevokeDelegationInstruction(
@@ -4093,7 +4942,7 @@ async function getResumeSubscriptionOverlayInstructionAsync(input) {
4093
4942
  }
4094
4943
  function subscriptionsProgram2() {
4095
4944
  return (client) => {
4096
- return (0, import_kit47.pipe)(client, subscriptionsProgram(), (c) => {
4945
+ return (0, import_kit57.pipe)(client, subscriptionsProgram(), (c) => {
4097
4946
  const queries = {
4098
4947
  activeDelegationSummary: async (wallet) => {
4099
4948
  const delegations = await fetchDelegationsByDelegator(c.rpc, wallet);
@@ -4130,7 +4979,7 @@ function subscriptionsProgram2() {
4130
4979
  }
4131
4980
  return subscriptionAuthority.data.initId;
4132
4981
  };
4133
- const resolveDelegationHookAccounts = async (input) => {
4982
+ const resolveDelegationHookAccounts = async (input, initiator, delegationKind) => {
4134
4983
  const [subscriptionAuthority] = await findSubscriptionAuthorityPda(
4135
4984
  { tokenMint: input.tokenMint, user: input.delegator },
4136
4985
  pdaConfig(input.programAddress)
@@ -4142,18 +4991,25 @@ function subscriptionsProgram2() {
4142
4991
  mint: input.tokenMint,
4143
4992
  source: input.delegatorAta,
4144
4993
  tokenProgram: input.tokenProgram,
4994
+ transferContext: await buildPendingTransferContext({
4995
+ delegation: input.delegationPda,
4996
+ delegationKind,
4997
+ initiator,
4998
+ programAddress: input.programAddress,
4999
+ subscriptionAuthority
5000
+ }),
4145
5001
  transferHookAccounts: input.transferHookAccounts
4146
5002
  });
4147
5003
  };
4148
5004
  const instructions = {
4149
- cancelSubscription: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5005
+ cancelSubscription: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4150
5006
  client,
4151
5007
  getCancelSubscriptionOverlayInstructionAsync({
4152
5008
  ...input,
4153
5009
  subscriber: input.subscriber ?? client.identity
4154
5010
  })
4155
5011
  ),
4156
- cancelSubscriptionNow: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5012
+ cancelSubscriptionNow: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4157
5013
  client,
4158
5014
  getCancelSubscriptionNowOverlayInstructionAsync({
4159
5015
  ...input,
@@ -4161,14 +5017,14 @@ function subscriptionsProgram2() {
4161
5017
  subscriber: input.subscriber ?? client.identity
4162
5018
  })
4163
5019
  ),
4164
- closeSubscriptionAuthority: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5020
+ closeSubscriptionAuthority: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4165
5021
  client,
4166
5022
  getCloseSubscriptionAuthorityOverlayInstructionAsync({
4167
5023
  ...input,
4168
5024
  user: input.user ?? client.identity
4169
5025
  })
4170
5026
  ),
4171
- createFixedDelegation: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5027
+ createFixedDelegation: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4172
5028
  client,
4173
5029
  (async () => {
4174
5030
  const delegator = input.delegator ?? client.identity;
@@ -4186,7 +5042,7 @@ function subscriptionsProgram2() {
4186
5042
  });
4187
5043
  })()
4188
5044
  ),
4189
- createPlan: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5045
+ createPlan: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4190
5046
  client,
4191
5047
  getCreatePlanOverlayInstructionAsync({
4192
5048
  ...input,
@@ -4194,7 +5050,7 @@ function subscriptionsProgram2() {
4194
5050
  payer: input.payer ?? (client.payer === client.identity ? void 0 : client.payer)
4195
5051
  })
4196
5052
  ),
4197
- createRecurringDelegation: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5053
+ createRecurringDelegation: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4198
5054
  client,
4199
5055
  (async () => {
4200
5056
  const delegator = input.delegator ?? client.identity;
@@ -4212,14 +5068,14 @@ function subscriptionsProgram2() {
4212
5068
  });
4213
5069
  })()
4214
5070
  ),
4215
- deletePlan: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5071
+ deletePlan: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4216
5072
  client,
4217
5073
  getDeletePlanOverlayInstruction({
4218
5074
  ...input,
4219
5075
  owner: input.owner ?? client.identity
4220
5076
  })
4221
5077
  ),
4222
- initSubscriptionAuthority: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5078
+ initSubscriptionAuthority: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4223
5079
  client,
4224
5080
  getInitSubscriptionAuthorityOverlayInstructionAsync({
4225
5081
  ...input,
@@ -4227,35 +5083,35 @@ function subscriptionsProgram2() {
4227
5083
  payer: input.payer ?? (client.payer === client.identity ? void 0 : client.payer)
4228
5084
  })
4229
5085
  ),
4230
- resumeSubscription: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5086
+ resumeSubscription: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4231
5087
  client,
4232
5088
  getResumeSubscriptionOverlayInstructionAsync({
4233
5089
  ...input,
4234
5090
  subscriber: input.subscriber ?? client.identity
4235
5091
  })
4236
5092
  ),
4237
- revokeDelegation: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5093
+ revokeDelegation: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4238
5094
  client,
4239
5095
  getRevokeDelegationOverlayInstruction({
4240
5096
  ...input,
4241
5097
  authority: input.authority ?? client.identity
4242
5098
  })
4243
5099
  ),
4244
- revokeSubscription: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5100
+ revokeSubscription: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4245
5101
  client,
4246
5102
  getRevokeSubscriptionOverlayInstruction({
4247
5103
  ...input,
4248
5104
  authority: input.authority ?? client.identity
4249
5105
  })
4250
5106
  ),
4251
- revokeSubscriptionAuthority: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5107
+ revokeSubscriptionAuthority: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4252
5108
  client,
4253
5109
  getRevokeSubscriptionAuthorityOverlayInstructionAsync({
4254
5110
  ...input,
4255
5111
  user: input.user ?? client.identity
4256
5112
  })
4257
5113
  ),
4258
- subscribe: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5114
+ subscribe: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4259
5115
  client,
4260
5116
  (async () => {
4261
5117
  const subscriber = input.subscriber ?? client.identity;
@@ -4303,23 +5159,37 @@ function subscriptionsProgram2() {
4303
5159
  });
4304
5160
  })()
4305
5161
  ),
4306
- transferFixed: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5162
+ transferFixed: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4307
5163
  client,
4308
- (async () => await getTransferFixedOverlayInstructionAsync({
4309
- ...input,
4310
- delegatee: input.delegatee ?? client.identity,
4311
- transferHookAccounts: await resolveDelegationHookAccounts(input)
4312
- }))()
5164
+ (async () => {
5165
+ const delegatee = input.delegatee ?? client.identity;
5166
+ return await getTransferFixedOverlayInstructionAsync({
5167
+ ...input,
5168
+ delegatee,
5169
+ transferHookAccounts: await resolveDelegationHookAccounts(
5170
+ input,
5171
+ delegatee.address,
5172
+ 2 /* FixedDelegation */
5173
+ )
5174
+ });
5175
+ })()
4313
5176
  ),
4314
- transferRecurring: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5177
+ transferRecurring: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4315
5178
  client,
4316
- (async () => await getTransferRecurringOverlayInstructionAsync({
4317
- ...input,
4318
- delegatee: input.delegatee ?? client.identity,
4319
- transferHookAccounts: await resolveDelegationHookAccounts(input)
4320
- }))()
5179
+ (async () => {
5180
+ const delegatee = input.delegatee ?? client.identity;
5181
+ return await getTransferRecurringOverlayInstructionAsync({
5182
+ ...input,
5183
+ delegatee,
5184
+ transferHookAccounts: await resolveDelegationHookAccounts(
5185
+ input,
5186
+ delegatee.address,
5187
+ 3 /* RecurringDelegation */
5188
+ )
5189
+ });
5190
+ })()
4321
5191
  ),
4322
- transferSubscription: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5192
+ transferSubscription: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4323
5193
  client,
4324
5194
  (async () => {
4325
5195
  const [subscriptionAuthority] = await findSubscriptionAuthorityPda(
@@ -4331,6 +5201,7 @@ function subscriptionsProgram2() {
4331
5201
  owner: input.delegator,
4332
5202
  tokenProgram: input.tokenProgram
4333
5203
  });
5204
+ const caller = input.caller ?? client.identity;
4334
5205
  const transferHookAccounts = await resolveTransferHookAccounts(c.rpc, {
4335
5206
  amount: input.amount,
4336
5207
  authority: subscriptionAuthority,
@@ -4338,16 +5209,23 @@ function subscriptionsProgram2() {
4338
5209
  mint: input.tokenMint,
4339
5210
  source: delegatorAta,
4340
5211
  tokenProgram: input.tokenProgram,
5212
+ transferContext: await buildPendingTransferContext({
5213
+ delegation: input.subscriptionPda,
5214
+ delegationKind: 4 /* SubscriptionDelegation */,
5215
+ initiator: caller.address,
5216
+ programAddress: input.programAddress,
5217
+ subscriptionAuthority
5218
+ }),
4341
5219
  transferHookAccounts: input.transferHookAccounts
4342
5220
  });
4343
5221
  return await getTransferSubscriptionOverlayInstructionAsync({
4344
5222
  ...input,
4345
- caller: input.caller ?? client.identity,
5223
+ caller,
4346
5224
  transferHookAccounts
4347
5225
  });
4348
5226
  })()
4349
5227
  ),
4350
- updatePlan: (input) => (0, import_program_client_core20.addSelfPlanAndSendFunctions)(
5228
+ updatePlan: (input) => (0, import_program_client_core21.addSelfPlanAndSendFunctions)(
4351
5229
  client,
4352
5230
  (async () => {
4353
5231
  let { expectedCreatedAt, expectedEndTs, expectedMetadataUri, expectedPullers } = input;
@@ -4396,6 +5274,8 @@ function subscriptionsProgram2() {
4396
5274
  DELETE_PLAN_DISCRIMINATOR,
4397
5275
  DISCRIMINATOR_OFFSET,
4398
5276
  EVENT_AUTHORITY_SEED,
5277
+ FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR,
5278
+ FIXED_TRANSFER_EVENT_EVENT_DISCRIMINATOR2,
4399
5279
  INIT_SUBSCRIPTION_AUTHORITY_DISCRIMINATOR,
4400
5280
  MAX_PLAN_DESTINATIONS,
4401
5281
  MAX_PLAN_PULLERS,
@@ -4403,8 +5283,13 @@ function subscriptionsProgram2() {
4403
5283
  PLAN_OWNER_OFFSET,
4404
5284
  PLAN_SEED,
4405
5285
  PLAN_SIZE,
5286
+ PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR,
5287
+ PLAN_UPDATED_EVENT_EVENT_DISCRIMINATOR2,
4406
5288
  PROGRAM_ID,
4407
5289
  PlanStatus,
5290
+ RECLAIM_EXCESS_RENT_DISCRIMINATOR,
5291
+ RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR,
5292
+ RECURRING_TRANSFER_EVENT_EVENT_DISCRIMINATOR2,
4408
5293
  RESUME_SUBSCRIPTION_DISCRIMINATOR,
4409
5294
  REVOKE_ABANDONED_DELEGATION_DISCRIMINATOR,
4410
5295
  REVOKE_ABANDONED_SUBSCRIPTION_DISCRIMINATOR,
@@ -4465,6 +5350,7 @@ function subscriptionsProgram2() {
4465
5350
  SUBSCRIPTIONS_ERROR__NOT_PLAN_OWNER,
4466
5351
  SUBSCRIPTIONS_ERROR__NOT_SIGNER,
4467
5352
  SUBSCRIPTIONS_ERROR__NOT_SYSTEM_PROGRAM,
5353
+ SUBSCRIPTIONS_ERROR__NO_EXCESS_LAMPORTS,
4468
5354
  SUBSCRIPTIONS_ERROR__PERIOD_NOT_ELAPSED,
4469
5355
  SUBSCRIPTIONS_ERROR__PLAN_ALREADY_EXISTS,
4470
5356
  SUBSCRIPTIONS_ERROR__PLAN_CLOSED,
@@ -4491,9 +5377,18 @@ function subscriptionsProgram2() {
4491
5377
  SUBSCRIPTIONS_ERROR__UNAUTHORIZED_DESTINATION,
4492
5378
  SUBSCRIPTIONS_PROGRAM_ADDRESS,
4493
5379
  SUBSCRIPTION_AUTHORITY_SEED,
5380
+ SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR,
5381
+ SUBSCRIPTION_CANCELLED_EVENT_EVENT_DISCRIMINATOR2,
5382
+ SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR,
5383
+ SUBSCRIPTION_CREATED_EVENT_EVENT_DISCRIMINATOR2,
5384
+ SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR,
5385
+ SUBSCRIPTION_RESUMED_EVENT_EVENT_DISCRIMINATOR2,
4494
5386
  SUBSCRIPTION_SEED,
4495
5387
  SUBSCRIPTION_SIZE,
5388
+ SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR,
5389
+ SUBSCRIPTION_TRANSFER_EVENT_EVENT_DISCRIMINATOR2,
4496
5390
  SubscriptionsAccount,
5391
+ SubscriptionsEvent,
4497
5392
  SubscriptionsInstruction,
4498
5393
  TRANSFER_FIXED_DISCRIMINATOR,
4499
5394
  TRANSFER_RECURRING_DISCRIMINATOR,
@@ -4503,6 +5398,7 @@ function subscriptionsProgram2() {
4503
5398
  UPDATE_PLAN_DISCRIMINATOR,
4504
5399
  ValidationError,
4505
5400
  ZERO_ADDRESS,
5401
+ buildPendingTransferContext,
4506
5402
  decodeDelegationAccount,
4507
5403
  decodeEventAuthority,
4508
5404
  decodeFixedDelegation,
@@ -4510,6 +5406,7 @@ function subscriptionsProgram2() {
4510
5406
  decodeRecurringDelegation,
4511
5407
  decodeSubscriptionAuthority,
4512
5408
  decodeSubscriptionDelegation,
5409
+ decodeTransferContext,
4513
5410
  fetchAllEventAuthority,
4514
5411
  fetchAllFixedDelegation,
4515
5412
  fetchAllMaybeEventAuthority,
@@ -4518,10 +5415,12 @@ function subscriptionsProgram2() {
4518
5415
  fetchAllMaybeRecurringDelegation,
4519
5416
  fetchAllMaybeSubscriptionAuthority,
4520
5417
  fetchAllMaybeSubscriptionDelegation,
5418
+ fetchAllMaybeTransferContext,
4521
5419
  fetchAllPlan,
4522
5420
  fetchAllRecurringDelegation,
4523
5421
  fetchAllSubscriptionAuthority,
4524
5422
  fetchAllSubscriptionDelegation,
5423
+ fetchAllTransferContext,
4525
5424
  fetchDelegationsByDelegatee,
4526
5425
  fetchDelegationsByDelegator,
4527
5426
  fetchEventAuthority,
@@ -4540,6 +5439,8 @@ function subscriptionsProgram2() {
4540
5439
  fetchMaybeSubscriptionAuthorityFromSeeds,
4541
5440
  fetchMaybeSubscriptionDelegation,
4542
5441
  fetchMaybeSubscriptionDelegationFromSeeds,
5442
+ fetchMaybeTransferContext,
5443
+ fetchMaybeTransferContextFromSeeds,
4543
5444
  fetchPlan,
4544
5445
  fetchPlanFromSeeds,
4545
5446
  fetchPlansForOwner,
@@ -4550,12 +5451,15 @@ function subscriptionsProgram2() {
4550
5451
  fetchSubscriptionDelegation,
4551
5452
  fetchSubscriptionDelegationFromSeeds,
4552
5453
  fetchSubscriptionsForUser,
5454
+ fetchTransferContext,
5455
+ fetchTransferContextFromSeeds,
4553
5456
  findEventAuthorityPda,
4554
5457
  findFixedDelegationPda,
4555
5458
  findPlanPda,
4556
5459
  findRecurringDelegationPda,
4557
5460
  findSubscriptionAuthorityPda,
4558
5461
  findSubscriptionDelegationPda,
5462
+ findTransferContextPda,
4559
5463
  getAccountDiscriminatorCodec,
4560
5464
  getAccountDiscriminatorDecoder,
4561
5465
  getAccountDiscriminatorEncoder,
@@ -4618,6 +5522,11 @@ function subscriptionsProgram2() {
4618
5522
  getFixedDelegationCodec,
4619
5523
  getFixedDelegationDecoder,
4620
5524
  getFixedDelegationEncoder,
5525
+ getFixedTransferEventEventCodec,
5526
+ getFixedTransferEventEventDecoder,
5527
+ getFixedTransferEventEventDiscriminator2Bytes,
5528
+ getFixedTransferEventEventDiscriminatorBytes,
5529
+ getFixedTransferEventEventEncoder,
4621
5530
  getHeaderCodec,
4622
5531
  getHeaderDecoder,
4623
5532
  getHeaderEncoder,
@@ -4640,9 +5549,24 @@ function subscriptionsProgram2() {
4640
5549
  getPlanTermsCodec,
4641
5550
  getPlanTermsDecoder,
4642
5551
  getPlanTermsEncoder,
5552
+ getPlanUpdatedEventEventCodec,
5553
+ getPlanUpdatedEventEventDecoder,
5554
+ getPlanUpdatedEventEventDiscriminator2Bytes,
5555
+ getPlanUpdatedEventEventDiscriminatorBytes,
5556
+ getPlanUpdatedEventEventEncoder,
5557
+ getReclaimExcessRentDiscriminatorBytes,
5558
+ getReclaimExcessRentInstruction,
5559
+ getReclaimExcessRentInstructionDataCodec,
5560
+ getReclaimExcessRentInstructionDataDecoder,
5561
+ getReclaimExcessRentInstructionDataEncoder,
4643
5562
  getRecurringDelegationCodec,
4644
5563
  getRecurringDelegationDecoder,
4645
5564
  getRecurringDelegationEncoder,
5565
+ getRecurringTransferEventEventCodec,
5566
+ getRecurringTransferEventEventDecoder,
5567
+ getRecurringTransferEventEventDiscriminator2Bytes,
5568
+ getRecurringTransferEventEventDiscriminatorBytes,
5569
+ getRecurringTransferEventEventEncoder,
4646
5570
  getResumeDataCodec,
4647
5571
  getResumeDataDecoder,
4648
5572
  getResumeDataEncoder,
@@ -4690,10 +5614,33 @@ function subscriptionsProgram2() {
4690
5614
  getSubscriptionAuthorityCodec,
4691
5615
  getSubscriptionAuthorityDecoder,
4692
5616
  getSubscriptionAuthorityEncoder,
5617
+ getSubscriptionCancelledEventEventCodec,
5618
+ getSubscriptionCancelledEventEventDecoder,
5619
+ getSubscriptionCancelledEventEventDiscriminator2Bytes,
5620
+ getSubscriptionCancelledEventEventDiscriminatorBytes,
5621
+ getSubscriptionCancelledEventEventEncoder,
5622
+ getSubscriptionCreatedEventEventCodec,
5623
+ getSubscriptionCreatedEventEventDecoder,
5624
+ getSubscriptionCreatedEventEventDiscriminator2Bytes,
5625
+ getSubscriptionCreatedEventEventDiscriminatorBytes,
5626
+ getSubscriptionCreatedEventEventEncoder,
4693
5627
  getSubscriptionDelegationCodec,
4694
5628
  getSubscriptionDelegationDecoder,
4695
5629
  getSubscriptionDelegationEncoder,
5630
+ getSubscriptionResumedEventEventCodec,
5631
+ getSubscriptionResumedEventEventDecoder,
5632
+ getSubscriptionResumedEventEventDiscriminator2Bytes,
5633
+ getSubscriptionResumedEventEventDiscriminatorBytes,
5634
+ getSubscriptionResumedEventEventEncoder,
5635
+ getSubscriptionTransferEventEventCodec,
5636
+ getSubscriptionTransferEventEventDecoder,
5637
+ getSubscriptionTransferEventEventDiscriminator2Bytes,
5638
+ getSubscriptionTransferEventEventDiscriminatorBytes,
5639
+ getSubscriptionTransferEventEventEncoder,
4696
5640
  getSubscriptionsErrorMessage,
5641
+ getTransferContextCodec,
5642
+ getTransferContextDecoder,
5643
+ getTransferContextEncoder,
4697
5644
  getTransferDataCodec,
4698
5645
  getTransferDataDecoder,
4699
5646
  getTransferDataEncoder,
@@ -4728,6 +5675,7 @@ function subscriptionsProgram2() {
4728
5675
  getUpdatePlanInstructionDataDecoder,
4729
5676
  getUpdatePlanInstructionDataEncoder,
4730
5677
  getUpdatePlanOverlayInstruction,
5678
+ identifySubscriptionsEvent,
4731
5679
  identifySubscriptionsInstruction,
4732
5680
  isSubscriptionsError,
4733
5681
  parseCancelSubscriptionInstruction,
@@ -4737,13 +5685,21 @@ function subscriptionsProgram2() {
4737
5685
  parseCreatePlanInstruction,
4738
5686
  parseCreateRecurringDelegationInstruction,
4739
5687
  parseDeletePlanInstruction,
5688
+ parseFixedTransferEventEvent,
4740
5689
  parseInitSubscriptionAuthorityInstruction,
5690
+ parsePlanUpdatedEventEvent,
5691
+ parseReclaimExcessRentInstruction,
5692
+ parseRecurringTransferEventEvent,
4741
5693
  parseResumeSubscriptionInstruction,
4742
5694
  parseRevokeAbandonedDelegationInstruction,
4743
5695
  parseRevokeAbandonedSubscriptionInstruction,
4744
5696
  parseRevokeDelegationInstruction,
4745
5697
  parseRevokeSubscriptionAuthorityInstruction,
4746
5698
  parseSubscribeInstruction,
5699
+ parseSubscriptionCancelledEventEvent,
5700
+ parseSubscriptionCreatedEventEvent,
5701
+ parseSubscriptionResumedEventEvent,
5702
+ parseSubscriptionTransferEventEvent,
4747
5703
  parseSubscriptionsInstruction,
4748
5704
  parseTransferFixedInstruction,
4749
5705
  parseTransferRecurringInstruction,