Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - madforstrength

Pages: 1 [2] 3
16
Technical Support / Re: Issues in decrypting MEMO
« on: February 03, 2016, 10:26:51 am »
Ok I have tried everything now :(

I have used get_private_key but its giving error because:
Quote
The private key must already be in the wallet.

I have also tried get_account_history, it is showing me the transactions but with error:
Quote
Memo is encrypted to a key BTS81JWvhxW5YQ52rDC2fzCddi3BopYrEtT2qza3qu55s7iFAjLLo not in this wallet.

Now I guess there is no way I can get someone's private key programmatically. :(

Would appreciate if someone can verify this or identify any other method to get the private key of any account through api or wallet.
Thanks

17
Technical Support / Re: Issues in decrypting MEMO
« on: February 03, 2016, 07:30:12 am »
Technically, the memokey can be obtained via RPC call to the cli wallet, but if your merchant app is able to read a qr code, i would recommend to let the mrchant scan the memo priv key instead

Sorry @xeroc I can't understand above point. What do you mean by let the merchant scan the memo priv key? DO you mean let the merchant enter the memo priv key?

18
Technical Support / Re: Issues in decrypting MEMO
« on: February 03, 2016, 07:16:07 am »
@xeroc Can I ask the merchants for private key? won't they be hesitating in entering their private?

This will make my job a lot easier, but I dont know if it will be acceptible or not, as private keys are confidential.

Well right now I have established a trusted node on my local machine

here: https://github.com/bitshares/bitshares-2 I found:
Quote
Is there a way to allow external program to drive cli_wallet via websocket, JSONRPC, or HTTP?

Yes. External programs may connect to the CLI wallet and make its calls over a websockets API. To do this, run the wallet in server mode, i.e. cli_wallet -s "127.0.0.1:9999" and then have the external program connect to it over the specified port (in this example, port 9999).

If it is possible to create a websocket for CLI wallet then I can simply call this socket from my application and use either get_transaction_history or get_private_key

Am i right?

19
Technical Support / Re: Issues in decrypting MEMO
« on: February 03, 2016, 04:12:08 am »
@monsterer I am building an app that will enable a merchant to allow his customers to pay through smartcoins. So my app will be used by many different merchants all he need to do is enter his bitshares account name and select the currency which he wants to accept.

@xeroc I cant just hard code my private key in the application because every merchant will have his own key. So in order to decrypt the memo of transaction sent to a specific merchant i need the private key of this merchant mine will not be able to decrypt it :(

20
Technical Support / Re: Issues in decrypting MEMO
« on: February 02, 2016, 11:15:48 am »
@xeroc Thanks buddy but get_private_key is not available in DATABASE API :(

Now the only option I can think of is creating a full node of my own and write a wrapper that will take my API calls and return me my desired information.

is there any other way?

21
Technical Support / Re: Issues in decrypting MEMO
« on: February 02, 2016, 09:16:23 am »
@monsterer I understand that, but the problem is I dont have receiver's private key, so can I get it through API call or is there any other method which do not require private key for decrypting memo?

22
Technical Support / Re: Issues in decrypting MEMO
« on: February 02, 2016, 04:37:38 am »
@xeroc lemme explain what I am doing,

Well I am working on developing a payment gateway for bitshares in my project, I have created the invoice successfully, now when a user makes payment then he is redirected to my url along with block and transaction numbers.

I then call API with this data to get the whole transaction.
E.g.
Code: [Select]
{"id":1,"method":"get_transaction","params":[3153947,0]}
The API returns me transaction details like (to, from, amount and memo). but memo is encrypted :(

So I call the API again for getting the account to which payment was made.
E.g. 
Code: [Select]
{"id":1,"method":"get_accounts","params":[["1.2.96993"]]}
I extract the memo key from options and then use this memo key as wif key in your code but still getting the following error:

Code: [Select]
Traceback (most recent call last):
  File "memo/memo_test.py", line 11, in <module>
    priv = PrivateKey(wifkey)
  File "/home/developer03/.local/lib/python3.4/site-packages/graphenelib-0.3rc1-py3.4.egg/graphenebase/account.py", line 249, in __init__
  File "/home/developer03/.local/lib/python3.4/site-packages/graphenelib-0.3rc1-py3.4.egg/graphenebase/account.py", line 258, in compressedpubkey
  File "/usr/local/lib/python3.4/dist-packages/ecdsa/keys.py", line 149, in from_string
    assert len(string) == curve.baselen, (len(string), curve.baselen)
AssertionError: (33, 32)

23
Technical Support / Re: Issues in decrypting MEMO
« on: February 01, 2016, 12:24:36 pm »
@xeroc yes I am using the same script you mentioned.
Actually my application does not store merchants private key, is there anyway I can get it through API call?

This is the exact script I am using

Code: [Select]
wifkey = "BTS81JWvhxW5YQ52rDC2fzCddi3BopYrEtT2qza3qu55s7iFAjLLo"
from graphenebase import Memo, PrivateKey, PublicKey
memo = {
                        "from": "BTS8citBkJYULm8oRsscFbU277GwPMm2NaELESncQqBgynyoKeFK8",
                        "to": "BTS81JWvhxW5YQ52rDC2fzCddi3BopYrEtT2qza3qu55s7iFAjLLo",
                        "nonce": "8864538374045458127",
                        "message": "47db5a59f700b4df2ab7fdcafe638404"
                    }
priv = PrivateKey(wifkey)
pub = PublicKey(memo["from"], prefix="GPH")
dec = decode_memo(priv, pub, memo["nonce"], memo["message"])
print(dec)

And it is giving me this error:
Code: [Select]
Traceback (most recent call last):
  File "memo/memo_test.py", line 11, in <module>
    priv = PrivateKey(wifkey)
  File "/home/developer03/.local/lib/python3.4/site-packages/graphenelib-0.3rc1-py3.4.egg/graphenebase/account.py", line 249, in __init__
  File "/home/developer03/.local/lib/python3.4/site-packages/graphenelib-0.3rc1-py3.4.egg/graphenebase/account.py", line 258, in compressedpubkey
  File "/usr/local/lib/python3.4/dist-packages/ecdsa/keys.py", line 149, in from_string
    assert len(string) == curve.baselen, (len(string), curve.baselen)
AssertionError: (33, 32)

24
Technical Support / Re: Issues in decrypting MEMO
« on: February 01, 2016, 11:16:17 am »
Hi xeroc,

Thanks for your help buddy. Well I am using API to get the transaction to the merchant's account.

I have tried the memo_key found in options returned when we use "get_accounts" to fetch account details but now I am getting this error:

Quote
--cannot decode-- (33, 32)

Also "get_account_history" is not available in database API and I can't use CLI for this due to nature of my application.

25
Technical Support / Issues in decrypting MEMO
« on: February 01, 2016, 10:28:41 am »
Hello Again Guyz,

Today I am having issue in decrypting the memo of transaction.

Firstly our application is on python2.7 so we cant just install python-graphenelib and use it.

Secondly even if I am installing it on my local machine when I ran memo_decode it gave me
Quote
--cannot decode-- Error loading Base58 object

So ideally I would be glad to know if there is some API that can decrypt the memo for me ;)

Or is there any script that uses python 2.7 to decrypt memo?

Or if none of the above than how can I resolve base58 issue? :(

Thanks and Regards

26
Technical Support / Re: Issue in creating QR code for transfer
« on: January 28, 2016, 06:40:22 am »
I have successfully created the QR code, Actually I was creating qr code of whole URL, instead I had to create QR code for base58BLOB only, the generated qr code is workinf perfectly fine in bitshares android app. :)

27
Technical Support / Re: Issue in creating QR code for transfer
« on: January 28, 2016, 06:19:35 am »
I have found the issue,  the JSON itself was the culprit I was missing currency field in json. My Updated json is:
Code: [Select]
{
    "to": "mbilal-knysys",
    "to_label": "mbilal",
    "currency": "BTS",
    "memo": "Invoice #1234",
    "line_items": [
        {"label": "Something to Buy", "quantity": 1, "price": "10.00"},
        {"label": "10 things to Buy", "quantity": 10, "price": "1.00"}
    ],
    "note": "Something the merchant wants to say to the user",
    "callback": "https://merchant.org/complete"
}

Which yields: https://bitshares.openledger.info/#/invoice/k5ZHx7oUHxkaQngisvbCpSt3WiJikU6yvsjeSTD4uREZHyHn1bFon7AurvNFBMf3kS9JChEwKpUm7e1B6qyyWCEtdwBodQVPg7Mo88KQRZYHFnJLk3ctekS2thANt18rrx26dRupNGAsx34b5o4Pt6RS3GyFDesurqYHqMCo1ECondoDhXMAvLQB2LwTYH3okHaVQke6qYAL9z8wjYSTVg9hpEgr5vgpwLFCQ3QdybuUXUryDyVsqn1KtBiKLdzFewofwk1zWz3dnwUWtScSqhoCbCmvVNo8oh4uZCetgVLQwoM


This url is working perfectly fine.

Now when i create its QR code and scan it in bitshares android app found at: https://bitsharestalk.org/index.php/topic,20762.msg268174.html#msg268174

The app is not reading the QR correctly. SO how can i generate a QR code that can be used in bitshares android app?

28
Technical Support / Issue in creating QR code for transfer
« on: January 28, 2016, 05:38:03 am »
Hi again Guyz,

I am following this link https://github.com/cryptonomex/graphene/wiki/Wallet%20Merchant%20Protocol to create payment request.

I have created this JSON:
Code: [Select]
{
   "to" : "mbilal-knysys",
   "to_label" : "mbilal",
   "memo" : "Invoice #1234",
   "line_items" : [
        { "label" : "Something to Buy", "quantity": 1, "price" : "10.00 BTS" }
    ],
    "note" : "test payment",
    "callback" : "https://merchant.org/complete"
}

Then used http://nmrugg.github.io/LZMA-JS/demos/advanced_demo.html to compress it to:
Code: [Select]
5d 00 00 00 02 0d 01 00 00 00 00 00 00 00 3d 82
80 18 fb a3 18 e3 e9 d3 0e 4b de 31 cc 45 63 09
5a 31 0f c4 90 89 9d 56 e5 f9 a3 9b ec 81 6c 21
bc 44 ac c6 ba 95 3d 85 65 e0 26 e2 e8 f7 7d 93
af 5b a8 10 b9 1e 24 6c 71 3d 91 ff b1 25 91 1f
a9 ad 85 5e f5 21 c2 84 79 57 e3 ab fa 67 01 56
81 f1 6e 01 3d da 73 c8 ce 1a 3e 22 d7 2c 22 01
3e c4 2e ff b7 8f b9 b4 b5 d8 9f a3 23 c2 9c 8f
2f 08 b6 2d 01 63 88 01 70 f9 fe a8 35 e0 d4 85
7b 74 7b 68 15 cc 75 92 08 86 c4 56 0d 41 af 73
4a 11 fa df ce 14 34 80 81 d8 f7 d0 e8 61 d4 58
72 bc d7 1f 8a 04 0f 83 99 a8 74 13 fb db df 77
63 7b ea ae 64 ab e2 25 c9 d6 16 36 ff 35 ee 40
00

Then used http://lenschulwitz.com/base58 for base58 encoding:
Code: [Select]
32BKKahCswNpnquiVorvDuAz6SWDRUWmGP9SaCX1AwF1mSKM1nebRmkpSjymMgiNCZEbrRgVyFKaZbWLReANgfDn6qw9tcJS53ubkbx4EMPwZCpVMzxRPQu2deGqCdEw77mxhi1BAwigcTp3UbZv8vGMXZFMKmMzSfheQJLyJe36CHPjpJCcbd73kVVwnaxXJb674WdshZvc1MgJsnvinnGtqjx59MVve1Whh2t4mGPQXXjbYea4uSzAVn8Yf1Cy5YQxXKC9AVdRUfEMdjfs13CjfSP9YT

Now when I am visiting https://bitshares.openledger.info/#/invoice/32BKKahCswNpnquiVorvDuAz6SWDRUWmGP9SaCX1AwF1mSKM1nebRmkpSjymMgiNCZEbrRgVyFKaZbWLReANgfDn6qw9tcJS53ubkbx4EMPwZCpVMzxRPQu2deGqCdEw77mxhi1BAwigcTp3UbZv8vGMXZFMKmMzSfheQJLyJe36CHPjpJCcbd73kVVwnaxXJb674WdshZvc1MgJsnvinnGtqjx59MVve1Whh2t4mGPQXXjbYea4uSzAVn8Yf1Cy5YQxXKC9AVdRUfEMdjfs13CjfSP9YT

It is showing
Quote
Asset is not supported by this blockchain.

I have tried many different assets and json but got same result.

I would appreciate if anyone can point me in right direction.

Thanks

29
Technical Support / How bitshares transactions work in real life
« on: January 27, 2016, 05:21:34 am »
Hi guyz,

I am developing a payment gateway to integrate bitshares in a project. I want to understand how the bitshares transactions will work in real life.

Like A customer comes to purchase a product whose price is $150 now customer wants to pay with bitEUR or any other bitshares currency.

How will transaction work? like should I convert first $150 to bts and then bts to bitEUR?

if yes how can I do that with the API?
I can convert bts to bitEUR or any other cryptocurrency as mentioned by @xeroc in https://bitsharestalk.org/index.php/topic,21177.0.html

But how do I get the bts equivalent of real life 150USD through api?

Or am i missing something?

30
Technical Support / Re: Does cryptofresh.com has any API?
« on: January 20, 2016, 11:04:18 am »
@abit yes I am doing it deliberately.

Pages: 1 [2] 3