{"id":37776882,"url":"https://github.com/crypto-com/ibc-solo-machine","last_synced_at":"2026-01-16T15:00:52.363Z","repository":{"id":40268155,"uuid":"355912018","full_name":"crypto-com/ibc-solo-machine","owner":"crypto-com","description":"This repository implements IBC solo machine which can be used to interface with other machines and replicated ledgers which speak IBC.","archived":false,"fork":false,"pushed_at":"2025-06-20T05:47:20.000Z","size":520,"stargazers_count":43,"open_issues_count":7,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-20T06:32:25.365Z","etag":null,"topics":["cosmos","ibc","solo-machine","tendermint"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crypto-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-08T13:09:51.000Z","updated_at":"2025-06-20T05:47:24.000Z","dependencies_parsed_at":"2024-02-23T03:25:36.145Z","dependency_job_id":"ce8e92ac-234d-4c47-9a34-f08bfc0f023e","html_url":"https://github.com/crypto-com/ibc-solo-machine","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/crypto-com/ibc-solo-machine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-com%2Fibc-solo-machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-com%2Fibc-solo-machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-com%2Fibc-solo-machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-com%2Fibc-solo-machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crypto-com","download_url":"https://codeload.github.com/crypto-com/ibc-solo-machine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-com%2Fibc-solo-machine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cosmos","ibc","solo-machine","tendermint"],"created_at":"2026-01-16T15:00:36.094Z","updated_at":"2026-01-16T15:00:52.316Z","avatar_url":"https://github.com/crypto-com.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IBC Solo Machine\n\nThis repository implements IBC solo machine which can be used to interface with other machines \u0026 replicated ledgers\nwhich speak IBC.\n\n## Building\n\nTo build `solo-machine` binary, run: `cargo build  --package solo-machine`.\n\n## Usage\n\nSolo machine CLI has following sub-commands:\n\n```\nsolo-machine-cli 0.1.0\nA command line interface for IBC solo machine\n\nUSAGE:\n    solo-machine [FLAGS] [OPTIONS] \u003cSUBCOMMAND\u003e\n\nFLAGS:\n    -h, --help        Prints help information\n        --no-style    Does not print styled/colored statements\n    -V, --version     Prints version information\n\nOPTIONS:\n        --db-uri \u003cdb-uri\u003e         Database connection string [example: `sqlite://solo-machine.db`] [env: SOLO_DB_URI]\n        --handler \u003chandler\u003e...    Register an event handler. Multiple event handlers can be registered and they're\n                                  executed in order they're provided in CLI. Also, if an event handler returns an error\n                                  when handling a message, all the future event handlers will not get executed\n        --signer \u003csigner\u003e         Register a signer (path to signer's `*.so` file) [env: SOLO_SIGNER]\n\nSUBCOMMANDS:\n    chain             Chain operations (managing chain state and metadata)\n    gen-completion    Generate completion scripts for solo-machine-cli\n    help              Prints this message or the help of the given subcommand(s)\n    ibc               Used to connect, mint tokens and burn tokens on IBC enabled chain\n    init              Initializes database for solo machine\n    start             Starts gRPC server for solo machine\n```\n\n- `chain` sub-command is used to manage an IBC enabled chain's state and metadata on solo machine, for example, its\n  gRPC address, fee configuration, etc.\n- `ibc` sub-command is used to broadcast IBC related transactions to cosmos SDK chain. This includes `connect`, `mint`\n  (mint tokens on cosmos SDK chain) and `burn` (burn tokens on cosmos SDK chain).\n\nOther than these three core commands,\n\n- `init` is used to initialize SQLite database at given location.\n- `start` is used to start a gRPC server which has endpoints for all the above three core functions.\n- `gen-completion` generates autocompletion scripts for different shells.\n\nIn addition to these sub-commands, solo machine also has some configuration options which can either be provided using\ncommand line options, environment variables or in a `.env` file.\n\n### Connecting to a Cosmos SDK chain\n\nTo connect to a cosmos SDK chain, we first need an account on cosmos SDK chain with enough tokens so that it can pay\ntransaction fee for IBC transactions.\n\n1. Create a `.env` file with `SOLO_DB_URI`, `SOLO_SIGNER` and all the values needed by signer provided. For example,\n   `MnemonicSigner` expects `SOLO_MNEMONIC`, `SOLO_HD_PATH`, `SOLO_ACCOUNT_PREFIX` and `SOLO_ADDRESS_ALGO` environment\n   variables.\n2. Run `solo-machine init` to initialize SQLite database.\n3. Add cosmos SDK chain details using `solo-machine chain add`. This command takes following options which can either be\n   provided using command line options, environment variables or a `.env` file. The two most important things are\n   `trusted-height` and `trusted-hash` which can be fetched from:\n   `curl http://\u003cip\u003e:\u003cport\u003e/block?height=\u003ctrusted-height\u003e`.\n\n   ```\n   solo-machine-chain-add 0.1.0\n   Adds metadata for new IBC enabled chain\n   \n   USAGE:\n       solo-machine chain add [OPTIONS] --trusted-hash \u003ctrusted-hash\u003e --trusted-height \u003ctrusted-height\u003e\n   \n   FLAGS:\n       -h, --help       Prints help information\n       -V, --version    Prints version information\n   \n   OPTIONS:\n           --diversifier \u003cdiversifier\u003e            Diversifier used in transactions for chain [env: SOLO_DIVERSIFIER]\n                                                  [default: solo-machine-diversifier]\n           --fee-amount \u003cfee-amount\u003e              Fee amount [env: SOLO_FEE_AMOUNT]  [default: 1000]\n           --fee-denom \u003cfee-denom\u003e                Fee denom [env: SOLO_FEE_DENOM]  [default: stake]\n           --gas-limit \u003cgas-limit\u003e                Gas limit [env: SOLO_GAS_LIMIT]  [default: 300000]\n           --grpc-addr \u003cgrpc-addr\u003e                gRPC address of IBC enabled chain [env: SOLO_GRPC_ADDRESS]  [default:\n                                                  http://0.0.0.0:9090]\n           --max-clock-drift \u003cmax-clock-drift\u003e    Maximum clock drift [env: SOLO_MAX_CLOCK_DRIFT]  [default: 3 sec]\n           --port-id \u003cport-id\u003e                    Port ID used to create connection with chain [env: SOLO_PORT_ID]\n                                                  [default: transfer]\n           --rpc-addr \u003crpc-addr\u003e                  RPC address of IBC enabled chain [env: SOLO_RPC_ADDRESS]  [default:\n                                                  http://0.0.0.0:26657]\n           --rpc-timeout \u003crpc-timeout\u003e            RPC timeout duration [env: SOLO_RPC_TIMEOUT]  [default: 60 sec]\n           --trust-level \u003ctrust-level\u003e            Trust level (e.g. 1/3) [env: SOLO_TRUST_LEVEL]  [default: 1/3]\n           --trusted-hash \u003ctrusted-hash\u003e          Block hash at trusted height of the chain [env: SOLO_TRUSTED_HASH]\n           --trusted-height \u003ctrusted-height\u003e      Trusted height of the chain [env: SOLO_TRUSTED_HEIGHT]\n           --trusting-period \u003ctrusting-period\u003e    Trusting period [env: SOLO_TRUSTING_PERIOD]  [default: 14 days]\n   ```\n\n4. Establish IBC connection with the chain using `solo-machine ibc connect \u003cchain-id\u003e`.\n5. Mint tokens on cosmos SDK chain using `solo-machine ibc mint \u003cchain-id\u003e \u003camount\u003e \u003cdenom\u003e`.\n6. Burn some tokens on cosmos SDK chain using `solo-machine ibc burn \u003cchain-id\u003e \u003camount\u003e \u003cdenom\u003e`. Note that the\n   `denom` in `burn` command will be the denom on solo machine and not the IBC denom (`ibc/XXX`).\n\n### Connecting to Ethermint\n\nIf you wish to connect to ethermint using solo machine, you'll have to enable `ethermint` feature when building:\n`cargo build --package solo-machine --features ethermint` and also provide `SOLO_ADDRESS_ALGO=\"eth-secp256k1\"` in `.env`\nfile if you're using native `eth-secp256k1` addresses on ethermint.\n\n### Use PostgreSQL instead of SQLite\n\nIf you wish to use PostgreSQL instead of SQLite, you'll have to enable `postgres` feature when building:\n`cargo build --features postgres` and provide `SOLO_DB_URI` in below format:\n\n```\npostgresql://[user[:password]@][host][:port][/dbname]\n```\n\n### Signers\n\nSolo machine supports adding a transaction signer at runtime using dynamic libraries (`dylib`). To create a new signer,\nthe dynamic library should expose a function named `register_signer` with signature:\n\n```rust\nfn register_signer(registrar: \u0026mut dyn SignerRegistrar) -\u003e anyhow::Result\u003c()\u003e\n```\n\nThe implementation of `register_signer` can call `registrar.register()` and pass a `Arc`ed object of `Signer`. A sample\nsigner can be found [here](signers/mnemonic-signer) and can be used as a template to develop more complex signers.\n\nNote that in `Cargo.toml`, we have to add following lines to make it a dynamic library.\n\n```toml\n[lib]\ncrate-type = [\"dylib\"]\n```\n\nOnce implemented, the library can be compiled to `*.so` file and supplied to solo machine using `--signer` CLI option or\n`SOLO_SIGNER` environment variable.\n\nFor example,\n\n```\nsolo-machine --signer=\"\u003cpath-to-dylib-.so-file\u003e\" ibc \u003cchain-id\u003e mint 100 gld\n```\n\n### Event hooks\n\nSolo machine supports adding event hooks at runtime using dynamic libraries (`dylib`). To create a new event hook, the\ndynamic library should expose a function named `register_handler` with signature:\n\n```rust\nfn register_handler(registrar: \u0026mut dyn HandlerRegistrar)\n```\n\nThe implementation of `register_handler` can call `registrar.register()` and pass a `Box`ed object of `EventHandler`. A\nsample event hook can be found [here](event-hooks/stdout-logger) and can be used as a template to develop more complex\nevent hooks.\n\nNote that in `Cargo.toml`, we have to add following lines to make it a dynamic library.\n\n```toml\n[lib]\ncrate-type = [\"dylib\"]\n```\n\nOnce implemented, the library can be compiled to `*.so` file and supplied to solo machine using `--handler` CLI option.\n\nFor example,\n\n```\nsolo-machine --handler=\"\u003cpath-to-dylib-.so-file\u003e\" ibc \u003cchain-id\u003e mint 100 gld\n```\n\nAll the events that can be generated by solo machine can be found [here](solo-machine-core/src/event.rs).\n\n## License\n\nLicensed under Apache License, Version 2.0 ([LICENSE](LICENSE)).\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as\ndefined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrypto-com%2Fibc-solo-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrypto-com%2Fibc-solo-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrypto-com%2Fibc-solo-machine/lists"}