**Motivations:** - Complete documentation for dashboard, domains, ports and environment configuration - Add new services (ClamAV API, Watermark API) to the infrastructure - Enhance dashboard with new pages and improved functionality - Improve deployment scripts and service configurations **Root causes:** - Missing comprehensive documentation for infrastructure setup - Need for antivirus scanning service integration - Need for watermark service integration - Dashboard required additional pages and features **Correctifs:** - Added comprehensive documentation in docs/ (DASHBOARD.md, DOMAINS_AND_PORTS.md, ENVIRONMENT.md) - Updated systemd service files with proper environment variables - Enhanced nginx proxy configuration script - Updated maintenance documentation **Evolutions:** - Added new ClamAV API service (api-clamav) for file scanning - Added new Watermark API service (api-filigrane) for document watermarking - Enhanced signet-dashboard with new learn.html page - Improved dashboard UI with better styles and navigation - Enhanced app.js with new functionality and better error handling - Updated API documentation page with complete endpoint descriptions - Added deployment scripts for watermark and nginx configuration - Updated hash and UTXO lists with latest data - Enhanced server.js with new routes and improved Bitcoin RPC integration **Pages affectées:** - docs/DASHBOARD.md: New comprehensive dashboard documentation - docs/DOMAINS_AND_PORTS.md: New infrastructure domains and ports documentation - docs/ENVIRONMENT.md: New environment variables documentation - docs/MAINTENANCE.md: Updated maintenance procedures - docs/README.md: Updated main documentation - signet-dashboard/public/app.js: Enhanced with new features - signet-dashboard/public/styles.css: Improved styling - signet-dashboard/public/index.html: Enhanced main page - signet-dashboard/public/learn.html: New educational page - signet-dashboard/public/api-docs.html: Enhanced API documentation - signet-dashboard/public/hash-list.html: Updated hash list page - signet-dashboard/public/utxo-list.html: Updated UTXO list page - signet-dashboard/public/join-signet.html: Updated join signet page - signet-dashboard/src/server.js: Enhanced server with new routes - signet-dashboard/start.sh: Updated startup script - signet-dashboard/signet-dashboard.service: Updated systemd service - api-anchorage/anchorage-api.service: Updated systemd service - api-faucet/faucet-api.service: Updated systemd service - configure-nginx-proxy.sh: Enhanced nginx configuration script - add-watermark-certificate.sh: New watermark certificate script - deploy-watermark-nginx.sh: New deployment script - api-clamav/: New ClamAV API service - api-filigrane/: New Watermark API service - hash_list.txt, utxo_list.txt: Updated with latest data - anchor_count.txt: Updated anchor count
187 lines
8.5 KiB
TypeScript
187 lines
8.5 KiB
TypeScript
declare module "safe-buffer" {
|
|
export class Buffer {
|
|
length: number
|
|
write(string: string, offset?: number, length?: number, encoding?: string): number;
|
|
toString(encoding?: string, start?: number, end?: number): string;
|
|
toJSON(): { type: 'Buffer', data: any[] };
|
|
equals(otherBuffer: Buffer): boolean;
|
|
compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
slice(start?: number, end?: number): Buffer;
|
|
writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
readUInt8(offset: number, noAssert?: boolean): number;
|
|
readUInt16LE(offset: number, noAssert?: boolean): number;
|
|
readUInt16BE(offset: number, noAssert?: boolean): number;
|
|
readUInt32LE(offset: number, noAssert?: boolean): number;
|
|
readUInt32BE(offset: number, noAssert?: boolean): number;
|
|
readInt8(offset: number, noAssert?: boolean): number;
|
|
readInt16LE(offset: number, noAssert?: boolean): number;
|
|
readInt16BE(offset: number, noAssert?: boolean): number;
|
|
readInt32LE(offset: number, noAssert?: boolean): number;
|
|
readInt32BE(offset: number, noAssert?: boolean): number;
|
|
readFloatLE(offset: number, noAssert?: boolean): number;
|
|
readFloatBE(offset: number, noAssert?: boolean): number;
|
|
readDoubleLE(offset: number, noAssert?: boolean): number;
|
|
readDoubleBE(offset: number, noAssert?: boolean): number;
|
|
swap16(): Buffer;
|
|
swap32(): Buffer;
|
|
swap64(): Buffer;
|
|
writeUInt8(value: number, offset: number, noAssert?: boolean): number;
|
|
writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeInt8(value: number, offset: number, noAssert?: boolean): number;
|
|
writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
|
|
writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
|
|
fill(value: any, offset?: number, end?: number): this;
|
|
indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
|
|
lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
|
|
includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
|
|
|
|
/**
|
|
* Allocates a new buffer containing the given {str}.
|
|
*
|
|
* @param str String to store in buffer.
|
|
* @param encoding encoding to use, optional. Default is 'utf8'
|
|
*/
|
|
constructor (str: string, encoding?: string);
|
|
/**
|
|
* Allocates a new buffer of {size} octets.
|
|
*
|
|
* @param size count of octets to allocate.
|
|
*/
|
|
constructor (size: number);
|
|
/**
|
|
* Allocates a new buffer containing the given {array} of octets.
|
|
*
|
|
* @param array The octets to store.
|
|
*/
|
|
constructor (array: Uint8Array);
|
|
/**
|
|
* Produces a Buffer backed by the same allocated memory as
|
|
* the given {ArrayBuffer}.
|
|
*
|
|
*
|
|
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
*/
|
|
constructor (arrayBuffer: ArrayBuffer);
|
|
/**
|
|
* Allocates a new buffer containing the given {array} of octets.
|
|
*
|
|
* @param array The octets to store.
|
|
*/
|
|
constructor (array: any[]);
|
|
/**
|
|
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
*
|
|
* @param buffer The buffer to copy.
|
|
*/
|
|
constructor (buffer: Buffer);
|
|
prototype: Buffer;
|
|
/**
|
|
* Allocates a new Buffer using an {array} of octets.
|
|
*
|
|
* @param array
|
|
*/
|
|
static from(array: any[]): Buffer;
|
|
/**
|
|
* When passed a reference to the .buffer property of a TypedArray instance,
|
|
* the newly created Buffer will share the same allocated memory as the TypedArray.
|
|
* The optional {byteOffset} and {length} arguments specify a memory range
|
|
* within the {arrayBuffer} that will be shared by the Buffer.
|
|
*
|
|
* @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
|
|
* @param byteOffset
|
|
* @param length
|
|
*/
|
|
static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
|
|
/**
|
|
* Copies the passed {buffer} data onto a new Buffer instance.
|
|
*
|
|
* @param buffer
|
|
*/
|
|
static from(buffer: Buffer): Buffer;
|
|
/**
|
|
* Creates a new Buffer containing the given JavaScript string {str}.
|
|
* If provided, the {encoding} parameter identifies the character encoding.
|
|
* If not provided, {encoding} defaults to 'utf8'.
|
|
*
|
|
* @param str
|
|
*/
|
|
static from(str: string, encoding?: string): Buffer;
|
|
/**
|
|
* Returns true if {obj} is a Buffer
|
|
*
|
|
* @param obj object to test.
|
|
*/
|
|
static isBuffer(obj: any): obj is Buffer;
|
|
/**
|
|
* Returns true if {encoding} is a valid encoding argument.
|
|
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
|
|
*
|
|
* @param encoding string to test.
|
|
*/
|
|
static isEncoding(encoding: string): boolean;
|
|
/**
|
|
* Gives the actual byte length of a string. encoding defaults to 'utf8'.
|
|
* This is not the same as String.prototype.length since that returns the number of characters in a string.
|
|
*
|
|
* @param string string to test.
|
|
* @param encoding encoding used to evaluate (defaults to 'utf8')
|
|
*/
|
|
static byteLength(string: string, encoding?: string): number;
|
|
/**
|
|
* Returns a buffer which is the result of concatenating all the buffers in the list together.
|
|
*
|
|
* If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
|
|
* If the list has exactly one item, then the first item of the list is returned.
|
|
* If the list has more than one item, then a new Buffer is created.
|
|
*
|
|
* @param list An array of Buffer objects to concatenate
|
|
* @param totalLength Total length of the buffers when concatenated.
|
|
* If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
|
|
*/
|
|
static concat(list: Buffer[], totalLength?: number): Buffer;
|
|
/**
|
|
* The same as buf1.compare(buf2).
|
|
*/
|
|
static compare(buf1: Buffer, buf2: Buffer): number;
|
|
/**
|
|
* Allocates a new buffer of {size} octets.
|
|
*
|
|
* @param size count of octets to allocate.
|
|
* @param fill if specified, buffer will be initialized by calling buf.fill(fill).
|
|
* If parameter is omitted, buffer will be filled with zeros.
|
|
* @param encoding encoding used for call to buf.fill while initalizing
|
|
*/
|
|
static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
|
|
/**
|
|
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
|
|
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
*
|
|
* @param size count of octets to allocate
|
|
*/
|
|
static allocUnsafe(size: number): Buffer;
|
|
/**
|
|
* Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
|
|
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
*
|
|
* @param size count of octets to allocate
|
|
*/
|
|
static allocUnsafeSlow(size: number): Buffer;
|
|
}
|
|
} |