UNPKG

@near-lake/primitives

Version:

Near Protocol primitive datatypes utilized by near-lake-framework and QueryAPI

54 lines (53 loc) 1.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Transaction = void 0; /** * 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`. */ class Transaction { constructor( /** * Returns the hash of the `Transaction` in `CryptoHash`. */ transactionHash, /** * Returns the signer account id of the `Transaction`. */ signerId, /** * Returns the `PublicKey` of the signer of the `Transaction`. */ signerPublicKey, /** * Returns the `Signature` the `Transaction` was signed with. */ signature, /** * Returns the receiver account id of the `Transaction`. */ receiverId, /** * Returns the status of the `Transaction` as `ExecutionStatus`. */ status, /** * Returns the id of the `ExecutionOutcome` for the `Transaction`. */ executionOutcomeId, /** * Returns an Array of `Operation` for the `Transaction`. */ operations) { this.transactionHash = transactionHash; this.signerId = signerId; this.signerPublicKey = signerPublicKey; this.signature = signature; this.receiverId = receiverId; this.status = status; this.executionOutcomeId = executionOutcomeId; this.operations = operations; } } exports.Transaction = Transaction;