Class: Transaction
Defined in: packages/txm/lib/Transaction.ts:88
Accessors
attemptCount
Get Signature
get attemptCount(): number;Defined in: packages/txm/lib/Transaction.ts:232
Returns
number
lastAttempt
Get Signature
get lastAttempt(): undefined | Attempt;Defined in: packages/txm/lib/Transaction.ts:236
Returns
undefined | Attempt
Constructors
Constructor
new Transaction(__namedParameters: TransactionConstructorConfig & {
attempts: Attempt[];
chainId: number;
collectionBlock: bigint;
createdAt: Date;
from: `0x${string}`;
intentId: UUID;
notPersisted: boolean;
pendingFlush: boolean;
status: TransactionStatus;
updatedAt: Date;
}): Transaction;Defined in: packages/txm/lib/Transaction.ts:132
Parameters
__namedParameters
TransactionConstructorConfig & {
attempts: Attempt[];
chainId: number;
collectionBlock: bigint;
createdAt: Date;
from: `0x${string}`;
intentId: UUID;
notPersisted: boolean;
pendingFlush: boolean;
status: TransactionStatus;
updatedAt: Date;
}
Returns
Transaction
Methods
addAttempt()
addAttempt(attempt: Attempt): void;Defined in: packages/txm/lib/Transaction.ts:179
Parameters
attempt
Attempt
Returns
void
addCollectionBlock()
addCollectionBlock(blockNumber: bigint): void;Defined in: packages/txm/lib/Transaction.ts:184
Parameters
blockNumber
bigint
Returns
void
changeStatus()
changeStatus(status: TransactionStatus): void;Defined in: packages/txm/lib/Transaction.ts:208
Parameters
status
Returns
void
getInAirAttempts()
getInAirAttempts(): Attempt[];Defined in: packages/txm/lib/Transaction.ts:197
Returns
Attempt[]
isExpired()
isExpired(block: LatestBlock, blockTime: bigint): boolean;Defined in: packages/txm/lib/Transaction.ts:203
Parameters
block
blockTime
bigint
Returns
boolean
markFlushed()
markFlushed(): void;Defined in: packages/txm/lib/Transaction.ts:240
Returns
void
removeAttempt()
removeAttempt(hash: `0x${string}`): void;Defined in: packages/txm/lib/Transaction.ts:189
Parameters
hash
`0x${string}`
Returns
void
toDbRow()
toDbRow(): {
address: `0x${string}`;
args: string;
attempts: string;
chainId: number;
contractName: string;
createdAt: number;
from: `0x${string}`;
functionName: string;
intentId: UUID;
status: TransactionStatus;
updatedAt: number;
} & {
collectionBlock: number;
deadline: number;
metadata: string;
};Defined in: packages/txm/lib/Transaction.ts:256
Returns
{
address: `0x${string}`;
args: string;
attempts: string;
chainId: number;
contractName: string;
createdAt: number;
from: `0x${string}`;
functionName: string;
intentId: UUID;
status: TransactionStatus;
updatedAt: number;
} & {
collectionBlock: number;
deadline: number;
metadata: string;
}
toJson()
toJson(): string;Defined in: packages/txm/lib/Transaction.ts:289
Returns
string
fromDbRow()
static fromDbRow(row: {
address: `0x${string}`;
args: string;
attempts: string;
chainId: number;
collectionBlock: undefined | number;
contractName: string;
createdAt: number;
deadline: undefined | number;
from: `0x${string}`;
functionName: string;
intentId: UUID;
metadata: undefined | string;
status: TransactionStatus;
updatedAt: number;
}): Transaction;Defined in: packages/txm/lib/Transaction.ts:275
Parameters
row
address
`0x${string}`
args
string
attempts
string
chainId
number
collectionBlock
undefined | number
contractName
string
createdAt
number
deadline
undefined | number
from
`0x${string}`
functionName
string
intentId
UUID
metadata
undefined | string
status
updatedAt
number
Returns
Transaction
Properties
address
readonly address: `0x${string}`;Defined in: packages/txm/lib/Transaction.ts:95
args
readonly args: readonly unknown[];Defined in: packages/txm/lib/Transaction.ts:99
attempts
readonly attempts: Attempt[];Defined in: packages/txm/lib/Transaction.ts:108
chainId
readonly chainId: number;Defined in: packages/txm/lib/Transaction.ts:93
collectionBlock
collectionBlock: undefined | bigint;Defined in: packages/txm/lib/Transaction.ts:112
contractName
readonly contractName: string;Defined in: packages/txm/lib/Transaction.ts:102
createdAt
createdAt: Date;Defined in: packages/txm/lib/Transaction.ts:122
deadline
readonly deadline: undefined | number;Defined in: packages/txm/lib/Transaction.ts:104
from
readonly from: `0x${string}`;Defined in: packages/txm/lib/Transaction.ts:91
functionName
readonly functionName: string;Defined in: packages/txm/lib/Transaction.ts:97
intentId
readonly intentId: UUID;Defined in: packages/txm/lib/Transaction.ts:89
metadata
readonly metadata: Record<string, unknown>;Defined in: packages/txm/lib/Transaction.ts:130
Stores additional information for the transaction. Enables originators to provide extra details, such as gas limits, which can be leveraged by customizable services.
notPersisted
notPersisted: boolean;Defined in: packages/txm/lib/Transaction.ts:120
pendingFlush
pendingFlush: boolean;Defined in: packages/txm/lib/Transaction.ts:116
status
status: TransactionStatus;Defined in: packages/txm/lib/Transaction.ts:106
updatedAt
updatedAt: Date;Defined in: packages/txm/lib/Transaction.ts:124