Versions in this module Expand all Collapse all v10 v10.0.0 Aug 29, 2024 Changes in this version + const ED25519PubKeyMultiCodec + const SECP256k1PubKeyMultiCodec + var ErrInvalidCharset = errors.New("invalid charset") + var ErrInvalidHashAlg = fmt.Errorf("not a valid HashAlg, try [%s]", strings.Join(_HashAlgNames, ", ")) + var ErrInvalidKeyAlg = fmt.Errorf("not a valid KeyAlg, try [%s]", strings.Join(_KeyAlgNames, ", ")) + var ErrInvalidSize = func(size int) error + func BytesToPubKey(bz []byte, keytype KeyAlg) (cryptotypes.PubKey, error) + func CreateDIDKeyByPubKey(pubKey cryptotypes.PubKey) (string, error) + func CreateDIDKeyIDByPubKey(pubKey cryptotypes.PubKey) (string, error) + func Decode(bs []byte, label string) (string, error) + func DerefOrDefault[T any](ptr *T, defaultValue T) T + func Encode(str string, label string) ([]byte, error) + func Hash(alg HashAlg, bytes []byte) ([]byte, error) + func HashAlgNames() []string + func Indexed[T any, U any](f func(t T) U) func(T, int) U + func IsNil(t any) bool + func KeyAlgNames() []string + func Map[T, M any](s []T, f func(T) M) []M + func NonZeroOrDefaultUInt(v *sdkmath.Uint, defaultValue sdkmath.Uint) sdkmath.Uint + func NonZeroOrDefault[T any](v, defaultValue T) T + func ParseURLMust(s string) *url.URL + func QueryInterpreter(ctx context.Context, i *prolog.Interpreter, query string, ...) (*types.Answer, error) + func URLMatches(this *url.URL) func(*url.URL) bool + func VerifySignature(alg KeyAlg, pubKey []byte, msg, sig []byte) (_ bool, err error) + func WhitelistBlacklistMatches[T any](whitelist []T, blacklist []T, predicate func(item T) func(b T) bool) func(T) bool + type BoundedBuffer struct + func NewBoundedBuffer(size int) (*BoundedBuffer, error) + func NewBoundedBufferMust(size int) *BoundedBuffer + func (b *BoundedBuffer) String() string + func (b *BoundedBuffer) Write(p []byte) (n int, err error) + type HashAlg int + const HashAlgMd5 + const HashAlgSha256 + const HashAlgSha512 + func ParseHashAlg(name string) (HashAlg, error) + func (a HashAlg) Hasher() (hash.Hash, error) + func (x HashAlg) IsValid() bool + func (x HashAlg) String() string + type KeyAlg int + const KeyAlgEd25519 + const KeyAlgSecp256k1 + const KeyAlgSecp256r1 + func ParseKeyAlg(name string) (KeyAlg, error) + func (x KeyAlg) IsValid() bool + func (x KeyAlg) String() string + type URIComponent int + const FragmentComponent + const PathComponent + const QueryValueComponent + const SegmentComponent + func (c URIComponent) Escape(v string) string + func (c URIComponent) Unescape(v string) (string, error) Other modules containing this package github.com/axone-protocol/axoned/v7 github.com/axone-protocol/axoned/v8 github.com/axone-protocol/axoned/v9