bb8 icon indicating copy to clipboard operation
bb8 copied to clipboard

add "new-tx" wrapper command

Open tolitius opened this issue 6 years ago • 0 comments

Every operation creates a transaction header with a source account, sequence, network, etc.. So if a new command such as new-tx is added it may be composed with any other operation:

$ bb new-tx '{"source_account": "foo"}' | xargs \ 
  bb send-payment '{"to": "receiver-address",
                    "amount": "42.0"}' | xargs \
  bb sign '[foo, bar]' | xargs \
  bb submit

a "source_account" for a payment operation in this case above will be set by the STELLAR_ACCOUNT_SEED. In case its a channel account, it would look like:

$ bb new-tx | xargs \ 
  bb send-payment '{"source_account": "bar",
                    "to": "receiver-address",
                    "amount": "42.0"}' | xargs \
  bb sign '[foo, bar]' | xargs \
  bb submit

in this case foo will be used from STELLAR_ACCOUNT_SEED as a channel account seed. ( more details in #2 )

tolitius avatar Feb 28 '18 16:02 tolitius