close_bridge: TxDescriptor<
    {
        bridge_destination_universal_location: Enum<
            {
                V3: XcmV3Junctions;
                V4: XcmV3Junctions;
                V5: Enum<
                    {
                        Here: undefined;
                        X1: Enum<
                            {
                                AccountId32: { id: FixedSizeBinary<32>; network?: ... };
                                AccountIndex64: { index: bigint; network?: ... };
                                AccountKey20: { key: FixedSizeBinary<20>; network?: ... };
                                GeneralIndex: bigint;
                                GeneralKey: { data: FixedSizeBinary<32>; length: number };
                                GlobalConsensus: Enum<
                                    {
                                        BitcoinCash: undefined;
                                        BitcoinCore: undefined;
                                        ByFork: { block_hash: ...; block_number: ... };
                                        ByGenesis: FixedSizeBinary<(...)>;
                                        Ethereum: { chain_id: ... };
                                        Kusama: undefined;
                                        Polkadot: undefined;
                                        PolkadotBulletin: undefined;
                                    },
                                >;
                                OnlyChild: undefined;
                                PalletInstance: number;
                                Parachain: number;
                                Plurality: { id: XcmV3JunctionBodyId; part: XcmV2JunctionBodyPart };
                            },
                        >;
                        X2: FixedSizeArray<
                            2,
                            Enum<
                                {
                                    AccountId32: {
                                        id: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    AccountIndex64: { index: bigint; network?: (...)
                                    | (...) };
                                    AccountKey20: {
                                        key: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    GeneralIndex: bigint;
                                    GeneralKey: { data: FixedSizeBinary<(...)>; length: number };
                                    GlobalConsensus: Enum<
                                        {
                                            BitcoinCash: ...;
                                            BitcoinCore: ...;
                                            ByFork: ...;
                                            ByGenesis: ...;
                                            Ethereum: ...;
                                            Kusama: ...;
                                            Polkadot: ...;
                                            PolkadotBulletin: ...;
                                        },
                                    >;
                                    OnlyChild: undefined;
                                    PalletInstance: number;
                                    Parachain: number;
                                    Plurality: { id: XcmV3JunctionBodyId; part: XcmV2JunctionBodyPart };
                                },
                            >,
                        >;
                        X3: FixedSizeArray<
                            3,
                            Enum<
                                {
                                    AccountId32: {
                                        id: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    AccountIndex64: { index: bigint; network?: (...)
                                    | (...) };
                                    AccountKey20: {
                                        key: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    GeneralIndex: bigint;
                                    GeneralKey: { data: FixedSizeBinary<(...)>; length: number };
                                    GlobalConsensus: Enum<
                                        {
                                            BitcoinCash: ...;
                                            BitcoinCore: ...;
                                            ByFork: ...;
                                            ByGenesis: ...;
                                            Ethereum: ...;
                                            Kusama: ...;
                                            Polkadot: ...;
                                            PolkadotBulletin: ...;
                                        },
                                    >;
                                    OnlyChild: undefined;
                                    PalletInstance: number;
                                    Parachain: number;
                                    Plurality: { id: XcmV3JunctionBodyId; part: XcmV2JunctionBodyPart };
                                },
                            >,
                        >;
                        X4: FixedSizeArray<
                            4,
                            Enum<
                                {
                                    AccountId32: {
                                        id: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    AccountIndex64: { index: bigint; network?: (...)
                                    | (...) };
                                    AccountKey20: {
                                        key: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    GeneralIndex: bigint;
                                    GeneralKey: { data: FixedSizeBinary<(...)>; length: number };
                                    GlobalConsensus: Enum<
                                        {
                                            BitcoinCash: ...;
                                            BitcoinCore: ...;
                                            ByFork: ...;
                                            ByGenesis: ...;
                                            Ethereum: ...;
                                            Kusama: ...;
                                            Polkadot: ...;
                                            PolkadotBulletin: ...;
                                        },
                                    >;
                                    OnlyChild: undefined;
                                    PalletInstance: number;
                                    Parachain: number;
                                    Plurality: { id: XcmV3JunctionBodyId; part: XcmV2JunctionBodyPart };
                                },
                            >,
                        >;
                        X5: FixedSizeArray<
                            5,
                            Enum<
                                {
                                    AccountId32: {
                                        id: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    AccountIndex64: { index: bigint; network?: (...)
                                    | (...) };
                                    AccountKey20: {
                                        key: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    GeneralIndex: bigint;
                                    GeneralKey: { data: FixedSizeBinary<(...)>; length: number };
                                    GlobalConsensus: Enum<
                                        {
                                            BitcoinCash: ...;
                                            BitcoinCore: ...;
                                            ByFork: ...;
                                            ByGenesis: ...;
                                            Ethereum: ...;
                                            Kusama: ...;
                                            Polkadot: ...;
                                            PolkadotBulletin: ...;
                                        },
                                    >;
                                    OnlyChild: undefined;
                                    PalletInstance: number;
                                    Parachain: number;
                                    Plurality: { id: XcmV3JunctionBodyId; part: XcmV2JunctionBodyPart };
                                },
                            >,
                        >;
                        X6: FixedSizeArray<
                            6,
                            Enum<
                                {
                                    AccountId32: {
                                        id: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    AccountIndex64: { index: bigint; network?: (...)
                                    | (...) };
                                    AccountKey20: {
                                        key: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    GeneralIndex: bigint;
                                    GeneralKey: { data: FixedSizeBinary<(...)>; length: number };
                                    GlobalConsensus: Enum<
                                        {
                                            BitcoinCash: ...;
                                            BitcoinCore: ...;
                                            ByFork: ...;
                                            ByGenesis: ...;
                                            Ethereum: ...;
                                            Kusama: ...;
                                            Polkadot: ...;
                                            PolkadotBulletin: ...;
                                        },
                                    >;
                                    OnlyChild: undefined;
                                    PalletInstance: number;
                                    Parachain: number;
                                    Plurality: { id: XcmV3JunctionBodyId; part: XcmV2JunctionBodyPart };
                                },
                            >,
                        >;
                        X7: FixedSizeArray<
                            7,
                            Enum<
                                {
                                    AccountId32: {
                                        id: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    AccountIndex64: { index: bigint; network?: (...)
                                    | (...) };
                                    AccountKey20: {
                                        key: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    GeneralIndex: bigint;
                                    GeneralKey: { data: FixedSizeBinary<(...)>; length: number };
                                    GlobalConsensus: Enum<
                                        {
                                            BitcoinCash: ...;
                                            BitcoinCore: ...;
                                            ByFork: ...;
                                            ByGenesis: ...;
                                            Ethereum: ...;
                                            Kusama: ...;
                                            Polkadot: ...;
                                            PolkadotBulletin: ...;
                                        },
                                    >;
                                    OnlyChild: undefined;
                                    PalletInstance: number;
                                    Parachain: number;
                                    Plurality: { id: XcmV3JunctionBodyId; part: XcmV2JunctionBodyPart };
                                },
                            >,
                        >;
                        X8: FixedSizeArray<
                            8,
                            Enum<
                                {
                                    AccountId32: {
                                        id: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    AccountIndex64: { index: bigint; network?: (...)
                                    | (...) };
                                    AccountKey20: {
                                        key: FixedSizeBinary<(...)>;
                                        network?: (...) | (...);
                                    };
                                    GeneralIndex: bigint;
                                    GeneralKey: { data: FixedSizeBinary<(...)>; length: number };
                                    GlobalConsensus: Enum<
                                        {
                                            BitcoinCash: ...;
                                            BitcoinCore: ...;
                                            ByFork: ...;
                                            ByGenesis: ...;
                                            Ethereum: ...;
                                            Kusama: ...;
                                            Polkadot: ...;
                                            PolkadotBulletin: ...;
                                        },
                                    >;
                                    OnlyChild: undefined;
                                    PalletInstance: number;
                                    Parachain: number;
                                    Plurality: { id: XcmV3JunctionBodyId; part: XcmV2JunctionBodyPart };
                                },
                            >,
                        >;
                    },
                >;
            },
        >;
        may_prune_messages: bigint;
    },
>

Try to close the bridge.

Can only be called by the "owner" of this side of the bridge, meaning that the inbound XCM channel with the local origin chain is working.

Closed bridge is a bridge without any traces in the runtime storage. So this method first tries to prune all queued messages at the outbound lane. When there are no outbound messages left, outbound and inbound lanes are purged. After that, funds are returned back to the owner of this side of the bridge.

The number of messages that we may prune in a single call is limited by the may_prune_messages argument. If there are more messages in the queue, the method prunes exactly may_prune_messages and exits early. The caller may call it again until outbound queue is depleted and get his funds back.

The states after this call: everything is either Closed, or purged from the runtime storage.