Skip to content

Commit

Permalink
types and package.json fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bergarces committed Mar 7, 2023
1 parent 304ec9e commit e191c6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"files": [
"index.js",
"ledger-keyring.js",
"ledger-bridge-iframe.js",
"ledger-iframe-bridge.js",
"types/index.d.ts"
],
"engines": {
Expand Down
20 changes: 10 additions & 10 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
export type GetPublicKeyPayload = { hdPath: string };
export type GetPublicKeyParams = { hdPath: string };
export type GetPublicKeyResponse = {
publicKey: string;
address: string;
chainCode?: string;
};

export type LedgerSignTransactionPayload = { hdPath: string; rawTxHex: string };
export type LedgerSignTransactionParams = { hdPath: string; tx: string };
export type LedgerSignTransactionResponse = {
s: string;
v: string;
r: string;
};

export type LedgerSignMessagePayload = { hdPath: string; message: string };
export type LedgerSignMessageParams = { hdPath: string; message: string };
export type LedgerSignMessageResponse = {
v: number;
s: string;
r: string;
};

export type LedgerSignTypedDataPayload = {
export type LedgerSignTypedDataParams = {
hdPath: string;
domainSeparatorHex: string;
hashStructMessageHex: string;
Expand All @@ -37,19 +37,19 @@ export interface LedgerBridge {

attemptMakeApp(): Promise<boolean>;

getPublicKey(
payload: GetPublicKeyPayload
): Promise<GetPublicKeyResponse>;
updateTransportMethod(transportType: string): Promise<boolean>;

getPublicKey(params: GetPublicKeyParams): Promise<GetPublicKeyResponse>;

deviceSignTransaction(
payload: LedgerSignTransactionPayload
params: LedgerSignTransactionParams
): Promise<LedgerSignTransactionResponse>;

deviceSignMessage(
payload: LedgerSignMessagePayload
params: LedgerSignMessageParams
): Promise<LedgerSignMessageResponse>;

deviceSignTypedData(
payload: LedgerSignTypedDataPayload
params: LedgerSignTypedDataParams
): Promise<LedgerSignTypedDataResponse>;
}

0 comments on commit e191c6e

Please sign in to comment.