Skip to main content
Module

x/capi/mod.ts>$.EncodeBuffer#createCursor

[WIP] A framework for crafting interactions with Substrate chains
Latest
method $.EncodeBuffer.prototype.createCursor
Re-export
import { $ } from "https://deno.land/x/capi@v0.1.1-beta.1/mod.ts";
const { EncodeBuffer } = $;

Creates a sub-buffer that can be written into later to insert data into the middle of the array. .close() must be called after the cursor is done being written into. The cursor should not be used after .close() is called. If the cursor will be written into asynchronously, the buffer must be held open with .waitFor().

Parameters

length: number

Returns

EncodeBuffer & { close(): void; }