Socket
Book a DemoInstallSign in
Socket

eosio-wallets

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eosio-wallets

EOSIO wallets

0.4.3
latest
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

eosio-wallets

Frontend library to handle EOSIO wallets.

Allows to connect/disconnect to Anchor/ScatterJS wallets and push transactions.

Optionally makes possible backend transaction cosigning to pay for user resources.

Install

yarn add eosio-wallets

Configure

import Wallet from "eosio-wallets";

// basic usage
Wallet.init({
    blockchain: "eos",
    appId: "myapp",
});

// cosigner usage
Wallet.init({
    rpcEndpoint: "https://eos.api.eosnation.io",                     // EOSIO RPC endpoint
    chainId: "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906",   // Chain ID
    appId: "myapp",                                         // App ID for wallets
    cosignEndpoint: "https://edge.pomelo.io/api/cosign",    // optional: cosign endpoint
    cosignReferrer: "myapp"                                 // optional: referrer for cosign noop action must adhere    to EOSIO name convention
});

Usage

// connect to wallet ("anchor"/"scatter" protocols allowed)
const account = await Wallet.login(protocol);

// define action
const action = {
    account: 'eosio.token',
    name: 'transfer',
    authorization: [{ actor: 'sender', permission: 'active' }],
    data: { from: 'sender', to: 'receiver', quantity: '0.0001 EOS', memo: 'hello' }
};
// push the action
const cosign = true;
const { transaction_id, processed } = await Wallet.pushTransaction( [action], protocol, cosign );

// disconnect
await Wallet.logout();

Example

  • Demo: https://eosio-wallet.vercel.app/
  • Source code: https://github.com/EOS-Nation/eosio-wallets-ui

FAQs

Package last updated on 23 Feb 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.