@aztec/foundation
Advanced tools
Comparing version 0.43.0 to 0.44.0
/// <reference types="node" resolution-mode="require"/> | ||
import { type Fr } from '../fields/fields.js'; | ||
import { type FunctionSelector } from './function_selector.js'; | ||
import { type NoteSelector } from './note_selector.js'; | ||
/** | ||
@@ -246,3 +247,3 @@ * A basic value. | ||
*/ | ||
id: Fr; | ||
id: NoteSelector; | ||
/** | ||
@@ -261,6 +262,2 @@ * Type of the note (e.g., 'TransparentNote') | ||
slot: Fr; | ||
/** | ||
* Type being stored at the slot (e.g., 'Map<AztecAddress, PublicMutable<U128>>') | ||
*/ | ||
typ: string; | ||
}; | ||
@@ -267,0 +264,0 @@ /** |
@@ -91,2 +91,2 @@ import { inflate } from 'pako'; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FiaS9hYmkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQXlEL0I7O0dBRUc7QUFDSCxNQUFNLENBQU4sSUFBWSxzQkFHWDtBQUhELFdBQVksc0JBQXNCO0lBQ2hDLDJDQUFpQixDQUFBO0lBQ2pCLDJDQUFpQixDQUFBO0FBQ25CLENBQUMsRUFIVyxzQkFBc0IsS0FBdEIsc0JBQXNCLFFBR2pDO0FBK0VEOztHQUVHO0FBQ0gsTUFBTSxDQUFOLElBQVksWUFJWDtBQUpELFdBQVksWUFBWTtJQUN0QixtQ0FBbUIsQ0FBQTtJQUNuQixpQ0FBaUIsQ0FBQTtJQUNqQiwrQ0FBK0IsQ0FBQTtBQUNqQyxDQUFDLEVBSlcsWUFBWSxLQUFaLFlBQVksUUFJdkI7QUEyTUQ7O0dBRUc7QUFDSCxNQUFNLFVBQVUsbUJBQW1CLENBQ2pDLFFBQTBCLEVBQzFCLHNCQU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SxJQUFJLHlCQUF5QixLQUFLLFNBQVMsRUFBRSxDQUFDO1FBQ25ELE9BQU8scUJBQXFCLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDekMsQ0FBQztTQUFNLENBQUM7UUFDTixJQUFJLENBQUMseUJBQXlCLENBQUMsYUFBYSxFQUFFLENBQUM7WUFDN0MsTUFBTSxJQUFJLEtBQUssQ0FBQyxVQUFVLHlCQUF5QixDQUFDLElBQUksd0JBQXdCLENBQUMsQ0FBQztRQUNwRixDQUFDO1FBQ0QsT0FBTyx5QkFBeUIsQ0FBQztJQUNuQyxDQUFDO0FBQ0gsQ0FBQyJ9 |
export * from './abi.js'; | ||
export * from './buffer.js'; | ||
export * from './decoder.js'; | ||
export * from './encoder.js'; | ||
export * from './event_selector.js'; | ||
export * from './decoder.js'; | ||
export * from './function_selector.js'; | ||
export * from './note_selector.js'; | ||
export * from './utils.js'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './abi.js'; | ||
export * from './buffer.js'; | ||
export * from './decoder.js'; | ||
export * from './encoder.js'; | ||
export * from './event_selector.js'; | ||
export * from './decoder.js'; | ||
export * from './function_selector.js'; | ||
export * from './note_selector.js'; | ||
export * from './utils.js'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYWJpL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsVUFBVSxDQUFDO0FBQ3pCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLFlBQVksQ0FBQyJ9 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYWJpL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsVUFBVSxDQUFDO0FBQ3pCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsWUFBWSxDQUFDIn0= |
@@ -16,7 +16,7 @@ import { createDebugLogger } from '../../log/logger.js'; | ||
if (seed !== undefined) { | ||
this.log.verbose(`Using pseudo-randomness with seed: ${seed}`); | ||
this.log.debug(`Using pseudo-randomness with seed: ${seed}`); | ||
this.counter = seed; | ||
} | ||
else { | ||
this.log.verbose('Using true randomness'); | ||
this.log.debug('Using true randomness'); | ||
} | ||
@@ -56,2 +56,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFuZG9tbmVzc19zaW5nbGV0b24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY3J5cHRvL3JhbmRvbS9yYW5kb21uZXNzX3NpbmdsZXRvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUV4RDs7Ozs7OztHQU9HO0FBQ0gsTUFBTSxPQUFPLG1CQUFtQjtJQUs5QixZQUNtQixJQUFhLEVBQ2IsTUFBTSxpQkFBaUIsQ0FBQyw0QkFBNEIsQ0FBQztRQURyRCxTQUFJLEdBQUosSUFBSSxDQUFTO1FBQ2IsUUFBRyxHQUFILEdBQUcsQ0FBa0Q7UU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xDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxNQUFNLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQztZQUNoQyw4R0FBOEc7WUFDOUcsd0RBQXdEO1lBQ3hELE1BQU0sQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxPQUFPLElBQUksQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsR0FBRyxJQUFJLENBQUM7UUFDL0MsQ0FBQztRQUNELElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUNmLE9BQU8sTUFBTSxDQUFDO0lBQ2hCLENBQUM7Q0FDRiJ9 |
@@ -17,3 +17,3 @@ import cors from '@koa/cors'; | ||
/** List of methods to disallow from calling remotely */ | ||
disallowedMethods = [], log = createDebugLogger('aztec:foundation:json-rpc:server')) { | ||
disallowedMethods = [], log = createDebugLogger('json-rpc:server')) { | ||
this.handler = handler; | ||
@@ -196,3 +196,3 @@ this.stringClassMap = stringClassMap; | ||
*/ | ||
export function createNamespacedJsonRpcServer(servers, log = createDebugLogger('aztec:foundation:json-rpc:multi-server')) { | ||
export function createNamespacedJsonRpcServer(servers, log = createDebugLogger('json-rpc:multi-server')) { | ||
const handler = {}; | ||
@@ -228,2 +228,2 @@ const disallowedMethods = []; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbl9ycGNfc2VydmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2pzb24tcnBjL3NlcnZlci9qc29uX3JwY19zZXJ2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxJQUFJLE1BQU0sV0FBVyxDQUFDO0FBQzdCLE9BQU8sSUFBSSxNQUFNLE1BQU0sQ0FBQztBQUN4QixPQUFPLEdBQUcsTUFBTSxLQUFLLENBQUM7QUFDdEIsT0FBTyx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VBQUU7WUFDakUsY0FBYyxFQUFFLEVBQUUsR0FBRyxHQUFHLENBQUMsY0FBYyxFQUFFLEdBQUcsSUFBSSxDQUFDLGNBQWMsRUFBRTtTQUNsRSxDQUFDO0lBQ0osQ0FBQyxFQUNELEVBQUUsY0FBYyxFQUFFLEVBQUUsRUFBRSxjQUFjLEVBQUUsRUFBRSxFQUFlLENBQ3hELENBQUM7SUFFRixPQUFPLElBQUksYUFBYSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLEVBQUUsU0FBUyxDQUFDLGNBQWMsRUFBRSxTQUFTLENBQUMsY0FBYyxFQUFFLEVBQUUsRUFBRSxHQUFHLENBQUMsQ0FBQztBQUNoSCxDQUFDIn0= |
import debug from 'debug'; | ||
import isNode from 'detect-node'; | ||
import { isatty } from 'tty'; | ||
const LogLevels = ['silent', 'error', 'warn', 'info', 'verbose', 'debug']; | ||
@@ -8,2 +6,4 @@ const DefaultLogLevel = process.env.NODE_ENV === 'test' ? 'silent' : 'info'; | ||
const currentLevel = LogLevels.includes(envLogLevel) ? envLogLevel : DefaultLogLevel; | ||
const namespaces = process.env.DEBUG ?? 'aztec:*'; | ||
debug.enable(namespaces); | ||
/** | ||
@@ -18,5 +18,2 @@ * Creates a new DebugLogger for the current module, defaulting to the LOG_LEVEL env var. | ||
const debugLogger = debug(name); | ||
if (currentLevel === 'debug') { | ||
debugLogger.enabled = true; | ||
} | ||
const logger = { | ||
@@ -51,37 +48,7 @@ silent: () => { }, | ||
msg = data ? `${msg} ${fmtLogData(data)}` : msg; | ||
if (debug.enabled) { | ||
if (level !== 'debug') { | ||
msg = `${level.toUpperCase()} ${msg}`; | ||
} | ||
debug(msg); | ||
if (debug.enabled && LogLevels.indexOf(level) <= LogLevels.indexOf(currentLevel)) { | ||
debug('[%s] %s', level.toUpperCase(), msg); | ||
} | ||
else if (LogLevels.indexOf(level) <= LogLevels.indexOf(currentLevel)) { | ||
printLog(`${getPrefix(debug, level)} ${msg}`); | ||
} | ||
} | ||
/** | ||
* Returns a log prefix that emulates that of npm debug. Uses colors if in node and in a tty. | ||
* @param debugLogger - Instance of npm debug logger. | ||
* @param level - Intended log level (printed out if strictly above current log level). | ||
* @returns Log prefix. | ||
*/ | ||
function getPrefix(debugLogger, level) { | ||
const levelLabel = currentLevel !== level ? ` ${level.toUpperCase()}` : ''; | ||
const prefix = `${debugLogger.namespace.replace(/^aztec:/, '')}${levelLabel}`; | ||
if ((!isNode || !isatty(process.stderr.fd)) && !process.env.DEBUG_COLORS) { | ||
return prefix; | ||
} | ||
const colorIndex = debug.selectColor(debugLogger.namespace); | ||
const colorCode = '\u001B[3' + (colorIndex < 8 ? colorIndex : '8;5;' + colorIndex); | ||
return ` ${colorCode};1m${prefix}\u001B[0m`; | ||
} | ||
/** | ||
* Outputs to console error. | ||
* @param msg - What to log. | ||
*/ | ||
function printLog(msg) { | ||
// eslint-disable-next-line no-console | ||
isNode ? process.stderr.write(msg + '\n') : console.error(msg); | ||
} | ||
/** | ||
* Concatenates a log message and an exception. | ||
@@ -105,2 +72,2 @@ * @param msg - Log message | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2xvZy9sb2dnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFDO0FBQzFCLE9BQU8sTUFBTSxNQUFNLGFBQWEsQ0FBQztBQUNqQyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBSTdCLE1BQU0sU0FBUyxHQUFHLENBQUMsUUFBUSxFQUFFLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLFNBQVMsRUFBRSxPQUFPLENBQVUsQ0FBQztBQUNuRixNQUFNLGVBQWUsR0FBRyxPQUFP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ztBQUNILENBQUM7QUFFRDs7Ozs7R0FLRztBQUNILFNBQVMsTUFBTSxDQUFDLEdBQVcsRUFBRSxHQUFxQjtJQUNoRCxNQUFNLE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBRSxHQUFhLENBQUMsSUFBSSxFQUFHLEdBQWEsQ0FBQyxPQUFPLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBQy9GLE9BQU8sR0FBRyxDQUFDLENBQUMsQ0FBQyxHQUFHLEdBQUcsS0FBSyxNQUFNLElBQUksR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQztBQUNoRCxDQUFDO0FBRUQ7OztHQUdHO0FBQ0gsU0FBUyxVQUFVLENBQUMsSUFBYztJQUNoQyxPQUFPLE1BQU0sQ0FBQyxPQUFPLENBQUMsSUFBSSxJQUFJLEVBQUUsQ0FBQztTQUM5QixHQUFHLENBQUMsQ0FBQyxDQUFDLEdBQUcsRUFBRSxLQUFLLENBQUMsRUFBRSxFQUFFLENBQUMsR0FBRyxHQUFHLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxJQUFJLFVBQVUsSUFBSSxLQUFLLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxRQUFRLEVBQUUsQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7U0FDOUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ2YsQ0FBQyJ9 |
@@ -21,2 +21,3 @@ /// <reference types="node" resolution-mode="require"/> | ||
export declare class BufferReader { | ||
#private; | ||
private buffer; | ||
@@ -23,0 +24,0 @@ private index; |
@@ -0,1 +1,3 @@ | ||
var _BufferReader_instances, _BufferReader_rangeCheck; | ||
import { __classPrivateFieldGet } from "tslib"; | ||
/** | ||
@@ -20,2 +22,3 @@ * The BufferReader class provides a utility for reading various data types from a buffer. | ||
constructor(buffer, offset = 0) { | ||
_BufferReader_instances.add(this); | ||
this.buffer = buffer; | ||
@@ -52,2 +55,3 @@ this.index = offset; | ||
readNumber() { | ||
__classPrivateFieldGet(this, _BufferReader_instances, "m", _BufferReader_rangeCheck).call(this, 4); | ||
this.index += 4; | ||
@@ -72,2 +76,3 @@ return this.buffer.readUint32BE(this.index - 4); | ||
readUInt16() { | ||
__classPrivateFieldGet(this, _BufferReader_instances, "m", _BufferReader_rangeCheck).call(this, 2); | ||
this.index += 2; | ||
@@ -83,2 +88,3 @@ return this.buffer.readUInt16BE(this.index - 2); | ||
readUInt8() { | ||
__classPrivateFieldGet(this, _BufferReader_instances, "m", _BufferReader_rangeCheck).call(this, 1); | ||
this.index += 1; | ||
@@ -95,2 +101,3 @@ return this.buffer.readUInt8(this.index - 1); | ||
readBoolean() { | ||
__classPrivateFieldGet(this, _BufferReader_instances, "m", _BufferReader_rangeCheck).call(this, 1); | ||
this.index += 1; | ||
@@ -108,2 +115,3 @@ return Boolean(this.buffer.at(this.index - 1)); | ||
readBytes(n) { | ||
__classPrivateFieldGet(this, _BufferReader_instances, "m", _BufferReader_rangeCheck).call(this, n); | ||
this.index += n; | ||
@@ -188,2 +196,3 @@ return Buffer.from(this.buffer.subarray(this.index - n, this.index)); | ||
const end = size >= 0 ? this.index + size : this.buffer.length; | ||
__classPrivateFieldGet(this, _BufferReader_instances, "m", _BufferReader_rangeCheck).call(this, end - this.index); | ||
while (this.index < end) { | ||
@@ -217,2 +226,3 @@ const item = this.readBuffer(); | ||
peekBytes(n) { | ||
__classPrivateFieldGet(this, _BufferReader_instances, "m", _BufferReader_rangeCheck).call(this, n || 0); | ||
return this.buffer.subarray(this.index, n ? this.index + n : undefined); | ||
@@ -240,2 +250,3 @@ } | ||
const size = this.readNumber(); | ||
__classPrivateFieldGet(this, _BufferReader_instances, "m", _BufferReader_rangeCheck).call(this, size); | ||
return this.readBytes(size); | ||
@@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BUyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzlCLENBQUM7SUFFRDs7Ozs7Ozs7T0FRRztJQUNJLE9BQU8sQ0FBSSxZQUtqQjtRQUNDLE1BQU0sVUFBVSxHQUFHLElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQztRQUNyQyxNQUFNLEdBQUcsR0FBeUIsRUFBRSxDQUFDO1FBQ3JDLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxVQUFVLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQztZQUNwQyxNQUFNLEdBQUcsR0FBRyxJQUFJLENBQUMsVUFBVSxFQUFFLENBQUM7WUFDOUIsTUFBTSxLQUFLLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBSSxZQUFZLENBQUMsQ0FBQztZQUMvQyxHQUFHLENBQUMsR0FBRyxDQUFDLEdBQUcsS0FBSyxDQUFDO1FBQ25CLENBQUM7UUFDRCxPQUFPLEdBQUcsQ0FBQztJQUNiLENBQUM7SUFFRDs7O09BR0c7SUFDSSxTQUFTO1FBQ2QsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQztJQUM1QixDQUFDO0NBQ0YifQ== | ||
_BufferReader_instances = new WeakSet(), _BufferReader_rangeCheck = function _BufferReader_rangeCheck(numBytes) { | ||
if (this.index + numBytes > this.buffer.length) { | ||
throw new Error(`Attempted to read beyond buffer length. Start index: ${this.index}, Num bytes to read: ${numBytes}, Buffer length: ${this.buffer.length}`); | ||
} | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVmZmVyX3JlYWRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZXJpYWxpemUvYnVmZmVyX3JlYWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBOzs7Ozs7Ozs7Ozs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JQUFJLENBQUMsS0FBSyxHQUFHLFFBQVEsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sRUFBRSxDQUFDO1FBQy9DLE1BQU0sSUFBSSxLQUFLLENBQ2Isd0RBQXdELElBQUksQ0FBQyxLQUFLLHdCQUF3QixRQUFRLG9CQUFvQixJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sRUFBRSxDQUMzSSxDQUFDO0lBQ0osQ0FBQztBQUNILENBQUMifQ== |
{ | ||
"name": "@aztec/foundation", | ||
"version": "0.43.0", | ||
"version": "0.44.0", | ||
"packageManager": "yarn@3.4.1", | ||
@@ -62,3 +62,11 @@ "type": "module", | ||
"^.+\\.tsx?$": [ | ||
"@swc/jest" | ||
"@swc/jest", | ||
{ | ||
"jsc": { | ||
"parser": { | ||
"syntax": "typescript", | ||
"decorators": true | ||
} | ||
} | ||
} | ||
] | ||
@@ -84,3 +92,3 @@ }, | ||
"dependencies": { | ||
"@aztec/bb.js": "0.43.0", | ||
"@aztec/bb.js": "0.44.0", | ||
"@koa/cors": "^5.0.0", | ||
@@ -87,0 +95,0 @@ "@noble/curves": "^1.2.0", |
@@ -5,2 +5,3 @@ import { inflate } from 'pako'; | ||
import { type FunctionSelector } from './function_selector.js'; | ||
import { type NoteSelector } from './note_selector.js'; | ||
@@ -279,3 +280,3 @@ /** | ||
*/ | ||
id: Fr; | ||
id: NoteSelector; | ||
/** | ||
@@ -295,6 +296,2 @@ * Type of the note (e.g., 'TransparentNote') | ||
slot: Fr; | ||
/** | ||
* Type being stored at the slot (e.g., 'Map<AztecAddress, PublicMutable<U128>>') | ||
*/ | ||
typ: string; | ||
}; | ||
@@ -301,0 +298,0 @@ |
export * from './abi.js'; | ||
export * from './buffer.js'; | ||
export * from './decoder.js'; | ||
export * from './encoder.js'; | ||
export * from './event_selector.js'; | ||
export * from './decoder.js'; | ||
export * from './function_selector.js'; | ||
export * from './note_selector.js'; | ||
export * from './utils.js'; |
@@ -21,6 +21,6 @@ import { createDebugLogger } from '../../log/logger.js'; | ||
if (seed !== undefined) { | ||
this.log.verbose(`Using pseudo-randomness with seed: ${seed}`); | ||
this.log.debug(`Using pseudo-randomness with seed: ${seed}`); | ||
this.counter = seed; | ||
} else { | ||
this.log.verbose('Using true randomness'); | ||
this.log.debug('Using true randomness'); | ||
} | ||
@@ -27,0 +27,0 @@ } |
@@ -28,3 +28,3 @@ import cors from '@koa/cors'; | ||
public readonly disallowedMethods: string[] = [], | ||
private log = createDebugLogger('aztec:foundation:json-rpc:server'), | ||
private log = createDebugLogger('json-rpc:server'), | ||
) { | ||
@@ -230,3 +230,3 @@ this.proxy = new JsonProxy(handler, stringClassMap, objectClassMap); | ||
servers: ServerList, | ||
log = createDebugLogger('aztec:foundation:json-rpc:multi-server'), | ||
log = createDebugLogger('json-rpc:multi-server'), | ||
): JsonRpcServer { | ||
@@ -233,0 +233,0 @@ const handler = {} as any; |
import debug from 'debug'; | ||
import isNode from 'detect-node'; | ||
import { isatty } from 'tty'; | ||
@@ -18,2 +16,5 @@ import { type LogData, type LogFn } from './log_fn.js'; | ||
const namespaces = process.env.DEBUG ?? 'aztec:*'; | ||
debug.enable(namespaces); | ||
/** Log function that accepts an exception object */ | ||
@@ -42,5 +43,2 @@ type ErrorLogFn = (msg: string, err?: Error | unknown, data?: LogData) => void; | ||
const debugLogger = debug(name); | ||
if (currentLevel === 'debug') { | ||
debugLogger.enabled = true; | ||
} | ||
@@ -83,9 +81,4 @@ const logger = { | ||
msg = data ? `${msg} ${fmtLogData(data)}` : msg; | ||
if (debug.enabled) { | ||
if (level !== 'debug') { | ||
msg = `${level.toUpperCase()} ${msg}`; | ||
} | ||
debug(msg); | ||
} else if (LogLevels.indexOf(level) <= LogLevels.indexOf(currentLevel)) { | ||
printLog(`${getPrefix(debug, level)} ${msg}`); | ||
if (debug.enabled && LogLevels.indexOf(level) <= LogLevels.indexOf(currentLevel)) { | ||
debug('[%s] %s', level.toUpperCase(), msg); | ||
} | ||
@@ -95,28 +88,2 @@ } | ||
/** | ||
* Returns a log prefix that emulates that of npm debug. Uses colors if in node and in a tty. | ||
* @param debugLogger - Instance of npm debug logger. | ||
* @param level - Intended log level (printed out if strictly above current log level). | ||
* @returns Log prefix. | ||
*/ | ||
function getPrefix(debugLogger: debug.Debugger, level: LogLevel) { | ||
const levelLabel = currentLevel !== level ? ` ${level.toUpperCase()}` : ''; | ||
const prefix = `${debugLogger.namespace.replace(/^aztec:/, '')}${levelLabel}`; | ||
if ((!isNode || !isatty(process.stderr.fd)) && !process.env.DEBUG_COLORS) { | ||
return prefix; | ||
} | ||
const colorIndex = debug.selectColor(debugLogger.namespace) as number; | ||
const colorCode = '\u001B[3' + (colorIndex < 8 ? colorIndex : '8;5;' + colorIndex); | ||
return ` ${colorCode};1m${prefix}\u001B[0m`; | ||
} | ||
/** | ||
* Outputs to console error. | ||
* @param msg - What to log. | ||
*/ | ||
function printLog(msg: string) { | ||
// eslint-disable-next-line no-console | ||
isNode ? process.stderr.write(msg + '\n') : console.error(msg); | ||
} | ||
/** | ||
* Concatenates a log message and an exception. | ||
@@ -123,0 +90,0 @@ * @param msg - Log message |
@@ -58,2 +58,3 @@ import { type Tuple } from './types.js'; | ||
public readNumber(): number { | ||
this.#rangeCheck(4); | ||
this.index += 4; | ||
@@ -80,2 +81,3 @@ return this.buffer.readUint32BE(this.index - 4); | ||
public readUInt16(): number { | ||
this.#rangeCheck(2); | ||
this.index += 2; | ||
@@ -92,2 +94,3 @@ return this.buffer.readUInt16BE(this.index - 2); | ||
public readUInt8(): number { | ||
this.#rangeCheck(1); | ||
this.index += 1; | ||
@@ -105,2 +108,3 @@ return this.buffer.readUInt8(this.index - 1); | ||
public readBoolean(): boolean { | ||
this.#rangeCheck(1); | ||
this.index += 1; | ||
@@ -119,2 +123,3 @@ return Boolean(this.buffer.at(this.index - 1)); | ||
public readBytes(n: number): Buffer { | ||
this.#rangeCheck(n); | ||
this.index += n; | ||
@@ -223,2 +228,3 @@ return Buffer.from(this.buffer.subarray(this.index - n, this.index)); | ||
const end = size >= 0 ? this.index + size : this.buffer.length; | ||
this.#rangeCheck(end - this.index); | ||
while (this.index < end) { | ||
@@ -261,2 +267,3 @@ const item = this.readBuffer(); | ||
public peekBytes(n?: number): Buffer { | ||
this.#rangeCheck(n || 0); | ||
return this.buffer.subarray(this.index, n ? this.index + n : undefined); | ||
@@ -286,2 +293,3 @@ } | ||
const size = this.readNumber(); | ||
this.#rangeCheck(size); | ||
return this.readBytes(size); | ||
@@ -322,2 +330,10 @@ } | ||
} | ||
#rangeCheck(numBytes: number) { | ||
if (this.index + numBytes > this.buffer.length) { | ||
throw new Error( | ||
`Attempted to read beyond buffer length. Start index: ${this.index}, Num bytes to read: ${numBytes}, Buffer length: ${this.buffer.length}`, | ||
); | ||
} | ||
} | ||
} | ||
@@ -324,0 +340,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1162014
546
21201
+ Added@aztec/bb.js@0.44.0(transitive)
- Removed@aztec/bb.js@0.43.0(transitive)
Updated@aztec/bb.js@0.44.0