add more AIR scripts

This commit is contained in:
boneyard93501 2021-03-04 01:57:19 -06:00
parent e2b1d73c94
commit 9c948c79e6
6 changed files with 129 additions and 0 deletions

View File

@ -0,0 +1,53 @@
(xor
(seq
(seq
(seq
(seq
(call relay ("op" "identity") [])
(call node_1 (service_1 "get_latest_block") [api_key] hex_block_result)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") [hex_block_result])
)
)
(seq
(seq
(call relay ("op" "identity") [])
(call node_2 (service_2 "hex_to_int") [hex_block_result] int_block_result) ; "0xb69e2e"
; (call node_2 (service_2 "hex_to_int") ["0xb69e2e"] int_block_result)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") [int_block_result])
)
)
)
(seq
(par
(seq
(call relay ("op" "identity") [])
(call node_1 (service_1 "get_block") [api_key int_block_result] block_result)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") [block_result])
)
)
(par
(seq
(call relay ("op" "identity") [])
(call node_1 (service_1 "get_block") [api_key int_block_result-1] block_result_1)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") [block_result_1])
)
)
)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") ["XOR FAILED" %last_error%])
)
)

View File

@ -0,0 +1,18 @@
(xor
(seq
(seq
(call relay ("op" "identity") [])
(call node_1 (service "curl_request") ["https://api.duckduckgo.com/?q=homotopy&format=json"] result)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") [result])
)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") [%last_error%])
)
)

View File

@ -0,0 +1,16 @@
(xor
(seq
(seq
(call relay ("op" "identity") [])
(call my_node (service "extract_miner_address") [json_string] result)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") [result])
)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") ["XOR FAILED" %last_error%])
)
)

View File

@ -0,0 +1,16 @@
(xor
(seq
(seq
(call relay ("op" "identity") [])
(call node_1 (service "get_block") [api_key block_num] result)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") [result])
)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") ["XOR FAILED" %last_error%])
)
)

View File

@ -0,0 +1,16 @@
(xor
(seq
(seq
(call relay ("op" "identity") [])
(call node_1 (service "hex_to_int") [hex_string] hex_result)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") [hex_result])
)
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") ["XOR FAILED" %last_error%])
)
)

View File

@ -0,0 +1,10 @@
(xor
(seq
(call relay (service "get_latest_block") [api_key] result)
(call %init_peer_id% (returnService "run") [result])
)
(seq
(call relay ("op" "identity") [])
(call %init_peer_id% (returnService "run") ["XOR FAILED" %last_error%])
)
)