ngx-steem-keychain 1.1: Buffer Signing and Broadcast Available

Words
129
Reading
1 min
Listen
Play
8y

Repository

https://github.com/steeveproject/ngx-steem-keychain

New Features

This release synchronizes ngx-steem-keychain with Steem Keychain extension version 1.1.4 as current available on the Chrome extension store. The following public methods were added to SteemKeychainService:

  • requestSignBuffer - Sign a buffer with the selected private key (proxy to signature.Signature.signBuffer from steem-js).
  • requestBroadcast - Broadcast any operation to the blockchain (proxy to steem.broadcast.send from steem-js).
  • requestSignedCall - Execute a signed call (proxy to steem.api.signedCall from steem-js).

To see all changes, compare what is new with the 1.0 release.

Example: Claim Reward Balance

Any blockchain operation can be now broadcasted to the blockchain. The following snippet illustrates how to claim rewards for the selected user (having SteemKeychainService injected as this.steemKeychain):

claimRewardBalance(
  username: string,
  rewardSteem: string,
  rewardSbd: string,
  rewardVests: string
): Observable<any> {

  return this.steemKeychain.requestBroadcast(username, [
    new Operation('claim_reward_balance', {
      account: username,
      reward_steem: rewardSteem,
      reward_sbd: rewardSbd,
      reward_vests: rewardVests,
      })
  ], 'Posting');
 }

Using this method I managed to claim reward balance:

steem_keychain_claim_rewards.png

GitHub Account

https://github.com/steeveproject

https://github.com/tchap - void@void - package maintainer


View this post on Steeve

ngx-steem-keychain 1.1: Buffer Signing and Broadcast Available | Ecency