Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_account_history in API-0 without login. #105

Closed
vikramrajkumar opened this issue Jan 17, 2017 · 3 comments
Closed

get_account_history in API-0 without login. #105

vikramrajkumar opened this issue Jan 17, 2017 · 3 comments
Assignees
Labels

Comments

@vikramrajkumar
Copy link
Contributor

From @jabbabts on October 22, 2015 18:39

It would be very useful if possible, to make get_account_history available over the stateless API-0 RPC.
That way, merchants could check for new transaction over public trusted websockets/api with curl php for example.

Copied from original issue: cryptonomex/graphene#391

@kenCode-de kenCode-de self-assigned this Jan 25, 2017
oxarbitrage added a commit to oxarbitrage/bitshares-core that referenced this issue Jan 27, 2017
requested in: bitshares#105
i tried first to move the original get_account_history function from the
history api to the database api but i had errors in the wallet.cpp so i
decided to make a new call. not sure if this is the way to go or either
the name but function is there and it works just as get_account_history.
@oxarbitrage
Copy link
Member

7872a2f

Commit adds a new function get_account_history_public to the database unprotected api.

Not sure if the name will be accepted but the working is ok:

alfredo@graphene:/bitshares-2$ curl --data '{"jsonrpc": "2.0", "method": "get_account_history_public", "params": ["1.2.17", "1.11.1", 100, "1.11.10"], "id": 1}' http://127.0.0.1:8090/rpc
{"id":1,"result":[{"id":"1.11.5","op":[0,{"fee":{"amount":2105468,"asset_id":"1.3.0"},"from":"1.2.17","to":"1.2.19","amount":{"amount":10000000,"asset_id":"1.3.0"},"memo":{"from":"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","to":"BTS8R8uxctuy7MZt5VSBRhrpaexBT9ww8RHG8Uo6sQXpUdLyrpXtd","nonce":"5766092995874996246","message":"bb9e5df0e80519e6b22f9b95003c388e8b531a1920c37104ac2a12b8a46e1edb"},"extensions":[]}],"result":[0,{}],"block_num":126,"trx_in_block":2,"op_in_trx":0,"virtual_op":18},{"id":"1.11.4","op":[0,{"fee":{"amount":2105468,"asset_id":"1.3.0"},"from":"1.2.17","to":"1.2.18","amount":{"amount":10000000,"asset_id":"1.3.0"},"memo":{"from":"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","to":"BTS6gzoCurkeuv8SEyjDpfoertCVb1TcPM5tuzaBWgdV5pZm6pUnN","nonce":"3460249986655627164","message":"7f2a6e08e1938ed01d16050ab7ce294490697b388d8cd2009ea5e411c52f44f8"},"extensions":[]}],"result":[0,{}],"block_num":126,"trx_in_block":1,"op_in_trx":0,"virtual_op":17},{"id":"1.11.3","op":[5,{"fee":{"amount":514648,"asset_id":"1.3.0"},"registrar":"1.2.17","referrer":"1.2.17","referrer_percent":0,"name":"my-account4","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["BTS6rJg81HQ7TkhteXi7BXfrnoCNxeTYbd3kvy1xgJc8fMk3bUWk9",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["BTS6XAx5VJ1RU8rJNs8C3ypfu9voCCXZU7AtATciSQTpQuxFLxzQW",1]],"address_auths":[]},"options":{"memo_key":"BTS8R8uxctuy7MZt5VSBRhrpaexBT9ww8RHG8Uo6sQXpUdLyrpXtd","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}],"result":[1,"1.2.19"],"block_num":126,"trx_in_block":0,"op_in_trx":0,"virtual_op":16},{"id":"1.11.2","op":[5,{"fee":{"amount":514746,"asset_id":"1.3.0"},"registrar":"1.2.17","referrer":"1.2.17","referrer_percent":0,"name":"my-account33","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["BTS6rJg81HQ7TkhteXi7BXfrnoCNxeTYbd3kvy1xgJc8fMk3bUWk9",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["BTS8ejX61ytQoCytidXDBU9jJsCSjpdexQPxLMzQuTNbnGnZnWCT8",1]],"address_auths":[]},"options":{"memo_key":"BTS84Fm6HfbYyVnX35edcQgVHNJC2Nz8Hxgbu4gu6anYa3Xz8KkiM","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}],"result":[1,"1.2.18"],"block_num":125,"trx_in_block":0,"op_in_trx":0,"virtual_op":9}]}alfredo@graphene:
/bitshares-2$

@xeroc
Copy link
Member

xeroc commented Jan 27, 2017

related:
#223

@oxarbitrage
Copy link
Member

thanks @xeroc. i think #223 made by @elmato cover the subject of this issue the request here was to make a function get_account_history available from api-0.

whatever is the case, the pint is @elmato pull will allow to call by curl to any authenticated function of the api, a lot better.

if someone need yes or yes the function get_account_history in api-0 we can get back to this but as the original question was in 2015 i doubt it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants