Socket
Socket
Sign inDemoInstall

@eosdaq/embed

Package Overview
Dependencies
0
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @eosdaq/embed

Embed EOSDAQ exchange into your website.


Version published
Weekly downloads
20
increased by900%
Maintainers
2
Install size
743 kB
Created
Weekly downloads
 

Readme

Source

@eosdaq/embed

Installation

  npm install @eosdaq/embed
  yarn add @eosdaq/embed

Usage

  1. Initialize eosdaq module
const eosdaq = new Eosdaq(
  'eosdaq', // id of div for iframe to be rendered.
  {
    targetUrl: 'https://eosdaq.com', // Target url to load eosdaq embedding page
    tokens: ['PTI_EOS', 'ARN_EOS'], // Token list that will be traded. An Empty array will show all tokens.
    initialToken: 'KEOS_EOS', // Default selected token.
    theme: 'dark', // Optional. Only 'light' and 'dark' are available.
    locale: 'en' // Optional. 'en', 'cn', 'hk' and 'ko' are available.
  }
);
  1. Login and add callback function for transaction data
  eosdaq.login({
    identity: {
      accounts: [{
        authority: 'active', // eg. 'active', 'owner'
        name: 'xxxxxxxxxxxx12', // Account name
        publickey: 'EOS7M4sXLVtqSDYT8SaGXyqyBASFYaEaqAoucZuB7RaBghv2Bd111', // Account`s public key
      }],
    },
    origin: 'eosdaq.com', // Optional. Your origin to add on memo
    eos, // Optional.
    transactionCb: async (tx) => {
      // Call your transaction function here
      const result = await eos.transaction(tx);
      return result;
    },
  });

or (if you use only Scatter interface)

  const eos = ScatterJS.scatter.eos(network, Eos, {});
  eosdaq.login({
    identity: ScatterJS.identity,
    origin: 'eosdaq.com',
    eos,
  });

In this case, transaction will be excuted in library with eos object.

  1. Logout
  eosdaq.logout();

API

  • changeLanguage(language)
  eosdaq.changeLanguage('en'); // 'en', 'cn', 'hk', 'ko'

FAQs

Last updated on 31 May 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc