-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy patherrors.go
40 lines (34 loc) · 1.29 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package bscript
import "github.com/pkg/errors"
// Sentinel errors raised by data ops.
var (
ErrDataTooBig = errors.New("data too big")
ErrDataTooSmall = errors.New("not enough data")
ErrPartTooBig = errors.New("part too big")
)
// Sentinel errors raised by addresses.
var (
ErrInvalidAddressLength = errors.New("invalid address length")
ErrUnsupportedAddress = errors.New("address not supported")
)
// Sentinel errors raised by inscriptions.
var (
ErrP2PKHInscriptionNotFound = errors.New("no P2PKH inscription found")
)
// Sentinel errors raised through encoding.
var (
ErrEncodingBadChar = errors.New("bad char")
ErrEncodingTooLong = errors.New("too long")
ErrEncodingInvalidVersion = errors.New("not version 0 of 6f")
ErrEncodingInvalidChecksum = errors.New("invalid checksum")
ErrEncodingChecksumFailed = errors.New("checksum failed")
ErrTextNoBIP76 = errors.New("text did not match the bip276 format")
)
// Sentinel errors raised by the package.
var (
ErrInvalidPKLen = errors.New("invalid public key length")
ErrInvalidOpCode = errors.New("invalid opcode data")
ErrEmptyScript = errors.New("script is empty")
ErrNotP2PKH = errors.New("not a P2PKH")
ErrInvalidOpcodeType = errors.New("use AppendPushData for push data funcs")
)