5 个版本

0.2.2 2022年3月8日
0.2.1 2022年3月7日
0.2.0 2022年3月4日
0.1.1 2022年3月3日
0.1.0 2022年3月1日

#1553开发工具

Apache-2.0

3.5MB
21K SLoC

Documentation Crate maintenance-status

Daml Bridge

本crate提供Daml JSON和Daml GRPC API之间的桥接。

安装

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

示例

要运行桥接器以连接到监听在 https://127.0.0.1:6865 的Daml账本,并在端口 8080 上公开JSON API

TOKEN="..."
daml-bridge --ledger-uri https://127.0.0.1:6865 --http-port 8080 --bridge-token $TOKEN

限制

该桥接器支持Daml JSON API的所有操作,除了

它不提供数据库后端存储或缓存,所有操作都与底层的GRPC API相关。

许可协议

daml-bridge 根据Apache License(版本2.0)进行分发。

除非你明确声明,否则你提交的任何有意包含的贡献,根据Apache-2.0许可协议定义,应作为上述双重许可,没有任何附加条款或条件。

有关详细信息,请参阅LICENSE

版权所有 2022

依赖项

~26–40MB
~768K SLoC