Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 80 additions & 3 deletions api-specs/openrpc-dapp-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,88 @@
},
"required": ["createdEventBlob"]
},
"CreateCommand": {
"title": "CreateCommand",
"type": "object",
"additionalProperties": false,
"required": ["CreateCommand"],
"properties": {
"CreateCommand": {
"title": "CreateCommandPayload",
"type": "object",
"additionalProperties": true,
"description": "Inner shape is defined by the Canton Ledger API CreateCommand schema; do not re-specify here."
}
}
},
"ExerciseCommand": {
"title": "ExerciseCommand",
"type": "object",
"additionalProperties": false,
"required": ["ExerciseCommand"],
"properties": {
"ExerciseCommand": {
"title": "ExerciseCommandPayload",
"type": "object",
"additionalProperties": true,
"description": "Inner shape is defined by the Canton Ledger API ExerciseCommand schema; do not re-specify here."
}
}
},
"CreateAndExerciseCommand": {
"title": "CreateAndExerciseCommand",
"type": "object",
"additionalProperties": false,
"required": ["CreateAndExerciseCommand"],
"properties": {
"CreateAndExerciseCommand": {
"title": "CreateAndExerciseCommandPayload",
"type": "object",
"additionalProperties": true,
"description": "Inner shape is defined by the Canton Ledger API CreateAndExerciseCommand schema; do not re-specify here."
}
}
},
"ExerciseByKeyCommand": {
"title": "ExerciseByKeyCommand",
"type": "object",
"additionalProperties": false,
"required": ["ExerciseByKeyCommand"],
"properties": {
"ExerciseByKeyCommand": {
"title": "ExerciseByKeyCommandPayload",
"type": "object",
"additionalProperties": true,
"description": "Inner shape is defined by the Canton Ledger API ExerciseByKeyCommand schema; do not re-specify here."
}
}
},
"Command": {
"title": "Command",
"description": "A Daml command atom. Mirror of the Canton Ledger API Command union; inner shapes are intentionally opaque so the dApp layer never drifts from the Ledger API contract.",
"oneOf": [
{
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/CreateCommand"
},
{
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/ExerciseCommand"
},
{
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/CreateAndExerciseCommand"
},
{
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/ExerciseByKeyCommand"
}
]
},
"JsCommands": {
"title": "JsCommands",
"type": "object",
"description": "Structure representing JS commands for transaction execution",
"additionalProperties": true
"type": "array",
"minItems": 1,
"description": "Non-empty array of Daml command atoms to submit atomically as a single transaction.",
"items": {
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/Command"
}
},
"JsPrepareSubmissionResponse": {
"title": "JsPrepareSubmissionResponse",
Expand Down
56 changes: 54 additions & 2 deletions core/wallet-dapp-remote-rpc-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,64 @@ export type CommandId = string
type AlwaysTrue = any
/**
*
* Structure representing JS commands for transaction execution
* Inner shape is defined by the Canton Ledger API CreateCommand schema; do not re-specify here.
*
*/
export interface JsCommands {
export interface CreateCommandPayload {
[key: string]: any
}
export interface CreateCommand {
CreateCommand: CreateCommandPayload
}
/**
*
* Inner shape is defined by the Canton Ledger API ExerciseCommand schema; do not re-specify here.
*
*/
export interface ExerciseCommandPayload {
[key: string]: any
}
export interface ExerciseCommand {
ExerciseCommand: ExerciseCommandPayload
}
/**
*
* Inner shape is defined by the Canton Ledger API CreateAndExerciseCommand schema; do not re-specify here.
*
*/
export interface CreateAndExerciseCommandPayload {
[key: string]: any
}
export interface CreateAndExerciseCommand {
CreateAndExerciseCommand: CreateAndExerciseCommandPayload
}
/**
*
* Inner shape is defined by the Canton Ledger API ExerciseByKeyCommand schema; do not re-specify here.
*
*/
export interface ExerciseByKeyCommandPayload {
[key: string]: any
}
export interface ExerciseByKeyCommand {
ExerciseByKeyCommand: ExerciseByKeyCommandPayload
}
/**
*
* A Daml command atom. Mirror of the Canton Ledger API Command union; inner shapes are intentionally opaque so the dApp layer never drifts from the Ledger API contract.
*
*/
export type Command =
| CreateCommand
| ExerciseCommand
| CreateAndExerciseCommand
| ExerciseByKeyCommand
/**
*
* Non-empty array of Daml command atoms to submit atomically as a single transaction.
*
*/
export type JsCommands = Command[]
/**
*
* The party that signed the transaction.
Expand Down
56 changes: 54 additions & 2 deletions core/wallet-dapp-rpc-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,64 @@ export type CommandId = string
type AlwaysTrue = any
/**
*
* Structure representing JS commands for transaction execution
* Inner shape is defined by the Canton Ledger API CreateCommand schema; do not re-specify here.
*
*/
export interface JsCommands {
export interface CreateCommandPayload {
[key: string]: any
}
export interface CreateCommand {
CreateCommand: CreateCommandPayload
}
/**
*
* Inner shape is defined by the Canton Ledger API ExerciseCommand schema; do not re-specify here.
*
*/
export interface ExerciseCommandPayload {
[key: string]: any
}
export interface ExerciseCommand {
ExerciseCommand: ExerciseCommandPayload
}
/**
*
* Inner shape is defined by the Canton Ledger API CreateAndExerciseCommand schema; do not re-specify here.
*
*/
export interface CreateAndExerciseCommandPayload {
[key: string]: any
}
export interface CreateAndExerciseCommand {
CreateAndExerciseCommand: CreateAndExerciseCommandPayload
}
/**
*
* Inner shape is defined by the Canton Ledger API ExerciseByKeyCommand schema; do not re-specify here.
*
*/
export interface ExerciseByKeyCommandPayload {
[key: string]: any
}
export interface ExerciseByKeyCommand {
ExerciseByKeyCommand: ExerciseByKeyCommandPayload
}
/**
*
* A Daml command atom. Mirror of the Canton Ledger API Command union; inner shapes are intentionally opaque so the dApp layer never drifts from the Ledger API contract.
*
*/
export type Command =
| CreateCommand
| ExerciseCommand
| CreateAndExerciseCommand
| ExerciseByKeyCommand
/**
*
* Non-empty array of Daml command atoms to submit atomically as a single transaction.
*
*/
export type JsCommands = Command[]
/**
*
* The party that signed the transaction.
Expand Down
83 changes: 80 additions & 3 deletions core/wallet-dapp-rpc-client/src/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,88 @@
},
"required": ["createdEventBlob"]
},
"CreateCommand": {
"title": "CreateCommand",
"type": "object",
"additionalProperties": false,
"required": ["CreateCommand"],
"properties": {
"CreateCommand": {
"title": "CreateCommandPayload",
"type": "object",
"additionalProperties": true,
"description": "Inner shape is defined by the Canton Ledger API CreateCommand schema; do not re-specify here."
}
}
},
"ExerciseCommand": {
"title": "ExerciseCommand",
"type": "object",
"additionalProperties": false,
"required": ["ExerciseCommand"],
"properties": {
"ExerciseCommand": {
"title": "ExerciseCommandPayload",
"type": "object",
"additionalProperties": true,
"description": "Inner shape is defined by the Canton Ledger API ExerciseCommand schema; do not re-specify here."
}
}
},
"CreateAndExerciseCommand": {
"title": "CreateAndExerciseCommand",
"type": "object",
"additionalProperties": false,
"required": ["CreateAndExerciseCommand"],
"properties": {
"CreateAndExerciseCommand": {
"title": "CreateAndExerciseCommandPayload",
"type": "object",
"additionalProperties": true,
"description": "Inner shape is defined by the Canton Ledger API CreateAndExerciseCommand schema; do not re-specify here."
}
}
},
"ExerciseByKeyCommand": {
"title": "ExerciseByKeyCommand",
"type": "object",
"additionalProperties": false,
"required": ["ExerciseByKeyCommand"],
"properties": {
"ExerciseByKeyCommand": {
"title": "ExerciseByKeyCommandPayload",
"type": "object",
"additionalProperties": true,
"description": "Inner shape is defined by the Canton Ledger API ExerciseByKeyCommand schema; do not re-specify here."
}
}
},
"Command": {
"title": "Command",
"description": "A Daml command atom. Mirror of the Canton Ledger API Command union; inner shapes are intentionally opaque so the dApp layer never drifts from the Ledger API contract.",
"oneOf": [
{
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/CreateCommand"
},
{
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/ExerciseCommand"
},
{
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/CreateAndExerciseCommand"
},
{
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/ExerciseByKeyCommand"
}
]
},
"JsCommands": {
"title": "JsCommands",
"type": "object",
"description": "Structure representing JS commands for transaction execution",
"additionalProperties": true
"type": "array",
"minItems": 1,
"description": "Non-empty array of Daml command atoms to submit atomically as a single transaction.",
"items": {
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/Command"
}
},
"JsPrepareSubmissionResponse": {
"title": "JsPrepareSubmissionResponse",
Expand Down
56 changes: 54 additions & 2 deletions sdk/dapp-sdk/src/dapp-api/rpc-gen/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,64 @@ export type CommandId = string
type AlwaysTrue = any
/**
*
* Structure representing JS commands for transaction execution
* Inner shape is defined by the Canton Ledger API CreateCommand schema; do not re-specify here.
*
*/
export interface JsCommands {
export interface CreateCommandPayload {
[key: string]: any
}
export interface CreateCommand {
CreateCommand: CreateCommandPayload
}
/**
*
* Inner shape is defined by the Canton Ledger API ExerciseCommand schema; do not re-specify here.
*
*/
export interface ExerciseCommandPayload {
[key: string]: any
}
export interface ExerciseCommand {
ExerciseCommand: ExerciseCommandPayload
}
/**
*
* Inner shape is defined by the Canton Ledger API CreateAndExerciseCommand schema; do not re-specify here.
*
*/
export interface CreateAndExerciseCommandPayload {
[key: string]: any
}
export interface CreateAndExerciseCommand {
CreateAndExerciseCommand: CreateAndExerciseCommandPayload
}
/**
*
* Inner shape is defined by the Canton Ledger API ExerciseByKeyCommand schema; do not re-specify here.
*
*/
export interface ExerciseByKeyCommandPayload {
[key: string]: any
}
export interface ExerciseByKeyCommand {
ExerciseByKeyCommand: ExerciseByKeyCommandPayload
}
/**
*
* A Daml command atom. Mirror of the Canton Ledger API Command union; inner shapes are intentionally opaque so the dApp layer never drifts from the Ledger API contract.
*
*/
export type Command =
| CreateCommand
| ExerciseCommand
| CreateAndExerciseCommand
| ExerciseByKeyCommand
/**
*
* Non-empty array of Daml command atoms to submit atomically as a single transaction.
*
*/
export type JsCommands = Command[]
/**
*
* The party that signed the transaction.
Expand Down
Loading
Loading