postchain-client
Version:
Client library for accessing a Postchain node through REST.
132 lines (131 loc) • 3.53 kB
TypeScript
export const HASH_PREFIX_NODE: 0;
export const HASH_PREFIX_LEAF: 1;
export const HASH_PREFIX_NODE_ARRAY: 7;
export const HASH_PREFIX_NODE_DICT: 8;
/**
*
* @param {BinaryTreeElement} left
* @param {BinaryTreeElement} right
*/
export function Node(left: BinaryTreeElement, right: BinaryTreeElement): void;
export class Node {
/**
*
* @param {BinaryTreeElement} left
* @param {BinaryTreeElement} right
*/
constructor(left: BinaryTreeElement, right: BinaryTreeElement);
left: BinaryTreeElement;
right: BinaryTreeElement;
getPrefixByte(): number;
}
/**
*
* @param {*} content
* @param {PathElement} pathElem
*/
export function Leaf(content: any, pathElem?: PathElement): void;
export class Leaf {
/**
*
* @param {*} content
* @param {PathElement} pathElem
*/
constructor(content: any, pathElem?: PathElement);
content: any;
getPrefixByte(): number;
}
export function EmptyLeaf(): void;
export class EmptyLeaf {
}
/**
*
* @param {BinaryTreeElement} left
* @param {BinaryTreeElement} right
* @param {*} content
* @param {PathSet} pathElem
*/
export function SubTreeRootNode(left: BinaryTreeElement, right: BinaryTreeElement, content: any, pathElem: PathSet): void;
export class SubTreeRootNode {
/**
*
* @param {BinaryTreeElement} left
* @param {BinaryTreeElement} right
* @param {*} content
* @param {PathSet} pathElem
*/
constructor(left: BinaryTreeElement, right: BinaryTreeElement, content: any, pathElem: PathSet);
content: any;
}
/**
*
*/
export function BinaryTreeElement(): void;
export class BinaryTreeElement {
pathElem: any;
isPath(): boolean;
isPathLeaf(): boolean;
setPathElement(pathElem: any): void;
getPrefixByte(): number;
}
/**
* Wrapper class for the root object.
* @param {BinaryTreeElement} root
*/
export function BinaryTree(root: BinaryTreeElement): void;
export class BinaryTree {
/**
* Wrapper class for the root object.
* @param {BinaryTreeElement} root
*/
constructor(root: BinaryTreeElement);
root: BinaryTreeElement;
maxLevel(): any;
maxLevelInternal(node: any): any;
}
/**
* Represents the top of a sub tree generated by a [Array]
*
* @param {*} left
* @param {*} right
* @param {*} content
* @param {*} size
* @param {PathElement} pathElem
*/
export function ArrayHeadNode(left: any, right: any, content: any, size: any, pathElem?: PathElement): void;
export class ArrayHeadNode {
/**
* Represents the top of a sub tree generated by a [Array]
*
* @param {*} left
* @param {*} right
* @param {*} content
* @param {*} size
* @param {PathElement} pathElem
*/
constructor(left: any, right: any, content: any, size: any, pathElem?: PathElement);
size: any;
getPrefixByte(): number;
}
/**
* Represents the top a sub tree generated by a [Dictionary]
* @param {*} left
* @param {*} right
* @param {*} content
* @param {*} size
* @param {PathElement} pathElem
*/
export function DictHeadNode(left: any, right: any, content: any, size: any, pathElem?: PathElement): void;
export class DictHeadNode {
/**
* Represents the top a sub tree generated by a [Dictionary]
* @param {*} left
* @param {*} right
* @param {*} content
* @param {*} size
* @param {PathElement} pathElem
*/
constructor(left: any, right: any, content: any, size: any, pathElem?: PathElement);
size: any;
getPrefixByte(): number;
}