java-bigchaindb-driver
java-bigchaindb-driver copied to clipboard
Transfer transaction returns Malformed Request Error
i am trying to run sample https://gist.github.com/innoprenuer/d4c6798fe5c0581c05a7e676e175e515
The asset creation working fine, however when i transferred asset, it returns malformed BAD REQUEST Transaction failed
I am unable to query (via HTTP API) the transaction ID as well, it throws 404 not found error;
Update:
It turns out, if i use BigchainDbTransactionBuilder like below,
Transaction transferTransaction = BigchainDbTransactionBuilder .init() .operation(Operations.TRANSFER) .addInput("FULLFILLMENT", spendFrom, (EdDSAPublicKey) alice.getPublic()) .addOutput("1", (EdDSAPublicKey) robert.getPublic()) .addAssets(aliceRegisterTx.getAsset().getData(), TreeMap.class) .addMetaData(transferMetadata) .buildAndSign((EdDSAPublicKey) alice.getPublic(), (EdDSAPrivateKey) alice.getPrivate()) .sendTransaction(handleServerResponse());
I notice that operation type is not detected, hence making it populated by default (CREATE), however i tried to create a manual version of transaction building (not using builder a.k.a copy paste the code in builder class) the output was set correctly (TRANSFER) but the main problem still linger.
I compared the json output after send transaction, and no invalid structure spotted
Hi, Did you ever resolve this problem? I am still running into it although sometimes transfer transactions do work. I cannot see a difference in the ones that work and the ones that don't work. Structurally, they are identical. I would appreciate an update just in case... Thanks