23 lines
653 B
TypeScript
23 lines
653 B
TypeScript
|
|
/**
|
||
|
|
* Step 4 — Derivation / Signer: types
|
||
|
|
* Target: ledger-live libs/coin-modules/coin-*/src/types/signer.ts
|
||
|
|
* For EVM we use the same as Ethereum; Chain 138 uses path 44'/60'/0'/0/0.
|
||
|
|
*/
|
||
|
|
|
||
|
|
export type EthereumAddress = {
|
||
|
|
address: string;
|
||
|
|
publicKey: string;
|
||
|
|
returnCode: number;
|
||
|
|
};
|
||
|
|
|
||
|
|
export type EthereumSignature = {
|
||
|
|
signature: Buffer | null;
|
||
|
|
returnCode: number;
|
||
|
|
};
|
||
|
|
|
||
|
|
export interface EthereumSigner {
|
||
|
|
getAddress(path: string, display?: boolean): Promise<EthereumAddress>;
|
||
|
|
signTransaction(path: string, rawTxHex: string): Promise<EthereumSignature>;
|
||
|
|
signPersonalMessage(path: string, messageHex: string): Promise<EthereumSignature>;
|
||
|
|
}
|