Skip to content
Merged
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
2,230 changes: 2,230 additions & 0 deletions api-specs/ledger-api/3.4.11/asyncapi.yaml

Large diffs are not rendered by default.

7,406 changes: 7,406 additions & 0 deletions api-specs/ledger-api/3.4.11/openapi.yaml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions api-specs/splice/0.5.8/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# OpenAPI

These are the OpenAPI specification files for the Splice apps.

Only the ones with the `external` tag should be considered publicly usable.
147 changes: 147 additions & 0 deletions api-specs/splice/0.5.8/allocation-instruction-v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
openapi: 3.0.0
info:
title: allocation instruction off-ledger API
description: |
Implemented by token registries for using and managing
allocation instructions by wallets.
version: 1.0.0
paths:
/registry/allocation-instruction/v1/allocation-factory:
post:
operationId: getAllocationFactory
description: |
Get the factory and choice context for creating allocations using the `AllocationFactory_Allocate` choice.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GetFactoryRequest'
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/FactoryWithChoiceContext'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
components:
responses:
'400':
description: bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
schemas:
GetFactoryRequest:
type: object
properties:
choiceArguments:
type: object
description: |
The arguments that are intended to be passed to the choice provided by the factory.
To avoid repeating the Daml type definitions, they are specified as JSON objects.
However the concrete format is given by how the choice arguments are encoded using the Daml JSON API
(with the `extraArgs.context` and `extraArgs.meta` fields set to the empty object).

The choice arguments are provided so that the registry can also provide choice-argument
specific contracts, e.g., the configuration for a specific instrument-id.
excludeDebugFields:
description: If set to true, the response will not include fields prefixed with 'debug'. Useful to save bandwidth.
default: false
type: boolean
required:
- choiceArguments
FactoryWithChoiceContext:
description: |
A factory contract together with the choice context required to exercise the choice
provided by the factory. Typically used to implement the generic initiation of on-ledger workflows
via a Daml interface.

Clients SHOULD avoid reusing the same `FactoryWithChoiceContext` for exercising multiple choices,
as the choice context MAY be specific to the choice being exercised.
type: object
properties:
factoryId:
description: The contract ID of the contract implementing the factory interface.
type: string
choiceContext:
$ref: '#/components/schemas/ChoiceContext'
required:
- factoryId
- choiceContext
ChoiceContext:
description: |
The context required to exercise a choice on a contract via an interface.
Used to retrieve additional reference date that is passed in via disclosed contracts,
which are in turn referred to via their contract ID in the `choiceContextData`.
type: object
properties:
choiceContextData:
description: The additional data to use when exercising the choice.
type: object
disclosedContracts:
description: |
The contracts that are required to be disclosed to the participant node for exercising
the choice.
type: array
items:
$ref: '#/components/schemas/DisclosedContract'
required:
- choiceContextData
- disclosedContracts
DisclosedContract:
type: object
properties:
templateId:
type: string
contractId:
type: string
createdEventBlob:
type: string
synchronizerId:
description: |
The synchronizer to which the contract is currently assigned.
If the contract is in the process of being reassigned, then a "409" response is returned.
type: string
debugPackageName:
description: |
The name of the Daml package that was used to create the contract.
Use this data only if you trust the provider, as it might not match the data in the
`createdEventBlob`.
type: string
debugPayload:
description: |
The contract arguments that were used to create the contract.
Use this data only if you trust the provider, as it might not match the data in the
`createdEventBlob`.
type: object
debugCreatedAt:
description: |
The ledger effective time at which the contract was created.
Use this data only if you trust the provider, as it might not match the data in the
`createdEventBlob`.
type: string
format: date-time
required:
- templateId
- contractId
- createdEventBlob
- synchronizerId
ErrorResponse:
type: object
required:
- error
properties:
error:
type: string
191 changes: 191 additions & 0 deletions api-specs/splice/0.5.8/allocation-v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
openapi: 3.0.0
info:
title: allocation off-ledger API
description: |
Implemented by token registries for the purpose of the use and management of
allocations by wallets and apps orchestrating the settlement of asset transfers.
version: 1.1.0
paths:
/registry/allocations/v1/{allocationId}/choice-contexts/execute-transfer:
post:
operationId: getAllocationTransferContext
description: |
Get the choice context to execute a transfer on an allocation.
parameters:
- name: allocationId
description: The contract ID of the allocation whose transfer the caller wants to execute.
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GetChoiceContextRequest'
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/ChoiceContext'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
/registry/allocations/v1/{allocationId}/choice-contexts/withdraw:
post:
operationId: getAllocationWithdrawContext
description: |
Get the choice context to withdraw an allocation.
parameters:
- name: allocationId
description: The contract ID of the allocation to withdraw.
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GetChoiceContextRequest'
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/ChoiceContext'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
/registry/allocations/v1/{allocationId}/choice-contexts/cancel:
post:
operationId: getAllocationCancelContext
description: |
Get the choice context to cancel an allocation.
parameters:
- name: allocationId
description: The contract ID of the allocation to cancel.
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GetChoiceContextRequest'
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/ChoiceContext'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
components:
responses:
'400':
description: bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
schemas:
GetChoiceContextRequest:
description: |
A request to get the context for executing a choice on a contract.
type: object
properties:
meta:
description: |
Metadata that will be passed to the choice, and should be incorporated
into the choice context. Provided for extensibility.
type: object
additionalProperties:
type: string
excludeDebugFields:
description: If set to true, the response will not include fields prefixed with 'debug'. Useful to save bandwidth.
default: false
type: boolean
ChoiceContext:
description: |
The context required to exercise a choice on a contract via an interface.
Used to retrieve additional reference date that is passed in via disclosed contracts,
which are in turn referred to via their contract ID in the `choiceContextData`.
type: object
properties:
choiceContextData:
description: The additional data to use when exercising the choice.
type: object
disclosedContracts:
description: |
The contracts that are required to be disclosed to the participant node for exercising
the choice.
type: array
items:
$ref: '#/components/schemas/DisclosedContract'
required:
- choiceContextData
- disclosedContracts
DisclosedContract:
type: object
properties:
templateId:
type: string
contractId:
type: string
createdEventBlob:
type: string
synchronizerId:
description: |
The synchronizer to which the contract is currently assigned.
If the contract is in the process of being reassigned, then a "409" response is returned.
type: string
debugPackageName:
description: |
The name of the Daml package that was used to create the contract.
Use this data only if you trust the provider, as it might not match the data in the
`createdEventBlob`.
type: string
debugPayload:
description: |
The contract arguments that were used to create the contract.
Use this data only if you trust the provider, as it might not match the data in the
`createdEventBlob`.
type: object
debugCreatedAt:
description: |
The ledger effective time at which the contract was created.
Use this data only if you trust the provider, as it might not match the data in the
`createdEventBlob`.
type: string
format: date-time
required:
- templateId
- contractId
- createdEventBlob
- synchronizerId
ErrorResponse:
type: object
required:
- error
properties:
error:
type: string
Loading
Loading