Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 120 additions & 2 deletions bittensor/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,28 @@ def turn_console_on():
}

# --- Type Registry ---
TYPE_REGISTRY: dict = {
TYPE_REGISTRY: dict[str, dict] = {
"types": {
"Balance": "u64", # Need to override default u128
},
"runtime_api": {
"DelegateInfoRuntimeApi": {
"methods": {
"get_delegated": {
"params": [
{
"name": "coldkey",
"type": "Vec<u8>",
},
],
"type": "Vec<u8>",
},
"get_delegates": {
"params": [],
"type": "Vec<u8>",
},
}
},
"NeuronInfoRuntimeApi": {
"methods": {
"get_neuron_lite": {
Expand All @@ -141,8 +158,65 @@ def turn_console_on():
],
"type": "Vec<u8>",
},
"get_neuron": {
"params": [
{
"name": "netuid",
"type": "u16",
},
{
"name": "uid",
"type": "u16",
},
],
"type": "Vec<u8>",
},
"get_neurons": {
"params": [
{
"name": "netuid",
"type": "u16",
},
],
"type": "Vec<u8>",
},
}
},
"StakeInfoRuntimeApi": {
"methods": {
"get_stake_info_for_coldkey": {
"params": [
{
"name": "coldkey_account_vec",
"type": "Vec<u8>",
},
],
"type": "Vec<u8>",
},
"get_stake_info_for_coldkeys": {
"params": [
{
"name": "coldkey_account_vecs",
"type": "Vec<Vec<u8>>",
},
],
"type": "Vec<u8>",
},
},
},
"ValidatorIPRuntimeApi": {
"methods": {
"get_associated_validator_ip_info_for_subnet": {
"params": [
{
"name": "netuid",
"type": "u16",
},
],
"type": "Vec<u8>",
},
},
},
"SubnetInfoRuntimeApi": {
"methods": {
"get_subnet_hyperparams": {
Expand All @@ -153,12 +227,56 @@ def turn_console_on():
},
],
"type": "Vec<u8>",
}
},
"get_subnet_info": {
"params": [
{
"name": "netuid",
"type": "u16",
},
],
"type": "Vec<u8>",
},
"get_subnets_info": {
"params": [],
"type": "Vec<u8>",
},
}
},
"SubnetRegistrationRuntimeApi": {
"methods": {"get_network_registration_cost": {"params": [], "type": "u64"}}
},
"ColdkeySwapRuntimeApi": {
"methods": {
"get_scheduled_coldkey_swap": {
"params": [
{
"name": "coldkey_account_vec",
"type": "Vec<u8>",
},
],
"type": "Vec<u8>",
},
"get_remaining_arbitration_period": {
"params": [
{
"name": "coldkey_account_vec",
"type": "Vec<u8>",
},
],
"type": "Vec<u8>",
},
"get_coldkey_swap_destinations": {
"params": [
{
"name": "coldkey_account_vec",
"type": "Vec<u8>",
},
],
"type": "Vec<u8>",
},
}
},
},
}

Expand Down