UNPKG

1.12 kBTypeScriptView Raw
1import type { Enum, Result, Struct, Vec, bool } from '@polkadot/types-codec';
2import type { TransactionLongevity, TransactionPriority, TransactionTag } from '@polkadot/types/interfaces/runtime';
3import type { TransactionValidityError } from '@polkadot/types/interfaces/system';
4/** @name TransactionSource */
5export interface TransactionSource extends Enum {
6 readonly isInBlock: boolean;
7 readonly isLocal: boolean;
8 readonly isExternal: boolean;
9 readonly type: 'InBlock' | 'Local' | 'External';
10}
11/** @name TransactionValidity */
12export interface TransactionValidity extends Result<ValidTransaction, TransactionValidityError> {
13 readonly isErr: boolean;
14 readonly asErr: TransactionValidityError;
15 readonly isOk: boolean;
16 readonly asOk: ValidTransaction;
17}
18/** @name ValidTransaction */
19export interface ValidTransaction extends Struct {
20 readonly priority: TransactionPriority;
21 readonly requires: Vec<TransactionTag>;
22 readonly provides: Vec<TransactionTag>;
23 readonly longevity: TransactionLongevity;
24 readonly propagate: bool;
25}
26export type PHANTOM_TXQUEUE = 'txqueue';