项目作者: ChainFront

项目描述 :
Secrets plugin for Hashicorp Vault to manage keys and sign transactions for Bitcoin
高级语言: Go
项目地址: git://github.com/ChainFront/vault-plugin-bitcoin.git
创建时间: 2019-05-02T16:47:47Z
项目社区:https://github.com/ChainFront/vault-plugin-bitcoin

开源协议:Apache License 2.0

下载


Vault Plugin: Bitcoin Secrets Backend

This is a backend secrets plugin to be used with Hashicorp Vault. This plugin manages secret keys for the Bitcoin blockchain platform.

Usage

Assuming you have Hashicorp Vault installed, scripts/dev_start.sh is a helper script to start up Vault in dev mode and mount this plugin.
Vault will be listening on localhost:8200.

Once the plugin is mounted, you can start writing secrets to it.

Log In To Vault

  1. export VAULT_ADDR=http://localhost:8200
  2. vault login

The token is “root” if you’ve used dev_start.sh to start Vault.

Creating an Account

vault write bitcoin/accounts/MyAccountName

This will create a new account called “MyAccountName”.

Viewing an Account

vault read bitcoin/accounts/MyAccountName

Viewing All Account Names

vault list bitcoin/accounts

Creating a Signed Payment Transaction

vault write bitcoin/payments source=MySourceAccountName destination=MyDestinationAccountName amount=35 unsignedTx=01000...

This will return a signed transaction.

Running Tests

  1. make test

Running tests with coverage:

  1. make coverage

License

Copyright (c) 2019 ChainFront LLC

Licensed under the Apache License, Version 2.0.