Skip to content

Latest commit

 

History

History
622 lines (451 loc) · 20 KB

NodeApi.md

File metadata and controls

622 lines (451 loc) · 20 KB

NodeApi

All URIs are relative to https://localhost

Method HTTP request Description
nodeApproveTaskPost POST /node/approve_task Approve task with pending incoming transaction [async call]
nodeCancelTaskPost POST /node/cancel_task Cancel task with pending incoming transaction both incoming and outgoing [async call]
nodeDeleteWalletPost POST /node/delete_wallet Delete a Wallet [async call]
nodeExportAuditorAccessWalletPost POST /node/export_auditor_access_wallet Export viewing credentials for a Wallet
nodeExportWalletPost POST /node/export_wallet Export wallet secret key
nodeGenerateWalletPost POST /node/generate_wallet Generate a new Wallet
nodeGetAllWalletsPost POST /node/get_all_wallets Get all wallet IDs
nodeGetNotificationsPost POST /node/get_notifications Get notifications
nodeGetRulesPost POST /node/get_rules Get network governance Rules
nodeGetTaskStatusPost POST /node/get_task_status Get a specific task (by ID)
nodeGetTasksPost POST /node/get_tasks Get a (potentially) filtered list of all Tasks
nodeImportAuditorAccessWalletPost POST /node/import_auditor_access_wallet Import viewing credentials for a Wallet [async call]
nodeImportWalletPost POST /node/import_wallet Import Wallet from a known secret key and authorization [async call]

nodeApproveTaskPost

nodeApproveTaskPost(taskActionRequest)

Approve task with pending incoming transaction [async call]

Confirmation request tasks are confirmed using this point. After the user confirms the incoming transaction, it is asynchronously sent to the blockchain and its status can be queried like any other async task.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val taskActionRequest : TaskActionRequest =  // TaskActionRequest | 
try {
    apiInstance.nodeApproveTaskPost(taskActionRequest)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeApproveTaskPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeApproveTaskPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
taskActionRequest TaskActionRequest

Return type

null (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeCancelTaskPost

AsyncTaskCreatedResponse nodeCancelTaskPost(taskActionRequest)

Cancel task with pending incoming transaction both incoming and outgoing [async call]

A user may select to decline an incoming transaction. The related task will change its result to failure both on senders and the receivers side. This endpoint can also be used to cancel an outgoing pending transaction that is awaiting user interaction from the receiver

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val taskActionRequest : TaskActionRequest =  // TaskActionRequest | 
try {
    val result : AsyncTaskCreatedResponse = apiInstance.nodeCancelTaskPost(taskActionRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeCancelTaskPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeCancelTaskPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
taskActionRequest TaskActionRequest

Return type

AsyncTaskCreatedResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeDeleteWalletPost

AsyncTaskCreatedResponse nodeDeleteWalletPost(deleteWalletRequest)

Delete a Wallet [async call]

Deletes a Wallet from the Node; All private information about the Wallet will be deleted including transactional history, balances, and keys; If the secret key of the Wallet are not stored elsewhere then all Assets held in the Wallet will be forever lost! If the secret key of the Wallet is stored elsewhere, then all held Assets and the entire transactional history of the Wallet can be restored from the Blockchain at any time by importing the Wallet into a Node.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val deleteWalletRequest : DeleteWalletRequest =  // DeleteWalletRequest | 
try {
    val result : AsyncTaskCreatedResponse = apiInstance.nodeDeleteWalletPost(deleteWalletRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeDeleteWalletPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeDeleteWalletPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
deleteWalletRequest DeleteWalletRequest

Return type

AsyncTaskCreatedResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeExportAuditorAccessWalletPost

ExportAuditorAccessWalletResponse nodeExportAuditorAccessWalletPost(exportAuditorAccessWalletRequest)

Export viewing credentials for a Wallet

Export a viewing key that allows viewing all transactions to and from a wallet, including past transactions. The viewing key is encrypted for a specific Address, and can only be recovered by someone in possession of either a secret key or a viewing key for the Wallet that Address belongs to. The viewing key does enable making any transactions (including rule changes, issuance, and transfers) on behalf of the exported Wallet.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val exportAuditorAccessWalletRequest : ExportAuditorAccessWalletRequest =  // ExportAuditorAccessWalletRequest | 
try {
    val result : ExportAuditorAccessWalletResponse = apiInstance.nodeExportAuditorAccessWalletPost(exportAuditorAccessWalletRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeExportAuditorAccessWalletPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeExportAuditorAccessWalletPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
exportAuditorAccessWalletRequest ExportAuditorAccessWalletRequest

Return type

ExportAuditorAccessWalletResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeExportWalletPost

ExportWalletResponse nodeExportWalletPost(exportWalletRequest)

Export wallet secret key

Export an encrypted form of the Wallet's secret key; The authorization password under which the secret key is encrypted is the same one under which it was originally created or imported; Knowledge of the secret key and the authorization password is required to import the Wallet into a Node in the future.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val exportWalletRequest : ExportWalletRequest =  // ExportWalletRequest | 
try {
    val result : ExportWalletResponse = apiInstance.nodeExportWalletPost(exportWalletRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeExportWalletPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeExportWalletPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
exportWalletRequest ExportWalletRequest

Return type

ExportWalletResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeGenerateWalletPost

nodeGenerateWalletPost(generateWalletRequest)

Generate a new Wallet

Randomly generate a new Wallet under a specified ID; This only affects the Node and in particular nothing about this action is broadcast to the Blockchain; The Wallet ID is required to be unique within the Node, but can otherwise be user-defined.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val generateWalletRequest : GenerateWalletRequest =  // GenerateWalletRequest | 
try {
    apiInstance.nodeGenerateWalletPost(generateWalletRequest)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeGenerateWalletPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeGenerateWalletPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
generateWalletRequest GenerateWalletRequest

Return type

null (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeGetAllWalletsPost

GetAllWalletsResponse nodeGetAllWalletsPost()

Get all wallet IDs

Returns a list of the IDs of all Wallets currently stored on the Node. Both full-access and view-only Wallets are listed.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
try {
    val result : GetAllWalletsResponse = apiInstance.nodeGetAllWalletsPost()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeGetAllWalletsPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeGetAllWalletsPost")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

GetAllWalletsResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

nodeGetNotificationsPost

GetNotificationsResponse nodeGetNotificationsPost(getNotificationsRequest)

Get notifications

Notifications are the Node's way to report about recent activity and status changes. This endpoint allows polling for these changes and fetching the updates. The notifications can be filtered in multiple ways.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val getNotificationsRequest : GetNotificationsRequest =  // GetNotificationsRequest | 
try {
    val result : GetNotificationsResponse = apiInstance.nodeGetNotificationsPost(getNotificationsRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeGetNotificationsPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeGetNotificationsPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
getNotificationsRequest GetNotificationsRequest

Return type

GetNotificationsResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeGetRulesPost

GetRulesResponse nodeGetRulesPost()

Get network governance Rules

Returns a full list of all the Rules that govern admin and issuance rights within the network.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
try {
    val result : GetRulesResponse = apiInstance.nodeGetRulesPost()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeGetRulesPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeGetRulesPost")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

GetRulesResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

nodeGetTaskStatusPost

GetTaskStatusResponse nodeGetTaskStatusPost(getTaskStatusRequest)

Get a specific task (by ID)

Returns the meta-data of a given Task and its current status. The particular, private details of the Task such as an Asset ID or amount in a Transfer are not returned.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val getTaskStatusRequest : GetTaskStatusRequest =  // GetTaskStatusRequest | 
try {
    val result : GetTaskStatusResponse = apiInstance.nodeGetTaskStatusPost(getTaskStatusRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeGetTaskStatusPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeGetTaskStatusPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
getTaskStatusRequest GetTaskStatusRequest

Return type

GetTaskStatusResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeGetTasksPost

GetTasksResponse nodeGetTasksPost(getTasksRequest)

Get a (potentially) filtered list of all Tasks

Returns a list of all Tasks along with their meta-data and statuses. The particular, private details of the Task such as an Asset ID or amount in a Transfer are not returned. Tasks can be filtered using various parameters as specified in the request body.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val getTasksRequest : GetTasksRequest =  // GetTasksRequest | 
try {
    val result : GetTasksResponse = apiInstance.nodeGetTasksPost(getTasksRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeGetTasksPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeGetTasksPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
getTasksRequest GetTasksRequest

Return type

GetTasksResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeImportAuditorAccessWalletPost

AsyncTaskCreatedResponse nodeImportAuditorAccessWalletPost(importAuditorAccessWalletRequest)

Import viewing credentials for a Wallet [async call]

Import a viewing key generated by the export_auditor_access_wallet endpoint. This will create a read-only wallet which can be queried with endpoints such as get_activity and get_balances, but cannot be used to perform transactions. The Wallet whose Address was used as the recipient for the exported viewing key must already be imported within the Node in order for this process to succeed.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val importAuditorAccessWalletRequest : ImportAuditorAccessWalletRequest =  // ImportAuditorAccessWalletRequest | 
try {
    val result : AsyncTaskCreatedResponse = apiInstance.nodeImportAuditorAccessWalletPost(importAuditorAccessWalletRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeImportAuditorAccessWalletPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeImportAuditorAccessWalletPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
importAuditorAccessWalletRequest ImportAuditorAccessWalletRequest

Return type

AsyncTaskCreatedResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

nodeImportWalletPost

AsyncTaskCreatedResponse nodeImportWalletPost(importWalletRequest)

Import Wallet from a known secret key and authorization [async call]

Import a Wallet into the Node under a specified ID; All the transactional history and outstanding balanced of the Wallet will be extracted from the Blockchain; The Wallet ID is required to be unique within the Node, but can otherwise be user-defined.

Example

// Import classes:
//import org.qedit.kotqedit.infrastructure.*
//import org.qedit.kotqedit.models.*

val apiInstance = NodeApi()
val importWalletRequest : ImportWalletRequest =  // ImportWalletRequest | 
try {
    val result : AsyncTaskCreatedResponse = apiInstance.nodeImportWalletPost(importWalletRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling NodeApi#nodeImportWalletPost")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling NodeApi#nodeImportWalletPost")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
importWalletRequest ImportWalletRequest

Return type

AsyncTaskCreatedResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json