Prepare package to self-host in Gitea npm registry

This commit is contained in:
Theo 2023-09-12 02:32:36 -07:00
parent 3da67b29ed
commit 0045ef85b1
4 changed files with 13 additions and 12 deletions

1
.npmrc Normal file

@ -0,0 +1 @@
@tornado:registry=https://git.tornado.ws/api/packages/tornado-packages/npm/

2
.nvmrc

@ -1 +1 @@
14.17
14.23

18
lib/index.d.ts vendored

@ -3,43 +3,43 @@ export { PartialMerkleTree } from './PartialMerkleTree';
export { simpleHash } from './simpleHash';
export { MerkleTree };
export default MerkleTree;
export declare type HashFunction<T> = {
export type HashFunction<T> = {
(left: T, right: T): string;
};
export declare type MerkleTreeOptions = {
export type MerkleTreeOptions = {
hashFunction?: HashFunction<Element>;
zeroElement?: Element;
};
export declare type Element = string | number;
export declare type SerializedTreeState = {
export type Element = string | number;
export type SerializedTreeState = {
levels: number;
_zeros: Array<Element>;
_layers: Array<Element[]>;
};
export declare type SerializedPartialTreeState = {
export type SerializedPartialTreeState = {
levels: number;
_layers: Element[][];
_zeros: Array<Element>;
_edgeLeafProof: ProofPath;
_edgeLeaf: LeafWithIndex;
};
export declare type ProofPath = {
export type ProofPath = {
pathElements: Element[];
pathIndices: number[];
pathPositions: number[];
pathRoot: Element;
};
export declare type TreeEdge = {
export type TreeEdge = {
edgeElement: Element;
edgePath: ProofPath;
edgeIndex: number;
edgeElementsCount: number;
};
export declare type TreeSlice = {
export type TreeSlice = {
edge: TreeEdge;
elements: Element[];
};
export declare type LeafWithIndex = {
export type LeafWithIndex = {
index: number;
data: Element;
};

@ -1,8 +1,8 @@
{
"name": "fixed-merkle-tree",
"name": "@tornado/fixed-merkle-tree",
"version": "0.7.3",
"description": "Fixed depth merkle tree implementation with sequential inserts",
"repository": "https://github.com/tornadocash/fixed-merkle-tree.git",
"repository": "https://git.tornado.ws/tornado-packages/fixed-merkle-tree.git",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {