spverrors

package
v1.0.0-beta.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAcceptContact = models.SPVError{Message: "accepting contact failed", StatusCode: 500, Code: "error-contact-accepting-contact-failed"}

ErrAcceptContact is when accepting contact failed

View Source
var ErrAccessKeyRevoked = models.SPVError{Message: "access key has been revoked", StatusCode: 400, Code: "error-access-key-revoked"}

ErrAccessKeyRevoked is when the access key has been revoked

View Source
var ErrAddingContactRequest = models.SPVError{Message: "adding contact request failed", StatusCode: 500, Code: "error-contact-request-failed"}

ErrAddingContactRequest is when error occurred while adding contact

View Source
var ErrAdminAuthOnUserEndpoint = models.SPVError{Message: "cannot call user's endpoints with admin authorization", StatusCode: 401, Code: "error-admin-auth-on-user-endpoint"}

ErrAdminAuthOnUserEndpoint is when admin authorization is used on user's endpoint

View Source
var ErrAskingForFeeUnit = models.SPVError{Message: "error during asking for fee unit", StatusCode: 500, Code: "error-asking-for-fee-unit"}

ErrAskingForFeeUnit is when error occurred during asking for fee unit

View Source
var ErrAuthorization = models.SPVError{Message: "unauthorized", StatusCode: 401, Code: "error-unauthorized"}

ErrAuthorization is basic auth error

View Source
var ErrBroadcast = models.SPVError{Message: "broadcast error", StatusCode: 500, Code: "error-broadcast"}

ErrBroadcast is when broadcast error occurred

View Source
var ErrCannotBindRequest = models.SPVError{Message: "cannot bind request body", StatusCode: 400, Code: "error-bind-body-invalid"}

ErrCannotBindRequest is when request body cannot be bind into struct

View Source
var ErrCannotMapFromEngine = models.SPVError{Message: "error during preparing response", StatusCode: 500, Code: "error-response-write"}

ErrCannotMapFromEngine is when engine model cannot be mapped into response model.

View Source
var ErrCannotMapFromModel = models.SPVError{Message: "error during reading request body", StatusCode: 500, Code: "error-request-read"}

ErrCannotMapFromModel is when request body model cannot be mapped into domain model.

View Source
var ErrCannotParseQueryParams = models.SPVError{Message: "cannot parse request query params", StatusCode: 400, Code: "error-query-params-invalid"}

ErrCannotParseQueryParams is when query params cannot be parsed into expected struct.

View Source
var ErrCapabilitiesPikeUnsupported = models.SPVError{Message: "server doesn't support PIKE", StatusCode: 400, Code: "error-capabilities-pike-unsupported"}

ErrCapabilitiesPikeUnsupported is when PIKE is not supported for given paymail domain

View Source
var ErrCapabilitiesPkiUnsupported = models.SPVError{Message: "server doesn't support PKI", StatusCode: 400, Code: "error-capabilities-pki-unsupported"}

ErrCapabilitiesPkiUnsupported is when PKI is not supported for given paymail domain

View Source
var ErrChangeStrategyNotImplemented = models.SPVError{Message: "change strategy nominations not implemented yet", StatusCode: 501, Code: "error-utxo-change-strategy-not-implemented"}

ErrChangeStrategyNotImplemented is a temporary error until the feature is supported

View Source
var ErrConfirmContact = models.SPVError{Message: "confirming contact failed", StatusCode: 500, Code: "error-contact-confirming-contacts-failed"}

ErrConfirmContact is when confirming contact failed

View Source
var ErrContactAlreadyExists = models.SPVError{Message: "contact already exists", StatusCode: 409, Code: "error-contact-already-exists"}

ErrContactAlreadyExists is when contact already exists

View Source
var ErrContactIncorrectStatus = models.SPVError{Message: "contact is in incorrect status to proceed", StatusCode: 400, Code: "error-contact-status-incorrect"}

ErrContactIncorrectStatus is when contact is in incorrect status to make a change

View Source
var ErrContactNotFound = models.SPVError{Message: "contact not found", StatusCode: 404, Code: "error-contact-not-found"}

ErrContactNotFound is when contact cannot be found

View Source
var ErrContactsNotFound = models.SPVError{Message: "contacts not found", StatusCode: 404, Code: "error-contacts-not-found"}

ErrContactsNotFound is when contacts cannot be found

View Source
var ErrCouldNotCountContacts = models.SPVError{Message: "failed to count contacts", StatusCode: 500, Code: "error-contacts-count-failed"}

ErrCouldNotCountContacts is when contacts cannot be counted

View Source
var ErrCouldNotCountTransactions = models.SPVError{Message: "failed transactions count", StatusCode: 500, Code: "error-transactions-count-failed"}

ErrCouldNotCountTransactions is when a transaction count fails

View Source
var ErrCouldNotCountXpubs = models.SPVError{Message: "failed xpubs count", StatusCode: 500, Code: "error-xpubs-count-failed"}

ErrCouldNotCountXpubs is when could not count xpubs

View Source
var ErrCouldNotFindAccessKey = models.SPVError{Message: "access key not found", StatusCode: 404, Code: "error-access-key-not-found"}

ErrCouldNotFindAccessKey is when could not find xpub

View Source
var ErrCouldNotFindDestination = models.SPVError{Message: "destination not found", StatusCode: 404, Code: "error-destination-not-found"}

ErrCouldNotFindDestination is an error when a destination could not be found

View Source
var ErrCouldNotFindDraftTx = models.SPVError{Message: "draft tx not found", StatusCode: 404, Code: "error-transaction-draft-tx-not-found"}

ErrCouldNotFindDraftTx is an error when a given draft tx could not be found

View Source
var ErrCouldNotFindPaymail = models.SPVError{Message: "paymail not found", StatusCode: 404, Code: "error-paymail-not-found"}

ErrCouldNotFindPaymail is when paymail could not be found

View Source
var ErrCouldNotFindTransaction = models.SPVError{Message: "transaction not found", StatusCode: 404, Code: "error-transaction-not-found"}

ErrCouldNotFindTransaction is an error when a transaction could not be found

View Source
var ErrCouldNotFindUtxo = models.SPVError{Message: "utxo could not be found", StatusCode: 404, Code: "error-utxo-not-found"}

ErrCouldNotFindUtxo is an error when a given utxo could not be found

View Source
var ErrCouldNotFindXpub = models.SPVError{Message: "xpub not found", StatusCode: 404, Code: "error-xpub-not-found"}

ErrCouldNotFindXpub is when could not find xpub

View Source
var ErrCreateOutgoingTxFailed = models.SPVError{Message: "creation of outgoing tx failed", StatusCode: 500, Code: "error-transaction-create-outgoing-tx-failed"}

ErrCreateOutgoingTxFailed is when error occurred during creation of outgoing tx

View Source
var ErrCtxInterrupted = models.SPVError{Message: "context interrupted", StatusCode: 500, Code: "error-ctx-interrupted"}

ErrCtxInterrupted is when context is interrupted (canceled or deadline exceeded)

View Source
var ErrDatastoreRequired = models.SPVError{Message: "datastore is required", StatusCode: 500, Code: "error-datastore-required"}

ErrDatastoreRequired is when a datastore function is called without a datastore present

View Source
var ErrDeleteContact = models.SPVError{Message: "deleting contact failed", StatusCode: 500, Code: "error-contact-deleting-contact-failed"}

ErrDeleteContact is when deleting contact failed

View Source
var ErrDeletePaymailAddress = models.SPVError{Message: "deleting paymail address failed", StatusCode: 400, Code: "error-deleting-paymail-address-failed"}

ErrDeletePaymailAddress is when the paymail address could not be deleted

View Source
var ErrDeriveChildKey = models.SPVError{Message: "error deriving child key", StatusCode: 401, Code: "error-unauthorized-derive-child-key"}

ErrDeriveChildKey is when error occurred during deriving child key

View Source
var ErrDraftIDMismatch = models.SPVError{Message: "transaction draft id does not match utxo draft reservation id", StatusCode: 400, Code: "error-transaction-draft-id-mismatch"}

ErrDraftIDMismatch is when the reference ID does not match the reservation id

View Source
var ErrDraftTxHasNoOutputs = models.SPVError{Message: "corresponding draft transaction has no outputs", StatusCode: 400, Code: "error-transaction-draft-has-no-outputs"}

ErrDraftTxHasNoOutputs is when draft transaction has no outputs

View Source
var ErrDuplicateUTXOs = models.SPVError{Message: "duplicate utxos found", StatusCode: 400, Code: "error-utxo-duplicate"}

ErrDuplicateUTXOs is when a transaction is created using the same utxo more than once

View Source
var ErrDuringSaveTx = models.SPVError{Message: "error during saving tx", StatusCode: 500, Code: "error-transaction-save-failed"}

ErrDuringSaveTx is when error occurred during save tx

View Source
var ErrEmptyRelatedDraftID = models.SPVError{Message: "empty RelatedDraftID", StatusCode: 400, Code: "error-transaction-related-draft-id-empty"}

ErrEmptyRelatedDraftID is when related draft id is empty

View Source
var ErrEmptyTx = models.SPVError{Message: "empty tx", StatusCode: 400, Code: "error-transaction-empty"}

ErrEmptyTx is when tx is empty

View Source
var ErrEmptyXpubKey = models.SPVError{Message: "empty xPubKey", StatusCode: 400, Code: "error-transaction-xpub-key-empty"}

ErrEmptyXpubKey is when xpub key is empty

View Source
var ErrFailedToCreateUTXO = models.SPVError{Message: "failed to create UTXO", StatusCode: 400, Code: "error-transaction-failed-to-create-utxo"}

ErrFailedToCreateUTXO is when sdk method fails to create UTXO with provided data

View Source
var ErrFetchTransactions = models.SPVError{Message: "failed to fetch transactions", StatusCode: 500, Code: "error-fetch-transactions"}

ErrFetchTransactions is when a transaction fetch fails

View Source
var ErrForTypeConversion = models.SPVError{Message: "error during type conversion", StatusCode: 500, Code: "error-type-conversion"}

ErrForTypeConversion is when error occurred during type conversion

View Source
var ErrGetCapabilities = models.SPVError{Message: "failed to get paymail capabilities", StatusCode: 400, Code: "error-capabilities-failed-to-get"}

ErrGetCapabilities is when getting capabilities failed

View Source
var ErrGetContact = models.SPVError{Message: "getting contact failed", StatusCode: 500, Code: "error-contact-getting-contact-failed"}

ErrGetContact is when getting contact failed

View Source
var ErrGettingAddressFromHdKey = models.SPVError{Message: "error getting address from hd key", StatusCode: 401, Code: "error-unauthorized-address-failed-to-get-from-hd-key"}

ErrGettingAddressFromHdKey is when error occurred during getting address from hd key

View Source
var ErrGettingPKIFailed = models.SPVError{Message: "getting PKI for contact failed", StatusCode: 400, Code: "error-contact-getting-pki-failed"}

ErrGettingPKIFailed is when getting PKI for contact paymail failed

View Source
var ErrInternal = models.SPVError{Message: "internal server error", StatusCode: 500, Code: "error-internal-server-error"}

ErrInternal is a generic error that something weird went wrong

View Source
var ErrInvalidConditions = models.SPVError{Message: "invalid conditions", StatusCode: 400, Code: "error-bind-conditions-invalid"}

ErrInvalidConditions is when request has invalid conditions

View Source
var ErrInvalidContactPaymail = models.SPVError{Message: "invalid paymail in contact", StatusCode: 400, Code: "error-contact-paymail-invalid"}

ErrInvalidContactPaymail is when paymail is missing in contact

View Source
var ErrInvalidHex = models.SPVError{Message: "invalid hex", StatusCode: 400, Code: "error-transaction-hex-invalid"}

ErrInvalidHex is when cannot create tx from hex

View Source
var ErrInvalidInt = models.SPVError{Message: "invalid int value", StatusCode: 500, Code: "error-invalid-int-value"}

ErrInvalidInt is when uint value is invalid

View Source
var ErrInvalidInt64 = models.SPVError{Message: "invalid int64 value", StatusCode: 500, Code: "error-invalid-int64"}

ErrInvalidInt64 is when int64 value is invalid

View Source
var ErrInvalidLockingScript = models.SPVError{Message: "invalid locking script", StatusCode: 400, Code: "error-transaction-locking-script-invalid"}

ErrInvalidLockingScript is when a locking script cannot be decoded

View Source
var ErrInvalidOpReturnOutput = models.SPVError{Message: "invalid op_return output", StatusCode: 400, Code: "error-transaction-invalid-op-return-output"}

ErrInvalidOpReturnOutput is when a locking script is not a valid op_return

View Source
var ErrInvalidOrMissingToken = models.SPVError{Message: "invalid or missing bearer token", StatusCode: 401, Code: "error-unauthorized-token-invalid-or-missing"}

ErrInvalidOrMissingToken is when callback token from headers is invalid or missing

View Source
var ErrInvalidRequesterXpub = models.SPVError{Message: "invalid requester xpub", StatusCode: 400, Code: "error-contact-invalid-requester-xpub"}

ErrInvalidRequesterXpub is when requester xpub is not connected with given paymail

View Source
var ErrInvalidRequirements = models.SPVError{Message: "requirements are invalid or missing", StatusCode: 400, Code: "error-transaction-requirements-invalid"}

ErrInvalidRequirements is when an invalid requirement was given

View Source
var ErrInvalidScriptOutput = models.SPVError{Message: "invalid script output", StatusCode: 400, Code: "error-transaction-script-output-invalid"}

ErrInvalidScriptOutput is when a locking script is not a valid bitcoin script

View Source
var ErrInvalidSignature = models.SPVError{Message: "invalid signature", StatusCode: 401, Code: "error-unauthorized-signature-invalid"}

ErrInvalidSignature is when signature is invalid

View Source
var ErrInvalidToken = models.SPVError{Message: "invalid authorization token", StatusCode: 401, Code: "error-unauthorized-token-invalid"}

ErrInvalidToken is when callback token from headers is invalid

View Source
var ErrInvalidTransactionID = models.SPVError{Message: "invalid transaction id", StatusCode: 400, Code: "error-transaction-id-invalid"}

ErrInvalidTransactionID is when a transaction id cannot be decoded

View Source
var ErrInvalidUint = models.SPVError{Message: "invalid uint value", StatusCode: 500, Code: "error-invalid-uint-value"}

ErrInvalidUint is when uint value is invalid

View Source
var ErrInvalidUint32 = models.SPVError{Message: "invalid uint32 value", StatusCode: 500, Code: "error-invalid-uint32"}

ErrInvalidUint32 is when uint32 value is invalid

View Source
var ErrInvalidUint64 = models.SPVError{Message: "invalid uint64 value", StatusCode: 500, Code: "error-invalid-uint64"}

ErrInvalidUint64 is when uint64 value is invalid

View Source
var ErrMissingAccessKey = models.SPVError{Message: "missing required field: access key", StatusCode: 400, Code: "error-missing-field-access-key"}

ErrMissingAccessKey is when the access key field is required but missing

View Source
var ErrMissingAddress = models.SPVError{Message: "missing required field: address", StatusCode: 400, Code: "error-missing-field-address"}

ErrMissingAddress is when the address field address is required but missing

View Source
var ErrMissingAuthHeader = models.SPVError{Message: "missing auth header", StatusCode: 401, Code: "error-unauthorized-auth-header-missing"}

ErrMissingAuthHeader is when request does not have auth header

View Source
var ErrMissingClient = models.SPVError{Message: "client is missing from model, cannot save", StatusCode: 400, Code: "error-client-missing"}

ErrMissingClient is when client is missing from model, cannot save

View Source
var ErrMissingContactCreatorPaymail = models.SPVError{Message: "missing creator paymail in contact", StatusCode: 400, Code: "error-contact-creator-paymail-missing"}

ErrMissingContactCreatorPaymail is when creator paymail is missing in contact

View Source
var ErrMissingContactFullName = models.SPVError{Message: "missing full name in contact", StatusCode: 400, Code: "error-contact-full-name-missing"}

ErrMissingContactFullName is when full name is missing in contact

View Source
var ErrMissingContactID = models.SPVError{Message: "missing id in contact", StatusCode: 400, Code: "error-contact-id-missing"}

ErrMissingContactID is when id is missing in contact

View Source
var ErrMissingContactOwnerXPubID = models.SPVError{Message: "contact must have owner", StatusCode: 400, Code: "error-contact-owner-xpub-id-missing"}

ErrMissingContactOwnerXPubID is when owner XPubID is missing in contact

View Source
var ErrMissingContactPaymailParam = models.SPVError{Message: "missing paymail parameter in request", StatusCode: 400, Code: "error-contact-paymail-missing"}

ErrMissingContactPaymailParam is when paymail is missing in contact

View Source
var ErrMissingContactStatus = models.SPVError{Message: "status is required", StatusCode: 400, Code: "error-contact-status-missing"}

ErrMissingContactStatus is when status is missing in contact

View Source
var ErrMissingContactXPubKey = models.SPVError{Message: "missing pubKey in contact", StatusCode: 400, Code: "error-contact-xpub-missing"}

ErrMissingContactXPubKey is when XPubKey is missing in contact

View Source
var ErrMissingFieldID = models.SPVError{Message: "missing required field: id", StatusCode: 400, Code: "error-missing-field-id"}

ErrMissingFieldID is when the id field is required but missing

View Source
var ErrMissingFieldSatoshis = models.SPVError{Message: "missing required field: satoshis", StatusCode: 400, Code: "error-missing-field-satoshis"}

ErrMissingFieldSatoshis is when the field satoshis is required but missing

View Source
var ErrMissingFieldScriptPubKey = models.SPVError{Message: "missing required field: script_pub_key", StatusCode: 400, Code: "error-missing-field-script-pub-key"}

ErrMissingFieldScriptPubKey is when the field is required but missing

View Source
var ErrMissingFieldTransactionID = models.SPVError{Message: "missing required field: transaction_id", StatusCode: 400, Code: "error-missing-field-transaction-id"}

ErrMissingFieldTransactionID is when the field transaction id is required but missing

View Source
var ErrMissingFieldXpub = models.SPVError{Message: "missing required field: xpub", StatusCode: 400, Code: "error-missing-field-xpub"}

ErrMissingFieldXpub is when the xpub field is required but missing

View Source
var ErrMissingFieldXpubID = models.SPVError{Message: "missing required field: xpub_id", StatusCode: 400, Code: "error-missing-field-xpub-id"}

ErrMissingFieldXpubID is when the xpub_id field is required but missing

View Source
var ErrMissingLockingScript = models.SPVError{Message: "missing required field: locking script", StatusCode: 400, Code: "error-missing-field-locking-script"}

ErrMissingLockingScript is when the field locking script is required but missing

View Source
var ErrMissingPaymailAddress = models.SPVError{Message: "missing alias in paymail", StatusCode: 400, Code: "error-paymail-address-missing"}

ErrMissingPaymailAddress is when alias is missing in paymail

View Source
var ErrMissingPaymailDomain = models.SPVError{Message: "missing domain in paymail", StatusCode: 400, Code: "error-paymail-domain-missing"}

ErrMissingPaymailDomain is when domain is missing in paymail

View Source
var ErrMissingPaymailExternalXPub = models.SPVError{Message: "missing external xPub in paymail", StatusCode: 400, Code: "error-paymail-external-xpub-missing"}

ErrMissingPaymailExternalXPub is when external xPub is missing in paymail

View Source
var ErrMissingPaymailID = models.SPVError{Message: "missing id in paymail", StatusCode: 400, Code: "error-paymail-id-missing"}

ErrMissingPaymailID is when id is missing in paymail

View Source
var ErrMissingPaymailXPubID = models.SPVError{Message: "missing xpub_id in paymail", StatusCode: 400, Code: "error-paymail-xpub-id-missing"}

ErrMissingPaymailXPubID is when xpub_id is missing in paymail

View Source
var ErrMissingSignature = models.SPVError{Message: "missing signature", StatusCode: 401, Code: "error-unauthorized-signature-missing"}

ErrMissingSignature is when signature is missing in authorization process

View Source
var ErrMissingTransactionOutputs = models.SPVError{Message: "draft transaction configuration has no outputs", StatusCode: 400, Code: "error-transaction-outputs-missing"}

ErrMissingTransactionOutputs is when the draft transaction has no outputs

View Source
var ErrMissingTxHex = models.SPVError{Message: "transaction hex is empty or id is missing", StatusCode: 400, Code: "error-transaction-hex-missing"}

ErrMissingTxHex is when the hex is missing or invalid and creates an empty id

View Source
var ErrMissingUTXOsSpendable = models.SPVError{Message: "no utxos found using spendable", StatusCode: 404, Code: "error-utxo-spendable-missing"}

ErrMissingUTXOsSpendable is when there are no utxos found from the "spendable utxos"

View Source
var ErrMissingXPubID = models.SPVError{Message: "missing xpub_id", StatusCode: 400, Code: "error-missing-xpub-id"}

ErrMissingXPubID is when xpub_id is missing

View Source
var ErrMoreThanOnePaymailRegistered = models.SPVError{Message: "there are more than one paymail assigned to the xpub", StatusCode: 400, Code: "error-contact-more-than-one-paymail-registered"}

ErrMoreThanOnePaymailRegistered is when user who want to add contact has more than one paymail address

View Source
var ErrNoMatchingOutputs = models.SPVError{Message: "transaction outputs do not match any known destinations", StatusCode: 400, Code: "error-transaction-outputs-no-matching"}

ErrNoMatchingOutputs is when the transaction does not match any known destinations

View Source
var ErrNotAnAdminKey = models.SPVError{Message: "xpub provided is not an admin key", StatusCode: 401, Code: "error-unauthorized-xpub-not-an-admin-key"}

ErrNotAnAdminKey is when xpub from auth header is not an admin key

View Source
var ErrNotEnoughUtxos = models.SPVError{Message: "could not select enough outputs to satisfy transaction", StatusCode: 400, Code: "error-utxo-not-enough"}

ErrNotEnoughUtxos is when a draft transaction cannot be created because of lack of utxos

View Source
var ErrNotificationsDisabled = models.SPVError{Message: "notifications are disabled", StatusCode: 404, Code: "error-notifications-disabled"}

ErrNotificationsDisabled happens when the notifications are not enabled in the config

View Source
var ErrOneOfTheFieldsIsRequired = models.SPVError{Message: "missing all of the fields, one of them is required", StatusCode: 400, Code: "error-missing-field-all-required"}

ErrOneOfTheFieldsIsRequired is when all of required fields are missing

View Source
var ErrOutputValueNotRecognized = models.SPVError{Message: "output value is unrecognized", StatusCode: 400, Code: "error-transaction-output-value-unrecognized"}

ErrOutputValueNotRecognized is when there is an invalid output value given, or missing value

View Source
var ErrOutputValueTooHigh = models.SPVError{Message: "output value is too high", StatusCode: 400, Code: "error-transaction-output-value-too-high"}

ErrOutputValueTooHigh is when the satoshis output is too high on a transaction

View Source
var ErrOutputValueTooLow = models.SPVError{Message: "output value is too low", StatusCode: 400, Code: "error-transaction-output-value-too-low"}

ErrOutputValueTooLow is when the satoshis output is too low on a transaction

View Source
var ErrParseTransactionFromHex = models.SPVError{Message: "error parsing transaction from hex", StatusCode: 500, Code: "error-transaction-parse-from-hex"}

ErrParseTransactionFromHex is when error occurred during parsing transaction from hex

View Source
var ErrPaymailAddressIsInvalid = models.SPVError{Message: "paymail address is invalid", StatusCode: 400, Code: "error-paymail-address-invalid"}

ErrPaymailAddressIsInvalid is when the paymail address is NOT alias@domain.com

View Source
var ErrPaymailAlreadyExists = models.SPVError{Message: "paymail already exists", StatusCode: 409, Code: "error-paymail-already-exists"}

ErrPaymailAlreadyExists is when paymail with given data already exists in db

View Source
var ErrPaymailInvalidMerkleRoots = models.SPVError{Message: "invalid merkle roots", StatusCode: 400, Code: "error-paymail-invalid-merkle-roots"}

ErrPaymailInvalidMerkleRoots is when merkle roots verification by BHS returns status: INVALID

View Source
var ErrPaymailMerkleRootVerificationFailed = models.SPVError{Message: "merkle root verification could not be processed", StatusCode: 400, Code: "error-paymail-merkle-root-verification-failed"}

ErrPaymailMerkleRootVerificationFailed is when merkle root verification could not be processed

View Source
var ErrProcessP2PTx = models.SPVError{Message: "error during processing p2p transaction", StatusCode: 500, Code: "error-transaction-process-p2p"}

ErrProcessP2PTx is when error occurred during processing p2p tx

View Source
var ErrRejectContact = models.SPVError{Message: "rejecting contact failed", StatusCode: 500, Code: "error-contact-rejecting-contact-failed"}

ErrRejectContact is when rejecting contact failed

View Source
var ErrRequestedContactInvalid = models.SPVError{Message: "requested contact paymail is invalid", StatusCode: 400, Code: "error-contact-requested-contact-invalid"}

ErrRequestedContactInvalid is when the requested contact is invalid

View Source
var ErrRetrivePaymailInfo = models.SPVError{Message: "error during retrieving paymail info", StatusCode: 500, Code: "error-paymail-retrieve-info"}

ErrRetrivePaymailInfo is when error occurred during retrieving paymail info

View Source
var ErrRouteMethodNotAllowed = models.SPVError{Message: "method not allowed", StatusCode: 405, Code: "error-route-method-not-allowed"}

ErrRouteMethodNotAllowed is when route method is not allowed

View Source
var ErrRouteNotFound = models.SPVError{Message: "route not found", StatusCode: 404, Code: "error-route-not-found"}

ErrRouteNotFound is when route is not found

View Source
var ErrSaveContact = models.SPVError{Message: "adding contact failed", StatusCode: 400, Code: "error-contact-adding-contact-failed"}

ErrSaveContact is when saving new contact failed

View Source
var ErrSignatureExpired = models.SPVError{Message: "signature has expired", StatusCode: 401, Code: "error-unauthorized-signature-expired"}

ErrSignatureExpired is when given signature is expired

View Source
var ErrTransactionFeeInvalid = models.SPVError{Message: "transaction fee is invalid", StatusCode: 400, Code: "error-utxo-transaction-fee-invalid"}

ErrTransactionFeeInvalid is when the fee on the transaction is not the difference between inputs and outputs

View Source
var ErrTransactionIDMismatch = models.SPVError{Message: "result tx id did not match provided tx id", StatusCode: 400, Code: "error-transaction-id-mismatch"}

ErrTransactionIDMismatch is when the returned tx does not match the expected given tx id

View Source
var ErrTransactionRejectedByP2PProvider = models.SPVError{Message: "transaction rejected by P2P provider", StatusCode: 400, Code: "error-transaction-rejected"}

ErrTransactionRejectedByP2PProvider is an error when a tx was rejected by P2P Provider

View Source
var ErrTxRevertCouldNotFindDraftTx = models.SPVError{Message: "could not find the draft transaction for this transaction, cannot revert", StatusCode: 400, Code: "error-transaction-revert-draft-tx-not-found"}

ErrTxRevertCouldNotFindDraftTx is when draft tx could not be found

View Source
var ErrTxRevertEmptyDraftID = models.SPVError{Message: "not a spv wallet engine originating transaction, cannot revert", StatusCode: 400, Code: "error-transaction-revert-draft-id-empty"}

ErrTxRevertEmptyDraftID is when draft id is empty this means that tx is not from spv-wallet

View Source
var ErrTxRevertFoundOnChain = models.SPVError{Message: "transaction was found on-chain, cannot revert", StatusCode: 400, Code: "error-transaction-revert-not-found-on-chain"}

ErrTxRevertFoundOnChain is when tx was not found on chain

View Source
var ErrTxRevertUtxoAlreadySpent = models.SPVError{Message: "utxo of this transaction has been spent, cannot revert", StatusCode: 400, Code: "error-transaction-revert-utxo-already-spent"}

ErrTxRevertUtxoAlreadySpent is when utxo from tx was already spent

View Source
var ErrUnknownLockingScript = models.SPVError{Message: "could not recognize locking script", StatusCode: 400, Code: "error-destination-unknown-locking-script"}

ErrUnknownLockingScript is when the field is unknown

View Source
var ErrUnsupportedDestinationType = models.SPVError{Message: "unsupported destination type", StatusCode: 400, Code: "error-destination-unsupported-type"}

ErrUnsupportedDestinationType is a destination type that is not currently supported

View Source
var ErrUnsupportedTypeForConversion = models.SPVError{Message: "unsupported type for conversion", StatusCode: 500, Code: "error-unsupported-type-for-conversion"}

ErrUnsupportedTypeForConversion is when unsupported type for conversion

View Source
var ErrUpdateContact = models.SPVError{Message: "updating contact failed", StatusCode: 500, Code: "error-contact-updating-contact-failed"}

ErrUpdateContact is when updating contact failed

View Source
var ErrUtxoAlreadySpent = models.SPVError{Message: "utxo has already been spent", StatusCode: 400, Code: "error-utxo-already-spent"}

ErrUtxoAlreadySpent is when the utxo is already spent, but is trying to be used

View Source
var ErrUtxoNotReserved = models.SPVError{Message: "transaction utxo has not been reserved for spending", StatusCode: 400, Code: "error-utxo-not-reserved"}

ErrUtxoNotReserved is when the utxo is not reserved, but a transaction tries to spend it

View Source
var ErrValidateXPub = models.SPVError{Message: "error validation xpub", StatusCode: 401, Code: "error-unauthorized-xpub-invalid"}

ErrValidateXPub is when validation xpub

View Source
var ErrWebhookGetAll = models.SPVError{Message: "cannot get all the stored webhooks", StatusCode: 500, Code: "error-webhook-get-all"}

ErrWebhookGetAll is when cannot get all the stored webhooks

View Source
var ErrWebhookSubscriptionFailed = models.SPVError{Message: "webhook subscription failed", StatusCode: 500, Code: "error-webhook-subscription-failed"}

ErrWebhookSubscriptionFailed is when webhook subscription failed

View Source
var ErrWebhookSubscriptionNotFound = models.SPVError{Message: "webhook subscription not found", StatusCode: 404, Code: "error-webhook-subscription-not-found"}

ErrWebhookSubscriptionNotFound is when cannot find webhook to unsubscribe

View Source
var ErrWebhookUnsubscriptionFailed = models.SPVError{Message: "webhook unsubscription failed", StatusCode: 500, Code: "error-webhook-unsubscription-failed"}

ErrWebhookUnsubscriptionFailed is when webhook unsubscription failed

View Source
var ErrXPubAlreadyExists = models.SPVError{Message: "xpub already exists", StatusCode: 409, Code: "error-xpub-already-exists"}

ErrXPubAlreadyExists is when xpub already exists

View Source
var ErrXPubAuthRequired = models.SPVError{Message: "xpub authorization required", StatusCode: 401, Code: "error-xpub-authorization-required"}

ErrXPubAuthRequired is when xpub authorization is required

View Source
var ErrXpubIDMisMatch = models.SPVError{Message: "xpub_id mismatch", StatusCode: 400, Code: "error-xpub-id-mismatch"}

ErrXpubIDMisMatch is when the xPubID does not match

View Source
var ErrXpubInvalidLength = models.SPVError{Message: "xpub is an invalid length", StatusCode: 400, Code: "error-xpub-length-invalid"}

ErrXpubInvalidLength is when the length of the xpub does not match the desired length

View Source
var ErrXpubNoMatch = models.SPVError{Message: "xpub key does not match raw key", StatusCode: 400, Code: "error-xpub-key-no-match"}

ErrXpubNoMatch is when the derived xpub key does not match the key given

Functions

func AbortWithErrorResponse

func AbortWithErrorResponse(c *gin.Context, err error, log *zerolog.Logger)

AbortWithErrorResponse is searching for error and abort with error set

func ErrorResponse

func ErrorResponse(c *gin.Context, err error, log *zerolog.Logger)

ErrorResponse is searching for error and setting it up in gin context

func Newf

func Newf(message string, args ...interface{}) error

Newf creates a new error with a message (which can be formatted)

func UnfoldError

func UnfoldError(err error) string

UnfoldError unfolds the error chain into a single string example:

[errType1] outer error message -> [errType2] inner error message -> [errTypeN] innermost error message

if error is a joined error, it will be unfolded as:

[type] ([errType1] joined error1 AND [errType2] joined error2)

for SPVError, it will print the status code in parentheses:

[models.SPVError(404)] error message

func Wrapf

func Wrapf(err error, format string, args ...interface{}) error

Wrapf wraps an error with a formatted message If err is nil, Wrapf returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL