@tributary-so/sdk
    Preparing search index...

    Function isForwardEnabled

    • True when the composable policy has a forward step enabled.

      A sentinel programId of PublicKey.default on the InstructionConstraint disables forwarding entirely (ADR-0009).

      Parameters

      • policy: {
            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: "u32" } },
                                {
                                    name: "paymentFrequency";
                                    type: { defined: { name: "paymentFrequency" } };
                                },
                                { name: "nextPaymentDue"; type: "i64" },
                                { name: "padding"; type: { array: ["u8", 97] } },
                            ];
                            name: "subscription";
                        },
                        {
                            fields: [
                                { name: "milestoneAmounts"; type: { array: ["u64", 4] } },
                                { name: "milestoneTimestamps"; type: { array: ["i64", 4] } },
                                { name: "currentMilestone"; type: "u8" },
                                { name: "releaseCondition"; type: "u8" },
                                { name: "totalMilestones"; type: "u8" },
                                { name: "escrowAmount"; type: "u64" },
                                { name: "padding"; type: { array: ["u8", 53] } },
                            ];
                            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: "i64" } },
                                { name: "padding"; type: { array: ["u8", 79] } },
                            ];
                            name: "payAsYouGo";
                        },
                        {
                            fields: [
                                { name: "amount"; type: "u64" },
                                { name: "dueDate"; type: "i64" },
                                { name: "expiryDate"; type: { option: "i64" } },
                                { name: "padding"; type: { array: ["u8", 103] } },
                            ];
                            name: "oneTime";
                        },
                        {
                            fields: [
                                { name: "maxAmount"; type: "u64" },
                                { name: "validAfter"; type: "i64" },
                                { name: "deadline"; type: "i64" },
                                { name: "padding"; type: { array: ["u8", 104] } },
                            ];
                            name: "upTo";
                        },
                    ];
                },
                DecodedHelper<
                    [
                        {
                            name: "byteRangeCheck";
                            type: {
                                fields: [
                                    { name: "offset"; type: "u8" },
                                    { name: "length"; type: "u8" },
                                    { name: "expected"; type: { array: ["u8", 8] } },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            docs: [
                                "An event that is thrown when a composable policy is executed",
                            ];
                            name: "composableExecuted";
                            type: {
                                fields: [
                                    { name: "composablePolicy"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "targetProgram"; type: "pubkey" },
                                    { name: "inputAmount"; type: "u64" },
                                    { name: "outputAmount"; type: "u64" },
                                    { name: "gatewayFee"; type: "u64" },
                                    { name: "protocolFee"; type: "u64" },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            name: "composablePolicy";
                            type: {
                                fields: [
                                    { name: "bump"; type: "u8" },
                                    { name: "userPayment"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "status"; type: { defined: { name: "policyStatus" } } },
                                    { name: "rentPayer"; type: "pubkey" },
                                    { name: "policyType"; type: { defined: { name: "policyType" } } },
                                    {
                                        name: "forwardConfig";
                                        type: { defined: { name: "forwardConfig" } };
                                    },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            docs: [
                                "An event that is thrown when a composable policy is created",
                            ];
                            name: "composablePolicyCreated";
                            type: {
                                fields: [
                                    { name: "composablePolicy"; type: "pubkey" },
                                    { name: "userPayment"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "recipient"; type: "pubkey" },
                                    { name: "policyId"; type: "u32" },
                                    { name: "policyType"; type: { defined: { name: "policyType" } } },
                                    { name: "memo"; type: { array: ["u8", 32] } },
                                ];
                                kind: "struct";
                            };
                        },
                    ],
                    DecodedHelper<
                        [
                            {
                                name: "byteRangeCheck";
                                type: {
                                    fields: [
                                        { name: "offset"; type: "u8" },
                                        { name: "length"; type: "u8" },
                                        { name: "expected"; type: { array: [(...), (...)] } },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                docs: [
                                    "An event that is thrown when a composable policy is executed",
                                ];
                                name: "composableExecuted";
                                type: {
                                    fields: [
                                        { name: "composablePolicy"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "targetProgram"; type: "pubkey" },
                                        { name: "inputAmount"; type: "u64" },
                                        { name: "outputAmount"; type: "u64" },
                                        { name: "gatewayFee"; type: "u64" },
                                        { name: "protocolFee"; type: "u64" },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                name: "composablePolicy";
                                type: {
                                    fields: [
                                        { name: "bump"; type: "u8" },
                                        { name: "userPayment"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "status"; type: { defined: { name: ... } } },
                                        { name: "rentPayer"; type: "pubkey" },
                                        { name: "policyType"; type: { defined: { name: ... } } },
                                        { name: "forwardConfig"; type: { defined: { name: ... } } },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                docs: [
                                    "An event that is thrown when a composable policy is created",
                                ];
                                name: "composablePolicyCreated";
                                type: {
                                    fields: [
                                        { name: "composablePolicy"; type: "pubkey" },
                                        { name: "userPayment"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "recipient"; type: "pubkey" },
                                        { name: "policyId"; type: "u32" },
                                        { name: "policyType"; type: { defined: { name: ... } } },
                                        { name: "memo"; type: { array: [(...), (...)] } },
                                    ];
                                    kind: "struct";
                                };
                            },
                        ],
                        DecodedHelper<
                            [
                                {
                                    name: "byteRangeCheck";
                                    type: {
                                        fields: [
                                            { name: "offset"; type: "u8" },
                                            { name: "length"; type: "u8" },
                                            { name: "expected"; type: { array: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    docs: [
                                        "An event that is thrown when a composable policy is executed",
                                    ];
                                    name: "composableExecuted";
                                    type: {
                                        fields: [
                                            { name: "composablePolicy"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "targetProgram"; type: "pubkey" },
                                            { name: "inputAmount"; type: "u64" },
                                            { name: "outputAmount"; type: "u64" },
                                            { name: "gatewayFee"; type: "u64" },
                                            { name: "protocolFee"; type: "u64" },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    name: "composablePolicy";
                                    type: {
                                        fields: [
                                            { name: "bump"; type: "u8" },
                                            { name: "userPayment"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "status"; type: { defined: ... } },
                                            { name: "rentPayer"; type: "pubkey" },
                                            { name: "policyType"; type: { defined: ... } },
                                            { name: "forwardConfig"; type: { defined: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    docs: [
                                        "An event that is thrown when a composable policy is created",
                                    ];
                                    name: "composablePolicyCreated";
                                    type: {
                                        fields: [
                                            { name: "composablePolicy"; type: "pubkey" },
                                            { name: "userPayment"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "recipient"; type: "pubkey" },
                                            { name: "policyId"; type: "u32" },
                                            { name: "policyType"; type: { defined: ... } },
                                            { name: "memo"; type: { array: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                            ],
                            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: "offset"; type: "u8" },
                                    { name: "length"; type: "u8" },
                                    { name: "expected"; type: { array: ["u8", 8] } },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            docs: [
                                "An event that is thrown when a composable policy is executed",
                            ];
                            name: "composableExecuted";
                            type: {
                                fields: [
                                    { name: "composablePolicy"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "targetProgram"; type: "pubkey" },
                                    { name: "inputAmount"; type: "u64" },
                                    { name: "outputAmount"; type: "u64" },
                                    { name: "gatewayFee"; type: "u64" },
                                    { name: "protocolFee"; type: "u64" },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            name: "composablePolicy";
                            type: {
                                fields: [
                                    { name: "bump"; type: "u8" },
                                    { name: "userPayment"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "status"; type: { defined: { name: "policyStatus" } } },
                                    { name: "rentPayer"; type: "pubkey" },
                                    { name: "policyType"; type: { defined: { name: "policyType" } } },
                                    {
                                        name: "forwardConfig";
                                        type: { defined: { name: "forwardConfig" } };
                                    },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            docs: [
                                "An event that is thrown when a composable policy is created",
                            ];
                            name: "composablePolicyCreated";
                            type: {
                                fields: [
                                    { name: "composablePolicy"; type: "pubkey" },
                                    { name: "userPayment"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "recipient"; type: "pubkey" },
                                    { name: "policyId"; type: "u32" },
                                    { name: "policyType"; type: { defined: { name: "policyType" } } },
                                    { name: "memo"; type: { array: ["u8", 32] } },
                                ];
                                kind: "struct";
                            };
                        },
                    ],
                    DecodedHelper<
                        [
                            {
                                name: "byteRangeCheck";
                                type: {
                                    fields: [
                                        { name: "offset"; type: "u8" },
                                        { name: "length"; type: "u8" },
                                        { name: "expected"; type: { array: [(...), (...)] } },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                docs: [
                                    "An event that is thrown when a composable policy is executed",
                                ];
                                name: "composableExecuted";
                                type: {
                                    fields: [
                                        { name: "composablePolicy"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "targetProgram"; type: "pubkey" },
                                        { name: "inputAmount"; type: "u64" },
                                        { name: "outputAmount"; type: "u64" },
                                        { name: "gatewayFee"; type: "u64" },
                                        { name: "protocolFee"; type: "u64" },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                name: "composablePolicy";
                                type: {
                                    fields: [
                                        { name: "bump"; type: "u8" },
                                        { name: "userPayment"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "status"; type: { defined: { name: ... } } },
                                        { name: "rentPayer"; type: "pubkey" },
                                        { name: "policyType"; type: { defined: { name: ... } } },
                                        { name: "forwardConfig"; type: { defined: { name: ... } } },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                docs: [
                                    "An event that is thrown when a composable policy is created",
                                ];
                                name: "composablePolicyCreated";
                                type: {
                                    fields: [
                                        { name: "composablePolicy"; type: "pubkey" },
                                        { name: "userPayment"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "recipient"; type: "pubkey" },
                                        { name: "policyId"; type: "u32" },
                                        { name: "policyType"; type: { defined: { name: ... } } },
                                        { name: "memo"; type: { array: [(...), (...)] } },
                                    ];
                                    kind: "struct";
                                };
                            },
                        ],
                        DecodedHelper<
                            [
                                {
                                    name: "byteRangeCheck";
                                    type: {
                                        fields: [
                                            { name: "offset"; type: "u8" },
                                            { name: "length"; type: "u8" },
                                            { name: "expected"; type: { array: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    docs: [
                                        "An event that is thrown when a composable policy is executed",
                                    ];
                                    name: "composableExecuted";
                                    type: {
                                        fields: [
                                            { name: "composablePolicy"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "targetProgram"; type: "pubkey" },
                                            { name: "inputAmount"; type: "u64" },
                                            { name: "outputAmount"; type: "u64" },
                                            { name: "gatewayFee"; type: "u64" },
                                            { name: "protocolFee"; type: "u64" },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    name: "composablePolicy";
                                    type: {
                                        fields: [
                                            { name: "bump"; type: "u8" },
                                            { name: "userPayment"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "status"; type: { defined: ... } },
                                            { name: "rentPayer"; type: "pubkey" },
                                            { name: "policyType"; type: { defined: ... } },
                                            { name: "forwardConfig"; type: { defined: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    docs: [
                                        "An event that is thrown when a composable policy is created",
                                    ];
                                    name: "composablePolicyCreated";
                                    type: {
                                        fields: [
                                            { name: "composablePolicy"; type: "pubkey" },
                                            { name: "userPayment"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "recipient"; type: "pubkey" },
                                            { name: "policyId"; type: "u32" },
                                            { name: "policyType"; type: { defined: ... } },
                                            { name: "memo"; type: { array: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                            ],
                            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: "offset"; type: "u8" },
                                    { name: "length"; type: "u8" },
                                    { name: "expected"; type: { array: ["u8", 8] } },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            docs: [
                                "An event that is thrown when a composable policy is executed",
                            ];
                            name: "composableExecuted";
                            type: {
                                fields: [
                                    { name: "composablePolicy"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "targetProgram"; type: "pubkey" },
                                    { name: "inputAmount"; type: "u64" },
                                    { name: "outputAmount"; type: "u64" },
                                    { name: "gatewayFee"; type: "u64" },
                                    { name: "protocolFee"; type: "u64" },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            name: "composablePolicy";
                            type: {
                                fields: [
                                    { name: "bump"; type: "u8" },
                                    { name: "userPayment"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "status"; type: { defined: { name: "policyStatus" } } },
                                    { name: "rentPayer"; type: "pubkey" },
                                    { name: "policyType"; type: { defined: { name: "policyType" } } },
                                    {
                                        name: "forwardConfig";
                                        type: { defined: { name: "forwardConfig" } };
                                    },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            docs: [
                                "An event that is thrown when a composable policy is created",
                            ];
                            name: "composablePolicyCreated";
                            type: {
                                fields: [
                                    { name: "composablePolicy"; type: "pubkey" },
                                    { name: "userPayment"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "recipient"; type: "pubkey" },
                                    { name: "policyId"; type: "u32" },
                                    { name: "policyType"; type: { defined: { name: "policyType" } } },
                                    { name: "memo"; type: { array: ["u8", 32] } },
                                ];
                                kind: "struct";
                            };
                        },
                    ],
                    DecodedHelper<
                        [
                            {
                                name: "byteRangeCheck";
                                type: {
                                    fields: [
                                        { name: "offset"; type: "u8" },
                                        { name: "length"; type: "u8" },
                                        { name: "expected"; type: { array: [(...), (...)] } },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                docs: [
                                    "An event that is thrown when a composable policy is executed",
                                ];
                                name: "composableExecuted";
                                type: {
                                    fields: [
                                        { name: "composablePolicy"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "targetProgram"; type: "pubkey" },
                                        { name: "inputAmount"; type: "u64" },
                                        { name: "outputAmount"; type: "u64" },
                                        { name: "gatewayFee"; type: "u64" },
                                        { name: "protocolFee"; type: "u64" },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                name: "composablePolicy";
                                type: {
                                    fields: [
                                        { name: "bump"; type: "u8" },
                                        { name: "userPayment"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "status"; type: { defined: { name: ... } } },
                                        { name: "rentPayer"; type: "pubkey" },
                                        { name: "policyType"; type: { defined: { name: ... } } },
                                        { name: "forwardConfig"; type: { defined: { name: ... } } },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                docs: [
                                    "An event that is thrown when a composable policy is created",
                                ];
                                name: "composablePolicyCreated";
                                type: {
                                    fields: [
                                        { name: "composablePolicy"; type: "pubkey" },
                                        { name: "userPayment"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "recipient"; type: "pubkey" },
                                        { name: "policyId"; type: "u32" },
                                        { name: "policyType"; type: { defined: { name: ... } } },
                                        { name: "memo"; type: { array: [(...), (...)] } },
                                    ];
                                    kind: "struct";
                                };
                            },
                        ],
                        DecodedHelper<
                            [
                                {
                                    name: "byteRangeCheck";
                                    type: {
                                        fields: [
                                            { name: "offset"; type: "u8" },
                                            { name: "length"; type: "u8" },
                                            { name: "expected"; type: { array: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    docs: [
                                        "An event that is thrown when a composable policy is executed",
                                    ];
                                    name: "composableExecuted";
                                    type: {
                                        fields: [
                                            { name: "composablePolicy"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "targetProgram"; type: "pubkey" },
                                            { name: "inputAmount"; type: "u64" },
                                            { name: "outputAmount"; type: "u64" },
                                            { name: "gatewayFee"; type: "u64" },
                                            { name: "protocolFee"; type: "u64" },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    name: "composablePolicy";
                                    type: {
                                        fields: [
                                            { name: "bump"; type: "u8" },
                                            { name: "userPayment"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "status"; type: { defined: ... } },
                                            { name: "rentPayer"; type: "pubkey" },
                                            { name: "policyType"; type: { defined: ... } },
                                            { name: "forwardConfig"; type: { defined: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    docs: [
                                        "An event that is thrown when a composable policy is created",
                                    ];
                                    name: "composablePolicyCreated";
                                    type: {
                                        fields: [
                                            { name: "composablePolicy"; type: "pubkey" },
                                            { name: "userPayment"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "recipient"; type: "pubkey" },
                                            { name: "policyId"; type: "u32" },
                                            { name: "policyType"; type: { defined: ... } },
                                            { name: "memo"; type: { array: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                            ],
                            EmptyDefined,
                        >,
                    >,
                >,
            >;
            recipient: PublicKey;
            rentPayer: PublicKey;
            status: DecodeEnum<
                {
                    kind: "enum";
                    variants: [{ name: "active" }, { name: "paused" }, { name: "completed" }];
                },
                DecodedHelper<
                    [
                        {
                            name: "byteRangeCheck";
                            type: {
                                fields: [
                                    { name: "offset"; type: "u8" },
                                    { name: "length"; type: "u8" },
                                    { name: "expected"; type: { array: ["u8", 8] } },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            docs: [
                                "An event that is thrown when a composable policy is executed",
                            ];
                            name: "composableExecuted";
                            type: {
                                fields: [
                                    { name: "composablePolicy"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "targetProgram"; type: "pubkey" },
                                    { name: "inputAmount"; type: "u64" },
                                    { name: "outputAmount"; type: "u64" },
                                    { name: "gatewayFee"; type: "u64" },
                                    { name: "protocolFee"; type: "u64" },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            name: "composablePolicy";
                            type: {
                                fields: [
                                    { name: "bump"; type: "u8" },
                                    { name: "userPayment"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "status"; type: { defined: { name: "policyStatus" } } },
                                    { name: "rentPayer"; type: "pubkey" },
                                    { name: "policyType"; type: { defined: { name: "policyType" } } },
                                    {
                                        name: "forwardConfig";
                                        type: { defined: { name: "forwardConfig" } };
                                    },
                                ];
                                kind: "struct";
                            };
                        },
                        {
                            docs: [
                                "An event that is thrown when a composable policy is created",
                            ];
                            name: "composablePolicyCreated";
                            type: {
                                fields: [
                                    { name: "composablePolicy"; type: "pubkey" },
                                    { name: "userPayment"; type: "pubkey" },
                                    { name: "gateway"; type: "pubkey" },
                                    { name: "recipient"; type: "pubkey" },
                                    { name: "policyId"; type: "u32" },
                                    { name: "policyType"; type: { defined: { name: "policyType" } } },
                                    { name: "memo"; type: { array: ["u8", 32] } },
                                ];
                                kind: "struct";
                            };
                        },
                    ],
                    DecodedHelper<
                        [
                            {
                                name: "byteRangeCheck";
                                type: {
                                    fields: [
                                        { name: "offset"; type: "u8" },
                                        { name: "length"; type: "u8" },
                                        { name: "expected"; type: { array: [(...), (...)] } },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                docs: [
                                    "An event that is thrown when a composable policy is executed",
                                ];
                                name: "composableExecuted";
                                type: {
                                    fields: [
                                        { name: "composablePolicy"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "targetProgram"; type: "pubkey" },
                                        { name: "inputAmount"; type: "u64" },
                                        { name: "outputAmount"; type: "u64" },
                                        { name: "gatewayFee"; type: "u64" },
                                        { name: "protocolFee"; type: "u64" },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                name: "composablePolicy";
                                type: {
                                    fields: [
                                        { name: "bump"; type: "u8" },
                                        { name: "userPayment"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "status"; type: { defined: { name: ... } } },
                                        { name: "rentPayer"; type: "pubkey" },
                                        { name: "policyType"; type: { defined: { name: ... } } },
                                        { name: "forwardConfig"; type: { defined: { name: ... } } },
                                    ];
                                    kind: "struct";
                                };
                            },
                            {
                                docs: [
                                    "An event that is thrown when a composable policy is created",
                                ];
                                name: "composablePolicyCreated";
                                type: {
                                    fields: [
                                        { name: "composablePolicy"; type: "pubkey" },
                                        { name: "userPayment"; type: "pubkey" },
                                        { name: "gateway"; type: "pubkey" },
                                        { name: "recipient"; type: "pubkey" },
                                        { name: "policyId"; type: "u32" },
                                        { name: "policyType"; type: { defined: { name: ... } } },
                                        { name: "memo"; type: { array: [(...), (...)] } },
                                    ];
                                    kind: "struct";
                                };
                            },
                        ],
                        DecodedHelper<
                            [
                                {
                                    name: "byteRangeCheck";
                                    type: {
                                        fields: [
                                            { name: "offset"; type: "u8" },
                                            { name: "length"; type: "u8" },
                                            { name: "expected"; type: { array: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    docs: [
                                        "An event that is thrown when a composable policy is executed",
                                    ];
                                    name: "composableExecuted";
                                    type: {
                                        fields: [
                                            { name: "composablePolicy"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "targetProgram"; type: "pubkey" },
                                            { name: "inputAmount"; type: "u64" },
                                            { name: "outputAmount"; type: "u64" },
                                            { name: "gatewayFee"; type: "u64" },
                                            { name: "protocolFee"; type: "u64" },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    name: "composablePolicy";
                                    type: {
                                        fields: [
                                            { name: "bump"; type: "u8" },
                                            { name: "userPayment"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "status"; type: { defined: ... } },
                                            { name: "rentPayer"; type: "pubkey" },
                                            { name: "policyType"; type: { defined: ... } },
                                            { name: "forwardConfig"; type: { defined: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                                {
                                    docs: [
                                        "An event that is thrown when a composable policy is created",
                                    ];
                                    name: "composablePolicyCreated";
                                    type: {
                                        fields: [
                                            { name: "composablePolicy"; type: "pubkey" },
                                            { name: "userPayment"; type: "pubkey" },
                                            { name: "gateway"; type: "pubkey" },
                                            { name: "recipient"; type: "pubkey" },
                                            { name: "policyId"; type: "u32" },
                                            { name: "policyType"; type: { defined: ... } },
                                            { name: "memo"; type: { array: ... } },
                                        ];
                                        kind: "struct";
                                    };
                                },
                            ],
                            EmptyDefined,
                        >,
                    >,
                >,
            >;
            totalInput: BN;
            totalOutput: BN;
            updatedAt: BN;
            userPayment: PublicKey;
        }

      Returns boolean