Skip to main content

Root Command

The stellar-disbursement-platform is the main entry point for the application. It provides various subcommands to manage the service, database, and other utilities.

Usage

For all the following commands, you can use the --help flag to get more information about the command and its options. For example:

Global Flags

The following flags are available for all commands:

Serve Command

The serve command starts the Stellar Disbursement Platform backend server. This server handles API requests, processes disbursements, and manages tenant operations.

Usage

Flags

TSS Command

The tss command runs the Transaction Submission Service, which is responsible for submitting transactions to the Stellar network.

Usage

Flags

DB Command

The db command provides utilities for database management and migrations. It performs two main functions:
  1. Running database migrations for various schemas (admin, auth, sdp, tss).
  2. Setting up assets and wallets based on the network passphrase.

Usage

Subcommands


DB Admin

The db admin command manages the migrations for the admin schema, which handles multi-tenancy configuration.

Usage

Subcommands

DB Admin Migrate

The migrate command allows you to run migrations up or down. Usage
Subcommands Examples

DB Auth

The db auth command manages the migrations for the authentication schema.

Usage

Flags

Subcommands

DB Auth Migrate

Similar to admin migrate, this command accepts up and down subcommands. Examples

DB SDP

The db sdp command manages the migrations for the SDP (Stellar Disbursement Platform) schema, which contains the core business logic tables.

Usage

Flags

Subcommands

DB SDP Migrate

Similar to admin migrate, this command accepts up and down subcommands. Examples

DB TSS

The db tss command manages the migrations for the TSS (Transaction Submission Service) schema.

Usage

Subcommands

DB TSS Migrate

Similar to admin migrate, this command accepts up and down subcommands. Examples

DB Setup For Network

The db setup-for-network command sets up the assets and wallets registered in the database based on the network passphrase. It inserts or updates the entries of these tables according to the configured Network Passphrase.

Usage

Flags

Example

Auth Command

The auth command provides helpers for authentication management, specifically for adding users to the system.

Usage

Subcommands


Auth Add User

The auth add-user command adds a new user to the system. The email must be unique, and the password must be at least 12 characters long.

Usage

Flags

Example

To add a new user with specific roles and a password:

Channel Accounts Command

The channel-accounts command manages channel accounts used for transaction submission.

Usage

Flags

Subcommands


Channel Accounts Create

The create command creates channel accounts.

Usage

Flags


Channel Accounts Delete

The delete command deletes a specified channel account from storage and on the network.

Usage

Flags


Channel Accounts Ensure

The ensure command ensures that the specified number of channel accounts exist. If they do not exist, it will create them. If more channel accounts exist than specified, it will delete the excess accounts.

Usage

Flags

Example


Channel Accounts Verify

The verify command verifies that all the channel accounts in the database exist on the Stellar network.

Usage

Flags


Channel Accounts View

The view command lists public keys of all channel accounts currently stored in the database.

Usage

Distribution Account Command

The distribution-account command manages a tenant’s distribution accounts.

Usage

Flags

Subcommands


Distribution Account Rotate

The rotate command replaces the Stellar account behind one of a tenant’s distribution accounts, moving its balances to a newly created account. Use --wallet-id to choose which one; when omitted, the tenant’s default distribution account is rotated.

Usage

Flags

Only accounts that are active and use the DISTRIBUTION_ACCOUNT.STELLAR.DB_VAULT account type can be rotated.

Example

To rotate the default distribution account for a specific tenant:
To rotate one specific distribution account:

Distribution Account Rotate Wallet DEK

The rotate-wallet-dek command re-encrypts one distribution account’s existing private key under a fresh data-encryption key, without changing the Stellar account or the configured encryption passphrase. Use it for routine data-encryption-key rotation. If the Stellar signing key may have been exposed, use rotate to replace the account instead.

Usage

Flags

This command makes no changes on the Stellar network; it only re-encrypts stored key material, and identifies the account by its public key. It still requires the parent command’s --distribution-public-key.

Example

To check that an account’s key can be decrypted, without changing anything:

Message Command

The message command provides messenger related commands.

Usage

Flags

Subcommands


Message Send

The send command sends a message to a recipient.

Usage

Flags

Example