-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
226 additions
and
168 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { matches, types as T } from "../deps.ts"; | ||
|
||
const { shape, boolean } = matches; | ||
|
||
const matchBitcoindConfig = shape({ | ||
rpc: shape({ | ||
enable: boolean, | ||
}), | ||
}); | ||
|
||
export const dependencies: T.ExpectedExports.dependencies = { | ||
bitcoind: { | ||
// deno-lint-ignore require-await | ||
async check(effects, configInput) { | ||
effects.info("check bitcoind"); | ||
const config = matchBitcoindConfig.unsafeCast(configInput); | ||
if (!config.rpc.enable) { | ||
return { error: "Must have RPC enabled" }; | ||
} | ||
return { result: null }; | ||
}, | ||
// deno-lint-ignore require-await | ||
async autoConfigure(effects, configInput) { | ||
effects.info("autoconfigure bitcoind"); | ||
const config = matchBitcoindConfig.unsafeCast(configInput); | ||
config.rpc.enable = true; | ||
return { result: config }; | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.