Skip to content

Commit

Permalink
Merge pull request #38 from casper-ecosystem/maciej/update-signer
Browse files Browse the repository at this point in the history
Support getActivePublicKey from Signer.
  • Loading branch information
Maciej Zieliński authored Apr 23, 2021
2 parents aa166b9 + c70e6e4 commit a47b2a0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to casper-client-sdk.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.42

### Added

- Support `getActivePublicKey` method from the Signer.

## 1.0.41

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "casper-client-sdk",
"version": "1.0.41",
"version": "1.0.42",
"license": "Apache 2.0",
"description": "SDK to interact with the Casper blockchain",
"main": "dist/lib.node.js",
Expand Down
13 changes: 12 additions & 1 deletion src/@types/casperlabsSigner.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,30 @@ interface CasperLabsHelper {
* Returns connection status from Signer
*/
isConnected: () => Promise<boolean>;

/**
* Attempt connection to Signer
*/
requestConnection: () => void;

/**
* send base16 encoded message to plugin to sign
*
* @param messageBase16 the base16 encoded message that plugin received to sign
* @param publicKeyBase64 the base64 encoded public key used to sign the deploy, if set, we will check whether it is the same as the active key for signing the message, otherwise, we won't check.
*/
sign: (messageBase16: string, publicKeyBase64?: string) => Promise<string>;
// returns base64 encoded public key of user current selected account.

/*
* Returns base64 encoded public key of user current selected account.
*/
getSelectedPublicKeyBase64: () => Promise<string>;

/**
* Retrieve the active public key .
* @returns {string} Hex-encoded public key with algorithm prefix.
*/
getActivePublicKey: () => Promise<string>;
}

interface SignerTestingHelper {
Expand Down

0 comments on commit a47b2a0

Please sign in to comment.