import { decodeAccountData } from '../codecs/account-data.js';
import { decodeMapU32VecH256 } from '../codecs/shared.js';
export function decodeCrossCollateralStateAccount(raw) {
    const wrapped = decodeAccountData(raw, decodeCrossCollateralStateInner);
    return wrapped.data;
}
function decodeCrossCollateralStateInner(cursor) {
    const bump = cursor.readU8();
    const dispatchAuthorityBump = cursor.readU8();
    const localDomain = cursor.readU32LE();
    const enrolledRouters = decodeMapU32VecH256(cursor);
    return { bump, dispatchAuthorityBump, localDomain, enrolledRouters };
}
//# sourceMappingURL=cross-collateral-token.js.map