vault-plugin-stellar

command module
v0.0.0-...-55a3c00 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

README

Vault Plugin: Stellar Secrets Backend

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

Usage

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

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

Log In To Vault
export VAULT_ADDR=http://192.168.50.4:8200
vault login

The token is "root" if you've used dev.sh to start Vault.

Creating an Account

vault write stellar/accounts/MyAccountName xlm_balance=50

This will create a new account called "MyAccountName". The XLM balance is just a placeholder for now, it doesn't actually do anything since we're running on the Stellar testnet.

Viewing an Account

vault read stellar/accounts/MyAccountName

Viewing All Account Names

vault list stellar/accounts

Creating a Signed Payment Transaction

vault write stellar/payments source=MySourceAccountName destination=MyDestinationAccountName amount=35

This will return a signed transaction with a payment operation to send 35 XLM from MySourceAccountName to MyDestinationAccountName.

Creating a Signed Payment Transaction Using a Payment Channel

vault write stellar/payments source=MySourceAccountName destination=MyDestinationAccountName paymentChannel=MyPaymentChannelAccountName amount=35

This will return a signed transaction with a payment operation to send 35 XLM from MySourceAccountName to MyDestinationAccountName. The account MyPaymentChannelAccountName will be used for sequence numbers, and will be added as a signer to the transaction.

Running Tests

cd stellar
go test

License

Copyright (c) 2018-2019 ChainFront LLC

Licensed under the Apache License, Version 2.0.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL