forked from payjoin/rust-payjoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Share const error_codes between core modules
Well-known error codes are used in both send and receive modules. Using constants makes it harder for a maintainer to accidentally produce or parse the wrong code.
- Loading branch information
Showing
4 changed files
with
44 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//! Well-known error codes as defined in BIP-78 | ||
//! See: https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki#receivers-well-known-errors | ||
/// The payjoin endpoint is not available for now. | ||
pub const UNAVAILABLE: &str = "unavailable"; | ||
|
||
/// The receiver added some inputs but could not bump the fee of the payjoin proposal. | ||
pub const NOT_ENOUGH_MONEY: &str = "not-enough-money"; | ||
|
||
/// This version of payjoin is not supported. | ||
pub const VERSION_UNSUPPORTED: &str = "version-unsupported"; | ||
|
||
/// The receiver rejected the original PSBT. | ||
pub const ORIGINAL_PSBT_REJECTED: &str = "original-psbt-rejected"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters