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

    Interface RefineExternalities

    Host functions external invocations available during refine phase.

    interface RefineExternalities {
        exportSegment(
            segment: Segment,
        ): utils.Result<
            number & WithBytesRepresentation<2> & WithOpaque<"Segment Index [U16]">,
            typeof jam_host_calls.SegmentExportError,
        >;
        historicalLookup(
            serviceId:
                | number & WithBytesRepresentation<4> & WithOpaque<"ServiceId[u32]">
                | null,
            hash: Blake2bHash,
        ): Promise<BytesBlob | null>;
        machineExpunge(
            machineIndex: bigint & WithBytesRepresentation<8> & WithOpaque<
                "MachineId[u64]",
            >,
        ): Promise<
            utils.Result<
                bigint & WithBytesRepresentation<8> & WithOpaque<
                    "ProgramCounter[u64]",
                >,
                typeof jam_host_calls.NoMachineError,
            >,
        >;
        machineInit(
            code: BytesBlob,
            programCounter: bigint & WithBytesRepresentation<8> & WithOpaque<
                "ProgramCounter[u64]",
            >,
        ): Promise<
            utils.Result<
                bigint & WithBytesRepresentation<8> & WithOpaque<"MachineId[u64]">,
                InvalidProgramError,
            >,
        >;
        machineInvoke(
            machineIndex: bigint & WithBytesRepresentation<8> & WithOpaque<
                "MachineId[u64]",
            >,
            gas: bigint & WithBytesRepresentation<8> & WithOpaque<"BigGas[U64]">,
            registers: HostCallRegisters,
        ): Promise<
            utils.Result<MachineResult, typeof jam_host_calls.NoMachineError>,
        >;
        machinePages(
            machineIndex: bigint & WithBytesRepresentation<8> & WithOpaque<
                "MachineId[u64]",
            >,
            pageStart: U64,
            pageCount: U64,
            requestType: MemoryOperation | null,
        ): Promise<utils.Result<typeof utils.OK, PagesError>>;
        machinePeekFrom(
            machineIndex: bigint & WithBytesRepresentation<8> & WithOpaque<
                "MachineId[u64]",
            >,
            destinationStart: U64,
            sourceStart: U64,
            length: U64,
            destination: HostCallMemory,
        ): Promise<utils.Result<typeof utils.OK, PeekPokeError>>;
        machinePokeInto(
            machineIndex: bigint & WithBytesRepresentation<8> & WithOpaque<
                "MachineId[u64]",
            >,
            sourceStart: U64,
            destinationStart: U64,
            length: U64,
            source: HostCallMemory,
        ): Promise<utils.Result<typeof utils.OK, PeekPokeError>>;
        machineVoidPages(
            machineIndex: bigint & WithBytesRepresentation<8> & WithOpaque<
                "MachineId[u64]",
            >,
            pageStart: U64,
            pageCount: U64,
        ): Promise<utils.Result<typeof utils.OK, ZeroVoidError>>;
        machineZeroPages(
            machineIndex: bigint & WithBytesRepresentation<8> & WithOpaque<
                "MachineId[u64]",
            >,
            pageStart: U64,
            pageCount: U64,
        ): Promise<utils.Result<typeof utils.OK, ZeroVoidError>>;
    }
    Index

    Methods