existingPolicies
existingPolicies: {
account:
| {
bump: number;
createdAt: BN;
gateway: PublicKey;
memo: number[];
padding: number[];
paymentCount: number;
policyId: number;
policyType: DecodeEnum<
{
kind: "enum";
variants: [
{
fields: [
{ name: "amount"; type: "u64" },
{ name: "autoRenew"; type: "bool" },
{ name: "maxRenewals"; type: { option: ... } },
{ name: "paymentFrequency"; type: { defined: ... } },
{ name: "nextPaymentDue"; type: "i64" },
{ name: "padding"; type: { array: ... } },
];
name: "subscription";
},
{
fields: [
{ name: "milestoneAmounts"; type: { array: ... } },
{ name: "milestoneTimestamps"; type: { array: ... } },
{ name: "currentMilestone"; type: "u8" },
{ name: "releaseCondition"; type: "u8" },
{ name: "totalMilestones"; type: "u8" },
{ name: "escrowAmount"; type: "u64" },
{ name: "padding"; type: { array: ... } },
];
name: "milestone";
},
{
fields: [
{ name: "maxAmountPerPeriod"; type: "u64" },
{ name: "maxChunkAmount"; type: "u64" },
{ name: "periodLengthSeconds"; type: "u64" },
{ name: "currentPeriodStart"; type: "i64" },
{ name: "currentPeriodTotal"; type: "u64" },
{ name: "expiryDate"; type: { option: ... } },
{ name: "padding"; type: { array: ... } },
];
name: "payAsYouGo";
},
{
fields: [
{ name: "amount"; type: "u64" },
{ name: "dueDate"; type: "i64" },
{ name: "expiryDate"; type: { option: ... } },
{ name: "padding"; type: { array: ... } },
];
name: "oneTime";
},
{
fields: [
{ name: "maxAmount"; type: "u64" },
{ name: "validAfter"; type: "i64" },
{ name: "deadline"; type: "i64" },
{ name: "padding"; type: { array: ... } },
];
name: "upTo";
},
];
},
DecodedHelper<
[
{
name: "byteRangeCheck";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
],
DecodedHelper<
[
{
name: "byteRangeCheck";
type: { fields: [(...), (...), (...)]; kind: "struct" };
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
],
DecodedHelper<
[
{ name: "byteRangeCheck"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composableExecuted";
type: { fields: ...; kind: ... };
},
{ name: "composablePolicy"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composablePolicyCreated";
type: { fields: ...; kind: ... };
},
],
EmptyDefined,
>,
>,
>,
>;
recipient: PublicKey;
rentPayer: PublicKey;
status: DecodeEnum<
{
kind: "enum";
variants: [
{ name: "active" },
{ name: "paused" },
{ name: "completed" },
];
},
DecodedHelper<
[
{
name: "byteRangeCheck";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
],
DecodedHelper<
[
{
name: "byteRangeCheck";
type: { fields: [(...), (...), (...)]; kind: "struct" };
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
],
DecodedHelper<
[
{ name: "byteRangeCheck"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composableExecuted";
type: { fields: ...; kind: ... };
},
{ name: "composablePolicy"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composablePolicyCreated";
type: { fields: ...; kind: ... };
},
],
EmptyDefined,
>,
>,
>,
>;
totalPaid: BN;
updatedAt: BN;
userPayment: PublicKey;
}
| {
bump: number;
createdAt: BN;
forwardConfig: {
forwardFlags: number;
inputMint: PublicKey;
instructionConstraint: {
dataChecks: { expected: number[]; length: number; offset: number }[];
numDataChecks: number;
numPinnedAccounts: number;
pinnedAccounts: { index: number; pubkey: PublicKey }[];
programId: PublicKey;
};
outputMint: PublicKey;
};
gateway: PublicKey;
memo: number[];
padding: number[];
paymentCount: number;
policyId: number;
policyType: DecodeEnum<
{
kind: "enum";
variants: [
{
fields: [
{ name: "amount"; type: "u64" },
{ name: "autoRenew"; type: "bool" },
{ name: "maxRenewals"; type: { option: ... } },
{ name: "paymentFrequency"; type: { defined: ... } },
{ name: "nextPaymentDue"; type: "i64" },
{ name: "padding"; type: { array: ... } },
];
name: "subscription";
},
{
fields: [
{ name: "milestoneAmounts"; type: { array: ... } },
{ name: "milestoneTimestamps"; type: { array: ... } },
{ name: "currentMilestone"; type: "u8" },
{ name: "releaseCondition"; type: "u8" },
{ name: "totalMilestones"; type: "u8" },
{ name: "escrowAmount"; type: "u64" },
{ name: "padding"; type: { array: ... } },
];
name: "milestone";
},
{
fields: [
{ name: "maxAmountPerPeriod"; type: "u64" },
{ name: "maxChunkAmount"; type: "u64" },
{ name: "periodLengthSeconds"; type: "u64" },
{ name: "currentPeriodStart"; type: "i64" },
{ name: "currentPeriodTotal"; type: "u64" },
{ name: "expiryDate"; type: { option: ... } },
{ name: "padding"; type: { array: ... } },
];
name: "payAsYouGo";
},
{
fields: [
{ name: "amount"; type: "u64" },
{ name: "dueDate"; type: "i64" },
{ name: "expiryDate"; type: { option: ... } },
{ name: "padding"; type: { array: ... } },
];
name: "oneTime";
},
{
fields: [
{ name: "maxAmount"; type: "u64" },
{ name: "validAfter"; type: "i64" },
{ name: "deadline"; type: "i64" },
{ name: "padding"; type: { array: ... } },
];
name: "upTo";
},
];
},
DecodedHelper<
[
{
name: "byteRangeCheck";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
],
DecodedHelper<
[
{
name: "byteRangeCheck";
type: { fields: [(...), (...), (...)]; kind: "struct" };
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
],
DecodedHelper<
[
{ name: "byteRangeCheck"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composableExecuted";
type: { fields: ...; kind: ... };
},
{ name: "composablePolicy"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composablePolicyCreated";
type: { fields: ...; kind: ... };
},
],
EmptyDefined,
>,
>,
>,
>;
postValidation: DecodeEnum<
{
kind: "enum";
variants: [
{ name: "disabled" },
{
fields: [{ name: "programId"; type: "pubkey" }];
name: "programCall";
},
{ fields: [{ name: "reserved"; type: "u8" }]; name: "inline" },
];
},
DecodedHelper<
[
{
name: "byteRangeCheck";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
],
DecodedHelper<
[
{
name: "byteRangeCheck";
type: { fields: [(...), (...), (...)]; kind: "struct" };
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
],
DecodedHelper<
[
{ name: "byteRangeCheck"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composableExecuted";
type: { fields: ...; kind: ... };
},
{ name: "composablePolicy"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composablePolicyCreated";
type: { fields: ...; kind: ... };
},
],
EmptyDefined,
>,
>,
>,
>;
preValidation: DecodeEnum<
{
kind: "enum";
variants: [
{ name: "disabled" },
{
fields: [{ name: "programId"; type: "pubkey" }];
name: "programCall";
},
{ fields: [{ name: "reserved"; type: "u8" }]; name: "inline" },
];
},
DecodedHelper<
[
{
name: "byteRangeCheck";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
],
DecodedHelper<
[
{
name: "byteRangeCheck";
type: { fields: [(...), (...), (...)]; kind: "struct" };
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
],
DecodedHelper<
[
{ name: "byteRangeCheck"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composableExecuted";
type: { fields: ...; kind: ... };
},
{ name: "composablePolicy"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composablePolicyCreated";
type: { fields: ...; kind: ... };
},
],
EmptyDefined,
>,
>,
>,
>;
recipient: PublicKey;
rentPayer: PublicKey;
status: DecodeEnum<
{
kind: "enum";
variants: [
{ name: "active" },
{ name: "paused" },
{ name: "completed" },
];
},
DecodedHelper<
[
{
name: "byteRangeCheck";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
{ name: ...; type: ... },
];
kind: "struct";
};
},
],
DecodedHelper<
[
{
name: "byteRangeCheck";
type: { fields: [(...), (...), (...)]; kind: "struct" };
},
{
docs: [
"An event that is thrown when a composable policy is executed",
];
name: "composableExecuted";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
name: "composablePolicy";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
{
docs: [
"An event that is thrown when a composable policy is created",
];
name: "composablePolicyCreated";
type: {
fields: [(...), (...), (...), (...), (...), (...), (...)];
kind: "struct";
};
},
],
DecodedHelper<
[
{ name: "byteRangeCheck"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composableExecuted";
type: { fields: ...; kind: ... };
},
{ name: "composablePolicy"; type: { fields: ...; kind: ... } },
{
docs: [(...)];
name: "composablePolicyCreated";
type: { fields: ...; kind: ... };
},
],
EmptyDefined,
>,
>,
>,
>;
totalInput: BN;
totalOutput: BN;
updatedAt: BN;
userPayment: PublicKey;
};
publicKey: PublicKey;
}[]