UNPKG

@ledgerhq/types-live

Version:
69 lines 2.46 kB
import type { BigNumber } from "bignumber.js"; import { TransactionCommonRaw } from "./transaction"; import { NFTStandard } from "./nft"; /** * */ export type OperationType = "IN" | "OUT" | "NONE" | "CREATE" | "REVEAL" | "UNKNOWN" | "DELEGATE" | "UNDELEGATE" | "REDELEGATE" | "REWARD" | "FEES" | "FREEZE" | "UNFREEZE" | "WITHDRAW_EXPIRE_UNFREEZE" | "UNDELEGATE_RESOURCE" | "LEGACY_UNFREEZE" | "VOTE" | "REWARD_PAYOUT" | "BOND" | "UNBOND" | "WITHDRAW_UNBONDED" | "SET_CONTROLLER" | "SLASH" | "NOMINATE" | "CHILL" | "APPROVE" | "OPT_IN" | "OPT_OUT" | "LOCK" | "UNLOCK" | "WITHDRAW" | "REVOKE" | "ACTIVATE" | "REGISTER" | "NFT_IN" | "NFT_OUT" | "STAKE" | "UNSTAKE" | "WITHDRAW_UNSTAKED" | "BURN" | "ASSOCIATE_TOKEN"; export type OperationExtra = unknown; /** * An Operation is the Ledger Live abstraction of a transaction for any blockchain */ export type Operation<Extra = OperationExtra> = { id: string; hash: string; type: OperationType; value: BigNumber; fee: BigNumber; senders: string[]; recipients: string[]; blockHeight: number | null | undefined; blockHash: string | null | undefined; transactionSequenceNumber?: number | undefined; accountId: string; standard?: NFTStandard | string; operator?: string; contract?: string; tokenId?: string; date: Date; hasFailed?: boolean; subOperations?: Operation[]; internalOperations?: Operation[]; nftOperations?: Operation[]; transactionRaw?: TransactionCommonRaw; extra: Extra; }; export type OperationExtraRaw = unknown; export type OperationRaw<ExtraRaw = OperationExtraRaw> = { id: string; hash: string; type: OperationType; value: string; fee: string; senders: string[]; recipients: string[]; blockHeight: number | null | undefined; blockHash: string | null | undefined; transactionSequenceNumber?: number; accountId: string; hasFailed?: boolean; standard?: NFTStandard | string; operator?: string; contract?: string; tokenId?: string; date: string; subOperations?: OperationRaw[]; internalOperations?: OperationRaw[]; nftOperations?: OperationRaw[]; transactionRaw?: TransactionCommonRaw; extra: ExtraRaw; }; export type DailyOperationsSection = { day: Date; data: Operation[]; }; export type DailyOperations = { sections: DailyOperationsSection[]; completed: boolean; }; //# sourceMappingURL=operation.d.ts.map