问题标签 [daml]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
36 浏览

daml - DAML:即使在 SAML Slgn In 之后,我也会被提示登录到 Bintray 编辑配置文件

通过 SAML 身份验证登录 Bintray 后,当我单击链接或转到以下 URL:https ://bintray.com/login?targetUri=/profile/edit 时,系统会提示我再次登录。我正在尝试获取 Bintray 用户名和 API 密钥,以便我可以配置 Maven。

0 投票
2 回答
258 浏览

daml - Function for getting today's date?

I am creating a 'choice' inside a contract template that requires checking today's date. My DAML code is as follows:

What is the name of the function I can use to get the current date? It needs to go where it says "*today*".

0 投票
2 回答
150 浏览

monads - 使用 getTime 函数时遇到问题

我在关于合同选择的断言语句中使用 getTime,如下所示:

它会产生一个错误:

getTime 不返回“时间”类型的值吗?什么是“莫时间”?

0 投票
2 回答
129 浏览

node.js - 数字资产分类帐项目的 Node.js 绑定

我正在研究Digital Asset Getting Started with Node.js bindings

跑步

导致以下错误消息

以下是该日志文件的内容:

我按照第 1 步和第 2 步中的说明进行操作。我的 .npmrc 已更新为我输入时收到的响应

我输入了命令

是什么导致了错误?

0 投票
1 回答
155 浏览

java - 分类帐 API 入门

我正在完成Digital Asset Ledger API 入门。我小心翼翼地按照指示配置 Maven 以使用数字资产存储库 创建 ping-pong-java 项目,并使用 'maven' 编译它并运行 'sandbox' 工作没有 oa 问题。但是,输入:

导致以下输出:

我按照错误消息http://www.slf4j.org/codes.html#StaticLoggerBinder中的链接,它说如下:

我不知道该怎么做。我只想按照本教程来了解 API 分类帐。我没有使用 java 或 maven 的经验,而且我不打算学习它们,因为我的 Ledger 应用程序需要用 PHP 编写。我需要做些什么来解决这个错误?

0 投票
1 回答
293 浏览

daml - 从 Java 或 JavaScript 以外的语言使用 DAML Ledger API

我想编写一个与 DAML 分类帐交互的应用程序,但从 SDK 0.11.3 开始,唯一记录的绑定是用于 Java 和 JavaScript。

有没有办法使用其他语言的 Ledger API?

0 投票
1 回答
38 浏览

node.js - DA Node Bindings Tutorial -- 'retrieve the package identifiers' 问题

我正在完成教程。当我在“ping-pong”项目文件夹中运行后检查 template-ids.json 的内容时,npm run fetch-template-ids如下所示:

0 投票
1 回答
89 浏览

php - 在 DA Ledger API proto 文件上运行 grpc php 插件

我正在用 PHP 构建我的分类帐应用程序的客户端。我已经编写了 DAML 代码,完成了grpc 快速入门教程,然后运行了命令

现在看来下一步是运行 grpc_php_plugin 将 .proto 文件转换为 php 类和函数。在快速入门教程中,命令如下:

只有一个 .proto 文件。但是,我的项目文件夹具有 .proto 文件的整个目录结构!'protoc' 命令应该如何查找我的项目?

我看到有三个不同的主目录:com、google、grpc。我是否需要包含所有三个中的 .proto 文件?我看到许多 .proto 文件是相互依赖的。是否需要一两个主要的 .proto 文件,并且会导致所有其他文件都被拉入?

0 投票
2 回答
267 浏览

php - protobuf 生成的类中未定义的 php 方法

我正在编写一个客户端应用程序来连接到 DA 沙箱。以下代码:

导致以下错误:

但是,它应该被定义,因为 $ledger_id_response 是 GetLedgerIdentityResponse 类型,它有一个方法:

是什么导致了错误?

0 投票
1 回答
205 浏览

php - Doing CRUD on the DA Ledger through a gRPC client

I am in the process of writing a DA Ledger client application. It's going slow because the API documentation does not explain how to combine the provided services to do simple Create, read, update, and delete on the Ledger.
For example there is no simple service that allows the client to read all contacts from a given party directly. First the client needs to get the ledger id, and then (I think) the package id. etc. There is a service to read active contracts, but what about inactive contracts? It would be helpful to have some documentation that explains and demonstrates how to combine calls to the various services to (for example):

  • Read all contracts for a given party
  • Exercize a choice on a given contract
  • Create a new contract

My application is being written in php. I don't necessarily need examples in php but I just want to know how do use the provided services to accomplish simple tasks.