Documentation
¶
Index ¶
- Constants
- Variables
- func CopyHeader(dst http.Header, src http.Header, names ...string)
- func DeriveEd25519(seed []byte, derivationPath []uint32) (priv [32]byte)
- func DerivePath(path string) ([]uint32, error)
- func DigInvoke(function interface{}, opts ...dig.InvokeOption) error
- func DigProvide(constructor interface{}, opts ...dig.ProvideOption) error
- func IsNotFoundErr(err error) bool
- func NextDerivePath(path string) (string, error)
- func Ptr[T any](t T) *T
- func RequestCBOR(ctx context.Context, cli *http.Client, method, api string, input, output any) error
- func RequestJSON(ctx context.Context, cli *http.Client, method, api string, input, output any) error
- func SliceHas[T comparable](sl []T, v T) bool
- func ToDerivePath(idxs []uint32) string
- func Unmarshal[T any](b *Bytes) (*T, error)
- type Bytes
- type ContextHTTPHeader
- type ID
- func (id ID) Bytes() []byte
- func (id ID) MarshalCBOR() ([]byte, error)
- func (id ID) MarshalJSON() ([]byte, error)
- func (id ID) MarshalText() ([]byte, error)
- func (id *ID) String() string
- func (id *ID) UnmarshalCBOR(data []byte) error
- func (id *ID) UnmarshalJSON(data []byte) error
- func (id *ID) UnmarshalText(data []byte) error
- type UUID
Constants ¶
View Source
const ED25519_CURVE = "ed25519 seed"
View Source
const HARDENED_OFFSET = 0x80000000
Variables ¶
View Source
var DerivePathPrefix = regexp.MustCompile(`^[mM]'?\/?`)
View Source
var ExternalHTTPClient = &http.Client{ Transport: gzhttp.Transport(externalTr), Timeout: time.Second * 15, }
View Source
var HTTPClient = &http.Client{ Transport: gzhttp.Transport(internalTr), Timeout: time.Second * 5, }
View Source
var Validator *validator.Validate
Functions ¶
func DeriveEd25519 ¶ added in v1.2.2
SLIP-0010 https://github.com/satoshilabs/slips/blob/master/slip-0010.md
func DerivePath ¶ added in v1.2.2
func DigProvide ¶
func DigProvide(constructor interface{}, opts ...dig.ProvideOption) error
DigProvide ...
func IsNotFoundErr ¶ added in v0.6.4
func NextDerivePath ¶ added in v1.2.2
func RequestCBOR ¶
func RequestJSON ¶
func SliceHas ¶ added in v0.4.0
func SliceHas[T comparable](sl []T, v T) bool
func ToDerivePath ¶ added in v1.2.2
Types ¶
type Bytes ¶ added in v0.6.0
type Bytes []byte
func (Bytes) MarshalCBOR ¶ added in v0.6.0
func (Bytes) MarshalJSON ¶ added in v0.6.0
func (*Bytes) UnmarshalCBOR ¶ added in v0.6.0
func (*Bytes) UnmarshalJSON ¶ added in v0.6.0
type ContextHTTPHeader ¶
type ID ¶
var ANON ID = mustParseID("000000000000000anon0") // anonymous user
var JARVIS ID = mustParseID("0000000000000jarvis0") // system user
var ZeroID ID
func TryParseID ¶ added in v0.6.0
func (ID) MarshalCBOR ¶
func (ID) MarshalJSON ¶
func (ID) MarshalText ¶ added in v0.6.0
func (*ID) UnmarshalCBOR ¶
func (*ID) UnmarshalJSON ¶
func (*ID) UnmarshalText ¶ added in v0.6.0
type UUID ¶
func (UUID) MarshalCBOR ¶
func (UUID) MarshalText ¶
func (*UUID) UnmarshalCBOR ¶
func (*UUID) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.