diff options
| author | d0x471b <0x471@protonmail.com> | 2022-12-31 03:45:30 +0300 |
|---|---|---|
| committer | d0x471b <0x471@protonmail.com> | 2022-12-31 03:45:30 +0300 |
| commit | 0f1d7d51de1baa21256fdb7ddafe54aab66172f7 (patch) | |
| tree | 30373f9b64ba6301096f26cdade55ebac4f5e59f /cli/vendor/github.com/btcsuite/btcd/btcec/v2/error.go | |
| parent | 517ad8d13a6b23328927154226575605be70669f (diff) | |
Diffstat (limited to 'cli/vendor/github.com/btcsuite/btcd/btcec/v2/error.go')
| -rw-r--r-- | cli/vendor/github.com/btcsuite/btcd/btcec/v2/error.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cli/vendor/github.com/btcsuite/btcd/btcec/v2/error.go b/cli/vendor/github.com/btcsuite/btcd/btcec/v2/error.go new file mode 100644 index 0000000..df6ec67 --- /dev/null +++ b/cli/vendor/github.com/btcsuite/btcd/btcec/v2/error.go @@ -0,0 +1,24 @@ +// Copyright (c) 2013-2021 The btcsuite developers +// Copyright (c) 2015-2021 The Decred developers + +package btcec + +import ( + secp "github.com/decred/dcrd/dcrec/secp256k1/v4" +) + +// Error identifies an error related to public key cryptography using a +// sec256k1 curve. It has full support for errors.Is and errors.As, so the +// caller can ascertain the specific reason for the error by checking the +// underlying error. +type Error = secp.Error + +// ErrorKind identifies a kind of error. It has full support for errors.Is and +// errors.As, so the caller can directly check against an error kind when +// determining the reason for an error. +type ErrorKind = secp.ErrorKind + +// makeError creates an secp.Error given a set of arguments. +func makeError(kind ErrorKind, desc string) Error { + return Error{Err: kind, Description: desc} +} |
