///
import { AccountAddressT, ResourceIdentifierT, ValidatorAddressT } from "../../account/index";
import { ActionInput, ActionType, ExecutedAction, IntendedAction, StakeTokensInput, TransferTokensInput, UnstakeTokensInput } from "../actions/index";
import { AmountT, BuiltTransactionReadyToSign } from "../../primitives/index";
import { PublicKeyT, SignatureT } from "../../crypto/index";
import { Observable } from "rxjs";
import { Result } from "neverthrow";
import { AccountT, TxMessage } from "../_types";
import { TransactionIdentifierT } from "./transactionIdentifier";
export declare type StakePosition = {
validator: ValidatorAddressT;
amount: AmountT;
};
export declare type UnstakePosition = {
validator: ValidatorAddressT;
amount: AmountT;
withdrawTxID: TransactionIdentifierT;
epochsUntil: number;
};
export declare type TransactionIntentBuilderState = {
actionInputs: ActionInput[];
message?: TxMessage;
};
export declare type TransactionIntentBuilderEncryptOption = {
encryptMessageIfAnyWithAccount: Observable;
spendingSender?: Observable;
};
export declare type TransactionIntentBuilderDoNotEncryptInput = {
spendingSender: Observable;
};
export declare type TransactionIntentBuilderDoNotEncryptOption = {
skipEncryptionOfMessageIfAny: TransactionIntentBuilderDoNotEncryptInput;
};
export declare type TransactionIntentBuilderOptions = TransactionIntentBuilderDoNotEncryptOption | TransactionIntentBuilderEncryptOption;
export declare type TransactionIntentBuilderT = {
__state: TransactionIntentBuilderState;
transferTokens: (input: TransferTokensInput) => TransactionIntentBuilderT;
stakeTokens: (input: StakeTokensInput) => TransactionIntentBuilderT;
unstakeTokens: (input: UnstakeTokensInput) => TransactionIntentBuilderT;
message: (msg: TxMessage) => TransactionIntentBuilderT;
__syncBuildDoNotEncryptMessageIfAny: (from: AccountAddressT) => Result;
build: (options: TransactionIntentBuilderOptions) => Observable;
};
export declare type TransactionIntent = {
actions: IntendedAction[];
message?: Buffer;
};
export declare enum TransactionTrackingEventType {
INITIATED = "INITIATED",
BUILT = "BUILT",
VERIFIED = "VERIFIED",
SIGNED = "SIGNED",
SUBMITTED = "SUBMITTED",
CONFIRMED = "CONFIRMED",
FINALIZED = "FINALIZED",
STATUS_UPDATE = "STATUS_UPDATE",
COMPLETED = "COMPLETED"
}
export declare type TransactionStateSuccess = {
eventUpdateType: TransactionTrackingEventType;
transactionState: T;
};
export declare type TransactionStateError = {
eventUpdateType: TransactionTrackingEventType;
error: Error;
};
export declare type TransactionStateUpdate = TransactionStateSuccess | TransactionStateError;
export declare type TransactionState = TransactionIntent | BuiltTransaction | SignedTransaction | FinalizedTransaction | PendingTransaction;
export declare type TransactionHistoryOfKnownAddressRequestInput = {
size: number;
cursor?: string;
};
export declare type TransactionHistoryActiveAccountRequestInput = TransactionHistoryOfKnownAddressRequestInput;
export declare type TransactionHistoryRequestInput = TransactionHistoryOfKnownAddressRequestInput & {
address: AccountAddressT;
};
export declare type SimpleExecutedTransaction = {
txID: TransactionIdentifierT;
sentAt: Date;
status: TransactionStatus;
fee: AmountT;
message?: TxMessage;
actions: ExecutedAction[];
};
export declare enum TransactionType {
FROM_ME_TO_ME = "FROM_ME_TO_ME",
INCOMING = "INCOMING",
OUTGOING = "OUTGOING",
UNRELATED = "UNRELATED"
}
export declare type ExecutedTransaction = SimpleExecutedTransaction & {
transactionType: TransactionType;
};
export declare type TokenAmount = {
tokenIdentifier: ResourceIdentifierT;
amount: AmountT;
};
export declare type SimpleTokenBalance = TokenAmount;
export declare type TokenBalance = {
token: Token;
amount: AmountT;
};
export declare type Token = {
name: string;
rri: ResourceIdentifierT;
symbol: string;
description?: string;
granularity: AmountT;
isSupplyMutable: boolean;
currentSupply: AmountT;
tokenInfoURL?: URL;
iconURL?: URL;
};
export declare type StatusOfTransaction = {
txID: TransactionIdentifierT;
status: TransactionStatus;
};
export declare type BuiltTransaction = {
transaction: BuiltTransactionReadyToSign;
fee: AmountT;
};
export declare type SignedTransaction = {
transaction: BuiltTransactionReadyToSign;
publicKeyOfSigner: PublicKeyT;
signature: SignatureT;
};
export declare type FinalizedTransaction = {
blob: string;
txID: TransactionIdentifierT;
};
export declare type PendingTransaction = {
txID: TransactionIdentifierT;
};
export declare type RawToken = {
name: string;
rri: string;
symbol: string;
description?: string;
granularity: string;
isSupplyMutable: boolean;
currentSupply: string;
tokenInfoURL: string;
iconURL: string;
};
export declare type RawExecutedActionBase = {
type: T;
};
export declare type RawOtherExecutedAction = RawExecutedActionBase;
export declare type RawTransferAction = RawExecutedActionBase & {
from: string;
to: string;
amount: string;
rri: string;
};
export declare type RawStakesAction = RawExecutedActionBase & {
from: string;
validator: string;
amount: string;
};
export declare type RawUnstakesAction = RawExecutedActionBase & {
from: string;
validator: string;
amount: string;
};
export declare type NetworkTransactionThroughput = {
tps: number;
};
export declare type NetworkTransactionDemand = NetworkTransactionThroughput;
export declare enum TransactionStatus {
PENDING = "PENDING",
CONFIRMED = "CONFIRMED",
FAILED = "FAILED"
}
export declare type RawExecutedAction = RawTransferAction | RawStakesAction | RawUnstakesAction | RawOtherExecutedAction;
export declare type SimpleTokenBalances = {
owner: AccountAddressT;
tokenBalances: SimpleTokenBalance[];
};
export declare type TokenBalances = {
owner: AccountAddressT;
tokenBalances: TokenBalance[];
};
export declare type SimpleTransactionHistory = {
cursor: string;
transactions: SimpleExecutedTransaction[];
};
export declare type TransactionHistory = SimpleTransactionHistory & {
transactions: ExecutedTransaction[];
};
export declare type Validator = {
address: ValidatorAddressT;
ownerAddress: AccountAddressT;
name: string;
infoURL: URL;
totalDelegatedStake: AmountT;
ownerDelegation: AmountT;
validatorFee: number;
registered: boolean;
isExternalStakeAccepted: boolean;
uptimePercentage: number;
proposalsMissed: number;
proposalsCompleted: number;
};
export declare type Validators = {
cursor: string;
validators: Validator[];
};
export declare type RawExecutedTransaction = {
txID: string;
sentAt: string;
fee: string;
message?: string;
actions: RawExecutedAction[];
};
export declare type RawValidatorResponse = {
address: string;
ownerAddress: string;
name: string;
infoURL: string;
totalDelegatedStake: string;
ownerDelegation: string;
validatorFee: string;
registered: boolean;
isExternalStakeAccepted: boolean;
uptimePercentage: string;
proposalsMissed: number;
proposalsCompleted: number;
};
export declare type StakePositions = StakePosition[];
export declare type UnstakePositions = UnstakePosition[];
//# sourceMappingURL=_types.d.ts.map