Construct a new Ledger
object. See [[LedgerOptions]] for the constructor arguments.
Allocate a new party.
Parameters for party allocation.
PartyInfo for the newly created party.
Archive a contract identified by its contract ID.
The template of the contract to archive.
The contract id of the contract to archive.
Optional
meta: CommandMetaOptional meta fields to specify additional data on a command submission.
Archive a contract identified by its contract key. Same as [[archive]], but the contract to be archived is identified by its contract key.
The template of the contract to be archived.
The contract key of the contract to be archived.
Optional
meta: CommandMetaOptional meta fields to specify additional data on a command submission.
Create a contract for a given template.
The template of the contract to be created.
The template arguments for the contract to be created.
Optional
meta: CommandMetaOptional meta fields to specify additional data on a command submission.
Exercse a choice on a newly-created contract, in a single transaction.
The return value of the choice together with a list of [[event]]'s that includes the creation event for the created contract as well as all the events that were created as a result of exercising the choice, including the archive event for the created contract if the choice is consuming (or otherwise archives it as part of its execution).
Creates a user
The user ID
The initial rights the user should have
Optional
primaryParty: stringThe primary party the user should have
Deletes a user
The user ID
Exercise a choice on a contract identified by its contract key.
Same as [[exercise]], but the contract is identified by its contract key instead of its contract id.
The return value of the choice together with a list of [[event]]'s that where created as a result of exercising the choice.
Fetch a contract identified by its contract key.
Same as [[fetch]], but the contract to be fetched is identified by its contract key instead of its contract id.
Fetch a binary package.
The content of the package as a raw ArrayBuffer.
Fetch parties by identifier.
An array of Party identifiers.
An array of the same length, where each element corresponds to the same-index element of the given parties, ans is either a PartyInfo object if the party exists or null if it does not.
Get the current user details obtained by the currently used JWT.
Optional
userId: stringThe user id
User details
Fetch all parties on the ledger.
All parties on the ledger, in no particular order.
Fetch a list of all package IDs from the ledger.
List of package IDs.
Lists the rights associated with the given user id
Optional
userId: stringlist of user rights
Retrieve contracts for a given template.
When no query
argument is given, all contracts visible to the submitting party are returned.
When a query
argument is given, only those contracts matching the query are returned. See
https://docs.daml.com/json-api/search-query-language.html for a description of the query
language.
Retrieve a consolidated stream of events for a list of keys and a single template.
The accumulated state is an array of the same length as the given list of keys, with positional correspondence. Each element in the array represents the current contract for the given key, or is explicitly null if there is currently no active contract matching that key.
Note: the given key
objects will be compared for (deep) equality with
the values returned by the API. As such, they have to be given in the
"output" format of the API, including the values of
encodeDecimalAsString
and encodeInt64AsString
. See the JSON API docs
for details.
Retrieve a consolidated stream of events for a given template and queries.
If the given list is empty, the accumulated state is the set of all active contracts for the given template. Otherwise, the accumulated state is the set of all contracts that match at least one of the given queries.
See https://docs.daml.com/json-api/search-query-language.html for a description of the query language.
Retrieve a consolidated stream of events for a given template and query.
The accumulated state is the current set of active contracts matching the query. When no
query
argument is given, all events visible to the submitting party are returned. When a
query
argument is given, only those create events matching the query are returned. See
https://docs.daml.com/json-api/search-query-language.html for a description of the query
language.
Upload a binary archive. Note that this requires admin privileges.
No return value on success; throws on error.
An object of type
Ledger
represents a handle to a Daml ledger.