1.0.2 • Published 2 years ago

@mantle-lib/api v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

mantle_api

MantleApi - JavaScript client for mantle_api Most endpoints require authentication with an API key You must first authenticate with your account by logging in your account on mantleblockchain.com. Then, you will need to navigate to the My API Key page in the Settings section. You need to have the role administrator of your organization to generate an API Key. Then use this API Key in all your requests with the following header: x-api-key: API_KEY For more information on the different product and more, you can refer to the knowledge base This SDK is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Package version: v1
  • Build date: 2022-01-28T12:22:36.251-05:00
  • Build package: class io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm i @mantle-lib/api --save

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

var MantleApi = require('mantle_api');

var api = new MantleApi.ApiKeysApi()

var xApiKey = ""; // {String} 

var opts = { 
  'request': new MantleApi.CreateApiKeyRequest() // {CreateApiKeyRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createApiKey(xApiKey, opts, callback);

Documentation for API Endpoints

All URIs are relative to http://develop.api.mantleblockchain.com/

ClassMethodHTTP requestDescription
MantleApi.ApiKeysApicreateApiKeyPOST /apikeysCreate an API key for a specific user
MantleApi.ApiKeysApideleteApiKeyDELETE /apikeys/{userId}Delete the API key for a specific user
MantleApi.ApiKeysApigetAllApiKeysGET /apikeysGet all generated api keys
MantleApi.BunkerApidownloadFileByIdGET /bunker/{productId}/files/{fileId}STORAGE Download a specific file
MantleApi.BunkerApigetAllFilesIdsGET /bunker/{productId}/filesSTORAGE Get all files
MantleApi.BunkerApigetFileStatusGET /bunker/{productId}/files/status/{fileId}STORAGE Get status for the specific file id
MantleApi.BunkerApipostFilePOST /bunker/{productId}/filesSTORAGE Upload a file
MantleApi.InvitationsApicreateInvitationPOST /invitationsCreate an invitation
MantleApi.InvitationsApideleteInvitationDELETE /invitations/{invitationId}Delete a specific invitation
MantleApi.InvitationsApigetAllInvitationsGET /invitationsGet all invitations
MantleApi.InvitationsApigetInvitationByIdGET /invitations/{invitationId}Get an invitation's details
MantleApi.KeeperApicompareVersionPOST /keeper/{productId}/files/{fileId}/versions/compare/{versionId}VERSIONS Compare a local file to a version
MantleApi.KeeperApicompareWithLatestFileVersionPOST /keeper/{productId}/files/{fileId}/compare/latestFILES Compare a local file to the latest version
MantleApi.KeeperApicompareWithOriginalFilePOST /keeper/{productId}/files/{fileId}/compare/originalFILES Compare a local file to the original version
MantleApi.KeeperApicreateFilePOST /keeper/{productId}/filesFILES Create a file
MantleApi.KeeperApicreateFolderPOST /keeper/{productId}/foldersFOLDERS Create a folder
MantleApi.KeeperApicreateVersionPOST /keeper/{productId}/files/{fileId}/versionsVERSIONS Create a version for an existing file
MantleApi.KeeperApideleteFileByIdDELETE /keeper/{productId}/files/{fileId}FILES Delete a file
MantleApi.KeeperApideleteFolderDELETE /keeper/{productId}/folders/{folderId}FOLDERS Delete a folder
MantleApi.KeeperApidoesFileExistPOST /keeper/{productId}/files/existFILES Check if a file already exists
MantleApi.KeeperApigetAllFilesGET /keeper/{productId}/filesFILES Get all files
MantleApi.KeeperApigetAllFoldersGET /keeper/{productId}/foldersFOLDERS Get all folders
MantleApi.KeeperApigetAllVersionsGET /keeper/{productId}/files/{fileId}/versionsVERSIONS Get all the versions' details for a file
MantleApi.KeeperApigetFileByIdGET /keeper/{productId}/files/{fileId}FILES Get a file's details
MantleApi.KeeperApigetFolderByIdGET /keeper/{productId}/folders/{folderId}FOLDERS Get folder details
MantleApi.KeeperApigetLinkToDownloadOriginalFileGET /keeper/{productId}/files/download/{fileId}FILES Give a link to download the file uploaded to the gcloud bucket
MantleApi.ProductsApigetAllProductsGET /productsGet the products for the authenticated user
MantleApi.ProductsApigetProductByIdGET /products/{productId}Get a product and its settings
MantleApi.ProductsApiupdateKeeperProductPUT /products/keeper/{productId}Update a keeper instance's name
MantleApi.ProductsApiupdateSealerProductPUT /products/sealer/{productId}Update a sealer instance's name
MantleApi.ProductsApiupdateTrackerProductPUT /products/tracker/{productId}Update a tracker instance's name
MantleApi.SealerApicompareContractPOST /sealer/{productId}/contracts/{contractId}/compare/contractCONTRACTS Compare a local contract file
MantleApi.SealerApicompareContractSignaturePOST /sealer/{productId}/contracts/{contractId}/compare/signatureCONTRACTS Compare a local signature
MantleApi.SealerApicompareSignaturePOST /sealer/{productId}/signatures/compare/{signatureId}SIGNATURES Compare a local signature file to a signature
MantleApi.SealerApicompareTemplatePOST /sealer/{productId}/templates/compare/{templateId}TEMPLATES Compare a local template file to the template
MantleApi.SealerApicreateContractPOST /sealer/{productId}/contractsCONTRACTS Create a contract for specified emails
MantleApi.SealerApicreateSignaturePOST /sealer/{productId}/signaturesSIGNATURES Create a signature for the authenticated user
MantleApi.SealerApicreateTemplatePOST /sealer/{productId}/templatesTEMPLATES Create a template
MantleApi.SealerApideleteContractDELETE /sealer/{productId}/contracts/{contractId}CONTRACTS Delete a contract
MantleApi.SealerApideleteTemplateDELETE /sealer/{productId}/templates/{templateId}TEMPLATES Delete a template
MantleApi.SealerApigetAllContractsGET /sealer/{productId}/contractsCONTRACTS Get all the contracts grouped by signer
MantleApi.SealerApigetAllSignaturesGET /sealer/{productId}/signaturesSIGNATURES Get all signatures of the authenticated user’s
MantleApi.SealerApigetAllTemplatesGET /sealer/{productId}/templatesTEMPLATES Get all templates
MantleApi.SealerApigetAuthenticatedUserContractsGET /sealer/{productId}/contracts/selfCONTRACTS Get all of the authenticated user’s contracts
MantleApi.SealerApigetContractsByTemplateIdGET /sealer/{productId}/templates/{templateId}/contractsTEMPLATES Get contracts attached to a template
MantleApi.SealerApigetLinkToDownloadOriginalFileGET /sealer/{productId}/contracts/download/{fileId}CONTRACTS Give a link to download the file uploaded to the gcloud bucket
MantleApi.SealerApigetTemplateByIdGET /sealer/{productId}/templates/{templateId}TEMPLATES Get a template
MantleApi.SealerApisignContractWhenAuthenticatedPOST /sealer/{productId}/contracts/{contractId}/signCONTRACTS Sign a contract
MantleApi.TrackerApicreateAssetPOST /tracker/{productId}/assetsASSETS Create an asset
MantleApi.TrackerApicreateAssetBatchTransferPOST /tracker/{productId}/assets/{assetId}/batches/transferASSETS Create a transfer for one or many batches for an asset
MantleApi.TrackerApicreateAssetTransferPOST /tracker/{productId}/assets/{assetId}/transferASSETS Create a transfer for an asset
MantleApi.TrackerApicreateAssetTransferBulkPOST /tracker/{productId}/assets/transfer/bulkASSETS Create transfers in bulk
MantleApi.TrackerApicreateEntityPOST /tracker/{productId}/entitiesENTITIES Create an entity
MantleApi.TrackerApicreateMultiAssetPOST /tracker/{productId}/multiassetsMULTIASSETS Creates a multi asset
MantleApi.TrackerApicreateMultiAssetBatchTransferPOST /tracker/{productId}/multiassets/{assetId}/batches/transferMULTIASSETS Create a transfer for one or many batches for a multi asset
MantleApi.TrackerApicreateMultiAssetTransferPOST /tracker/{productId}/multiassets/{assetId}/transferMULTIASSETS Create a transfer for a multi asset
MantleApi.TrackerApideleteAssetDELETE /tracker/{productId}/assets/{assetId}ASSETS Delete an asset
MantleApi.TrackerApideleteEntityDELETE /tracker/{productId}/entities/{id}ENTITIES Delete an entity
MantleApi.TrackerApideleteMultiAssetDELETE /tracker/{productId}/multiassets/{assetId}MULTIASSETS Delete a multi asset
MantleApi.TrackerApieditAssetPUT /tracker/{productId}/assets/{assetId}ASSETS Edit an asset
MantleApi.TrackerApieditEntityPUT /tracker/{productId}/entities/{id}ENTITIES Edit an entity
MantleApi.TrackerApieditMultiAssetPUT /tracker/{productId}/multiassets/{assetId}MULTIASSETS Edit a multi asset
MantleApi.TrackerApigetAllAssetsGET /tracker/{productId}/assetsASSETS Get all assets
MantleApi.TrackerApigetAllMultiAssetsGET /tracker/{productId}/multiassetsMULTIASSETS Get all multi assets
MantleApi.TrackerApigetAllTransactionsGET /tracker/{productId}/transactionsTRANSACTIONS Get all transactions
MantleApi.TrackerApigetAssetByIdGET /tracker/{productId}/assets/{assetId}ASSETS Get a specific asset's details
MantleApi.TrackerApigetAssetDetailedBalanceGET /tracker/{productId}/balances/{assetId}BALANCES Get all authenticated user's asset balance batches
MantleApi.TrackerApigetAssetIssuedBatchTransactionsGET /tracker/{productId}/assets/{assetId}/batches/{batchId}/transactionsASSETS Get all transactions of a specific batch for an asset
MantleApi.TrackerApigetAssetIssuedBatchesGET /tracker/{productId}/assets/{assetId}/batchesASSETS Get all issued batches for an asset
MantleApi.TrackerApigetBalancesGET /tracker/{productId}/balancesBALANCES Get all authenticated user's assets balances
MantleApi.TrackerApigetMultiAssetByIdGET /tracker/{productId}/multiassets/{assetId}MULTIASSETS Get a specific multi asset's details
MantleApi.TrackerApigetMultiAssetIssuedBatchTransactionsGET /tracker/{productId}/multiassets/{assetId}/batches/{batchId}/transactionsMULTIASSETS Get all transactions of a specific batch for a multi asset
MantleApi.TrackerApigetMultiAssetIssuedBatchesGET /tracker/{productId}/multiassets/{assetId}/batchesMULTIASSETS Get all issued batches for a multi asset
MantleApi.TrackerApigetOwnedIdentitiesGET /tracker/{productId}/entitiesENTITIES Get all entities of a user
MantleApi.TrackerApigetTransactionsByAssetIdGET /tracker/{productId}/assets/{assetId}/transactionsASSETS Get all transactions for an asset
MantleApi.TrackerApigetTransactionsByMultiAssetIdGET /tracker/{productId}/multiassets/{assetId}/transactionsMULTIASSETS Get all transactions for a multi asset
MantleApi.TrackerApiissueAssetPOST /tracker/{productId}/assets/{assetId}/issueASSETS Issue an amount of an asset
MantleApi.TrackerApiissueAssetBulkPOST /tracker/{productId}/assets/issue/bulkASSETS Issue in bulk
MantleApi.TrackerApiissueMultiAssetPOST /tracker/{productId}/multiassets/{assetId}/issueMULTIASSETS Issue an amount of a multi asset
MantleApi.TrackerApiissueMultiAssetBulkPOST /tracker/{productId}/multiassets/issue/bulkMULTIASSETS Issue multi asset in bulk
MantleApi.TrackerApireversePOST /tracker/{productId}/transactions/{transactionId}/reverseTRANSACTIONS Revert a transaction
MantleApi.UsersApideleteUserDELETE /users/{userId}Delete a user
MantleApi.UsersApidisableUserPUT /users/{userId}/disableDisable a user
MantleApi.UsersApieditUserPUT /users/{userId}Edit a user's details
MantleApi.UsersApienableUserPUT /users/{userId}/enableEnable a user
MantleApi.UsersApigetGET /users/selfGet the authenticated user
MantleApi.UsersApigetAllUsersGET /usersGet all users
MantleApi.UsersApigetUserByIdGET /users/{userId}Get a user

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago