Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 113 variants AllocationsAlreadyAvailable, AssetNotFound { asset_id: String, }, BatchTransferNotFound { idx: i32, }, BitcoinNetworkMismatch, CannotChangeOnline, CannotProvideOutOfBandAck { details: String, }, CannotCombinePsbts, CannotProvideOutOfBandConsignment { details: String, }, CannotAbortPendingVanillaTx, CannotDeleteBatchTransfer, CannotEstimateFees, CannotFailBatchTransfer, CannotFinalizePsbt, CannotUseIfaOnMainnet, Database { details: String, }, EmptyFile { file_path: String, }, FailedBdkSync { details: String, }, FailedBroadcast { details: String, }, FailedIssuance { details: String, }, FileAlreadyExists { path: String, }, FingerprintMismatch, IO { details: String, }, Inconsistency { details: String, }, Indexer { details: String, }, InexistentDataDir, InexistentWalletManifest { path: String, }, InsufficientAllocationSlots, InsufficientAssignments { asset_id: String, available: AssignmentsCollection, }, InsufficientBitcoins { needed: u64, available: u64, }, Internal { details: String, }, InvalidAddress { details: String, }, InvalidAmountZero, InvalidAssignment, InvalidAttachments { details: String, }, InvalidBitcoinKeys, InvalidBitcoinNetwork { network: String, }, InvalidColoringInfo { details: String, }, InvalidConsignment, InvalidCosigner { details: String, }, InvalidDetails { details: String, }, InvalidElectrum { details: String, }, InvalidEstimationBlocks, InvalidExpiration, InvalidFeeRate { details: String, }, InvalidFilePath { file_path: String, }, InvalidFingerprint, InvalidIndexer { details: String, }, InvalidInvoice { details: String, }, InvalidMnemonic { details: String, }, InvalidMultisigThreshold { required: u8, total: u8, }, InvalidName { details: String, }, InvalidPrecision { details: String, }, InvalidProxyProtocol { version: String, }, InvalidPsbt { details: String, }, InvalidPubkey { details: String, }, InvalidRecipientData { details: String, }, InvalidRecipientID, InvalidRecipientMap, InvalidRecipientNetwork, InvalidRejectListUrl { details: String, }, InvalidTicker { details: String, }, InvalidTransportEndpoint { details: String, }, InvalidTransportEndpoints { details: String, }, InvalidTxid, InvalidVanillaKeychain, InvalidWitnessVersion { witness_version: String, }, MaxFeeExceeded { txid: String, }, MinFeeNotMet { txid: String, }, MultisigHubService { details: String, }, MultisigCannotMarkOperationProcessed { details: String, }, MultisigCannotRespondToOperation { details: String, }, MultisigOperationInProgress, MultisigOperationNotFound { operation_idx: i32, }, MultisigTransferStatusMismatch, MultisigUnexpectedData { details: String, }, MultisigUserNotCosigner, Network { details: String, }, NoBurnAmount, NoConsignment, NoCosignersSupplied, NoInflationAmounts, NoIssuanceAmounts, NoKeysSupplied, NoMaxAllocationsPerUtxo, NoSupportedSchemas, NoValidTransportEndpoint, Offline, OnlineNeeded, OutputBelowDustLimit, Proxy { details: String, }, PsbtInspection { details: String, }, RecipientIDAlreadyUsed, RecipientIDDuplicated, RejectListService { details: String, }, RestClientBuild { details: String, }, RgbInspection { details: String, }, TooHighInflationAmounts, TooHighIssuanceAmounts, TooManyCosigners, TooManySignaturesInPsbt, UnknownRgbSchema { schema_id: String, }, UnknownTransfer { txid: String, }, UnsupportedBackupVersion { version: String, }, UnsupportedBurn { asset_schema: AssetSchema, }, UnsupportedInflation { asset_schema: AssetSchema, }, UnsupportedLayer1 { layer_1: String, }, UnsupportedSchema { asset_schema: AssetSchema, }, UnsupportedTransportType, UnsupportedWalletManifestVersion { version: String, }, WalletDirAlreadyExists { path: String, }, WalletSettingMismatch { setting: String, expected: String, provided: String, }, WatchOnly, WrongPassword,
}
Expand description

The error variants returned by functions.

Variants§

§

AllocationsAlreadyAvailable

No need to create more allocations

§

AssetNotFound

Requested asset was not found

Fields

§asset_id: String

Asset ID

§

BatchTransferNotFound

The requested batch transfer was not found

Fields

§idx: i32

Transfer idx

§

BitcoinNetworkMismatch

The wallet has already been loaded on a different bitcoin network

§

CannotChangeOnline

A wallet cannot go online twice with different data

§

CannotProvideOutOfBandAck

An out-of-band ACK cannot be provided for this transfer

Fields

§details: String

Error details

§

CannotCombinePsbts

The given PSBTs cannot be combined

§

CannotProvideOutOfBandConsignment

An out-of-band consignment cannot be provided for this transfer

Fields

§details: String

Error details

§

CannotAbortPendingVanillaTx

Requested pending vanilla TX cannot be aborted

§

CannotDeleteBatchTransfer

Requested batch transfer cannot be deleted

§

CannotEstimateFees

Cannot estimate fees

§

CannotFailBatchTransfer

Requested batch transfer cannot be failed

§

CannotFinalizePsbt

The given PSBT cannot be finalized

§

CannotUseIfaOnMainnet

Cannot use IFA schema on mainnet

§

Database

A database error has been encountered

Fields

§details: String

Error details

§

EmptyFile

The provided file is empty

Fields

§file_path: String

File path

§

FailedBdkSync

Syncing BDK with the blockchain has failed

Fields

§details: String

Error details

§

FailedBroadcast

Broadcasting the PSBT has failed

Fields

§details: String

Error details

§

FailedIssuance

Issued RGB asset has failed the validity check

Fields

§details: String

Error details

§

FileAlreadyExists

The file already exists

Fields

§path: String

The file path

§

FingerprintMismatch

The master fingerprint derived from the mnemonic doesn’t match the provided one

§

IO

An I/O error has been encountered

Fields

§details: String

Error details

§

Inconsistency

An inconsistency has been detected between the wallet’s internal (database) and external (BDK, RGB) data

Fields

§details: String

Error details

§

Indexer

An error was received from the indexer

Fields

§details: String

Error details

§

InexistentDataDir

The provided directory does not exist

§

InexistentWalletManifest

The wallet directory holds no manifest to load the wallet from

Fields

§path: String

The manifest path

§

InsufficientAllocationSlots

There are not enough available allocation slots (UTXOs with available slots)

§

InsufficientAssignments

There are not enough assignments of the requested asset to fulfill the request

Fields

§asset_id: String

Asset ID

§available: AssignmentsCollection

Available assignments

§

InsufficientBitcoins

There are not enough bitcoins to fulfill the request

Fields

§needed: u64

Sats needed for some transaction

§available: u64

Sats available for spending

§

Internal

An internal error has been encountered

Fields

§details: String

Error details

§

InvalidAddress

An invalid bitcoin address has been provided

Fields

§details: String

Error details

§

InvalidAmountZero

An invalid 0 amount has been provided

§

InvalidAssignment

An invalid assignment has been provided

§

InvalidAttachments

The provided attachments are invalid

Fields

§details: String

Error details

§

InvalidBitcoinKeys

Keys derived from the provided data do not match

§

InvalidBitcoinNetwork

Invalid bitcoin network

Fields

§network: String

The invalid network

§

InvalidColoringInfo

The provided coloring info is invalid

Fields

§details: String

Error details

§

InvalidConsignment

The consignment is invalid

§

InvalidCosigner

The provided cosigner is invalid

Fields

§details: String

Error details

§

InvalidDetails

The provided asset details is invalid

Fields

§details: String

Error details

§

InvalidElectrum

Electrum server does not provide the required functionality

There are multiple electrum server variants and one with verbose support in blockchain.transaction.get is required, see this issue on blockstream’s electrs fork for more info

Fields

§details: String

Error details

§

InvalidEstimationBlocks

Trying to request fee estimation for an invalid block number, it must be between 1 and 1008

§

InvalidExpiration

The provided expiration is invalid

§

InvalidFeeRate

The provided fee rate is invalid

Fields

§details: String

Error details

§

InvalidFilePath

The provided file path is invalid

Fields

§file_path: String

File path

§

InvalidFingerprint

The fingerprint is invalid

§

InvalidIndexer

The provided indexer is invalid

Fields

§details: String

Error details

§

InvalidInvoice

The provided invoice is invalid

Fields

§details: String

Error details

§

InvalidMnemonic

The provided mnemonic phrase is invalid

Fields

§details: String

Error details

§

InvalidMultisigThreshold

Invalid multisig threshold

Fields

§required: u8

Required threshold

§total: u8

Total cosigners

§

InvalidName

The provided asset name is invalid

Fields

§details: String

Error details

§

InvalidPrecision

The provided asset precision is invalid

Fields

§details: String

Error details

§

InvalidProxyProtocol

The provided proxy URL points to a proxy running an unsupported protocol version

Fields

§version: String

Detected version

§

InvalidPsbt

The provided PSBT is invalid

Fields

§details: String

Error details

§

InvalidPubkey

The provided pubkey is invalid

Fields

§details: String

Error details

§

InvalidRecipientData

The provided recipient data is invalid

Fields

§details: String

Error details

§

InvalidRecipientID

The provided recipient ID is neither a blinded UTXO or a script

§

InvalidRecipientMap

The provided recipient map is invalid

§

InvalidRecipientNetwork

The provided recipient ID is for a different network than the wallet’s one

§

InvalidRejectListUrl

The provided reject list URL is invalid

Fields

§details: String

Error details

§

InvalidTicker

The provided asset ticker is invalid

Fields

§details: String

Error details

§

InvalidTransportEndpoint

The provided transport endpoint is invalid

Fields

§details: String

Error details

§

InvalidTransportEndpoints

The provided transport endpoints are invalid

Fields

§details: String

Error details

§

InvalidTxid

The provided TXID is invalid

§

InvalidVanillaKeychain

The provided vanilla keychain is invalid

§

InvalidWitnessVersion

Invalid witness version

Fields

§witness_version: String

The invalid witness version

§

MaxFeeExceeded

The maximum fee has been exceeded

Fields

§txid: String

TXID of the transfer having fee issues

§

MinFeeNotMet

The minimum fee is not met

Fields

§txid: String

TXID of the transfer having fee issues

§

MultisigHubService

Multisig hub service error

Fields

§details: String

Error details

§

MultisigCannotMarkOperationProcessed

Cannot mark operation as processed

Fields

§details: String

Error details

§

MultisigCannotRespondToOperation

Cannot respond to operation

Fields

§details: String

Error details

§

MultisigOperationInProgress

Cannot initiate a new operation while another is in progress

§

MultisigOperationNotFound

The requested operation was not found

Fields

§operation_idx: i32

Operation idx

§

MultisigTransferStatusMismatch

Transfer status already set to a different value

§

MultisigUnexpectedData

Received unexpected data from hub

Fields

§details: String

Error details

§

MultisigUserNotCosigner

The user is not a cosigner

§

Network

A network error occurred

Fields

§details: String

Error details

§

NoBurnAmount

Cannot burn an asset with zero amount

§

NoConsignment

No consignment found

§

NoCosignersSupplied

No cosigners supplied

§

NoInflationAmounts

Cannot inflate an asset with unknown o zero amounts

§

NoIssuanceAmounts

Cannot issue an asset without knowing the amounts

§

NoKeysSupplied

No keys supplied

§

NoMaxAllocationsPerUtxo

Cannot allocate assets with zero allocations per UTXO

§

NoSupportedSchemas

Cannot create a wallet with no supported schemas

§

NoValidTransportEndpoint

No valid transport endpoint found

§

Offline

Trying to perform an online operation with offline wallet

§

OnlineNeeded

The Online object is needed to perform this operation

§

OutputBelowDustLimit

Output created is under the dust limit

§

Proxy

Error contacting the RGB proxy

Fields

§details: String

Error details

§

PsbtInspection

Error during PSBT inspection

Fields

§details: String

Error details

§

RecipientIDAlreadyUsed

Provided recipient ID has already been used for another transfer

§

RecipientIDDuplicated

Provided recipient map has duplicated recipient IDs

§

RejectListService

Error contacting the reject list service

Fields

§details: String

Error details

§

RestClientBuild

Error building a rest client

Fields

§details: String

Error details

§

RgbInspection

Error during RGB inspection

Fields

§details: String

Error details

§

TooHighInflationAmounts

The inflation amount exceeds the max possible supply

§

TooHighIssuanceAmounts

Trying to issue too many assets

§

TooManyCosigners

Provided too many cosigners

§

TooManySignaturesInPsbt

PSBT has too many signatures

§

UnknownRgbSchema

The detected RGB schema is unknown

Fields

§schema_id: String

RGB schema ID

§

UnknownTransfer

The detected transfer is unknown

Fields

§txid: String

Transfer TXID

§

UnsupportedBackupVersion

The backup version is not supported

Fields

§version: String

Backup version

§

UnsupportedBurn

The schema doesn’t support burn transitions

Fields

§asset_schema: AssetSchema

Asset schema

§

UnsupportedInflation

The schema doesn’t support inflate transitions

Fields

§asset_schema: AssetSchema

Asset schema

§

UnsupportedLayer1

The given layer 1 is not supported

Fields

§layer_1: String

Layer 1

§

UnsupportedSchema

The given schema is not supported

Fields

§asset_schema: AssetSchema

Asset schema

§

UnsupportedTransportType

The given transport type is not supported

§

UnsupportedWalletManifestVersion

The wallet manifest version is not supported

Fields

§version: String

Wallet manifest version

§

WalletDirAlreadyExists

The specified wallet directory already exists

Fields

§path: String

The directory path

§

WalletSettingMismatch

A wallet setting fixed when the wallet was created has been given a different value

Fields

§setting: String

The setting name

§expected: String

The value the wallet was created with

§provided: String

The value that has been provided

§

WatchOnly

The requested operation cannot be processed by a watch-only wallet

§

WrongPassword

The provided password is incorrect

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Error

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Error

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<BuilderError> for Error

Source§

fn from(e: BuilderError) -> Self

Converts to this type from the input type.
Source§

impl From<CreateWithPersistError<FileStoreError>> for Error

Source§

fn from(e: CreateWithPersistError<FileStoreError>) -> Self

Converts to this type from the input type.
Source§

impl From<DbErr> for Error

Source§

fn from(e: DbErr) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Available on crate features electrum or esplora only.
Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FileStoreError> for Error

Source§

fn from(e: FileStoreError) -> Self

Converts to this type from the input type.
Source§

impl From<LoadWithPersistError<FileStoreError>> for Error

Source§

fn from(e: LoadWithPersistError<FileStoreError>) -> Self

Converts to this type from the input type.
Source§

impl From<PsbtParseError> for Error

Source§

fn from(e: PsbtParseError) -> Self

Converts to this type from the input type.
Source§

impl From<StoreErrorWithDump<ChangeSet>> for Error

Source§

fn from(e: StoreErrorWithDump<ChangeSet>) -> Self

Converts to this type from the input type.
Source§

impl From<TransportParseError> for Error

Source§

fn from(e: TransportParseError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Error

Source§

fn eq(&self, other: &Error) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Error

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,

Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more