2021-10-11 23:04:18 -07:00
|
|
|
namespace bdk {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2021-10-14 00:05:50 +05:30
|
|
|
[Error]
|
|
|
|
enum BdkError {
|
|
|
|
"InvalidU32Bytes",
|
|
|
|
"Generic",
|
|
|
|
"ScriptDoesntHaveAddressForm",
|
|
|
|
"NoRecipients",
|
|
|
|
"NoUtxosSelected",
|
|
|
|
"OutputBelowDustLimit",
|
|
|
|
"InsufficientFunds",
|
|
|
|
"BnBTotalTriesExceeded",
|
|
|
|
"BnBNoExactMatch",
|
|
|
|
"UnknownUtxo",
|
|
|
|
"TransactionNotFound",
|
|
|
|
"TransactionConfirmed",
|
|
|
|
"IrreplaceableTransaction",
|
|
|
|
"FeeRateTooLow",
|
|
|
|
"FeeTooLow",
|
|
|
|
"FeeRateUnavailable",
|
|
|
|
"MissingKeyOrigin",
|
|
|
|
"Key",
|
|
|
|
"ChecksumMismatch",
|
|
|
|
"SpendingPolicyRequired",
|
|
|
|
"InvalidPolicyPathError",
|
|
|
|
"Signer",
|
|
|
|
"InvalidNetwork",
|
|
|
|
"InvalidProgressValue",
|
|
|
|
"ProgressUpdateError",
|
|
|
|
"InvalidOutpoint",
|
|
|
|
"Descriptor",
|
|
|
|
"AddressValidator",
|
|
|
|
"Encode",
|
|
|
|
"Miniscript",
|
|
|
|
"Bip32",
|
|
|
|
"Secp256k1",
|
|
|
|
"Json",
|
|
|
|
"Hex",
|
|
|
|
"Psbt",
|
|
|
|
"PsbtParse",
|
|
|
|
"Electrum",
|
|
|
|
"Sled",
|
|
|
|
};
|
|
|
|
|
2021-10-14 04:23:17 +05:30
|
|
|
dictionary SledDbConfiguration {
|
|
|
|
string path;
|
|
|
|
string tree_name;
|
|
|
|
};
|
|
|
|
|
|
|
|
[Enum]
|
|
|
|
interface DatabaseConfig {
|
|
|
|
Memory(string junk);
|
|
|
|
Sled(SledDbConfiguration configuration);
|
|
|
|
};
|
|
|
|
|
2021-10-11 23:04:18 -07:00
|
|
|
interface OfflineWallet {
|
2021-10-14 00:05:50 +05:30
|
|
|
[Throws=BdkError]
|
2021-10-14 04:23:17 +05:30
|
|
|
constructor(string descriptor, DatabaseConfig database_config);
|
2021-10-13 01:45:22 +05:30
|
|
|
string get_new_address();
|
2021-10-14 00:05:50 +05:30
|
|
|
};
|