Typeberry by Fluffy Labs - v0.5.0
    Preparing search index...

    Interface PartialState

    U: state components mutated by the accumulation.

    • d: service accounts state
    • i: upcoming validator keys
    • q: queue of work reports
    • x: priviliges state

    https://graypaper.fluffylabs.dev/#/579bd12/163602163602

    interface PartialState {
        checkpoint(): void;
        checkPreimageStatus(
            hash: Blake2bHash & WithOpaque<"PreimageHash">,
            length: U64,
        ): PreimageStatus | null;
        eject(
            from:
                | number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">
                | null,
            previousCode: Blake2bHash & WithOpaque<"PreimageHash">,
        ): utils.Result<typeof utils.OK, EjectError>;
        forgetPreimage(
            hash: Blake2bHash & WithOpaque<"PreimageHash">,
            length: U64,
        ): utils.Result<typeof utils.OK, ForgetPreimageError>;
        newService(
            codeHash: OpaqueHash & WithOpaque<"CodeHash">,
            codeLength: U64,
            gas: bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">,
            allowance: bigint & WithBytesRepresentation<8> & WithOpaque<
                "ServiceGas[u64]",
            >,
            gratisStorage: U64,
            wantedServiceId: U64,
        ): utils.Result<
            number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">,
            NewServiceError,
        >;
        providePreimage(
            service:
                | number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">
                | null,
            preimage: BytesBlob,
        ): utils.Result<typeof utils.OK, ProvidePreimageError>;
        requestPreimage(
            hash: Blake2bHash & WithOpaque<"PreimageHash">,
            length: U64,
        ): utils.Result<typeof utils.OK, RequestPreimageError>;
        transfer(
            destination:
                | number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">
                | null,
            amount: U64,
            gas: bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">,
            memo: Bytes<128>,
        ): utils.Result<typeof utils.OK, TransferError>;
        updateAuthorizationQueue(
            coreIndex: number & WithBytesRepresentation<2> & WithOpaque<
                "CoreIndex[u16]",
            >,
            authQueue: AuthorizationQueue,
            assigner:
                | number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">
                | null,
        ): utils.Result<typeof utils.OK, UpdatePrivilegesError>;
        updatePrivilegedServices(
            m:
                | number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">
                | null,
            a: PerCore<
                number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">,
            >,
            v:
                | number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">
                | null,
            r:
                | number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">
                | null,
            z: Map<
                number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">,
                bigint & WithBytesRepresentation<8> & WithOpaque<"ServiceGas[u64]">,
            >,
        ): utils.Result<typeof utils.OK, UpdatePrivilegesError>;
        updateValidatorsData(
            validatorsData: PerValidator<ValidatorData>,
        ): utils.Result<typeof utils.OK, typeof jam_host_calls.UnprivilegedError>;
        upgradeService(
            codeHash: OpaqueHash & WithOpaque<"CodeHash">,
            gas: U64,
            allowance: U64,
        ): void;
        yield(hash: OpaqueHash): void;
    }

    Implemented by

    Index

    Methods