type canister_id = principal; type wasm_module = blob; type canister_settings = record { controllers : opt vec principal; compute_allocation : opt nat; memory_allocation : opt nat; freezing_threshold : opt nat; reserved_cycles_limit : opt nat; }; type definite_canister_settings = record { controllers : vec principal; compute_allocation : nat; memory_allocation : nat; freezing_threshold : nat; reserved_cycles_limit : nat; }; type change_origin = variant { from_user : record { user_id : principal; }; from_canister : record { canister_id : principal; canister_version : opt nat64; }; }; type change_details = variant { creation : record { controllers : vec principal; }; code_uninstall; code_deployment : record { mode : variant { install; reinstall; upgrade }; module_hash : blob; }; controllers_change : record { controllers : vec principal; }; }; type change = record { timestamp_nanos : nat64; canister_version : nat64; origin : change_origin; details : change_details; }; type chunk_hash = record { hash : blob; }; type http_header = record { name : text; value : text; }; type http_request_result = record { status : nat; headers : vec http_header; body : blob; }; type ecdsa_curve = variant { secp256k1; }; type satoshi = nat64; type bitcoin_network = variant { mainnet; testnet; }; type bitcoin_address = text; type block_hash = blob; type outpoint = record { txid : blob; vout : nat32; }; type utxo = record { outpoint : outpoint; value : satoshi; height : nat32; }; type bitcoin_get_utxos_args = record { address : bitcoin_address; network : bitcoin_network; filter : opt variant { min_confirmations : nat32; page : blob; }; }; type bitcoin_get_utxos_query_args = record { address : bitcoin_address; network : bitcoin_network; filter : opt variant { min_confirmations : nat32; page : blob; }; }; type bitcoin_get_current_fee_percentiles_args = record { network : bitcoin_network; }; type bitcoin_get_utxos_result = record { utxos : vec utxo; tip_block_hash : block_hash; tip_height : nat32; next_page : opt blob; }; type bitcoin_get_utxos_query_result = record { utxos : vec utxo; tip_block_hash : block_hash; tip_height : nat32; next_page : opt blob; }; type bitcoin_get_balance_args = record { address : bitcoin_address; network : bitcoin_network; min_confirmations : opt nat32; }; type bitcoin_get_balance_query_args = record { address : bitcoin_address; network : bitcoin_network; min_confirmations : opt nat32; }; type bitcoin_send_transaction_args = record { transaction : blob; network : bitcoin_network; }; type millisatoshi_per_byte = nat64; type node_metrics = record { node_id : principal; num_blocks_total : nat64; num_block_failures_total : nat64; }; type create_canister_args = record { settings : opt canister_settings; sender_canister_version : opt nat64; }; type create_canister_result = record { canister_id : canister_id; }; type update_settings_args = record { canister_id : principal; settings : canister_settings; sender_canister_version : opt nat64; }; type upload_chunk_args = record { canister_id : principal; chunk : blob; }; type clear_chunk_store_args = record { canister_id : canister_id; }; type stored_chunks_args = record { canister_id : canister_id; }; type canister_install_mode = variant { install; reinstall; upgrade : opt record { skip_pre_upgrade : opt bool; wasm_memory_persistence : opt variant { keep; replace; }; }; }; type install_code_args = record { mode : canister_install_mode; canister_id : canister_id; wasm_module : wasm_module; arg : blob; sender_canister_version : opt nat64; }; type install_chunked_code_args = record { mode : canister_install_mode; target_canister : canister_id; store_canister : opt canister_id; chunk_hashes_list : vec chunk_hash; wasm_module_hash : blob; arg : blob; sender_canister_version : opt nat64; }; type uninstall_code_args = record { canister_id : canister_id; sender_canister_version : opt nat64; }; type start_canister_args = record { canister_id : canister_id; }; type stop_canister_args = record { canister_id : canister_id; }; type canister_status_args = record { canister_id : canister_id; }; type canister_status_result = record { status : variant { running; stopping; stopped }; settings : definite_canister_settings; module_hash : opt blob; memory_size : nat; cycles : nat; reserved_cycles : nat; idle_cycles_burned_per_day : nat; query_stats: record { num_calls_total: nat; num_instructions_total: nat; request_payload_bytes_total: nat; response_payload_bytes_total: nat; }; }; type canister_info_args = record { canister_id : canister_id; num_requested_changes : opt nat64; }; type canister_info_result = record { total_num_changes : nat64; recent_changes : vec change; module_hash : opt blob; controllers : vec principal; }; type delete_canister_args = record { canister_id : canister_id; }; type deposit_cycles_args = record { canister_id : canister_id; }; type http_request_args = record { url : text; max_response_bytes : opt nat64; method : variant { get; head; post }; headers : vec http_header; body : opt blob; transform : opt record { function : func(record { response : http_request_result; context : blob }) -> (http_request_result) query; context : blob; }; }; type ecdsa_public_key_args = record { canister_id : opt canister_id; derivation_path : vec blob; key_id : record { curve : ecdsa_curve; name : text }; }; type ecdsa_public_key_result = record { public_key : blob; chain_code : blob; }; type sign_with_ecdsa_args = record { message_hash : blob; derivation_path : vec blob; key_id : record { curve : ecdsa_curve; name : text }; }; type sign_with_ecdsa_result = record { signature : blob; }; type node_metrics_history_args = record { subnet_id : principal; start_at_timestamp_nanos : nat64; }; type node_metrics_history_result = vec record { timestamp_nanos : nat64; node_metrics : vec node_metrics; }; type provisional_create_canister_with_cycles_args = record { amount : opt nat; settings : opt canister_settings; specified_id : opt canister_id; sender_canister_version : opt nat64; }; type provisional_create_canister_with_cycles_result = record { canister_id : canister_id; }; type provisional_top_up_canister_args = record { canister_id : canister_id; amount : nat; }; type raw_rand_result = blob; type stored_chunks_result = vec chunk_hash; type upload_chunk_result = chunk_hash; type bitcoin_get_balance_result = satoshi; type bitcoin_get_balance_query_result = satoshi; type bitcoin_get_current_fee_percentiles_result = vec millisatoshi_per_byte; service ic : { create_canister : (create_canister_args) -> (create_canister_result); update_settings : (update_settings_args) -> (); upload_chunk : (upload_chunk_args) -> (upload_chunk_result); clear_chunk_store : (clear_chunk_store_args) -> (); stored_chunks : (stored_chunks_args) -> (stored_chunks_result); install_code : (install_code_args) -> (); install_chunked_code : (install_chunked_code_args) -> (); uninstall_code : (uninstall_code_args) -> (); start_canister : (start_canister_args) -> (); stop_canister : (stop_canister_args) -> (); canister_status : (canister_status_args) -> (canister_status_result); canister_info : (canister_info_args) -> (canister_info_result); delete_canister : (delete_canister_args) -> (); deposit_cycles : (deposit_cycles_args) -> (); raw_rand : () -> (raw_rand_result); http_request : (http_request_args) -> (http_request_result); // Threshold ECDSA signature ecdsa_public_key : (ecdsa_public_key_args) -> (ecdsa_public_key_result); sign_with_ecdsa : (sign_with_ecdsa_args) -> (sign_with_ecdsa_result); // bitcoin interface bitcoin_get_balance : (bitcoin_get_balance_args) -> (bitcoin_get_balance_result); bitcoin_get_balance_query : (bitcoin_get_balance_query_args) -> (bitcoin_get_balance_query_result) query; bitcoin_get_utxos : (bitcoin_get_utxos_args) -> (bitcoin_get_utxos_result); bitcoin_get_utxos_query : (bitcoin_get_utxos_query_args) -> (bitcoin_get_utxos_query_result) query; bitcoin_send_transaction : (bitcoin_send_transaction_args) -> (); bitcoin_get_current_fee_percentiles : (bitcoin_get_current_fee_percentiles_args) -> (bitcoin_get_current_fee_percentiles_result); // metrics interface node_metrics_history : (node_metrics_history_args) -> (node_metrics_history_result); // provisional interfaces for the pre-ledger world provisional_create_canister_with_cycles : (provisional_create_canister_with_cycles_args) -> (provisional_create_canister_with_cycles_result); provisional_top_up_canister : (provisional_top_up_canister_args) -> (); };