feat: add golang bindings - #7
Conversation
verifiable credentials
- Rust FFI layer (lib.rs) exposing controller, identifier, TEL, and OOBI
operations
- Go package (dkms.go) with full type-safe API over the C FFI
- High-level helpers (helpers.go): Signer interface, Ed25519Signer,
Publish,
InceptAndFinalize, IssueAndPublish, RevokeAndPublish,
QueryKELAndFinalize,
QueryTELAndFinalize, AddWatcherAndFinalize
- GC finalizers on all CGo types — no manual Free() calls required
- Platform-specific CGo LDFLAGS (cgo_linux/darwin/windows.go) with
${SRCDIR}
so go get works without manual library installation
- CI workflow: matrix build on ubuntu/macos/windows, force-commits
pre-built
native libs back to repo on master push so go get users get binaries
- Five complete examples: simple, signing, rotation, multisig,
credentials
- Credentials example verified end-to-end: issue → ISSUED → revoke →
REVOKED
- Dependencies point to THCLab/keriox@feat_db_abstraction
Signed-off-by: Zdravko Iliev <zdravko.iliev@vereign.com>
example - Add docker-compose.yml with postgres, witness, watcher, vault, and vault-init services on a shared bridge network - Use WITNESS_PUBLIC_URL/WATCHER_PUBLIC_URL env vars (defaulting to service names) so the same compose file works for both fully-dockerized and hybrid (app on host) setups - Add extra_hosts host-gateway entries so containers can reach host-mapped ports via host.docker.internal - Add VaultSigner backed by Vault transit (ed25519) with ephemeral in-memory key fallback - Make witness/watcher OOBIs configurable via WITNESS_OOBI/WATCHER_OOBI env vars - Document host.docker.internal /etc/hosts requirement for macOS/Windows/Linux in README Signed-off-by: Zdravko Iliev <zdravko.iliev@vereign.com>
|
thanks @zdravko61 and @ykinkov can you take a look on the CI and address the problems? It would be good to get common test vectors so we can test against each implementation, and do cross tests e.g. sign with rust, verify with go, issue with kotlin etc. Will try to prepare something for that in following days. |
|
@mitfik , can we try the CI pipeline again? |
|
@ykinkov you can ignore the node.js but please take a look on the go CI which still fails |
Cool, if you don't mind, I will address the Node.js CI as well. |
|
@mitfik, I think we are ready for another try. I still think the Node.js CI will fail since it uses public infrastructure for witness/watcher which is not working IMO. |
|
@ykinkov it is not good practice to mix concerns let's focus here on go binding, node we would tackle separately anyway, if you don't mind after next build if it succeed exclude node changes so we can have clean go binding commit and can merge |
8864a98 to
cbd5715
Compare
|
@mitfik done! |
Changes
Introduces
bindings/go— a CGo-based Go client wrapping the Rust KERI/DKMS librarymasterafter tests pass sogo getusers don't need a Rust toolchaindocker-compose.ymlfor local dev with Postgres, Vault, witness, and watcher using versioned images (ghcr.io/thclab/keriox-witness:0.17.13,ghcr.io/thclab/keriox-watcher:0.17.13) on a shared bridge networkVaultSignerfor the credentials example that delegates signing to HashiCorp Vault transit (ed25519)WITNESS_OOBI,WATCHER_OOBI,WITNESS_PUBLIC_URL,WATCHER_PUBLIC_URL) to support hybrid local/Docker setupsAdd
host.docker.internalto/etc/hostsStart services:
Run:
DATABASE_URL=postgres://postgres:postgres@localhost:5432/keri_go \ VAULT_ADDR=http://localhost:8200 \ VAULT_TOKEN=root \ CGO_ENABLED=1 go run .