Skip to content

Commit

Permalink
Update Keyring type (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
gantunesr authored Mar 6, 2023
1 parent caffc7c commit e7213ea
Show file tree
Hide file tree
Showing 3 changed files with 514 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"jest-worker@^28.1.3": "patch:jest-worker@npm%3A28.1.3#./.yarn/patches/jest-worker-npm-28.1.3-5d0ff9006c.patch"
},
"dependencies": {
"@ethereumjs/tx": "^4.1.1",
"@types/debug": "^4.1.7",
"debug": "^4.3.4",
"semver": "^7.3.8",
Expand Down
13 changes: 10 additions & 3 deletions src/keyring.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { TypedTransaction, TxData } from '@ethereumjs/tx';

import type { Eip1024EncryptedData } from './encryption-types';
import { Hex } from './hex';
import { Json } from './json';
import type { Transaction, SignedTransaction } from './transaction-types';

/**
* A Keyring class.
Expand Down Expand Up @@ -135,9 +136,9 @@ export type Keyring<State extends Json> = {
*/
signTransaction?(
address: Hex,
transaction: Transaction,
transaction: TypedTransaction,
options?: Record<string, unknown>,
): Promise<SignedTransaction>;
): Promise<TxData>;

/**
* Sign a message. This is equivalent to an older version of the the
Expand Down Expand Up @@ -246,4 +247,10 @@ export type Keyring<State extends Json> = {
account: Hex,
encryptedData: Eip1024EncryptedData,
): Promise<string>;

/**
* Generates the properties for the keyring based on the given
* BIP39-compliant mnemonic.
*/
generateRandomMnemonic?(): void;
};
Loading

0 comments on commit e7213ea

Please sign in to comment.