forked from libsv/go-bt
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patherrors.go
More file actions
56 lines (47 loc) · 2 KB
/
errors.go
File metadata and controls
56 lines (47 loc) · 2 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package bt
import "github.com/pkg/errors"
// General errors.
var (
ErrInvalidTxID = errors.New("invalid TxID")
ErrTxNil = errors.New("tx is nil")
ErrTxTooShort = errors.New("too short to be a tx - even an empty tx has 10 bytes")
ErrNLockTimeLength = errors.New("nLockTime length must be 4 bytes long")
ErrEmptyValues = errors.New("empty value or values passed, all arguments are required and cannot be empty")
ErrUnsupportedScript = errors.New("non-P2PKH input used in the tx - unsupported")
ErrInvalidScriptType = errors.New("invalid script type")
ErrNoUnlocker = errors.New("unlocker not supplied")
)
// Sentinal errors reported by inputs.
var (
ErrInputNoExist = errors.New("specified input does not exist")
ErrInputTooShort = errors.New("input length too short")
)
// Sentinal errors reported by outputs.
var (
ErrOutputNoExist = errors.New("specified output does not exist")
ErrOutputTooShort = errors.New("output length too short")
)
// Sentinal errors reported by change.
var (
ErrInsufficientInputs = errors.New("satoshis inputted to the tx are less than the outputted satoshis")
)
// Sentinal errors reported by signature hash.
var (
ErrEmptyPreviousTxID = errors.New("'PreviousTxID' not supplied")
ErrEmptyPreviousTxScript = errors.New("'PreviousTxScript' not supplied")
)
// Sentinel errors reported by the fees.
var (
ErrFeeQuotesNotInit = errors.New("feeQuotes have not been setup, call NewFeeQuotes")
ErrMinerNoQuotes = errors.New("miner has no quotes stored")
ErrFeeTypeNotFound = errors.New("feetype not found")
ErrFeeQuoteNotInit = errors.New("feeQuote has not been initialised, call NewFeeQuote()")
ErrUnknownFeeType = errors.New("unknown fee type")
)
// Sentinel errors reported by Fund
var (
// ErrNoUTXO signals the UTXOGetterFunc has reached the end of its input.
ErrNoUTXO = errors.New("no remaining utxos")
// ErrInsufficientFunds insufficient funds provided for funding
ErrInsufficientFunds = errors.New("insufficient funds provided")
)