Provides third parties interface to sign transactions without knowing private keys or having any user account privileges.
Extension injects into web page script which creates programming interface to interact with steem blockchain. No calculation are being done in injected script! Script communicates with extension which performs calculations. Web page javascript thread is being releived from complex cryptographic computations.
Project used "Extension Boilerplate" at its preliminary setup: https://github.com/EmailThis/extension-boilerplate
https://chrome.google.com/webstore/detail/steem-secure-login/lppkoakaoipaonmeedlcgnlolngopbgo
https://addons.mozilla.org/en-US/firefox/addon/steem-secure-login
(6.14.2018) Waiting for extension approval
-
Login through the popup into extension.
-
Open developer console (in chrome F12)
-
Type for example this line of code:
SteemSecure.broadcast.transfer("bartosz546", "1.000 STEEM", "", function(err,res){console.log(err,res)});
This line will send 1 STEEM to bartosz546 transaction signing proccess wil take place deep into the extension. Browser does not have access to it.
Extension extends 'window' property of the browser with SteemSecure interface, it moves all computatiations to another javascript thread relieving webpage javascript thread. After you install extension in your browser SteemSecure interface will be automatically added, you don't need to do anything more. SteemSecure interface is similar to steem-js library interface, if you encounter problem with some method functionality you can safely look for similar problem solution for steem-js method.
These methods let you listen on moment when the user login or logout from the extension
SteemSecure.authentication.subscribeOnLogin(function(username){
console.log(username);
});
SteemSecure.authentication.unSubscribeOnLogin(function(username){
console.log(username);
});
SteemSecure.authentication.subscribeOnLogout(function(){
});
SteemSecure.authentication.unSubscribeOnLogout(function(username){
console.log(username);
});
SteemSecure.authentication.isUserLoggedIn(function(isLoggedIn, username){
console.log(isLoggedIn, username);
//example: true, bartosz546
});
Default config should work with steem. however you can change it to work with golos as
SteemSecure.api.setOptions({ url: 'wss://ws.golos.io' }); // assuming websocket is work at ws.golos.io
SteemSecure.config.set('address_prefix','GLS');
SteemSecure.config.set('chain_id','782a3039b478c839e4cb0c941ff4eaeb7df40bdd68bd441afd444b9da763de12');
SteemSecure.config.set('address_prefix','STM');
SteemSecure.config.get('chain_id', function(err, res){
console.log(err, result);
});
SteemSecure.api.getTrendingTags(afterTag, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByTrending(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByCreated(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByActive(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByCashout(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByPayout(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByVotes(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByChildren(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByHot(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByFeed(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByBlog(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByComments(query, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getBlockHeader(blockNum, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getBlock(blockNum, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getState(path, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getTrendingCategories(after, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getBestCategories(after, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getActiveCategories(after, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getRecentCategories(after, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getConfig(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDynamicGlobalProperties(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getChainProperties(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getFeedHistory(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getCurrentMedianHistoryPrice(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getHardforkVersion(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getNextScheduledHardfork(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getRewardFund(name, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getVestingDelegations(account, from, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getKeyReferences(key, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getAccounts(names, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getAccountReferences(accountId, function(err, result) {
console.log(err, result);
});
SteemSecure.api.lookupAccountNames(accountNames, function(err, result) {
console.log(err, result);
});
SteemSecure.api.lookupAccounts(lowerBoundName, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getAccountCount(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getConversionRequests(accountName, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getAccountHistory(account, from, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getOwnerHistory(account, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getRecoveryRequest(account, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getOrderBook(limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getOpenOrders(owner, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getLiquidityQueue(startAccount, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getTransactionHex(trx, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getTransaction(trxId, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getRequiredSignatures(trx, availableKeys, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getPotentialSignatures(trx, function(err, result) {
console.log(err, result);
});
SteemSecure.api.verifyAuthority(trx, function(err, result) {
console.log(err, result);
});
SteemSecure.api.verifyAccountAuthority(nameOrId, signers, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getActiveVotes(author, permlink, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getAccountVotes(voter, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getContent(author, permlink, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getContentReplies(author, permlink, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getDiscussionsByAuthorBeforeDate(author, startPermlink, beforeDate, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getRepliesByLastUpdate(startAuthor, startPermlink, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getWitnesses(witnessIds, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getWitnessByAccount(accountName, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getWitnessesByVote(from, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.lookupWitnessAccounts(lowerBoundName, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getWitnessCount(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getActiveWitnesses(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getMinerQueue(function(err, result) {
console.log(err, result);
});
SteemSecure.api.getFollowers(following, startFollower, followType, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getFollowing(follower, startFollowing, followType, limit, function(err, result) {
console.log(err, result);
});
SteemSecure.api.getFollowCount(account, function(err, result) {
console.log(err, result);
});
SteemSecure.api.broadcastTransactionSynchronous(trx, function(err, result) {
console.log(err, result);
});
SteemSecure.api.broadcastBlock(b, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.accountCreate(wif, fee, creator, newAccountName, owner, active, posting, memoKey, jsonMetadata, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.accountCreateWithDelegation(wif, fee, delegation, creator, newAccountName, owner, active, posting, memoKey, jsonMetadata, extensions, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.delegateVestingShares(delegatee, vesting_shares, function(err, result) {
console.log(err, result);
});
//Delegates about 4.920 STEEM to Bartosz546
SteemSecure.broadcast.delegateVestingShares("bartosz546", "10000.000000 VESTS", function(e,r){console.log(e,r)});
SteemSecure.broadcast.accountUpdate(owner, active, posting, memoKey, jsonMetadata, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.accountWitnessProxy(proxy, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.accountWitnessVote(witness, approve, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.challengeAuthority(challenged, requireOwner, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.changeRecoveryAccount(accountToRecover, newRecoveryAccount, extensions, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.comment(parentAuthor, parentPermlink, permlink, title, body, jsonMetadata, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.commentOptions(permlink, maxAcceptedPayout, percentSteemDollars, allowVotes, allowCurationRewards, extensions, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.commentPayout(permlink, payout, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.commentReward(permlink, sbdPayout, vestingPayout, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.convert(requestid, amount, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.curateReward(reward, commentAuthor, commentPermlink, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.custom(requiredAuths, id, data, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.customBinary(id, data, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.customJson(requiredAuths, requiredPostingAuths, id, json, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.deleteComment(permlink, function(err, result) {
console.log(err, result);
//Delete post or comment with permlink: "re-comment-bartosz546-test-steem-secure"
SteemSecure.broadcast.deleteComment("re-comment-bartosz546-test-steem-secure", function(e,r){console.log(e,r)});
});
SteemSecure.broadcast.escrowDispute(to, agent, who, escrowId, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.escrowRelease(to, agent, who, receiver, escrowId, sbdAmount, steemAmount, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.escrowTransfer(to, agent, escrowId, sbdAmount, steemAmount, fee, ratificationDeadline, escrowExpiration, jsonMeta, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.feedPublish(exchangeRate, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.pow2(work, newOwnerKey, props, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.fillConvertRequest(requestid, amountIn, amountOut, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.fillOrder(currentOrderid, currentPays, openOwner, openOrderid, openPays, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.fillVestingWithdraw(toAccount, withdrawn, deposited, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.interest(interest, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.limitOrderCancel(orderid, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.limitOrderCreate(orderid, amountToSell, minToReceive, fillOrKill, expiration, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.limitOrderCreate2(orderid, amountToSell, exchangeRate, fillOrKill, expiration, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.liquidityReward(payout, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.pow(worker, input, signature, work, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.proveAuthority(requireOwner, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.recoverAccount(newOwnerAuthority, recentOwnerAuthority, extensions, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.reportOverProduction(firstBlock, secondBlock, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.requestAccountRecovery(accountToRecover, newOwnerAuthority, extensions, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.escrowApprove(to, agent, who, escrowId, approve, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.setWithdrawVestingRoute(toAccount, percent, autoVest, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.transfer(to, amount, memo, function(err, result) {
console.log(err, result);
// Send 0.001 STEEM to bartosz546
SteemSecure.broadcast.transfer("bartosz546", "0.001 STEEM", "Steem Secure", function(e,r){console.log(e,r)});
});
SteemSecure.broadcast.transferToVesting(to, amount, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.vote(author, permlink, weight, function(err, result) {
console.log(err, result);
});
//Vote with 100% power on bartosz546 post
SteemSecure.broadcast.vote("bartosz546", "re-bartosz546-bartosz546-test-steem-secure-20180601t165611870z", 10000, function(e,r){console.log(e,r)});
SteemSecure.broadcast.withdrawVesting(vestingShares, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.witnessUpdate(url, blockSigningKey, props, fee, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.fillVestingWithdraw(toAccount, withdrawn, deposited, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.fillOrder(currentOrderid, currentPays, openOwner, openOrderid, openPays, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.fillTransferFromSavings(to, amount, requestId, memo, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.commentPayout(permlink, payout, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.transferToSavings(to, amount, memo, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.transferFromSavings(requestId, to, amount, memo, function(err, result) {
console.log(err, result);
});
SteemSecure.broadcast.cancelTransferFromSavings(requestId, function(err, result) {
console.log(err, result);
});
var parentAuthor = 'ned';
var parentPermlink = 'a-selfie';
steem.formatter.commentPermlink(parentAuthor, parentPermlink, function(err,commentPermlink){
console.log(commentPermlink);
// => 're-ned-a-selfie-20170621t080403765z'
});
SteemSecure.formatter.estimateAccountValue(account, function(err,steemPower){
console.log(steemPower);
);
SteemSecure.formatter.reputation(amount, function(err,reputation){
console.log(reputation);
});
/**
*Example:
*/
SteemSecure.formatter.reputation(2684375104736, function(err,reputation){
console.log(reputation);
// => 56
});
var steemPower = SteemSecure.formatter.vestToSteem(vestingShares, totalVestingShares, totalVestingFundSteem, function(err,reputation){
console.log(steemPower);
});