-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: nicer HWW derivation path selection (#755)
- Loading branch information
1 parent
a162f67
commit a5f46e3
Showing
6 changed files
with
277 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
import type { JsonRpcProvider } from "ethers"; | ||
|
||
export const derivationPaths = { | ||
Ethereum: "44'/60'/0'/0/0", | ||
Ethereum: "44'/60'/0'/0", | ||
}; | ||
|
||
export const derivationPathsMainnet = { | ||
RSK: "44'/137'/0'/0/0", | ||
RSK: "44'/137'/0'", | ||
}; | ||
|
||
export const derivationPathsTestnet = { | ||
["RSK Testnet"]: "44'/37310'/0'/0/0", | ||
["RSK Testnet"]: "44'/37310'/0'", | ||
}; | ||
|
||
export type DerivedAddress = { | ||
path: string; | ||
address: string; | ||
}; | ||
|
||
export interface HardwareSigner { | ||
getProvider(): JsonRpcProvider; | ||
|
||
deriveAddresses( | ||
basePath: string, | ||
offset: number, | ||
limit: number, | ||
): Promise<DerivedAddress[]>; | ||
|
||
getDerivationPath(): string; | ||
setDerivationPath(path: string): void; | ||
} |
Oops, something went wrong.