Advertisement
Guest User

Untitled

a guest
Jun 21st, 2014
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.99 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------
  2. An example of the send_MP RPC call to send currency between addresses:
  3. *Note we're still quite verbose here, this will be pushed into mastercore.log soon :)
  4.  
  5. #src/mastercored send_MP 1MCHESTxYkPSLoJ57WBQot7vz3xkNahkcb 1MCHESTbJhJK27Ygqj4qKkx4Z4ZxhnP826 1 0.005
  6. pkt : 010000000000000001000000000007a1200000000000000000000000000000
  7. hash : a15c9f713e595e974b4efa0953e21b4c11ea882023a47fef5f9f86b0e5d4aba1
  8. packet : a05c9f713e595e974a4efa0953e21ced31ea882023a47fef5f9f86b0e5d4ab
  9. pubKey check: 02a05c9f713e595e974a4efa0953e21ced31ea882023a47fef5f9f86b0e5d4ab85
  10. pubKey check: 02a05c9f713e595e974a4efa0953e21ced31ea882023a47fef5f9f86b0e5d4ab86
  11. ClassB_send(): 1 04e4967e86ff8ee6c643c81cd236fb6a2eba379c397c8dff99ff2c1e91616260a820f86242c09bd5a25dd1dc465d988e0c2287dafa88b0e3bcd905dca98d55852b 02a05c9f713e595e974a4efa0953e21ced31ea882023a47fef5f9f86b0e5d4ab86 2
  12.  
  13. OP_CHECKMULTISIG, line 2488, file: mastercore.cpp
  14. ClassB_send():CTransaction(hash=7a06ef1bb6, ver=1, vin.size=3, vout.size=4, nLockTime=0)
  15. CTxIn(COutPoint(a230ac2ded, 2), scriptSig=3045022100c12642b0fed7bc)
  16. CTxIn(COutPoint(0632bea470, 1), scriptSig=3044022075cc5262848c49d5)
  17. CTxIn(COutPoint(74602cfeb5, 3), scriptSig=3045022100861fca4e934be9)
  18. CTxOut(nValue=0.00005678, scriptPubKey=1 04e4967e86ff8ee6c643c81cd236)
  19. CTxOut(nValue=0.00005678, scriptPubKey=OP_DUP OP_HASH160 dd84a40b878d)
  20. CTxOut(nValue=0.01983533, scriptPubKey=OP_DUP OP_HASH160 dd84a40ba1d6)
  21. CTxOut(nValue=0.00005678, scriptPubKey=OP_DUP OP_HASH160 946cb2e08075)
  22. ; nFeeRet = 10000, line 2523, file: mastercore.cpp
  23.  
  24. 7a06ef1bb62230b04f4b7839f3b677397629cd433c03a0534d7ba57500efec1f
  25.  
  26. Here is the send on Masterchest for verification via a different codebase:
  27. https://masterchest.info/lookuptx.aspx?txid=7a06ef1bb62230b04f4b7839f3b677397629cd433c03a0534d7ba57500efec1f
  28. -------------------------------------------------------------------------------------------------------------
  29. An example of the getbalance_MP RPC call to view the balance for a given address and currency:
  30.  
  31. #src/mastercored getbalance_MP 1MCHESTxYkPSLoJ57WBQot7vz3xkNahkcb 1
  32. 0.01078211
  33. -------------------------------------------------------------------------------------------------------------
  34. An example of the gettransaction_MP RPC call on a simple send transaction:
  35.  
  36. #src/mastercored gettransaction_MP 0632bea470138ff947bc1e0886156136b6abcc011c253e027dc9134e68ce1dd4
  37. {
  38. "txid" : "0632bea470138ff947bc1e0886156136b6abcc011c253e027dc9134e68ce1dd4",
  39. "sendingaddress" : "1MCHESTbJhJK27Ygqj4qKkx4Z4ZxhnP826",
  40. "referenceaddress" : "1MCHESTxYkPSLoJ57WBQot7vz3xkNahkcb",
  41. "direction" : "out",
  42. "confirmations" : 2862,
  43. "fee" : -0.00010000,
  44. "blocktime" : 1401845110,
  45. "blockindex" : 726,
  46. "type" : "Simple Send",
  47. "currency" : 1,
  48. "divisible" : true,
  49. "amount" : 0.01000000,
  50. "valid" : true
  51. }
  52. -------------------------------------------------------------------------------------------------------------
  53. An example of the gettransaction_MP RPC call on a DEx accept offer transaction:
  54.  
  55. #src/mastercored gettransaction_MP a60de592aeb1bf645453eab4d8bbdd67578ff8a8be4854bbebefe6a5d00463db
  56. {
  57. "txid" : "a60de592aeb1bf645453eab4d8bbdd67578ff8a8be4854bbebefe6a5d00463db",
  58. "sendingaddress" : "1E3W9SFbWiaFMQAmiELDRn1W6MuibHj1EY",
  59. "referenceaddress" : "1MCHESTxYkPSLoJ57WBQot7vz3xkNahkcb",
  60. "direction" : "in",
  61. "confirmations" : 16329,
  62. "fee" : 0.00000000,
  63. "blocktime" : 1394867325,
  64. "blockindex" : 450,
  65. "type" : "DEx Accept Offer",
  66. "currency" : 1,
  67. "divisible" : true,
  68. "amount" : 0.00500000,
  69. "valid" : true
  70. }
  71. -------------------------------------------------------------------------------------------------------------
  72. An example of the gettransaction_MP RPC call on a DEx sell offer transaction:
  73.  
  74. #src/mastercored gettransaction_MP 5c68cc6ea5bdebb4d69c12d042ac8406b3781ca17e3330e5adcb08bae90b8057
  75. {
  76. "txid" : "5c68cc6ea5bdebb4d69c12d042ac8406b3781ca17e3330e5adcb08bae90b8057",
  77. "sendingaddress" : "1MCHESTxYkPSLoJ57WBQot7vz3xkNahkcb",
  78. "direction" : "out",
  79. "confirmations" : 16332,
  80. "fee" : -0.00011000,
  81. "blocktime" : 1394865512,
  82. "blockindex" : 233,
  83. "type" : "DEx Sell Offer",
  84. "currency" : 1,
  85. "divisible" : true,
  86. "amount" : 0.00500000,
  87. "feerequired" : 0.00010000,
  88. "timelimit" : 6,
  89. "subaction" : "New",
  90. "bitcoindesired" : 0.00012500,
  91. "valid" : true
  92. }
  93. -------------------------------------------------------------------------------------------------------------
  94. An example of the listtransactions_MP RPC call to list the last five transactions for all addresses in wallet
  95.  
  96. #src/mastercored listtransactions_MP "*" 5
  97. [
  98. {
  99. "txid" : "a60de592aeb1bf645453eab4d8bbdd67578ff8a8be4854bbebefe6a5d00463db",
  100. "address" : "1MCHESTxYkPSLoJ57WBQot7vz3xkNahkcb",
  101. "direction" : "in",
  102. "confirmations" : 16329,
  103. "blocktime" : 1394867325,
  104. "blockindex" : 450,
  105. "type" : "DEx Accept Offer",
  106. "currency" : 1,
  107. "divisible" : true,
  108. "amount" : 0.00500000,
  109. "valid" : true
  110. },
  111. {
  112. "txid" : "f8551486d02dd94fbd6820d5136af5734ee45db3f6d54a867f963d745ef6577a",
  113. "address" : "1MCHESTxYkPSLoJ57WBQot7vz3xkNahkcb",
  114. "direction" : "out",
  115. "confirmations" : 15597,
  116. "blocktime" : 1395264117,
  117. "blockindex" : 54,
  118. "type" : "Simple Send",
  119. "currency" : 0,
  120. "divisible" : true,
  121. "amount" : 0.00000000,
  122. "valid" : true
  123. },
  124. {
  125. "txid" : "6a3fae6614e481d08442b3d3deefd62c6cdc71b93ddcb74d9143ccbae1fdd8f3",
  126. "address" : "1MCHESTxYkPSLoJ57WBQot7vz3xkNahkcb",
  127. "direction" : "in",
  128. "confirmations" : 15270,
  129. "blocktime" : 1395422762,
  130. "blockindex" : 103,
  131. "type" : "DEx Accept Offer",
  132. "currency" : 1,
  133. "divisible" : true,
  134. "amount" : 0.00500000,
  135. "valid" : false
  136. },
  137. {
  138. "txid" : "f89697152f55ecf91d38abbb766b58a5be0ab26c6a27c699a47842908d134e98",
  139. "address" : "1MCHESTbJhJK27Ygqj4qKkx4Z4ZxhnP826",
  140. "direction" : "in",
  141. "confirmations" : 4168,
  142. "blocktime" : 1401156929,
  143. "blockindex" : 604,
  144. "type" : "Simple Send",
  145. "currency" : 1,
  146. "divisible" : true,
  147. "amount" : 0.04000000,
  148. "valid" : true
  149. },
  150. {
  151. "txid" : "0632bea470138ff947bc1e0886156136b6abcc011c253e027dc9134e68ce1dd4",
  152. "address" : "1MCHESTxYkPSLoJ57WBQot7vz3xkNahkcb",
  153. "direction" : "out",
  154. "confirmations" : 2862,
  155. "blocktime" : 1401845110,
  156. "blockindex" : 726,
  157. "type" : "Simple Send",
  158. "currency" : 1,
  159. "divisible" : true,
  160. "amount" : 0.01000000,
  161. "valid" : true
  162. }
  163. ]
  164. -------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement