openapi: 3.0.3
info:
title: Marco Cloud Wallet API Library
description: OpenApi for Marco Cloud Wallet API Library
version: 0.0.13
paths:
/transactions:
post:
description: Send Transaction.
operationId: sendTransaction
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SendTransactionRequest'
responses:
'200':
$ref: '#/components/responses/SendTransactionResponse'
tags:
- Transaction
/transactions/status:
get:
description: Get the status of transactions filtered by the request params
operationId: getTransactionsStatus
responses:
'200':
$ref: '#/components/responses/TransactionStatusListResponse'
tags:
- Transaction
parameters:
- $ref: '#/components/parameters/TxIdQuery'
/wallet:
post:
description: Create a wallet
operationId: createWallet
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WalletRequest'
responses:
'201':
$ref: '#/components/responses/CreateWalletResponse'
tags:
- Wallet
components:
schemas:
ContractInstance:
properties:
lookupService:
$ref: '#/components/schemas/LookupService'
resource:
type: string
required:
- lookupService
- resource
type: object
GenericLedgerOperation:
properties:
action:
type: string
meta:
additionalProperties:
type: string
type: object
options:
$ref: '#/components/schemas/OperationOptions'
version:
type: string
required:
- version
- action
- options
type: object
LookupService:
properties:
type:
type: string
value:
type: string
required:
- type
- value
type: object
OperationOptions:
properties:
contractInstance:
$ref: '#/components/schemas/ContractInstance'
methodInput:
items:
type: string
type: array
methodName:
type: string
required:
- contractInstance
- methodName
- methodInput
type: object
Page:
description: |
This object represents a single page of data returned by the API.
discriminator:
propertyName: contentType
properties:
contentType:
description: >
A string indicating the type of data returned in this page, e.g.
"plugins".
type: string
pageElements:
description: |
The number of elements returned in this page of data.
format: int
type: integer
pageNumber:
description: >
The page number of this page of data, based on the requested page
size.
format: int
type: integer
totalElements:
description: |
The total number of elements available across all pages of data.
format: int64
type: integer
totalPages:
description: >
The total number of pages of data available, based on the requested
page size.
format: int
type: integer
required:
- contentType
type: object
PagedResult:
description: >
This object represents a result set returned by the API that is split
into multiple pages.
discriminator:
propertyName: contentType
properties:
contentType:
description: >
A string indicating the type of data returned in this page, e.g.
"plugins".
type: string
hasMore:
description: |
A flag indicating whether there are more pages of data available.
type: boolean
nextPage:
description: >
The number of the next page of data. Will be `null` if there are no
more pages.
type: integer
previousPage:
description: >
The number of the previous page of data. Will be `null` if this is
the first page.
type: integer
required:
- contentType
type: object
RFC7807Problem:
description: A Problem Details object (RFC 7807)
example:
detail: Request message must not be larger than 10 MB
status: 413
title: Payload Too Large
type: urn:problem-type:belgif:payloadTooLarge
properties:
detail:
description: >-
A human-readable explanation specific to this occurrence of the
problem
type: string
status:
description: >-
The HTTP status code generated by the origin server for this
occurrence of the problem.
example: 503
exclusiveMaximum: true
format: int32
maximum: 600
minimum: 400
type: integer
title:
description: >-
A short summary of the problem type. Written in English and readable
for engineers (usually not suited for non technical stakeholders and
not localized).
example: Service Unavailable
type: string
type:
default: about:blank
description: An absolute URI that identifies the problem type
format: uri
type: string
type: object
SendTransactionRequest:
properties:
actionId:
type: string
glo:
properties:
options:
properties:
args:
items:
type: string
type: array
contractInstance:
type: string
methodName:
type: string
type: object
type:
enum:
- contract_call
type: string
type: object
pluginParams:
additionalProperties:
type: string
type: object
wallet:
type: string
required:
- actionId
- walletId
- glo
type: object
SendTransactionResponse:
properties:
problem:
allOf:
- $ref: '#/components/schemas/RFC7807Problem'
nullable: true
status:
enum:
- PROCESSING
- REJECTED
type: string
txId:
type: string
required:
- txId
- status
type: object
TransactionStatus:
properties:
details:
properties:
contractAddress:
nullable: true
type: string
locator:
nullable: true
type: string
type: object
problem:
allOf:
- $ref: '#/components/schemas/RFC7807Problem'
nullable: true
status:
enum:
- PROCESSING
- SUCCEEDED
- REJECTED
- FAILED
type: string
required:
- status
type: object
TransactionStatusListResponse:
items:
$ref: '#/components/schemas/TransactionStatus'
type: array
WalletAddress:
properties:
walletAddress:
type: string
required:
- walletAddress
type: object
WalletRequest:
properties:
ledgerId:
type: string
pluginParameters:
additionalProperties:
type: string
type: object
walletId:
type: string
required:
- walletId
- ledgerId
type: object
parameters:
PageNumberQuery:
description: The page number that you want to return
in: query
name: page
required: false
schema:
default: 0
format: int
minimum: 0
type: integer
PageSizeQuery:
description: The number of items to return per page
in: query
name: size
required: false
schema:
default: 20
format: int
maximum: 100
minimum: 5
type: integer
ResourceIdQuery:
description: The resourceId of the project that you want to return
in: query
name: resourceId
schema:
default: ''
type: string
SortByQuery:
description: >
The sort order that you want to return. You can specify one or more
comma-separated sort keys, each followed by
an optional sort direction of either asc
(ascending) or
desc
(descending).
If you want to sort in descending order, append ,desc
to
the sort key; otherwise, the default is to sort in
ascending order. If you want to sort in ascending order, you can
optionally append ,asc
.
Examples of valid sort query parameters include:
- sort=name
: Sort by name in ascending order
- sort=name,desc
: Sort by name in descending order
- sort=name,desc,created,asc
: Sort by name in descending
order, then by created in ascending order
- sort=name,desc&sort=created,asc
: Sort by name in
descending order, then by created in ascending order
explode: true
in: query
name: sort
required: false
schema:
format: set
items:
example:
- name
- name,asc
- name,desc
type: string
type: array
style: form
TxIdQuery:
description: The transaction's txId
in: query
name: txId
required: true
schema:
type: string
responses:
CreateWalletResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/WalletAddress'
description: Create Wallet method response
SendTransactionResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/SendTransactionResponse'
description: Transaction payload
TransactionStatusListResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionStatusListResponse'
description: Transactions Status List