Sending Cross Currency in Ripple

I have been facing this issue for a while using Ripple JSON RPC, am actually working on a PoC for cross border transaction, as part of my use cases, I need to send transaction in NGN and be received in USD/EUR.

I have read your David Schwartz response here https://forum.ripple.com/viewtopic.php?f=2&t=15980 and here https://forum.ripple.com/viewtopic.php?f=2&t=8079 but still having issues with the transaction

Here is my request

{
"method": "submit",
"params": [
{
"offline": false,
"secret": "sssssssssssssssssssssss",
"tx_json": {
"SendMax" : { "currency" : "USD",
"value" : "200",
"issuer" : "rU3BENzHa5SeB2HnwzovG5wdk7v8ChxXrc"
},
"Account": "rU3BENzHa5SeB2HnwzovG5wdk7v8ChxXrc",
"Amount":{
"value": "100",
"issuer": "rK6qNr9HV62gJPRvKGNen1qHi2LYyHSDvj",
"currency": "NGN"
},
"Destination": "rK6qNr9HV62gJPRvKGNen1qHi2LYyHSDvj",
"TransactionType": "Payment"
},
"fee_mult_max": 10000
}
]
}

and I got this as my response

{
"result": {
"engine_result": "tecPATH_PARTIAL",
"engine_result_code": 101,
"engine_result_message": "Path could not send full amount.",
"status": "success",
"tx_blob": "1200002280000000240000005661D5038D7EA4C680000000000000000000000000004E474E0000000000CD2B28791E0BEB754A75AF8DB99BDEF21DD8D4A968400000000000000A69D5071AFD498D000000000000000000000000000055534400000000007A04D90FD6B8D1400B5CD796391444090AF06C1F7321031810282977B92281325F0AC5DAF4AB7EDB3FBBE5404A38D657E327B1A46B7897744730450221008269F1C23E2C719A73F7F41D484C0577C1EBF496D8BD6009AA975A852C627E7202207FBD5CBA3EF5F5BE7696FAF5C45F2E22BDCEA7FD48BA99D75897BF58C474BD0D81147A04D90FD6B8D1400B5CD796391444090AF06C1F8314CD2B28791E0BEB754A75AF8DB99BDEF21DD8D4A9",
"tx_json": {
"Account": "rU3BENzHa5SeB2HnwzovG5wdk7v8ChxXrc",
"Amount": {
"currency": "NGN",
"issuer": "rK6qNr9HV62gJPRvKGNen1qHi2LYyHSDvj",
"value": "100"
},
"Destination": "rK6qNr9HV62gJPRvKGNen1qHi2LYyHSDvj",
"Fee": "10",
"Flags": 2147483648,
"SendMax": {
"currency": "USD",
"issuer": "rU3BENzHa5SeB2HnwzovG5wdk7v8ChxXrc",
"value": "200"
},
"Sequence": 86,
"SigningPubKey": "031810282977B92281325F0AC5DAF4AB7EDB3FBBE5404A38D657E327B1A46B7897",
"TransactionType": "Payment",
"TxnSignature": "30450221008269F1C23E2C719A73F7F41D484C0577C1EBF496D8BD6009AA975A852C627E7202207FBD5CBA3EF5F5BE7696FAF5C45F2E22BDCEA7FD48BA99D75897BF58C474BD0D",
"hash": "A658DE84ABFED32E0E52FBF02E60FBC81E32C5E6186427C33AEBD938188FE4BB"
}
}
}

I understand that tecPATH_PARTIAL means that the transaction failed because the provided paths did not have enough liquidity to send the full amount.

But I did not specify the path bcos I understand it’s best when ripple choose the path.

I will appreciate any help in right direction

https://bitcoin.stackexchange.com/users/85/david-schwartz

How to suggest to our church that they should accept Bitcoin payments?

A little bit of context: I send 10% of my profit (the tithe) to a church. Along with the tithe I send money for different projects.

I guess they can be considered donations.
This church is a non-profit organization.


Recently I started to get profit in Bitcoin (weekly, I’m paid in Bitcoins for the work I do). It’s not a small amount. Now, obviously, the next idea that came in mind was: how do I send the tithe now?

Since this non-profit does accept other currencies (such as EUR, USD etc) I think it would be a good reason to accept Bitcoin too. Currently it doesn’t and I didn’t talked to them about this.

I’m beginner in understanding Bitcoin, but I know the basics. Most of them are non-technical people and I believe it will be very hard for them to understand how this works. I have to admit I had a lot of questions I had to find answers for as well.

What would be the reasons I should present them to support my plan: sending Bitcoins to this non-profit?


Some things I have in mind:

  • There are quite a few shops that do accept Bitcoins in our country.
  • It’s not controlled by the state or any organization (personally I find this pretty huge, for obvious reasons)
  • Some other people send to this non-profit even things that are not money (e.g. they work with bees and they get a lot of honey, they can choose to send 10% to the church). I think this is a thing that will help them realize a little bit that Bitcoin is a value as well.
  • Since they accept other currencies, why won’t they accept Bitcoins too?
  • Related to the previous one: if I’d convert my Bitcoins in other currencies (e.g. EUR), since the Bitcoin value is still changing quickly it won’t be a stable thing for both parts

Are these good enough to start with? What others points should I present? Given the context, how can I explain them in simple words how this would help?

From my understanding, they will simply have to create a wallet and share an address with the world.

How do I restore a wallet from a backup file in MultiBit HD when you have the words and cloud backup?

I have read this: How do I restore a wallet from a backup file in MultiBit HD?

and have the words and mbhdxxxx.aes files in my cloud storage and the wallet password….

but the next button is not enabled when I enter the words:
enter image description here

update
I have had multibit before the hd client. I have a file like

mbhd-8a659fc1-9acd420e-b2127154-b924c146-3f974bab-20150825115221.zip.aes

in the cloud and have found a file like

mbhd-20160630143523.wallet.aes

I have used decrypt_bitcoinj_seed from github and entered my password and got 12 words to restore. The python script did not work with the long and older filename but did work with the short one. But when I have the words and try to recover it says: no datestamp found. When I use the words to continue and select a folder containing the old long file names it does proceed but with errors. I feel that I am getting closer. But I could use some pointers from people who have more experience with multibit hd and recovery.

enter image description here

I did found a folder in a backup on an external hdd which seems to work, but then I got:

enter image description here

I have had 2 wallets now in Multibit. I have selected the old one and waiting an eternity for the sync to finish. I have now my old wallet value as unconfirmed.
How can I fix this? I have read this. but there is no repair… only recover.

enter image description here

Importing a bunch of btc private keys into bitcoin core, then monitoring and sweeping them all to another address?

I’m trying to build a service where I import a bunch of pirvate keys into bitcoin core or some other software if you recommend a better solution. Once the private keys are imported, I want to monitor these addresses and if anything is positive have it send it to another wallet address I own.

I thought aboout importing the private keys with importprivkey api call. Does it take multiple private keys or do I have to loop through them?

Once these private keys are imported into my wallet I want to be able to detect the occurrence of any of the following:

  • if the entire wallet balance is greater than .001
  • or if 1 hour passes

Then, send all coins in the wallet to another address. My questions are:

  • Is there a service to monitor the bitcoin balance, or do I just have to make a cron job to query it every second?
  • When using sendtoaddress api call, do I have to specify a change address?
  • How do other people usually solve this problem?

Building Signed Bitcoin Transaction in Java

I have been attempting to build my own raw transaction generator in Java which I can then broadcast on the testnet network. The problem is when I attempt to broadcast the transaction it says there is an error in the redemption script, which I do not understand.

Here is an example testnet transaction:

0100000001e468833270cf713f3bbccc62b7b5b0fc0b0a4570608718530816795a6589f322000000008a473044022051646b77924f6bb7c411c5aa890110ab55db8812b8998fe24c8bdce39795ebd602200bc4de18fd5524ad8b946ee57604424e2b943ef2a14fc7199a7853dda0743cbe014104b97c679207532e0f4ee2515aedaba5f87700bbe0138f7457baa58e89a53153823ab29632e6c3c804ecaab5913656512339792479a1b898b7e5dc31f075ff8660ffffffff0176df1710000000001976a91448ddfd3891f3f422d5c3c9c25e35b382667fc6e688ac00000000

The script I am attempting to unlock:

76a91448ddfd3891f3f422d5c3c9c25e35b382667fc6e688ac

With the redemption script being:

473044022051646b77924f6bb7c411c5aa890110ab55db8812b8998fe24c8bdce39795ebd602200bc4de18fd5524ad8b946ee57604424e2b943ef2a14fc7199a7853dda0743cbe014104b97c679207532e0f4ee2515aedaba5f87700bbe0138f7457baa58e89a53153823ab29632e6c3c804ecaab5913656512339792479a1b898b7e5dc31f075ff8660

This is the Java code to sign the reverse double sha256 hash:

  public static byte[] sign(byte[] hash, BigInteger priv){

        ECDSASigner signer = new ECDSASigner(new HMacDSAKCalculator(new SHA256Digest()));
        signer.init(true, new ECPrivateKeyParameters(priv, domain));

        BigInteger[] signature = signer.generateSignature(hash);
        ByteArrayOutputStream s = new ByteArrayOutputStream();

        try {
            DERSequenceGenerator seq = new DERSequenceGenerator(s);
            seq.addObject(new ASN1Integer(signature[0]));
            seq.addObject(new ASN1Integer(signature[1]));
            seq.close();
            return s.toByteArray();
        }
        catch(IOException e){
            return null;
        }
    }

What is wrong?

How can bitcoins be stolen?

I read about Mt. Gox and how 850,000 bitcoins has been “stolen” from it. I do not understand how someone can steal bitcoins: if MtGox has bitcoins, and MrThief wants to use this bitcoins, then MrThief must show a transaction moving bitcoins from MtGox’s accout to MrThief’s account. But such a tranasaction must be signed by the private key of MtGox. Does it mean that, in order to steal bitcoins, MrThief must somehow find the private key of MtGox and sign transactions in its name? Or is there another way by which bitcoins can be stolen?

Good way to test Electrumx?

Has anyone else gotten an electrumx server up and running lately?

I have just gotten to the point where I’m not seeing any errors during “# service electrumx status”, but I’m also not seeing my server listed in my Electrum client.

Can you think of a good way to test whether the server is working?

I would especially hate it if it did appear but still didn’t work! I don’t want anyone to lose money because of me.