From edede57c2558b5dcbb013b84a0f4420fed0dc4b3 Mon Sep 17 00:00:00 2001 From: Quint Daenen Date: Wed, 15 May 2024 12:44:29 +0200 Subject: [PATCH] Add registry and governance agents. --- ic/governance/actor.mo | 91 ++ ic/governance/agent.go | 1444 ++++++++++++++++++++++++++++++++ ic/governance/types.mo | 149 ++++ ic/registry/actor.mo | 142 ++++ ic/registry/agent.go | 1051 +++++++++++++++++++++++ ic/registry/types.mo | 62 ++ ic/testdata/did/governance.did | 703 ++++++++++++++++ ic/testdata/did/registry.did | 360 ++++++++ ic/testdata/gen.go | 8 + 9 files changed, 4010 insertions(+) create mode 100755 ic/governance/actor.mo create mode 100755 ic/governance/agent.go create mode 100755 ic/governance/types.mo create mode 100755 ic/registry/actor.mo create mode 100755 ic/registry/agent.go create mode 100755 ic/registry/types.mo create mode 100644 ic/testdata/did/governance.did create mode 100644 ic/testdata/did/registry.did diff --git a/ic/governance/actor.mo b/ic/governance/actor.mo new file mode 100755 index 0000000..76cdd6e --- /dev/null +++ b/ic/governance/actor.mo @@ -0,0 +1,91 @@ +// Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go. +import T "types"; + +import { principalOfBlob } = "mo:⛔"; + +actor class _governance() : async actor {} { + public shared func claim_gtc_neurons(_arg0 : Principal, _arg1 : [T.NeuronId]) : async (T.Result) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public shared func claim_or_refresh_neuron_from_account(_arg0 : T.ClaimOrRefreshNeuronFromAccount) : async (T.ClaimOrRefreshNeuronFromAccountResponse) { + ({ result = ?#NeuronId({ id = 1907006715546714179 }) }) + }; + public query func get_build_metadata() : async (Text) { + ("691703608542329411") + }; + public query func get_full_neuron(_arg0 : Nat64) : async (T.Result2) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public query func get_full_neuron_by_id_or_subaccount(_arg0 : T.NeuronIdOrSubaccount) : async (T.Result2) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public query func get_latest_reward_event() : async (T.RewardEvent) { + ({ rounds_since_last_distribution = ?691703608542329411; day_after_genesis = 1907006715546714179; actual_timestamp_seconds = 15493554583224738855; total_available_e8s_equivalent = 16687275400884993694; latest_round_available_e8s_equivalent = ?13368615419590941112; distributed_e8s_equivalent = 1961299418913621123; settled_proposals = [ { id = 16877987628876162418 }, { id = 6686602144653530707 }, { id = 2492298073262282947 }, { id = 12591018229732761422 }, { id = 9339131201452454247 }, { id = 2076642980582058783 }, { id = 659621366998512483 }, { id = 11049456158696049473 } ] }) + }; + public query func get_metrics() : async (T.Result3) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public shared func get_monthly_node_provider_rewards() : async (T.Result4) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public query func get_most_recent_monthly_node_provider_rewards() : async (?T.MostRecentMonthlyNodeProviderRewards) { + (?{ timestamp = 691703608542329411; rewards = [ { node_provider = ?{ id = ?principalOfBlob("x27643C19CE29049E3EDD6A901C95B81987E7E4DC8683C4861A6EEF374A5BFFCB"); reward_account = ?{ hash = "x72E5993653A83A535670323995CBC3583093E46B964E5FB0AF5E48BC673157CD" } }; reward_mode = ?#RewardToAccount({ to_account = ?{ hash = "x63333472237227418B5474D58D57232B0E585102CE218172444ED8C3B00CE96E" } }); amount_e8s = 2927777721278784320 }, { node_provider = ?{ id = ?principalOfBlob("xDD49B3A1EFA90F74B6EE9AE45E306B002F73CAD5E5075A8F1ACD2F58796744B7"); reward_account = ?{ hash = "x53AC87C3BA2C2862749BC146F73CEE09E26FE080B457BBAA64896EAE3BB8086C" } }; reward_mode = ?#RewardToAccount({ to_account = ?{ hash = "xA14781BF48B04DA37F9E44099FB04223967517184AF314BA18C8055D07A23162" } }); amount_e8s = 11777596687229746164 }, { node_provider = ?{ id = ?principalOfBlob("x580DF9E989BB9865AA02D5BD91315008872364D1934EEED60CFC6E29C1AC0162"); reward_account = ?{ hash = "x4F12D5BCD0DD849DBE302CA7F395B4F83CFDBE600FBE5070251AB749CDDA7CC9" } }; reward_mode = ?#RewardToNeuron({ dissolve_delay_seconds = 3927154977654170402 }); amount_e8s = 11955146476040597506 }, { node_provider = ?{ id = ?principalOfBlob("x03CE4AC9DB607D163C5E128AB01333BA69460344BA77117B427EC40CB4A5B665"); reward_account = ?{ hash = "x85FC8FE9670D294B132C495DF5310EDC52BC4C5B563D01831A595B33006C21C2" } }; reward_mode = ?#RewardToNeuron({ dissolve_delay_seconds = 15492832952175108436 }); amount_e8s = 14104442902222393556 }, { node_provider = ?{ id = ?principalOfBlob("x7D07B59BAD048044E400C7700249D0845B80AAE8FFC17A73FA1463DEDD315281"); reward_account = ?{ hash = "x95C2250CE6344F42B6394DC722B38B7459C59B4474878B5AAD738B6259269623" } }; reward_mode = ?#RewardToAccount({ to_account = ?{ hash = "x0029CA504AE169BB216BA4B6C0FD4B8575BB6CAC5707170B03CAD68837D600C5" } }); amount_e8s = 11310933019421498059 }, { node_provider = ?{ id = ?principalOfBlob("x5F74BB9D0452A4DDE6F9AC2C5C80285B464BB273C4903657FE665A5CBB3BBA89"); reward_account = ?{ hash = "x9A32F1E59F6500D8994DC38613B42F320D1D11A30CBB057DE6FA4EF78246A84C" } }; reward_mode = ?#RewardToAccount({ to_account = ?{ hash = "xCEB77313EE4A33BB12F81BE872B0F114A048ACC4FE4175092ED02876488A6F90" } }); amount_e8s = 4064996737592769371 }, { node_provider = ?{ id = ?principalOfBlob("xA6A57BFC526EB8D9872B36FAE628DB28AAC68C326F21F07EB61EBEA9D168CF23"); reward_account = ?{ hash = "x88FF4FB1FBDA4259C01BD9777D2340E2162EC7D9467846A779FFB90E5E771810" } }; reward_mode = ?#RewardToNeuron({ dissolve_delay_seconds = 7839736976628908613 }); amount_e8s = 17094947752472683678 }, { node_provider = ?{ id = ?principalOfBlob("x75767530F73F082FA0D54A85DE9E557EC1AD28B8294D1967E99A2B0B638F108D"); reward_account = ?{ hash = "xFB8921B116B384B141DC1B23542562B2A2F76BD1DC961785026BC2BC8FA33E9C" } }; reward_mode = ?#RewardToAccount({ to_account = ?{ hash = "xF847D88923E2995843426A088DD6964CF19B5D56E4A4B42F6E4230F20BCDB7E6" } }); amount_e8s = 12872200050853029013 }, { node_provider = ?{ id = ?principalOfBlob("x4BFE5BC8920BFEDBB8D1D51B7D81F8AEBE31D95C75A438D5FD7BAB0A6CC402CB"); reward_account = ?{ hash = "x58E06A37AFDF4365856E04179BD475988030BFB44E9AF8BC1577E6AF6D58AA2D" } }; reward_mode = ?#RewardToNeuron({ dissolve_delay_seconds = 6976459939909333935 }); amount_e8s = 3749970680998070576 } ] }) + }; + public query func get_network_economics_parameters() : async (T.NetworkEconomics) { + ({ neuron_minimum_stake_e8s = 691703608542329411; max_proposals_to_keep_per_topic = 585714884; neuron_management_fee_per_proposal_e8s = 15493554583224738855; reject_cost_e8s = 16687275400884993694; transaction_fee_e8s = 13368615419590941112; neuron_spawn_dissolve_delay_seconds = 1961299418913621123; minimum_icp_xdr_rate = 8319634114298731338; maximum_node_provider_rewards_e8s = 16877987628876162418; neurons_fund_economics = ?{ maximum_icp_xdr_rate = ?{ basis_points = ?6686602144653530707 }; neurons_fund_matched_funding_curve_coefficients = ?{ contribution_threshold_xdr = ?{ human_readable = ?"2492298073262282947" }; one_third_participation_milestone_xdr = ?{ human_readable = ?"12591018229732761422" }; full_participation_milestone_xdr = ?{ human_readable = ?"9339131201452454247" } }; max_theoretical_neurons_fund_participation_amount_xdr = ?{ human_readable = ?"2076642980582058783" }; minimum_icp_xdr_rate = ?{ basis_points = ?659621366998512483 } } }) + }; + public query func get_neuron_ids() : async ([Nat64]) { + ([ 1907006715546714179 ]) + }; + public query func get_neuron_info(_arg0 : Nat64) : async (T.Result5) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public query func get_neuron_info_by_id_or_subaccount(_arg0 : T.NeuronIdOrSubaccount) : async (T.Result5) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public query func get_neurons_fund_audit_info(_arg0 : T.GetNeuronsFundAuditInfoRequest) : async (T.GetNeuronsFundAuditInfoResponse) { + ({ result = ?#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" }) }) + }; + public query func get_node_provider_by_caller(_arg0 : ()) : async (T.Result7) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public query func get_pending_proposals() : async ([T.ProposalInfo]) { + ([ { id = ?{ id = 1907006715546714179 }; status = "UNKNOWN" # "int32"; topic = "UNKNOWN" # "int32"; failure_reason = ?{ error_message = "15493554583224738855"; error_type = "UNKNOWN" # "int32" }; ballots = [ ( 13368615419590941112, { vote = "UNKNOWN" # "int32"; voting_power = 1961299418913621123 } ), ( 8319634114298731338, { vote = "UNKNOWN" # "int32"; voting_power = 16877987628876162418 } ), ( 6686602144653530707, { vote = "UNKNOWN" # "int32"; voting_power = 2492298073262282947 } ), ( 12591018229732761422, { vote = "UNKNOWN" # "int32"; voting_power = 9339131201452454247 } ), ( 2076642980582058783, { vote = "UNKNOWN" # "int32"; voting_power = 659621366998512483 } ), ( 11049456158696049473, { vote = "UNKNOWN" # "int32"; voting_power = 11154855875436227363 } ) ]; proposal_timestamp_seconds = 12737262001801298209; reward_event_round = 12458059574603746480; deadline_timestamp_seconds = ?2927777721278784320; failed_timestamp_seconds = 12902718304114919901; reject_cost_e8s = 12191348527236822644; derived_proposal_information = ?{ swap_background_information = ?{ ledger_index_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?2442593438410932331; controllers = [ principalOfBlob("x796744B72478AB53AC87C3BA2C2862749BC146F73CEE09E26FE080B457BBAA64"), principalOfBlob("x3BB8086C60F0173907A1C0CA0853A14781BF48B04DA37F9E44099FB042239675"), principalOfBlob("xF314BA18C8055D07A2316283F453F47B2562C96D72580DF9E989BB9865AA02D5"), principalOfBlob("x5008872364D1934EEED60CFC6E29C1AC01622066744F12D5BCD0DD849DBE302C"), principalOfBlob("xB4F83CFDBE600FBE5070251AB749CDDA7CC9254A1BB6566DC5A62A5122E3FB2C"), principalOfBlob("x02B029FE6036E903CE4AC9DB607D163C5E128AB01333BA69460344BA77117B42"), principalOfBlob("xB4A5B665F0F07785FC8FE9670D294B132C495DF5310EDC52BC4C5B563D01831A"), principalOfBlob("x006C21C2653321F8DB3A8090E04D5421DD467C9901D4D0BE4D170CBD7D07B59B"), principalOfBlob("x44E400C7700249D0845B80AAE8FFC17A73FA1463DEDD315281B7B26695C2250C") ]; memory_size = ?11075234148023645762; cycles = ?8751695411709310091; idle_cycles_burned_per_day = ?15520120594818042759; module_hash = "x59269623C4F2132B5665BAE777340029CA504AE169BB216BA4B6C0FD4B8575BB" }; canister_id = ?principalOfBlob("x07170B03CAD68837D600C54C388FCBDADA3CA781F85F74BB9D0452A4DDE6F9AC") }; fallback_controller_principal_ids = [ principalOfBlob("x903657FE665A5CBB3BBA89E0EEF99A32F1E59F6500D8994DC38613B42F320D1D"), principalOfBlob("xBB057DE6FA4EF78246A84C8F29458BB3120BF3D5A3CEB77313EE4A33BB12F81B"), principalOfBlob("xF114A048ACC4FE4175092ED02876488A6F90DE98785BBB56DDFEC469A6A57BFC"), principalOfBlob("xD9872B36FAE628DB28AAC68C326F21F07EB61EBEA9D168CF23FA3C0588FF4FB1"), principalOfBlob("x59C01BD9777D2340E2162EC7D9467846A779FFB90E5E7718103D5944489393E5"), principalOfBlob("x450276583E57CC9E24FF6F68743D75767530F73F082FA0D54A85DE9E557EC1AD") ]; ledger_archive_canister_summaries = [ { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?12552520182419984227; controllers = [ principalOfBlob("xB141DC1B23542562B2A2F76BD1DC961785026BC2BC8FA33E9C4A9FA099591280"), principalOfBlob("xF847D88923E2995843426A088DD6964CF19B5D56E4A4B42F6E4230F20BCDB7E6"), principalOfBlob("x9524DC14BF3DA34BFE5BC8920BFEDBB8D1D51B7D81F8AEBE31D95C75A438D5FD") ]; memory_size = ?16335788060816098412; cycles = ?3910214845129744472; idle_cycles_burned_per_day = ?16200744282719421797; module_hash = "x75988030BFB44E9AF8BC1577E6AF6D58AA2D730A0F8E9F019C3C12D3AFF3093C" }; canister_id = ?principalOfBlob("x3009055777920A1F4A5A075F0A6D3566C1087B096EE7006DD7AF26E6F55C3112") } ]; ledger_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?4465671418507840855; controllers = [ principalOfBlob("xEA62CFEDA9B5D8D1176B3C1AD75BAD8BDC31EFFC0FA2E97A3A0BAF3C8995CD4E"), principalOfBlob("xAA1836F9C23DB5783AD136120AAE39C8FF25FBD126B0D83AA0E4E4AB6A4EBC0F"), principalOfBlob("xCA35119F54E2FC6B926C5A8D006F2193516C596150341FE0E79988E13F3DF0FA"), principalOfBlob("xAFBFCB4BCA25D29476190C4069A7EB7B974D564244A24BB4117DB36B22FFF4B9"), principalOfBlob("x073A0DB919E430CF5BA11B79FC879875F89F32720057BE518D6855E75A73CDA2"), principalOfBlob("xC57124FF42D1D4A59CA216275ABF2F3DC23C21291AE6DC57B814688984879296"), principalOfBlob("xBBE39F0B11670A49ED2DD4E1DDF5E43A6C8E23C9CE95D182BD2746C2A40293BD"), principalOfBlob("x3EF0951B7AE2567673E0DA8ECAD492E6EBC368C60ABA9FC17F039946138458FF") ]; memory_size = ?15154465751892058566; cycles = ?15443892870670433778; idle_cycles_burned_per_day = ?10988271528707275741; module_hash = "x66EC46D091183200DBEAD3B2BB61CBE4A6151B5CAC6136BCF1469F7FC9B5239B" }; canister_id = ?principalOfBlob("x6A50ED11A44CCA62E89E980927AABB4EAD3C107A69FF439F42F72B52467EED6D") }; swap_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?18296606480723259690; controllers = [ principalOfBlob("x23B3FCFB345C30F861416824C2745E786D1864928ACB882F0F476ABF28E1F424"), principalOfBlob("x544E5A84480EAB1EAAC3F4F406DCC0A8C7F4E697D479F779E0A552E0FD3D3FEE"), principalOfBlob("xDB2B09DF1FEBF65434322E77D526D0D4EC0EE21865E281F4FF16127A97E69583"), principalOfBlob("x6132A8D8B464328D0E336B2A5D439F89179C91E024AABD33A095D1C0A5E91534"), principalOfBlob("x5404CA76860EBDDC164E0F71509C098F121DEDE192E37981B600C48E432C43F6"), principalOfBlob("x5D87276897FAE9D03B58118D571285BEFC07DB74449414BCCC486B01A657C6B0"), principalOfBlob("x340EE6AF4A490ABE44C411C47CBA89E86D01B993AC6859A308687C37730771B9"), principalOfBlob("x00C5660F0CF45BDE2791A9F5B4D95E6D463AB9878A5A73BBF8AF58ACF73EE770") ]; memory_size = ?14301844175297951673; cycles = ?16567729542106230591; idle_cycles_burned_per_day = ?16564543755708648300; module_hash = "xA3E6F7CE93A32C368CBC0C6BB1066A28F224F7671C1F7AEBCF3E1B31EBEADB6B" }; canister_id = ?principalOfBlob("xAFB9D2EF376C47E7EDF2B7E50E57EFA446558CC1CD65637A52CCFAF877B3FC30") }; governance_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?4182138913221577685; controllers = [ principalOfBlob("xFA9EEBC8C96E56BD883B451001E13E323CEDC0A55F7B07224722398A70A620F6"), principalOfBlob("x8BDD1323A3F851F57F6C08B2DDDCCE7161FC922C2E2F33609A29E3E54E1D17CC"), principalOfBlob("x5AB977BF177968A3F168EFD7E1F4E360AC03B541C51F60525457310749585530"), principalOfBlob("xB661D899B6E81FD13DA52469941100D89A8C63C0AD95DA7EF0146CE6F171D7C7"), principalOfBlob("xEF22074BFFE5407906D510E2FDD6331EEEFC7560EF6B20E2DB89E92564431CCE"), principalOfBlob("xD5434CAF512981578DFA81A86927993C000C7028468E86C3260724A9A49FBAF8"), principalOfBlob("xF1176645FA7A486B2F0E9D2B1D43D3B40026D21957F26B84778CD8920C4FCA82"), principalOfBlob("xE73062C6507977EBF6310C2BBB023EAF035A92612E12DCEB905830C1E46C4E20"), principalOfBlob("xCF47D5A4E266E102FEB6CC8D2B51D6BA7F2969D586F06D15BB6AE5A2D5B63504") ]; memory_size = ?11915313668719021798; cycles = ?4442454642918859644; idle_cycles_burned_per_day = ?5893745729409764979; module_hash = "x5355175B16C478BA0905F111EBE059DD5E4B9A2EAEA2C1CB1A528AE5A445299C" }; canister_id = ?principalOfBlob("x02B224DAC3E338EF9F2FBE97ED3C09A5AD4928937D68376A99C6678FE828C726") }; root_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?11203704715994117571; controllers = [ principalOfBlob("x85E9DBF7A0973D2875A66395B30C925FBC3394DE0803104285CFCDF0534933BB") ]; memory_size = ?1838789555050525802; cycles = ?4397925236712483636; idle_cycles_burned_per_day = ?14921440742524096108; module_hash = "x63510258B4CF3D42D26C667B40A1BD0DDAD5C558B931017FCE80366697BBAE1E" }; canister_id = ?principalOfBlob("x292E72C2538FB19928CE78DFA8D3A8D9BEC11238056F777B8969DC2CDF1C9713") }; dapp_canister_summaries = [ { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?8482880577030986967; controllers = [ principalOfBlob("x441CBDC71686FE044A0DAFA1A3CFAE862ACD9233086678CC61889D2158A1D782"), principalOfBlob("x0D9E035CA10652DD062DAE0B8449A40EE0A4385CD6D063B616478F2C7F148EB8"), principalOfBlob("xCF0A141EDCB541CE68FACC76A79F0F76155886DD9B82D3E10BB243AEFBE08728"), principalOfBlob("xF5D50D69A0AA084599D3B76C59AAD0B5055E5DD85DD0C2C31D2BF14DF8F406EA"), principalOfBlob("xB5C7DB3A5A6802231B2245B0DE845C69F2DF3828FFD46F551422EEF14056EACB"), principalOfBlob("x61A10B2D3DEB24683B9A30D9FE564AC378DA54FBD07ACCB273B47A8778E17DA0"), principalOfBlob("x8608102333014F68590F6F4B47AA3A3B7FD1BB4F5B02D04DA3B5701C40F3CA17") ]; memory_size = ?729504357304895965; cycles = ?17807503602939906083; idle_cycles_burned_per_day = ?3214297893300422084; module_hash = "x90608BCEF057E116A4A7F36D044124DA4C7C44E660B312E0C0C28F55E50177AB" }; canister_id = ?principalOfBlob("x1E4D9191EDD6BE68E0E4AE09C1CEE8830A8B4C5300E113810C9958E8518C434C") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?8254137509381059906; controllers = [ principalOfBlob("xF95F8CEBE926A8CDF69687D758E365CE450E04A30D69FE7B647D5447BF469182"), principalOfBlob("x29E33AF8065D275189256774365D25A3DD59439FF7ABC6078DC51C9DB1F3DC50"), principalOfBlob("xC11C42CB42E78FECF4F2A65C172859EEBF3172A1912522124325DEFF7EED1DE5"), principalOfBlob("x1AE1C03199A76C7360F86887403805BF898923AAAD86B4D54B96A53BB707E842"), principalOfBlob("x03CBB46F5737D0D9DF4083AA614A4B3F2188710DA554261AF9A11926A7CB7913") ]; memory_size = ?15649185720120279181; cycles = ?9634679177880222075; idle_cycles_burned_per_day = ?6066099896213364828; module_hash = "x762C054122CABDE7A0544379DCF939698C883461A7247CDB357EEEF39732BBFE" }; canister_id = ?principalOfBlob("x3A6B7E038C28FFCB48A1893A09BDF29C2E691EBF151EB4BB423E0B41DB0497CC") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?12775742613039668435; controllers = [ principalOfBlob("x304A5AB833188D0BE99A70965E3F0B2E9723BCB0126AAA66085B398F6B6DE5B5") ]; memory_size = ?3101364785074010955; cycles = ?1232342300511980494; idle_cycles_burned_per_day = ?2263582805460746081; module_hash = "x796239BD27D560BA42B07E2D49CC616DA567A1BD0CFD4307423020F8803F5DF2" }; canister_id = ?principalOfBlob("xB395CC65AFF074FC339D21384EA6E8A5FE936D5C077247D7353B4D49F7951960") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?15069324533246124248; controllers = [ ]; memory_size = ?12258784977834942227; cycles = ?3736417075396975816; idle_cycles_burned_per_day = ?6185966150266433863; module_hash = "x2F66E4FABB33EB7BBF5E007B74003B653277724625BEEDCC872D546434F6DBF0" }; canister_id = ?principalOfBlob("x8CE66C4782C707C56C69D90E140B39B64C975EF2BBAF8E6C8C5DA09F20543F90") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?1583108365236200177; controllers = [ principalOfBlob("x4429BD484D2B886F9BBC105E40A30F889F5B655B8F76F44F8CE7A5FB49E844F6"), principalOfBlob("x19B43FFB573B18CDAFE9F563527253D328DA8E50F52C9839C57C0F0A5B669533"), principalOfBlob("x32959613AE1798E2F052309A472B9F802A714BA1B3943F90778C06D6DECBF456"), principalOfBlob("xAF544C75BEF44AB43B92563BB360E1FAEDDDED74BBB3B24B3969CCAAA44A884C"), principalOfBlob("xCA677266E85BC4AF1A08F230429D012C387C1CE67F67BC2EF2B68C013C1AC8CB"), principalOfBlob("xB8EC30F60B84F4C04F18B332A16B54E7328105F02426E832BCB9E1833792D3A0"), principalOfBlob("x9FC3045980FC13DD50516B8D19E86AE8E717DD7E9C64A3E066014364DAB512A6"), principalOfBlob("x2ECD96AFE552AA97EF9A0B5EB9CC8B0FCED8CC721CCD1A1EEB9335CD60412E01") ]; memory_size = ?14009985417011783676; cycles = ?432880929575849823; idle_cycles_burned_per_day = ?11055027654840189840; module_hash = "xAE4C8D4F0A5934EB946D98C1D8A68E9E64D5B0A3E6D72E38175E005560CDEA3F" }; canister_id = ?principalOfBlob("x29F5EA90E0151FE0CA55BCFEB01AF4C01A68D061C3EAD0DA7867119BB34AC340") } ] } }; latest_tally = ?{ no = 11320058956692584983; yes = 5502931723434008696; total = 1744715679854108155; timestamp_seconds = 2418021757549954461 }; reward_status = "UNKNOWN" # "int32"; decided_timestamp_seconds = 3725396257322059100; proposal = ?{ url = "695703797238195719"; title = ?"17466133503906431124"; action = ?#ExecuteNnsFunction({ nns_function = "UNKNOWN" # "int32"; payload = "x64B47CF3D2F4CA05F81439E5CB9B4E1D2A31AD04C5894916E28E4C750B7FED6C" }); summary = "12120695327075681384" }; proposer = ?{ id = 9508889665824686452 }; executed_timestamp_seconds = 3526838991561705357 } ]) + }; + public query func get_proposal_info(_arg0 : Nat64) : async (?T.ProposalInfo) { + (?{ id = ?{ id = 691703608542329411 }; status = "UNKNOWN" # "int32"; topic = "UNKNOWN" # "int32"; failure_reason = ?{ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" }; ballots = [ ( 16687275400884993694, { vote = "UNKNOWN" # "int32"; voting_power = 13368615419590941112 } ), ( 1961299418913621123, { vote = "UNKNOWN" # "int32"; voting_power = 8319634114298731338 } ), ( 16877987628876162418, { vote = "UNKNOWN" # "int32"; voting_power = 6686602144653530707 } ), ( 2492298073262282947, { vote = "UNKNOWN" # "int32"; voting_power = 12591018229732761422 } ), ( 9339131201452454247, { vote = "UNKNOWN" # "int32"; voting_power = 2076642980582058783 } ), ( 659621366998512483, { vote = "UNKNOWN" # "int32"; voting_power = 11049456158696049473 } ), ( 11154855875436227363, { vote = "UNKNOWN" # "int32"; voting_power = 12737262001801298209 } ) ]; proposal_timestamp_seconds = 12458059574603746480; reward_event_round = 2927777721278784320; deadline_timestamp_seconds = ?12902718304114919901; failed_timestamp_seconds = 12191348527236822644; reject_cost_e8s = 2442593438410932331; derived_proposal_information = ?{ swap_background_information = ?{ ledger_index_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?8887906422576077319; controllers = [ principalOfBlob("x53AC87C3BA2C2862749BC146F73CEE09E26FE080B457BBAA64896EAE3BB8086C"), principalOfBlob("x3907A1C0CA0853A14781BF48B04DA37F9E44099FB04223967517184AF314BA18"), principalOfBlob("x07A2316283F453F47B2562C96D72580DF9E989BB9865AA02D5BD913150088723") ]; memory_size = ?18170176200429203022; cycles = ?12859015125318872257; idle_cycles_burned_per_day = ?6018178890664841807; module_hash = "x9DBE302CA7F395B4F83CFDBE600FBE5070251AB749CDDA7CC9254A1BB6566DC5" }; canister_id = ?principalOfBlob("x22E3FB2CA50E8002B029FE6036E903CE4AC9DB607D163C5E128AB01333BA6946") }; fallback_controller_principal_ids = [ principalOfBlob("xB4A5B665F0F07785FC8FE9670D294B132C495DF5310EDC52BC4C5B563D01831A") ]; ledger_archive_canister_summaries = [ { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?7443852670344551416; controllers = [ principalOfBlob("xD4D0BE4D170CBD7D07B59BAD048044E400C7700249D0845B80AAE8FFC17A73FA"), principalOfBlob("xDD315281B7B26695C2250CE6344F42B6394DC722B38B7459C59B4474878B5AAD"), principalOfBlob("x59269623C4F2132B5665BAE777340029CA504AE169BB216BA4B6C0FD4B8575BB"), principalOfBlob("x07170B03CAD68837D600C54C388FCBDADA3CA781F85F74BB9D0452A4DDE6F9AC"), principalOfBlob("x285B464BB273C4903657FE665A5CBB3BBA89E0EEF99A32F1E59F6500D8994DC3"), principalOfBlob("x2F320D1D11A30CBB057DE6FA4EF78246A84C8F29458BB3120BF3D5A3CEB77313"), principalOfBlob("xBB12F81BE872B0F114A048ACC4FE4175092ED02876488A6F90DE98785BBB56DD"), principalOfBlob("xA6A57BFC526EB8D9872B36FAE628DB28AAC68C326F21F07EB61EBEA9D168CF23") ]; memory_size = ?13061242643874316168; cycles = ?3612869279778324569; idle_cycles_burned_per_day = ?12485906466426249792; module_hash = "x7846A779FFB90E5E7718103D5944489393E511D449450276583E57CC9E24FF6F" }; canister_id = ?principalOfBlob("x75767530F73F082FA0D54A85DE9E557EC1AD28B8294D1967E99A2B0B638F108D") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?8107802139216153083; controllers = [ principalOfBlob("x62B2A2F76BD1DC961785026BC2BC8FA33E9C4A9FA0995912805A2980F847D889"), principalOfBlob("x5843426A088DD6964CF19B5D56E4A4B42F6E4230F20BCDB7E6F06BB69524DC14"), principalOfBlob("x4BFE5BC8920BFEDBB8D1D51B7D81F8AEBE31D95C75A438D5FD7BAB0A6CC402CB"), principalOfBlob("x58E06A37AFDF4365856E04179BD475988030BFB44E9AF8BC1577E6AF6D58AA2D"), principalOfBlob("x8E9F019C3C12D3AFF3093C5A5DD13009055777920A1F4A5A075F0A6D3566C108") ]; memory_size = ?1866221632267026663; cycles = ?17751827028471012597; idle_cycles_burned_per_day = ?4465671418507840855; module_hash = "x90800D8A0117A3EA62CFEDA9B5D8D1176B3C1AD75BAD8BDC31EFFC0FA2E97A3A" }; canister_id = ?principalOfBlob("x8995CD4E8933E4AA1836F9C23DB5783AD136120AAE39C8FF25FBD126B0D83AA0") } ]; ledger_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?9149507503094779498; controllers = [ principalOfBlob("x6B926C5A8D006F2193516C596150341FE0E79988E13F3DF0FA3C05A2AFBFCB4B"), principalOfBlob("x9476190C4069A7EB7B974D564244A24BB4117DB36B22FFF4B9147F97073A0DB9"), principalOfBlob("xCF5BA11B79FC879875F89F32720057BE518D6855E75A73CDA2C954A2C57124FF"), principalOfBlob("xA59CA216275ABF2F3DC23C21291AE6DC57B814688984879296B47906BBE39F0B") ]; memory_size = ?17435085494431903049; cycles = ?13677090272921271012; idle_cycles_burned_per_day = ?1063489598509994389; module_hash = "xA40293BD03F3853EF0951B7AE2567673E0DA8ECAD492E6EBC368C60ABA9FC17F" }; canister_id = ?principalOfBlob("x138458FFED4490C661593E4F7A4FF2BD7F99BDBA53DDBB22ACBC2E7E66EC46D0") }; swap_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?17393389612615523072; controllers = [ principalOfBlob("x6136BCF1469F7FC9B5239B3C4CDB6A50ED11A44CCA62E89E980927AABB4EAD3C"), principalOfBlob("xFF439F42F72B52467EED6DB3F95E2AB19E96A79AEA54D3EBD59B37EF23B3FCFB"), principalOfBlob("xF861416824C2745E786D1864928ACB882F0F476ABF28E1F4245EA248544E5A84") ]; memory_size = ?17716042683316939294; cycles = ?9571442126274144448; idle_cycles_burned_per_day = ?12745277817847674745; module_hash = "xFD3D3FEE685590DB2B09DF1FEBF65434322E77D526D0D4EC0EE21865E281F4FF" }; canister_id = ?principalOfBlob("x97E695831CEB6F6132A8D8B464328D0E336B2A5D439F89179C91E024AABD33A0") }; governance_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?8076481036572551589; controllers = [ principalOfBlob("xDC164E0F71509C098F121DEDE192E37981B600C48E432C43F642BE1F5D872768"), principalOfBlob("xD03B58118D571285BEFC07DB74449414BCCC486B01A657C6B006861E340EE6AF"), principalOfBlob("xBE44C411C47CBA89E86D01B993AC6859A308687C37730771B9BC464300C5660F"), principalOfBlob("xDE2791A9F5B4D95E6D463AB9878A5A73BBF8AF58ACF73EE7708E8F44B9B79FC5"), principalOfBlob("x3FAFFC2B3D66EC6CCB6D79C814E1A3E6F7CE93A32C368CBC0C6BB1066A28F224"), principalOfBlob("x1F7AEBCF3E1B31EBEADB6B59E322AFB9D2EF376C47E7EDF2B7E50E57EFA44655") ]; memory_size = ?10374317497111962469; cycles = ?14568160938616992631; idle_cycles_burned_per_day = ?4182138913221577685; module_hash = "x6F41EE0E178784FA9EEBC8C96E56BD883B451001E13E323CEDC0A55F7B072247" }; canister_id = ?principalOfBlob("x70A620F68199248BDD1323A3F851F57F6C08B2DDDCCE7161FC922C2E2F33609A") }; root_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?16484703489043668302; controllers = [ ]; memory_size = ?14624562207529693603; cycles = ?8630376506631938275; idle_cycles_burned_per_day = ?2524040367311052831; module_hash = "x49585530B8ACC0B661D899B6E81FD13DA52469941100D89A8C63C0AD95DA7EF0" }; canister_id = ?principalOfBlob("xF171D7C7781F97EF22074BFFE5407906D510E2FDD6331EEEFC7560EF6B20E2DB") }; dapp_canister_summaries = [ { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?1621622771640189909; controllers = [ principalOfBlob("x993C000C7028468E86C3260724A9A49FBAF8A1DA58F1176645FA7A486B2F0E9D"), principalOfBlob("xD3B40026D21957F26B84778CD8920C4FCA820AA53BE73062C6507977EBF6310C"), principalOfBlob("x3EAF035A92612E12DCEB905830C1E46C4E20020378CF47D5A4E266E102FEB6CC"), principalOfBlob("xD6BA7F2969D586F06D15BB6AE5A2D5B6350431A711E68E5AD3A6B25B7CA3F6E9"), principalOfBlob("x73CEF1B583CACA5355175B16C478BA0905F111EBE059DD5E4B9A2EAEA2C1CB1A") ]; memory_size = ?5690267324002157988; cycles = ?1817452879961960962; idle_cycles_burned_per_day = ?3980317406675312623; module_hash = "x09A5AD4928937D68376A99C6678FE828C726F0A4E2C3B53255148E7B91EED999" }; canister_id = ?principalOfBlob("x85E9DBF7A0973D2875A66395B30C925FBC3394DE0803104285CFCDF0534933BB") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?1838789555050525802; controllers = [ principalOfBlob("x6C8E30534C9B1363510258B4CF3D42D26C667B40A1BD0DDAD5C558B931017FCE"), principalOfBlob("x97BBAE1E81346B292E72C2538FB19928CE78DFA8D3A8D9BEC11238056F777B89"), principalOfBlob("xDF1C971399D961D543EBFA655415D71CFEC9F03EB9E3FC6A253F9BD7441CBDC7"), principalOfBlob("x044A0DAFA1A3CFAE862ACD9233086678CC61889D2158A1D782E0BC1A0D9E035C"), principalOfBlob("xDD062DAE0B8449A40EE0A4385CD6D063B616478F2C7F148EB8808138CF0A141E"), principalOfBlob("xCE68FACC76A79F0F76155886DD9B82D3E10BB243AEFBE08728CC81CAF5D50D69") ]; memory_size = ?3434655989298862405; cycles = ?2908718829872199120; idle_cycles_burned_per_day = ?1391033027412607696; module_hash = "xF8F406EA8C6367B5C7DB3A5A6802231B2245B0DE845C69F2DF3828FFD46F5514" }; canister_id = ?principalOfBlob("x4056EACBD2051161A10B2D3DEB24683B9A30D9FE564AC378DA54FBD07ACCB273") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?9395760086799737208; controllers = [ ]; memory_size = ?4731672747817523560; cycles = ?13068126411837881146; idle_cycles_burned_per_day = ?5988785529927094274; module_hash = "x40F3CA17F9A875DD09420F59B81F23C8B8BD2DF620C4457564E77A9B90608BCE" }; canister_id = ?principalOfBlob("x16A4A7F36D044124DA4C7C44E660B312E0C0C28F55E50177ABE2BC6B1E4D9191") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?11371238356490182760; controllers = [ principalOfBlob("xE113810C9958E8518C434C4FFBDF42B5E21D55968CCB74651A5663C3F95F8CEB"), principalOfBlob("xCDF69687D758E365CE450E04A30D69FE7B647D5447BF469182966D2D29E33AF8") ]; memory_size = ?4637923064836098385; cycles = ?14625333426528297765; idle_cycles_burned_per_day = ?3863275690153985707; module_hash = "xB1F3DC508E9102C11C42CB42E78FECF4F2A65C172859EEBF3172A19125221243" }; canister_id = ?principalOfBlob("x7EED1DE58AFFAE1AE1C03199A76C7360F86887403805BF898923AAAD86B4D54B") } ] } }; latest_tally = ?{ no = 2283243304741504951; yes = 1427701930552249091; total = 5497313680133513177; timestamp_seconds = 6027238457571622731 }; reward_status = "UNKNOWN" # "int32"; decided_timestamp_seconds = 12476688001136207444; proposal = ?{ url = "15858948384669420455"; title = ?"15649185720120279181"; action = ?#RewardNodeProvider({ node_provider = ?{ id = ?principalOfBlob("x5CE0D44DB71D2F762C054122CABDE7A0544379DCF939698C883461A7247CDB35"); reward_account = ?{ hash = "x9732BBFE82BF533A6B7E038C28FFCB48A1893A09BDF29C2E691EBF151EB4BB42" } }; reward_mode = ?#RewardToAccount({ to_account = ?{ hash = "xD3DC0CC0378E4C91F6DDF99A4A23304A5AB833188D0BE99A70965E3F0B2E9723" } }); amount_e8s = 2634387370180782698 }); summary = "8344054194166394219" }; proposer = ?{ id = 3101364785074010955 }; executed_timestamp_seconds = 1232342300511980494 }) + }; + public query func get_restore_aging_summary() : async (T.RestoreAgingSummary) { + ({ groups = [ { count = ?1907006715546714179; previous_total_stake_e8s = ?15493554583224738855; current_total_stake_e8s = ?16687275400884993694; group_type = "UNKNOWN" # "int32" } ]; timestamp_seconds = ?13368615419590941112 }) + }; + public query func list_known_neurons() : async (T.ListKnownNeuronsResponse) { + ({ known_neurons = [ { id = ?{ id = 1907006715546714179 }; known_neuron_data = ?{ name = "15493554583224738855"; description = ?"16687275400884993694" } } ] }) + }; + public query func list_neurons(_arg0 : T.ListNeurons) : async (T.ListNeuronsResponse) { + ({ neuron_infos = [ ( 1907006715546714179, { dissolve_delay_seconds = 15493554583224738855; recent_ballots = [ { vote = "UNKNOWN" # "int32"; proposal_id = ?{ id = 13368615419590941112 } }, { vote = "UNKNOWN" # "int32"; proposal_id = ?{ id = 1961299418913621123 } }, { vote = "UNKNOWN" # "int32"; proposal_id = ?{ id = 8319634114298731338 } }, { vote = "UNKNOWN" # "int32"; proposal_id = ?{ id = 16877987628876162418 } }, { vote = "UNKNOWN" # "int32"; proposal_id = ?{ id = 6686602144653530707 } }, { vote = "UNKNOWN" # "int32"; proposal_id = ?{ id = 2492298073262282947 } } ]; neuron_type = ?"UNKNOWN" # "int32"; created_timestamp_seconds = 12591018229732761422; state = "UNKNOWN" # "int32"; stake_e8s = 9339131201452454247; joined_community_fund_timestamp_seconds = ?2076642980582058783; retrieved_at_timestamp_seconds = 659621366998512483; known_neuron_data = ?{ name = "11049456158696049473"; description = ?"11154855875436227363" }; voting_power = 12737262001801298209; age_seconds = 12458059574603746480 } ) ]; full_neurons = [ ] }) + }; + public query func list_node_providers() : async (T.ListNodeProvidersResponse) { + ({ node_providers = [ { id = ?principalOfBlob("x43407208810C7727643C19CE29049E3EDD6A901C95B81987E7E4DC8683C4861A"); reward_account = ?{ hash = "x4A5BFFCB25477572E5993653A83A535670323995CBC3583093E46B964E5FB0AF" } } ] }) + }; + public query func list_proposals(_arg0 : T.ListProposalInfo) : async (T.ListProposalInfoResponse) { + ({ proposal_info = [ { id = ?{ id = 1907006715546714179 }; status = "UNKNOWN" # "int32"; topic = "UNKNOWN" # "int32"; failure_reason = ?{ error_message = "15493554583224738855"; error_type = "UNKNOWN" # "int32" }; ballots = [ ( 13368615419590941112, { vote = "UNKNOWN" # "int32"; voting_power = 1961299418913621123 } ), ( 8319634114298731338, { vote = "UNKNOWN" # "int32"; voting_power = 16877987628876162418 } ), ( 6686602144653530707, { vote = "UNKNOWN" # "int32"; voting_power = 2492298073262282947 } ), ( 12591018229732761422, { vote = "UNKNOWN" # "int32"; voting_power = 9339131201452454247 } ), ( 2076642980582058783, { vote = "UNKNOWN" # "int32"; voting_power = 659621366998512483 } ), ( 11049456158696049473, { vote = "UNKNOWN" # "int32"; voting_power = 11154855875436227363 } ) ]; proposal_timestamp_seconds = 12737262001801298209; reward_event_round = 12458059574603746480; deadline_timestamp_seconds = ?2927777721278784320; failed_timestamp_seconds = 12902718304114919901; reject_cost_e8s = 12191348527236822644; derived_proposal_information = ?{ swap_background_information = ?{ ledger_index_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?2442593438410932331; controllers = [ principalOfBlob("x796744B72478AB53AC87C3BA2C2862749BC146F73CEE09E26FE080B457BBAA64"), principalOfBlob("x3BB8086C60F0173907A1C0CA0853A14781BF48B04DA37F9E44099FB042239675"), principalOfBlob("xF314BA18C8055D07A2316283F453F47B2562C96D72580DF9E989BB9865AA02D5"), principalOfBlob("x5008872364D1934EEED60CFC6E29C1AC01622066744F12D5BCD0DD849DBE302C"), principalOfBlob("xB4F83CFDBE600FBE5070251AB749CDDA7CC9254A1BB6566DC5A62A5122E3FB2C"), principalOfBlob("x02B029FE6036E903CE4AC9DB607D163C5E128AB01333BA69460344BA77117B42"), principalOfBlob("xB4A5B665F0F07785FC8FE9670D294B132C495DF5310EDC52BC4C5B563D01831A"), principalOfBlob("x006C21C2653321F8DB3A8090E04D5421DD467C9901D4D0BE4D170CBD7D07B59B"), principalOfBlob("x44E400C7700249D0845B80AAE8FFC17A73FA1463DEDD315281B7B26695C2250C") ]; memory_size = ?11075234148023645762; cycles = ?8751695411709310091; idle_cycles_burned_per_day = ?15520120594818042759; module_hash = "x59269623C4F2132B5665BAE777340029CA504AE169BB216BA4B6C0FD4B8575BB" }; canister_id = ?principalOfBlob("x07170B03CAD68837D600C54C388FCBDADA3CA781F85F74BB9D0452A4DDE6F9AC") }; fallback_controller_principal_ids = [ principalOfBlob("x903657FE665A5CBB3BBA89E0EEF99A32F1E59F6500D8994DC38613B42F320D1D"), principalOfBlob("xBB057DE6FA4EF78246A84C8F29458BB3120BF3D5A3CEB77313EE4A33BB12F81B"), principalOfBlob("xF114A048ACC4FE4175092ED02876488A6F90DE98785BBB56DDFEC469A6A57BFC"), principalOfBlob("xD9872B36FAE628DB28AAC68C326F21F07EB61EBEA9D168CF23FA3C0588FF4FB1"), principalOfBlob("x59C01BD9777D2340E2162EC7D9467846A779FFB90E5E7718103D5944489393E5"), principalOfBlob("x450276583E57CC9E24FF6F68743D75767530F73F082FA0D54A85DE9E557EC1AD") ]; ledger_archive_canister_summaries = [ { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?12552520182419984227; controllers = [ principalOfBlob("xB141DC1B23542562B2A2F76BD1DC961785026BC2BC8FA33E9C4A9FA099591280"), principalOfBlob("xF847D88923E2995843426A088DD6964CF19B5D56E4A4B42F6E4230F20BCDB7E6"), principalOfBlob("x9524DC14BF3DA34BFE5BC8920BFEDBB8D1D51B7D81F8AEBE31D95C75A438D5FD") ]; memory_size = ?16335788060816098412; cycles = ?3910214845129744472; idle_cycles_burned_per_day = ?16200744282719421797; module_hash = "x75988030BFB44E9AF8BC1577E6AF6D58AA2D730A0F8E9F019C3C12D3AFF3093C" }; canister_id = ?principalOfBlob("x3009055777920A1F4A5A075F0A6D3566C1087B096EE7006DD7AF26E6F55C3112") } ]; ledger_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?4465671418507840855; controllers = [ principalOfBlob("xEA62CFEDA9B5D8D1176B3C1AD75BAD8BDC31EFFC0FA2E97A3A0BAF3C8995CD4E"), principalOfBlob("xAA1836F9C23DB5783AD136120AAE39C8FF25FBD126B0D83AA0E4E4AB6A4EBC0F"), principalOfBlob("xCA35119F54E2FC6B926C5A8D006F2193516C596150341FE0E79988E13F3DF0FA"), principalOfBlob("xAFBFCB4BCA25D29476190C4069A7EB7B974D564244A24BB4117DB36B22FFF4B9"), principalOfBlob("x073A0DB919E430CF5BA11B79FC879875F89F32720057BE518D6855E75A73CDA2"), principalOfBlob("xC57124FF42D1D4A59CA216275ABF2F3DC23C21291AE6DC57B814688984879296"), principalOfBlob("xBBE39F0B11670A49ED2DD4E1DDF5E43A6C8E23C9CE95D182BD2746C2A40293BD"), principalOfBlob("x3EF0951B7AE2567673E0DA8ECAD492E6EBC368C60ABA9FC17F039946138458FF") ]; memory_size = ?15154465751892058566; cycles = ?15443892870670433778; idle_cycles_burned_per_day = ?10988271528707275741; module_hash = "x66EC46D091183200DBEAD3B2BB61CBE4A6151B5CAC6136BCF1469F7FC9B5239B" }; canister_id = ?principalOfBlob("x6A50ED11A44CCA62E89E980927AABB4EAD3C107A69FF439F42F72B52467EED6D") }; swap_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?18296606480723259690; controllers = [ principalOfBlob("x23B3FCFB345C30F861416824C2745E786D1864928ACB882F0F476ABF28E1F424"), principalOfBlob("x544E5A84480EAB1EAAC3F4F406DCC0A8C7F4E697D479F779E0A552E0FD3D3FEE"), principalOfBlob("xDB2B09DF1FEBF65434322E77D526D0D4EC0EE21865E281F4FF16127A97E69583"), principalOfBlob("x6132A8D8B464328D0E336B2A5D439F89179C91E024AABD33A095D1C0A5E91534"), principalOfBlob("x5404CA76860EBDDC164E0F71509C098F121DEDE192E37981B600C48E432C43F6"), principalOfBlob("x5D87276897FAE9D03B58118D571285BEFC07DB74449414BCCC486B01A657C6B0"), principalOfBlob("x340EE6AF4A490ABE44C411C47CBA89E86D01B993AC6859A308687C37730771B9"), principalOfBlob("x00C5660F0CF45BDE2791A9F5B4D95E6D463AB9878A5A73BBF8AF58ACF73EE770") ]; memory_size = ?14301844175297951673; cycles = ?16567729542106230591; idle_cycles_burned_per_day = ?16564543755708648300; module_hash = "xA3E6F7CE93A32C368CBC0C6BB1066A28F224F7671C1F7AEBCF3E1B31EBEADB6B" }; canister_id = ?principalOfBlob("xAFB9D2EF376C47E7EDF2B7E50E57EFA446558CC1CD65637A52CCFAF877B3FC30") }; governance_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?4182138913221577685; controllers = [ principalOfBlob("xFA9EEBC8C96E56BD883B451001E13E323CEDC0A55F7B07224722398A70A620F6"), principalOfBlob("x8BDD1323A3F851F57F6C08B2DDDCCE7161FC922C2E2F33609A29E3E54E1D17CC"), principalOfBlob("x5AB977BF177968A3F168EFD7E1F4E360AC03B541C51F60525457310749585530"), principalOfBlob("xB661D899B6E81FD13DA52469941100D89A8C63C0AD95DA7EF0146CE6F171D7C7"), principalOfBlob("xEF22074BFFE5407906D510E2FDD6331EEEFC7560EF6B20E2DB89E92564431CCE"), principalOfBlob("xD5434CAF512981578DFA81A86927993C000C7028468E86C3260724A9A49FBAF8"), principalOfBlob("xF1176645FA7A486B2F0E9D2B1D43D3B40026D21957F26B84778CD8920C4FCA82"), principalOfBlob("xE73062C6507977EBF6310C2BBB023EAF035A92612E12DCEB905830C1E46C4E20"), principalOfBlob("xCF47D5A4E266E102FEB6CC8D2B51D6BA7F2969D586F06D15BB6AE5A2D5B63504") ]; memory_size = ?11915313668719021798; cycles = ?4442454642918859644; idle_cycles_burned_per_day = ?5893745729409764979; module_hash = "x5355175B16C478BA0905F111EBE059DD5E4B9A2EAEA2C1CB1A528AE5A445299C" }; canister_id = ?principalOfBlob("x02B224DAC3E338EF9F2FBE97ED3C09A5AD4928937D68376A99C6678FE828C726") }; root_canister_summary = ?{ status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?11203704715994117571; controllers = [ principalOfBlob("x85E9DBF7A0973D2875A66395B30C925FBC3394DE0803104285CFCDF0534933BB") ]; memory_size = ?1838789555050525802; cycles = ?4397925236712483636; idle_cycles_burned_per_day = ?14921440742524096108; module_hash = "x63510258B4CF3D42D26C667B40A1BD0DDAD5C558B931017FCE80366697BBAE1E" }; canister_id = ?principalOfBlob("x292E72C2538FB19928CE78DFA8D3A8D9BEC11238056F777B8969DC2CDF1C9713") }; dapp_canister_summaries = [ { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?8482880577030986967; controllers = [ principalOfBlob("x441CBDC71686FE044A0DAFA1A3CFAE862ACD9233086678CC61889D2158A1D782"), principalOfBlob("x0D9E035CA10652DD062DAE0B8449A40EE0A4385CD6D063B616478F2C7F148EB8"), principalOfBlob("xCF0A141EDCB541CE68FACC76A79F0F76155886DD9B82D3E10BB243AEFBE08728"), principalOfBlob("xF5D50D69A0AA084599D3B76C59AAD0B5055E5DD85DD0C2C31D2BF14DF8F406EA"), principalOfBlob("xB5C7DB3A5A6802231B2245B0DE845C69F2DF3828FFD46F551422EEF14056EACB"), principalOfBlob("x61A10B2D3DEB24683B9A30D9FE564AC378DA54FBD07ACCB273B47A8778E17DA0"), principalOfBlob("x8608102333014F68590F6F4B47AA3A3B7FD1BB4F5B02D04DA3B5701C40F3CA17") ]; memory_size = ?729504357304895965; cycles = ?17807503602939906083; idle_cycles_burned_per_day = ?3214297893300422084; module_hash = "x90608BCEF057E116A4A7F36D044124DA4C7C44E660B312E0C0C28F55E50177AB" }; canister_id = ?principalOfBlob("x1E4D9191EDD6BE68E0E4AE09C1CEE8830A8B4C5300E113810C9958E8518C434C") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?8254137509381059906; controllers = [ principalOfBlob("xF95F8CEBE926A8CDF69687D758E365CE450E04A30D69FE7B647D5447BF469182"), principalOfBlob("x29E33AF8065D275189256774365D25A3DD59439FF7ABC6078DC51C9DB1F3DC50"), principalOfBlob("xC11C42CB42E78FECF4F2A65C172859EEBF3172A1912522124325DEFF7EED1DE5"), principalOfBlob("x1AE1C03199A76C7360F86887403805BF898923AAAD86B4D54B96A53BB707E842"), principalOfBlob("x03CBB46F5737D0D9DF4083AA614A4B3F2188710DA554261AF9A11926A7CB7913") ]; memory_size = ?15649185720120279181; cycles = ?9634679177880222075; idle_cycles_burned_per_day = ?6066099896213364828; module_hash = "x762C054122CABDE7A0544379DCF939698C883461A7247CDB357EEEF39732BBFE" }; canister_id = ?principalOfBlob("x3A6B7E038C28FFCB48A1893A09BDF29C2E691EBF151EB4BB423E0B41DB0497CC") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?12775742613039668435; controllers = [ principalOfBlob("x304A5AB833188D0BE99A70965E3F0B2E9723BCB0126AAA66085B398F6B6DE5B5") ]; memory_size = ?3101364785074010955; cycles = ?1232342300511980494; idle_cycles_burned_per_day = ?2263582805460746081; module_hash = "x796239BD27D560BA42B07E2D49CC616DA567A1BD0CFD4307423020F8803F5DF2" }; canister_id = ?principalOfBlob("xB395CC65AFF074FC339D21384EA6E8A5FE936D5C077247D7353B4D49F7951960") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?15069324533246124248; controllers = [ ]; memory_size = ?12258784977834942227; cycles = ?3736417075396975816; idle_cycles_burned_per_day = ?6185966150266433863; module_hash = "x2F66E4FABB33EB7BBF5E007B74003B653277724625BEEDCC872D546434F6DBF0" }; canister_id = ?principalOfBlob("x8CE66C4782C707C56C69D90E140B39B64C975EF2BBAF8E6C8C5DA09F20543F90") }, { status = ?{ status = ?"UNKNOWN" # "int32"; freezing_threshold = ?1583108365236200177; controllers = [ principalOfBlob("x4429BD484D2B886F9BBC105E40A30F889F5B655B8F76F44F8CE7A5FB49E844F6"), principalOfBlob("x19B43FFB573B18CDAFE9F563527253D328DA8E50F52C9839C57C0F0A5B669533"), principalOfBlob("x32959613AE1798E2F052309A472B9F802A714BA1B3943F90778C06D6DECBF456"), principalOfBlob("xAF544C75BEF44AB43B92563BB360E1FAEDDDED74BBB3B24B3969CCAAA44A884C"), principalOfBlob("xCA677266E85BC4AF1A08F230429D012C387C1CE67F67BC2EF2B68C013C1AC8CB"), principalOfBlob("xB8EC30F60B84F4C04F18B332A16B54E7328105F02426E832BCB9E1833792D3A0"), principalOfBlob("x9FC3045980FC13DD50516B8D19E86AE8E717DD7E9C64A3E066014364DAB512A6"), principalOfBlob("x2ECD96AFE552AA97EF9A0B5EB9CC8B0FCED8CC721CCD1A1EEB9335CD60412E01") ]; memory_size = ?14009985417011783676; cycles = ?432880929575849823; idle_cycles_burned_per_day = ?11055027654840189840; module_hash = "xAE4C8D4F0A5934EB946D98C1D8A68E9E64D5B0A3E6D72E38175E005560CDEA3F" }; canister_id = ?principalOfBlob("x29F5EA90E0151FE0CA55BCFEB01AF4C01A68D061C3EAD0DA7867119BB34AC340") } ] } }; latest_tally = ?{ no = 11320058956692584983; yes = 5502931723434008696; total = 1744715679854108155; timestamp_seconds = 2418021757549954461 }; reward_status = "UNKNOWN" # "int32"; decided_timestamp_seconds = 3725396257322059100; proposal = ?{ url = "695703797238195719"; title = ?"17466133503906431124"; action = ?#ExecuteNnsFunction({ nns_function = "UNKNOWN" # "int32"; payload = "x64B47CF3D2F4CA05F81439E5CB9B4E1D2A31AD04C5894916E28E4C750B7FED6C" }); summary = "12120695327075681384" }; proposer = ?{ id = 9508889665824686452 }; executed_timestamp_seconds = 3526838991561705357 } ] }) + }; + public shared func manage_neuron(_arg0 : T.ManageNeuron) : async (T.ManageNeuronResponse) { + ({ command = ?#Split({ created_neuron_id = ?{ id = 1907006715546714179 } }) }) + }; + public shared func settle_community_fund_participation(_arg0 : T.SettleCommunityFundParticipation) : async (T.Result) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public shared func settle_neurons_fund_participation(_arg0 : T.SettleNeuronsFundParticipationRequest) : async (T.SettleNeuronsFundParticipationResponse) { + ({ result = ?#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" }) }) + }; + public shared func simulate_manage_neuron(_arg0 : T.ManageNeuron) : async (T.ManageNeuronResponse) { + ({ command = ?#Split({ created_neuron_id = ?{ id = 1907006715546714179 } }) }) + }; + public shared func transfer_gtc_neuron(_arg0 : T.NeuronId, _arg1 : T.NeuronId) : async (T.Result) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; + public shared func update_node_provider(_arg0 : T.UpdateNodeProvider) : async (T.Result) { + (#Err({ error_message = "1907006715546714179"; error_type = "UNKNOWN" # "int32" })) + }; +} diff --git a/ic/governance/agent.go b/ic/governance/agent.go new file mode 100755 index 0000000..486e698 --- /dev/null +++ b/ic/governance/agent.go @@ -0,0 +1,1444 @@ +// Package governance provides a client for the "governance" canister. +// Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go. +package governance + +import ( + "github.com/aviate-labs/agent-go" + "github.com/aviate-labs/agent-go/candid/idl" + "github.com/aviate-labs/agent-go/principal" +) + +type AccountIdentifier struct { + Hash []byte `ic:"hash" json:"hash"` +} + +type Action struct { + RegisterKnownNeuron *KnownNeuron `ic:"RegisterKnownNeuron,variant"` + ManageNeuron *ManageNeuron `ic:"ManageNeuron,variant"` + CreateServiceNervousSystem *CreateServiceNervousSystem `ic:"CreateServiceNervousSystem,variant"` + ExecuteNnsFunction *ExecuteNnsFunction `ic:"ExecuteNnsFunction,variant"` + RewardNodeProvider *RewardNodeProvider `ic:"RewardNodeProvider,variant"` + OpenSnsTokenSwap *OpenSnsTokenSwap `ic:"OpenSnsTokenSwap,variant"` + SetSnsTokenSwapOpenTimeWindow *SetSnsTokenSwapOpenTimeWindow `ic:"SetSnsTokenSwapOpenTimeWindow,variant"` + SetDefaultFollowees *SetDefaultFollowees `ic:"SetDefaultFollowees,variant"` + RewardNodeProviders *RewardNodeProviders `ic:"RewardNodeProviders,variant"` + ManageNetworkEconomics *NetworkEconomics `ic:"ManageNetworkEconomics,variant"` + ApproveGenesisKyc *ApproveGenesisKyc `ic:"ApproveGenesisKyc,variant"` + AddOrRemoveNodeProvider *AddOrRemoveNodeProvider `ic:"AddOrRemoveNodeProvider,variant"` + Motion *Motion `ic:"Motion,variant"` +} + +type AddHotKey struct { + NewHotKey *principal.Principal `ic:"new_hot_key,omitempty" json:"new_hot_key,omitempty"` +} + +type AddOrRemoveNodeProvider struct { + Change *Change `ic:"change,omitempty" json:"change,omitempty"` +} + +// Agent is a client for the "governance" canister. +type Agent struct { + *agent.Agent + CanisterId principal.Principal +} + +// NewAgent creates a new agent for the "governance" canister. +func NewAgent(canisterId principal.Principal, config agent.Config) (*Agent, error) { + a, err := agent.New(config) + if err != nil { + return nil, err + } + return &Agent{ + Agent: a, + CanisterId: canisterId, + }, nil +} + +// ClaimGtcNeurons calls the "claim_gtc_neurons" method on the "governance" canister. +func (a Agent) ClaimGtcNeurons(arg0 principal.Principal, arg1 []NeuronId) (*Result, error) { + var r0 Result + if err := a.Agent.Call( + a.CanisterId, + "claim_gtc_neurons", + []any{arg0, arg1}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// ClaimOrRefreshNeuronFromAccount calls the "claim_or_refresh_neuron_from_account" method on the "governance" canister. +func (a Agent) ClaimOrRefreshNeuronFromAccount(arg0 ClaimOrRefreshNeuronFromAccount) (*ClaimOrRefreshNeuronFromAccountResponse, error) { + var r0 ClaimOrRefreshNeuronFromAccountResponse + if err := a.Agent.Call( + a.CanisterId, + "claim_or_refresh_neuron_from_account", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetBuildMetadata calls the "get_build_metadata" method on the "governance" canister. +func (a Agent) GetBuildMetadata() (*string, error) { + var r0 string + if err := a.Agent.Query( + a.CanisterId, + "get_build_metadata", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetFullNeuron calls the "get_full_neuron" method on the "governance" canister. +func (a Agent) GetFullNeuron(arg0 uint64) (*Result2, error) { + var r0 Result2 + if err := a.Agent.Query( + a.CanisterId, + "get_full_neuron", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetFullNeuronByIdOrSubaccount calls the "get_full_neuron_by_id_or_subaccount" method on the "governance" canister. +func (a Agent) GetFullNeuronByIdOrSubaccount(arg0 NeuronIdOrSubaccount) (*Result2, error) { + var r0 Result2 + if err := a.Agent.Query( + a.CanisterId, + "get_full_neuron_by_id_or_subaccount", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetLatestRewardEvent calls the "get_latest_reward_event" method on the "governance" canister. +func (a Agent) GetLatestRewardEvent() (*RewardEvent, error) { + var r0 RewardEvent + if err := a.Agent.Query( + a.CanisterId, + "get_latest_reward_event", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetMetrics calls the "get_metrics" method on the "governance" canister. +func (a Agent) GetMetrics() (*Result3, error) { + var r0 Result3 + if err := a.Agent.Query( + a.CanisterId, + "get_metrics", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetMonthlyNodeProviderRewards calls the "get_monthly_node_provider_rewards" method on the "governance" canister. +func (a Agent) GetMonthlyNodeProviderRewards() (*Result4, error) { + var r0 Result4 + if err := a.Agent.Call( + a.CanisterId, + "get_monthly_node_provider_rewards", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetMostRecentMonthlyNodeProviderRewards calls the "get_most_recent_monthly_node_provider_rewards" method on the "governance" canister. +func (a Agent) GetMostRecentMonthlyNodeProviderRewards() (**MostRecentMonthlyNodeProviderRewards, error) { + var r0 *MostRecentMonthlyNodeProviderRewards + if err := a.Agent.Query( + a.CanisterId, + "get_most_recent_monthly_node_provider_rewards", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetNetworkEconomicsParameters calls the "get_network_economics_parameters" method on the "governance" canister. +func (a Agent) GetNetworkEconomicsParameters() (*NetworkEconomics, error) { + var r0 NetworkEconomics + if err := a.Agent.Query( + a.CanisterId, + "get_network_economics_parameters", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetNeuronIds calls the "get_neuron_ids" method on the "governance" canister. +func (a Agent) GetNeuronIds() (*[]uint64, error) { + var r0 []uint64 + if err := a.Agent.Query( + a.CanisterId, + "get_neuron_ids", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetNeuronInfo calls the "get_neuron_info" method on the "governance" canister. +func (a Agent) GetNeuronInfo(arg0 uint64) (*Result5, error) { + var r0 Result5 + if err := a.Agent.Query( + a.CanisterId, + "get_neuron_info", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetNeuronInfoByIdOrSubaccount calls the "get_neuron_info_by_id_or_subaccount" method on the "governance" canister. +func (a Agent) GetNeuronInfoByIdOrSubaccount(arg0 NeuronIdOrSubaccount) (*Result5, error) { + var r0 Result5 + if err := a.Agent.Query( + a.CanisterId, + "get_neuron_info_by_id_or_subaccount", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetNeuronsFundAuditInfo calls the "get_neurons_fund_audit_info" method on the "governance" canister. +func (a Agent) GetNeuronsFundAuditInfo(arg0 GetNeuronsFundAuditInfoRequest) (*GetNeuronsFundAuditInfoResponse, error) { + var r0 GetNeuronsFundAuditInfoResponse + if err := a.Agent.Query( + a.CanisterId, + "get_neurons_fund_audit_info", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetNodeProviderByCaller calls the "get_node_provider_by_caller" method on the "governance" canister. +func (a Agent) GetNodeProviderByCaller(arg0 idl.Null) (*Result7, error) { + var r0 Result7 + if err := a.Agent.Query( + a.CanisterId, + "get_node_provider_by_caller", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetPendingProposals calls the "get_pending_proposals" method on the "governance" canister. +func (a Agent) GetPendingProposals() (*[]ProposalInfo, error) { + var r0 []ProposalInfo + if err := a.Agent.Query( + a.CanisterId, + "get_pending_proposals", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetProposalInfo calls the "get_proposal_info" method on the "governance" canister. +func (a Agent) GetProposalInfo(arg0 uint64) (**ProposalInfo, error) { + var r0 *ProposalInfo + if err := a.Agent.Query( + a.CanisterId, + "get_proposal_info", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetRestoreAgingSummary calls the "get_restore_aging_summary" method on the "governance" canister. +func (a Agent) GetRestoreAgingSummary() (*RestoreAgingSummary, error) { + var r0 RestoreAgingSummary + if err := a.Agent.Query( + a.CanisterId, + "get_restore_aging_summary", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// ListKnownNeurons calls the "list_known_neurons" method on the "governance" canister. +func (a Agent) ListKnownNeurons() (*ListKnownNeuronsResponse, error) { + var r0 ListKnownNeuronsResponse + if err := a.Agent.Query( + a.CanisterId, + "list_known_neurons", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// ListNeurons calls the "list_neurons" method on the "governance" canister. +func (a Agent) ListNeurons(arg0 ListNeurons) (*ListNeuronsResponse, error) { + var r0 ListNeuronsResponse + if err := a.Agent.Query( + a.CanisterId, + "list_neurons", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// ListNodeProviders calls the "list_node_providers" method on the "governance" canister. +func (a Agent) ListNodeProviders() (*ListNodeProvidersResponse, error) { + var r0 ListNodeProvidersResponse + if err := a.Agent.Query( + a.CanisterId, + "list_node_providers", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// ListProposals calls the "list_proposals" method on the "governance" canister. +func (a Agent) ListProposals(arg0 ListProposalInfo) (*ListProposalInfoResponse, error) { + var r0 ListProposalInfoResponse + if err := a.Agent.Query( + a.CanisterId, + "list_proposals", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// ManageNeuron calls the "manage_neuron" method on the "governance" canister. +func (a Agent) ManageNeuron(arg0 ManageNeuron) (*ManageNeuronResponse, error) { + var r0 ManageNeuronResponse + if err := a.Agent.Call( + a.CanisterId, + "manage_neuron", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// SettleCommunityFundParticipation calls the "settle_community_fund_participation" method on the "governance" canister. +func (a Agent) SettleCommunityFundParticipation(arg0 SettleCommunityFundParticipation) (*Result, error) { + var r0 Result + if err := a.Agent.Call( + a.CanisterId, + "settle_community_fund_participation", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// SettleNeuronsFundParticipation calls the "settle_neurons_fund_participation" method on the "governance" canister. +func (a Agent) SettleNeuronsFundParticipation(arg0 SettleNeuronsFundParticipationRequest) (*SettleNeuronsFundParticipationResponse, error) { + var r0 SettleNeuronsFundParticipationResponse + if err := a.Agent.Call( + a.CanisterId, + "settle_neurons_fund_participation", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// SimulateManageNeuron calls the "simulate_manage_neuron" method on the "governance" canister. +func (a Agent) SimulateManageNeuron(arg0 ManageNeuron) (*ManageNeuronResponse, error) { + var r0 ManageNeuronResponse + if err := a.Agent.Call( + a.CanisterId, + "simulate_manage_neuron", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// TransferGtcNeuron calls the "transfer_gtc_neuron" method on the "governance" canister. +func (a Agent) TransferGtcNeuron(arg0 NeuronId, arg1 NeuronId) (*Result, error) { + var r0 Result + if err := a.Agent.Call( + a.CanisterId, + "transfer_gtc_neuron", + []any{arg0, arg1}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// UpdateNodeProvider calls the "update_node_provider" method on the "governance" canister. +func (a Agent) UpdateNodeProvider(arg0 UpdateNodeProvider) (*Result, error) { + var r0 Result + if err := a.Agent.Call( + a.CanisterId, + "update_node_provider", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +type Amount struct { + E8s uint64 `ic:"e8s" json:"e8s"` +} + +type ApproveGenesisKyc struct { + Principals []principal.Principal `ic:"principals" json:"principals"` +} + +type Ballot struct { + Vote int32 `ic:"vote" json:"vote"` + VotingPower uint64 `ic:"voting_power" json:"voting_power"` +} + +type BallotInfo struct { + Vote int32 `ic:"vote" json:"vote"` + ProposalId *NeuronId `ic:"proposal_id,omitempty" json:"proposal_id,omitempty"` +} + +type By struct { + NeuronIdOrSubaccount *struct { + } `ic:"NeuronIdOrSubaccount,variant"` + MemoAndController *ClaimOrRefreshNeuronFromAccount `ic:"MemoAndController,variant"` + Memo *uint64 `ic:"Memo,variant"` +} + +type Canister struct { + Id *principal.Principal `ic:"id,omitempty" json:"id,omitempty"` +} + +type CanisterStatusResultV2 struct { + Status *int32 `ic:"status,omitempty" json:"status,omitempty"` + FreezingThreshold *uint64 `ic:"freezing_threshold,omitempty" json:"freezing_threshold,omitempty"` + Controllers []principal.Principal `ic:"controllers" json:"controllers"` + MemorySize *uint64 `ic:"memory_size,omitempty" json:"memory_size,omitempty"` + Cycles *uint64 `ic:"cycles,omitempty" json:"cycles,omitempty"` + IdleCyclesBurnedPerDay *uint64 `ic:"idle_cycles_burned_per_day,omitempty" json:"idle_cycles_burned_per_day,omitempty"` + ModuleHash []byte `ic:"module_hash" json:"module_hash"` +} + +type CanisterSummary struct { + Status *CanisterStatusResultV2 `ic:"status,omitempty" json:"status,omitempty"` + CanisterId *principal.Principal `ic:"canister_id,omitempty" json:"canister_id,omitempty"` +} + +type CfNeuron struct { + HasCreatedNeuronRecipes *bool `ic:"has_created_neuron_recipes,omitempty" json:"has_created_neuron_recipes,omitempty"` + NnsNeuronId uint64 `ic:"nns_neuron_id" json:"nns_neuron_id"` + AmountIcpE8s uint64 `ic:"amount_icp_e8s" json:"amount_icp_e8s"` +} + +type CfParticipant struct { + HotkeyPrincipal string `ic:"hotkey_principal" json:"hotkey_principal"` + CfNeurons []CfNeuron `ic:"cf_neurons" json:"cf_neurons"` +} + +type Change struct { + ToRemove *NodeProvider `ic:"ToRemove,variant"` + ToAdd *NodeProvider `ic:"ToAdd,variant"` +} + +type ChangeAutoStakeMaturity struct { + RequestedSettingForAutoStakeMaturity bool `ic:"requested_setting_for_auto_stake_maturity" json:"requested_setting_for_auto_stake_maturity"` +} + +type ClaimOrRefresh struct { + By *By `ic:"by,omitempty" json:"by,omitempty"` +} + +type ClaimOrRefreshNeuronFromAccount struct { + Controller *principal.Principal `ic:"controller,omitempty" json:"controller,omitempty"` + Memo uint64 `ic:"memo" json:"memo"` +} + +type ClaimOrRefreshNeuronFromAccountResponse struct { + Result *Result1 `ic:"result,omitempty" json:"result,omitempty"` +} + +type ClaimOrRefreshResponse struct { + RefreshedNeuronId *NeuronId `ic:"refreshed_neuron_id,omitempty" json:"refreshed_neuron_id,omitempty"` +} + +type Command struct { + Spawn *Spawn `ic:"Spawn,variant"` + Split *Split `ic:"Split,variant"` + Follow *Follow `ic:"Follow,variant"` + ClaimOrRefresh *ClaimOrRefresh `ic:"ClaimOrRefresh,variant"` + Configure *Configure `ic:"Configure,variant"` + RegisterVote *RegisterVote `ic:"RegisterVote,variant"` + Merge *Merge `ic:"Merge,variant"` + DisburseToNeuron *DisburseToNeuron `ic:"DisburseToNeuron,variant"` + MakeProposal *Proposal `ic:"MakeProposal,variant"` + StakeMaturity *StakeMaturity `ic:"StakeMaturity,variant"` + MergeMaturity *MergeMaturity `ic:"MergeMaturity,variant"` + Disburse *Disburse `ic:"Disburse,variant"` +} + +type Command1 struct { + Error *GovernanceError `ic:"Error,variant"` + Spawn *SpawnResponse `ic:"Spawn,variant"` + Split *SpawnResponse `ic:"Split,variant"` + Follow *struct { + } `ic:"Follow,variant"` + ClaimOrRefresh *ClaimOrRefreshResponse `ic:"ClaimOrRefresh,variant"` + Configure *struct { + } `ic:"Configure,variant"` + RegisterVote *struct { + } `ic:"RegisterVote,variant"` + Merge *MergeResponse `ic:"Merge,variant"` + DisburseToNeuron *SpawnResponse `ic:"DisburseToNeuron,variant"` + MakeProposal *MakeProposalResponse `ic:"MakeProposal,variant"` + StakeMaturity *StakeMaturityResponse `ic:"StakeMaturity,variant"` + MergeMaturity *MergeMaturityResponse `ic:"MergeMaturity,variant"` + Disburse *DisburseResponse `ic:"Disburse,variant"` +} + +type Command2 struct { + Spawn *NeuronId `ic:"Spawn,variant"` + Split *Split `ic:"Split,variant"` + Configure *Configure `ic:"Configure,variant"` + Merge *Merge `ic:"Merge,variant"` + DisburseToNeuron *DisburseToNeuron `ic:"DisburseToNeuron,variant"` + SyncCommand *struct { + } `ic:"SyncCommand,variant"` + ClaimOrRefreshNeuron *ClaimOrRefresh `ic:"ClaimOrRefreshNeuron,variant"` + MergeMaturity *MergeMaturity `ic:"MergeMaturity,variant"` + Disburse *Disburse `ic:"Disburse,variant"` +} + +type Committed struct { + TotalDirectContributionIcpE8s *uint64 `ic:"total_direct_contribution_icp_e8s,omitempty" json:"total_direct_contribution_icp_e8s,omitempty"` + TotalNeuronsFundContributionIcpE8s *uint64 `ic:"total_neurons_fund_contribution_icp_e8s,omitempty" json:"total_neurons_fund_contribution_icp_e8s,omitempty"` + SnsGovernanceCanisterId *principal.Principal `ic:"sns_governance_canister_id,omitempty" json:"sns_governance_canister_id,omitempty"` +} + +type Committed1 struct { + TotalDirectParticipationIcpE8s *uint64 `ic:"total_direct_participation_icp_e8s,omitempty" json:"total_direct_participation_icp_e8s,omitempty"` + TotalNeuronsFundParticipationIcpE8s *uint64 `ic:"total_neurons_fund_participation_icp_e8s,omitempty" json:"total_neurons_fund_participation_icp_e8s,omitempty"` + SnsGovernanceCanisterId *principal.Principal `ic:"sns_governance_canister_id,omitempty" json:"sns_governance_canister_id,omitempty"` +} + +type Configure struct { + Operation *Operation `ic:"operation,omitempty" json:"operation,omitempty"` +} + +type Countries struct { + IsoCodes []string `ic:"iso_codes" json:"iso_codes"` +} + +type CreateServiceNervousSystem struct { + Url *string `ic:"url,omitempty" json:"url,omitempty"` + GovernanceParameters *GovernanceParameters `ic:"governance_parameters,omitempty" json:"governance_parameters,omitempty"` + FallbackControllerPrincipalIds []principal.Principal `ic:"fallback_controller_principal_ids" json:"fallback_controller_principal_ids"` + Logo *Image `ic:"logo,omitempty" json:"logo,omitempty"` + Name *string `ic:"name,omitempty" json:"name,omitempty"` + LedgerParameters *LedgerParameters `ic:"ledger_parameters,omitempty" json:"ledger_parameters,omitempty"` + Description *string `ic:"description,omitempty" json:"description,omitempty"` + DappCanisters []Canister `ic:"dapp_canisters" json:"dapp_canisters"` + SwapParameters *SwapParameters `ic:"swap_parameters,omitempty" json:"swap_parameters,omitempty"` + InitialTokenDistribution *InitialTokenDistribution `ic:"initial_token_distribution,omitempty" json:"initial_token_distribution,omitempty"` +} + +type Decimal struct { + HumanReadable *string `ic:"human_readable,omitempty" json:"human_readable,omitempty"` +} + +type DerivedProposalInformation struct { + SwapBackgroundInformation *SwapBackgroundInformation `ic:"swap_background_information,omitempty" json:"swap_background_information,omitempty"` +} + +type DeveloperDistribution struct { + DeveloperNeurons []NeuronDistribution `ic:"developer_neurons" json:"developer_neurons"` +} + +type Disburse struct { + ToAccount *AccountIdentifier `ic:"to_account,omitempty" json:"to_account,omitempty"` + Amount *Amount `ic:"amount,omitempty" json:"amount,omitempty"` +} + +type DisburseResponse struct { + TransferBlockHeight uint64 `ic:"transfer_block_height" json:"transfer_block_height"` +} + +type DisburseToNeuron struct { + DissolveDelaySeconds uint64 `ic:"dissolve_delay_seconds" json:"dissolve_delay_seconds"` + KycVerified bool `ic:"kyc_verified" json:"kyc_verified"` + AmountE8s uint64 `ic:"amount_e8s" json:"amount_e8s"` + NewController *principal.Principal `ic:"new_controller,omitempty" json:"new_controller,omitempty"` + Nonce uint64 `ic:"nonce" json:"nonce"` +} + +type DissolveState struct { + DissolveDelaySeconds *uint64 `ic:"DissolveDelaySeconds,variant"` + WhenDissolvedTimestampSeconds *uint64 `ic:"WhenDissolvedTimestampSeconds,variant"` +} + +type Duration struct { + Seconds *uint64 `ic:"seconds,omitempty" json:"seconds,omitempty"` +} + +type ExecuteNnsFunction struct { + NnsFunction int32 `ic:"nns_function" json:"nns_function"` + Payload []byte `ic:"payload" json:"payload"` +} + +type Follow struct { + Topic int32 `ic:"topic" json:"topic"` + Followees []NeuronId `ic:"followees" json:"followees"` +} + +type Followees struct { + Followees []NeuronId `ic:"followees" json:"followees"` +} + +type Followers struct { + Followers []NeuronId `ic:"followers" json:"followers"` +} + +type FollowersMap struct { + FollowersMap []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 Followers `ic:"1" json:"1"` + } `ic:"followers_map" json:"followers_map"` +} + +type GetNeuronsFundAuditInfoRequest struct { + NnsProposalId *NeuronId `ic:"nns_proposal_id,omitempty" json:"nns_proposal_id,omitempty"` +} + +type GetNeuronsFundAuditInfoResponse struct { + Result *Result6 `ic:"result,omitempty" json:"result,omitempty"` +} + +type GlobalTimeOfDay struct { + SecondsAfterUtcMidnight *uint64 `ic:"seconds_after_utc_midnight,omitempty" json:"seconds_after_utc_midnight,omitempty"` +} + +type Governance struct { + DefaultFollowees []struct { + Field0 int32 `ic:"0" json:"0"` + Field1 Followees `ic:"1" json:"1"` + } `ic:"default_followees" json:"default_followees"` + MakingSnsProposal *MakingSnsProposal `ic:"making_sns_proposal,omitempty" json:"making_sns_proposal,omitempty"` + MostRecentMonthlyNodeProviderRewards *MostRecentMonthlyNodeProviderRewards `ic:"most_recent_monthly_node_provider_rewards,omitempty" json:"most_recent_monthly_node_provider_rewards,omitempty"` + MaturityModulationLastUpdatedAtTimestampSeconds *uint64 `ic:"maturity_modulation_last_updated_at_timestamp_seconds,omitempty" json:"maturity_modulation_last_updated_at_timestamp_seconds,omitempty"` + WaitForQuietThresholdSeconds uint64 `ic:"wait_for_quiet_threshold_seconds" json:"wait_for_quiet_threshold_seconds"` + Metrics *GovernanceCachedMetrics `ic:"metrics,omitempty" json:"metrics,omitempty"` + NeuronManagementVotingPeriodSeconds *uint64 `ic:"neuron_management_voting_period_seconds,omitempty" json:"neuron_management_voting_period_seconds,omitempty"` + NodeProviders []NodeProvider `ic:"node_providers" json:"node_providers"` + CachedDailyMaturityModulationBasisPoints *int32 `ic:"cached_daily_maturity_modulation_basis_points,omitempty" json:"cached_daily_maturity_modulation_basis_points,omitempty"` + Economics *NetworkEconomics `ic:"economics,omitempty" json:"economics,omitempty"` + RestoreAgingSummary *RestoreAgingSummary `ic:"restore_aging_summary,omitempty" json:"restore_aging_summary,omitempty"` + SpawningNeurons *bool `ic:"spawning_neurons,omitempty" json:"spawning_neurons,omitempty"` + LatestRewardEvent *RewardEvent `ic:"latest_reward_event,omitempty" json:"latest_reward_event,omitempty"` + ToClaimTransfers []NeuronStakeTransfer `ic:"to_claim_transfers" json:"to_claim_transfers"` + ShortVotingPeriodSeconds uint64 `ic:"short_voting_period_seconds" json:"short_voting_period_seconds"` + TopicFolloweeIndex []struct { + Field0 int32 `ic:"0" json:"0"` + Field1 FollowersMap `ic:"1" json:"1"` + } `ic:"topic_followee_index" json:"topic_followee_index"` + Migrations *Migrations `ic:"migrations,omitempty" json:"migrations,omitempty"` + Proposals []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 ProposalData `ic:"1" json:"1"` + } `ic:"proposals" json:"proposals"` + XdrConversionRate *XdrConversionRate `ic:"xdr_conversion_rate,omitempty" json:"xdr_conversion_rate,omitempty"` + InFlightCommands []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 NeuronInFlightCommand `ic:"1" json:"1"` + } `ic:"in_flight_commands" json:"in_flight_commands"` + Neurons []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 Neuron `ic:"1" json:"1"` + } `ic:"neurons" json:"neurons"` + GenesisTimestampSeconds uint64 `ic:"genesis_timestamp_seconds" json:"genesis_timestamp_seconds"` +} + +type GovernanceCachedMetrics struct { + TotalMaturityE8sEquivalent uint64 `ic:"total_maturity_e8s_equivalent" json:"total_maturity_e8s_equivalent"` + NotDissolvingNeuronsE8sBuckets []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 float64 `ic:"1" json:"1"` + } `ic:"not_dissolving_neurons_e8s_buckets" json:"not_dissolving_neurons_e8s_buckets"` + DissolvingNeuronsStakedMaturityE8sEquivalentSum uint64 `ic:"dissolving_neurons_staked_maturity_e8s_equivalent_sum" json:"dissolving_neurons_staked_maturity_e8s_equivalent_sum"` + GarbageCollectableNeuronsCount uint64 `ic:"garbage_collectable_neurons_count" json:"garbage_collectable_neurons_count"` + DissolvingNeuronsStakedMaturityE8sEquivalentBuckets []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 float64 `ic:"1" json:"1"` + } `ic:"dissolving_neurons_staked_maturity_e8s_equivalent_buckets" json:"dissolving_neurons_staked_maturity_e8s_equivalent_buckets"` + NeuronsWithInvalidStakeCount uint64 `ic:"neurons_with_invalid_stake_count" json:"neurons_with_invalid_stake_count"` + NotDissolvingNeuronsCountBuckets []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 uint64 `ic:"1" json:"1"` + } `ic:"not_dissolving_neurons_count_buckets" json:"not_dissolving_neurons_count_buckets"` + EctNeuronCount uint64 `ic:"ect_neuron_count" json:"ect_neuron_count"` + TotalSupplyIcp uint64 `ic:"total_supply_icp" json:"total_supply_icp"` + NeuronsWithLessThan6MonthsDissolveDelayCount uint64 `ic:"neurons_with_less_than_6_months_dissolve_delay_count" json:"neurons_with_less_than_6_months_dissolve_delay_count"` + DissolvedNeuronsCount uint64 `ic:"dissolved_neurons_count" json:"dissolved_neurons_count"` + CommunityFundTotalMaturityE8sEquivalent uint64 `ic:"community_fund_total_maturity_e8s_equivalent" json:"community_fund_total_maturity_e8s_equivalent"` + TotalStakedE8sSeed uint64 `ic:"total_staked_e8s_seed" json:"total_staked_e8s_seed"` + TotalStakedMaturityE8sEquivalentEct uint64 `ic:"total_staked_maturity_e8s_equivalent_ect" json:"total_staked_maturity_e8s_equivalent_ect"` + TotalStakedE8s uint64 `ic:"total_staked_e8s" json:"total_staked_e8s"` + NotDissolvingNeuronsCount uint64 `ic:"not_dissolving_neurons_count" json:"not_dissolving_neurons_count"` + TotalLockedE8s uint64 `ic:"total_locked_e8s" json:"total_locked_e8s"` + NeuronsFundTotalActiveNeurons uint64 `ic:"neurons_fund_total_active_neurons" json:"neurons_fund_total_active_neurons"` + TotalStakedMaturityE8sEquivalent uint64 `ic:"total_staked_maturity_e8s_equivalent" json:"total_staked_maturity_e8s_equivalent"` + NotDissolvingNeuronsE8sBucketsEct []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 float64 `ic:"1" json:"1"` + } `ic:"not_dissolving_neurons_e8s_buckets_ect" json:"not_dissolving_neurons_e8s_buckets_ect"` + TotalStakedE8sEct uint64 `ic:"total_staked_e8s_ect" json:"total_staked_e8s_ect"` + NotDissolvingNeuronsStakedMaturityE8sEquivalentSum uint64 `ic:"not_dissolving_neurons_staked_maturity_e8s_equivalent_sum" json:"not_dissolving_neurons_staked_maturity_e8s_equivalent_sum"` + DissolvedNeuronsE8s uint64 `ic:"dissolved_neurons_e8s" json:"dissolved_neurons_e8s"` + DissolvingNeuronsE8sBucketsSeed []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 float64 `ic:"1" json:"1"` + } `ic:"dissolving_neurons_e8s_buckets_seed" json:"dissolving_neurons_e8s_buckets_seed"` + NeuronsWithLessThan6MonthsDissolveDelayE8s uint64 `ic:"neurons_with_less_than_6_months_dissolve_delay_e8s" json:"neurons_with_less_than_6_months_dissolve_delay_e8s"` + NotDissolvingNeuronsStakedMaturityE8sEquivalentBuckets []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 float64 `ic:"1" json:"1"` + } `ic:"not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets" json:"not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets"` + DissolvingNeuronsCountBuckets []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 uint64 `ic:"1" json:"1"` + } `ic:"dissolving_neurons_count_buckets" json:"dissolving_neurons_count_buckets"` + DissolvingNeuronsE8sBucketsEct []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 float64 `ic:"1" json:"1"` + } `ic:"dissolving_neurons_e8s_buckets_ect" json:"dissolving_neurons_e8s_buckets_ect"` + DissolvingNeuronsCount uint64 `ic:"dissolving_neurons_count" json:"dissolving_neurons_count"` + DissolvingNeuronsE8sBuckets []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 float64 `ic:"1" json:"1"` + } `ic:"dissolving_neurons_e8s_buckets" json:"dissolving_neurons_e8s_buckets"` + TotalStakedMaturityE8sEquivalentSeed uint64 `ic:"total_staked_maturity_e8s_equivalent_seed" json:"total_staked_maturity_e8s_equivalent_seed"` + CommunityFundTotalStakedE8s uint64 `ic:"community_fund_total_staked_e8s" json:"community_fund_total_staked_e8s"` + NotDissolvingNeuronsE8sBucketsSeed []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 float64 `ic:"1" json:"1"` + } `ic:"not_dissolving_neurons_e8s_buckets_seed" json:"not_dissolving_neurons_e8s_buckets_seed"` + TimestampSeconds uint64 `ic:"timestamp_seconds" json:"timestamp_seconds"` + SeedNeuronCount uint64 `ic:"seed_neuron_count" json:"seed_neuron_count"` +} + +type GovernanceError struct { + ErrorMessage string `ic:"error_message" json:"error_message"` + ErrorType int32 `ic:"error_type" json:"error_type"` +} + +type GovernanceParameters struct { + NeuronMaximumDissolveDelayBonus *Percentage `ic:"neuron_maximum_dissolve_delay_bonus,omitempty" json:"neuron_maximum_dissolve_delay_bonus,omitempty"` + NeuronMaximumAgeForAgeBonus *Duration `ic:"neuron_maximum_age_for_age_bonus,omitempty" json:"neuron_maximum_age_for_age_bonus,omitempty"` + NeuronMaximumDissolveDelay *Duration `ic:"neuron_maximum_dissolve_delay,omitempty" json:"neuron_maximum_dissolve_delay,omitempty"` + NeuronMinimumDissolveDelayToVote *Duration `ic:"neuron_minimum_dissolve_delay_to_vote,omitempty" json:"neuron_minimum_dissolve_delay_to_vote,omitempty"` + NeuronMaximumAgeBonus *Percentage `ic:"neuron_maximum_age_bonus,omitempty" json:"neuron_maximum_age_bonus,omitempty"` + NeuronMinimumStake *Tokens `ic:"neuron_minimum_stake,omitempty" json:"neuron_minimum_stake,omitempty"` + ProposalWaitForQuietDeadlineIncrease *Duration `ic:"proposal_wait_for_quiet_deadline_increase,omitempty" json:"proposal_wait_for_quiet_deadline_increase,omitempty"` + ProposalInitialVotingPeriod *Duration `ic:"proposal_initial_voting_period,omitempty" json:"proposal_initial_voting_period,omitempty"` + ProposalRejectionFee *Tokens `ic:"proposal_rejection_fee,omitempty" json:"proposal_rejection_fee,omitempty"` + VotingRewardParameters *VotingRewardParameters `ic:"voting_reward_parameters,omitempty" json:"voting_reward_parameters,omitempty"` +} + +type IdealMatchedParticipationFunction struct { + SerializedRepresentation *string `ic:"serialized_representation,omitempty" json:"serialized_representation,omitempty"` +} + +type Image struct { + Base64Encoding *string `ic:"base64_encoding,omitempty" json:"base64_encoding,omitempty"` +} + +type IncreaseDissolveDelay struct { + AdditionalDissolveDelaySeconds uint32 `ic:"additional_dissolve_delay_seconds" json:"additional_dissolve_delay_seconds"` +} + +type InitialTokenDistribution struct { + TreasuryDistribution *SwapDistribution `ic:"treasury_distribution,omitempty" json:"treasury_distribution,omitempty"` + DeveloperDistribution *DeveloperDistribution `ic:"developer_distribution,omitempty" json:"developer_distribution,omitempty"` + SwapDistribution *SwapDistribution `ic:"swap_distribution,omitempty" json:"swap_distribution,omitempty"` +} + +type KnownNeuron struct { + Id *NeuronId `ic:"id,omitempty" json:"id,omitempty"` + KnownNeuronData *KnownNeuronData `ic:"known_neuron_data,omitempty" json:"known_neuron_data,omitempty"` +} + +type KnownNeuronData struct { + Name string `ic:"name" json:"name"` + Description *string `ic:"description,omitempty" json:"description,omitempty"` +} + +type LedgerParameters struct { + TransactionFee *Tokens `ic:"transaction_fee,omitempty" json:"transaction_fee,omitempty"` + TokenSymbol *string `ic:"token_symbol,omitempty" json:"token_symbol,omitempty"` + TokenLogo *Image `ic:"token_logo,omitempty" json:"token_logo,omitempty"` + TokenName *string `ic:"token_name,omitempty" json:"token_name,omitempty"` +} + +type ListKnownNeuronsResponse struct { + KnownNeurons []KnownNeuron `ic:"known_neurons" json:"known_neurons"` +} + +type ListNeurons struct { + NeuronIds []uint64 `ic:"neuron_ids" json:"neuron_ids"` + IncludeNeuronsReadableByCaller bool `ic:"include_neurons_readable_by_caller" json:"include_neurons_readable_by_caller"` +} + +type ListNeuronsResponse struct { + NeuronInfos []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 NeuronInfo `ic:"1" json:"1"` + } `ic:"neuron_infos" json:"neuron_infos"` + FullNeurons []Neuron `ic:"full_neurons" json:"full_neurons"` +} + +type ListNodeProvidersResponse struct { + NodeProviders []NodeProvider `ic:"node_providers" json:"node_providers"` +} + +type ListProposalInfo struct { + IncludeRewardStatus []int32 `ic:"include_reward_status" json:"include_reward_status"` + OmitLargeFields *bool `ic:"omit_large_fields,omitempty" json:"omit_large_fields,omitempty"` + BeforeProposal *NeuronId `ic:"before_proposal,omitempty" json:"before_proposal,omitempty"` + Limit uint32 `ic:"limit" json:"limit"` + ExcludeTopic []int32 `ic:"exclude_topic" json:"exclude_topic"` + IncludeAllManageNeuronProposals *bool `ic:"include_all_manage_neuron_proposals,omitempty" json:"include_all_manage_neuron_proposals,omitempty"` + IncludeStatus []int32 `ic:"include_status" json:"include_status"` +} + +type ListProposalInfoResponse struct { + ProposalInfo []ProposalInfo `ic:"proposal_info" json:"proposal_info"` +} + +type MakeProposalResponse struct { + Message *string `ic:"message,omitempty" json:"message,omitempty"` + ProposalId *NeuronId `ic:"proposal_id,omitempty" json:"proposal_id,omitempty"` +} + +type MakingSnsProposal struct { + Proposal *Proposal `ic:"proposal,omitempty" json:"proposal,omitempty"` + Caller *principal.Principal `ic:"caller,omitempty" json:"caller,omitempty"` + ProposerId *NeuronId `ic:"proposer_id,omitempty" json:"proposer_id,omitempty"` +} + +type ManageNeuron struct { + Id *NeuronId `ic:"id,omitempty" json:"id,omitempty"` + Command *Command `ic:"command,omitempty" json:"command,omitempty"` + NeuronIdOrSubaccount *NeuronIdOrSubaccount `ic:"neuron_id_or_subaccount,omitempty" json:"neuron_id_or_subaccount,omitempty"` +} + +type ManageNeuronResponse struct { + Command *Command1 `ic:"command,omitempty" json:"command,omitempty"` +} + +type Merge struct { + SourceNeuronId *NeuronId `ic:"source_neuron_id,omitempty" json:"source_neuron_id,omitempty"` +} + +type MergeMaturity struct { + PercentageToMerge uint32 `ic:"percentage_to_merge" json:"percentage_to_merge"` +} + +type MergeMaturityResponse struct { + MergedMaturityE8s uint64 `ic:"merged_maturity_e8s" json:"merged_maturity_e8s"` + NewStakeE8s uint64 `ic:"new_stake_e8s" json:"new_stake_e8s"` +} + +type MergeResponse struct { + TargetNeuron *Neuron `ic:"target_neuron,omitempty" json:"target_neuron,omitempty"` + SourceNeuron *Neuron `ic:"source_neuron,omitempty" json:"source_neuron,omitempty"` + TargetNeuronInfo *NeuronInfo `ic:"target_neuron_info,omitempty" json:"target_neuron_info,omitempty"` + SourceNeuronInfo *NeuronInfo `ic:"source_neuron_info,omitempty" json:"source_neuron_info,omitempty"` +} + +type Migration struct { + Status *int32 `ic:"status,omitempty" json:"status,omitempty"` + FailureReason *string `ic:"failure_reason,omitempty" json:"failure_reason,omitempty"` + Progress *Progress `ic:"progress,omitempty" json:"progress,omitempty"` +} + +type Migrations struct { + NeuronIndexesMigration *Migration `ic:"neuron_indexes_migration,omitempty" json:"neuron_indexes_migration,omitempty"` + CopyInactiveNeuronsToStableMemoryMigration *Migration `ic:"copy_inactive_neurons_to_stable_memory_migration,omitempty" json:"copy_inactive_neurons_to_stable_memory_migration,omitempty"` +} + +type MostRecentMonthlyNodeProviderRewards struct { + Timestamp uint64 `ic:"timestamp" json:"timestamp"` + Rewards []RewardNodeProvider `ic:"rewards" json:"rewards"` +} + +type Motion struct { + MotionText string `ic:"motion_text" json:"motion_text"` +} + +type NetworkEconomics struct { + NeuronMinimumStakeE8s uint64 `ic:"neuron_minimum_stake_e8s" json:"neuron_minimum_stake_e8s"` + MaxProposalsToKeepPerTopic uint32 `ic:"max_proposals_to_keep_per_topic" json:"max_proposals_to_keep_per_topic"` + NeuronManagementFeePerProposalE8s uint64 `ic:"neuron_management_fee_per_proposal_e8s" json:"neuron_management_fee_per_proposal_e8s"` + RejectCostE8s uint64 `ic:"reject_cost_e8s" json:"reject_cost_e8s"` + TransactionFeeE8s uint64 `ic:"transaction_fee_e8s" json:"transaction_fee_e8s"` + NeuronSpawnDissolveDelaySeconds uint64 `ic:"neuron_spawn_dissolve_delay_seconds" json:"neuron_spawn_dissolve_delay_seconds"` + MinimumIcpXdrRate uint64 `ic:"minimum_icp_xdr_rate" json:"minimum_icp_xdr_rate"` + MaximumNodeProviderRewardsE8s uint64 `ic:"maximum_node_provider_rewards_e8s" json:"maximum_node_provider_rewards_e8s"` + NeuronsFundEconomics *NeuronsFundEconomics `ic:"neurons_fund_economics,omitempty" json:"neurons_fund_economics,omitempty"` +} + +type Neuron struct { + Id *NeuronId `ic:"id,omitempty" json:"id,omitempty"` + StakedMaturityE8sEquivalent *uint64 `ic:"staked_maturity_e8s_equivalent,omitempty" json:"staked_maturity_e8s_equivalent,omitempty"` + Controller *principal.Principal `ic:"controller,omitempty" json:"controller,omitempty"` + RecentBallots []BallotInfo `ic:"recent_ballots" json:"recent_ballots"` + KycVerified bool `ic:"kyc_verified" json:"kyc_verified"` + NeuronType *int32 `ic:"neuron_type,omitempty" json:"neuron_type,omitempty"` + NotForProfit bool `ic:"not_for_profit" json:"not_for_profit"` + MaturityE8sEquivalent uint64 `ic:"maturity_e8s_equivalent" json:"maturity_e8s_equivalent"` + CachedNeuronStakeE8s uint64 `ic:"cached_neuron_stake_e8s" json:"cached_neuron_stake_e8s"` + CreatedTimestampSeconds uint64 `ic:"created_timestamp_seconds" json:"created_timestamp_seconds"` + AutoStakeMaturity *bool `ic:"auto_stake_maturity,omitempty" json:"auto_stake_maturity,omitempty"` + AgingSinceTimestampSeconds uint64 `ic:"aging_since_timestamp_seconds" json:"aging_since_timestamp_seconds"` + HotKeys []principal.Principal `ic:"hot_keys" json:"hot_keys"` + Account []byte `ic:"account" json:"account"` + JoinedCommunityFundTimestampSeconds *uint64 `ic:"joined_community_fund_timestamp_seconds,omitempty" json:"joined_community_fund_timestamp_seconds,omitempty"` + DissolveState *DissolveState `ic:"dissolve_state,omitempty" json:"dissolve_state,omitempty"` + Followees []struct { + Field0 int32 `ic:"0" json:"0"` + Field1 Followees `ic:"1" json:"1"` + } `ic:"followees" json:"followees"` + NeuronFeesE8s uint64 `ic:"neuron_fees_e8s" json:"neuron_fees_e8s"` + Transfer *NeuronStakeTransfer `ic:"transfer,omitempty" json:"transfer,omitempty"` + KnownNeuronData *KnownNeuronData `ic:"known_neuron_data,omitempty" json:"known_neuron_data,omitempty"` + SpawnAtTimestampSeconds *uint64 `ic:"spawn_at_timestamp_seconds,omitempty" json:"spawn_at_timestamp_seconds,omitempty"` +} + +type NeuronBasketConstructionParameters struct { + DissolveDelayInterval *Duration `ic:"dissolve_delay_interval,omitempty" json:"dissolve_delay_interval,omitempty"` + Count *uint64 `ic:"count,omitempty" json:"count,omitempty"` +} + +type NeuronBasketConstructionParameters1 struct { + DissolveDelayIntervalSeconds uint64 `ic:"dissolve_delay_interval_seconds" json:"dissolve_delay_interval_seconds"` + Count uint64 `ic:"count" json:"count"` +} + +type NeuronDistribution struct { + Controller *principal.Principal `ic:"controller,omitempty" json:"controller,omitempty"` + DissolveDelay *Duration `ic:"dissolve_delay,omitempty" json:"dissolve_delay,omitempty"` + Memo *uint64 `ic:"memo,omitempty" json:"memo,omitempty"` + VestingPeriod *Duration `ic:"vesting_period,omitempty" json:"vesting_period,omitempty"` + Stake *Tokens `ic:"stake,omitempty" json:"stake,omitempty"` +} + +type NeuronId struct { + Id uint64 `ic:"id" json:"id"` +} + +type NeuronIdOrSubaccount struct { + Subaccount *[]byte `ic:"Subaccount,variant"` + NeuronId *NeuronId `ic:"NeuronId,variant"` +} + +type NeuronInFlightCommand struct { + Command *Command2 `ic:"command,omitempty" json:"command,omitempty"` + Timestamp uint64 `ic:"timestamp" json:"timestamp"` +} + +type NeuronInfo struct { + DissolveDelaySeconds uint64 `ic:"dissolve_delay_seconds" json:"dissolve_delay_seconds"` + RecentBallots []BallotInfo `ic:"recent_ballots" json:"recent_ballots"` + NeuronType *int32 `ic:"neuron_type,omitempty" json:"neuron_type,omitempty"` + CreatedTimestampSeconds uint64 `ic:"created_timestamp_seconds" json:"created_timestamp_seconds"` + State int32 `ic:"state" json:"state"` + StakeE8s uint64 `ic:"stake_e8s" json:"stake_e8s"` + JoinedCommunityFundTimestampSeconds *uint64 `ic:"joined_community_fund_timestamp_seconds,omitempty" json:"joined_community_fund_timestamp_seconds,omitempty"` + RetrievedAtTimestampSeconds uint64 `ic:"retrieved_at_timestamp_seconds" json:"retrieved_at_timestamp_seconds"` + KnownNeuronData *KnownNeuronData `ic:"known_neuron_data,omitempty" json:"known_neuron_data,omitempty"` + VotingPower uint64 `ic:"voting_power" json:"voting_power"` + AgeSeconds uint64 `ic:"age_seconds" json:"age_seconds"` +} + +type NeuronStakeTransfer struct { + ToSubaccount []byte `ic:"to_subaccount" json:"to_subaccount"` + NeuronStakeE8s uint64 `ic:"neuron_stake_e8s" json:"neuron_stake_e8s"` + From *principal.Principal `ic:"from,omitempty" json:"from,omitempty"` + Memo uint64 `ic:"memo" json:"memo"` + FromSubaccount []byte `ic:"from_subaccount" json:"from_subaccount"` + TransferTimestamp uint64 `ic:"transfer_timestamp" json:"transfer_timestamp"` + BlockHeight uint64 `ic:"block_height" json:"block_height"` +} + +type NeuronsFundAuditInfo struct { + FinalNeuronsFundParticipation *NeuronsFundParticipation `ic:"final_neurons_fund_participation,omitempty" json:"final_neurons_fund_participation,omitempty"` + InitialNeuronsFundParticipation *NeuronsFundParticipation `ic:"initial_neurons_fund_participation,omitempty" json:"initial_neurons_fund_participation,omitempty"` + NeuronsFundRefunds *NeuronsFundSnapshot `ic:"neurons_fund_refunds,omitempty" json:"neurons_fund_refunds,omitempty"` +} + +type NeuronsFundData struct { + FinalNeuronsFundParticipation *NeuronsFundParticipation `ic:"final_neurons_fund_participation,omitempty" json:"final_neurons_fund_participation,omitempty"` + InitialNeuronsFundParticipation *NeuronsFundParticipation `ic:"initial_neurons_fund_participation,omitempty" json:"initial_neurons_fund_participation,omitempty"` + NeuronsFundRefunds *NeuronsFundSnapshot `ic:"neurons_fund_refunds,omitempty" json:"neurons_fund_refunds,omitempty"` +} + +type NeuronsFundEconomics struct { + MaximumIcpXdrRate *Percentage `ic:"maximum_icp_xdr_rate,omitempty" json:"maximum_icp_xdr_rate,omitempty"` + NeuronsFundMatchedFundingCurveCoefficients *NeuronsFundMatchedFundingCurveCoefficients `ic:"neurons_fund_matched_funding_curve_coefficients,omitempty" json:"neurons_fund_matched_funding_curve_coefficients,omitempty"` + MaxTheoreticalNeuronsFundParticipationAmountXdr *Decimal `ic:"max_theoretical_neurons_fund_participation_amount_xdr,omitempty" json:"max_theoretical_neurons_fund_participation_amount_xdr,omitempty"` + MinimumIcpXdrRate *Percentage `ic:"minimum_icp_xdr_rate,omitempty" json:"minimum_icp_xdr_rate,omitempty"` +} + +type NeuronsFundMatchedFundingCurveCoefficients struct { + ContributionThresholdXdr *Decimal `ic:"contribution_threshold_xdr,omitempty" json:"contribution_threshold_xdr,omitempty"` + OneThirdParticipationMilestoneXdr *Decimal `ic:"one_third_participation_milestone_xdr,omitempty" json:"one_third_participation_milestone_xdr,omitempty"` + FullParticipationMilestoneXdr *Decimal `ic:"full_participation_milestone_xdr,omitempty" json:"full_participation_milestone_xdr,omitempty"` +} + +type NeuronsFundNeuron struct { + HotkeyPrincipal *string `ic:"hotkey_principal,omitempty" json:"hotkey_principal,omitempty"` + IsCapped *bool `ic:"is_capped,omitempty" json:"is_capped,omitempty"` + NnsNeuronId *uint64 `ic:"nns_neuron_id,omitempty" json:"nns_neuron_id,omitempty"` + AmountIcpE8s *uint64 `ic:"amount_icp_e8s,omitempty" json:"amount_icp_e8s,omitempty"` +} + +type NeuronsFundNeuronPortion struct { + HotkeyPrincipal *principal.Principal `ic:"hotkey_principal,omitempty" json:"hotkey_principal,omitempty"` + IsCapped *bool `ic:"is_capped,omitempty" json:"is_capped,omitempty"` + MaturityEquivalentIcpE8s *uint64 `ic:"maturity_equivalent_icp_e8s,omitempty" json:"maturity_equivalent_icp_e8s,omitempty"` + NnsNeuronId *NeuronId `ic:"nns_neuron_id,omitempty" json:"nns_neuron_id,omitempty"` + AmountIcpE8s *uint64 `ic:"amount_icp_e8s,omitempty" json:"amount_icp_e8s,omitempty"` +} + +type NeuronsFundParticipation struct { + TotalMaturityEquivalentIcpE8s *uint64 `ic:"total_maturity_equivalent_icp_e8s,omitempty" json:"total_maturity_equivalent_icp_e8s,omitempty"` + IntendedNeuronsFundParticipationIcpE8s *uint64 `ic:"intended_neurons_fund_participation_icp_e8s,omitempty" json:"intended_neurons_fund_participation_icp_e8s,omitempty"` + DirectParticipationIcpE8s *uint64 `ic:"direct_participation_icp_e8s,omitempty" json:"direct_participation_icp_e8s,omitempty"` + SwapParticipationLimits *SwapParticipationLimits `ic:"swap_participation_limits,omitempty" json:"swap_participation_limits,omitempty"` + MaxNeuronsFundSwapParticipationIcpE8s *uint64 `ic:"max_neurons_fund_swap_participation_icp_e8s,omitempty" json:"max_neurons_fund_swap_participation_icp_e8s,omitempty"` + NeuronsFundReserves *NeuronsFundSnapshot `ic:"neurons_fund_reserves,omitempty" json:"neurons_fund_reserves,omitempty"` + IdealMatchedParticipationFunction *IdealMatchedParticipationFunction `ic:"ideal_matched_participation_function,omitempty" json:"ideal_matched_participation_function,omitempty"` + AllocatedNeuronsFundParticipationIcpE8s *uint64 `ic:"allocated_neurons_fund_participation_icp_e8s,omitempty" json:"allocated_neurons_fund_participation_icp_e8s,omitempty"` +} + +type NeuronsFundSnapshot struct { + NeuronsFundNeuronPortions []NeuronsFundNeuronPortion `ic:"neurons_fund_neuron_portions" json:"neurons_fund_neuron_portions"` +} + +type NodeProvider struct { + Id *principal.Principal `ic:"id,omitempty" json:"id,omitempty"` + RewardAccount *AccountIdentifier `ic:"reward_account,omitempty" json:"reward_account,omitempty"` +} + +type Ok struct { + NeuronsFundAuditInfo *NeuronsFundAuditInfo `ic:"neurons_fund_audit_info,omitempty" json:"neurons_fund_audit_info,omitempty"` +} + +type Ok1 struct { + NeuronsFundNeuronPortions []NeuronsFundNeuron `ic:"neurons_fund_neuron_portions" json:"neurons_fund_neuron_portions"` +} + +type OpenSnsTokenSwap struct { + CommunityFundInvestmentE8s *uint64 `ic:"community_fund_investment_e8s,omitempty" json:"community_fund_investment_e8s,omitempty"` + TargetSwapCanisterId *principal.Principal `ic:"target_swap_canister_id,omitempty" json:"target_swap_canister_id,omitempty"` + Params *Params `ic:"params,omitempty" json:"params,omitempty"` +} + +type Operation struct { + RemoveHotKey *RemoveHotKey `ic:"RemoveHotKey,variant"` + AddHotKey *AddHotKey `ic:"AddHotKey,variant"` + ChangeAutoStakeMaturity *ChangeAutoStakeMaturity `ic:"ChangeAutoStakeMaturity,variant"` + StopDissolving *struct { + } `ic:"StopDissolving,variant"` + StartDissolving *struct { + } `ic:"StartDissolving,variant"` + IncreaseDissolveDelay *IncreaseDissolveDelay `ic:"IncreaseDissolveDelay,variant"` + JoinCommunityFund *struct { + } `ic:"JoinCommunityFund,variant"` + LeaveCommunityFund *struct { + } `ic:"LeaveCommunityFund,variant"` + SetDissolveTimestamp *SetDissolveTimestamp `ic:"SetDissolveTimestamp,variant"` +} + +type Params struct { + MinParticipantIcpE8s uint64 `ic:"min_participant_icp_e8s" json:"min_participant_icp_e8s"` + NeuronBasketConstructionParameters *NeuronBasketConstructionParameters1 `ic:"neuron_basket_construction_parameters,omitempty" json:"neuron_basket_construction_parameters,omitempty"` + MaxIcpE8s uint64 `ic:"max_icp_e8s" json:"max_icp_e8s"` + SwapDueTimestampSeconds uint64 `ic:"swap_due_timestamp_seconds" json:"swap_due_timestamp_seconds"` + MinParticipants uint32 `ic:"min_participants" json:"min_participants"` + SnsTokenE8s uint64 `ic:"sns_token_e8s" json:"sns_token_e8s"` + SaleDelaySeconds *uint64 `ic:"sale_delay_seconds,omitempty" json:"sale_delay_seconds,omitempty"` + MaxParticipantIcpE8s uint64 `ic:"max_participant_icp_e8s" json:"max_participant_icp_e8s"` + MinDirectParticipationIcpE8s *uint64 `ic:"min_direct_participation_icp_e8s,omitempty" json:"min_direct_participation_icp_e8s,omitempty"` + MinIcpE8s uint64 `ic:"min_icp_e8s" json:"min_icp_e8s"` + MaxDirectParticipationIcpE8s *uint64 `ic:"max_direct_participation_icp_e8s,omitempty" json:"max_direct_participation_icp_e8s,omitempty"` +} + +type Percentage struct { + BasisPoints *uint64 `ic:"basis_points,omitempty" json:"basis_points,omitempty"` +} + +type Progress struct { + LastNeuronId *NeuronId `ic:"LastNeuronId,variant"` +} + +type Proposal struct { + Url string `ic:"url" json:"url"` + Title *string `ic:"title,omitempty" json:"title,omitempty"` + Action *Action `ic:"action,omitempty" json:"action,omitempty"` + Summary string `ic:"summary" json:"summary"` +} + +type ProposalData struct { + Id *NeuronId `ic:"id,omitempty" json:"id,omitempty"` + FailureReason *GovernanceError `ic:"failure_reason,omitempty" json:"failure_reason,omitempty"` + CfParticipants []CfParticipant `ic:"cf_participants" json:"cf_participants"` + Ballots []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 Ballot `ic:"1" json:"1"` + } `ic:"ballots" json:"ballots"` + ProposalTimestampSeconds uint64 `ic:"proposal_timestamp_seconds" json:"proposal_timestamp_seconds"` + RewardEventRound uint64 `ic:"reward_event_round" json:"reward_event_round"` + FailedTimestampSeconds uint64 `ic:"failed_timestamp_seconds" json:"failed_timestamp_seconds"` + NeuronsFundData *NeuronsFundData `ic:"neurons_fund_data,omitempty" json:"neurons_fund_data,omitempty"` + RejectCostE8s uint64 `ic:"reject_cost_e8s" json:"reject_cost_e8s"` + DerivedProposalInformation *DerivedProposalInformation `ic:"derived_proposal_information,omitempty" json:"derived_proposal_information,omitempty"` + LatestTally *Tally `ic:"latest_tally,omitempty" json:"latest_tally,omitempty"` + SnsTokenSwapLifecycle *int32 `ic:"sns_token_swap_lifecycle,omitempty" json:"sns_token_swap_lifecycle,omitempty"` + DecidedTimestampSeconds uint64 `ic:"decided_timestamp_seconds" json:"decided_timestamp_seconds"` + Proposal *Proposal `ic:"proposal,omitempty" json:"proposal,omitempty"` + Proposer *NeuronId `ic:"proposer,omitempty" json:"proposer,omitempty"` + WaitForQuietState *WaitForQuietState `ic:"wait_for_quiet_state,omitempty" json:"wait_for_quiet_state,omitempty"` + ExecutedTimestampSeconds uint64 `ic:"executed_timestamp_seconds" json:"executed_timestamp_seconds"` + OriginalTotalCommunityFundMaturityE8sEquivalent *uint64 `ic:"original_total_community_fund_maturity_e8s_equivalent,omitempty" json:"original_total_community_fund_maturity_e8s_equivalent,omitempty"` +} + +type ProposalInfo struct { + Id *NeuronId `ic:"id,omitempty" json:"id,omitempty"` + Status int32 `ic:"status" json:"status"` + Topic int32 `ic:"topic" json:"topic"` + FailureReason *GovernanceError `ic:"failure_reason,omitempty" json:"failure_reason,omitempty"` + Ballots []struct { + Field0 uint64 `ic:"0" json:"0"` + Field1 Ballot `ic:"1" json:"1"` + } `ic:"ballots" json:"ballots"` + ProposalTimestampSeconds uint64 `ic:"proposal_timestamp_seconds" json:"proposal_timestamp_seconds"` + RewardEventRound uint64 `ic:"reward_event_round" json:"reward_event_round"` + DeadlineTimestampSeconds *uint64 `ic:"deadline_timestamp_seconds,omitempty" json:"deadline_timestamp_seconds,omitempty"` + FailedTimestampSeconds uint64 `ic:"failed_timestamp_seconds" json:"failed_timestamp_seconds"` + RejectCostE8s uint64 `ic:"reject_cost_e8s" json:"reject_cost_e8s"` + DerivedProposalInformation *DerivedProposalInformation `ic:"derived_proposal_information,omitempty" json:"derived_proposal_information,omitempty"` + LatestTally *Tally `ic:"latest_tally,omitempty" json:"latest_tally,omitempty"` + RewardStatus int32 `ic:"reward_status" json:"reward_status"` + DecidedTimestampSeconds uint64 `ic:"decided_timestamp_seconds" json:"decided_timestamp_seconds"` + Proposal *Proposal `ic:"proposal,omitempty" json:"proposal,omitempty"` + Proposer *NeuronId `ic:"proposer,omitempty" json:"proposer,omitempty"` + ExecutedTimestampSeconds uint64 `ic:"executed_timestamp_seconds" json:"executed_timestamp_seconds"` +} + +type RegisterVote struct { + Vote int32 `ic:"vote" json:"vote"` + Proposal *NeuronId `ic:"proposal,omitempty" json:"proposal,omitempty"` +} + +type RemoveHotKey struct { + HotKeyToRemove *principal.Principal `ic:"hot_key_to_remove,omitempty" json:"hot_key_to_remove,omitempty"` +} + +type RestoreAgingNeuronGroup struct { + Count *uint64 `ic:"count,omitempty" json:"count,omitempty"` + PreviousTotalStakeE8s *uint64 `ic:"previous_total_stake_e8s,omitempty" json:"previous_total_stake_e8s,omitempty"` + CurrentTotalStakeE8s *uint64 `ic:"current_total_stake_e8s,omitempty" json:"current_total_stake_e8s,omitempty"` + GroupType int32 `ic:"group_type" json:"group_type"` +} + +type RestoreAgingSummary struct { + Groups []RestoreAgingNeuronGroup `ic:"groups" json:"groups"` + TimestampSeconds *uint64 `ic:"timestamp_seconds,omitempty" json:"timestamp_seconds,omitempty"` +} + +type Result struct { + Ok *idl.Null `ic:"Ok,variant"` + Err *GovernanceError `ic:"Err,variant"` +} + +type Result1 struct { + Error *GovernanceError `ic:"Error,variant"` + NeuronId *NeuronId `ic:"NeuronId,variant"` +} + +type Result10 struct { + Ok *Ok1 `ic:"Ok,variant"` + Err *GovernanceError `ic:"Err,variant"` +} + +type Result2 struct { + Ok *Neuron `ic:"Ok,variant"` + Err *GovernanceError `ic:"Err,variant"` +} + +type Result3 struct { + Ok *GovernanceCachedMetrics `ic:"Ok,variant"` + Err *GovernanceError `ic:"Err,variant"` +} + +type Result4 struct { + Ok *RewardNodeProviders `ic:"Ok,variant"` + Err *GovernanceError `ic:"Err,variant"` +} + +type Result5 struct { + Ok *NeuronInfo `ic:"Ok,variant"` + Err *GovernanceError `ic:"Err,variant"` +} + +type Result6 struct { + Ok *Ok `ic:"Ok,variant"` + Err *GovernanceError `ic:"Err,variant"` +} + +type Result7 struct { + Ok *NodeProvider `ic:"Ok,variant"` + Err *GovernanceError `ic:"Err,variant"` +} + +type Result8 struct { + Committed *Committed `ic:"Committed,variant"` + Aborted *struct { + } `ic:"Aborted,variant"` +} + +type Result9 struct { + Committed *Committed1 `ic:"Committed,variant"` + Aborted *struct { + } `ic:"Aborted,variant"` +} + +type RewardEvent struct { + RoundsSinceLastDistribution *uint64 `ic:"rounds_since_last_distribution,omitempty" json:"rounds_since_last_distribution,omitempty"` + DayAfterGenesis uint64 `ic:"day_after_genesis" json:"day_after_genesis"` + ActualTimestampSeconds uint64 `ic:"actual_timestamp_seconds" json:"actual_timestamp_seconds"` + TotalAvailableE8sEquivalent uint64 `ic:"total_available_e8s_equivalent" json:"total_available_e8s_equivalent"` + LatestRoundAvailableE8sEquivalent *uint64 `ic:"latest_round_available_e8s_equivalent,omitempty" json:"latest_round_available_e8s_equivalent,omitempty"` + DistributedE8sEquivalent uint64 `ic:"distributed_e8s_equivalent" json:"distributed_e8s_equivalent"` + SettledProposals []NeuronId `ic:"settled_proposals" json:"settled_proposals"` +} + +type RewardMode struct { + RewardToNeuron *RewardToNeuron `ic:"RewardToNeuron,variant"` + RewardToAccount *RewardToAccount `ic:"RewardToAccount,variant"` +} + +type RewardNodeProvider struct { + NodeProvider *NodeProvider `ic:"node_provider,omitempty" json:"node_provider,omitempty"` + RewardMode *RewardMode `ic:"reward_mode,omitempty" json:"reward_mode,omitempty"` + AmountE8s uint64 `ic:"amount_e8s" json:"amount_e8s"` +} + +type RewardNodeProviders struct { + UseRegistryDerivedRewards *bool `ic:"use_registry_derived_rewards,omitempty" json:"use_registry_derived_rewards,omitempty"` + Rewards []RewardNodeProvider `ic:"rewards" json:"rewards"` +} + +type RewardToAccount struct { + ToAccount *AccountIdentifier `ic:"to_account,omitempty" json:"to_account,omitempty"` +} + +type RewardToNeuron struct { + DissolveDelaySeconds uint64 `ic:"dissolve_delay_seconds" json:"dissolve_delay_seconds"` +} + +type SetDefaultFollowees struct { + DefaultFollowees []struct { + Field0 int32 `ic:"0" json:"0"` + Field1 Followees `ic:"1" json:"1"` + } `ic:"default_followees" json:"default_followees"` +} + +type SetDissolveTimestamp struct { + DissolveTimestampSeconds uint64 `ic:"dissolve_timestamp_seconds" json:"dissolve_timestamp_seconds"` +} + +type SetOpenTimeWindowRequest struct { + OpenTimeWindow *TimeWindow `ic:"open_time_window,omitempty" json:"open_time_window,omitempty"` +} + +type SetSnsTokenSwapOpenTimeWindow struct { + Request *SetOpenTimeWindowRequest `ic:"request,omitempty" json:"request,omitempty"` + SwapCanisterId *principal.Principal `ic:"swap_canister_id,omitempty" json:"swap_canister_id,omitempty"` +} + +type SettleCommunityFundParticipation struct { + Result *Result8 `ic:"result,omitempty" json:"result,omitempty"` + OpenSnsTokenSwapProposalId *uint64 `ic:"open_sns_token_swap_proposal_id,omitempty" json:"open_sns_token_swap_proposal_id,omitempty"` +} + +type SettleNeuronsFundParticipationRequest struct { + Result *Result9 `ic:"result,omitempty" json:"result,omitempty"` + NnsProposalId *uint64 `ic:"nns_proposal_id,omitempty" json:"nns_proposal_id,omitempty"` +} + +type SettleNeuronsFundParticipationResponse struct { + Result *Result10 `ic:"result,omitempty" json:"result,omitempty"` +} + +type Spawn struct { + PercentageToSpawn *uint32 `ic:"percentage_to_spawn,omitempty" json:"percentage_to_spawn,omitempty"` + NewController *principal.Principal `ic:"new_controller,omitempty" json:"new_controller,omitempty"` + Nonce *uint64 `ic:"nonce,omitempty" json:"nonce,omitempty"` +} + +type SpawnResponse struct { + CreatedNeuronId *NeuronId `ic:"created_neuron_id,omitempty" json:"created_neuron_id,omitempty"` +} + +type Split struct { + AmountE8s uint64 `ic:"amount_e8s" json:"amount_e8s"` +} + +type StakeMaturity struct { + PercentageToStake *uint32 `ic:"percentage_to_stake,omitempty" json:"percentage_to_stake,omitempty"` +} + +type StakeMaturityResponse struct { + MaturityE8s uint64 `ic:"maturity_e8s" json:"maturity_e8s"` + StakedMaturityE8s uint64 `ic:"staked_maturity_e8s" json:"staked_maturity_e8s"` +} + +type SwapBackgroundInformation struct { + LedgerIndexCanisterSummary *CanisterSummary `ic:"ledger_index_canister_summary,omitempty" json:"ledger_index_canister_summary,omitempty"` + FallbackControllerPrincipalIds []principal.Principal `ic:"fallback_controller_principal_ids" json:"fallback_controller_principal_ids"` + LedgerArchiveCanisterSummaries []CanisterSummary `ic:"ledger_archive_canister_summaries" json:"ledger_archive_canister_summaries"` + LedgerCanisterSummary *CanisterSummary `ic:"ledger_canister_summary,omitempty" json:"ledger_canister_summary,omitempty"` + SwapCanisterSummary *CanisterSummary `ic:"swap_canister_summary,omitempty" json:"swap_canister_summary,omitempty"` + GovernanceCanisterSummary *CanisterSummary `ic:"governance_canister_summary,omitempty" json:"governance_canister_summary,omitempty"` + RootCanisterSummary *CanisterSummary `ic:"root_canister_summary,omitempty" json:"root_canister_summary,omitempty"` + DappCanisterSummaries []CanisterSummary `ic:"dapp_canister_summaries" json:"dapp_canister_summaries"` +} + +type SwapDistribution struct { + Total *Tokens `ic:"total,omitempty" json:"total,omitempty"` +} + +type SwapParameters struct { + MinimumParticipants *uint64 `ic:"minimum_participants,omitempty" json:"minimum_participants,omitempty"` + NeuronsFundParticipation *bool `ic:"neurons_fund_participation,omitempty" json:"neurons_fund_participation,omitempty"` + Duration *Duration `ic:"duration,omitempty" json:"duration,omitempty"` + NeuronBasketConstructionParameters *NeuronBasketConstructionParameters `ic:"neuron_basket_construction_parameters,omitempty" json:"neuron_basket_construction_parameters,omitempty"` + ConfirmationText *string `ic:"confirmation_text,omitempty" json:"confirmation_text,omitempty"` + MaximumParticipantIcp *Tokens `ic:"maximum_participant_icp,omitempty" json:"maximum_participant_icp,omitempty"` + MinimumIcp *Tokens `ic:"minimum_icp,omitempty" json:"minimum_icp,omitempty"` + MinimumDirectParticipationIcp *Tokens `ic:"minimum_direct_participation_icp,omitempty" json:"minimum_direct_participation_icp,omitempty"` + MinimumParticipantIcp *Tokens `ic:"minimum_participant_icp,omitempty" json:"minimum_participant_icp,omitempty"` + StartTime *GlobalTimeOfDay `ic:"start_time,omitempty" json:"start_time,omitempty"` + MaximumDirectParticipationIcp *Tokens `ic:"maximum_direct_participation_icp,omitempty" json:"maximum_direct_participation_icp,omitempty"` + MaximumIcp *Tokens `ic:"maximum_icp,omitempty" json:"maximum_icp,omitempty"` + NeuronsFundInvestmentIcp *Tokens `ic:"neurons_fund_investment_icp,omitempty" json:"neurons_fund_investment_icp,omitempty"` + RestrictedCountries *Countries `ic:"restricted_countries,omitempty" json:"restricted_countries,omitempty"` +} + +type SwapParticipationLimits struct { + MinParticipantIcpE8s *uint64 `ic:"min_participant_icp_e8s,omitempty" json:"min_participant_icp_e8s,omitempty"` + MaxParticipantIcpE8s *uint64 `ic:"max_participant_icp_e8s,omitempty" json:"max_participant_icp_e8s,omitempty"` + MinDirectParticipationIcpE8s *uint64 `ic:"min_direct_participation_icp_e8s,omitempty" json:"min_direct_participation_icp_e8s,omitempty"` + MaxDirectParticipationIcpE8s *uint64 `ic:"max_direct_participation_icp_e8s,omitempty" json:"max_direct_participation_icp_e8s,omitempty"` +} + +type Tally struct { + No uint64 `ic:"no" json:"no"` + Yes uint64 `ic:"yes" json:"yes"` + Total uint64 `ic:"total" json:"total"` + TimestampSeconds uint64 `ic:"timestamp_seconds" json:"timestamp_seconds"` +} + +type TimeWindow struct { + StartTimestampSeconds uint64 `ic:"start_timestamp_seconds" json:"start_timestamp_seconds"` + EndTimestampSeconds uint64 `ic:"end_timestamp_seconds" json:"end_timestamp_seconds"` +} + +type Tokens struct { + E8s *uint64 `ic:"e8s,omitempty" json:"e8s,omitempty"` +} + +type UpdateNodeProvider struct { + RewardAccount *AccountIdentifier `ic:"reward_account,omitempty" json:"reward_account,omitempty"` +} + +type VotingRewardParameters struct { + RewardRateTransitionDuration *Duration `ic:"reward_rate_transition_duration,omitempty" json:"reward_rate_transition_duration,omitempty"` + InitialRewardRate *Percentage `ic:"initial_reward_rate,omitempty" json:"initial_reward_rate,omitempty"` + FinalRewardRate *Percentage `ic:"final_reward_rate,omitempty" json:"final_reward_rate,omitempty"` +} + +type WaitForQuietState struct { + CurrentDeadlineTimestampSeconds uint64 `ic:"current_deadline_timestamp_seconds" json:"current_deadline_timestamp_seconds"` +} + +type XdrConversionRate struct { + XdrPermyriadPerIcp *uint64 `ic:"xdr_permyriad_per_icp,omitempty" json:"xdr_permyriad_per_icp,omitempty"` + TimestampSeconds *uint64 `ic:"timestamp_seconds,omitempty" json:"timestamp_seconds,omitempty"` +} diff --git a/ic/governance/types.mo b/ic/governance/types.mo new file mode 100755 index 0000000..7719d44 --- /dev/null +++ b/ic/governance/types.mo @@ -0,0 +1,149 @@ +// Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go. +module T { + public type AccountIdentifier = { hash : Blob }; + public type Action = { #RegisterKnownNeuron : T.KnownNeuron; #ManageNeuron : T.ManageNeuron; #CreateServiceNervousSystem : T.CreateServiceNervousSystem; #ExecuteNnsFunction : T.ExecuteNnsFunction; #RewardNodeProvider : T.RewardNodeProvider; #OpenSnsTokenSwap : T.OpenSnsTokenSwap; #SetSnsTokenSwapOpenTimeWindow : T.SetSnsTokenSwapOpenTimeWindow; #SetDefaultFollowees : T.SetDefaultFollowees; #RewardNodeProviders : T.RewardNodeProviders; #ManageNetworkEconomics : T.NetworkEconomics; #ApproveGenesisKyc : T.ApproveGenesisKyc; #AddOrRemoveNodeProvider : T.AddOrRemoveNodeProvider; #Motion : T.Motion }; + public type AddHotKey = { new_hot_key : ?Principal }; + public type AddOrRemoveNodeProvider = { change : ?T.Change }; + public type Amount = { e8s : Nat64 }; + public type ApproveGenesisKyc = { principals : [Principal] }; + public type Ballot = { vote : Int32; voting_power : Nat64 }; + public type BallotInfo = { vote : Int32; proposal_id : ?T.NeuronId }; + public type By = { #NeuronIdOrSubaccount : { }; #MemoAndController : T.ClaimOrRefreshNeuronFromAccount; #Memo : Nat64 }; + public type Canister = { id : ?Principal }; + public type CanisterStatusResultV2 = { status : ?Int32; freezing_threshold : ?Nat64; controllers : [Principal]; memory_size : ?Nat64; cycles : ?Nat64; idle_cycles_burned_per_day : ?Nat64; module_hash : Blob }; + public type CanisterSummary = { status : ?T.CanisterStatusResultV2; canister_id : ?Principal }; + public type CfNeuron = { has_created_neuron_recipes : ?Bool; nns_neuron_id : Nat64; amount_icp_e8s : Nat64 }; + public type CfParticipant = { hotkey_principal : Text; cf_neurons : [T.CfNeuron] }; + public type Change = { #ToRemove : T.NodeProvider; #ToAdd : T.NodeProvider }; + public type ChangeAutoStakeMaturity = { requested_setting_for_auto_stake_maturity : Bool }; + public type ClaimOrRefresh = { by : ?T.By }; + public type ClaimOrRefreshNeuronFromAccount = { controller : ?Principal; memo : Nat64 }; + public type ClaimOrRefreshNeuronFromAccountResponse = { result : ?T.Result1 }; + public type ClaimOrRefreshResponse = { refreshed_neuron_id : ?T.NeuronId }; + public type Command = { #Spawn : T.Spawn; #Split : T.Split; #Follow : T.Follow; #ClaimOrRefresh : T.ClaimOrRefresh; #Configure : T.Configure; #RegisterVote : T.RegisterVote; #Merge : T.Merge; #DisburseToNeuron : T.DisburseToNeuron; #MakeProposal : T.Proposal; #StakeMaturity : T.StakeMaturity; #MergeMaturity : T.MergeMaturity; #Disburse : T.Disburse }; + public type Command1 = { #Error : T.GovernanceError; #Spawn : T.SpawnResponse; #Split : T.SpawnResponse; #Follow : { }; #ClaimOrRefresh : T.ClaimOrRefreshResponse; #Configure : { }; #RegisterVote : { }; #Merge : T.MergeResponse; #DisburseToNeuron : T.SpawnResponse; #MakeProposal : T.MakeProposalResponse; #StakeMaturity : T.StakeMaturityResponse; #MergeMaturity : T.MergeMaturityResponse; #Disburse : T.DisburseResponse }; + public type Command2 = { #Spawn : T.NeuronId; #Split : T.Split; #Configure : T.Configure; #Merge : T.Merge; #DisburseToNeuron : T.DisburseToNeuron; #SyncCommand : { }; #ClaimOrRefreshNeuron : T.ClaimOrRefresh; #MergeMaturity : T.MergeMaturity; #Disburse : T.Disburse }; + public type Committed = { total_direct_contribution_icp_e8s : ?Nat64; total_neurons_fund_contribution_icp_e8s : ?Nat64; sns_governance_canister_id : ?Principal }; + public type Committed1 = { total_direct_participation_icp_e8s : ?Nat64; total_neurons_fund_participation_icp_e8s : ?Nat64; sns_governance_canister_id : ?Principal }; + public type Configure = { operation : ?T.Operation }; + public type Countries = { iso_codes : [Text] }; + public type CreateServiceNervousSystem = { url : ?Text; governance_parameters : ?T.GovernanceParameters; fallback_controller_principal_ids : [Principal]; logo : ?T.Image; name : ?Text; ledger_parameters : ?T.LedgerParameters; description : ?Text; dapp_canisters : [T.Canister]; swap_parameters : ?T.SwapParameters; initial_token_distribution : ?T.InitialTokenDistribution }; + public type Decimal = { human_readable : ?Text }; + public type DerivedProposalInformation = { swap_background_information : ?T.SwapBackgroundInformation }; + public type DeveloperDistribution = { developer_neurons : [T.NeuronDistribution] }; + public type Disburse = { to_account : ?T.AccountIdentifier; amount : ?T.Amount }; + public type DisburseResponse = { transfer_block_height : Nat64 }; + public type DisburseToNeuron = { dissolve_delay_seconds : Nat64; kyc_verified : Bool; amount_e8s : Nat64; new_controller : ?Principal; nonce : Nat64 }; + public type DissolveState = { #DissolveDelaySeconds : Nat64; #WhenDissolvedTimestampSeconds : Nat64 }; + public type Duration = { seconds : ?Nat64 }; + public type ExecuteNnsFunction = { nns_function : Int32; payload : Blob }; + public type Follow = { topic : Int32; followees : [T.NeuronId] }; + public type Followees = { followees : [T.NeuronId] }; + public type Followers = { followers : [T.NeuronId] }; + public type FollowersMap = { followers_map : [(Nat64, T.Followers)] }; + public type GetNeuronsFundAuditInfoRequest = { nns_proposal_id : ?T.NeuronId }; + public type GetNeuronsFundAuditInfoResponse = { result : ?T.Result6 }; + public type GlobalTimeOfDay = { seconds_after_utc_midnight : ?Nat64 }; + public type Governance = { default_followees : [(Int32, T.Followees)]; making_sns_proposal : ?T.MakingSnsProposal; most_recent_monthly_node_provider_rewards : ?T.MostRecentMonthlyNodeProviderRewards; maturity_modulation_last_updated_at_timestamp_seconds : ?Nat64; wait_for_quiet_threshold_seconds : Nat64; metrics : ?T.GovernanceCachedMetrics; neuron_management_voting_period_seconds : ?Nat64; node_providers : [T.NodeProvider]; cached_daily_maturity_modulation_basis_points : ?Int32; economics : ?T.NetworkEconomics; restore_aging_summary : ?T.RestoreAgingSummary; spawning_neurons : ?Bool; latest_reward_event : ?T.RewardEvent; to_claim_transfers : [T.NeuronStakeTransfer]; short_voting_period_seconds : Nat64; topic_followee_index : [(Int32, T.FollowersMap)]; migrations : ?T.Migrations; proposals : [(Nat64, T.ProposalData)]; xdr_conversion_rate : ?T.XdrConversionRate; in_flight_commands : [(Nat64, T.NeuronInFlightCommand)]; neurons : [(Nat64, T.Neuron)]; genesis_timestamp_seconds : Nat64 }; + public type GovernanceCachedMetrics = { total_maturity_e8s_equivalent : Nat64; not_dissolving_neurons_e8s_buckets : [(Nat64, float64)]; dissolving_neurons_staked_maturity_e8s_equivalent_sum : Nat64; garbage_collectable_neurons_count : Nat64; dissolving_neurons_staked_maturity_e8s_equivalent_buckets : [(Nat64, float64)]; neurons_with_invalid_stake_count : Nat64; not_dissolving_neurons_count_buckets : [(Nat64, Nat64)]; ect_neuron_count : Nat64; total_supply_icp : Nat64; neurons_with_less_than_6_months_dissolve_delay_count : Nat64; dissolved_neurons_count : Nat64; community_fund_total_maturity_e8s_equivalent : Nat64; total_staked_e8s_seed : Nat64; total_staked_maturity_e8s_equivalent_ect : Nat64; total_staked_e8s : Nat64; not_dissolving_neurons_count : Nat64; total_locked_e8s : Nat64; neurons_fund_total_active_neurons : Nat64; total_staked_maturity_e8s_equivalent : Nat64; not_dissolving_neurons_e8s_buckets_ect : [(Nat64, float64)]; total_staked_e8s_ect : Nat64; not_dissolving_neurons_staked_maturity_e8s_equivalent_sum : Nat64; dissolved_neurons_e8s : Nat64; dissolving_neurons_e8s_buckets_seed : [(Nat64, float64)]; neurons_with_less_than_6_months_dissolve_delay_e8s : Nat64; not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets : [(Nat64, float64)]; dissolving_neurons_count_buckets : [(Nat64, Nat64)]; dissolving_neurons_e8s_buckets_ect : [(Nat64, float64)]; dissolving_neurons_count : Nat64; dissolving_neurons_e8s_buckets : [(Nat64, float64)]; total_staked_maturity_e8s_equivalent_seed : Nat64; community_fund_total_staked_e8s : Nat64; not_dissolving_neurons_e8s_buckets_seed : [(Nat64, float64)]; timestamp_seconds : Nat64; seed_neuron_count : Nat64 }; + public type GovernanceError = { error_message : Text; error_type : Int32 }; + public type GovernanceParameters = { neuron_maximum_dissolve_delay_bonus : ?T.Percentage; neuron_maximum_age_for_age_bonus : ?T.Duration; neuron_maximum_dissolve_delay : ?T.Duration; neuron_minimum_dissolve_delay_to_vote : ?T.Duration; neuron_maximum_age_bonus : ?T.Percentage; neuron_minimum_stake : ?T.Tokens; proposal_wait_for_quiet_deadline_increase : ?T.Duration; proposal_initial_voting_period : ?T.Duration; proposal_rejection_fee : ?T.Tokens; voting_reward_parameters : ?T.VotingRewardParameters }; + public type IdealMatchedParticipationFunction = { serialized_representation : ?Text }; + public type Image = { base64_encoding : ?Text }; + public type IncreaseDissolveDelay = { additional_dissolve_delay_seconds : Nat32 }; + public type InitialTokenDistribution = { treasury_distribution : ?T.SwapDistribution; developer_distribution : ?T.DeveloperDistribution; swap_distribution : ?T.SwapDistribution }; + public type KnownNeuron = { id : ?T.NeuronId; known_neuron_data : ?T.KnownNeuronData }; + public type KnownNeuronData = { name : Text; description : ?Text }; + public type LedgerParameters = { transaction_fee : ?T.Tokens; token_symbol : ?Text; token_logo : ?T.Image; token_name : ?Text }; + public type ListKnownNeuronsResponse = { known_neurons : [T.KnownNeuron] }; + public type ListNeurons = { neuron_ids : [Nat64]; include_neurons_readable_by_caller : Bool }; + public type ListNeuronsResponse = { neuron_infos : [(Nat64, T.NeuronInfo)]; full_neurons : [T.Neuron] }; + public type ListNodeProvidersResponse = { node_providers : [T.NodeProvider] }; + public type ListProposalInfo = { include_reward_status : [Int32]; omit_large_fields : ?Bool; before_proposal : ?T.NeuronId; limit : Nat32; exclude_topic : [Int32]; include_all_manage_neuron_proposals : ?Bool; include_status : [Int32] }; + public type ListProposalInfoResponse = { proposal_info : [T.ProposalInfo] }; + public type MakeProposalResponse = { message : ?Text; proposal_id : ?T.NeuronId }; + public type MakingSnsProposal = { proposal : ?T.Proposal; caller : ?Principal; proposer_id : ?T.NeuronId }; + public type ManageNeuron = { id : ?T.NeuronId; command : ?T.Command; neuron_id_or_subaccount : ?T.NeuronIdOrSubaccount }; + public type ManageNeuronResponse = { command : ?T.Command1 }; + public type Merge = { source_neuron_id : ?T.NeuronId }; + public type MergeMaturity = { percentage_to_merge : Nat32 }; + public type MergeMaturityResponse = { merged_maturity_e8s : Nat64; new_stake_e8s : Nat64 }; + public type MergeResponse = { target_neuron : ?T.Neuron; source_neuron : ?T.Neuron; target_neuron_info : ?T.NeuronInfo; source_neuron_info : ?T.NeuronInfo }; + public type Migration = { status : ?Int32; failure_reason : ?Text; progress : ?T.Progress }; + public type Migrations = { neuron_indexes_migration : ?T.Migration; copy_inactive_neurons_to_stable_memory_migration : ?T.Migration }; + public type MostRecentMonthlyNodeProviderRewards = { timestamp : Nat64; rewards : [T.RewardNodeProvider] }; + public type Motion = { motion_text : Text }; + public type NetworkEconomics = { neuron_minimum_stake_e8s : Nat64; max_proposals_to_keep_per_topic : Nat32; neuron_management_fee_per_proposal_e8s : Nat64; reject_cost_e8s : Nat64; transaction_fee_e8s : Nat64; neuron_spawn_dissolve_delay_seconds : Nat64; minimum_icp_xdr_rate : Nat64; maximum_node_provider_rewards_e8s : Nat64; neurons_fund_economics : ?T.NeuronsFundEconomics }; + public type Neuron = { id : ?T.NeuronId; staked_maturity_e8s_equivalent : ?Nat64; controller : ?Principal; recent_ballots : [T.BallotInfo]; kyc_verified : Bool; neuron_type : ?Int32; not_for_profit : Bool; maturity_e8s_equivalent : Nat64; cached_neuron_stake_e8s : Nat64; created_timestamp_seconds : Nat64; auto_stake_maturity : ?Bool; aging_since_timestamp_seconds : Nat64; hot_keys : [Principal]; account : Blob; joined_community_fund_timestamp_seconds : ?Nat64; dissolve_state : ?T.DissolveState; followees : [(Int32, T.Followees)]; neuron_fees_e8s : Nat64; transfer : ?T.NeuronStakeTransfer; known_neuron_data : ?T.KnownNeuronData; spawn_at_timestamp_seconds : ?Nat64 }; + public type NeuronBasketConstructionParameters = { dissolve_delay_interval : ?T.Duration; count : ?Nat64 }; + public type NeuronBasketConstructionParameters1 = { dissolve_delay_interval_seconds : Nat64; count : Nat64 }; + public type NeuronDistribution = { controller : ?Principal; dissolve_delay : ?T.Duration; memo : ?Nat64; vesting_period : ?T.Duration; stake : ?T.Tokens }; + public type NeuronId = { id : Nat64 }; + public type NeuronIdOrSubaccount = { #Subaccount : Blob; #NeuronId : T.NeuronId }; + public type NeuronInFlightCommand = { command : ?T.Command2; timestamp : Nat64 }; + public type NeuronInfo = { dissolve_delay_seconds : Nat64; recent_ballots : [T.BallotInfo]; neuron_type : ?Int32; created_timestamp_seconds : Nat64; state : Int32; stake_e8s : Nat64; joined_community_fund_timestamp_seconds : ?Nat64; retrieved_at_timestamp_seconds : Nat64; known_neuron_data : ?T.KnownNeuronData; voting_power : Nat64; age_seconds : Nat64 }; + public type NeuronStakeTransfer = { to_subaccount : Blob; neuron_stake_e8s : Nat64; from : ?Principal; memo : Nat64; from_subaccount : Blob; transfer_timestamp : Nat64; block_height : Nat64 }; + public type NeuronsFundAuditInfo = { final_neurons_fund_participation : ?T.NeuronsFundParticipation; initial_neurons_fund_participation : ?T.NeuronsFundParticipation; neurons_fund_refunds : ?T.NeuronsFundSnapshot }; + public type NeuronsFundData = { final_neurons_fund_participation : ?T.NeuronsFundParticipation; initial_neurons_fund_participation : ?T.NeuronsFundParticipation; neurons_fund_refunds : ?T.NeuronsFundSnapshot }; + public type NeuronsFundEconomics = { maximum_icp_xdr_rate : ?T.Percentage; neurons_fund_matched_funding_curve_coefficients : ?T.NeuronsFundMatchedFundingCurveCoefficients; max_theoretical_neurons_fund_participation_amount_xdr : ?T.Decimal; minimum_icp_xdr_rate : ?T.Percentage }; + public type NeuronsFundMatchedFundingCurveCoefficients = { contribution_threshold_xdr : ?T.Decimal; one_third_participation_milestone_xdr : ?T.Decimal; full_participation_milestone_xdr : ?T.Decimal }; + public type NeuronsFundNeuron = { hotkey_principal : ?Text; is_capped : ?Bool; nns_neuron_id : ?Nat64; amount_icp_e8s : ?Nat64 }; + public type NeuronsFundNeuronPortion = { hotkey_principal : ?Principal; is_capped : ?Bool; maturity_equivalent_icp_e8s : ?Nat64; nns_neuron_id : ?T.NeuronId; amount_icp_e8s : ?Nat64 }; + public type NeuronsFundParticipation = { total_maturity_equivalent_icp_e8s : ?Nat64; intended_neurons_fund_participation_icp_e8s : ?Nat64; direct_participation_icp_e8s : ?Nat64; swap_participation_limits : ?T.SwapParticipationLimits; max_neurons_fund_swap_participation_icp_e8s : ?Nat64; neurons_fund_reserves : ?T.NeuronsFundSnapshot; ideal_matched_participation_function : ?T.IdealMatchedParticipationFunction; allocated_neurons_fund_participation_icp_e8s : ?Nat64 }; + public type NeuronsFundSnapshot = { neurons_fund_neuron_portions : [T.NeuronsFundNeuronPortion] }; + public type NodeProvider = { id : ?Principal; reward_account : ?T.AccountIdentifier }; + public type Ok = { neurons_fund_audit_info : ?T.NeuronsFundAuditInfo }; + public type Ok1 = { neurons_fund_neuron_portions : [T.NeuronsFundNeuron] }; + public type OpenSnsTokenSwap = { community_fund_investment_e8s : ?Nat64; target_swap_canister_id : ?Principal; params : ?T.Params }; + public type Operation = { #RemoveHotKey : T.RemoveHotKey; #AddHotKey : T.AddHotKey; #ChangeAutoStakeMaturity : T.ChangeAutoStakeMaturity; #StopDissolving : { }; #StartDissolving : { }; #IncreaseDissolveDelay : T.IncreaseDissolveDelay; #JoinCommunityFund : { }; #LeaveCommunityFund : { }; #SetDissolveTimestamp : T.SetDissolveTimestamp }; + public type Params = { min_participant_icp_e8s : Nat64; neuron_basket_construction_parameters : ?T.NeuronBasketConstructionParameters1; max_icp_e8s : Nat64; swap_due_timestamp_seconds : Nat64; min_participants : Nat32; sns_token_e8s : Nat64; sale_delay_seconds : ?Nat64; max_participant_icp_e8s : Nat64; min_direct_participation_icp_e8s : ?Nat64; min_icp_e8s : Nat64; max_direct_participation_icp_e8s : ?Nat64 }; + public type Percentage = { basis_points : ?Nat64 }; + public type Progress = { #LastNeuronId : T.NeuronId }; + public type Proposal = { url : Text; title : ?Text; action : ?T.Action; summary : Text }; + public type ProposalData = { id : ?T.NeuronId; failure_reason : ?T.GovernanceError; cf_participants : [T.CfParticipant]; ballots : [(Nat64, T.Ballot)]; proposal_timestamp_seconds : Nat64; reward_event_round : Nat64; failed_timestamp_seconds : Nat64; neurons_fund_data : ?T.NeuronsFundData; reject_cost_e8s : Nat64; derived_proposal_information : ?T.DerivedProposalInformation; latest_tally : ?T.Tally; sns_token_swap_lifecycle : ?Int32; decided_timestamp_seconds : Nat64; proposal : ?T.Proposal; proposer : ?T.NeuronId; wait_for_quiet_state : ?T.WaitForQuietState; executed_timestamp_seconds : Nat64; original_total_community_fund_maturity_e8s_equivalent : ?Nat64 }; + public type ProposalInfo = { id : ?T.NeuronId; status : Int32; topic : Int32; failure_reason : ?T.GovernanceError; ballots : [(Nat64, T.Ballot)]; proposal_timestamp_seconds : Nat64; reward_event_round : Nat64; deadline_timestamp_seconds : ?Nat64; failed_timestamp_seconds : Nat64; reject_cost_e8s : Nat64; derived_proposal_information : ?T.DerivedProposalInformation; latest_tally : ?T.Tally; reward_status : Int32; decided_timestamp_seconds : Nat64; proposal : ?T.Proposal; proposer : ?T.NeuronId; executed_timestamp_seconds : Nat64 }; + public type RegisterVote = { vote : Int32; proposal : ?T.NeuronId }; + public type RemoveHotKey = { hot_key_to_remove : ?Principal }; + public type RestoreAgingNeuronGroup = { count : ?Nat64; previous_total_stake_e8s : ?Nat64; current_total_stake_e8s : ?Nat64; group_type : Int32 }; + public type RestoreAgingSummary = { groups : [T.RestoreAgingNeuronGroup]; timestamp_seconds : ?Nat64 }; + public type Result = { #Ok; #Err : T.GovernanceError }; + public type Result1 = { #Error : T.GovernanceError; #NeuronId : T.NeuronId }; + public type Result10 = { #Ok : T.Ok1; #Err : T.GovernanceError }; + public type Result2 = { #Ok : T.Neuron; #Err : T.GovernanceError }; + public type Result3 = { #Ok : T.GovernanceCachedMetrics; #Err : T.GovernanceError }; + public type Result4 = { #Ok : T.RewardNodeProviders; #Err : T.GovernanceError }; + public type Result5 = { #Ok : T.NeuronInfo; #Err : T.GovernanceError }; + public type Result6 = { #Ok : T.Ok; #Err : T.GovernanceError }; + public type Result7 = { #Ok : T.NodeProvider; #Err : T.GovernanceError }; + public type Result8 = { #Committed : T.Committed; #Aborted : { } }; + public type Result9 = { #Committed : T.Committed1; #Aborted : { } }; + public type RewardEvent = { rounds_since_last_distribution : ?Nat64; day_after_genesis : Nat64; actual_timestamp_seconds : Nat64; total_available_e8s_equivalent : Nat64; latest_round_available_e8s_equivalent : ?Nat64; distributed_e8s_equivalent : Nat64; settled_proposals : [T.NeuronId] }; + public type RewardMode = { #RewardToNeuron : T.RewardToNeuron; #RewardToAccount : T.RewardToAccount }; + public type RewardNodeProvider = { node_provider : ?T.NodeProvider; reward_mode : ?T.RewardMode; amount_e8s : Nat64 }; + public type RewardNodeProviders = { use_registry_derived_rewards : ?Bool; rewards : [T.RewardNodeProvider] }; + public type RewardToAccount = { to_account : ?T.AccountIdentifier }; + public type RewardToNeuron = { dissolve_delay_seconds : Nat64 }; + public type SetDefaultFollowees = { default_followees : [(Int32, T.Followees)] }; + public type SetDissolveTimestamp = { dissolve_timestamp_seconds : Nat64 }; + public type SetOpenTimeWindowRequest = { open_time_window : ?T.TimeWindow }; + public type SetSnsTokenSwapOpenTimeWindow = { request : ?T.SetOpenTimeWindowRequest; swap_canister_id : ?Principal }; + public type SettleCommunityFundParticipation = { result : ?T.Result8; open_sns_token_swap_proposal_id : ?Nat64 }; + public type SettleNeuronsFundParticipationRequest = { result : ?T.Result9; nns_proposal_id : ?Nat64 }; + public type SettleNeuronsFundParticipationResponse = { result : ?T.Result10 }; + public type Spawn = { percentage_to_spawn : ?Nat32; new_controller : ?Principal; nonce : ?Nat64 }; + public type SpawnResponse = { created_neuron_id : ?T.NeuronId }; + public type Split = { amount_e8s : Nat64 }; + public type StakeMaturity = { percentage_to_stake : ?Nat32 }; + public type StakeMaturityResponse = { maturity_e8s : Nat64; staked_maturity_e8s : Nat64 }; + public type SwapBackgroundInformation = { ledger_index_canister_summary : ?T.CanisterSummary; fallback_controller_principal_ids : [Principal]; ledger_archive_canister_summaries : [T.CanisterSummary]; ledger_canister_summary : ?T.CanisterSummary; swap_canister_summary : ?T.CanisterSummary; governance_canister_summary : ?T.CanisterSummary; root_canister_summary : ?T.CanisterSummary; dapp_canister_summaries : [T.CanisterSummary] }; + public type SwapDistribution = { total : ?T.Tokens }; + public type SwapParameters = { minimum_participants : ?Nat64; neurons_fund_participation : ?Bool; duration : ?T.Duration; neuron_basket_construction_parameters : ?T.NeuronBasketConstructionParameters; confirmation_text : ?Text; maximum_participant_icp : ?T.Tokens; minimum_icp : ?T.Tokens; minimum_direct_participation_icp : ?T.Tokens; minimum_participant_icp : ?T.Tokens; start_time : ?T.GlobalTimeOfDay; maximum_direct_participation_icp : ?T.Tokens; maximum_icp : ?T.Tokens; neurons_fund_investment_icp : ?T.Tokens; restricted_countries : ?T.Countries }; + public type SwapParticipationLimits = { min_participant_icp_e8s : ?Nat64; max_participant_icp_e8s : ?Nat64; min_direct_participation_icp_e8s : ?Nat64; max_direct_participation_icp_e8s : ?Nat64 }; + public type Tally = { no : Nat64; yes : Nat64; total : Nat64; timestamp_seconds : Nat64 }; + public type TimeWindow = { start_timestamp_seconds : Nat64; end_timestamp_seconds : Nat64 }; + public type Tokens = { e8s : ?Nat64 }; + public type UpdateNodeProvider = { reward_account : ?T.AccountIdentifier }; + public type VotingRewardParameters = { reward_rate_transition_duration : ?T.Duration; initial_reward_rate : ?T.Percentage; final_reward_rate : ?T.Percentage }; + public type WaitForQuietState = { current_deadline_timestamp_seconds : Nat64 }; + public type XdrConversionRate = { xdr_permyriad_per_icp : ?Nat64; timestamp_seconds : ?Nat64 }; +}; diff --git a/ic/registry/actor.mo b/ic/registry/actor.mo new file mode 100755 index 0000000..0e464fa --- /dev/null +++ b/ic/registry/actor.mo @@ -0,0 +1,142 @@ +// Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go. +import T "types"; + +import { principalOfBlob } = "mo:⛔"; + +actor class _registry() : async actor {} { + public shared func add_api_boundary_nodes(_arg0 : T.AddApiBoundaryNodesPayload) : async () { + () + }; + public shared func add_firewall_rules(_arg0 : T.AddFirewallRulesPayload) : async () { + () + }; + public shared func add_node(_arg0 : T.AddNodePayload) : async (T.Result) { + (#Ok(principalOfBlob("x65889F698C07D7C894DA1BD5CA17F31F64C27784AB34E28F07F327E15569DFC5"))) + }; + public shared func add_node_operator(_arg0 : T.AddNodeOperatorPayload) : async () { + () + }; + public shared func add_nodes_to_subnet(_arg0 : T.AddNodesToSubnetPayload) : async () { + () + }; + public shared func add_or_remove_data_centers(_arg0 : T.AddOrRemoveDataCentersProposalPayload) : async () { + () + }; + public shared func bless_replica_version(_arg0 : T.BlessReplicaVersionPayload) : async () { + () + }; + public shared func change_subnet_membership(_arg0 : T.ChangeSubnetMembershipPayload) : async () { + () + }; + public shared func clear_provisional_whitelist() : async () { + () + }; + public shared func complete_canister_migration(_arg0 : T.CompleteCanisterMigrationPayload) : async (T.Result1) { + (#Ok) + }; + public shared func create_subnet(_arg0 : T.CreateSubnetPayload) : async () { + () + }; + public shared func delete_subnet(_arg0 : T.DeleteSubnetPayload) : async () { + () + }; + public shared func deploy_guestos_to_all_subnet_nodes(_arg0 : T.DeployGuestosToAllSubnetNodesPayload) : async () { + () + }; + public shared func deploy_guestos_to_all_unassigned_nodes(_arg0 : T.DeployGuestosToAllUnassignedNodesPayload) : async () { + () + }; + public query func get_build_metadata() : async (Text) { + ("16954823083438725750") + }; + public query func get_node_operators_and_dcs_of_node_provider(_arg0 : Principal) : async (T.Result2) { + (#Ok([ ( { id = "14850561312921654472"; gps = ?{ latitude = "UNKNOWN" # "float32"; longitude = "UNKNOWN" # "float32" }; region = "8551073967390334963"; owner = "16852795205354512948" }, { ipv6 = ?"11125315087921801557"; node_operator_principal_id = "x755D216CD371311FA94A0A14937936080790ECF3CA9E2E2088B3BEFB840C4C1A"; node_allowance = 2423141441329273866; rewardable_nodes = [ ( "6079560768047329034", 3562109596 ) ]; node_provider_principal_id = "x8EF2EC9B2498F34A2B149A8CF696F708866F3142755366C43EDAECCECEA5BF83"; dc_id = "1505710812436736874" } ) ])) + }; + public query func get_node_providers_monthly_xdr_rewards() : async (T.Result3) { + (#Ok({ rewards = [ ( "14850561312921654472", 8551073967390334963 ) ] })) + }; + public query func get_subnet_for_canister(_arg0 : T.GetSubnetForCanisterRequest) : async (T.Result4) { + (#Ok({ subnet_id = ?principalOfBlob("x65889F698C07D7C894DA1BD5CA17F31F64C27784AB34E28F07F327E15569DFC5") })) + }; + public shared func prepare_canister_migration(_arg0 : T.PrepareCanisterMigrationPayload) : async (T.Result1) { + (#Ok) + }; + public shared func recover_subnet(_arg0 : T.RecoverSubnetPayload) : async () { + () + }; + public shared func remove_api_boundary_nodes(_arg0 : T.RemoveApiBoundaryNodesPayload) : async () { + () + }; + public shared func remove_firewall_rules(_arg0 : T.RemoveFirewallRulesPayload) : async () { + () + }; + public shared func remove_node_directly(_arg0 : T.RemoveNodeDirectlyPayload) : async () { + () + }; + public shared func remove_node_operators(_arg0 : T.RemoveNodeOperatorsPayload) : async () { + () + }; + public shared func remove_nodes(_arg0 : T.RemoveNodesPayload) : async () { + () + }; + public shared func remove_nodes_from_subnet(_arg0 : T.RemoveNodesPayload) : async () { + () + }; + public shared func reroute_canister_ranges(_arg0 : T.RerouteCanisterRangesPayload) : async (T.Result1) { + (#Ok) + }; + public shared func retire_replica_version(_arg0 : T.RetireReplicaVersionPayload) : async () { + () + }; + public shared func revise_elected_replica_versions(_arg0 : T.ReviseElectedGuestosVersionsPayload) : async () { + () + }; + public shared func set_firewall_config(_arg0 : T.SetFirewallConfigPayload) : async () { + () + }; + public shared func update_api_boundary_nodes_version(_arg0 : T.AddApiBoundaryNodesPayload) : async () { + () + }; + public shared func update_elected_hostos_versions(_arg0 : T.UpdateElectedHostosVersionsPayload) : async () { + () + }; + public shared func update_elected_replica_versions(_arg0 : T.ReviseElectedGuestosVersionsPayload) : async () { + () + }; + public shared func update_firewall_rules(_arg0 : T.AddFirewallRulesPayload) : async () { + () + }; + public shared func update_node_directly(_arg0 : T.UpdateNodeDirectlyPayload) : async (T.Result1) { + (#Ok) + }; + public shared func update_node_domain_directly(_arg0 : T.UpdateNodeDomainDirectlyPayload) : async (T.Result1) { + (#Ok) + }; + public shared func update_node_ipv4_config_directly(_arg0 : T.UpdateNodeIPv4ConfigDirectlyPayload) : async (T.Result1) { + (#Ok) + }; + public shared func update_node_operator_config(_arg0 : T.UpdateNodeOperatorConfigPayload) : async () { + () + }; + public shared func update_node_operator_config_directly(_arg0 : T.UpdateNodeOperatorConfigDirectlyPayload) : async () { + () + }; + public shared func update_node_rewards_table(_arg0 : T.UpdateNodeRewardsTableProposalPayload) : async () { + () + }; + public shared func update_nodes_hostos_version(_arg0 : T.UpdateNodesHostosVersionPayload) : async () { + () + }; + public shared func update_ssh_readonly_access_for_all_unassigned_nodes(_arg0 : T.UpdateSshReadOnlyAccessForAllUnassignedNodesPayload) : async () { + () + }; + public shared func update_subnet(_arg0 : T.UpdateSubnetPayload) : async () { + () + }; + public shared func update_subnet_replica_version(_arg0 : T.DeployGuestosToAllSubnetNodesPayload) : async () { + () + }; + public shared func update_unassigned_nodes_config(_arg0 : T.UpdateUnassignedNodesConfigPayload) : async () { + () + }; +} diff --git a/ic/registry/agent.go b/ic/registry/agent.go new file mode 100755 index 0000000..d677049 --- /dev/null +++ b/ic/registry/agent.go @@ -0,0 +1,1051 @@ +// Package registry provides a client for the "registry" canister. +// Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go. +package registry + +import ( + "github.com/aviate-labs/agent-go" + "github.com/aviate-labs/agent-go/candid/idl" + "github.com/aviate-labs/agent-go/principal" +) + +type AddApiBoundaryNodesPayload struct { + Version string `ic:"version" json:"version"` + NodeIds []principal.Principal `ic:"node_ids" json:"node_ids"` +} + +type AddFirewallRulesPayload struct { + ExpectedHash string `ic:"expected_hash" json:"expected_hash"` + Scope FirewallRulesScope `ic:"scope" json:"scope"` + Positions []int32 `ic:"positions" json:"positions"` + Rules []FirewallRule `ic:"rules" json:"rules"` +} + +type AddNodeOperatorPayload struct { + Ipv6 *string `ic:"ipv6,omitempty" json:"ipv6,omitempty"` + NodeOperatorPrincipalId *principal.Principal `ic:"node_operator_principal_id,omitempty" json:"node_operator_principal_id,omitempty"` + NodeAllowance uint64 `ic:"node_allowance" json:"node_allowance"` + RewardableNodes []struct { + Field0 string `ic:"0" json:"0"` + Field1 uint32 `ic:"1" json:"1"` + } `ic:"rewardable_nodes" json:"rewardable_nodes"` + NodeProviderPrincipalId *principal.Principal `ic:"node_provider_principal_id,omitempty" json:"node_provider_principal_id,omitempty"` + DcId string `ic:"dc_id" json:"dc_id"` +} + +type AddNodePayload struct { + PrometheusMetricsEndpoint string `ic:"prometheus_metrics_endpoint" json:"prometheus_metrics_endpoint"` + HttpEndpoint string `ic:"http_endpoint" json:"http_endpoint"` + IdkgDealingEncryptionPk *[]byte `ic:"idkg_dealing_encryption_pk,omitempty" json:"idkg_dealing_encryption_pk,omitempty"` + Domain *string `ic:"domain,omitempty" json:"domain,omitempty"` + PublicIpv4Config *IPv4Config `ic:"public_ipv4_config,omitempty" json:"public_ipv4_config,omitempty"` + XnetEndpoint string `ic:"xnet_endpoint" json:"xnet_endpoint"` + ChipId *[]byte `ic:"chip_id,omitempty" json:"chip_id,omitempty"` + CommitteeSigningPk []byte `ic:"committee_signing_pk" json:"committee_signing_pk"` + NodeSigningPk []byte `ic:"node_signing_pk" json:"node_signing_pk"` + TransportTlsCert []byte `ic:"transport_tls_cert" json:"transport_tls_cert"` + NiDkgDealingEncryptionPk []byte `ic:"ni_dkg_dealing_encryption_pk" json:"ni_dkg_dealing_encryption_pk"` + P2pFlowEndpoints []string `ic:"p2p_flow_endpoints" json:"p2p_flow_endpoints"` +} + +type AddNodesToSubnetPayload struct { + SubnetId principal.Principal `ic:"subnet_id" json:"subnet_id"` + NodeIds []principal.Principal `ic:"node_ids" json:"node_ids"` +} + +type AddOrRemoveDataCentersProposalPayload struct { + DataCentersToAdd []DataCenterRecord `ic:"data_centers_to_add" json:"data_centers_to_add"` + DataCentersToRemove []string `ic:"data_centers_to_remove" json:"data_centers_to_remove"` +} + +// Agent is a client for the "registry" canister. +type Agent struct { + *agent.Agent + CanisterId principal.Principal +} + +// NewAgent creates a new agent for the "registry" canister. +func NewAgent(canisterId principal.Principal, config agent.Config) (*Agent, error) { + a, err := agent.New(config) + if err != nil { + return nil, err + } + return &Agent{ + Agent: a, + CanisterId: canisterId, + }, nil +} + +// AddApiBoundaryNodes calls the "add_api_boundary_nodes" method on the "registry" canister. +func (a Agent) AddApiBoundaryNodes(arg0 AddApiBoundaryNodesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "add_api_boundary_nodes", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// AddFirewallRules calls the "add_firewall_rules" method on the "registry" canister. +func (a Agent) AddFirewallRules(arg0 AddFirewallRulesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "add_firewall_rules", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// AddNode calls the "add_node" method on the "registry" canister. +func (a Agent) AddNode(arg0 AddNodePayload) (*Result, error) { + var r0 Result + if err := a.Agent.Call( + a.CanisterId, + "add_node", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// AddNodeOperator calls the "add_node_operator" method on the "registry" canister. +func (a Agent) AddNodeOperator(arg0 AddNodeOperatorPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "add_node_operator", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// AddNodesToSubnet calls the "add_nodes_to_subnet" method on the "registry" canister. +func (a Agent) AddNodesToSubnet(arg0 AddNodesToSubnetPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "add_nodes_to_subnet", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// AddOrRemoveDataCenters calls the "add_or_remove_data_centers" method on the "registry" canister. +func (a Agent) AddOrRemoveDataCenters(arg0 AddOrRemoveDataCentersProposalPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "add_or_remove_data_centers", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// BlessReplicaVersion calls the "bless_replica_version" method on the "registry" canister. +func (a Agent) BlessReplicaVersion(arg0 BlessReplicaVersionPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "bless_replica_version", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// ChangeSubnetMembership calls the "change_subnet_membership" method on the "registry" canister. +func (a Agent) ChangeSubnetMembership(arg0 ChangeSubnetMembershipPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "change_subnet_membership", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// ClearProvisionalWhitelist calls the "clear_provisional_whitelist" method on the "registry" canister. +func (a Agent) ClearProvisionalWhitelist() error { + if err := a.Agent.Call( + a.CanisterId, + "clear_provisional_whitelist", + []any{}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// CompleteCanisterMigration calls the "complete_canister_migration" method on the "registry" canister. +func (a Agent) CompleteCanisterMigration(arg0 CompleteCanisterMigrationPayload) (*Result1, error) { + var r0 Result1 + if err := a.Agent.Call( + a.CanisterId, + "complete_canister_migration", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// CreateSubnet calls the "create_subnet" method on the "registry" canister. +func (a Agent) CreateSubnet(arg0 CreateSubnetPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "create_subnet", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// DeleteSubnet calls the "delete_subnet" method on the "registry" canister. +func (a Agent) DeleteSubnet(arg0 DeleteSubnetPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "delete_subnet", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// DeployGuestosToAllSubnetNodes calls the "deploy_guestos_to_all_subnet_nodes" method on the "registry" canister. +func (a Agent) DeployGuestosToAllSubnetNodes(arg0 DeployGuestosToAllSubnetNodesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "deploy_guestos_to_all_subnet_nodes", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// DeployGuestosToAllUnassignedNodes calls the "deploy_guestos_to_all_unassigned_nodes" method on the "registry" canister. +func (a Agent) DeployGuestosToAllUnassignedNodes(arg0 DeployGuestosToAllUnassignedNodesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "deploy_guestos_to_all_unassigned_nodes", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// GetBuildMetadata calls the "get_build_metadata" method on the "registry" canister. +func (a Agent) GetBuildMetadata() (*string, error) { + var r0 string + if err := a.Agent.Query( + a.CanisterId, + "get_build_metadata", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetNodeOperatorsAndDcsOfNodeProvider calls the "get_node_operators_and_dcs_of_node_provider" method on the "registry" canister. +func (a Agent) GetNodeOperatorsAndDcsOfNodeProvider(arg0 principal.Principal) (*Result2, error) { + var r0 Result2 + if err := a.Agent.Query( + a.CanisterId, + "get_node_operators_and_dcs_of_node_provider", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetNodeProvidersMonthlyXdrRewards calls the "get_node_providers_monthly_xdr_rewards" method on the "registry" canister. +func (a Agent) GetNodeProvidersMonthlyXdrRewards() (*Result3, error) { + var r0 Result3 + if err := a.Agent.Query( + a.CanisterId, + "get_node_providers_monthly_xdr_rewards", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// GetSubnetForCanister calls the "get_subnet_for_canister" method on the "registry" canister. +func (a Agent) GetSubnetForCanister(arg0 GetSubnetForCanisterRequest) (*Result4, error) { + var r0 Result4 + if err := a.Agent.Query( + a.CanisterId, + "get_subnet_for_canister", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// PrepareCanisterMigration calls the "prepare_canister_migration" method on the "registry" canister. +func (a Agent) PrepareCanisterMigration(arg0 PrepareCanisterMigrationPayload) (*Result1, error) { + var r0 Result1 + if err := a.Agent.Call( + a.CanisterId, + "prepare_canister_migration", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// RecoverSubnet calls the "recover_subnet" method on the "registry" canister. +func (a Agent) RecoverSubnet(arg0 RecoverSubnetPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "recover_subnet", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// RemoveApiBoundaryNodes calls the "remove_api_boundary_nodes" method on the "registry" canister. +func (a Agent) RemoveApiBoundaryNodes(arg0 RemoveApiBoundaryNodesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "remove_api_boundary_nodes", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// RemoveFirewallRules calls the "remove_firewall_rules" method on the "registry" canister. +func (a Agent) RemoveFirewallRules(arg0 RemoveFirewallRulesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "remove_firewall_rules", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// RemoveNodeDirectly calls the "remove_node_directly" method on the "registry" canister. +func (a Agent) RemoveNodeDirectly(arg0 RemoveNodeDirectlyPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "remove_node_directly", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// RemoveNodeOperators calls the "remove_node_operators" method on the "registry" canister. +func (a Agent) RemoveNodeOperators(arg0 RemoveNodeOperatorsPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "remove_node_operators", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// RemoveNodes calls the "remove_nodes" method on the "registry" canister. +func (a Agent) RemoveNodes(arg0 RemoveNodesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "remove_nodes", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// RemoveNodesFromSubnet calls the "remove_nodes_from_subnet" method on the "registry" canister. +func (a Agent) RemoveNodesFromSubnet(arg0 RemoveNodesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "remove_nodes_from_subnet", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// RerouteCanisterRanges calls the "reroute_canister_ranges" method on the "registry" canister. +func (a Agent) RerouteCanisterRanges(arg0 RerouteCanisterRangesPayload) (*Result1, error) { + var r0 Result1 + if err := a.Agent.Call( + a.CanisterId, + "reroute_canister_ranges", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// RetireReplicaVersion calls the "retire_replica_version" method on the "registry" canister. +func (a Agent) RetireReplicaVersion(arg0 RetireReplicaVersionPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "retire_replica_version", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// ReviseElectedReplicaVersions calls the "revise_elected_replica_versions" method on the "registry" canister. +func (a Agent) ReviseElectedReplicaVersions(arg0 ReviseElectedGuestosVersionsPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "revise_elected_replica_versions", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// SetFirewallConfig calls the "set_firewall_config" method on the "registry" canister. +func (a Agent) SetFirewallConfig(arg0 SetFirewallConfigPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "set_firewall_config", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateApiBoundaryNodesVersion calls the "update_api_boundary_nodes_version" method on the "registry" canister. +func (a Agent) UpdateApiBoundaryNodesVersion(arg0 AddApiBoundaryNodesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_api_boundary_nodes_version", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateElectedHostosVersions calls the "update_elected_hostos_versions" method on the "registry" canister. +func (a Agent) UpdateElectedHostosVersions(arg0 UpdateElectedHostosVersionsPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_elected_hostos_versions", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateElectedReplicaVersions calls the "update_elected_replica_versions" method on the "registry" canister. +func (a Agent) UpdateElectedReplicaVersions(arg0 ReviseElectedGuestosVersionsPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_elected_replica_versions", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateFirewallRules calls the "update_firewall_rules" method on the "registry" canister. +func (a Agent) UpdateFirewallRules(arg0 AddFirewallRulesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_firewall_rules", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateNodeDirectly calls the "update_node_directly" method on the "registry" canister. +func (a Agent) UpdateNodeDirectly(arg0 UpdateNodeDirectlyPayload) (*Result1, error) { + var r0 Result1 + if err := a.Agent.Call( + a.CanisterId, + "update_node_directly", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// UpdateNodeDomainDirectly calls the "update_node_domain_directly" method on the "registry" canister. +func (a Agent) UpdateNodeDomainDirectly(arg0 UpdateNodeDomainDirectlyPayload) (*Result1, error) { + var r0 Result1 + if err := a.Agent.Call( + a.CanisterId, + "update_node_domain_directly", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// UpdateNodeIpv4ConfigDirectly calls the "update_node_ipv4_config_directly" method on the "registry" canister. +func (a Agent) UpdateNodeIpv4ConfigDirectly(arg0 UpdateNodeIPv4ConfigDirectlyPayload) (*Result1, error) { + var r0 Result1 + if err := a.Agent.Call( + a.CanisterId, + "update_node_ipv4_config_directly", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + +// UpdateNodeOperatorConfig calls the "update_node_operator_config" method on the "registry" canister. +func (a Agent) UpdateNodeOperatorConfig(arg0 UpdateNodeOperatorConfigPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_node_operator_config", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateNodeOperatorConfigDirectly calls the "update_node_operator_config_directly" method on the "registry" canister. +func (a Agent) UpdateNodeOperatorConfigDirectly(arg0 UpdateNodeOperatorConfigDirectlyPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_node_operator_config_directly", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateNodeRewardsTable calls the "update_node_rewards_table" method on the "registry" canister. +func (a Agent) UpdateNodeRewardsTable(arg0 UpdateNodeRewardsTableProposalPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_node_rewards_table", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateNodesHostosVersion calls the "update_nodes_hostos_version" method on the "registry" canister. +func (a Agent) UpdateNodesHostosVersion(arg0 UpdateNodesHostosVersionPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_nodes_hostos_version", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateSshReadonlyAccessForAllUnassignedNodes calls the "update_ssh_readonly_access_for_all_unassigned_nodes" method on the "registry" canister. +func (a Agent) UpdateSshReadonlyAccessForAllUnassignedNodes(arg0 UpdateSshReadOnlyAccessForAllUnassignedNodesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_ssh_readonly_access_for_all_unassigned_nodes", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateSubnet calls the "update_subnet" method on the "registry" canister. +func (a Agent) UpdateSubnet(arg0 UpdateSubnetPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_subnet", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateSubnetReplicaVersion calls the "update_subnet_replica_version" method on the "registry" canister. +func (a Agent) UpdateSubnetReplicaVersion(arg0 DeployGuestosToAllSubnetNodesPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_subnet_replica_version", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +// UpdateUnassignedNodesConfig calls the "update_unassigned_nodes_config" method on the "registry" canister. +func (a Agent) UpdateUnassignedNodesConfig(arg0 UpdateUnassignedNodesConfigPayload) error { + if err := a.Agent.Call( + a.CanisterId, + "update_unassigned_nodes_config", + []any{arg0}, + []any{}, + ); err != nil { + return err + } + return nil +} + +type BlessReplicaVersionPayload struct { + ReleasePackageUrls *[]string `ic:"release_package_urls,omitempty" json:"release_package_urls,omitempty"` + NodeManagerSha256Hex string `ic:"node_manager_sha256_hex" json:"node_manager_sha256_hex"` + ReleasePackageUrl string `ic:"release_package_url" json:"release_package_url"` + Sha256Hex string `ic:"sha256_hex" json:"sha256_hex"` + GuestLaunchMeasurementSha256Hex *string `ic:"guest_launch_measurement_sha256_hex,omitempty" json:"guest_launch_measurement_sha256_hex,omitempty"` + ReplicaVersionId string `ic:"replica_version_id" json:"replica_version_id"` + ReleasePackageSha256Hex string `ic:"release_package_sha256_hex" json:"release_package_sha256_hex"` + NodeManagerBinaryUrl string `ic:"node_manager_binary_url" json:"node_manager_binary_url"` + BinaryUrl string `ic:"binary_url" json:"binary_url"` +} + +type CanisterIdRange struct { + End principal.Principal `ic:"end" json:"end"` + Start principal.Principal `ic:"start" json:"start"` +} + +type ChangeSubnetMembershipPayload struct { + NodeIdsAdd []principal.Principal `ic:"node_ids_add" json:"node_ids_add"` + SubnetId principal.Principal `ic:"subnet_id" json:"subnet_id"` + NodeIdsRemove []principal.Principal `ic:"node_ids_remove" json:"node_ids_remove"` +} + +type CompleteCanisterMigrationPayload struct { + CanisterIdRanges []CanisterIdRange `ic:"canister_id_ranges" json:"canister_id_ranges"` + MigrationTrace []principal.Principal `ic:"migration_trace" json:"migration_trace"` +} + +type CreateSubnetPayload struct { + UnitDelayMillis uint64 `ic:"unit_delay_millis" json:"unit_delay_millis"` + MaxInstructionsPerRound uint64 `ic:"max_instructions_per_round" json:"max_instructions_per_round"` + Features SubnetFeatures `ic:"features" json:"features"` + MaxInstructionsPerMessage uint64 `ic:"max_instructions_per_message" json:"max_instructions_per_message"` + GossipRegistryPollPeriodMs uint32 `ic:"gossip_registry_poll_period_ms" json:"gossip_registry_poll_period_ms"` + MaxIngressBytesPerMessage uint64 `ic:"max_ingress_bytes_per_message" json:"max_ingress_bytes_per_message"` + DkgDealingsPerBlock uint64 `ic:"dkg_dealings_per_block" json:"dkg_dealings_per_block"` + MaxBlockPayloadSize uint64 `ic:"max_block_payload_size" json:"max_block_payload_size"` + MaxInstructionsPerInstallCode uint64 `ic:"max_instructions_per_install_code" json:"max_instructions_per_install_code"` + StartAsNns bool `ic:"start_as_nns" json:"start_as_nns"` + IsHalted bool `ic:"is_halted" json:"is_halted"` + GossipPfnEvaluationPeriodMs uint32 `ic:"gossip_pfn_evaluation_period_ms" json:"gossip_pfn_evaluation_period_ms"` + MaxIngressMessagesPerBlock uint64 `ic:"max_ingress_messages_per_block" json:"max_ingress_messages_per_block"` + MaxNumberOfCanisters uint64 `ic:"max_number_of_canisters" json:"max_number_of_canisters"` + EcdsaConfig *EcdsaInitialConfig `ic:"ecdsa_config,omitempty" json:"ecdsa_config,omitempty"` + GossipMaxArtifactStreamsPerPeer uint32 `ic:"gossip_max_artifact_streams_per_peer" json:"gossip_max_artifact_streams_per_peer"` + ReplicaVersionId string `ic:"replica_version_id" json:"replica_version_id"` + GossipMaxDuplicity uint32 `ic:"gossip_max_duplicity" json:"gossip_max_duplicity"` + GossipMaxChunkWaitMs uint32 `ic:"gossip_max_chunk_wait_ms" json:"gossip_max_chunk_wait_ms"` + DkgIntervalLength uint64 `ic:"dkg_interval_length" json:"dkg_interval_length"` + SubnetIdOverride *principal.Principal `ic:"subnet_id_override,omitempty" json:"subnet_id_override,omitempty"` + SshBackupAccess []string `ic:"ssh_backup_access" json:"ssh_backup_access"` + IngressBytesPerBlockSoftCap uint64 `ic:"ingress_bytes_per_block_soft_cap" json:"ingress_bytes_per_block_soft_cap"` + InitialNotaryDelayMillis uint64 `ic:"initial_notary_delay_millis" json:"initial_notary_delay_millis"` + GossipMaxChunkSize uint32 `ic:"gossip_max_chunk_size" json:"gossip_max_chunk_size"` + SubnetType SubnetType `ic:"subnet_type" json:"subnet_type"` + SshReadonlyAccess []string `ic:"ssh_readonly_access" json:"ssh_readonly_access"` + GossipRetransmissionRequestMs uint32 `ic:"gossip_retransmission_request_ms" json:"gossip_retransmission_request_ms"` + GossipReceiveCheckCacheSize uint32 `ic:"gossip_receive_check_cache_size" json:"gossip_receive_check_cache_size"` + NodeIds []principal.Principal `ic:"node_ids" json:"node_ids"` +} + +type DataCenterRecord struct { + Id string `ic:"id" json:"id"` + Gps *Gps `ic:"gps,omitempty" json:"gps,omitempty"` + Region string `ic:"region" json:"region"` + Owner string `ic:"owner" json:"owner"` +} + +type DeleteSubnetPayload struct { + SubnetId *principal.Principal `ic:"subnet_id,omitempty" json:"subnet_id,omitempty"` +} + +type DeployGuestosToAllSubnetNodesPayload struct { + SubnetId principal.Principal `ic:"subnet_id" json:"subnet_id"` + ReplicaVersionId string `ic:"replica_version_id" json:"replica_version_id"` +} + +type DeployGuestosToAllUnassignedNodesPayload struct { + ElectedReplicaVersion string `ic:"elected_replica_version" json:"elected_replica_version"` +} + +type EcdsaConfig struct { + QuadruplesToCreateInAdvance uint32 `ic:"quadruples_to_create_in_advance" json:"quadruples_to_create_in_advance"` + MaxQueueSize *uint32 `ic:"max_queue_size,omitempty" json:"max_queue_size,omitempty"` + KeyIds []EcdsaKeyId `ic:"key_ids" json:"key_ids"` + SignatureRequestTimeoutNs *uint64 `ic:"signature_request_timeout_ns,omitempty" json:"signature_request_timeout_ns,omitempty"` + IdkgKeyRotationPeriodMs *uint64 `ic:"idkg_key_rotation_period_ms,omitempty" json:"idkg_key_rotation_period_ms,omitempty"` +} + +type EcdsaCurve struct { + Secp256k1 *idl.Null `ic:"secp256k1,variant"` +} + +type EcdsaInitialConfig struct { + QuadruplesToCreateInAdvance uint32 `ic:"quadruples_to_create_in_advance" json:"quadruples_to_create_in_advance"` + MaxQueueSize *uint32 `ic:"max_queue_size,omitempty" json:"max_queue_size,omitempty"` + Keys []EcdsaKeyRequest `ic:"keys" json:"keys"` + SignatureRequestTimeoutNs *uint64 `ic:"signature_request_timeout_ns,omitempty" json:"signature_request_timeout_ns,omitempty"` + IdkgKeyRotationPeriodMs *uint64 `ic:"idkg_key_rotation_period_ms,omitempty" json:"idkg_key_rotation_period_ms,omitempty"` +} + +type EcdsaKeyId struct { + Name string `ic:"name" json:"name"` + Curve EcdsaCurve `ic:"curve" json:"curve"` +} + +type EcdsaKeyRequest struct { + KeyId EcdsaKeyId `ic:"key_id" json:"key_id"` + SubnetId *principal.Principal `ic:"subnet_id,omitempty" json:"subnet_id,omitempty"` +} + +type FirewallRule struct { + Ipv4Prefixes []string `ic:"ipv4_prefixes" json:"ipv4_prefixes"` + Direction *int32 `ic:"direction,omitempty" json:"direction,omitempty"` + Action int32 `ic:"action" json:"action"` + User *string `ic:"user,omitempty" json:"user,omitempty"` + Comment string `ic:"comment" json:"comment"` + Ipv6Prefixes []string `ic:"ipv6_prefixes" json:"ipv6_prefixes"` + Ports []uint32 `ic:"ports" json:"ports"` +} + +type FirewallRulesScope struct { + Node *principal.Principal `ic:"Node,variant"` + ReplicaNodes *idl.Null `ic:"ReplicaNodes,variant"` + ApiBoundaryNodes *idl.Null `ic:"ApiBoundaryNodes,variant"` + Subnet *principal.Principal `ic:"Subnet,variant"` + Global *idl.Null `ic:"Global,variant"` +} + +type GetSubnetForCanisterRequest struct { + Principal *principal.Principal `ic:""principal",omitempty" json:""principal",omitempty"` +} + +type GetSubnetForCanisterResponse struct { + SubnetId *principal.Principal `ic:"subnet_id,omitempty" json:"subnet_id,omitempty"` +} + +type Gps struct { + Latitude float32 `ic:"latitude" json:"latitude"` + Longitude float32 `ic:"longitude" json:"longitude"` +} + +type IPv4Config struct { + PrefixLength uint32 `ic:"prefix_length" json:"prefix_length"` + GatewayIpAddr string `ic:"gateway_ip_addr" json:"gateway_ip_addr"` + IpAddr string `ic:"ip_addr" json:"ip_addr"` +} + +type NodeOperatorRecord struct { + Ipv6 *string `ic:"ipv6,omitempty" json:"ipv6,omitempty"` + NodeOperatorPrincipalId []byte `ic:"node_operator_principal_id" json:"node_operator_principal_id"` + NodeAllowance uint64 `ic:"node_allowance" json:"node_allowance"` + RewardableNodes []struct { + Field0 string `ic:"0" json:"0"` + Field1 uint32 `ic:"1" json:"1"` + } `ic:"rewardable_nodes" json:"rewardable_nodes"` + NodeProviderPrincipalId []byte `ic:"node_provider_principal_id" json:"node_provider_principal_id"` + DcId string `ic:"dc_id" json:"dc_id"` +} + +type NodeProvidersMonthlyXdrRewards struct { + Rewards []struct { + Field0 string `ic:"0" json:"0"` + Field1 uint64 `ic:"1" json:"1"` + } `ic:"rewards" json:"rewards"` +} + +type NodeRewardRate struct { + XdrPermyriadPerNodePerMonth uint64 `ic:"xdr_permyriad_per_node_per_month" json:"xdr_permyriad_per_node_per_month"` + RewardCoefficientPercent *int32 `ic:"reward_coefficient_percent,omitempty" json:"reward_coefficient_percent,omitempty"` +} + +type NodeRewardRates struct { + Rates []struct { + Field0 string `ic:"0" json:"0"` + Field1 NodeRewardRate `ic:"1" json:"1"` + } `ic:"rates" json:"rates"` +} + +type PrepareCanisterMigrationPayload struct { + CanisterIdRanges []CanisterIdRange `ic:"canister_id_ranges" json:"canister_id_ranges"` + SourceSubnet principal.Principal `ic:"source_subnet" json:"source_subnet"` + DestinationSubnet principal.Principal `ic:"destination_subnet" json:"destination_subnet"` +} + +type RecoverSubnetPayload struct { + Height uint64 `ic:"height" json:"height"` + ReplacementNodes *[]principal.Principal `ic:"replacement_nodes,omitempty" json:"replacement_nodes,omitempty"` + SubnetId principal.Principal `ic:"subnet_id" json:"subnet_id"` + RegistryStoreUri *struct { + Field0 string `ic:"0" json:"0"` + Field1 string `ic:"1" json:"1"` + Field2 uint64 `ic:"2" json:"2"` + } `ic:"registry_store_uri,omitempty" json:"registry_store_uri,omitempty"` + EcdsaConfig *EcdsaInitialConfig `ic:"ecdsa_config,omitempty" json:"ecdsa_config,omitempty"` + StateHash []byte `ic:"state_hash" json:"state_hash"` + TimeNs uint64 `ic:"time_ns" json:"time_ns"` +} + +type RemoveApiBoundaryNodesPayload struct { + NodeIds []principal.Principal `ic:"node_ids" json:"node_ids"` +} + +type RemoveFirewallRulesPayload struct { + ExpectedHash string `ic:"expected_hash" json:"expected_hash"` + Scope FirewallRulesScope `ic:"scope" json:"scope"` + Positions []int32 `ic:"positions" json:"positions"` +} + +type RemoveNodeDirectlyPayload struct { + NodeId principal.Principal `ic:"node_id" json:"node_id"` +} + +type RemoveNodeOperatorsPayload struct { + NodeOperatorsToRemove [][]byte `ic:"node_operators_to_remove" json:"node_operators_to_remove"` +} + +type RemoveNodesPayload struct { + NodeIds []principal.Principal `ic:"node_ids" json:"node_ids"` +} + +type RerouteCanisterRangesPayload struct { + SourceSubnet principal.Principal `ic:"source_subnet" json:"source_subnet"` + ReassignedCanisterRanges []CanisterIdRange `ic:"reassigned_canister_ranges" json:"reassigned_canister_ranges"` + DestinationSubnet principal.Principal `ic:"destination_subnet" json:"destination_subnet"` +} + +type Result struct { + Ok *principal.Principal `ic:"Ok,variant"` + Err *string `ic:"Err,variant"` +} + +type Result1 struct { + Ok *idl.Null `ic:"Ok,variant"` + Err *string `ic:"Err,variant"` +} + +type Result2 struct { + Ok *[]struct { + Field0 DataCenterRecord `ic:"0" json:"0"` + Field1 NodeOperatorRecord `ic:"1" json:"1"` + } `ic:"Ok,variant"` + Err *string `ic:"Err,variant"` +} + +type Result3 struct { + Ok *NodeProvidersMonthlyXdrRewards `ic:"Ok,variant"` + Err *string `ic:"Err,variant"` +} + +type Result4 struct { + Ok *GetSubnetForCanisterResponse `ic:"Ok,variant"` + Err *string `ic:"Err,variant"` +} + +type RetireReplicaVersionPayload struct { + ReplicaVersionIds []string `ic:"replica_version_ids" json:"replica_version_ids"` +} + +type ReviseElectedGuestosVersionsPayload struct { + ReleasePackageUrls []string `ic:"release_package_urls" json:"release_package_urls"` + ReplicaVersionsToUnelect []string `ic:"replica_versions_to_unelect" json:"replica_versions_to_unelect"` + ReplicaVersionToElect *string `ic:"replica_version_to_elect,omitempty" json:"replica_version_to_elect,omitempty"` + GuestLaunchMeasurementSha256Hex *string `ic:"guest_launch_measurement_sha256_hex,omitempty" json:"guest_launch_measurement_sha256_hex,omitempty"` + ReleasePackageSha256Hex *string `ic:"release_package_sha256_hex,omitempty" json:"release_package_sha256_hex,omitempty"` +} + +type SetFirewallConfigPayload struct { + Ipv4Prefixes []string `ic:"ipv4_prefixes" json:"ipv4_prefixes"` + FirewallConfig string `ic:"firewall_config" json:"firewall_config"` + Ipv6Prefixes []string `ic:"ipv6_prefixes" json:"ipv6_prefixes"` +} + +type SubnetFeatures struct { + CanisterSandboxing bool `ic:"canister_sandboxing" json:"canister_sandboxing"` + HttpRequests bool `ic:"http_requests" json:"http_requests"` + SevEnabled *bool `ic:"sev_enabled,omitempty" json:"sev_enabled,omitempty"` +} + +type SubnetType struct { + Application *idl.Null `ic:"application,variant"` + VerifiedApplication *idl.Null `ic:"verified_application,variant"` + System *idl.Null `ic:"system,variant"` +} + +type UpdateElectedHostosVersionsPayload struct { + ReleasePackageUrls []string `ic:"release_package_urls" json:"release_package_urls"` + HostosVersionToElect *string `ic:"hostos_version_to_elect,omitempty" json:"hostos_version_to_elect,omitempty"` + HostosVersionsToUnelect []string `ic:"hostos_versions_to_unelect" json:"hostos_versions_to_unelect"` + ReleasePackageSha256Hex *string `ic:"release_package_sha256_hex,omitempty" json:"release_package_sha256_hex,omitempty"` +} + +type UpdateNodeDirectlyPayload struct { + IdkgDealingEncryptionPk *[]byte `ic:"idkg_dealing_encryption_pk,omitempty" json:"idkg_dealing_encryption_pk,omitempty"` +} + +type UpdateNodeDomainDirectlyPayload struct { + NodeId principal.Principal `ic:"node_id" json:"node_id"` + Domain *string `ic:"domain,omitempty" json:"domain,omitempty"` +} + +type UpdateNodeIPv4ConfigDirectlyPayload struct { + Ipv4Config *IPv4Config `ic:"ipv4_config,omitempty" json:"ipv4_config,omitempty"` + NodeId principal.Principal `ic:"node_id" json:"node_id"` +} + +type UpdateNodeOperatorConfigDirectlyPayload struct { + NodeOperatorId *principal.Principal `ic:"node_operator_id,omitempty" json:"node_operator_id,omitempty"` + NodeProviderId *principal.Principal `ic:"node_provider_id,omitempty" json:"node_provider_id,omitempty"` +} + +type UpdateNodeOperatorConfigPayload struct { + NodeOperatorId *principal.Principal `ic:"node_operator_id,omitempty" json:"node_operator_id,omitempty"` + SetIpv6ToNone *bool `ic:"set_ipv6_to_none,omitempty" json:"set_ipv6_to_none,omitempty"` + Ipv6 *string `ic:"ipv6,omitempty" json:"ipv6,omitempty"` + NodeProviderId *principal.Principal `ic:"node_provider_id,omitempty" json:"node_provider_id,omitempty"` + NodeAllowance *uint64 `ic:"node_allowance,omitempty" json:"node_allowance,omitempty"` + RewardableNodes []struct { + Field0 string `ic:"0" json:"0"` + Field1 uint32 `ic:"1" json:"1"` + } `ic:"rewardable_nodes" json:"rewardable_nodes"` + DcId *string `ic:"dc_id,omitempty" json:"dc_id,omitempty"` +} + +type UpdateNodeRewardsTableProposalPayload struct { + NewEntries []struct { + Field0 string `ic:"0" json:"0"` + Field1 NodeRewardRates `ic:"1" json:"1"` + } `ic:"new_entries" json:"new_entries"` +} + +type UpdateNodesHostosVersionPayload struct { + HostosVersionId *string `ic:"hostos_version_id,omitempty" json:"hostos_version_id,omitempty"` + NodeIds []principal.Principal `ic:"node_ids" json:"node_ids"` +} + +type UpdateSshReadOnlyAccessForAllUnassignedNodesPayload struct { + SshReadonlyKeys []string `ic:"ssh_readonly_keys" json:"ssh_readonly_keys"` +} + +type UpdateSubnetPayload struct { + UnitDelayMillis *uint64 `ic:"unit_delay_millis,omitempty" json:"unit_delay_millis,omitempty"` + MaxDuplicity *uint32 `ic:"max_duplicity,omitempty" json:"max_duplicity,omitempty"` + MaxInstructionsPerRound *uint64 `ic:"max_instructions_per_round,omitempty" json:"max_instructions_per_round,omitempty"` + Features *SubnetFeatures `ic:"features,omitempty" json:"features,omitempty"` + SetGossipConfigToDefault bool `ic:"set_gossip_config_to_default" json:"set_gossip_config_to_default"` + MaxInstructionsPerMessage *uint64 `ic:"max_instructions_per_message,omitempty" json:"max_instructions_per_message,omitempty"` + HaltAtCupHeight *bool `ic:"halt_at_cup_height,omitempty" json:"halt_at_cup_height,omitempty"` + PfnEvaluationPeriodMs *uint32 `ic:"pfn_evaluation_period_ms,omitempty" json:"pfn_evaluation_period_ms,omitempty"` + SubnetId principal.Principal `ic:"subnet_id" json:"subnet_id"` + MaxIngressBytesPerMessage *uint64 `ic:"max_ingress_bytes_per_message,omitempty" json:"max_ingress_bytes_per_message,omitempty"` + DkgDealingsPerBlock *uint64 `ic:"dkg_dealings_per_block,omitempty" json:"dkg_dealings_per_block,omitempty"` + EcdsaKeySigningDisable *[]EcdsaKeyId `ic:"ecdsa_key_signing_disable,omitempty" json:"ecdsa_key_signing_disable,omitempty"` + MaxBlockPayloadSize *uint64 `ic:"max_block_payload_size,omitempty" json:"max_block_payload_size,omitempty"` + MaxInstructionsPerInstallCode *uint64 `ic:"max_instructions_per_install_code,omitempty" json:"max_instructions_per_install_code,omitempty"` + StartAsNns *bool `ic:"start_as_nns,omitempty" json:"start_as_nns,omitempty"` + IsHalted *bool `ic:"is_halted,omitempty" json:"is_halted,omitempty"` + MaxIngressMessagesPerBlock *uint64 `ic:"max_ingress_messages_per_block,omitempty" json:"max_ingress_messages_per_block,omitempty"` + MaxNumberOfCanisters *uint64 `ic:"max_number_of_canisters,omitempty" json:"max_number_of_canisters,omitempty"` + EcdsaConfig *EcdsaConfig `ic:"ecdsa_config,omitempty" json:"ecdsa_config,omitempty"` + RetransmissionRequestMs *uint32 `ic:"retransmission_request_ms,omitempty" json:"retransmission_request_ms,omitempty"` + DkgIntervalLength *uint64 `ic:"dkg_interval_length,omitempty" json:"dkg_interval_length,omitempty"` + RegistryPollPeriodMs *uint32 `ic:"registry_poll_period_ms,omitempty" json:"registry_poll_period_ms,omitempty"` + MaxChunkWaitMs *uint32 `ic:"max_chunk_wait_ms,omitempty" json:"max_chunk_wait_ms,omitempty"` + ReceiveCheckCacheSize *uint32 `ic:"receive_check_cache_size,omitempty" json:"receive_check_cache_size,omitempty"` + EcdsaKeySigningEnable *[]EcdsaKeyId `ic:"ecdsa_key_signing_enable,omitempty" json:"ecdsa_key_signing_enable,omitempty"` + SshBackupAccess *[]string `ic:"ssh_backup_access,omitempty" json:"ssh_backup_access,omitempty"` + MaxChunkSize *uint32 `ic:"max_chunk_size,omitempty" json:"max_chunk_size,omitempty"` + InitialNotaryDelayMillis *uint64 `ic:"initial_notary_delay_millis,omitempty" json:"initial_notary_delay_millis,omitempty"` + MaxArtifactStreamsPerPeer *uint32 `ic:"max_artifact_streams_per_peer,omitempty" json:"max_artifact_streams_per_peer,omitempty"` + SubnetType *SubnetType `ic:"subnet_type,omitempty" json:"subnet_type,omitempty"` + SshReadonlyAccess *[]string `ic:"ssh_readonly_access,omitempty" json:"ssh_readonly_access,omitempty"` +} + +type UpdateUnassignedNodesConfigPayload struct { + ReplicaVersion *string `ic:"replica_version,omitempty" json:"replica_version,omitempty"` + SshReadonlyAccess *[]string `ic:"ssh_readonly_access,omitempty" json:"ssh_readonly_access,omitempty"` +} diff --git a/ic/registry/types.mo b/ic/registry/types.mo new file mode 100755 index 0000000..5d3d204 --- /dev/null +++ b/ic/registry/types.mo @@ -0,0 +1,62 @@ +// Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go. +module T { + public type AddApiBoundaryNodesPayload = { version : Text; node_ids : [Principal] }; + public type AddFirewallRulesPayload = { expected_hash : Text; scope : T.FirewallRulesScope; positions : [Int32]; rules : [T.FirewallRule] }; + public type AddNodeOperatorPayload = { ipv6 : ?Text; node_operator_principal_id : ?Principal; node_allowance : Nat64; rewardable_nodes : [(Text, Nat32)]; node_provider_principal_id : ?Principal; dc_id : Text }; + public type AddNodePayload = { prometheus_metrics_endpoint : Text; http_endpoint : Text; idkg_dealing_encryption_pk : ?Blob; domain : ?Text; public_ipv4_config : ?T.IPv4Config; xnet_endpoint : Text; chip_id : ?Blob; committee_signing_pk : Blob; node_signing_pk : Blob; transport_tls_cert : Blob; ni_dkg_dealing_encryption_pk : Blob; p2p_flow_endpoints : [Text] }; + public type AddNodesToSubnetPayload = { subnet_id : Principal; node_ids : [Principal] }; + public type AddOrRemoveDataCentersProposalPayload = { data_centers_to_add : [T.DataCenterRecord]; data_centers_to_remove : [Text] }; + public type BlessReplicaVersionPayload = { release_package_urls : ?[Text]; node_manager_sha256_hex : Text; release_package_url : Text; sha256_hex : Text; guest_launch_measurement_sha256_hex : ?Text; replica_version_id : Text; release_package_sha256_hex : Text; node_manager_binary_url : Text; binary_url : Text }; + public type CanisterIdRange = { end : Principal; start : Principal }; + public type ChangeSubnetMembershipPayload = { node_ids_add : [Principal]; subnet_id : Principal; node_ids_remove : [Principal] }; + public type CompleteCanisterMigrationPayload = { canister_id_ranges : [T.CanisterIdRange]; migration_trace : [Principal] }; + public type CreateSubnetPayload = { unit_delay_millis : Nat64; max_instructions_per_round : Nat64; features : T.SubnetFeatures; max_instructions_per_message : Nat64; gossip_registry_poll_period_ms : Nat32; max_ingress_bytes_per_message : Nat64; dkg_dealings_per_block : Nat64; max_block_payload_size : Nat64; max_instructions_per_install_code : Nat64; start_as_nns : Bool; is_halted : Bool; gossip_pfn_evaluation_period_ms : Nat32; max_ingress_messages_per_block : Nat64; max_number_of_canisters : Nat64; ecdsa_config : ?T.EcdsaInitialConfig; gossip_max_artifact_streams_per_peer : Nat32; replica_version_id : Text; gossip_max_duplicity : Nat32; gossip_max_chunk_wait_ms : Nat32; dkg_interval_length : Nat64; subnet_id_override : ?Principal; ssh_backup_access : [Text]; ingress_bytes_per_block_soft_cap : Nat64; initial_notary_delay_millis : Nat64; gossip_max_chunk_size : Nat32; subnet_type : T.SubnetType; ssh_readonly_access : [Text]; gossip_retransmission_request_ms : Nat32; gossip_receive_check_cache_size : Nat32; node_ids : [Principal] }; + public type DataCenterRecord = { id : Text; gps : ?T.Gps; region : Text; owner : Text }; + public type DeleteSubnetPayload = { subnet_id : ?Principal }; + public type DeployGuestosToAllSubnetNodesPayload = { subnet_id : Principal; replica_version_id : Text }; + public type DeployGuestosToAllUnassignedNodesPayload = { elected_replica_version : Text }; + public type EcdsaConfig = { quadruples_to_create_in_advance : Nat32; max_queue_size : ?Nat32; key_ids : [T.EcdsaKeyId]; signature_request_timeout_ns : ?Nat64; idkg_key_rotation_period_ms : ?Nat64 }; + public type EcdsaCurve = { #secp256k1 }; + public type EcdsaInitialConfig = { quadruples_to_create_in_advance : Nat32; max_queue_size : ?Nat32; keys : [T.EcdsaKeyRequest]; signature_request_timeout_ns : ?Nat64; idkg_key_rotation_period_ms : ?Nat64 }; + public type EcdsaKeyId = { name : Text; curve : T.EcdsaCurve }; + public type EcdsaKeyRequest = { key_id : T.EcdsaKeyId; subnet_id : ?Principal }; + public type FirewallRule = { ipv4_prefixes : [Text]; direction : ?Int32; action : Int32; user : ?Text; comment : Text; ipv6_prefixes : [Text]; ports : [Nat32] }; + public type FirewallRulesScope = { #Node : Principal; #ReplicaNodes; #ApiBoundaryNodes; #Subnet : Principal; #Global }; + public type GetSubnetForCanisterRequest = { "principal" : ?Principal }; + public type GetSubnetForCanisterResponse = { subnet_id : ?Principal }; + public type Gps = { latitude : float32; longitude : float32 }; + public type IPv4Config = { prefix_length : Nat32; gateway_ip_addr : Text; ip_addr : Text }; + public type NodeOperatorRecord = { ipv6 : ?Text; node_operator_principal_id : Blob; node_allowance : Nat64; rewardable_nodes : [(Text, Nat32)]; node_provider_principal_id : Blob; dc_id : Text }; + public type NodeProvidersMonthlyXdrRewards = { rewards : [(Text, Nat64)] }; + public type NodeRewardRate = { xdr_permyriad_per_node_per_month : Nat64; reward_coefficient_percent : ?Int32 }; + public type NodeRewardRates = { rates : [(Text, T.NodeRewardRate)] }; + public type PrepareCanisterMigrationPayload = { canister_id_ranges : [T.CanisterIdRange]; source_subnet : Principal; destination_subnet : Principal }; + public type RecoverSubnetPayload = { height : Nat64; replacement_nodes : ?[Principal]; subnet_id : Principal; registry_store_uri : ?(Text, Text, Nat64); ecdsa_config : ?T.EcdsaInitialConfig; state_hash : Blob; time_ns : Nat64 }; + public type RemoveApiBoundaryNodesPayload = { node_ids : [Principal] }; + public type RemoveFirewallRulesPayload = { expected_hash : Text; scope : T.FirewallRulesScope; positions : [Int32] }; + public type RemoveNodeDirectlyPayload = { node_id : Principal }; + public type RemoveNodeOperatorsPayload = { node_operators_to_remove : [Blob] }; + public type RemoveNodesPayload = { node_ids : [Principal] }; + public type RerouteCanisterRangesPayload = { source_subnet : Principal; reassigned_canister_ranges : [T.CanisterIdRange]; destination_subnet : Principal }; + public type Result = { #Ok : Principal; #Err : Text }; + public type Result1 = { #Ok; #Err : Text }; + public type Result2 = { #Ok : [(T.DataCenterRecord, T.NodeOperatorRecord)]; #Err : Text }; + public type Result3 = { #Ok : T.NodeProvidersMonthlyXdrRewards; #Err : Text }; + public type Result4 = { #Ok : T.GetSubnetForCanisterResponse; #Err : Text }; + public type RetireReplicaVersionPayload = { replica_version_ids : [Text] }; + public type ReviseElectedGuestosVersionsPayload = { release_package_urls : [Text]; replica_versions_to_unelect : [Text]; replica_version_to_elect : ?Text; guest_launch_measurement_sha256_hex : ?Text; release_package_sha256_hex : ?Text }; + public type SetFirewallConfigPayload = { ipv4_prefixes : [Text]; firewall_config : Text; ipv6_prefixes : [Text] }; + public type SubnetFeatures = { canister_sandboxing : Bool; http_requests : Bool; sev_enabled : ?Bool }; + public type SubnetType = { #application; #verified_application; #system }; + public type UpdateElectedHostosVersionsPayload = { release_package_urls : [Text]; hostos_version_to_elect : ?Text; hostos_versions_to_unelect : [Text]; release_package_sha256_hex : ?Text }; + public type UpdateNodeDirectlyPayload = { idkg_dealing_encryption_pk : ?Blob }; + public type UpdateNodeDomainDirectlyPayload = { node_id : Principal; domain : ?Text }; + public type UpdateNodeIPv4ConfigDirectlyPayload = { ipv4_config : ?T.IPv4Config; node_id : Principal }; + public type UpdateNodeOperatorConfigDirectlyPayload = { node_operator_id : ?Principal; node_provider_id : ?Principal }; + public type UpdateNodeOperatorConfigPayload = { node_operator_id : ?Principal; set_ipv6_to_none : ?Bool; ipv6 : ?Text; node_provider_id : ?Principal; node_allowance : ?Nat64; rewardable_nodes : [(Text, Nat32)]; dc_id : ?Text }; + public type UpdateNodeRewardsTableProposalPayload = { new_entries : [(Text, T.NodeRewardRates)] }; + public type UpdateNodesHostosVersionPayload = { hostos_version_id : ?Text; node_ids : [Principal] }; + public type UpdateSshReadOnlyAccessForAllUnassignedNodesPayload = { ssh_readonly_keys : [Text] }; + public type UpdateSubnetPayload = { unit_delay_millis : ?Nat64; max_duplicity : ?Nat32; max_instructions_per_round : ?Nat64; features : ?T.SubnetFeatures; set_gossip_config_to_default : Bool; max_instructions_per_message : ?Nat64; halt_at_cup_height : ?Bool; pfn_evaluation_period_ms : ?Nat32; subnet_id : Principal; max_ingress_bytes_per_message : ?Nat64; dkg_dealings_per_block : ?Nat64; ecdsa_key_signing_disable : ?[T.EcdsaKeyId]; max_block_payload_size : ?Nat64; max_instructions_per_install_code : ?Nat64; start_as_nns : ?Bool; is_halted : ?Bool; max_ingress_messages_per_block : ?Nat64; max_number_of_canisters : ?Nat64; ecdsa_config : ?T.EcdsaConfig; retransmission_request_ms : ?Nat32; dkg_interval_length : ?Nat64; registry_poll_period_ms : ?Nat32; max_chunk_wait_ms : ?Nat32; receive_check_cache_size : ?Nat32; ecdsa_key_signing_enable : ?[T.EcdsaKeyId]; ssh_backup_access : ?[Text]; max_chunk_size : ?Nat32; initial_notary_delay_millis : ?Nat64; max_artifact_streams_per_peer : ?Nat32; subnet_type : ?T.SubnetType; ssh_readonly_access : ?[Text] }; + public type UpdateUnassignedNodesConfigPayload = { replica_version : ?Text; ssh_readonly_access : ?[Text] }; +}; diff --git a/ic/testdata/did/governance.did b/ic/testdata/did/governance.did new file mode 100644 index 0000000..40eaf16 --- /dev/null +++ b/ic/testdata/did/governance.did @@ -0,0 +1,703 @@ +type AccountIdentifier = record { hash : blob }; +type Action = variant { + RegisterKnownNeuron : KnownNeuron; + ManageNeuron : ManageNeuron; + CreateServiceNervousSystem : CreateServiceNervousSystem; + ExecuteNnsFunction : ExecuteNnsFunction; + RewardNodeProvider : RewardNodeProvider; + OpenSnsTokenSwap : OpenSnsTokenSwap; + SetSnsTokenSwapOpenTimeWindow : SetSnsTokenSwapOpenTimeWindow; + SetDefaultFollowees : SetDefaultFollowees; + RewardNodeProviders : RewardNodeProviders; + ManageNetworkEconomics : NetworkEconomics; + ApproveGenesisKyc : ApproveGenesisKyc; + AddOrRemoveNodeProvider : AddOrRemoveNodeProvider; + Motion : Motion; +}; +type AddHotKey = record { new_hot_key : opt principal }; +type AddOrRemoveNodeProvider = record { change : opt Change }; +type Amount = record { e8s : nat64 }; +type ApproveGenesisKyc = record { principals : vec principal }; +type Ballot = record { vote : int32; voting_power : nat64 }; +type BallotInfo = record { vote : int32; proposal_id : opt NeuronId }; +type By = variant { + NeuronIdOrSubaccount : record {}; + MemoAndController : ClaimOrRefreshNeuronFromAccount; + Memo : nat64; +}; +type Canister = record { id : opt principal }; +type CanisterStatusResultV2 = record { + status : opt int32; + freezing_threshold : opt nat64; + controllers : vec principal; + memory_size : opt nat64; + cycles : opt nat64; + idle_cycles_burned_per_day : opt nat64; + module_hash : blob; +}; +type CanisterSummary = record { + status : opt CanisterStatusResultV2; + canister_id : opt principal; +}; +type CfNeuron = record { + has_created_neuron_recipes : opt bool; + nns_neuron_id : nat64; + amount_icp_e8s : nat64; +}; +type CfParticipant = record { + hotkey_principal : text; + cf_neurons : vec CfNeuron; +}; +type Change = variant { ToRemove : NodeProvider; ToAdd : NodeProvider }; +type ChangeAutoStakeMaturity = record { + requested_setting_for_auto_stake_maturity : bool; +}; +type ClaimOrRefresh = record { by : opt By }; +type ClaimOrRefreshNeuronFromAccount = record { + controller : opt principal; + memo : nat64; +}; +type ClaimOrRefreshNeuronFromAccountResponse = record { result : opt Result_1 }; +type ClaimOrRefreshResponse = record { refreshed_neuron_id : opt NeuronId }; +type Command = variant { + Spawn : Spawn; + Split : Split; + Follow : Follow; + ClaimOrRefresh : ClaimOrRefresh; + Configure : Configure; + RegisterVote : RegisterVote; + Merge : Merge; + DisburseToNeuron : DisburseToNeuron; + MakeProposal : Proposal; + StakeMaturity : StakeMaturity; + MergeMaturity : MergeMaturity; + Disburse : Disburse; +}; +type Command_1 = variant { + Error : GovernanceError; + Spawn : SpawnResponse; + Split : SpawnResponse; + Follow : record {}; + ClaimOrRefresh : ClaimOrRefreshResponse; + Configure : record {}; + RegisterVote : record {}; + Merge : MergeResponse; + DisburseToNeuron : SpawnResponse; + MakeProposal : MakeProposalResponse; + StakeMaturity : StakeMaturityResponse; + MergeMaturity : MergeMaturityResponse; + Disburse : DisburseResponse; +}; +type Command_2 = variant { + Spawn : NeuronId; + Split : Split; + Configure : Configure; + Merge : Merge; + DisburseToNeuron : DisburseToNeuron; + SyncCommand : record {}; + ClaimOrRefreshNeuron : ClaimOrRefresh; + MergeMaturity : MergeMaturity; + Disburse : Disburse; +}; +type Committed = record { + total_direct_contribution_icp_e8s : opt nat64; + total_neurons_fund_contribution_icp_e8s : opt nat64; + sns_governance_canister_id : opt principal; +}; +type Committed_1 = record { + total_direct_participation_icp_e8s : opt nat64; + total_neurons_fund_participation_icp_e8s : opt nat64; + sns_governance_canister_id : opt principal; +}; +type Configure = record { operation : opt Operation }; +type Countries = record { iso_codes : vec text }; +type CreateServiceNervousSystem = record { + url : opt text; + governance_parameters : opt GovernanceParameters; + fallback_controller_principal_ids : vec principal; + logo : opt Image; + name : opt text; + ledger_parameters : opt LedgerParameters; + description : opt text; + dapp_canisters : vec Canister; + swap_parameters : opt SwapParameters; + initial_token_distribution : opt InitialTokenDistribution; +}; +type Decimal = record { human_readable : opt text }; +type DerivedProposalInformation = record { + swap_background_information : opt SwapBackgroundInformation; +}; +type DeveloperDistribution = record { + developer_neurons : vec NeuronDistribution; +}; +type Disburse = record { + to_account : opt AccountIdentifier; + amount : opt Amount; +}; +type DisburseResponse = record { transfer_block_height : nat64 }; +type DisburseToNeuron = record { + dissolve_delay_seconds : nat64; + kyc_verified : bool; + amount_e8s : nat64; + new_controller : opt principal; + nonce : nat64; +}; +type DissolveState = variant { + DissolveDelaySeconds : nat64; + WhenDissolvedTimestampSeconds : nat64; +}; +type Duration = record { seconds : opt nat64 }; +type ExecuteNnsFunction = record { nns_function : int32; payload : blob }; +type Follow = record { topic : int32; followees : vec NeuronId }; +type Followees = record { followees : vec NeuronId }; +type Followers = record { followers : vec NeuronId }; +type FollowersMap = record { followers_map : vec record { nat64; Followers } }; +type GetNeuronsFundAuditInfoRequest = record { nns_proposal_id : opt NeuronId }; +type GetNeuronsFundAuditInfoResponse = record { result : opt Result_6 }; +type GlobalTimeOfDay = record { seconds_after_utc_midnight : opt nat64 }; +type Governance = record { + default_followees : vec record { int32; Followees }; + making_sns_proposal : opt MakingSnsProposal; + most_recent_monthly_node_provider_rewards : opt MostRecentMonthlyNodeProviderRewards; + maturity_modulation_last_updated_at_timestamp_seconds : opt nat64; + wait_for_quiet_threshold_seconds : nat64; + metrics : opt GovernanceCachedMetrics; + neuron_management_voting_period_seconds : opt nat64; + node_providers : vec NodeProvider; + cached_daily_maturity_modulation_basis_points : opt int32; + economics : opt NetworkEconomics; + restore_aging_summary : opt RestoreAgingSummary; + spawning_neurons : opt bool; + latest_reward_event : opt RewardEvent; + to_claim_transfers : vec NeuronStakeTransfer; + short_voting_period_seconds : nat64; + topic_followee_index : vec record { int32; FollowersMap }; + migrations : opt Migrations; + proposals : vec record { nat64; ProposalData }; + xdr_conversion_rate : opt XdrConversionRate; + in_flight_commands : vec record { nat64; NeuronInFlightCommand }; + neurons : vec record { nat64; Neuron }; + genesis_timestamp_seconds : nat64; +}; +type GovernanceCachedMetrics = record { + total_maturity_e8s_equivalent : nat64; + not_dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; + dissolving_neurons_staked_maturity_e8s_equivalent_sum : nat64; + garbage_collectable_neurons_count : nat64; + dissolving_neurons_staked_maturity_e8s_equivalent_buckets : vec record { + nat64; + float64; + }; + neurons_with_invalid_stake_count : nat64; + not_dissolving_neurons_count_buckets : vec record { nat64; nat64 }; + ect_neuron_count : nat64; + total_supply_icp : nat64; + neurons_with_less_than_6_months_dissolve_delay_count : nat64; + dissolved_neurons_count : nat64; + community_fund_total_maturity_e8s_equivalent : nat64; + total_staked_e8s_seed : nat64; + total_staked_maturity_e8s_equivalent_ect : nat64; + total_staked_e8s : nat64; + not_dissolving_neurons_count : nat64; + total_locked_e8s : nat64; + neurons_fund_total_active_neurons : nat64; + total_staked_maturity_e8s_equivalent : nat64; + not_dissolving_neurons_e8s_buckets_ect : vec record { nat64; float64 }; + total_staked_e8s_ect : nat64; + not_dissolving_neurons_staked_maturity_e8s_equivalent_sum : nat64; + dissolved_neurons_e8s : nat64; + dissolving_neurons_e8s_buckets_seed : vec record { nat64; float64 }; + neurons_with_less_than_6_months_dissolve_delay_e8s : nat64; + not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets : vec record { + nat64; + float64; + }; + dissolving_neurons_count_buckets : vec record { nat64; nat64 }; + dissolving_neurons_e8s_buckets_ect : vec record { nat64; float64 }; + dissolving_neurons_count : nat64; + dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; + total_staked_maturity_e8s_equivalent_seed : nat64; + community_fund_total_staked_e8s : nat64; + not_dissolving_neurons_e8s_buckets_seed : vec record { nat64; float64 }; + timestamp_seconds : nat64; + seed_neuron_count : nat64; +}; +type GovernanceError = record { error_message : text; error_type : int32 }; +type GovernanceParameters = record { + neuron_maximum_dissolve_delay_bonus : opt Percentage; + neuron_maximum_age_for_age_bonus : opt Duration; + neuron_maximum_dissolve_delay : opt Duration; + neuron_minimum_dissolve_delay_to_vote : opt Duration; + neuron_maximum_age_bonus : opt Percentage; + neuron_minimum_stake : opt Tokens; + proposal_wait_for_quiet_deadline_increase : opt Duration; + proposal_initial_voting_period : opt Duration; + proposal_rejection_fee : opt Tokens; + voting_reward_parameters : opt VotingRewardParameters; +}; +type IdealMatchedParticipationFunction = record { + serialized_representation : opt text; +}; +type Image = record { base64_encoding : opt text }; +type IncreaseDissolveDelay = record { + additional_dissolve_delay_seconds : nat32; +}; +type InitialTokenDistribution = record { + treasury_distribution : opt SwapDistribution; + developer_distribution : opt DeveloperDistribution; + swap_distribution : opt SwapDistribution; +}; +type KnownNeuron = record { + id : opt NeuronId; + known_neuron_data : opt KnownNeuronData; +}; +type KnownNeuronData = record { name : text; description : opt text }; +type LedgerParameters = record { + transaction_fee : opt Tokens; + token_symbol : opt text; + token_logo : opt Image; + token_name : opt text; +}; +type ListKnownNeuronsResponse = record { known_neurons : vec KnownNeuron }; +type ListNeurons = record { + neuron_ids : vec nat64; + include_neurons_readable_by_caller : bool; +}; +type ListNeuronsResponse = record { + neuron_infos : vec record { nat64; NeuronInfo }; + full_neurons : vec Neuron; +}; +type ListNodeProvidersResponse = record { node_providers : vec NodeProvider }; +type ListProposalInfo = record { + include_reward_status : vec int32; + omit_large_fields : opt bool; + before_proposal : opt NeuronId; + limit : nat32; + exclude_topic : vec int32; + include_all_manage_neuron_proposals : opt bool; + include_status : vec int32; +}; +type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo }; +type MakeProposalResponse = record { + message : opt text; + proposal_id : opt NeuronId; +}; +type MakingSnsProposal = record { + proposal : opt Proposal; + caller : opt principal; + proposer_id : opt NeuronId; +}; +type ManageNeuron = record { + id : opt NeuronId; + command : opt Command; + neuron_id_or_subaccount : opt NeuronIdOrSubaccount; +}; +type ManageNeuronResponse = record { command : opt Command_1 }; +type Merge = record { source_neuron_id : opt NeuronId }; +type MergeMaturity = record { percentage_to_merge : nat32 }; +type MergeMaturityResponse = record { + merged_maturity_e8s : nat64; + new_stake_e8s : nat64; +}; +type MergeResponse = record { + target_neuron : opt Neuron; + source_neuron : opt Neuron; + target_neuron_info : opt NeuronInfo; + source_neuron_info : opt NeuronInfo; +}; +type Migration = record { + status : opt int32; + failure_reason : opt text; + progress : opt Progress; +}; +type Migrations = record { + neuron_indexes_migration : opt Migration; + copy_inactive_neurons_to_stable_memory_migration : opt Migration; +}; +type MostRecentMonthlyNodeProviderRewards = record { + timestamp : nat64; + rewards : vec RewardNodeProvider; +}; +type Motion = record { motion_text : text }; +type NetworkEconomics = record { + neuron_minimum_stake_e8s : nat64; + max_proposals_to_keep_per_topic : nat32; + neuron_management_fee_per_proposal_e8s : nat64; + reject_cost_e8s : nat64; + transaction_fee_e8s : nat64; + neuron_spawn_dissolve_delay_seconds : nat64; + minimum_icp_xdr_rate : nat64; + maximum_node_provider_rewards_e8s : nat64; + neurons_fund_economics : opt NeuronsFundEconomics; +}; +type Neuron = record { + id : opt NeuronId; + staked_maturity_e8s_equivalent : opt nat64; + controller : opt principal; + recent_ballots : vec BallotInfo; + kyc_verified : bool; + neuron_type : opt int32; + not_for_profit : bool; + maturity_e8s_equivalent : nat64; + cached_neuron_stake_e8s : nat64; + created_timestamp_seconds : nat64; + auto_stake_maturity : opt bool; + aging_since_timestamp_seconds : nat64; + hot_keys : vec principal; + account : blob; + joined_community_fund_timestamp_seconds : opt nat64; + dissolve_state : opt DissolveState; + followees : vec record { int32; Followees }; + neuron_fees_e8s : nat64; + transfer : opt NeuronStakeTransfer; + known_neuron_data : opt KnownNeuronData; + spawn_at_timestamp_seconds : opt nat64; +}; +type NeuronBasketConstructionParameters = record { + dissolve_delay_interval : opt Duration; + count : opt nat64; +}; +type NeuronBasketConstructionParameters_1 = record { + dissolve_delay_interval_seconds : nat64; + count : nat64; +}; +type NeuronDistribution = record { + controller : opt principal; + dissolve_delay : opt Duration; + memo : opt nat64; + vesting_period : opt Duration; + stake : opt Tokens; +}; +type NeuronId = record { id : nat64 }; +type NeuronIdOrSubaccount = variant { Subaccount : blob; NeuronId : NeuronId }; +type NeuronInFlightCommand = record { + command : opt Command_2; + timestamp : nat64; +}; +type NeuronInfo = record { + dissolve_delay_seconds : nat64; + recent_ballots : vec BallotInfo; + neuron_type : opt int32; + created_timestamp_seconds : nat64; + state : int32; + stake_e8s : nat64; + joined_community_fund_timestamp_seconds : opt nat64; + retrieved_at_timestamp_seconds : nat64; + known_neuron_data : opt KnownNeuronData; + voting_power : nat64; + age_seconds : nat64; +}; +type NeuronStakeTransfer = record { + to_subaccount : blob; + neuron_stake_e8s : nat64; + from : opt principal; + memo : nat64; + from_subaccount : blob; + transfer_timestamp : nat64; + block_height : nat64; +}; +type NeuronsFundAuditInfo = record { + final_neurons_fund_participation : opt NeuronsFundParticipation; + initial_neurons_fund_participation : opt NeuronsFundParticipation; + neurons_fund_refunds : opt NeuronsFundSnapshot; +}; +type NeuronsFundData = record { + final_neurons_fund_participation : opt NeuronsFundParticipation; + initial_neurons_fund_participation : opt NeuronsFundParticipation; + neurons_fund_refunds : opt NeuronsFundSnapshot; +}; +type NeuronsFundEconomics = record { + maximum_icp_xdr_rate : opt Percentage; + neurons_fund_matched_funding_curve_coefficients : opt NeuronsFundMatchedFundingCurveCoefficients; + max_theoretical_neurons_fund_participation_amount_xdr : opt Decimal; + minimum_icp_xdr_rate : opt Percentage; +}; +type NeuronsFundMatchedFundingCurveCoefficients = record { + contribution_threshold_xdr : opt Decimal; + one_third_participation_milestone_xdr : opt Decimal; + full_participation_milestone_xdr : opt Decimal; +}; +type NeuronsFundNeuron = record { + hotkey_principal : opt text; + is_capped : opt bool; + nns_neuron_id : opt nat64; + amount_icp_e8s : opt nat64; +}; +type NeuronsFundNeuronPortion = record { + hotkey_principal : opt principal; + is_capped : opt bool; + maturity_equivalent_icp_e8s : opt nat64; + nns_neuron_id : opt NeuronId; + amount_icp_e8s : opt nat64; +}; +type NeuronsFundParticipation = record { + total_maturity_equivalent_icp_e8s : opt nat64; + intended_neurons_fund_participation_icp_e8s : opt nat64; + direct_participation_icp_e8s : opt nat64; + swap_participation_limits : opt SwapParticipationLimits; + max_neurons_fund_swap_participation_icp_e8s : opt nat64; + neurons_fund_reserves : opt NeuronsFundSnapshot; + ideal_matched_participation_function : opt IdealMatchedParticipationFunction; + allocated_neurons_fund_participation_icp_e8s : opt nat64; +}; +type NeuronsFundSnapshot = record { + neurons_fund_neuron_portions : vec NeuronsFundNeuronPortion; +}; +type NodeProvider = record { + id : opt principal; + reward_account : opt AccountIdentifier; +}; +type Ok = record { neurons_fund_audit_info : opt NeuronsFundAuditInfo }; +type Ok_1 = record { neurons_fund_neuron_portions : vec NeuronsFundNeuron }; +type OpenSnsTokenSwap = record { + community_fund_investment_e8s : opt nat64; + target_swap_canister_id : opt principal; + params : opt Params; +}; +type Operation = variant { + RemoveHotKey : RemoveHotKey; + AddHotKey : AddHotKey; + ChangeAutoStakeMaturity : ChangeAutoStakeMaturity; + StopDissolving : record {}; + StartDissolving : record {}; + IncreaseDissolveDelay : IncreaseDissolveDelay; + JoinCommunityFund : record {}; + LeaveCommunityFund : record {}; + SetDissolveTimestamp : SetDissolveTimestamp; +}; +type Params = record { + min_participant_icp_e8s : nat64; + neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters_1; + max_icp_e8s : nat64; + swap_due_timestamp_seconds : nat64; + min_participants : nat32; + sns_token_e8s : nat64; + sale_delay_seconds : opt nat64; + max_participant_icp_e8s : nat64; + min_direct_participation_icp_e8s : opt nat64; + min_icp_e8s : nat64; + max_direct_participation_icp_e8s : opt nat64; +}; +type Percentage = record { basis_points : opt nat64 }; +type Progress = variant { LastNeuronId : NeuronId }; +type Proposal = record { + url : text; + title : opt text; + action : opt Action; + summary : text; +}; +type ProposalData = record { + id : opt NeuronId; + failure_reason : opt GovernanceError; + cf_participants : vec CfParticipant; + ballots : vec record { nat64; Ballot }; + proposal_timestamp_seconds : nat64; + reward_event_round : nat64; + failed_timestamp_seconds : nat64; + neurons_fund_data : opt NeuronsFundData; + reject_cost_e8s : nat64; + derived_proposal_information : opt DerivedProposalInformation; + latest_tally : opt Tally; + sns_token_swap_lifecycle : opt int32; + decided_timestamp_seconds : nat64; + proposal : opt Proposal; + proposer : opt NeuronId; + wait_for_quiet_state : opt WaitForQuietState; + executed_timestamp_seconds : nat64; + original_total_community_fund_maturity_e8s_equivalent : opt nat64; +}; +type ProposalInfo = record { + id : opt NeuronId; + status : int32; + topic : int32; + failure_reason : opt GovernanceError; + ballots : vec record { nat64; Ballot }; + proposal_timestamp_seconds : nat64; + reward_event_round : nat64; + deadline_timestamp_seconds : opt nat64; + failed_timestamp_seconds : nat64; + reject_cost_e8s : nat64; + derived_proposal_information : opt DerivedProposalInformation; + latest_tally : opt Tally; + reward_status : int32; + decided_timestamp_seconds : nat64; + proposal : opt Proposal; + proposer : opt NeuronId; + executed_timestamp_seconds : nat64; +}; +type RegisterVote = record { vote : int32; proposal : opt NeuronId }; +type RemoveHotKey = record { hot_key_to_remove : opt principal }; +type RestoreAgingNeuronGroup = record { + count : opt nat64; + previous_total_stake_e8s : opt nat64; + current_total_stake_e8s : opt nat64; + group_type : int32; +}; +type RestoreAgingSummary = record { + groups : vec RestoreAgingNeuronGroup; + timestamp_seconds : opt nat64; +}; +type Result = variant { Ok; Err : GovernanceError }; +type Result_1 = variant { Error : GovernanceError; NeuronId : NeuronId }; +type Result_10 = variant { Ok : Ok_1; Err : GovernanceError }; +type Result_2 = variant { Ok : Neuron; Err : GovernanceError }; +type Result_3 = variant { Ok : GovernanceCachedMetrics; Err : GovernanceError }; +type Result_4 = variant { Ok : RewardNodeProviders; Err : GovernanceError }; +type Result_5 = variant { Ok : NeuronInfo; Err : GovernanceError }; +type Result_6 = variant { Ok : Ok; Err : GovernanceError }; +type Result_7 = variant { Ok : NodeProvider; Err : GovernanceError }; +type Result_8 = variant { Committed : Committed; Aborted : record {} }; +type Result_9 = variant { Committed : Committed_1; Aborted : record {} }; +type RewardEvent = record { + rounds_since_last_distribution : opt nat64; + day_after_genesis : nat64; + actual_timestamp_seconds : nat64; + total_available_e8s_equivalent : nat64; + latest_round_available_e8s_equivalent : opt nat64; + distributed_e8s_equivalent : nat64; + settled_proposals : vec NeuronId; +}; +type RewardMode = variant { + RewardToNeuron : RewardToNeuron; + RewardToAccount : RewardToAccount; +}; +type RewardNodeProvider = record { + node_provider : opt NodeProvider; + reward_mode : opt RewardMode; + amount_e8s : nat64; +}; +type RewardNodeProviders = record { + use_registry_derived_rewards : opt bool; + rewards : vec RewardNodeProvider; +}; +type RewardToAccount = record { to_account : opt AccountIdentifier }; +type RewardToNeuron = record { dissolve_delay_seconds : nat64 }; +type SetDefaultFollowees = record { + default_followees : vec record { int32; Followees }; +}; +type SetDissolveTimestamp = record { dissolve_timestamp_seconds : nat64 }; +type SetOpenTimeWindowRequest = record { open_time_window : opt TimeWindow }; +type SetSnsTokenSwapOpenTimeWindow = record { + request : opt SetOpenTimeWindowRequest; + swap_canister_id : opt principal; +}; +type SettleCommunityFundParticipation = record { + result : opt Result_8; + open_sns_token_swap_proposal_id : opt nat64; +}; +type SettleNeuronsFundParticipationRequest = record { + result : opt Result_9; + nns_proposal_id : opt nat64; +}; +type SettleNeuronsFundParticipationResponse = record { result : opt Result_10 }; +type Spawn = record { + percentage_to_spawn : opt nat32; + new_controller : opt principal; + nonce : opt nat64; +}; +type SpawnResponse = record { created_neuron_id : opt NeuronId }; +type Split = record { amount_e8s : nat64 }; +type StakeMaturity = record { percentage_to_stake : opt nat32 }; +type StakeMaturityResponse = record { + maturity_e8s : nat64; + staked_maturity_e8s : nat64; +}; +type SwapBackgroundInformation = record { + ledger_index_canister_summary : opt CanisterSummary; + fallback_controller_principal_ids : vec principal; + ledger_archive_canister_summaries : vec CanisterSummary; + ledger_canister_summary : opt CanisterSummary; + swap_canister_summary : opt CanisterSummary; + governance_canister_summary : opt CanisterSummary; + root_canister_summary : opt CanisterSummary; + dapp_canister_summaries : vec CanisterSummary; +}; +type SwapDistribution = record { total : opt Tokens }; +type SwapParameters = record { + minimum_participants : opt nat64; + neurons_fund_participation : opt bool; + duration : opt Duration; + neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters; + confirmation_text : opt text; + maximum_participant_icp : opt Tokens; + minimum_icp : opt Tokens; + minimum_direct_participation_icp : opt Tokens; + minimum_participant_icp : opt Tokens; + start_time : opt GlobalTimeOfDay; + maximum_direct_participation_icp : opt Tokens; + maximum_icp : opt Tokens; + neurons_fund_investment_icp : opt Tokens; + restricted_countries : opt Countries; +}; +type SwapParticipationLimits = record { + min_participant_icp_e8s : opt nat64; + max_participant_icp_e8s : opt nat64; + min_direct_participation_icp_e8s : opt nat64; + max_direct_participation_icp_e8s : opt nat64; +}; +type Tally = record { + no : nat64; + yes : nat64; + total : nat64; + timestamp_seconds : nat64; +}; +type TimeWindow = record { + start_timestamp_seconds : nat64; + end_timestamp_seconds : nat64; +}; +type Tokens = record { e8s : opt nat64 }; +type UpdateNodeProvider = record { reward_account : opt AccountIdentifier }; +type VotingRewardParameters = record { + reward_rate_transition_duration : opt Duration; + initial_reward_rate : opt Percentage; + final_reward_rate : opt Percentage; +}; +type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 }; +type XdrConversionRate = record { + xdr_permyriad_per_icp : opt nat64; + timestamp_seconds : opt nat64; +}; +service : (Governance) -> { + claim_gtc_neurons : (principal, vec NeuronId) -> (Result); + claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> ( + ClaimOrRefreshNeuronFromAccountResponse, + ); + get_build_metadata : () -> (text) query; + get_full_neuron : (nat64) -> (Result_2) query; + get_full_neuron_by_id_or_subaccount : (NeuronIdOrSubaccount) -> ( + Result_2, + ) query; + get_latest_reward_event : () -> (RewardEvent) query; + get_metrics : () -> (Result_3) query; + get_monthly_node_provider_rewards : () -> (Result_4); + get_most_recent_monthly_node_provider_rewards : () -> ( + opt MostRecentMonthlyNodeProviderRewards, + ) query; + get_network_economics_parameters : () -> (NetworkEconomics) query; + get_neuron_ids : () -> (vec nat64) query; + get_neuron_info : (nat64) -> (Result_5) query; + get_neuron_info_by_id_or_subaccount : (NeuronIdOrSubaccount) -> ( + Result_5, + ) query; + get_neurons_fund_audit_info : (GetNeuronsFundAuditInfoRequest) -> ( + GetNeuronsFundAuditInfoResponse, + ) query; + get_node_provider_by_caller : (null) -> (Result_7) query; + get_pending_proposals : () -> (vec ProposalInfo) query; + get_proposal_info : (nat64) -> (opt ProposalInfo) query; + get_restore_aging_summary : () -> (RestoreAgingSummary) query; + list_known_neurons : () -> (ListKnownNeuronsResponse) query; + list_neurons : (ListNeurons) -> (ListNeuronsResponse) query; + list_node_providers : () -> (ListNodeProvidersResponse) query; + list_proposals : (ListProposalInfo) -> (ListProposalInfoResponse) query; + manage_neuron : (ManageNeuron) -> (ManageNeuronResponse); + settle_community_fund_participation : (SettleCommunityFundParticipation) -> ( + Result, + ); + settle_neurons_fund_participation : ( + SettleNeuronsFundParticipationRequest, + ) -> (SettleNeuronsFundParticipationResponse); + simulate_manage_neuron : (ManageNeuron) -> (ManageNeuronResponse); + transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result); + update_node_provider : (UpdateNodeProvider) -> (Result); +} \ No newline at end of file diff --git a/ic/testdata/did/registry.did b/ic/testdata/did/registry.did new file mode 100644 index 0000000..419966b --- /dev/null +++ b/ic/testdata/did/registry.did @@ -0,0 +1,360 @@ +type AddApiBoundaryNodesPayload = record { + version : text; + node_ids : vec principal; +}; +type AddFirewallRulesPayload = record { + expected_hash : text; + scope : FirewallRulesScope; + positions : vec int32; + rules : vec FirewallRule; +}; +type AddNodeOperatorPayload = record { + ipv6 : opt text; + node_operator_principal_id : opt principal; + node_allowance : nat64; + rewardable_nodes : vec record { text; nat32 }; + node_provider_principal_id : opt principal; + dc_id : text; +}; +type AddNodePayload = record { + prometheus_metrics_endpoint : text; + http_endpoint : text; + idkg_dealing_encryption_pk : opt blob; + domain : opt text; + public_ipv4_config : opt IPv4Config; + xnet_endpoint : text; + chip_id : opt blob; + committee_signing_pk : blob; + node_signing_pk : blob; + transport_tls_cert : blob; + ni_dkg_dealing_encryption_pk : blob; + p2p_flow_endpoints : vec text; +}; +type AddNodesToSubnetPayload = record { + subnet_id : principal; + node_ids : vec principal; +}; +type AddOrRemoveDataCentersProposalPayload = record { + data_centers_to_add : vec DataCenterRecord; + data_centers_to_remove : vec text; +}; +type BlessReplicaVersionPayload = record { + release_package_urls : opt vec text; + node_manager_sha256_hex : text; + release_package_url : text; + sha256_hex : text; + guest_launch_measurement_sha256_hex : opt text; + replica_version_id : text; + release_package_sha256_hex : text; + node_manager_binary_url : text; + binary_url : text; +}; +type CanisterIdRange = record { end : principal; start : principal }; +type ChangeSubnetMembershipPayload = record { + node_ids_add : vec principal; + subnet_id : principal; + node_ids_remove : vec principal; +}; +type CompleteCanisterMigrationPayload = record { + canister_id_ranges : vec CanisterIdRange; + migration_trace : vec principal; +}; +type CreateSubnetPayload = record { + unit_delay_millis : nat64; + max_instructions_per_round : nat64; + features : SubnetFeatures; + max_instructions_per_message : nat64; + gossip_registry_poll_period_ms : nat32; + max_ingress_bytes_per_message : nat64; + dkg_dealings_per_block : nat64; + max_block_payload_size : nat64; + max_instructions_per_install_code : nat64; + start_as_nns : bool; + is_halted : bool; + gossip_pfn_evaluation_period_ms : nat32; + max_ingress_messages_per_block : nat64; + max_number_of_canisters : nat64; + ecdsa_config : opt EcdsaInitialConfig; + gossip_max_artifact_streams_per_peer : nat32; + replica_version_id : text; + gossip_max_duplicity : nat32; + gossip_max_chunk_wait_ms : nat32; + dkg_interval_length : nat64; + subnet_id_override : opt principal; + ssh_backup_access : vec text; + ingress_bytes_per_block_soft_cap : nat64; + initial_notary_delay_millis : nat64; + gossip_max_chunk_size : nat32; + subnet_type : SubnetType; + ssh_readonly_access : vec text; + gossip_retransmission_request_ms : nat32; + gossip_receive_check_cache_size : nat32; + node_ids : vec principal; +}; +type DataCenterRecord = record { + id : text; + gps : opt Gps; + region : text; + owner : text; +}; +type DeleteSubnetPayload = record { subnet_id : opt principal }; +type DeployGuestosToAllSubnetNodesPayload = record { + subnet_id : principal; + replica_version_id : text; +}; +type DeployGuestosToAllUnassignedNodesPayload = record { + elected_replica_version : text; +}; +type EcdsaConfig = record { + quadruples_to_create_in_advance : nat32; + max_queue_size : opt nat32; + key_ids : vec EcdsaKeyId; + signature_request_timeout_ns : opt nat64; + idkg_key_rotation_period_ms : opt nat64; +}; +type EcdsaCurve = variant { secp256k1 }; +type EcdsaInitialConfig = record { + quadruples_to_create_in_advance : nat32; + max_queue_size : opt nat32; + keys : vec EcdsaKeyRequest; + signature_request_timeout_ns : opt nat64; + idkg_key_rotation_period_ms : opt nat64; +}; +type EcdsaKeyId = record { name : text; curve : EcdsaCurve }; +type EcdsaKeyRequest = record { + key_id : EcdsaKeyId; + subnet_id : opt principal; +}; +type FirewallRule = record { + ipv4_prefixes : vec text; + direction : opt int32; + action : int32; + user : opt text; + comment : text; + ipv6_prefixes : vec text; + ports : vec nat32; +}; +type FirewallRulesScope = variant { + Node : principal; + ReplicaNodes; + ApiBoundaryNodes; + Subnet : principal; + Global; +}; +type GetSubnetForCanisterRequest = record { "principal" : opt principal }; +type GetSubnetForCanisterResponse = record { subnet_id : opt principal }; +type Gps = record { latitude : float32; longitude : float32 }; +type IPv4Config = record { + prefix_length : nat32; + gateway_ip_addr : text; + ip_addr : text; +}; +type NodeOperatorRecord = record { + ipv6 : opt text; + node_operator_principal_id : blob; + node_allowance : nat64; + rewardable_nodes : vec record { text; nat32 }; + node_provider_principal_id : blob; + dc_id : text; +}; +type NodeProvidersMonthlyXdrRewards = record { + rewards : vec record { text; nat64 }; +}; +type NodeRewardRate = record { + xdr_permyriad_per_node_per_month : nat64; + reward_coefficient_percent : opt int32; +}; +type NodeRewardRates = record { rates : vec record { text; NodeRewardRate } }; +type PrepareCanisterMigrationPayload = record { + canister_id_ranges : vec CanisterIdRange; + source_subnet : principal; + destination_subnet : principal; +}; +type RecoverSubnetPayload = record { + height : nat64; + replacement_nodes : opt vec principal; + subnet_id : principal; + registry_store_uri : opt record { text; text; nat64 }; + ecdsa_config : opt EcdsaInitialConfig; + state_hash : blob; + time_ns : nat64; +}; +type RemoveApiBoundaryNodesPayload = record { node_ids : vec principal }; +type RemoveFirewallRulesPayload = record { + expected_hash : text; + scope : FirewallRulesScope; + positions : vec int32; +}; +type RemoveNodeDirectlyPayload = record { node_id : principal }; +type RemoveNodeOperatorsPayload = record { + node_operators_to_remove : vec blob; +}; +type RemoveNodesPayload = record { node_ids : vec principal }; +type RerouteCanisterRangesPayload = record { + source_subnet : principal; + reassigned_canister_ranges : vec CanisterIdRange; + destination_subnet : principal; +}; +type Result = variant { Ok : principal; Err : text }; +type Result_1 = variant { Ok; Err : text }; +type Result_2 = variant { + Ok : vec record { DataCenterRecord; NodeOperatorRecord }; + Err : text; +}; +type Result_3 = variant { Ok : NodeProvidersMonthlyXdrRewards; Err : text }; +type Result_4 = variant { Ok : GetSubnetForCanisterResponse; Err : text }; +type RetireReplicaVersionPayload = record { replica_version_ids : vec text }; +type ReviseElectedGuestosVersionsPayload = record { + release_package_urls : vec text; + replica_versions_to_unelect : vec text; + replica_version_to_elect : opt text; + guest_launch_measurement_sha256_hex : opt text; + release_package_sha256_hex : opt text; +}; +type SetFirewallConfigPayload = record { + ipv4_prefixes : vec text; + firewall_config : text; + ipv6_prefixes : vec text; +}; +type SubnetFeatures = record { + canister_sandboxing : bool; + http_requests : bool; + sev_enabled : opt bool; +}; +type SubnetType = variant { application; verified_application; system }; +type UpdateElectedHostosVersionsPayload = record { + release_package_urls : vec text; + hostos_version_to_elect : opt text; + hostos_versions_to_unelect : vec text; + release_package_sha256_hex : opt text; +}; +type UpdateNodeDirectlyPayload = record { + idkg_dealing_encryption_pk : opt blob; +}; +type UpdateNodeDomainDirectlyPayload = record { + node_id : principal; + domain : opt text; +}; +type UpdateNodeIPv4ConfigDirectlyPayload = record { + ipv4_config : opt IPv4Config; + node_id : principal; +}; +type UpdateNodeOperatorConfigDirectlyPayload = record { + node_operator_id : opt principal; + node_provider_id : opt principal; +}; +type UpdateNodeOperatorConfigPayload = record { + node_operator_id : opt principal; + set_ipv6_to_none : opt bool; + ipv6 : opt text; + node_provider_id : opt principal; + node_allowance : opt nat64; + rewardable_nodes : vec record { text; nat32 }; + dc_id : opt text; +}; +type UpdateNodeRewardsTableProposalPayload = record { + new_entries : vec record { text; NodeRewardRates }; +}; +type UpdateNodesHostosVersionPayload = record { + hostos_version_id : opt text; + node_ids : vec principal; +}; +type UpdateSshReadOnlyAccessForAllUnassignedNodesPayload = record { + ssh_readonly_keys : vec text; +}; +type UpdateSubnetPayload = record { + unit_delay_millis : opt nat64; + max_duplicity : opt nat32; + max_instructions_per_round : opt nat64; + features : opt SubnetFeatures; + set_gossip_config_to_default : bool; + max_instructions_per_message : opt nat64; + halt_at_cup_height : opt bool; + pfn_evaluation_period_ms : opt nat32; + subnet_id : principal; + max_ingress_bytes_per_message : opt nat64; + dkg_dealings_per_block : opt nat64; + ecdsa_key_signing_disable : opt vec EcdsaKeyId; + max_block_payload_size : opt nat64; + max_instructions_per_install_code : opt nat64; + start_as_nns : opt bool; + is_halted : opt bool; + max_ingress_messages_per_block : opt nat64; + max_number_of_canisters : opt nat64; + ecdsa_config : opt EcdsaConfig; + retransmission_request_ms : opt nat32; + dkg_interval_length : opt nat64; + registry_poll_period_ms : opt nat32; + max_chunk_wait_ms : opt nat32; + receive_check_cache_size : opt nat32; + ecdsa_key_signing_enable : opt vec EcdsaKeyId; + ssh_backup_access : opt vec text; + max_chunk_size : opt nat32; + initial_notary_delay_millis : opt nat64; + max_artifact_streams_per_peer : opt nat32; + subnet_type : opt SubnetType; + ssh_readonly_access : opt vec text; +}; +type UpdateUnassignedNodesConfigPayload = record { + replica_version : opt text; + ssh_readonly_access : opt vec text; +}; +service : { + add_api_boundary_nodes : (AddApiBoundaryNodesPayload) -> (); + add_firewall_rules : (AddFirewallRulesPayload) -> (); + add_node : (AddNodePayload) -> (Result); + add_node_operator : (AddNodeOperatorPayload) -> (); + add_nodes_to_subnet : (AddNodesToSubnetPayload) -> (); + add_or_remove_data_centers : (AddOrRemoveDataCentersProposalPayload) -> (); + bless_replica_version : (BlessReplicaVersionPayload) -> (); + change_subnet_membership : (ChangeSubnetMembershipPayload) -> (); + clear_provisional_whitelist : () -> (); + complete_canister_migration : (CompleteCanisterMigrationPayload) -> ( + Result_1, + ); + create_subnet : (CreateSubnetPayload) -> (); + delete_subnet : (DeleteSubnetPayload) -> (); + deploy_guestos_to_all_subnet_nodes : ( + DeployGuestosToAllSubnetNodesPayload, + ) -> (); + deploy_guestos_to_all_unassigned_nodes : ( + DeployGuestosToAllUnassignedNodesPayload, + ) -> (); + get_build_metadata : () -> (text) query; + get_node_operators_and_dcs_of_node_provider : (principal) -> (Result_2) query; + get_node_providers_monthly_xdr_rewards : () -> (Result_3) query; + get_subnet_for_canister : (GetSubnetForCanisterRequest) -> (Result_4) query; + prepare_canister_migration : (PrepareCanisterMigrationPayload) -> (Result_1); + recover_subnet : (RecoverSubnetPayload) -> (); + remove_api_boundary_nodes : (RemoveApiBoundaryNodesPayload) -> (); + remove_firewall_rules : (RemoveFirewallRulesPayload) -> (); + remove_node_directly : (RemoveNodeDirectlyPayload) -> (); + remove_node_operators : (RemoveNodeOperatorsPayload) -> (); + remove_nodes : (RemoveNodesPayload) -> (); + remove_nodes_from_subnet : (RemoveNodesPayload) -> (); + reroute_canister_ranges : (RerouteCanisterRangesPayload) -> (Result_1); + retire_replica_version : (RetireReplicaVersionPayload) -> (); + revise_elected_replica_versions : (ReviseElectedGuestosVersionsPayload) -> (); + set_firewall_config : (SetFirewallConfigPayload) -> (); + update_api_boundary_nodes_version : (AddApiBoundaryNodesPayload) -> (); + update_elected_hostos_versions : (UpdateElectedHostosVersionsPayload) -> (); + update_elected_replica_versions : (ReviseElectedGuestosVersionsPayload) -> (); + update_firewall_rules : (AddFirewallRulesPayload) -> (); + update_node_directly : (UpdateNodeDirectlyPayload) -> (Result_1); + update_node_domain_directly : (UpdateNodeDomainDirectlyPayload) -> (Result_1); + update_node_ipv4_config_directly : (UpdateNodeIPv4ConfigDirectlyPayload) -> ( + Result_1, + ); + update_node_operator_config : (UpdateNodeOperatorConfigPayload) -> (); + update_node_operator_config_directly : ( + UpdateNodeOperatorConfigDirectlyPayload, + ) -> (); + update_node_rewards_table : (UpdateNodeRewardsTableProposalPayload) -> (); + update_nodes_hostos_version : (UpdateNodesHostosVersionPayload) -> (); + update_ssh_readonly_access_for_all_unassigned_nodes : ( + UpdateSshReadOnlyAccessForAllUnassignedNodesPayload, + ) -> (); + update_subnet : (UpdateSubnetPayload) -> (); + update_subnet_replica_version : (DeployGuestosToAllSubnetNodesPayload) -> (); + update_unassigned_nodes_config : (UpdateUnassignedNodesConfigPayload) -> (); +} \ No newline at end of file diff --git a/ic/testdata/gen.go b/ic/testdata/gen.go index 17858ab..47b9e56 100644 --- a/ic/testdata/gen.go +++ b/ic/testdata/gen.go @@ -35,6 +35,14 @@ func checkLatest() error { filepath: "ic/testdata/did/ic.did", remote: "https://raw.githubusercontent.com/dfinity/interface-spec/master/spec/_attachments/ic.did", }, + { + filepath: "ic/testdata/did/registry.did", + remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/registry/canister/canister/registry.did", + }, + { + filepath: "ic/testdata/did/governance.did", + remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/nns/governance/canister/governance.did", + }, { filepath: "ic/testdata/did/icparchive.did", remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/rosetta-api/icp_ledger/ledger_archive.did",