a4-cli 0.23.0

CLI tool for generating TypeScript SDKs from Arete stream specifications
1
{"artifactHash":"arete:h1:program-spec:sha256:a10a30f17be97429474e990fdc24b87edf51e4c5fe0021b0651d434d11f3e698","artifactVersion":"1.0.0","kind":"program-spec","payload":{"idlContentHash":"arete:h1:idl-content:sha256:6b1a0054e474098d8e646ca0238f197ea5d31fa93ca79c4dd466c6edf4fef554","idlSnapshot":{"accounts":[{"discriminator":[2],"docs":[],"fields":[{"name":"header","type":{"defined":"header"}},{"name":"subscriptionAuthority","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"expiryTs","type":"i64"}],"name":"fixedDelegation","serialization":null},{"discriminator":[1],"docs":[],"fields":[{"name":"discriminator","type":"u8"},{"name":"owner","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"status","type":"u8"},{"name":"data","type":{"defined":"planData"}}],"name":"plan","serialization":null},{"discriminator":[3],"docs":[],"fields":[{"name":"header","type":{"defined":"header"}},{"name":"subscriptionAuthority","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"currentPeriodStartTs","type":"i64"},{"name":"periodLengthS","type":"u64"},{"name":"expiryTs","type":"i64"},{"name":"amountPerPeriod","type":"u64"},{"name":"amountPulledInPeriod","type":"u64"}],"name":"recurringDelegation","serialization":null},{"discriminator":[0],"docs":[],"fields":[{"name":"discriminator","type":"u8"},{"name":"user","type":"publicKey"},{"name":"tokenMint","type":"publicKey"},{"name":"payer","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"initId","type":"i64"}],"name":"subscriptionAuthority","serialization":null},{"discriminator":[4],"docs":[],"fields":[{"name":"header","type":{"defined":"header"}},{"name":"terms","type":{"defined":"planTerms"}},{"name":"amountPulledInPeriod","type":"u64"},{"name":"currentPeriodStartTs","type":"i64"},{"name":"expiresAtTs","type":"i64"}],"name":"subscriptionDelegation","serialization":null}],"discriminant_size":1,"errors":[{"code":100,"msg":"Account must be a signer","name":"notSigner"},{"code":101,"msg":"Invalid account address","name":"invalidAddress"},{"code":102,"msg":"Invalid escrow PDA derivation","name":"invalidEscrowPda"},{"code":103,"msg":"Invalid subscription-authority PDA derivation","name":"invalidSubscriptionAuthorityPda"},{"code":104,"msg":"Expected system program","name":"notSystemProgram"},{"code":105,"msg":"Token Program does not match other accounts","name":"invalidTokenProgram"},{"code":106,"msg":"Invalid Token-2022 mint account data","name":"invalidToken2022MintAccountData"},{"code":107,"msg":"Invalid Token-2022 token account data","name":"invalidToken2022TokenAccountData"},{"code":108,"msg":"Invalid associated token account address","name":"invalidAssociatedTokenAccountDerivedAddress"},{"code":109,"msg":"Invalid SPL Token mint account data","name":"invalidTokenSplMintAccountData"},{"code":110,"msg":"Invalid SPL Token account data","name":"invalidTokenSplTokenAccountData"},{"code":111,"msg":"Invalid account data","name":"invalidAccountData"},{"code":112,"msg":"Invalid instruction data","name":"invalidInstructionData"},{"code":113,"msg":"Not enough account keys provided","name":"notEnoughAccountKeys"},{"code":114,"msg":"Invalid instruction","name":"invalidInstruction"},{"code":115,"msg":"Arithmetic Overflow","name":"arithmeticOverflow"},{"code":116,"msg":"Arithmetic Underflow","name":"arithmeticUnderflow"},{"code":117,"msg":"Invalid account discriminator","name":"invalidAccountDiscriminator"},{"code":118,"msg":"Mint has ConfidentialTransfer extension","name":"mintHasConfidentialTransfer"},{"code":119,"msg":"Mint has NonTransferable extension","name":"mintHasNonTransferable"},{"code":120,"msg":"Mint has PermanentDelegate extension","name":"mintHasPermanentDelegate"},{"code":121,"msg":"Mint has TransferHook extension","name":"mintHasTransferHook"},{"code":122,"msg":"Mint has TransferFee extension","name":"mintHasTransferFee"},{"code":123,"msg":"Mint has MintCloseAuthority extension","name":"mintHasMintCloseAuthority"},{"code":124,"msg":"Mint has Pausable extension","name":"mintHasPausable"},{"code":125,"msg":"Token mint mismatch","name":"mintMismatch"},{"code":126,"msg":"Invalid delegation PDA derivation","name":"invalidDelegatePda"},{"code":127,"msg":"Invalid header data","name":"invalidHeaderData"},{"code":128,"msg":"Delegation has expired","name":"delegationExpired"},{"code":129,"msg":"Invalid amount specified","name":"invalidAmount"},{"code":130,"msg":"Caller not authorized for this action","name":"unauthorized"},{"code":131,"msg":"Account must be writable","name":"accountNotWritable"},{"code":132,"msg":"Token account owner does not match expected","name":"ataOwnerMismatch"},{"code":133,"msg":"Delegation header version is not compatible","name":"delegationVersionMismatch"},{"code":134,"msg":"Account requires explicit migration","name":"migrationRequired"},{"code":135,"msg":"Delegation account already exists","name":"delegationAlreadyExists"},{"code":136,"msg":"Delegation init_id does not match current SubscriptionAuthority","name":"staleSubscriptionAuthority"},{"code":300,"msg":"Transfer amount exceeds delegation limit","name":"amountExceedsLimit"},{"code":301,"msg":"Expiry time specified is less than current time","name":"fixedDelegationExpiryInPast"},{"code":302,"msg":"zero amount specified","name":"fixedDelegationAmountZero"},{"code":400,"msg":"Transfer amount exceeds period limit","name":"amountExceedsPeriodLimit"},{"code":401,"msg":"Period has not elapsed yet","name":"periodNotElapsed"},{"code":402,"msg":"Invalid Period length","name":"invalidPeriodLength"},{"code":403,"msg":"Payer provided does not match delegation","name":"invalidPayerData"},{"code":404,"msg":"Past start time specified","name":"recurringDelegationStartTimeInPast"},{"code":405,"msg":"start time specified is greater than expiry","name":"recurringDelegationStartTimeGreaterThanExpiry"},{"code":406,"msg":"zero amount specified","name":"recurringDelegationAmountZero"},{"code":407,"msg":"Delegation period has not started yet","name":"delegationNotStarted"},{"code":500,"msg":"Plan is in sunset status","name":"planSunset"},{"code":501,"msg":"Plan has expired","name":"planExpired"},{"code":502,"msg":"Invalid Plan PDA derivation","name":"invalidPlanPda"},{"code":503,"msg":"Invalid subscription PDA derivation","name":"invalidSubscriptionPda"},{"code":504,"msg":"Caller is not the plan owner","name":"notPlanOwner"},{"code":505,"msg":"Subscription does not belong to this plan","name":"subscriptionPlanMismatch"},{"code":506,"msg":"Destination not in plan whitelist","name":"unauthorizedDestination"},{"code":507,"msg":"No valid destinations provided","name":"invalidNumDestinations"},{"code":508,"msg":"Subscription cancelled and past valid period","name":"subscriptionCancelled"},{"code":509,"msg":"Subscription already cancelled","name":"subscriptionAlreadyCancelled"},{"code":510,"msg":"Subscription is not cancelled","name":"subscriptionNotCancelled"},{"code":511,"msg":"End timestamp must be zero or in the future","name":"invalidEndTs"},{"code":512,"msg":"Invalid plan status value","name":"invalidPlanStatus"},{"code":513,"msg":"Plan cannot be updated after sunset","name":"planImmutableAfterSunset"},{"code":514,"msg":"Sunset requires a non-zero end timestamp","name":"sunsetRequiresEndTs"},{"code":515,"msg":"Plan must be expired to delete","name":"planNotExpired"},{"code":516,"msg":"Plan account has been closed","name":"planClosed"},{"code":517,"msg":"Already subscribed to this plan","name":"alreadySubscribed"},{"code":518,"msg":"Plan account already exists","name":"planAlreadyExists"},{"code":519,"msg":"Subscription plan terms do not match the current plan","name":"planTermsMismatch"},{"code":600,"msg":"Invalid event authority PDA","name":"invalidEventAuthority"},{"code":601,"msg":"Invalid event data","name":"invalidEventData"},{"code":602,"msg":"Invalid event tag prefix","name":"invalidEventTag"},{"code":603,"msg":"Unknown event discriminator","name":"invalidEventDiscriminator"}],"events":[{"discriminator":[0],"docs":["Emitted when a user subscribes to a plan. Self-CPI event payload is EVENT_IX_TAG_LE + discriminator byte + fields."],"fields":[],"name":"SubscriptionCreatedEvent"},{"discriminator":[1],"docs":["Emitted when a subscriber cancels their subscription. Self-CPI event payload is EVENT_IX_TAG_LE + discriminator byte + fields."],"fields":[],"name":"SubscriptionCancelledEvent"},{"discriminator":[2],"docs":["Emitted when a transfer is executed against a subscription delegation. Self-CPI event payload is EVENT_IX_TAG_LE + discriminator byte + fields."],"fields":[],"name":"SubscriptionTransferEvent"},{"discriminator":[3],"docs":["Emitted when a transfer is executed against a fixed delegation. Self-CPI event payload is EVENT_IX_TAG_LE + discriminator byte + fields."],"fields":[],"name":"FixedTransferEvent"},{"discriminator":[4],"docs":["Emitted when a transfer is executed against a recurring delegation. Self-CPI event payload is EVENT_IX_TAG_LE + discriminator byte + fields."],"fields":[],"name":"RecurringTransferEvent"},{"discriminator":[5],"docs":["Emitted when a subscriber resumes a previously cancelled subscription. Self-CPI event payload is EVENT_IX_TAG_LE + discriminator byte + fields."],"fields":[],"name":"SubscriptionResumedEvent"},{"discriminator":[6],"docs":["Emitted when a plan is updated. Self-CPI event payload is EVENT_IX_TAG_LE + discriminator byte + fields."],"fields":[],"name":"PlanUpdatedEvent"}],"instructions":[{"accounts":[{"address":null,"docs":["The owner of the subscription-authority program"],"name":"owner","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The subscription_authority PDA that will be the delegate instance for this token"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The token mint that we are creating a subscription-authority account for"],"name":"tokenMint","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The ata that we are setting up delegation for"],"name":"userAta","optional":false,"signer":false,"writable":true},{"address":"11111111111111111111111111111111","docs":["The system program"],"name":"systemProgram","optional":false,"signer":false,"writable":false},{"address":null,"docs":["Token program"],"name":"tokenProgram","optional":false,"signer":false,"writable":false}],"args":[],"discriminant":{"type":"u8","value":0},"discriminator":[0],"docs":[],"name":"initSubscriptionAuthority"},{"accounts":[{"address":null,"docs":["The user creating the delegation"],"name":"delegator","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The subscription_authority PDA for this token"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The fixed delegation PDA being created"],"name":"delegationAccount","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The user receiving delegation rights"],"name":"delegatee","optional":false,"signer":false,"writable":false},{"address":"11111111111111111111111111111111","docs":["The system program"],"name":"systemProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"fixedDelegation","type":{"defined":"createFixedDelegationData"}}],"discriminant":{"type":"u8","value":1},"discriminator":[1],"docs":[],"name":"createFixedDelegation"},{"accounts":[{"address":null,"docs":["The user creating the delegation"],"name":"delegator","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The subscription_authority PDA for this token"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The recurring delegation PDA being created"],"name":"delegationAccount","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The user receiving delegation rights"],"name":"delegatee","optional":false,"signer":false,"writable":false},{"address":"11111111111111111111111111111111","docs":["The system program"],"name":"systemProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"recurringDelegation","type":{"defined":"createRecurringDelegationData"}}],"discriminant":{"type":"u8","value":2},"discriminator":[2],"docs":[],"name":"createRecurringDelegation"},{"accounts":[{"address":null,"docs":["The delegator revoking the delegation (receives rent)"],"name":"authority","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The delegation PDA to close"],"name":"delegationAccount","optional":false,"signer":false,"writable":true}],"args":[],"discriminant":{"type":"u8","value":3},"discriminator":[3],"docs":[],"name":"revokeDelegation"},{"accounts":[{"address":null,"docs":["The fixed delegation PDA to transfer from"],"name":"delegationPda","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The subscription-authority PDA"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The delegator's ATA to transfer from"],"name":"delegatorAta","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The receiver's ATA to transfer to"],"name":"receiverAta","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The token mint"],"name":"tokenMint","optional":false,"signer":false,"writable":false},{"address":null,"docs":["Token program"],"name":"tokenProgram","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The delegatee signing the transfer"],"name":"delegatee","optional":false,"signer":true,"writable":false},{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","docs":["The event authority PDA"],"name":"eventAuthority","optional":false,"signer":false,"writable":false},{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","docs":["This program (for self-CPI)"],"name":"selfProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"transferData","type":{"defined":"transferData"}}],"discriminant":{"type":"u8","value":4},"discriminator":[4],"docs":[],"name":"transferFixed"},{"accounts":[{"address":null,"docs":["The recurring delegation PDA to transfer from"],"name":"delegationPda","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The subscription-authority PDA"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The delegator's ATA to transfer from"],"name":"delegatorAta","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The receiver's ATA to transfer to"],"name":"receiverAta","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The token mint"],"name":"tokenMint","optional":false,"signer":false,"writable":false},{"address":null,"docs":["Token program"],"name":"tokenProgram","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The delegatee signing the transfer"],"name":"delegatee","optional":false,"signer":true,"writable":false},{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","docs":["The event authority PDA"],"name":"eventAuthority","optional":false,"signer":false,"writable":false},{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","docs":["This program (for self-CPI)"],"name":"selfProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"transferData","type":{"defined":"transferData"}}],"discriminant":{"type":"u8","value":5},"discriminator":[5],"docs":[],"name":"transferRecurring"},{"accounts":[{"address":null,"docs":["The user who owns the SubscriptionAuthority PDA (receives rent)"],"name":"user","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The SubscriptionAuthority PDA to close"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":true}],"args":[],"discriminant":{"type":"u8","value":6},"discriminator":[6],"docs":[],"name":"closeSubscriptionAuthority"},{"accounts":[{"address":null,"docs":["The merchant creating the plan"],"name":"merchant","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The plan PDA being created"],"name":"planPda","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The token mint"],"name":"tokenMint","optional":false,"signer":false,"writable":false},{"address":"11111111111111111111111111111111","docs":["The system program"],"name":"systemProgram","optional":false,"signer":false,"writable":false},{"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA","docs":["The token program"],"name":"tokenProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"planData","type":{"defined":"planData"}}],"discriminant":{"type":"u8","value":7},"discriminator":[7],"docs":[],"name":"createPlan"},{"accounts":[{"address":null,"docs":["The plan owner updating the plan"],"name":"owner","optional":false,"signer":true,"writable":false},{"address":null,"docs":["The plan PDA being updated"],"name":"planPda","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The event authority PDA"],"name":"eventAuthority","optional":false,"signer":false,"writable":false},{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","docs":["This program (for self-CPI)"],"name":"selfProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"updatePlanData","type":{"defined":"updatePlanData"}}],"discriminant":{"type":"u8","value":8},"discriminator":[8],"docs":[],"name":"updatePlan"},{"accounts":[{"address":null,"docs":["The plan owner deleting the plan (receives rent)"],"name":"owner","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The plan PDA being deleted"],"name":"planPda","optional":false,"signer":false,"writable":true}],"args":[],"discriminant":{"type":"u8","value":9},"discriminator":[9],"docs":[],"name":"deletePlan"},{"accounts":[{"address":null,"docs":["The subscription delegation PDA"],"name":"subscriptionPda","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The plan PDA"],"name":"planPda","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The subscription-authority PDA"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The delegator's ATA to transfer from"],"name":"delegatorAta","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The receiver's ATA to transfer to"],"name":"receiverAta","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The authorized puller (plan owner or whitelisted)"],"name":"caller","optional":false,"signer":true,"writable":false},{"address":null,"docs":["The token mint"],"name":"tokenMint","optional":false,"signer":false,"writable":false},{"address":null,"docs":["Token program"],"name":"tokenProgram","optional":false,"signer":false,"writable":false},{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","docs":["The event authority PDA"],"name":"eventAuthority","optional":false,"signer":false,"writable":false},{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","docs":["This program (for self-CPI)"],"name":"selfProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"transferData","type":{"defined":"transferData"}}],"discriminant":{"type":"u8","value":10},"discriminator":[10],"docs":[],"name":"transferSubscription"},{"accounts":[{"address":null,"docs":["The subscriber creating the subscription (pays rent)"],"name":"subscriber","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The merchant who owns the plan"],"name":"merchant","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The plan PDA to subscribe to"],"name":"planPda","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The subscription PDA being created"],"name":"subscriptionPda","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The subscriber's SubscriptionAuthority PDA for the plan's mint"],"name":"subscriptionAuthorityPda","optional":false,"signer":false,"writable":false},{"address":"11111111111111111111111111111111","docs":["The system program"],"name":"systemProgram","optional":false,"signer":false,"writable":false},{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","docs":["The event authority PDA"],"name":"eventAuthority","optional":false,"signer":false,"writable":false},{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","docs":["This program (for self-CPI)"],"name":"selfProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"subscribeData","type":{"defined":"subscribeData"}}],"discriminant":{"type":"u8","value":11},"discriminator":[11],"docs":[],"name":"subscribe"},{"accounts":[{"address":null,"docs":["The subscriber cancelling the subscription"],"name":"subscriber","optional":false,"signer":true,"writable":false},{"address":null,"docs":["The plan PDA for the subscription"],"name":"planPda","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The subscription PDA being cancelled"],"name":"subscriptionPda","optional":false,"signer":false,"writable":true},{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","docs":["The event authority PDA"],"name":"eventAuthority","optional":false,"signer":false,"writable":false},{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","docs":["This program (for self-CPI)"],"name":"selfProgram","optional":false,"signer":false,"writable":false}],"args":[],"discriminant":{"type":"u8","value":12},"discriminator":[12],"docs":[],"name":"cancelSubscription"},{"accounts":[{"address":null,"docs":["The subscriber resuming the subscription"],"name":"subscriber","optional":false,"signer":true,"writable":false},{"address":null,"docs":["The plan PDA for the subscription"],"name":"planPda","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The subscription PDA being resumed"],"name":"subscriptionPda","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The subscriber's SubscriptionAuthority PDA for the plan's mint"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The event authority PDA"],"name":"eventAuthority","optional":false,"signer":false,"writable":false},{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","docs":["This program (for self-CPI)"],"name":"selfProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"resumeData","type":{"defined":"resumeData"}}],"discriminant":{"type":"u8","value":13},"discriminator":[13],"docs":[],"name":"resumeSubscription"},{"accounts":[{"address":null,"docs":["The ATA owner: revokes the program's delegate and, when still open, closes the SubscriptionAuthority PDA (receives rent when self-funded)"],"name":"user","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The user's ATA whose delegate is being revoked"],"name":"userAta","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The token mint of the user's ATA"],"name":"tokenMint","optional":false,"signer":false,"writable":false},{"address":null,"docs":["Token program"],"name":"tokenProgram","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The SubscriptionAuthority PDA. Closed when still open; ignored when already closed."],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":true}],"args":[],"discriminant":{"type":"u8","value":14},"discriminator":[14],"docs":[],"name":"revokeSubscriptionAuthority"},{"accounts":[{"address":null,"docs":["The recorded payer reclaiming rent"],"name":"payer","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The fixed or recurring delegation PDA to close"],"name":"delegationAccount","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The delegation's recorded SubscriptionAuthority PDA (may be closed)"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":false}],"args":[],"discriminant":{"type":"u8","value":15},"discriminator":[15],"docs":[],"name":"revokeAbandonedDelegation"},{"accounts":[{"address":null,"docs":["The recorded payer reclaiming rent"],"name":"payer","optional":false,"signer":true,"writable":true},{"address":null,"docs":["The abandoned subscription PDA to close"],"name":"subscriptionAccount","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The subscriber's recorded SubscriptionAuthority PDA for the plan's mint (may be closed)"],"name":"subscriptionAuthority","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The plan the subscription belongs to; provides the mint"],"name":"planPda","optional":false,"signer":false,"writable":false}],"args":[],"discriminant":{"type":"u8","value":16},"discriminator":[16],"docs":[],"name":"revokeAbandonedSubscription"},{"accounts":[{"address":null,"docs":["The subscriber cancelling the subscription"],"name":"subscriber","optional":false,"signer":true,"writable":false},{"address":null,"docs":["The owner of the subscription plan approving immediate cancellation"],"name":"merchant","optional":false,"signer":true,"writable":false},{"address":null,"docs":["The plan PDA for the subscription"],"name":"planPda","optional":false,"signer":false,"writable":false},{"address":null,"docs":["The subscription PDA being cancelled immediately"],"name":"subscriptionPda","optional":false,"signer":false,"writable":true},{"address":null,"docs":["The event authority PDA"],"name":"eventAuthority","optional":false,"signer":false,"writable":false},{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","docs":["This program (for self-CPI)"],"name":"selfProgram","optional":false,"signer":false,"writable":false}],"args":[{"name":"cancelSubscriptionNowData","type":{"defined":"cancelSubscriptionNowData"}}],"discriminant":{"type":"u8","value":17},"discriminator":[17],"docs":[],"name":"cancelSubscriptionNow"}],"name":"subscriptions","normalizationVersion":1,"program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","types":[{"docs":[],"name":"createFixedDelegationData","type":{"fields":[{"name":"nonce","type":"u64"},{"name":"amount","type":"u64"},{"name":"expiryTs","type":"i64"},{"name":"expectedSubscriptionAuthorityInitId","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"planTerms","type":{"fields":[{"name":"amount","type":"u64"},{"name":"periodHours","type":"u64"},{"name":"createdAt","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"planData","type":{"fields":[{"name":"planId","type":"u64"},{"name":"mint","type":"publicKey"},{"name":"terms","type":{"defined":"planTerms"}},{"name":"endTs","type":"i64"},{"name":"destinations","type":{"array":["publicKey",4]}},{"name":"pullers","type":{"array":["publicKey",4]}},{"name":"metadataUri","type":{"array":["u8",128]}}],"kind":"struct"}},{"docs":[],"name":"createRecurringDelegationData","type":{"fields":[{"name":"nonce","type":"u64"},{"name":"amountPerPeriod","type":"u64"},{"name":"periodLengthS","type":"u64"},{"name":"startTs","type":"i64"},{"name":"expiryTs","type":"i64"},{"name":"expectedSubscriptionAuthorityInitId","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"subscribeData","type":{"fields":[{"name":"planId","type":"u64"},{"name":"planBump","type":"u8"},{"name":"expectedMint","type":"publicKey"},{"name":"expectedAmount","type":"u64"},{"name":"expectedPeriodHours","type":"u64"},{"name":"expectedCreatedAt","type":"i64"},{"name":"expectedSubscriptionAuthorityInitId","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"updatePlanData","type":{"fields":[{"name":"status","type":"u8"},{"name":"endTs","type":"i64"},{"name":"pullers","type":{"array":["publicKey",4]}},{"name":"metadataUri","type":{"array":["u8",128]}},{"name":"expectedCreatedAt","type":"i64"},{"name":"expectedEndTs","type":"i64"},{"name":"expectedPullers","type":{"array":["publicKey",4]}},{"name":"expectedMetadataUri","type":{"array":["u8",128]}}],"kind":"struct"}},{"docs":[],"name":"resumeData","type":{"fields":[{"name":"expectedExpiresAtTs","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"transferData","type":{"fields":[{"name":"amount","type":"u64"},{"name":"delegator","type":"publicKey"},{"name":"mint","type":"publicKey"}],"kind":"struct"}},{"docs":[],"name":"cancelSubscriptionNowData","type":{"fields":[{"name":"expectedCurrentPeriodStartTs","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"SubscriptionCreatedEvent","type":{"fields":[{"name":"plan","type":"publicKey"},{"name":"subscriber","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"createdTs","type":"i64"},{"name":"payer","type":"publicKey"}],"kind":"struct"}},{"docs":[],"name":"SubscriptionCancelledEvent","type":{"fields":[{"name":"plan","type":"publicKey"},{"name":"subscriber","type":"publicKey"},{"name":"expiresAtTs","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"SubscriptionTransferEvent","type":{"fields":[{"name":"subscription","type":"publicKey"},{"name":"plan","type":"publicKey"},{"name":"delegator","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"periodStartTs","type":"i64"},{"name":"periodEndTs","type":"i64"},{"name":"amountPulledInPeriod","type":"u64"},{"name":"receiver","type":"publicKey"},{"name":"receiverTokenAccount","type":"publicKey"},{"name":"puller","type":"publicKey"}],"kind":"struct"}},{"docs":[],"name":"FixedTransferEvent","type":{"fields":[{"name":"delegation","type":"publicKey"},{"name":"delegator","type":"publicKey"},{"name":"delegatee","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"remainingAmount","type":"u64"},{"name":"receiver","type":"publicKey"},{"name":"receiverTokenAccount","type":"publicKey"}],"kind":"struct"}},{"docs":[],"name":"RecurringTransferEvent","type":{"fields":[{"name":"delegation","type":"publicKey"},{"name":"delegator","type":"publicKey"},{"name":"delegatee","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"periodStartTs","type":"i64"},{"name":"periodEndTs","type":"i64"},{"name":"amountPulledInPeriod","type":"u64"},{"name":"receiver","type":"publicKey"},{"name":"receiverTokenAccount","type":"publicKey"}],"kind":"struct"}},{"docs":[],"name":"SubscriptionResumedEvent","type":{"fields":[{"name":"plan","type":"publicKey"},{"name":"subscriber","type":"publicKey"},{"name":"resumedTs","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"accountDiscriminator","type":{"kind":"enum","variants":[{"name":"subscriptionAuthority"},{"name":"plan"},{"name":"fixedDelegation"},{"name":"recurringDelegation"},{"name":"subscriptionDelegation"}]}},{"docs":[],"name":"planStatus","type":{"kind":"enum","variants":[{"name":"sunset"},{"name":"active"}]}},{"docs":[],"name":"header","type":{"fields":[{"name":"discriminator","type":"u8"},{"name":"version","type":"u8"},{"name":"bump","type":"u8"},{"name":"delegator","type":"publicKey"},{"name":"delegatee","type":"publicKey"},{"name":"payer","type":"publicKey"},{"name":"initId","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"PlanUpdatedEvent","type":{"fields":[{"name":"plan","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"status","type":"u8"},{"name":"endTs","type":"i64"},{"name":"pullers","type":{"array":["publicKey",4]}}],"kind":"struct"}},{"docs":[],"name":"fixedDelegation","type":{"fields":[{"name":"header","type":{"defined":"header"}},{"name":"subscriptionAuthority","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"expiryTs","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"plan","type":{"fields":[{"name":"discriminator","type":"u8"},{"name":"owner","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"status","type":"u8"},{"name":"data","type":{"defined":"planData"}}],"kind":"struct"}},{"docs":[],"name":"recurringDelegation","type":{"fields":[{"name":"header","type":{"defined":"header"}},{"name":"subscriptionAuthority","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"currentPeriodStartTs","type":"i64"},{"name":"periodLengthS","type":"u64"},{"name":"expiryTs","type":"i64"},{"name":"amountPerPeriod","type":"u64"},{"name":"amountPulledInPeriod","type":"u64"}],"kind":"struct"}},{"docs":[],"name":"subscriptionAuthority","type":{"fields":[{"name":"discriminator","type":"u8"},{"name":"user","type":"publicKey"},{"name":"tokenMint","type":"publicKey"},{"name":"payer","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"initId","type":"i64"}],"kind":"struct"}},{"docs":[],"name":"subscriptionDelegation","type":{"fields":[{"name":"header","type":{"defined":"header"}},{"name":"terms","type":{"defined":"planTerms"}},{"name":"amountPulledInPeriod","type":"u64"},{"name":"currentPeriodStartTs","type":"i64"},{"name":"expiresAtTs","type":"i64"}],"kind":"struct"}}],"version":"0.1.0"},"instructions":[{"accounts":[{"docs":["The owner of the subscription-authority program"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"owner","resolution":{"category":"signer"}},{"docs":["The subscription_authority PDA that will be the delegate instance for this token"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"subscriptionAuthority","resolution":{"category":"pdaInline","seeds":[{"type":"literal","value":"SubscriptionAuthority"},{"account_name":"owner","type":"accountRef"},{"account_name":"tokenMint","type":"accountRef"}]}},{"docs":["The token mint that we are creating a subscription-authority account for"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenMint","resolution":{"category":"userProvided"}},{"docs":["The ata that we are setting up delegation for"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"userAta","resolution":{"category":"userProvided"}},{"docs":["The system program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"systemProgram","resolution":{"address":"11111111111111111111111111111111","category":"known"}},{"docs":["Token program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenProgram","resolution":{"category":"userProvided"}}],"args":[],"discriminator":[0],"discriminator_size":1,"name":"initSubscriptionAuthority","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The user creating the delegation"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"delegator","resolution":{"category":"signer"}},{"docs":["The subscription_authority PDA for this token"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"subscriptionAuthority","resolution":{"category":"pdaRef","pda_name":"subscriptionAuthority"}},{"docs":["The fixed delegation PDA being created"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"delegationAccount","resolution":{"category":"userProvided"}},{"docs":["The user receiving delegation rights"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"delegatee","resolution":{"category":"userProvided"}},{"docs":["The system program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"systemProgram","resolution":{"address":"11111111111111111111111111111111","category":"known"}}],"args":[{"name":"fixedDelegation","type":"createFixedDelegationData"}],"discriminator":[1],"discriminator_size":1,"name":"createFixedDelegation","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The user creating the delegation"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"delegator","resolution":{"category":"signer"}},{"docs":["The subscription_authority PDA for this token"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"subscriptionAuthority","resolution":{"category":"pdaRef","pda_name":"subscriptionAuthority"}},{"docs":["The recurring delegation PDA being created"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"delegationAccount","resolution":{"category":"userProvided"}},{"docs":["The user receiving delegation rights"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"delegatee","resolution":{"category":"userProvided"}},{"docs":["The system program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"systemProgram","resolution":{"address":"11111111111111111111111111111111","category":"known"}}],"args":[{"name":"recurringDelegation","type":"createRecurringDelegationData"}],"discriminator":[2],"discriminator_size":1,"name":"createRecurringDelegation","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The delegator revoking the delegation (receives rent)"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"authority","resolution":{"category":"signer"}},{"docs":["The delegation PDA to close"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"delegationAccount","resolution":{"category":"userProvided"}}],"args":[],"discriminator":[3],"discriminator_size":1,"name":"revokeDelegation","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The fixed delegation PDA to transfer from"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"delegationPda","resolution":{"category":"userProvided"}},{"docs":["The subscription-authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"subscriptionAuthority","resolution":{"category":"pdaRef","pda_name":"subscriptionAuthority"}},{"docs":["The delegator's ATA to transfer from"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"delegatorAta","resolution":{"category":"userProvided"}},{"docs":["The receiver's ATA to transfer to"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"receiverAta","resolution":{"category":"userProvided"}},{"docs":["The token mint"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenMint","resolution":{"category":"userProvided"}},{"docs":["Token program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenProgram","resolution":{"category":"userProvided"}},{"docs":["The delegatee signing the transfer"],"is_optional":false,"is_signer":true,"is_writable":false,"name":"delegatee","resolution":{"category":"signer"}},{"docs":["The event authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"eventAuthority","resolution":{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","category":"known"}},{"docs":["This program (for self-CPI)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"selfProgram","resolution":{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","category":"known"}}],"args":[{"name":"transferData","type":"transferData"}],"discriminator":[4],"discriminator_size":1,"name":"transferFixed","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The recurring delegation PDA to transfer from"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"delegationPda","resolution":{"category":"userProvided"}},{"docs":["The subscription-authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"subscriptionAuthority","resolution":{"category":"pdaRef","pda_name":"subscriptionAuthority"}},{"docs":["The delegator's ATA to transfer from"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"delegatorAta","resolution":{"category":"userProvided"}},{"docs":["The receiver's ATA to transfer to"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"receiverAta","resolution":{"category":"userProvided"}},{"docs":["The token mint"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenMint","resolution":{"category":"userProvided"}},{"docs":["Token program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenProgram","resolution":{"category":"userProvided"}},{"docs":["The delegatee signing the transfer"],"is_optional":false,"is_signer":true,"is_writable":false,"name":"delegatee","resolution":{"category":"signer"}},{"docs":["The event authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"eventAuthority","resolution":{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","category":"known"}},{"docs":["This program (for self-CPI)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"selfProgram","resolution":{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","category":"known"}}],"args":[{"name":"transferData","type":"transferData"}],"discriminator":[5],"discriminator_size":1,"name":"transferRecurring","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The user who owns the SubscriptionAuthority PDA (receives rent)"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"user","resolution":{"category":"signer"}},{"docs":["The SubscriptionAuthority PDA to close"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"subscriptionAuthority","resolution":{"category":"pdaRef","pda_name":"subscriptionAuthority"}}],"args":[],"discriminator":[6],"discriminator_size":1,"name":"closeSubscriptionAuthority","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The merchant creating the plan"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"merchant","resolution":{"category":"signer"}},{"docs":["The plan PDA being created"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"planPda","resolution":{"category":"userProvided"}},{"docs":["The token mint"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenMint","resolution":{"category":"userProvided"}},{"docs":["The system program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"systemProgram","resolution":{"address":"11111111111111111111111111111111","category":"known"}},{"docs":["The token program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenProgram","resolution":{"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA","category":"known"}}],"args":[{"name":"planData","type":"planData"}],"discriminator":[7],"discriminator_size":1,"name":"createPlan","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The plan owner updating the plan"],"is_optional":false,"is_signer":true,"is_writable":false,"name":"owner","resolution":{"category":"signer"}},{"docs":["The plan PDA being updated"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"planPda","resolution":{"category":"userProvided"}},{"docs":["The event authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"eventAuthority","resolution":{"category":"pdaRef","pda_name":"eventAuthority"}},{"docs":["This program (for self-CPI)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"selfProgram","resolution":{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","category":"known"}}],"args":[{"name":"updatePlanData","type":"updatePlanData"}],"discriminator":[8],"discriminator_size":1,"name":"updatePlan","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The plan owner deleting the plan (receives rent)"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"owner","resolution":{"category":"signer"}},{"docs":["The plan PDA being deleted"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"planPda","resolution":{"category":"userProvided"}}],"args":[],"discriminator":[9],"discriminator_size":1,"name":"deletePlan","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The subscription delegation PDA"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"subscriptionPda","resolution":{"category":"userProvided"}},{"docs":["The plan PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"planPda","resolution":{"category":"userProvided"}},{"docs":["The subscription-authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"subscriptionAuthority","resolution":{"category":"pdaRef","pda_name":"subscriptionAuthority"}},{"docs":["The delegator's ATA to transfer from"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"delegatorAta","resolution":{"category":"userProvided"}},{"docs":["The receiver's ATA to transfer to"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"receiverAta","resolution":{"category":"userProvided"}},{"docs":["The authorized puller (plan owner or whitelisted)"],"is_optional":false,"is_signer":true,"is_writable":false,"name":"caller","resolution":{"category":"signer"}},{"docs":["The token mint"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenMint","resolution":{"category":"userProvided"}},{"docs":["Token program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenProgram","resolution":{"category":"userProvided"}},{"docs":["The event authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"eventAuthority","resolution":{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","category":"known"}},{"docs":["This program (for self-CPI)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"selfProgram","resolution":{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","category":"known"}}],"args":[{"name":"transferData","type":"transferData"}],"discriminator":[10],"discriminator_size":1,"name":"transferSubscription","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The subscriber creating the subscription (pays rent)"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"subscriber","resolution":{"category":"signer"}},{"docs":["The merchant who owns the plan"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"merchant","resolution":{"category":"userProvided"}},{"docs":["The plan PDA to subscribe to"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"planPda","resolution":{"category":"userProvided"}},{"docs":["The subscription PDA being created"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"subscriptionPda","resolution":{"category":"pdaInline","seeds":[{"type":"literal","value":"subscription"},{"account_name":"planPda","type":"accountRef"},{"account_name":"subscriber","type":"accountRef"}]}},{"docs":["The subscriber's SubscriptionAuthority PDA for the plan's mint"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"subscriptionAuthorityPda","resolution":{"category":"userProvided"}},{"docs":["The system program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"systemProgram","resolution":{"address":"11111111111111111111111111111111","category":"known"}},{"docs":["The event authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"eventAuthority","resolution":{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","category":"known"}},{"docs":["This program (for self-CPI)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"selfProgram","resolution":{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","category":"known"}}],"args":[{"name":"subscribeData","type":"subscribeData"}],"discriminator":[11],"discriminator_size":1,"name":"subscribe","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The subscriber cancelling the subscription"],"is_optional":false,"is_signer":true,"is_writable":false,"name":"subscriber","resolution":{"category":"signer"}},{"docs":["The plan PDA for the subscription"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"planPda","resolution":{"category":"userProvided"}},{"docs":["The subscription PDA being cancelled"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"subscriptionPda","resolution":{"category":"pdaInline","seeds":[{"type":"literal","value":"subscription"},{"account_name":"planPda","type":"accountRef"},{"account_name":"subscriber","type":"accountRef"}]}},{"docs":["The event authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"eventAuthority","resolution":{"address":"3Hnj4BYoDgtpBuqXfiy7Y8cNa3jXaNd4oqgSXBzkMcH7","category":"known"}},{"docs":["This program (for self-CPI)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"selfProgram","resolution":{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","category":"known"}}],"args":[],"discriminator":[12],"discriminator_size":1,"name":"cancelSubscription","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The subscriber resuming the subscription"],"is_optional":false,"is_signer":true,"is_writable":false,"name":"subscriber","resolution":{"category":"signer"}},{"docs":["The plan PDA for the subscription"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"planPda","resolution":{"category":"userProvided"}},{"docs":["The subscription PDA being resumed"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"subscriptionPda","resolution":{"category":"pdaInline","seeds":[{"type":"literal","value":"subscription"},{"account_name":"planPda","type":"accountRef"},{"account_name":"subscriber","type":"accountRef"}]}},{"docs":["The subscriber's SubscriptionAuthority PDA for the plan's mint"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"subscriptionAuthority","resolution":{"category":"pdaRef","pda_name":"subscriptionAuthority"}},{"docs":["The event authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"eventAuthority","resolution":{"category":"pdaRef","pda_name":"eventAuthority"}},{"docs":["This program (for self-CPI)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"selfProgram","resolution":{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","category":"known"}}],"args":[{"name":"resumeData","type":"resumeData"}],"discriminator":[13],"discriminator_size":1,"name":"resumeSubscription","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The ATA owner: revokes the program's delegate and, when still open, closes the SubscriptionAuthority PDA (receives rent when self-funded)"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"user","resolution":{"category":"signer"}},{"docs":["The user's ATA whose delegate is being revoked"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"userAta","resolution":{"category":"userProvided"}},{"docs":["The token mint of the user's ATA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenMint","resolution":{"category":"userProvided"}},{"docs":["Token program"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"tokenProgram","resolution":{"category":"userProvided"}},{"docs":["The SubscriptionAuthority PDA. Closed when still open; ignored when already closed."],"is_optional":false,"is_signer":false,"is_writable":true,"name":"subscriptionAuthority","resolution":{"category":"pdaInline","seeds":[{"type":"literal","value":"SubscriptionAuthority"},{"account_name":"user","type":"accountRef"},{"account_name":"tokenMint","type":"accountRef"}]}}],"args":[],"discriminator":[14],"discriminator_size":1,"name":"revokeSubscriptionAuthority","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The recorded payer reclaiming rent"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"payer","resolution":{"category":"signer"}},{"docs":["The fixed or recurring delegation PDA to close"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"delegationAccount","resolution":{"category":"userProvided"}},{"docs":["The delegation's recorded SubscriptionAuthority PDA (may be closed)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"subscriptionAuthority","resolution":{"category":"pdaRef","pda_name":"subscriptionAuthority"}}],"args":[],"discriminator":[15],"discriminator_size":1,"name":"revokeAbandonedDelegation","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The recorded payer reclaiming rent"],"is_optional":false,"is_signer":true,"is_writable":true,"name":"payer","resolution":{"category":"signer"}},{"docs":["The abandoned subscription PDA to close"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"subscriptionAccount","resolution":{"category":"userProvided"}},{"docs":["The subscriber's recorded SubscriptionAuthority PDA for the plan's mint (may be closed)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"subscriptionAuthority","resolution":{"category":"pdaRef","pda_name":"subscriptionAuthority"}},{"docs":["The plan the subscription belongs to; provides the mint"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"planPda","resolution":{"category":"userProvided"}}],"args":[],"discriminator":[16],"discriminator_size":1,"name":"revokeAbandonedSubscription","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"},{"accounts":[{"docs":["The subscriber cancelling the subscription"],"is_optional":false,"is_signer":true,"is_writable":false,"name":"subscriber","resolution":{"category":"signer"}},{"docs":["The owner of the subscription plan approving immediate cancellation"],"is_optional":false,"is_signer":true,"is_writable":false,"name":"merchant","resolution":{"category":"signer"}},{"docs":["The plan PDA for the subscription"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"planPda","resolution":{"category":"userProvided"}},{"docs":["The subscription PDA being cancelled immediately"],"is_optional":false,"is_signer":false,"is_writable":true,"name":"subscriptionPda","resolution":{"category":"pdaInline","seeds":[{"type":"literal","value":"subscription"},{"account_name":"planPda","type":"accountRef"},{"account_name":"subscriber","type":"accountRef"}]}},{"docs":["The event authority PDA"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"eventAuthority","resolution":{"category":"pdaRef","pda_name":"eventAuthority"}},{"docs":["This program (for self-CPI)"],"is_optional":false,"is_signer":false,"is_writable":false,"name":"selfProgram","resolution":{"address":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","category":"known"}}],"args":[{"name":"cancelSubscriptionNowData","type":"cancelSubscriptionNowData"}],"discriminator":[17],"discriminator_size":1,"name":"cancelSubscriptionNow","program_id":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44"}],"normalizedIdlHash":"arete:h1:idl-normalized:sha256:c12d4e2b8c21cd79a97e3e9dd698cc60dd1a511c1ef4e31dbc502a8fd89485c4","pdas":{"eventAuthority":{"name":"eventAuthority","seeds":[{"type":"literal","value":"event_authority"}]},"fixedDelegation":{"name":"fixedDelegation","seeds":[{"type":"literal","value":"delegation"},{"arg_name":"subscriptionAuthority","arg_type":"publicKey","type":"argRef"},{"arg_name":"delegator","arg_type":"publicKey","type":"argRef"},{"arg_name":"delegatee","arg_type":"publicKey","type":"argRef"},{"arg_name":"nonce","arg_type":"u64","type":"argRef"}]},"plan":{"name":"plan","seeds":[{"type":"literal","value":"plan"},{"arg_name":"owner","arg_type":"publicKey","type":"argRef"},{"arg_name":"planId","arg_type":"u64","type":"argRef"}]},"recurringDelegation":{"name":"recurringDelegation","seeds":[{"type":"literal","value":"delegation"},{"arg_name":"subscriptionAuthority","arg_type":"publicKey","type":"argRef"},{"arg_name":"delegator","arg_type":"publicKey","type":"argRef"},{"arg_name":"delegatee","arg_type":"publicKey","type":"argRef"},{"arg_name":"nonce","arg_type":"u64","type":"argRef"}]},"subscriptionAuthority":{"name":"subscriptionAuthority","seeds":[{"type":"literal","value":"SubscriptionAuthority"},{"arg_name":"user","arg_type":"publicKey","type":"argRef"},{"arg_name":"tokenMint","arg_type":"publicKey","type":"argRef"}]},"subscriptionDelegation":{"name":"subscriptionDelegation","seeds":[{"type":"literal","value":"subscription"},{"arg_name":"planPda","arg_type":"publicKey","type":"argRef"},{"arg_name":"subscriber","arg_type":"publicKey","type":"argRef"}]}},"portableIdlHash":"arete:h1:idl-portable:sha256:214697bc7120b5ba0801995240926e493ad3bf32a16dde861914cf18b8ec3442","programId":"De1egAFMkMWZSN5rYXRj9CAdheBamobVNubTsi9avR44","schema":"arete.program-spec/v1"}}