-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl_commands
78 lines (51 loc) · 6.54 KB
/
curl_commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# AUTHENTICATION
curl -X POST -H "Content-type: application/json" -d '{ "username": "admin", "password": "NjI0MjE4Mjk5Mzc0MDEyMTkxOA=="}' -k 'https://127.0.0.1:9091/v1/auth'
# ADD_USER
curl -X POST -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -H "Content-type: application/json" -d '{"username" : "ReadUser", "firstName" : "Read", "lastName" : "User", "email" : "[email protected]"}' -k 'https://127.0.0.1:9091/v1/add/user'
# CHAIN_INFO
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/chain/info'
# CHAIN_HEADERS
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/chain/headers/?startBlockHeight=1000&pagesize=10'
# HASH->BLOCK
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/block/hash/00000000d1145790a8694403d4063f323d499e655c83426834d4ce2f8dd4a2ee'
# [HASH]->[BLOCK]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/block/hashes/?hash=000000000000000002af2a6de04d4a1a73973827eae348fe4d3f4d05610ff968&hash=000000000000000007fc734cbf1fc04c59cf7ecb6af0707fd5cf5b8d46dc4c75'
# HEIGHT->BLOCK
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/block/height/10'
# [HEIGHT]->[BLOCK]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/block/heights/?height=1&height=2&height=3'
# TXID->RAWTX
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/rawtransaction/3e7861a8f18df990bf3b074718018cf7a1e7f32447bbf13ffc93327b7bf608ac'
# TXID->TX
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/transaction/3e7861a8f18df990bf3b074718018cf7a1e7f32447bbf13ffc93327b7bf608ac'
# [TXID]->[RAWTX]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/rawtransactions/?id=3e7861a8f18df990bf3b074718018cf7a1e7f32447bbf13ffc93327b7bf608ac&id=6536d30384be74df8f7e42881fea1224f7d2d40cd283328fdd6be1e07a31c6a6'
# [TXID]->[TX]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/transactions/?id=3e7861a8f18df990bf3b074718018cf7a1e7f32447bbf13ffc93327b7bf608ac&id=6536d30384be74df8f7e42881fea1224f7d2d40cd283328fdd6be1e07a31c6a6'
# HASH->[TXID]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/block/txids/000000009a4aed3e8ba7a978c6b50fea886fb496d66e696090a91d527200b002/?pagenumber=2&pagesize=1'
# OUTPOINT->SPEND_STATUS
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/transaction/920e20148b0cdf48d6abe5e70306c52708428615b3f39c24e2f83c21b1ae7eaa/index/0'
# NAME->[OUTPOINT]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/allegory/\[h/?isProducer=True'
# TXID->[MNODE]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/merklebranch/3e7861a8f18df990bf3b074718018cf7a1e7f32447bbf13ffc93327b7bf608ac'
# ADDR->[OUTPUT]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/address/1KWj3Jk8xvS6fDdhQBsfmerscSGsS6CMiS/outputs/?pagesize=2'
# [ADDR]->[OUTPUT]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/addresses/outputs/?address=1KWj3Jk8xvS6fDdhQBsfmerscSGsS6CMiS&address=13sU7VmtNTyw3K5fA6Aei48kxmCdvtGEWD/?pagesize=5'
# SCRIPTHASH->[OUTPUT]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/scripthash/c6eb7edbcaa22415125dcd82cc4db664c41dc544627647a5199e6f1c1fb09ef4/outputs/?pagesize=2'
# [SCRIPTHASH]->[OUTPUT]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/scripthashes/outputs/?scripthash=c6eb7edbcaa22415125dcd82cc4db664c41dc544627647a5199e6f1c1fb09ef4&scripthash=57d291c8a47c7c0c861c4800aeb3d1af6227060ddec55bc58ce26059c4385f19'
# ADDR->[UTXO]
curl -X GET -H "Authorization: Bearer 758d0e9f8c69b8c76411f85fd46510860d235d4736b82ae9439f332b7a9c47aa" -k 'https://127.0.0.1:9091/v1/address/1AyAQ9nmeJnAsjpVtPefbDd7oyVitaAKik/utxos/?pagesize=2'
# [ADDR]->[UTXO]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/addresses/utxos/?address=1KWj3Jk8xvS6fDdhQBsfmerscSGsS6CMiS&address=13sU7VmtNTyw3K5fA6Aei48kxmCdvtGEWD/?pagesize=5'
# SCRIPTHASH->[UTXO]
curl -X GET -H "Authorization: Bearer 758d0e9f8c69b8c76411f85fd46510860d235d4736b82ae9439f332b7a9c47aa" -k 'https://127.0.0.1:9091/v1/scripthash/57d291c8a47c7c0c861c4800aeb3d1af6227060ddec55bc58ce26059c4385f19/utxos/?pagesize=2'
# [SCRIPTHASH]->[UTXO]
curl -X GET -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -k 'https://127.0.0.1:9091/v1/scripthashes/utxos/?scripthash=c6eb7edbcaa22415125dcd82cc4db664c41dc544627647a5199e6f1c1fb09ef4&scripthash=57d291c8a47c7c0c861c4800aeb3d1af6227060ddec55bc58ce26059c4385f19'
# RELAY_TX
curl -X POST -H "Authorization: Bearer 8cf11a8cb97b0e002b31197c5808d13e3b18e488234a61946690668db5c5fece" -H "Content-type: application/json" -d '{ "rawTx": "H4sIAAAAAAACA2NkYGBg+nv/4u8f7LrTHcL8FtlyKK34HBt0KyKh/FiCTMntjulT/7IAFXW5G7gwKSSc+rhg4hpBqQOWZ/XXR1XcC+Uyb0z70HbcwP7pfR6pq2pMCnkanHW7eY99b9zxh3WhSEs9O5OtwpOzIUe+bo4/83zVrGuMjiwLUyz1j8wP+W/Btk2j1qMqXO/1Lv0qL/603sMXJ3088qSil6f/nuPaQ75OPlO3aPNp7ew43P/sWfuELZKdWnuf7F4v+B8ILFbJf8mMnVy7Jb2g9ebf6/8MZmqzbs1zTDf4u+Qhy4xzgQxwJ8vNyJPdecjL0LDUp7I6vbN5ifNPY5d87fWRSizh/0OynjApuFbdDazZXNj9/+CxCVbFWfODXRSNhTtu7+xfbbZ9yvN7flRyMhsDFExkyOJ3zMlJTc8vqtQHMgISK31qWxgYGyWiWxmaGBiagQRjYzNDRkR+dmpegFFARnF+bmppUaZhI0iKCZuUUVMzWB8zNkljifRmRpAsCzZZE4kMByd+sMvEV4qsnO7IsO7ddC+FsysXfXUt8OLa6n+n3YGXGSZfKxxS6vLm4Ke+Wzzsae/9NoncE3CluTxIDgBSJZnLqgIAAA=="}' -k 'https://127.0.0.1:9091/v1/relaytx'
# PS_ALLEGORY_TX