Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: can anybody help for build light wallet?  (Read 639 times)

Offline alt

can anybody help for build light wallet?
« on: May 26, 2015, 03:01:22 AM »

I want to change https://wallet.btsbots.com to light wallet server
can anybody help me what should I do?
how to use the BTS JS lib for browser?
what service should implement for the light wallet server?
many thanks!

Offline sudo

  • Hero Member
  • *****
  • Posts: 2189
    • View Profile
  • BTS: ags
Re: can anybody help for build light wallet?
« Reply #1 on: May 26, 2015, 07:05:03 AM »
 +5% +5%
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 11963
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: can anybody help for build light wallet?
« Reply #2 on: May 26, 2015, 07:13:42 AM »
I don't know anything about the lightwallet server .. but I did try around with the bts-js library .. you can see the wallet/ecc stuff in action here:
https://delegate.xeroc.org/paperwallet.html
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline alt

Re: can anybody help for build light wallet?
« Reply #3 on: May 26, 2015, 09:00:57 AM »
I don't know anything about the lightwallet server .. but I did try around with the bts-js library .. you can see the wallet/ecc stuff in action here:
https://delegate.xeroc.org/paperwallet.html
This is what I want, thank you so much  :D

Offline alt

Re: can anybody help for build light wallet?
« Reply #4 on: May 27, 2015, 03:14:24 PM »
I have change to light wallet.
now I can import private key, get account, get balance, get transaction
try here: https://wallet.btsbots.com

work to do:
1. get memo, and send account. I still don't know how to do this with the JS lib. how to get the sender's info which is not public account?
and how to decrypt the meo
2. transfer. still don't know how to do, if bob want to transfer to Alice, what's the step?
1) he need to get public key of Alice  from server?
2)  build the transaction, and signify?
3) broadcast by server?

Offline alt

Re: can anybody help for build light wallet?
« Reply #5 on: May 29, 2015, 01:04:52 AM »
a new question, how to use faucet.bitshares.org?

I saw wallet.bitshares.org request a url like this:
https://faucet.bitshares.org/?account_name=Guest&active_key=BTS8DvM...KHCHaj3y6tU5&owner_key=BTS8DvM...KHCHaj3y6tU5&app_id=0

why active_key is not complete, and account_name always Guest, and what means app_id?
too many questions, Thanks!

Offline alt

Re: can anybody help for build light wallet?
« Reply #6 on: May 29, 2015, 05:59:46 AM »
I need a js library for these functions, who can help me, thanks

1. build transfer transaction
input: sender's private key, sender's balance info, receiver's public key, and transfer amount, asset info, memo, fee info
output: json data with sender's signed , which can broadcast with API: blockchain_broadcast_transaction

2. build market transaction, bid/ask
input: sender's private key, sender's balance info, bid/ask, price, amount, fee info
output: json data with sender's signed , which can broadcast with API: blockchain_broadcast_transaction

3. decrypt a transfer transaction
input: transaction json data from api blockchain_list_address_balances
output: decrypt memo, and sender's info

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 11963
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: can anybody help for build light wallet?
« Reply #7 on: May 29, 2015, 07:33:13 AM »
I need a js library for these functions, who can help me, thanks

1. build transfer transaction
input: sender's private key, sender's balance info, receiver's public key, and transfer amount, asset info, memo, fee info
output: json data with sender's signed , which can broadcast with API: blockchain_broadcast_transaction

2. build market transaction, bid/ask
input: sender's private key, sender's balance info, bid/ask, price, amount, fee info
output: json data with sender's signed , which can broadcast with API: blockchain_broadcast_transaction

3. decrypt a transfer transaction
input: transaction json data from api blockchain_list_address_balances
output: decrypt memo, and sender's info


1. and 2. should be possible already with the bitshares-js library because that's what wallet.bitshares.org does
take a look here:
https://github.com/BitShares/BitShares-JS/blob/master/src/wallet/transaction_builder.coffee#L475-L514
The lower level code (ie. signing and constructing) is done with the classes here:
https://github.com/BitShares/BitShares-JS/tree/master/src/blockchain

for reference you can take a look at my python code for deposits (market order not available yet):
https://github.com/xeroc/python-bitsharestools/blob/master/bitsharestools/transactions.py#L365-L381
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline monsterer

Re: can anybody help for build light wallet?
« Reply #8 on: May 29, 2015, 09:26:17 AM »
I don't think memo's work yet for public accounts, do they?
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 11963
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: can anybody help for build light wallet?
« Reply #9 on: May 29, 2015, 09:33:33 AM »
I don't think memo's work yet for public accounts, do they?
why shouldn't they?
The key used to encrypt the public memo is just the public key of the account instead of a TITAN derived public key ..
Not sure if the client does it correctly already though
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline alt

Re: can anybody help for build light wallet?
« Reply #10 on: May 29, 2015, 09:36:46 AM »
yes, I am learning from your python script  :)
but for js coffee, It's really hard for me, I can't understand it totally  :(

and can you add memo for your python code?
maybe I will learn js, and write a js version from your python script.

I need a js library for these functions, who can help me, thanks

1. build transfer transaction
input: sender's private key, sender's balance info, receiver's public key, and transfer amount, asset info, memo, fee info
output: json data with sender's signed , which can broadcast with API: blockchain_broadcast_transaction

2. build market transaction, bid/ask
input: sender's private key, sender's balance info, bid/ask, price, amount, fee info
output: json data with sender's signed , which can broadcast with API: blockchain_broadcast_transaction

3. decrypt a transfer transaction
input: transaction json data from api blockchain_list_address_balances
output: decrypt memo, and sender's info


1. and 2. should be possible already with the bitshares-js library because that's what wallet.bitshares.org does
take a look here:
https://github.com/BitShares/BitShares-JS/blob/master/src/wallet/transaction_builder.coffee#L475-L514
The lower level code (ie. signing and constructing) is done with the classes here:
https://github.com/BitShares/BitShares-JS/tree/master/src/blockchain

for reference you can take a look at my python code for deposits (market order not available yet):
https://github.com/xeroc/python-bitsharestools/blob/master/bitsharestools/transactions.py#L365-L381

Offline monsterer

Re: can anybody help for build light wallet?
« Reply #11 on: May 29, 2015, 09:51:18 AM »
why shouldn't they?

Quote
help wallet_account_register
Usage:
wallet_account_register <account_name> <pay_from_account> [public_data] [delegate_pay_rate] [account
_type]   Updates the data published about a given account
Updates the data published about a given account

Parameters:
  account_name (account_name, required): the account that will be updated pay_from_account (account_name, required): the account from which fees will be paid
  public_data (json_variant, optional, defaults to null): public data about the account
  delegate_pay_rate (uint8_t, optional, defaults to -1): -1 for non-delegates; otherwise the percent of delegate pay to accept per produced block
  account_type (string, optional, defaults to "titan_account"): titan_account | public_account - public accounts do not receive memos and all payments are made to the active key

Returns:
  transaction_record

aliases: register
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 11963
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: can anybody help for build light wallet?
« Reply #12 on: May 29, 2015, 09:51:34 AM »
yes, I am learning from your python script  :)
but for js coffee, It's really hard for me, I can't understand it totally  :(
Same here :|

Quote
and can you add memo for your python code?
maybe I will learn js, and write a js version from your python script.
I used the JS code as reference too ...
however, I fear I currently don't have the time to do the Memo in python .. just now ..
Will come eventually ..
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 11963
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: can anybody help for build light wallet?
« Reply #13 on: May 29, 2015, 09:52:36 AM »
why shouldn't they?

Quote
help wallet_account_register
Usage:
wallet_account_register <account_name> <pay_from_account> [public_data] [delegate_pay_rate] [account
_type]   Updates the data published about a given account
Updates the data published about a given account

Parameters:
  account_name (account_name, required): the account that will be updated pay_from_account (account_name, required): the account from which fees will be paid
  public_data (json_variant, optional, defaults to null): public data about the account
  delegate_pay_rate (uint8_t, optional, defaults to -1): -1 for non-delegates; otherwise the percent of delegate pay to accept per produced block
  account_type (string, optional, defaults to "titan_account"): titan_account | public_account - public accounts do not receive memos and all payments are made to the active key

Returns:
  transaction_record

aliases: register

The wallet.bitshares.org is the best counter example .. it can only use nonTITAN accounts and yet you can receive a memo .. give it a try ..
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline boombastic

  • Sr. Member
  • ****
  • Posts: 249
    • View Profile
    • AngelShares Explorer
Re: can anybody help for build light wallet?
« Reply #14 on: May 29, 2015, 03:26:27 PM »

a new question, how to use faucet.bitshares.org?

I saw wallet.bitshares.org request a url like this:
https://faucet.bitshares.org/?account_name=Guest&active_key=BTS8DvM...KHCHaj3y6tU5&owner_key=BTS8DvM...KHCHaj3y6tU5&app_id=0

why active_key is not complete, and account_name always Guest, and what means app_id?
too many questions, Thanks!

Incomplete active key is probably a mistake.  Faucet uses those parameters for its workflow.  Basically ask you to identify yourself using social account to prevent spam and help you register your account with the name you want (long free account names).

Anyway, since you are building a light weight wallet for end users, you will probably integrate account registration function into your wallet, especially when BitShares referral program is activated.  You won't want to redirect users to external faucet services.


Sent from my iPhone using Tapatalk
http://bitshares.dacplay.org/r/boombastic
Support My Witness: mr.agsexplorer
BTC: 1Bb6V1UStz45QMAamjaX8rDjsnQnBpHvE8

 

Google+