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

    Interface RefineExternalities

    Host functions external invocations available during refine phase.

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

    Methods