Crates.io | daml-bridge |
lib.rs | daml-bridge |
version | 0.2.2 |
source | src |
created_at | 2022-03-01 09:43:00.751856 |
updated_at | 2022-03-08 08:43:28.454206 |
description | Daml JSON<>GRPC bridge |
homepage | |
repository | https://github.com/fujiapple852/rust-daml-bindings |
max_upload_size | |
id | 541437 |
size | 126,623 |
This crate provides a bridge between the Daml JSON and Daml GRPC APIs.
cargo install daml-bridge
USAGE:
daml-bridge [OPTIONS] --ledger-uri <uri> --http-port <port> --bridge-token <token>
OPTIONS:
--bridge-token <token>
The JWT token the bridge will use for package refresh from the ledger server
--encode-decimal-as-string
Sets whether decimal values are encoded as JSON strings
--encode-int64-as-string
Sets whether int64 values are encoded as JSON strings
-h, --help
Print help information
--http-host <host>
The host the http server should listen on [default: 127.0.0.1]
--http-port <port>
The port the http server should listen on
--ledger-connect-timeout <duration>
The ledger server connection timeout [default: 5s]
--ledger-timeout <duration>
The ledger server timeout [default: 5s]
--log-filter <log-filter>
Sets the log filters [default: daml-bridge=info]
--package-reload-interval <interval>
How frequently the bridge should refresh the Daml packages from the ledger server
[default: 5s]
-s, --ledger-uri <uri>
The ledger server GRPC uri (i.e. https://127.0.0.1:7575)
-V, --version
Print version information
To run the bridge against a Daml ledger listening on https://127.0.0.1:6865
and expose the JSON API on port 8080
:
TOKEN="..."
daml-bridge --ledger-uri https://127.0.0.1:6865 --http-port 8080 --bridge-token $TOKEN
The bridge supports all operations of the Daml JSON API except:
It does not provide a database backing store or cache, all operations are related to the underlying GRPC API.
daml-bridge
is distributed under the terms of the Apache License (Version 2.0).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in time by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
See LICENSE for details.
Copyright 2022