@taquito/signer 23.0.0-beta.1 → 23.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { SigningKey } from './key-interface';
2
- import { RawSignResult } from '@taquito/taquito';
1
+ import { SigningKey, PublicKey } from './key-interface';
2
+ import { RawSignResult } from '@taquito/core';
3
3
  /**
4
4
  * @description Provide signing logic for ed25519 curve based key (tz1)
5
5
  */
@@ -18,17 +18,22 @@ export declare class EdKey implements SigningKey {
18
18
  * @param bytes Bytes to sign
19
19
  * @param bytesHash Blake2b hash of the bytes to sign
20
20
  */
21
- sign(bytes: Uint8Array): Promise<RawSignResult>;
21
+ sign(bytes: Uint8Array): RawSignResult;
22
22
  /**
23
23
  * @returns Encoded public key
24
24
  */
25
- publicKey(): Promise<string>;
26
- /**
27
- * @returns Encoded public key hash
28
- */
29
- publicKeyHash(): Promise<string>;
25
+ publicKey(): PublicKey;
30
26
  /**
31
27
  * @returns Encoded private key
32
28
  */
33
- secretKey(): Promise<string>;
29
+ secretKey(): string;
30
+ }
31
+ export declare class EdPublicKey implements PublicKey {
32
+ #private;
33
+ constructor(src: string | Uint8Array);
34
+ compare(other: PublicKey): number;
35
+ hash(): string;
36
+ bytes(): Uint8Array;
37
+ toProtocol(): Uint8Array;
38
+ toString(): string;
34
39
  }
@@ -1,12 +1,17 @@
1
- import { RawSignResult } from '@taquito/taquito';
1
+ import { RawSignResult } from '@taquito/core';
2
2
  export interface SigningKey {
3
- sign(message: Uint8Array): Promise<RawSignResult>;
4
- publicKey(): Promise<string>;
5
- publicKeyHash(): Promise<string>;
6
- secretKey(): Promise<string>;
7
- provePossession?: () => Promise<RawSignResult>;
3
+ sign(message: Uint8Array): RawSignResult;
4
+ publicKey(): PublicKey;
5
+ secretKey(): string;
6
+ provePossession?: () => RawSignResult;
8
7
  }
9
8
  export interface SigningKeyWithProofOfPossession extends SigningKey {
10
- provePossession(): Promise<RawSignResult>;
9
+ provePossession(): RawSignResult;
11
10
  }
12
11
  export declare function isPOP(k: SigningKey): k is SigningKeyWithProofOfPossession;
12
+ export interface PublicKey {
13
+ compare(other: PublicKey): number;
14
+ hash(): string;
15
+ bytes(compress?: boolean): Uint8Array;
16
+ toProtocol(): Uint8Array;
17
+ }
@@ -1,10 +1,12 @@
1
1
  import { Curves } from './helpers';
2
- import { SignResult, RawSignResult, Signer } from '@taquito/taquito';
2
+ import { SignResult, RawSignResult, Signer } from '@taquito/core';
3
+ import { PublicKey } from './key-interface';
3
4
  export * from './import-key';
4
5
  export { VERSION } from './version';
5
6
  export * from './derivation-tools';
6
7
  export * from './helpers';
7
8
  export { InvalidPassphraseError } from './errors';
9
+ export { PublicKey } from './key-interface';
8
10
  export interface FromMnemonicParams {
9
11
  mnemonic: string;
10
12
  password?: string;
@@ -61,3 +63,4 @@ export declare class InMemorySigner implements Signer {
61
63
  */
62
64
  secretKey(): Promise<string>;
63
65
  }
66
+ export declare function publicKeyFromString(src: string): PublicKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/signer",
3
- "version": "23.0.0-beta.1",
3
+ "version": "23.0.0",
4
4
  "description": "Provide signing functionality to be with taquito",
5
5
  "keywords": [
6
6
  "tezos",
@@ -73,9 +73,9 @@
73
73
  "@stablelib/nacl": "^1.0.4",
74
74
  "@stablelib/pbkdf2": "^1.0.1",
75
75
  "@stablelib/sha512": "^1.0.1",
76
- "@taquito/core": "^23.0.0-beta.1",
77
- "@taquito/taquito": "^23.0.0-beta.1",
78
- "@taquito/utils": "^23.0.0-beta.1",
76
+ "@taquito/core": "^23.0.0",
77
+ "@taquito/taquito": "^23.0.0",
78
+ "@taquito/utils": "^23.0.0",
79
79
  "@types/bn.js": "^5.1.5",
80
80
  "bip39": "3.1.0",
81
81
  "elliptic": "^6.6.1",
@@ -112,5 +112,5 @@
112
112
  "typedoc": "^0.26.5",
113
113
  "typescript": "~5.5.4"
114
114
  },
115
- "gitHead": "1469d6f0d55134a4b853598a2eec48e6f71b3da3"
115
+ "gitHead": "4ac77876be144da54f292e639b5b977a13642de9"
116
116
  }