Skip to content

Commit 1efbf5e

Browse files
authored
Merge pull request #4 from chiru-labs/tea/export-parsekeys
export parseKeys + bump to 0.0.4
2 parents cb0b255 + d2855fc commit 1efbf5e

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,27 @@ Return value
9494
Promise<string | undefined>
9595
```
9696

97+
### `parseKeys`
98+
99+
This function takes a single positional argument:
100+
101+
| Parameter | Type | Description | Required |
102+
| ------------- | ------------- | ------------- | ------------- |
103+
| payload | string | A hex representation of the signature read from scan | Yes |
104+
105+
Return value
106+
107+
```ts
108+
{
109+
primaryPublicKeyHash: string;
110+
primaryPublicKeyRaw: string;
111+
secondaryPublicKeyHash: string;
112+
secondaryPublicKeyRaw: string;
113+
tertiaryPublicKeyHash: string;
114+
tertiaryPublicKeyRaw: string;
115+
} | undefined
116+
```
117+
97118
## Requirements
98119

99120
- The library must be hosted with secure transport (SSL), even in a development environment.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pbt-chip-client",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "Javascript library to make it easy to integrate with PBT for browsers",
55
"scripts": {
66
"pre-commit": "lint-staged",

src/kong/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function generateCmd(
3838
return inputBytes;
3939
}
4040

41-
function parseKeys(payload: string) {
41+
export function parseKeys(payload: string) {
4242
try {
4343
const primaryPublicKeyLength = parseInt("0x" + payload.slice(0, 2)) * 2;
4444
const primaryPublicKeyRaw = payload.slice(2, primaryPublicKeyLength + 2);

0 commit comments

Comments
 (0)