Call_jsonrpc_api create_armory_utx

Sorry, we got an error when trying to do the requested action: 'JSON-RPC Error:
Type: Server error

Code: -32000

Message: Got call_jsonrpc_api request error: result is None

’ (API method: create_armory_utx).

If this persists, please click on the question mark button on the top right-hand corner of the screen for support options.

Trying to create and offline tx to send SJCX from offline Armory wallet. I did manage to do this in the past but now have the server error. this is on both counterwallet and coindaddy.

IS there a fix for the problem or can you help me use another service to create the transaction anyone?

Where can i find information on how to create the raw transaction and just send from armory so I dont need to use these wallets?

Thanks,

So this might be related to

Workarounds for Error -3200: “Counterparty database is behind backend.”

Is there any way to know if the server is re-scanning or this is a permanent issue?

I just have to keep trying.

Thanks,

Not sure if your using counterwallet.io or coindaddy.counterwallet.io

If your trying to use armory, you should probably use counterwallet.io… as I have disabled armory-utxsvr on coindaddy.counterwallet.io (it was taking up way too much space for how infrequently it was getting used)

I have exactly the same problem. Have luckily only sent some test assets there so far. But would like to create an outgoing tx.

I would like to move my Computerparty assets from BoO wallet to Armory offline storage. But of course only if it is functional to get the assets out of there again.

Is there anyone who this currently works for? How do you properly do cold storage in Counterparty? Can the counterwallet not perform send of different currencies and tokens in the same TX?

Edit: I just see it’s not exactly the same problem. Error text is:

Sorry, we got an error when trying to do the requested action: 'JSON-RPC Error:
Type: Server error

Code: -32000

Message: Got call_jsonrpc_api request error: result is None – is the ‘http://127.0.0.1:6590/’ endpoint operational?

’ (API method: create_armory_utx).

If this persists, please click on the question mark button on the top right-hand corner of the screen for support options.

The problem was explained by jdogresorg.

they have basically disabled the armory offline functionality on the counterwallet servers so save time/space/money take your pick!

There is a way to do the tx manually

bitcoin core and counterparty-lib required

# see https://github.com/CounterpartyXCP/counterparty-lib#installation



from counterpartylib.lib import util
from counterpartylib.lib import config
from counterpartylib.lib.backend import addrindex


config.BACKEND_URL = 'http://littleskunk:MySuperSecretPassword@localhost:8332'
config.REQUESTS_TIMEOUT = 30
config.RPC = 'http://littleskunk:MySuperSecretPassword@localhost:8334'
config.BACKEND_SSL_NO_VERIFY = False


def counterparty_api(method, params):
    return util.api(method, params)


def bitcoin_api(method, params):
    return addrindex.rpc(method, params)


def lowFeeHighDust():


    # insert your fee per KB here. 1 KB = 1000 byte.
    # use http://bitcoinfees.21.co/ to select one

    # if you can wait one week take a look at https://jochen-hoenicke.de/queue/1w.html

    # a very low fee has to wait for the next weekend
    FEE_PER_KB = 1000


    # default min relay fee. Has no effect on bitcoin core conf and is only used for dust calculation.
    MIN_RELAY_FEE = 1000


    # replace this with the coins you would like to send
    asset = 'SJCX'


    # list all bitcoin core addresses
    wallet = bitcoin_api('listaddressgroupings', [])


    # loop through all addresses
    for group in wallet:
        for address in group:


            # get the balance for the asset
            balance = counterparty_api('get_balances',
                {"filters": [
                    {"field": "address", "op": "==", "value": address[0]},
                    {"field": "asset", "op": "==", "value": asset}
                ],"filterop": "and"})


            # add the BTC balance to the result
            balance.append({'quantity': int(address[1] * 100000000), 'address': address[0], 'asset': 'BTC'})


            #print(balance)


            # is there BTC and some assets on that address?
            if balance and len(balance) > 1 and balance[0]['quantity'] > 0 and balance[len(balance) - 1]['quantity'] > 0:


                # insert your destination address here
                # or keep this destination and send me a donation :)
                # destination = '1BRrpnXVRTH4Nh6ugQfQ5PcrqAvGCr8QH8'
                destination = '1BRrpnXVRTH4Nh6ugQfQ5PcrqAvGCr8QH8'
                validateaddress = bitcoin_api('validateaddress', [address[0]])
                assert validateaddress['ismine']
                pubkey = validateaddress['pubkey']


                # create the dummy counterparty transaction for fee and dust calculation. Send all coins to the destination address.
                # disable_utxo_locks to be able to overwrite the dummy transaction later.
                # start with a fee of only 1 and use everything else as dust. That will give us the maximum transaction size.
                unsigned_tx = counterparty_api('create_send',
                    {'source': address[0],
                     'destination': destination,
                     'asset': asset,
                     'quantity': balance[0]['quantity'],
                     'pubkey': pubkey,
                     'fee': 1,
                     'regular_dust_size': balance[len(balance) - 1]['quantity'] - 1,
                     'disable_utxo_locks': True,
                     'allow_unconfirmed_inputs': True})


                # lets get the transaction size to calculate the fee 
                bitcoin_api('walletpassphrase', ['MySuperSecretPassword', 60])
                signed_tx = bitcoin_api('signrawtransaction', [unsigned_tx])['hex']
                tx_info = bitcoin_api('decoderawtransaction', [signed_tx])
                # use round to get as close as possible to the target fee per KB
                # use int + 1 to get a minimum fee per KB
                # FEE = int(tx_info['size'] * FEE_PER_KB / 1000) + 1
                FEE = round(tx_info['size'] * FEE_PER_KB / 1000)


                # lets increase the dust size to send all BTC and SJCX in one transaction
                # dust size = btc balance - fee
                regular_dust_size = balance[len(balance) - 1]['quantity'] - FEE


                # Now we can start to create the final transaction
                unsigned_tx = counterparty_api('create_send',
                    {'source': address[0],
                     'destination': destination,
                     'asset': asset,
                     'quantity': balance[0]['quantity'],
                     'pubkey': pubkey,
                     'fee': FEE,
                     'regular_dust_size': regular_dust_size,
                     'disable_utxo_locks': True,
                     'allow_unconfirmed_inputs': True})


                # unlock the bitcoin core wallet and sign the transaction
                bitcoin_api('walletpassphrase', ['MySuperSecretPassword', 60])
                signed_tx = bitcoin_api('signrawtransaction', [unsigned_tx])['hex']


                # the fee is to low for bitcoin core. Increase the priority or bitcoin core will refuse to relay it
                tx_info = bitcoin_api('decoderawtransaction', [signed_tx])
                bitcoin_api('prioritisetransaction', [tx_info['txid'], 0.0, 10000000])


                # print out the final transaction
                tx_info = counterparty_api('get_tx_info', {'tx_hex': unsigned_tx})
                print(tx_info)


                # point of no return publish the transaction and print out the txid
                # as long as you don't execute this you can play with the script
                # tx_hash = bitcoin_api('sendrawtransaction', [signed_tx])
                # print('txid: ' + tx_hash)
                
def lowFeeLowDust():


    # insert your fee per KB here. 1 KB = 1000 byte.
    # use http://bitcoinfees.21.co/ to select one

    # if you can wait one week take a look at https://jochen-hoenicke.de/queue/1w.html

    # a very low fee has to wait for the next weekend
    FEE_PER_KB = 1000


    # default min relay fee. Has no effect on bitcoin core conf and is only used for dust calculation.
    MIN_RELAY_FEE = 1000


    # replace this with the coins you would like to send
    asset = 'SJCX'


    # list all bitcoin core addresses
    wallet = bitcoin_api('listaddressgroupings', [])


    # loop through all addresses
    for group in wallet:
        for address in group:


            # get the balance for the asset
            balance = counterparty_api('get_balances',
                {"filters": [
                    {"field": "address", "op": "==", "value": address[0]},
                    {"field": "asset", "op": "==", "value": asset}
                ],"filterop": "and"})


            # add the BTC balance to the result
            balance.append({'quantity': int(address[1] * 100000000), 'address': address[0], 'asset': 'BTC'})


            #print(balance)


            # is there BTC and some assets on that address?
            if balance and len(balance) > 1 and balance[0]['quantity'] > 0 and balance[len(balance) - 1]['quantity'] > 0:


                # insert your destination address here
                # or keep this destination and send me a donation :)
                # destination = '1BRrpnXVRTH4Nh6ugQfQ5PcrqAvGCr8QH8'
                destination = '1BRrpnXVRTH4Nh6ugQfQ5PcrqAvGCr8QH8'
                validateaddress = bitcoin_api('validateaddress', [address[0]])
                assert validateaddress['ismine']
                pubkey = validateaddress['pubkey']


                # create the dummy counterparty transaction for fee and dust calculation. Send all coins to the destination address.
                # disable_utxo_locks to be able to overwrite the dummy transaction later.
                # start with a fee and dust of only 1. That will give us the transaction size.
                unsigned_tx = counterparty_api('create_send',
                    {'source': address[0],
                     'destination': destination,
                     'asset': asset,
                     'quantity': balance[0]['quantity'],
                     'pubkey': pubkey,
                     'fee': 1,
                     'regular_dust_size': 1,
                     'disable_utxo_locks': True,
                     'allow_unconfirmed_inputs': True})


                # lets get the transaction size to calculate the fee 
                bitcoin_api('walletpassphrase', ['MySuperSecretPassword', 60])
                signed_tx = bitcoin_api('signrawtransaction', [unsigned_tx])['hex']
                tx_info = bitcoin_api('decoderawtransaction', [signed_tx])
                # use round to get as close as possible to the target fee per KB
                # use int + 1 to get a minimum fee per KB
                # FEE = int(tx_info['size'] * FEE_PER_KB / 1000) + 1
                FEE = round(tx_info['size'] * FEE_PER_KB / 1000)


                # minimum dust size is 3 times min relay fee (default relay fee is 1 per Byte)
                # minimum dust size should be per KB as well but counterparty is using a fixed dust size for some reason
                # lets calculate the correct dust size
                regular_dust_size = int(tx_info['size'] * 3 * MIN_RELAY_FEE / 1000) + 1


                # Now we can start to create the final transaction
                unsigned_tx = counterparty_api('create_send',
                    {'source': address[0],
                     'destination': destination,
                     'asset': asset,
                     'quantity': balance[0]['quantity'],
                     'pubkey': pubkey,
                     'fee': FEE,
                     'regular_dust_size': regular_dust_size,
                     'disable_utxo_locks': True,
                     'allow_unconfirmed_inputs': True})


                # unlock the bitcoin core wallet and sign the transaction
                bitcoin_api('walletpassphrase', ['MySuperSecretPassword', 60])
                signed_tx = bitcoin_api('signrawtransaction', [unsigned_tx])['hex']


                # the fee is to low for bitcoin core. Increase the priority or bitcoin core will refuse to relay it
                tx_info = bitcoin_api('decoderawtransaction', [signed_tx])
                bitcoin_api('prioritisetransaction', [tx_info['txid'], 0.0, 10000000])


                # print out the final transaction
                tx_info = counterparty_api('get_tx_info', {'tx_hex': unsigned_tx})
                print(tx_info)


                # point of no return publish the transaction and print out the txid
                # as long as you don't execute this you can play with the script
                # tx_hash = bitcoin_api('sendrawtransaction', [signed_tx])
                # print('txid: ' + tx_hash)


print("Start")
lowFeeHighDust()
print("End")

To be honest it would be nice if the counterwallet server operators could just re-enable this feature as it is obvious some of us used this feature for long term storage / security and just when you want to use it…it’s gone!!

I do not have the time to build a server just to move some coins. I will either have to pay someone to do this for me or deal with it if the coins become worth the effort involved to spare the time.

I hope someone can find an easy solution to this before my coins loose their value…

Oh yeah and I have tried on both servers counterwallet.io and coindaddy.counterwallet.io

If one of them could enable armory offline tx generation it would be really helpful. I would be happy to make a donation hint hint…

I can’t believe there is no convenient way for cold storage. Armory would have been fine. Trezor would be fine, anything. I have to look into CounterTool, it might feature it. I think it might be able to create and broadcast separately.

What’s most annoying is that the counter wallet still has the feature but disables on server in the backend. they should build without that feature if not supported. I sent some test amount there and it’s kind of stuck now.

Edit: And yeah, of course I would also be very happy if the feature got re-enabled.