Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

ctg source pure

Package ctg is a simple utility package with helpers for bech32 address conversions.

Overview

Package ctg is a simple utility package with helpers for bech32 address conversions.

Functions 1

func ConvertGnoToAny

1func ConvertGnoToAny(prefix string, addr address) (string, error)
source

ConvertGnoToAny converts a gno.land address (prefixed with "g") to another Bech32 prefix given by prefix. The function ensures the source address really is a gno.land address before proceeding.

Example:

Example
1cosmosAddr, _ := ConvertGnoToAny("cosmos", "g1k98jx9...")
2fmt.Println(cosmosAddr) // → cosmos1....

Imports 2

Source Files 3