Skip to content

fxconfig

The fxconfig command manages Fabric-X configuration transactions, including namespace operations and transaction endorsement/submission workflows.

fxconfig

fxconfig is a command-line tool for managing Fabric-X namespaces and transactions.

Namespaces in Fabric-X define isolated execution environments with their own
endorsement policies. This tool allows you to:
  • Create and update namespaces with custom endorsement policies
  • Query installed namespaces and their configurations
  • Endorse, merge, and submit transactions
  • Manage transaction lifecycle across multiple organizations

Configuration can be provided via:
  • Config file (--config flag or $HOME/.fxconfig/config.yaml, .fxconfig/config.yaml)
  • Environment variables (FXCONFIG_*)

Usage:
  fxconfig [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  info        Display effective configuration
  namespace   Manage Fabric-X namespaces
  tx          Perform transaction operations
  version     Display version information

Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)
  -h, --help            help for fxconfig

Use "fxconfig [command] --help" for more information about a command.

fxconfig info

Display the effective configuration after applying all overrides.

Configuration is loaded and merged in the following order (later sources override earlier):
  1. Default values
  2. User config file ($HOME/.fxconfig/config.yaml)
  3. Project config file (.fxconfig/config.yaml)
  4. Config file (--config flag)
  5. Environment variables (FXCONFIG_*)

Use this command to verify your configuration before executing operations.

Examples:
  # Show current configuration
  fxconfig info

  # Show configuration from specific file
  fxconfig info --config /path/to/config.yaml

  # Show configuration as environment variables
  fxconfig info --format env

Usage:
  fxconfig info [flags]

Flags:
      --format string   Output format (yaml|env) (default "yaml")
  -h, --help            help for info

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)

fxconfig namespace

Manage namespace lifecycle operations.

Namespaces in Fabric-X define isolated execution environments with their own
endorsement policies. Each namespace has:
  • Unique identifier (name)
  • Version number (incremented on updates)
  • Endorsement policy (defines which organizations must sign transactions)

Usage:
  fxconfig namespace [command]

Available Commands:
  create      Create new namespace
  list        List installed Namespaces
  update      Update existing namespace

Flags:
  -h, --help   help for namespace

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)

Use "fxconfig namespace [command] --help" for more information about a command.

fxconfig namespace create

Create a new namespace with an endorsement policy.

The endorsement policy defines which organizations must sign transactions
in this namespace. Policies use MSP identifiers and logical operators.

Policy Syntax:
  • OR('Org1MSP.member')                    - Any member of Org1
  • AND('Org1MSP.member', 'Org2MSP.member') - Both Org1 and Org2
  • OutOf(2, 'Org1MSP.member', 'Org2MSP.member', 'Org3MSP.member') - 2 of 3 orgs

Transaction Lifecycle Flags:
  --endorse  Collect endorsement from local MSP
  --submit   Submit transaction to ordering service
  --wait     Wait for transaction finalization (implies --submit)

Examples:
  # Create namespace with single org policy (save to file)
  fxconfig namespace create hello --policy="OR('Org1MSP.member')" --output=tx.json

  # Create and immediately deploy (endorse + submit + wait)
  fxconfig namespace create hello --policy="OR('Org1MSP.member')" --endorse --submit --wait

  # Multi-org policy requiring both organizations
  fxconfig namespace create payments \
    --policy="AND('Org1MSP.member', 'Org2MSP.member')" \
    --endorse --submit

  # Complex policy with threshold
  fxconfig namespace create voting \
    --policy="OutOf(2, 'Org1MSP.member', 'Org2MSP.member', 'Org3MSP.member')" \
    --output=tx.json

Usage:
  fxconfig namespace create [name] [flags]

Flags:
      --endorse         Endorse transaction with local MSP before saving/submitting
  -h, --help            help for create
      --output string   Output file path (if not specified, writes to stdout)
      --policy string   Endorsement policy (e.g., "OR('Org1MSP.member')" or "AND('Org1MSP.member', 'Org2MSP.member')")
      --submit          Submit transaction to ordering service (requires --endorse)
      --wait            Wait for transaction finalization (implies --submit)

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)

fxconfig namespace list

Query and display all installed namespaces with their configurations.

For each namespace, displays:
  • Name (namespace identifier)
  • Version (current version number)
  • Policy (endorsement policy in hexadecimal format)

Use this command to:
  • Verify namespace deployment
  • Check current version before updates
  • Audit endorsement policies

Examples:
  # List all namespaces
  fxconfig namespace list

  # List with custom config
  fxconfig namespace list --config /path/to/config.yaml

  # List and save output to file
  fxconfig namespace list > namespaces.txt

Usage:
  fxconfig namespace list [flags]

Flags:
  -h, --help   help for list

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)

fxconfig namespace update

Update an existing namespace's endorsement policy.

The --version flag is required to prevent concurrent modification conflicts.
Use 'fxconfig namespace list' to find the current version number.

Version numbers increment with each successful update. If the version you
specify doesn't match the current version, the update will fail.

Examples:
  # Update namespace policy (check version first with 'list')
  fxconfig namespace update hello \
    --policy="OR('Org2MSP.member')" \
    --version=0 \
    --endorse --submit --wait

  # Change from single-org to multi-org policy
  fxconfig namespace update hello \
    --policy="AND('Org1MSP.member', 'Org2MSP.member')" \
    --version=1 \
    --output=tx.json

  # Update and save transaction for multi-org endorsement
  fxconfig namespace update payments \
    --policy="OutOf(2, 'Org1MSP.member', 'Org2MSP.member', 'Org3MSP.member')" \
    --version=2 \
    --output=update_tx.json

Usage:
  fxconfig namespace update [name] [flags]

Flags:
      --endorse         Endorse transaction with local MSP before saving/submitting
  -h, --help            help for update
      --output string   Output file path (if not specified, writes to stdout)
      --policy string   Endorsement policy (e.g., "OR('Org1MSP.member')" or "AND('Org1MSP.member', 'Org2MSP.member')")
      --submit          Submit transaction to ordering service (requires --endorse)
      --version int     Current namespace version (required for updates to prevent conflicts)
      --wait            Wait for transaction finalization (implies --submit)

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)

fxconfig tx

Perform transaction operations such as endorsement, merging, and submission.

Transaction Lifecycle:
  1. Create - Generate transaction (e.g., namespace create/update)
  2. Endorse - Collect signatures from required organizations
  3. Merge - Combine endorsements from multiple organizations
  4. Submit - Send to ordering service for finalization

Multi-Organization Workflow:
  1. Org1 creates transaction: fxconfig namespace create ... --output tx.json
  2. Org1 endorses: fxconfig tx endorse tx.json --output tx_org1.json
  3. Org2 endorses: fxconfig tx endorse tx.json --output tx_org2.json
  4. Merge endorsements: fxconfig tx merge tx_org1.json tx_org2.json --output merged.json
  5. Submit: fxconfig tx submit merged.json --wait

Usage:
  fxconfig tx [command]

Available Commands:
  endorse     Add endorsement signature to transaction
  merge       Merge multiple endorsed transactions
  submit      Submit transaction to ordering service

Flags:
  -h, --help   help for tx

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)

Use "fxconfig tx [command] --help" for more information about a command.

fxconfig tx endorse

Endorse a transaction with the local MSP's signature.

Each organization that must approve a transaction (per the endorsement policy)
needs to endorse it. This command adds the local organization's signature
to the transaction.

The transaction file must contain both the transaction ID and transaction data
in JSON format (as generated by namespace create/update commands).

If the input transaction is already endorsed, the new endorsement will be
appended to the existing endorsements.

Examples:
  # Endorse transaction and save to new file
  fxconfig tx endorse tx.json --output tx_org1.json

  # Endorse and append to stdout (for piping)
  fxconfig tx endorse tx.json > tx_org1.json

  # Endorse with custom config
  fxconfig tx endorse tx.json --config /path/to/org1-config.yaml --output tx_org1.json

Usage:
  fxconfig tx endorse [file] [flags]

Flags:
  -h, --help            help for endorse
      --output string   Output file path (if not specified, writes to stdout)

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)

fxconfig tx merge

Combine endorsements from multiple organizations into a single transaction.

All input transactions must:
  • Have the same transaction ID
  • Contain the same transaction data
  • Have endorsements from different organizations

The merged transaction will contain all endorsement signatures, making it
ready for submission if the endorsement policy is satisfied.

This command is essential for multi-organization workflows where each
organization endorses independently and endorsements must be collected
before submission.

Examples:
  # Merge two endorsed transactions
  fxconfig tx merge tx_org1.json tx_org2.json --output merged_tx.json

  # Merge three organizations' endorsements
  fxconfig tx merge tx_org1.json tx_org2.json tx_org3.json --output merged_tx.json

  # Merge and output to stdout
  fxconfig tx merge tx_org1.json tx_org2.json > merged_tx.json

Usage:
  fxconfig tx merge [tx1.json] [tx2.json] [txN.json...] [flags]

Flags:
  -h, --help            help for merge
      --output string   Output file path (if not specified, writes to stdout)

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)

fxconfig tx submit

Submit an endorsed transaction to the Fabric-X ordering service.

The transaction must have sufficient endorsements to satisfy its endorsement
policy. Use 'fxconfig tx merge' to combine endorsements from multiple
organizations before submission.

Status Codes (with --wait):
  0 - Transaction successfully committed
  1 - Transaction failed (see error message for details)

Examples:
  # Submit transaction (returns immediately)
  fxconfig tx submit merged_tx.json

  # Submit and wait for finalization
  fxconfig tx submit merged_tx.json --wait

  # Submit with custom config
  fxconfig tx submit merged_tx.json --config /path/to/config.yaml --wait

  # Submit and capture status
  if fxconfig tx submit merged_tx.json --wait; then
    echo "Transaction committed successfully"
  else
    echo "Transaction failed"
  fi

Usage:
  fxconfig tx submit [file] [flags]

Flags:
  -h, --help   help for submit
      --wait   Wait for transaction to be finalized and return status code

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)

fxconfig version

Display detailed version information including:
  • fxconfig version
  • Go compiler version
  • Git commit SHA
  • Operating system and architecture

Usage:
  fxconfig version [flags]

Flags:
  -h, --help   help for version

Global Flags:
      --config string   Config file (default is $HOME/.fxconfig/config.yaml)
  • configtxgen generates initial channel configuration artifacts.
  • cryptogen generates development MSP material used by local fxconfig configurations.

This page is generated from the CLI help output. To update it, rebuild the relevant binaries and run scripts/help_docs.sh generate.