-
Notifications
You must be signed in to change notification settings - Fork 14
/
transactions.ts
50 lines (42 loc) · 1.5 KB
/
transactions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { ExecutionStatus } from './core/types';
import { Operation } from './receipts';
/**
* A representation of the `IndexerTransactionWithOutcome` from `near-indexer-primitives` which is an ephemeral structure combining `SignedTransactionView` from [near-primitives](https://github.com/near/nearcore/tree/master/core/primitives) and `IndexerExecutionOutcomeWithOptionalReceipt` from `near-indexer-primitives`.
*
* This structure is very similar to `Receipt`. Unlike `Receipt`, a `Transaction` has a few additional fields like `signerId`, `signature`, and `operations`.
*/
export class Transaction {
constructor(
/**
* Returns the hash of the `Transaction` in `CryptoHash`.
*/
readonly transactionHash: string,
/**
* Returns the signer account id of the `Transaction`.
*/
readonly signerId: string,
/**
* Returns the `PublicKey` of the signer of the `Transaction`.
*/
readonly signerPublicKey: string,
/**
* Returns the `Signature` the `Transaction` was signed with.
*/
readonly signature: string,
/**
* Returns the receiver account id of the `Transaction`.
*/
readonly receiverId: string,
/**
* Returns the status of the `Transaction` as `ExecutionStatus`.
*/
readonly status: ExecutionStatus,
/**
* Returns the id of the `ExecutionOutcome` for the `Transaction`.
*/
readonly executionOutcomeId: string,
/**
* Returns an Array of `Operation` for the `Transaction`.
*/
readonly operations: Operation[]) { }
}