Skip to main content
Module

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

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

Consumes length allocated bytes without writing anything, and returns the skipped subarray. Anything written into the returned array will not affect the buffer, except if it is later reincorporated e.g. via .insertArray(). Rather niche.

Parameters

length: number

Returns

Uint8Array