-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: block tx response, temp validator fix
- Loading branch information
Showing
5 changed files
with
88 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { TxResponse } from '../tx/tx.types'; | ||
|
||
export type BlockType = { | ||
blockHash: string; | ||
blockData: string; | ||
blockDataAsJson: any; | ||
blockSize: number; | ||
ts: number; | ||
transactions: TxResponse[]; | ||
totalNumberOfTxns: number; | ||
}; | ||
|
||
export type BlockResponse = { | ||
blocks: BlockType[]; | ||
lastTs: number; | ||
totalPages: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
import { Transaction } from '../generated/tx'; | ||
|
||
// TxCategory supported for Serealization / Deserealization by core | ||
export enum TxCategory { | ||
INIT_DID = 'INIT_DID', | ||
INIT_SESSION_KEY = 'INIT_SESSION_KEY', | ||
} | ||
|
||
export type TxWithBlockHash = Transaction & { | ||
// can be undefined in case of rejected / failed Tx | ||
blockHash?: string; | ||
export type TxResponse = { | ||
txnHash: string; | ||
ts: number; | ||
/**@dev - Null In case of rejected Tx */ | ||
blockHash: string | null; | ||
category: string; | ||
sender: string; | ||
status: 'SUCCESS' | 'REJECTED'; | ||
recipients: string[]; | ||
txnData: string; | ||
sig: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters