You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shamap.d.ts 988B

1234567891011121314151617181920212223242526272829303132333435363738
  1. export declare enum NodeType {
  2. INNER = 1,
  3. TRANSACTION_NO_METADATA = 2,
  4. TRANSACTION_METADATA = 3,
  5. ACCOUNT_STATE = 4
  6. }
  7. export declare abstract class Node {
  8. constructor();
  9. addItem(_tag: string, _node: Node): void;
  10. get hash(): string | void;
  11. }
  12. export declare class InnerNode extends Node {
  13. leaves: {
  14. [slot: number]: Node;
  15. };
  16. type: NodeType;
  17. depth: number;
  18. empty: boolean;
  19. constructor(depth?: number);
  20. addItem(tag: string, node: Node): void;
  21. setNode(slot: number, node: Node): void;
  22. getNode(slot: number): Node;
  23. get hash(): string;
  24. }
  25. export declare class Leaf extends Node {
  26. tag: string;
  27. type: NodeType;
  28. data: string;
  29. constructor(tag: string, data: string, type: NodeType);
  30. get hash(): string | void;
  31. }
  32. export declare class SHAMap {
  33. root: InnerNode;
  34. constructor();
  35. addItem(tag: string, data: string, type: NodeType): void;
  36. get hash(): string;
  37. }
  38. //# sourceMappingURL=shamap.d.ts.map