Bitcoin Forum
July 25, 2024, 07:55:58 PM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: im in love with PoSh ...and effin retarded ;(  (Read 245 times)
joshuatee (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
December 20, 2015, 08:34:03 AM
 #1

morning chaps an chaparelles

so, I spent the night drinking beer, listening to

Quote
Playing: https://www.youtube.com/results?search_query=testament

Playing: ytdl://https://www.youtube.com/watch?v=OVsgyQeaba4
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=und (*) (aac)
[vo/opengl] The OpenGL driver does not support OpenGL 3.x
[vo/opengl] Suspected software renderer or indirect context.
AO: [wasapi] 48000Hz stereo 2ch float
VO: [direct3d_shaders] 1280x720 yuv420p
AV: 01:33:37 / 02:42:21 (57%) A-V:  0.000 Dropped: 29 Cache: 10s+73MB

Playing: ytdl://https://www.youtube.com/watch?v=09rHDabBQfA
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=und (*) (aac)
VO: [direct3d_shaders] 640x360 yuv420p

etc ...fcuk OGL btw Cheesy

and among all the fun trying to write a powershell script that controls the bitcoin daemon (teh JSON-RPC thingie)

fine, I might be retarded but certainly not so much to copy-pasta all teh method's(79 if I get em right?) names, descriptions, return types etc, .. why not make a script that asks the daemon for the methods, politely, and generates all teh sh1t?

sounds like aplan. even a retard like me can write:

https://ghostbin.com/paste/8xbck

and the template:

https://ghostbin.com/paste/ffj8w

and get a pretty decent looking (oh, shap Cheesy) object, in json:

https://ghostbin.com/paste/fo54g

Happy, happy, time for a few more beers  Cool

havinq some fun time, sadly running outta beer and I happen to stumble on this shhh... addmultisigaddress:

Quote
    {
        "Index":  43,
        "Method":  "addmultisigaddress",
        "Description":  "Add a nrequired-to-sign multisignature address to the wallet.\nEach key is a Bitcoin address or hex-encoded public key.\nIf \u0027account\u0027 is specified (DEPRECATED), assign address to that account.",
        "Arguments":  [
                          {
                              "Name":  "nrequired",
                              "Type":  "numeric",
                              "Required":  "required",
                              "Description":  "The number of required signatures out of the n keys or addresses."
                          },
                          {
                              "Name":  "keysobject",
                              "Type":  "string",
                              "Required":  "required",
                              "Description":  "A json array of bitcoin addresses or hex-encoded public keys"
                          },
                          {
                              "Name":  "account",
                              "Type":  "string",
                              "Required":  "optional",
                              "Description":  "DEPRECATED. An account to assign the addresses to."
                          }
                      ]
    }

mah drama is the bc daemon seems to be opinionated about it:

Quote
addmultisigaddress nrequired ["key",...] ( "account" )

Add a nrequired-to-sign multisignature address to the wallet.
Each key is a Bitcoin address or hex-encoded public key.
If 'account' is specified (DEPRECATED), assign address to that account.

Arguments:
1. nrequired        (numeric, required) The number of required signatures out of the n keys or addresses.
2. "keysobject"   (string, required) A json array of bitcoin addresses or hex-encoded public keys
     [
       "address"  (string) bitcoin address or hex-encoded public key
       ...,
     ]
3. "account"      (string, optional) DEPRECATED. An account to assign the addresses to.

Result:
"bitcoinaddress"  (string) A bitcoin address associated with the keys.

Examples:

Add a multisig address from 2 addresses
> bitcoin-cli addmultisigaddress 2 "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"

As json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addmultisigaddress", "params": [2, "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

and tats just starting teh alphabet... HUGE DRAMA  Cry  Cry  Cry

teh funny part is that the deamon seems to believe all arrays are strings and all strings are arrays? Cheesy

seriously, much kosistens, wow taipinq
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!