Skip to content

Commit 89496ed

Browse files
committed
Use IJsSigner interface exported from linera-protocol
1 parent acd76ad commit 89496ed

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

.gitmodules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[submodule "linera-protocol"]
22
path = linera-protocol
33
url = https://github.com/linera-io/linera-protocol
4+
branch = web-signer-fn

extension/src/signer/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import { Wallet, ethers } from 'ethers';
2+
import { IJsSigner } from '@linera/client';
23

3-
// TypeScript interface to match the extern "C" JsSigner API
4-
export interface JsSigner {
5-
sign(owner: string, value: Uint8Array): Promise<string>;
6-
get_public_key(owner: string): Promise<string>;
7-
contains_key(owner: string): Promise<boolean>;
8-
}
9-
10-
export class EmbeddedEIP191Signer implements JsSigner {
4+
export class EmbeddedEIP191Signer implements IJsSigner {
115
private wallet: Wallet;
126

137
constructor(privateKeyHex: string) {

0 commit comments

Comments
 (0)