Using Eos Instance

Using Eostock, users can directly sign using Eosock without entering their private key.

The directions are the same as for the exisiting eosjs directions.

Directions

As below, in the project you want to connect, set the Eos and network information, which will then create an eos instance.. Without setting this instance keyProvider(private key), you can call forth the api using the saved signature on eostock (Chrome Extension).

const Eos = require('eosjs');
// because you are signing on eostock, do not set keyProvider.
const network = {
httpEndpoint: 'https://kylin.eoscanada.com',
chainId: '5fff1dae8dc8e2fc4d5b23b2c7665c97f9e9d8edf2b6485a86ba311c25639191',
};
const eos = window.eosTock.eos(network, Eos);

Example

eos.transaction({
actions: [
{
account: 'eosio.token',
name: 'transfer',
authorization: [{
actor: `${from account}`,
permission: 'active'
}],
data: {
from: `${from account}`,
to: `${to account}`,
quantity: '1.0000 EOS',
memo: 'test transaction!'
}
}
]});