{"id":51485845,"url":"https://github.com/0xsequence/c-sdk","last_synced_at":"2026-07-07T06:30:43.606Z","repository":{"id":345264201,"uuid":"1133430028","full_name":"0xsequence/c-sdk","owner":"0xsequence","description":"C99 compatible Embedded Wallet SDK","archived":false,"fork":false,"pushed_at":"2026-04-21T14:09:40.000Z","size":136,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-21T16:18:56.799Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xsequence.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-13T10:36:37.000Z","updated_at":"2026-04-21T11:02:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/0xsequence/c-sdk","commit_stats":null,"previous_names":["0xsequence/c-sdk"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/0xsequence/c-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fc-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fc-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fc-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fc-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xsequence","download_url":"https://codeload.github.com/0xsequence/c-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fc-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35218117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-07-07T06:30:42.623Z","updated_at":"2026-07-07T06:30:43.599Z","avatar_url":"https://github.com/0xsequence.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OmsWallet C SDK\n\n## Support Matrix\n\n- macOS: supported for development and local testing, uses Keychain-backed secure storage\n- Linux: supported runtime target for normal POSIX + `libcurl` environments, uses POSIX file-backed secure storage\n- HTTP transport: `libcurl` only\n- Session model: single-session and not thread-safe\n\n## Setup\n\n#### Install dependencies\n\n```shell\narch -arm64 brew install cmake pkg-config\nbrew install secp256k1 cjson curl\n```\n\nOn Linux, install the equivalent development packages for `cmake`, `pkg-config`,\n`libcurl`, `libcjson`, and `libsecp256k1`.\n\nDebian / Ubuntu example:\n\n```shell\napt-get update\napt-get install -y build-essential cmake pkg-config libcurl4-openssl-dev libcjson-dev libsecp256k1-dev\n```\n\n#### Initialize the build directory\n\n```shell\ncmake -S . -B build\ncmake --build build\n```\n\nOptional targets:\n\n```shell\ncmake -S . -B build -DOMS_WALLET_BUILD_DEMO=OFF -DOMS_WALLET_BUILD_CLI=OFF\n```\n\n`OMS_WALLET_BUILD_DEMO` and `OMS_WALLET_BUILD_CLI` only control those runtime\nbinaries. They do not disable the library or the test targets.\n\n## Initialization\n\nCall `oms_wallet_config_init(...)` before using wallet, indexer, or API helpers.\nThe SDK no longer falls back to built-in runtime URLs when config is unset.\n\nMinimal setup:\n\n```c\n#include \u003cwallet/oms_wallet_config.h\u003e\n\nif (oms_wallet_config_init(\"YOUR_ACCESS_KEY\") != 0) {\n    /* handle config initialization failure */\n}\n```\n\nCommon overrides:\n\n```c\noms_wallet_config_set_indexer_url_template(\"https://dev-{value}-indexer.sequence.app/rpc/Indexer/\");\noms_wallet_config_set_api_rpc_url(\"https://dev-api.sequence.app/rpc/API\");\noms_wallet_config_set_wallet_rpc_url(\"https://your-wallet-host/rpc/Wallet\");\noms_wallet_config_set_origin_header(\"Origin: http://localhost:3000\");\noms_wallet_config_set_storage_dir(\"/var/lib/oms-wallet-c-sdk\");\n```\n\nThe default wallet auth scope is `proj_1`. Only override it if your environment\nrequires a different scope.\n\nCall `oms_wallet_config_cleanup()` when you are done with SDK-owned config state.\n\n`oms_wallet_restore_session()` returns:\n\n- `1` when a usable saved session was restored\n- `0` when no usable saved session exists yet\n- `-1` on an actual storage or restore failure\n\n## Linux Secure Storage\n\nOn Linux, secure storage uses a file-per-key backend with:\n\n- directory permissions: `0700`\n- file permissions: `0600`\n- atomic replace on write\n\nThis Linux backend is permission-protected filesystem storage. It is not\nencrypted at rest like macOS Keychain storage.\n\nDefault storage path:\n\n- `$HOME/.oms-wallet-c-sdk` when `HOME` is set\n- `./.oms-wallet-c-sdk` otherwise\n\nOverride the storage location with:\n\n```c\noms_wallet_config_set_storage_dir(\"/path/to/app-state\");\n```\n\nPersisted keys used by the SDK:\n\n- `access-key`: CLI-stored access key used to initialize SDK config\n- `seckey`: signer private key for the current session\n- `challenge`: pending email sign-in challenge\n- `verifier`: pending email sign-in verifier\n- `oms_wallet_id`: selected wallet id for follow-up wallet operations\n- `oms_wallet_address`: last selected wallet address\n\n#### Run tests\n\n```shell\nctest --test-dir build --output-on-failure\n\n# Focused request-signing parity test\n./build/oms_wallet_request_signing_test\n```\n\nCurrent test coverage:\n\n- `oms_wallet_request_signing_test`: validates canonical request payloads, preimages, digests, signatures, and authorization headers against checked-in vectors\n- `timestamps_test`: validates nonce monotonicity from `timestamp_next_nonce()`\n- `secure_storage_test`: Linux-only regression test for the POSIX secure-storage backend\n\n#### Run the demo or cli\n\n```shell\n./build/oms-wallet-demo\n```\n\n```shell\n# Init\n./build/oms-wallet init --access-key AQAAAAAAAAK2JvvZhWqZ51riasWBftkrVXE\n\n# Get token balances\n./build/oms-wallet get-token-balances --chain-id 137 --contract-address 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 --wallet-address 0x8e3E38fe7367dd3b52D1e281E4e8400447C8d8B9 --include-metadata\n\n# Sign in with Email\n./build/oms-wallet sign-in-with-email --email andygruening@gmail.com\n\n# Confirm Email sign in and automatically select the first matching wallet,\n# or create one if none exists for that type\n./build/oms-wallet confirm-email-sign-in --code 123456 --wallet-type ethereum\n\n# Or, omit --wallet-type to list the available wallets returned by CompleteAuth\n./build/oms-wallet confirm-email-sign-in --code 123456\n\n# Optional: switch to a specific wallet later\n./build/oms-wallet use-wallet --wallet-id \u003cwallet-id\u003e\n\n# Optional: create an additional wallet of the default type (ethereum)\n./build/oms-wallet create-wallet\n\n# Sign message\n./build/oms-wallet sign-message --chain-id 80002 --message test\n\n# Verify signature\n./build/oms-wallet verify-signature --chain-id 80002 --wallet-address 0xb7461CcfFfc7378747C6f82804E4dEc04b9E6148 --message test --signature 0x...\n\n# Send transaction\n./build/oms-wallet send-transaction --chain-id 80002 --to 0xE5E8B483FfC05967FcFed58cc98D053265af6D99 --value 0\n```\n\n#### Homebrew version release\n\n1. Create a tag and version release on GitHub\n2. Reference the .tar.gz file `url` from the release inside the `Formula/wallet.rb` file\n3. Compute the file hash `curl -L \u003curl.tar.gz\u003e | shasum -a 256`\n4. Replace the sha256 value inside `wallet.rb` with the hash from the latest release\n5. Create a PR and merge it into `master`\n\n#### Homebrew installation\n\nHomebrew is the macOS CLI distribution path.\n\n```shell\n# Remove tap if needed\nbrew untap 0xsequence/c-sdk\n\n# Create tap, then install\nbrew tap 0xsequence/c-sdk https://github.com/0xsequence/c-sdk/\nbrew install 0xsequence/c-sdk/wallet\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsequence%2Fc-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xsequence%2Fc-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsequence%2Fc-sdk/lists"}