modify configs & add persistence chain

This commit is contained in:
liangping 2021-08-11 23:25:20 +08:00
parent 0ce6f1d806
commit 20a1ea7ca0
11 changed files with 32 additions and 0 deletions

View File

@ -122,9 +122,25 @@ export function operatorAddressToAccount(operAddress) {
if (prefix === 'iva') { // handle special cases if (prefix === 'iva') { // handle special cases
return Bech32.encode('iaa', data) return Bech32.encode('iaa', data)
} }
if (prefix === 'crocncl') { // handle special cases
return Bech32.encode('cro', data)
}
return Bech32.encode(prefix.replace('valoper', ''), data) return Bech32.encode(prefix.replace('valoper', ''), data)
} }
// TODO, not tested
export function pubkeyToAccountAddress(pubkey, prefix) {
return Bech32.encode(prefix, pubkey, 40)
}
export function addressDecode(address) {
return Bech32.decode(address)
}
export function addressEnCode(prefix, pubkey) {
return Bech32.encode(prefix, pubkey)
}
export function consensusPubkeyToHexAddress(consensusPubkey) { export function consensusPubkeyToHexAddress(consensusPubkey) {
let raw = null let raw = null
if (typeof consensusPubkey === 'object') { if (typeof consensusPubkey === 'object') {

View File

@ -2,5 +2,6 @@
"chain_name": "akash", "chain_name": "akash",
"api": "https://akash.api.ping.pub", "api": "https://akash.api.ping.pub",
"sdk_version": "0.41.3", "sdk_version": "0.41.3",
"addr_prefix": "akash",
"logo": "https://dl.airtable.com/.attachments/52586702dd8352d97834fce5c2d83614/969b4d53/akash-network.png" "logo": "https://dl.airtable.com/.attachments/52586702dd8352d97834fce5c2d83614/969b4d53/akash-network.png"
} }

View File

@ -1,6 +1,7 @@
{ {
"chain_name": "band", "chain_name": "band",
"api": "https://api-gm-lb.bandchain.org", "api": "https://api-gm-lb.bandchain.org",
"addr_prefix": "band",
"logo": "https://dl.airtable.com/.attachments/472ae99a508e32b4439b416beddd4eb9/c5166f62/band-symbol-blue-bg.75a3ad91.svg", "logo": "https://dl.airtable.com/.attachments/472ae99a508e32b4439b416beddd4eb9/c5166f62/band-symbol-blue-bg.75a3ad91.svg",
"sdk_version": "0.33.8" "sdk_version": "0.33.8"
} }

View File

@ -2,5 +2,6 @@
"chain_name": "cosmos", "chain_name": "cosmos",
"api":"https://lcd-cosmoshub.keplr.app", "api":"https://lcd-cosmoshub.keplr.app",
"sdk_version": "0.42.6", "sdk_version": "0.42.6",
"addr_prefix": "cosmos",
"logo": "https://dl.airtable.com/.attachments/e54f814bba8c0f9af8a3056020210de0/2d1155fb/cosmos-hub.svg" "logo": "https://dl.airtable.com/.attachments/e54f814bba8c0f9af8a3056020210de0/2d1155fb/cosmos-hub.svg"
} }

View File

@ -3,5 +3,6 @@
"chain_name": "crypto", "chain_name": "crypto",
"api": "https://mainnet.crypto.org:1317", "api": "https://mainnet.crypto.org:1317",
"sdk_version": "0.39.2", "sdk_version": "0.39.2",
"addr_prefix": "cro",
"logo": "https://dl.airtable.com/.attachments/b2e638424ea09dccd4f11b04dc53872a/844d11dc/LOGO.png" "logo": "https://dl.airtable.com/.attachments/b2e638424ea09dccd4f11b04dc53872a/844d11dc/LOGO.png"
} }

View File

@ -2,5 +2,6 @@
"chain_name": "iris", "chain_name": "iris",
"api": "https://iris.api.ping.pub", "api": "https://iris.api.ping.pub",
"sdk_version": "0.42.4", "sdk_version": "0.42.4",
"addr_prefix": "iaa",
"logo": "https://dl.airtable.com/.attachments/2d6d51b1b262db00ecc51616ffc3bdf5/90ff00d0/IRISnet.svg" "logo": "https://dl.airtable.com/.attachments/2d6d51b1b262db00ecc51616ffc3bdf5/90ff00d0/IRISnet.svg"
} }

View File

@ -2,5 +2,6 @@
"chain_name": "kava", "chain_name": "kava",
"api": "https://kava4.data.kava.io", "api": "https://kava4.data.kava.io",
"sdk_version": "0.39.2", "sdk_version": "0.39.2",
"addr_prefix": "kava",
"logo": "https://dl.airtable.com/.attachments/f25737491bd0034240093a7b4e039b15/afec77ff/logo.png" "logo": "https://dl.airtable.com/.attachments/f25737491bd0034240093a7b4e039b15/afec77ff/logo.png"
} }

View File

@ -2,6 +2,7 @@
"chain_name": "okexchain", "chain_name": "okexchain",
"api": "https://exchainrpc.okex.org/okexchain/v1", "api": "https://exchainrpc.okex.org/okexchain/v1",
"sdk_version": "0.39.2", "sdk_version": "0.39.2",
"addr_prefix": "ex",
"logo": "https://dl.airtable.com/.attachments/4620a173477efece7f459a3d6fc770c0/9f6618ad/OKexchain.svg", "logo": "https://dl.airtable.com/.attachments/4620a173477efece7f459a3d6fc770c0/9f6618ad/OKexchain.svg",
"unload_module": ["minting", "slashing"] "unload_module": ["minting", "slashing"]
} }

View File

@ -2,5 +2,6 @@
"chain_name": "osmosis", "chain_name": "osmosis",
"api": "https://lcd-osmosis.keplr.app", "api": "https://lcd-osmosis.keplr.app",
"sdk_version": "0.42.5", "sdk_version": "0.42.5",
"addr_prefix": "osmo",
"logo": "https://dl.airtable.com/.attachments/4ef30ec4008bc86cc3c0f74a6bb84050/0eeb4d64/aQ5W3zaT_400x400.jpg" "logo": "https://dl.airtable.com/.attachments/4ef30ec4008bc86cc3c0f74a6bb84050/0eeb4d64/aQ5W3zaT_400x400.jpg"
} }

View File

@ -0,0 +1,7 @@
{
"chain_name": "persistence",
"api": "https://rest.core.persistence.one",
"sdk_version": "0.42.4",
"addr_prefix": "persistence",
"logo": "https://dl.airtable.com/.attachments/23178be773dc4de133ca4c07056aba1c/6e855850/persistence.png"
}

View File

@ -2,5 +2,6 @@
"chain_name": "terra", "chain_name": "terra",
"api": "https://fcd.terra.dev", "api": "https://fcd.terra.dev",
"sdk_version": "0.39.2", "sdk_version": "0.39.2",
"addr_prefix": "terra",
"logo": "https://dl.airtable.com/.attachments/275a6cbdbdc911856556e716a60d6ec4/87addd7f/terra.jpg" "logo": "https://dl.airtable.com/.attachments/275a6cbdbdc911856556e716a60d6ec4/87addd7f/terra.jpg"
} }