Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface ITxMap {
- [index: string]: ITx; // Transaction Id
- }
- interface ITx {
- txData: {
- from: string,
- to: string,
- };
- transaction: ITransaction;
- currentValidators: ICurrentValidators;
- previousValidators: IPreviousValidators;
- snapshotValidators: ISnapshotValidators;
- }
- interface ITransaction {
- lifetime: EventTimestamp;
- generateSignature: EventTimestamp;
- writeToMyLedger: EventTimestamp;
- generateHash: EventTimestamp;
- }
- interface ICurrentValidators {
- [index: string]: {
- validation: {
- lifetime: EventTimestamp,
- requestValidation: EventTimestamp,
- validateSignature: EventTimestamp, // VALIDATE_SIGNATURE
- validateLedger: EventTimestamp, // VALIDATE_LEDGER
- generateHash: EventTimestamp, // GENERATE_TRANSACTION_HASH
- writeToWitnessLedger: EventTimestamp, // WRITE_TO_LEDGER
- },
- connection: EventTimestamp, // CONNECT_TO_VALIDATOR
- };
- }
- interface IPreviousValidators {
- [index: string]: { // Pod Address
- validation: {
- lifetime: EventTimestamp,
- getEntryFromLedger: EventTimestamp,
- };
- connection: {
- [index: string]: EventTimestamp,
- };
- };
- }
- interface ISnapshotValidators {
- [index: string]: {
- validation: {
- generateSnapshot: EventTimestamp,
- };
- connection: {
- [index: string]: EventTimestamp,
- };
- };
- }
- class EventTimestamp {
- public start: number;
- public end: number;
- public diff: number = 0;
- constructor(start: number, end: number) {
- this.start = start;
- this.end = end;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement