New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@coolwallets/eos

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coolwallets/eos

EOS Application API for CoolWalletS

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

CoolWalletS EOS App

EOS API of CoolWalletS.

version

Install

npm install @coolwallets/eos

Usage

import cwsEOS from '@coolwallets/eos';

const chainId = 'e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473';
const EOS = new cwsEOS(transport, appPrivateKey, appId, chainId);

The chain id is default to mainnet: aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906.

Get EOS PublicKey

Before broadcasting a transaction, you may need to get the public keys from CoolWalletS and use them to crate a EOS account.

let rawPublicKey = cwsEOS.getPublicKey(0)
// 026ab43c28d98963700ee8177f3f6d4e21e1c238fcf9bfb8de992299dd309c34f1

You have to use eosjs-ecc to convert the raw public key to the EOS-prefixed format.

import { PublicKey } from 'eosjs-ecc'
const EOSPublicKey = await PublicKey.fromHex(rawPublicKey).toString();

console.log(EOSPublicKey)
// EOS5hUxwCqCZCLbRsKsRMng6xYgMUpCw5HKhVDEmW48nXNrCxd8Dw

Sign Transaction

CoolWalletS currently only support signing transaction with single eos transfer action.


const tx = {
  expiration: 1555921263,
  ref_block_num: 25384,
  ref_block_prefix: 3136891093,
  max_net_usage_words: 0,
  max_cpu_usage_ms: 0,
  delay_sec: 0,
  data: {
    from: "coolbitxeos1",
    to: "ilovechicago",
    quantity: "0.0011 EOS",
    memo: "no memo",
  }
}


let signature = await cwsEOS.signTransaction(tx, 0)


Keywords

FAQs

Package last updated on 06 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc