Proposal to add STEEM Wallet pack to Scatter to prepare for Steem Engine and SMTs on Scatter Desktop Wallet and on a DEX like Newdex and better external dapp ecosystem compatibility

in #scatter10 months ago (edited)

https://github.com/ackza/walletpack/blob/master/packages/tron/package.json

We need Steem added to SCatter like EOS, Telos, BTC, TRX and ETH are already. We have Wallet pack. we have package.json and we have some code we need to take apart and make work on steem so wallet balances show up, keys are handled and tx can be signed and tokens shown . It is as @ubg calls it "level 50 mafia boss " shit but Im confident someone can do it for the SBD I am asking for here, approx 500 SBD

Heres my old proposal that didnt make it but which may have if I had it going for longer, i need 10 SBD to repost it but, I feel i should just use my own money to pay for this and ask steem to help me in donations After its done and they have a new desktop wallet for steem. Steem's price could skyrocket after I add scatter and get steem on NEWDEX

If we add scatter we can have STEEM on NEWDEX people. NEWDEX..... with SE and SMt tokens. Steem Engine tokens on NEWDEX trading for STEEM..... we can have that if scatter has steem and scatter can have steem if wallet pack has steem support.... and wallet pack just has this folder with a few files and code like this

WalletPack
This is a wallet building SDK which takes care of all of the heavy lifting for creating blockchain wallets.

Currently being used in Scatter Desktop, Scatter Mobile, and Scatter Bridge.

Setup
Install the core plus any blockchains you want to support

npm i -S @walletpack/core @walletpack/eosio @walletpack/ethereum @walletpack/bitcoin @walletpack/tron
Call initialize first.
import WalletPack from '@walletpack/core';

const eventListener = (type, data) => {
console.log('event', type, data);
switch(type){
case 'popout': break;
case 'firewalled': break;
case 'no_certs': break;
}
console.log('event', type, data);
};
WalletPack.initialize(
// --------------------------------------------
// blockchains & blockchain plugins
{
blockchains:{
EOSIO:'eos',
ETH:'eth',
// TRX:'trx',
BTC:'btc',
},
plugins:[
require('@walletpack/eosio').default,
require('@walletpack/ethereum').default,
// require('@walletpack/tron').default,
require('@walletpack/bitcoin').default,
]
},
// --------------------------------------------
// store
{
state:{},
commit:(key, val) => {},
dispatch:(key, val) => {}
},
// --------------------------------------------
// security
{
getSalt:() => '',
get:() => () => '',
set:(_seed) => () => '',
clear:() => () => '',
},
// --------------------------------------------
// framework
{
getVersion:WebHelpers.getVersion,
pushNotification:WebHelpers.pushNotificationMethod(),
},
// --------------------------------------------
// events
eventListener,
// --------------------------------------------
// optionals
{
// Enables websocket based 3rd party app support
socketService:SocketService,

    // Allows you to override private key provision with
    // external services
    publicToPrivate:async publicKey => {
        return false;
    },
    // Allows you to have custom signers instead of key provision, 
    // which means you can sign on completely separate processes instead
    // of giving the private key to the renderer process
    signer:async (network, publicKey, payload, arbitrary = false, isHash = false) => {
      return sign(...);
    }
}

);
Store/state requirements
These properties and methods must be available on the injected store manager.

store:{
state:{
dappLogos:{},
dappData:{},
resources:{},
scatter:null,
balances:{},
prices:{},
history:[],
priceData:{},
},
commit:(key, val) => {},
dispatch:(key, value){},
}
dispatch
This is an action handler that pre-processing commits to the state. An example of these are here (Some of these could possibly be put into the core library)

commit
must be synchronous This is the actual commiter to the state which changes state values. An example of these are here

Reaching blockchain plugins
/src/plugins/defaults/interface.js has common methods between each blockchain plugin. Instead of tapping directly into the plugin itself you can grab the singleton plugin based on the blockchain required and then process methods on it.

import PluginRepository from ...
PluginRepository.plugin(Blockchains.EOSIO).method(...);

Some constants for the docs below:

$API = "https://api.get-scatter.com/v1/"
Services breakdown
These are some of the important services in Scatter, and brief explanations of what they do and how to use them.

Note: All ScatterCore methods are static.

ApiService
This service handles all of the incoming messages from external applications. You should never actually have to handle this service manually in the application, as all of the methods will be called from the messages in the SocketService you provide.

The flow is as follows.

app -> socket -> api handler -> openPopOut -> api handler -> socket -> app

To see a live example of this happening see this And check out also the low level socket service

PriceService
This service (and the price data) keeps itself up to date using a recursive timeout. You should never have to fetch prices manually.

PriceService.getCurrencies()
This fetches the available fiat currency ticker symbols from $API/currencies.

Example result: ["USD","EUR","CNY","GBP","JPY","CAD","CHF","AUD"]
PriceService.getCurrencyPrices()
This fetches the available fiat currency prices from $API/currencies/prices. These are prices in relation to USD.

Example result: {"USD":1,"EUR":0.887901,"CNY":6.877801,"GBP":0.799055,"JPY":107.956006,"CAD":1.304397,"CHF":0.98455,"AUD":1.42273}
PriceService.loadPriceTimelineData()
This fetches a timeline of price data from $API/prices/timeline for the past 24 hours. It will automatically insert the returned data into the state under priceData in the form of {prices, yesterday, today}

PriceService.getTotal(totals, displayCurrency, bypassDisplayToken, displayToken)
Returns formatted totals based on the entire balances inside of a user's accounts.

// Return format

return Token.fromJson({
symbol:this.fiatSymbol(displayCurrency),
amount:total.toFixed(2),
})

// Examples

// Returns the total fiat balance
PriceService.getTotal(BalanceService.totalBalances(false).totals)

// Returns the total token balance
return PriceService.getTotal(BalanceService.totalBalances(false).totals, null, false, state.scatter.settings.displayToken);
PriceService.fiatSymbol(currency = StoreService.get().state.scatter.settings.displayCurrency)
Returns an ascii currency sign ($/¥/€/£) instead of a ticker (USD/CNY/EUR/etc).

AppsService
This service fills itself using the SingletonService which is instantiated once when opening a Scatter wallet. All app data is available on state.dappData

AppsService.getAppData(origin)
Returns formatted data based on the applink (origin/fqdn) of the apps trying to interact with Scatter. If the app doesn't exist on the state.dappData then it will return a formatted result regardless.

// Return structure
{
applink:origin,
type:'',
name:origin,
description:'',
logo:'',
url:'',
}
AppsService.categories(selectedCategory = null)
Returns a list of categories available based on the state.dappData. This is a simple helper method that loops over the dapps and aggregates the .type param.

AppsService.appsByCategory(selectedCategory = null)
Returns all the apps available with a given category.

AppsService.appsByTerm(terms)
Returns all the apps available with a given search terms.

AppsService.linkedApps(terms = '', categoryFilter = null)
Returns all of the apps that are linked in the user's Scatter. These are apps that the user already has permissions for (My Apps).

PermissionService
This service handles everything to do with application permissions, including whitelists. A lot of the handling is internal for the library but below are some methods that will need to be integrated into components.

PermissionService.removeAllPermissions()
Removes every single permission that the user has. This includes all application permissions and whitelists.

PermissionService.removeAllPermissionsFor(origin)
Removes every permission for a given origin/applink

PermissionService.removePermission(permission)
Removes a given permission


hah a lot of work for $100 ? Well, I would do it for free but these skills need money behind them, and steem has already gone so long without paying developers, and I get the whole "go as long as you can without paying employees to see if they just stick around and keep working" but that has its limits.

I will help pay $100 to whoever helps get this done

Here is what Package.json looks like for EOSIO for example

26 lines (26 sloc) 570 Bytes
<{
"name": "@walletpack/eosio",
"version": "0.0.28",
"description": "> TODO: description",
"author": "GetScatter Ltd. 2019",
"homepage": "",
"license": "ISC",
"main": "eosio.js",
"files": [
"dist",
"prepare.js"
],
"scripts": {
"install": "node prepare.js",
"test": "echo "Error: run tests from root" && exit 1"
},
"dependencies": {
"@walletpack/core": "^1.0.24",
"eosjs": "^20.0.0",
"eosjs-ecc": "^4.0.4"
},
"gitHead": "70bd19f93b503618a79eb519eef082bfc40b16d7",
"publishConfig": {
"access": "public"
}

Now please ask @ramijames if you need any extra details but he is pretty busy :) https://t.me/Scatter Or @nsjames and remember, this is all going to add a lot of value to steem and you'll give yourself a great mastering of the stem blockchain

Sort:  

Damn, glad I found this one. Can you explain in few words why this is important? What is scatter? Maybe we can get some more funds to increase the bounty :)

Loading...

Coin Marketplace

STEEM 0.21
TRX 0.04
JST 0.027
TRX 0.04
STEEM 0.21
JST 0.027
SBD 1.30