MCPcopy Create free account
hub / github.com/AztecProtocol/aztec-packages / bufferToU8Array

Function bufferToU8Array

yarn-project/txe/src/util/encoding.ts:89–91  ·  view source on GitHub ↗
(buffer: Buffer)

Source from the content-addressed store, hash-verified

87}
88
89export function bufferToU8Array(buffer: Buffer): ForeignCallArray {
90 return toArray(Array.from(buffer).map(byte => new Fr(byte)));
91}
92
93/**
94 * Converts a ForeignCallArray into a tuple which represents a nr BoundedVec.

Callers 1

Calls 3

toArrayFunction · 0.70
mapMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected