Command Line Interface (CLI)

After you have installed, type swap to verify that it worked:

$ swap
Usage: swap [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --version  Show Shuttle version and exit.
  -h, --help     Show this message and exit.

Commands:
  bitcoin  Select Bitcoin provider.
  bytom    Select Bytom provider.
  vapor    Select Vapor provider.

swap

swap [OPTIONS] COMMAND [ARGS]...

Options

-v, --version

Show Swap version and exit.

bitcoin

Select Bitcoin provider.

swap bitcoin [OPTIONS] COMMAND [ARGS]...

claim

Select Bitcoin Claim transaction builder.

swap bitcoin claim [OPTIONS]

Options

-a, --address <address>

Required Set Bitcoin recipient address.

-ti, --transaction-id <transaction_id>

Required Set Bitcoin funded transaction id/hash.

-am, --amount <amount>

Required Set Bitcoin amount (SATOSHI).

-n, --network <network>

Set Bitcoin network.

Default

mainnet

-v, --version <version>

Set Bitcoin transaction version.

Default

2

decode

Select Bitcoin transaction raw decoder.

swap bitcoin decode [OPTIONS]

Options

-tr, --transaction-raw <transaction_raw>

Required Set Bitcoin transaction raw.

-i, --indent <indent>

Set json indent.

Default

4

-o, --offline <offline>

Set Offline decode transaction raw.

Default

True

fund

Select Bitcoin Fund transaction builder.

swap bitcoin fund [OPTIONS]

Options

-a, --address <address>

Required Set Bitcoin sender address.

-ha, --htlc-address <htlc_address>

Required Set Bitcoin Hash Time Lock Contract (HTLC) address.

-am, --amount <amount>

Required Set Bitcoin amount (SATOSHI).

-n, --network <network>

Set Bitcoin network.

Default

mainnet

-v, --version <version>

Set Bitcoin transaction version.

Default

2

htlc

Select Bitcoin Hash Time Lock Contract (HTLC) builder.

swap bitcoin htlc [OPTIONS]

Options

-sh, --secret-hash <secret_hash>

Required Set secret 256 hash.

-ra, --recipient-address <recipient_address>

Required Set Bitcoin recipient address.

-sa, --sender-address <sender_address>

Required Set Bitcoin sender address.

-s, --sequence <sequence>

Set Bitcoin sequence/expiration block.

Default

1000

-n, --network <network>

Set Bitcoin network.

Default

mainnet

refund

Select Bitcoin Refund transaction builder.

swap bitcoin refund [OPTIONS]

Options

-a, --address <address>

Required Set Bitcoin sender address.

-ti, --transaction-id <transaction_id>

Required Set Bitcoin funded transaction id/hash.

-am, --amount <amount>

Required Set Bitcoin amount (SATOSHI).

-n, --network <network>

Set Bitcoin network.

Default

mainnet

-v, --version <version>

Set Bitcoin transaction version.

Default

2

sign

Select Bitcoin transaction raw signer.

swap bitcoin sign [OPTIONS]

Options

-rxk, --root-xprivate-key <root_xprivate_key>

Required Set Bitcoin root xprivate key.

-tr, --transaction-raw <transaction_raw>

Required Set Bitcoin unsigned transaction raw.

-b, --bytecode <bytecode>

Set Bitcoin witness HTLC bytecode. [default: None]

-sk, --secret-key <secret_key>

Set secret key. [default: None]

-s, --sequence <sequence>

Set Bitcoin sequence/expiration block.

Default

1000

-ac, --account <account>

Set Bitcoin derivation from account.

Default

1

-ch, --change <change>

Set Bitcoin derivation from change.

Default

False

-ad, --address <address>

Set Bitcoin derivation from address.

Default

1

-p, --path <path>

Set Bitcoin derivation from path. [default: None]

-v, --version <version>

Set Bitcoin transaction version.

Default

2

submit

Select Bitcoin transaction raw submitter.

swap bitcoin submit [OPTIONS]

Options

-tr, --transaction-raw <transaction_raw>

Required Set signed Bitcoin transaction raw.

bytom

Select Bytom provider.

swap bytom [OPTIONS] COMMAND [ARGS]...

claim

Select Bytom Claim transaction builder.

swap bytom claim [OPTIONS]

Options

-a, --address <address>

Required Set Bytom recipient address.

-ti, --transaction-id <transaction_id>

Required Set Bytom funded transaction id/hash.

-am, --amount <amount>

Required Set Bytom amount (NEU).

-as, --asset <asset>

Set Bytom asset id.

Default

ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

-n, --network <network>

Set Bitcoin network.

Default

mainnet

decode

Select Bytom transaction raw decoder.

swap bytom decode [OPTIONS]

Options

-tr, --transaction-raw <transaction_raw>

Required Set Bytom transaction raw.

-i, --indent <indent>

Set json indent.

Default

4

fund

Select Bytom Fund transaction builder.

swap bytom fund [OPTIONS]

Options

-a, --address <address>

Required Set Bytom sender address.

-ha, --htlc-address <htlc_address>

Required Set Bytom Hash Time Lock Contract (HTLC) address.

-am, --amount <amount>

Required Set Bytom amount (NEU).

-as, --asset <asset>

Set Bytom asset id.

Default

ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

-n, --network <network>

Set Bitcoin network.

Default

mainnet

htlc

Select Bytom Hash Time Lock Contract (HTLC) builder.

swap bytom htlc [OPTIONS]

Options

-sh, --secret-hash <secret_hash>

Required Set secret 256 hash.

-rpk, --recipient-public-key <recipient_public_key>

Required Set Bytom recipient public key.

-spk, --sender-public-key <sender_public_key>

Required Set Bytom sender public key.

-s, --sequence <sequence>

Set Bytom sequence/expiration block.

Default

1000

-n, --network <network>

Set Bytom network.

Default

mainnet

refund

Select Bytom Refund transaction builder.

swap bytom refund [OPTIONS]

Options

-a, --address <address>

Required Set Bytom sender address.

-ti, --transaction-id <transaction_id>

Required Set Bytom funded transaction id/hash.

-am, --amount <amount>

Required Set Bytom amount (NEU).

-as, --asset <asset>

Set Bytom asset id.

Default

ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

-n, --network <network>

Set Bitcoin network.

Default

mainnet

sign

Select Bytom transaction raw signer.

swap bytom sign [OPTIONS]

Options

-xk, --xprivate-key <xprivate_key>

Required Set Bytom xprivate key.

-tr, --transaction-raw <transaction_raw>

Required Set Bytom unsigned transaction raw.

-b, --bytecode <bytecode>

Set Bytom witness HTLC bytecode. [default: None]

-sk, --secret-key <secret_key>

Set secret key. [default: None]

-ac, --account <account>

Set Bytom derivation from account.

Default

1

-ch, --change <change>

Set Bytom derivation from change.

Default

False

-ad, --address <address>

Set Bytom derivation from address.

Default

1

-p, --path <path>

Set Bytom derivation from path. [default: None]

-i, --indexes <indexes>

Set Bytom derivation from indexes. [default: None]

submit

Select Bytom transaction raw submitter.

swap bytom submit [OPTIONS]

Options

-tr, --transaction-raw <transaction_raw>

Required Set signed Bytom transaction raw.

vapor

Select Vapor provider.

swap vapor [OPTIONS] COMMAND [ARGS]...

claim

Select Vapor Claim transaction builder.

swap vapor claim [OPTIONS]

Options

-a, --address <address>

Required Set Vapor recipient address.

-ti, --transaction-id <transaction_id>

Required Set Vapor funded transaction id/hash.

-am, --amount <amount>

Required Set Vapor amount (NEU).

-as, --asset <asset>

Set Vapor asset id.

Default

ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

-n, --network <network>

Set Bitcoin network.

Default

mainnet

decode

Select Vapor transaction raw decoder.

swap vapor decode [OPTIONS]

Options

-tr, --transaction-raw <transaction_raw>

Required Set Vapor transaction raw.

-i, --indent <indent>

Set json indent.

Default

4

fund

Select Vapor Fund transaction builder.

swap vapor fund [OPTIONS]

Options

-a, --address <address>

Required Set Vapor sender address.

-ha, --htlc-address <htlc_address>

Required Set Vapor Hash Time Lock Contract (HTLC) address.

-am, --amount <amount>

Required Set Vapor amount (NEU).

-as, --asset <asset>

Set Vapor asset id.

Default

ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

-n, --network <network>

Set Bitcoin network.

Default

mainnet

htlc

Select Vapor Hash Time Lock Contract (HTLC) builder.

swap vapor htlc [OPTIONS]

Options

-sh, --secret-hash <secret_hash>

Required Set secret 256 hash.

-rpk, --recipient-public-key <recipient_public_key>

Required Set Vapor recipient public key.

-spk, --sender-public-key <sender_public_key>

Required Set Vapor sender public key.

-s, --sequence <sequence>

Set Vapor sequence/expiration block.

Default

1000

-n, --network <network>

Set Vapor network.

Default

mainnet

refund

Select Vapor Refund transaction builder.

swap vapor refund [OPTIONS]

Options

-a, --address <address>

Required Set Vapor sender address.

-ti, --transaction-id <transaction_id>

Required Set Vapor funded transaction id/hash.

-am, --amount <amount>

Required Set Vapor amount (NEU).

-as, --asset <asset>

Set Vapor asset id.

Default

ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

-n, --network <network>

Set Bitcoin network.

Default

mainnet

sign

Select Vapor transaction raw signer.

swap vapor sign [OPTIONS]

Options

-xk, --xprivate-key <xprivate_key>

Required Set Vapor xprivate key.

-tr, --transaction-raw <transaction_raw>

Required Set Vapor unsigned transaction raw.

-b, --bytecode <bytecode>

Set Vapor witness HTLC bytecode. [default: None]

-sk, --secret-key <secret_key>

Set secret key. [default: None]

-ac, --account <account>

Set Vapor derivation from account.

Default

1

-ch, --change <change>

Set Vapor derivation from change.

Default

False

-ad, --address <address>

Set Vapor derivation from address.

Default

1

-p, --path <path>

Set Vapor derivation from path. [default: None]

-i, --indexes <indexes>

Set Vapor derivation from indexes. [default: None]

submit

Select Vapor transaction raw submitter.

swap vapor submit [OPTIONS]

Options

-tr, --transaction-raw <transaction_raw>

Required Set signed Vapor transaction raw.