{"id":13566342,"url":"https://github.com/ordinals/ord","last_synced_at":"2025-05-14T07:05:40.337Z","repository":{"id":38212529,"uuid":"437485701","full_name":"ordinals/ord","owner":"ordinals","description":"👁‍🗨 Rare and exotic sats","archived":false,"fork":false,"pushed_at":"2025-04-30T22:24:50.000Z","size":315131,"stargazers_count":3904,"open_issues_count":423,"forks_count":1441,"subscribers_count":140,"default_branch":"master","last_synced_at":"2025-05-07T06:19:57.001Z","etag":null,"topics":["art","bitcoin","rust"],"latest_commit_sha":null,"homepage":"https://ordinals.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ordinals.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING","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-12-12T07:56:11.000Z","updated_at":"2025-05-05T03:50:09.000Z","dependencies_parsed_at":"2023-10-04T03:28:27.772Z","dependency_job_id":"7ab65dea-a82b-456a-b234-bd6c605d2df5","html_url":"https://github.com/ordinals/ord","commit_stats":{"total_commits":1413,"total_committers":124,"mean_commits":11.39516129032258,"dds":0.4118895966029724,"last_synced_commit":"a861cdd7d7326ef75e2e0c3a7b9112274d327ec9"},"previous_names":["casey/ord"],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ordinals%2Ford","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ordinals%2Ford/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ordinals%2Ford/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ordinals%2Ford/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ordinals","download_url":"https://codeload.github.com/ordinals/ord/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092648,"owners_count":22013290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["art","bitcoin","rust"],"created_at":"2024-08-01T13:02:07.534Z","updated_at":"2025-05-14T07:05:40.297Z","avatar_url":"https://github.com/ordinals.png","language":"Rust","funding_links":[],"categories":["Rust","📊 Data \u0026 Analytics"],"sub_categories":[],"readme":"\u003ch1 align=center\u003e\u003ccode\u003eord\u003c/code\u003e\u003c/h1\u003e\n\n\u003cdiv align=center\u003e\n  \u003ca href=https://crates.io/crates/ord\u003e\n    \u003cimg src=https://img.shields.io/crates/v/ord.svg alt=\"crates.io version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=https://github.com/ordinals/ord/actions/workflows/ci.yaml\u003e\n    \u003cimg src=https://github.com/ordinals/ord/actions/workflows/ci.yaml/badge.svg alt=\"build status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=https://github.com/ordinals/ord/releases\u003e\n    \u003cimg src=https://img.shields.io/github/downloads/ordinals/ord/total.svg alt=downloads\u003e\n  \u003c/a\u003e\n  \u003ca href=https://discord.gg/ordinals\u003e\n    \u003cimg src=https://img.shields.io/discord/987504378242007100?logo=discord alt=\"chat on discord\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n`ord` is an index, block explorer, and command-line wallet. It is experimental\nsoftware with no warranty. See [LICENSE](LICENSE) for more details.\n\nOrdinal theory imbues satoshis with numismatic value, allowing them to\nbe collected and traded as curios.\n\nOrdinal numbers are serial numbers for satoshis, assigned in the order in which\nthey are mined, and preserved across transactions.\n\nSee [the docs](https://docs.ordinals.com) for documentation and guides.\n\nSee [the BIP](bip.mediawiki) for a technical description of the assignment and\ntransfer algorithm.\n\nSee [the project board](https://github.com/orgs/ordinals/projects/1) for\ncurrently prioritized issues.\n\nJoin [the Discord server](https://discord.gg/87cjuz4FYg) to chat with fellow\nordinal degenerates.\n\nDonate\n------\n\nOrdinals is open-source and community funded. The current lead maintainer of\n`ord` is [raphjaph](https://github.com/raphjaph/). Raph's work on `ord` is\nentirely funded by donations. If you can, please consider donating!\n\nThe donation address is\n[bc1qguzk63exy7h5uygg8m2tcenca094a8t464jfyvrmr0s6wkt74wls3zr5m3](https://mempool.space/address/bc1qguzk63exy7h5uygg8m2tcenca094a8t464jfyvrmr0s6wkt74wls3zr5m3).\n\nThis address is 2 of 4 multisig wallet with keys held by\n[raphjaph](https://twitter.com/raphjaph),\n[erin](https://twitter.com/realizingerin),\n[rodarmor](https://twitter.com/rodarmor), and\n[ordinally](https://twitter.com/veryordinally).\n\nBitcoin received will go towards funding maintenance and development of `ord`,\nas well as hosting costs for [ordinals.com](https://ordinals.com).\n\nThank you for donating!\n\nWallet\n------\n\n`ord` relies on Bitcoin Core for private key management and transaction signing.\nThis has a number of implications that you must understand in order to use\n`ord` wallet commands safely:\n\n- Bitcoin Core is not aware of inscriptions and does not perform sat\n  control. Using `bitcoin-cli` commands and RPC calls with `ord` wallets may\n  lead to loss of inscriptions.\n\n- `ord wallet` commands automatically load the `ord` wallet given by the\n  `--name` option, which defaults to 'ord'. Keep in mind that after running\n  an `ord wallet` command, an `ord` wallet may be loaded.\n\n- Because `ord` has access to your Bitcoin Core wallets, `ord` should not be\n  used with wallets that contain a material amount of funds. Keep ordinal and\n  cardinal wallets segregated.\n\nSecurity\n--------\n\nThe `ord server` explorer hosts untrusted HTML and JavaScript. This creates\npotential security vulnerabilities, including cross-site scripting and spoofing\nattacks. You are solely responsible for understanding and mitigating these\nattacks. See the [documentation](docs/src/security.md) for more details.\n\nInstallation\n------------\n\n`ord` is written in Rust and can be built from\n[source](https://github.com/ordinals/ord). Pre-built binaries are available on the\n[releases page](https://github.com/ordinals/ord/releases).\n\nYou can install the latest pre-built binary from the command line with:\n\n```sh\ncurl --proto '=https' --tlsv1.2 -fsLS https://ordinals.com/install.sh | bash -s\n```\n\nOnce `ord` is installed, you should be able to run `ord --version` on the\ncommand line.\n\nBuilding\n--------\n\nOn Linux, `ord` requires `libssl-dev` when building from source.\n\nOn Debian-derived Linux distributions, including Ubuntu:\n\n```\nsudo apt-get install pkg-config libssl-dev build-essential\n```\n\nOn Red Hat-derived Linux distributions:\n\n```\nyum install -y pkgconfig openssl-devel\nyum groupinstall \"Development Tools\"\n```\n\nYou'll also need Rust:\n\n```\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\nClone the `ord` repo:\n\n```\ngit clone https://github.com/ordinals/ord.git\ncd ord\n```\n\nTo build a specific version of `ord`, first checkout that version:\n\n```\ngit checkout \u003cVERSION\u003e\n```\n\nAnd finally to actually build `ord`:\n\n```\ncargo build --release\n```\n\nOnce built, the `ord` binary can be found at `./target/release/ord`.\n\n`ord` requires `rustc` version 1.79.0 or later. Run `rustc --version` to ensure\nyou have this version. Run `rustup update` to get the latest stable release.\n\n### Docker\n\nA Docker image can be built with:\n\n```\ndocker build -t ordinals/ord .\n```\n\n### Homebrew\n\n`ord` is available in [Homebrew](https://brew.sh/):\n\n```\nbrew install ord\n```\n\n### Debian Package\n\nTo build a `.deb` package:\n\n```\ncargo install cargo-deb\ncargo deb\n```\n\nContributing\n------------\n\nIf you wish to contribute there are a couple things that are helpful to know. We\nput a lot of emphasis on proper testing in the code base, with three broad\ncategories of tests: unit, integration and fuzz. Unit tests can usually be found at\nthe bottom of a file in a mod block called `tests`. If you add or modify a\nfunction please also add a corresponding test. Integration tests try to test\nend-to-end functionality by executing a subcommand of the binary. Those can be\nfound in the [tests](tests) directory. We don't have a lot of fuzzing but the\nbasic structure of how we do it can be found in the [fuzz](fuzz) directory.\n\nWe strongly recommend installing [just](https://github.com/casey/just) to make\nrunning the tests easier. To run our CI test suite you would do:\n\n```\njust ci\n```\n\nThis corresponds to the commands:\n\n```\ncargo fmt -- --check\ncargo test --all\ncargo test --all -- --ignored\n```\n\nHave a look at the [justfile](justfile) to see some more helpful recipes\n(commands). Here are a couple more good ones:\n\n```\njust fmt\njust fuzz\njust doc\njust watch ltest --all\n```\n\nIf the tests are failing or hanging, you might need to increase the maximum\nnumber of open files by running `ulimit -n 1024` in your shell before you run\nthe tests, or in your shell configuration.\n\nWe also try to follow a TDD (Test-Driven-Development) approach, which means we\nuse tests as a way to get visibility into the code. Tests have to run fast for that\nreason so that the feedback loop between making a change, running the test and\nseeing the result is small. To facilitate that we created a mocked Bitcoin Core\ninstance in [mockcore](./crates/mockcore)\n\nSyncing\n-------\n\n`ord` requires a synced `bitcoind` node with `-txindex` to build the index of\nsatoshi locations. `ord` communicates with `bitcoind` via RPC.\n\nIf `bitcoind` is run locally by the same user, without additional\nconfiguration, `ord` should find it automatically by reading the `.cookie` file\nfrom `bitcoind`'s datadir, and connecting using the default RPC port.\n\nIf `bitcoind` is not on mainnet, is not run by the same user, has a non-default\ndatadir, or a non-default port, you'll need to pass additional flags to `ord`.\nSee `ord --help` for details.\n\n`bitcoind` RPC Authentication\n-----------------------------\n\n`ord` makes RPC calls to `bitcoind`, which usually requires a username and\npassword.\n\nBy default, `ord` looks a username and password in the cookie file created by\n`bitcoind`.\n\nThe cookie file path can be configured using `--cookie-file`:\n\n```\nord --cookie-file /path/to/cookie/file server\n```\n\nAlternatively, `ord` can be supplied with a username and password on the\ncommand line:\n\n```\nord --bitcoin-rpc-username foo --bitcoin-rpc-password bar server\n```\n\nUsing environment variables:\n\n```\nexport ORD_BITCOIN_RPC_USERNAME=foo\nexport ORD_BITCOIN_RPC_PASSWORD=bar\nord server\n```\n\nOr in the config file:\n\n```yaml\nbitcoin_rpc_username: foo\nbitcoin_rpc_password: bar\n```\n\nLogging\n--------\n\n`ord` uses [env_logger](https://docs.rs/env_logger/latest/env_logger/). Set the\n`RUST_LOG` environment variable in order to turn on logging. For example, run\nthe server and show `info`-level log messages and above:\n\n```\n$ RUST_LOG=info cargo run server\n```\n\nSet the `RUST_BACKTRACE` environment variable in order to turn on full rust\nbacktrace. For example, run the server and turn on debugging and full backtrace:\n\n```\n$ RUST_BACKTRACE=1 RUST_LOG=debug ord server\n```\n\nNew Releases\n------------\n\nRelease commit messages use the following template:\n\n```\nRelease x.y.z\n\n- Bump version: x.y.z → x.y.z\n- Update changelog\n- Update changelog contributor credits\n- Update dependencies\n```\n\nTranslations\n------------\n\nTo translate [the docs](https://docs.ordinals.com) we use\n[mdBook i18n helper](https://github.com/google/mdbook-i18n-helpers).\n\nSee\n[mdbook-i18n-helpers usage guide](https://github.com/google/mdbook-i18n-helpers/blob/main/i18n-helpers/USAGE.md)\nfor help.\n\nAdding a new translations is somewhat involved, so feel free to start\ntranslation and open a pull request, even if your translation is incomplete.\n\nTake a look at\n[this commit](https://github.com/ordinals/ord/commit/329f31bf6dac207dad001507dd6f18c87fdef355)\nfor an example of adding a new translation. A maintainer will help you integrate it\ninto our build system.\n\nTo start a new translation:\n\n1. Install `mdbook`, `mdbook-i18n-helpers`, and `mdbook-linkcheck`:\n\n   ```\n   cargo install mdbook mdbook-i18n-helpers mdbook-linkcheck\n   ```\n\n2. Generate a new `pot` file named `messages.pot`:\n\n   ```\n   MDBOOK_OUTPUT='{\"xgettext\": {\"pot-file\": \"messages.pot\"}}'\n   mdbook build -d po\n   ```\n\n3. Run `msgmerge` on `XX.po` where `XX` is the two-letter\n   [ISO-639](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code for\n   the language you are translating into. This will update the `po` file with\n   the text of the most recent English version:\n\n   ```\n   msgmerge --update po/XX.po po/messages.pot\n   ```\n\n4. Untranslated sections are marked with `#, fuzzy` in `XX.po`. Edit the\n   `msgstr` string with the translated text.\n\n5. Execute the `mdbook` command to rebuild the docs. For Chinese, whose\n   two-letter ISO-639 code is `zh`:\n\n   ```\n   mdbook build docs -d build\n   MDBOOK_BOOK__LANGUAGE=zh mdbook build docs -d build/zh\n   mv docs/build/zh/html docs/build/html/zh\n   python3 -m http.server --directory docs/build/html --bind 127.0.0.1 8080\n   ```\n\n6. If everything looks good, commit `XX.po` and open a pull request on GitHub.\n   Other changed files should be omitted from the pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fordinals%2Ford","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fordinals%2Ford","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fordinals%2Ford/lists"}