@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
53 lines • 2.98 kB
TypeScript
import type { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
import type { FeePresetOption, SelfTransferPolicy } from "../types";
export declare const sendFeatures: {
canSendMax: (currency: CryptoOrTokenCurrency | undefined) => boolean;
hasMemo: (currency: CryptoOrTokenCurrency | undefined) => boolean;
hasFeePresets: (currency: CryptoOrTokenCurrency | undefined) => boolean;
hasCustomFees: (currency: CryptoOrTokenCurrency | undefined) => boolean;
getCustomFeeConfig: (currency: CryptoOrTokenCurrency | undefined) => Readonly<{
inputs: readonly Readonly<{
key: string;
type: "number";
unitLabel?: string;
suggestedRange?: {
getRange: (transaction: unknown) => {
min: string;
max: string;
} | null;
};
helperInfo?: {
getValue: (transaction: unknown) => string | null;
};
minValue?: {
getValue: (transaction: unknown) => string | null;
};
}>[];
getInitialValues: (transaction: unknown) => Record<string, string>;
buildTransactionPatch: (values: Record<string, string>) => Record<string, unknown>;
}> | null;
hasCustomAssets: (currency: CryptoOrTokenCurrency | undefined) => boolean;
getCustomAssetsConfig: (currency: CryptoOrTokenCurrency | undefined) => Readonly<{
options: readonly Readonly<{
id: string;
ticker: string;
label: string;
unitLabel?: string;
}>[];
defaultId: string;
}> | null;
hasCoinControl: (currency: CryptoOrTokenCurrency | undefined) => boolean;
getFeePresetOptions: (currency: CryptoOrTokenCurrency | undefined, transaction: unknown) => readonly FeePresetOption[];
shouldEstimateFeePresetsWithBridge: (currency: CryptoOrTokenCurrency | undefined, transaction: unknown) => boolean;
getAmountPlugins: (currency: CryptoOrTokenCurrency | undefined) => readonly string[];
getMemoType: (currency: CryptoOrTokenCurrency | undefined) => "number" | "tag" | "text" | "typed" | undefined;
getMemoMaxLength: (currency: CryptoOrTokenCurrency | undefined) => number | undefined;
getMemoMaxValue: (currency: CryptoOrTokenCurrency | undefined) => number | undefined;
getMemoOptions: (currency: CryptoOrTokenCurrency | undefined) => readonly string[] | undefined;
getMemoDefaultOption: (currency: CryptoOrTokenCurrency | undefined) => string | undefined;
supportsDomain: (currency: CryptoOrTokenCurrency | undefined) => boolean;
getSelfTransferPolicy: (currency: CryptoOrTokenCurrency | undefined) => SelfTransferPolicy;
getUserRefusedTransactionErrorName: (currency: CryptoOrTokenCurrency | undefined) => string;
isUserRefusedTransactionError: (currency: CryptoOrTokenCurrency | undefined, error: unknown) => boolean;
};
//# sourceMappingURL=features.d.ts.map