Giter Club home page Giter Club logo

Comments (1)

unsystemizer avatar unsystemizer commented on August 24, 2024

Here's some debug info:

bet --source n4D7ndiC4yLZxhAf726uMHXC914sEuUAcg --feed-address mu3FsSTC12dHvUoxr2eEfjmheGRBQZZAdC --bet-type Equal --deadline 2016-12-30T23:59:00 --wager 0.001 --counterwager 0.002 --target-value 1 --expiration 10
  • Request sent to the server in JSON format is below:
{
	"method": "create_bet",
	"params": {
		"encoding": "auto",
		"pubkey": ["0265f9763ea8f857571a003a9c7abddc9875a3dd921dbdb15c1659944869f945cd"],
		"dust_return_pubkey": null,
		"op_return_value": 0,
		"fee_per_kb": 25000,
		"feed_address": "mu3FsSTC12dHvUoxr2eEfjmheGRBQZZAdC",
		"source": "n4D7ndiC4yLZxhAf726uMHXC914sEuUAcg",
		"target_value": 1.0,
		"leverage": 5040,
		"disable_utxo_locks": false,
		"deadline": 1483142340,
		"regular_dust_size": 5429,
		"fee": null,
		"expiration": 10,
		"allow_unconfirmed_inputs": false,
		"bet_type": 2,
		"multisig_dust_size": 7799
	},
	"jsonrpc": "2.0",
	"id": 0
}
  • Gee, it took me a while to find a working method: counterparty-client has several issues here, notably several CLI parameters are passed the wrong way, so they end up completely missing...
  • Below is a working (correct) JSON which can be used to fix the client later.
{
	"method": "create_bet",
	"params": {
		"encoding": "auto",
		"pubkey": ["0265f9763ea8f857571a003a9c7abddc9875a3dd921dbdb15c1659944869f945cd"],
		"dust_return_pubkey": null,
		"op_return_value": 0,
		"fee_per_kb": 25000,
		"feed_address": "mu3FsSTC12dHvUoxr2eEfjmheGRBQZZAdC",
		"source": "n4D7ndiC4yLZxhAf726uMHXC914sEuUAcg",
		"target_value": 1,
		"leverage": 5040,
		"disable_utxo_locks": false,
		"deadline": 1483142340,
		"regular_dust_size": 5429,
		"fee": null,
		"expiration": 10,
		"allow_unconfirmed_inputs": false,
		"bet_type": 2,
		"multisig_dust_size": 7799,
		"wager_quantity": 10000, 
		"counterwager_quantity": 10000
	},
	"jsonrpc": "2.0",
	"id": 0
}

For later reference:

$ sendrawtransaction "0100000001a32bfaf7139dcf7ba01df46d27da28efc73d1587f2c51b187c4466abd27cf205010000006b483045022100e31d6eb835ad7c8f61137000f077eb5011b0ec513feaed32e5adb300f91a27fd02200c8d7d75b06aed8c83e5e0916c4fd11c8be36c08511700b23ff636f96adc830301210265f9763ea8f857571a003a9c7abddc9875a3dd921dbdb15c1659944869f945cdffffffff0335150000000000001976a9149454c911b7016bbd46ecf0911a516dfcec63828b88ac0000000000000000346a32cc36dee446f28935abec0cfd6099d198ac7c42fa5b697033243a95b0b78eee0ce9d866e51bfc94ce2b4383b7bb54fa5e02d5ec2c8d00000000001976a914f8eb547223b286af4c069845bab650951de0ba8988ac00000000"
Hash: fce352bdbfd13f64123ac7085fe94adab0d9653e895a9d0764868f92f9d505cd

from counterparty-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.