Bech32 - CosmosSwift/swift-coin GitHub Wiki
Bech32
Bech32 checksum implementation
public class Bech32
Methods
convertBits(_:from:to:pad:)
Convert from one power-of-2 number base to another
public static func convertBits(_ idata: Data, from: Int, to: Int, pad: Bool) throws -> Data
encode(humanReadablePart:data:)
Encode Bech32 string
public static func encode(humanReadablePart: String, data: Data) -> String
decode(_:)
Decode Bech32 string
public static func decode(_ str: String) throws -> (hrp: String, checksum: Data)
convertAndEncode(humanReadablePart:data:)
public static func convertAndEncode(humanReadablePart: String, data: Data) throws -> String
decodeAndConvert(_:)
public static func decodeAndConvert(_ string: String) throws -> (String, Data)