Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ChainAliasPrefix denotes a prefix for an alias that belongs to a blockchain ID. ChainAliasPrefix string = "bc/" // VMAliasPrefix ddenotes a prefix for an alias that belongs to a VM ID. VMAliasPrefix string = "vm/" )
View Source
const ( // NodeIDPrefix is used to denote node addresses rather than other // addresses. NodeIDPrefix string = "NodeID-" // SecretKeyPrefix is used to denote secret keys rather than other byte // arrays. SecretKeyPrefix string = "PrivateKey-" )
View Source
const ( // PlatformName exports the name of the platform PlatformName = "camino" // AppName exports the name of the application AppName = "caminogo" )
Const variables to be exported
View Source
const ( MainnetID uint32 = 1 FujiID uint32 = 5 CaminoID uint32 = 1000 ColumbusID uint32 = 1001 TestnetID uint32 = ColumbusID UnitTestID uint32 = 10 LocalID uint32 = 12345 MainnetName = "mainnet" FujiName = "fuji" CaminoName = "camino" ColumbusName = "columbus" TestnetName = "testnet" UnitTestName = "testing" LocalName = "local" MainnetHRP = "avax" FujiHRP = "fuji" CaminoHRP = "camino" ColumbusHRP = "columbus" UnitTestHRP = "testing" LocalHRP = "local" FallbackHRP = "custom" )
Const variables to be exported
View Source
const ( // Request ID used when sending a Put message to gossip an accepted container // (ie not sent in response to a Get) GossipMsgRequestID uint32 = math.MaxUint32 // The network must be "tcp", "tcp4", "tcp6", "unix" or "unixpacket". NetworkType = "tcp" DefaultMaxMessageSize = 2 * units.MiB DefaultPingPongTimeout = 30 * time.Second DefaultPingFrequency = 3 * DefaultPingPongTimeout / 4 DefaultByteSliceCap = 128 MaxContainersLen = int(4 * DefaultMaxMessageSize / 5) )
Const variables to be exported
View Source
const ( DefaultTokenSymbl = "AVAX" CaminoTokenSymbol = "CAM" DefaultTokenName = "Avalanche" CaminoTokenName = "Camino" )
Const variables to be exported
Variables ¶
View Source
var ( PrimaryNetworkID = ids.Empty PlatformChainID = ids.Empty NetworkIDToNetworkName = map[uint32]string{ MainnetID: MainnetName, FujiID: FujiName, CaminoID: CaminoName, ColumbusID: ColumbusName, UnitTestID: UnitTestName, LocalID: LocalName, } NetworkNameToNetworkID = map[string]uint32{ MainnetName: MainnetID, FujiName: FujiID, CaminoName: CaminoID, ColumbusName: ColumbusID, TestnetName: TestnetID, UnitTestName: UnitTestID, LocalName: LocalID, } NetworkIDToHRP = map[uint32]string{ MainnetID: MainnetHRP, FujiID: FujiHRP, CaminoID: CaminoHRP, ColumbusID: ColumbusHRP, UnitTestID: UnitTestHRP, LocalID: LocalHRP, } NetworkHRPToNetworkID = map[string]uint32{ MainnetHRP: MainnetID, FujiHRP: FujiID, CaminoHRP: CaminoID, ColumbusHRP: ColumbusID, UnitTestHRP: UnitTestID, LocalHRP: LocalID, } ValidNetworkPrefix = "network-" )
Variables to be exported
View Source
var ( NetworkIDToTokenSymbol = map[uint32]string{ CaminoID: CaminoTokenSymbol, ColumbusID: CaminoTokenSymbol, } NetworkIDToTokenName = map[uint32]string{ CaminoID: CaminoTokenName, ColumbusID: CaminoTokenName, } )
Variables to be exported
Functions ¶
func IsActiveNetwork ¶
func NetworkName ¶
NetworkName returns a human readable name for the network with ID [networkID]
func TokenSymbol ¶
GetHRP returns the Human-Readable-Part of bech32 addresses for a networkID
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.