@mantle-lib/api v1.0.2
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/
Class | Method | HTTP request | Description |
---|---|---|---|
MantleApi.ApiKeysApi | createApiKey | POST /apikeys | Create an API key for a specific user |
MantleApi.ApiKeysApi | deleteApiKey | DELETE /apikeys/{userId} | Delete the API key for a specific user |
MantleApi.ApiKeysApi | getAllApiKeys | GET /apikeys | Get all generated api keys |
MantleApi.BunkerApi | downloadFileById | GET /bunker/{productId}/files/{fileId} | STORAGE Download a specific file |
MantleApi.BunkerApi | getAllFilesIds | GET /bunker/{productId}/files | STORAGE Get all files |
MantleApi.BunkerApi | getFileStatus | GET /bunker/{productId}/files/status/{fileId} | STORAGE Get status for the specific file id |
MantleApi.BunkerApi | postFile | POST /bunker/{productId}/files | STORAGE Upload a file |
MantleApi.InvitationsApi | createInvitation | POST /invitations | Create an invitation |
MantleApi.InvitationsApi | deleteInvitation | DELETE /invitations/{invitationId} | Delete a specific invitation |
MantleApi.InvitationsApi | getAllInvitations | GET /invitations | Get all invitations |
MantleApi.InvitationsApi | getInvitationById | GET /invitations/{invitationId} | Get an invitation's details |
MantleApi.KeeperApi | compareVersion | POST /keeper/{productId}/files/{fileId}/versions/compare/{versionId} | VERSIONS Compare a local file to a version |
MantleApi.KeeperApi | compareWithLatestFileVersion | POST /keeper/{productId}/files/{fileId}/compare/latest | FILES Compare a local file to the latest version |
MantleApi.KeeperApi | compareWithOriginalFile | POST /keeper/{productId}/files/{fileId}/compare/original | FILES Compare a local file to the original version |
MantleApi.KeeperApi | createFile | POST /keeper/{productId}/files | FILES Create a file |
MantleApi.KeeperApi | createFolder | POST /keeper/{productId}/folders | FOLDERS Create a folder |
MantleApi.KeeperApi | createVersion | POST /keeper/{productId}/files/{fileId}/versions | VERSIONS Create a version for an existing file |
MantleApi.KeeperApi | deleteFileById | DELETE /keeper/{productId}/files/{fileId} | FILES Delete a file |
MantleApi.KeeperApi | deleteFolder | DELETE /keeper/{productId}/folders/{folderId} | FOLDERS Delete a folder |
MantleApi.KeeperApi | doesFileExist | POST /keeper/{productId}/files/exist | FILES Check if a file already exists |
MantleApi.KeeperApi | getAllFiles | GET /keeper/{productId}/files | FILES Get all files |
MantleApi.KeeperApi | getAllFolders | GET /keeper/{productId}/folders | FOLDERS Get all folders |
MantleApi.KeeperApi | getAllVersions | GET /keeper/{productId}/files/{fileId}/versions | VERSIONS Get all the versions' details for a file |
MantleApi.KeeperApi | getFileById | GET /keeper/{productId}/files/{fileId} | FILES Get a file's details |
MantleApi.KeeperApi | getFolderById | GET /keeper/{productId}/folders/{folderId} | FOLDERS Get folder details |
MantleApi.KeeperApi | getLinkToDownloadOriginalFile | GET /keeper/{productId}/files/download/{fileId} | FILES Give a link to download the file uploaded to the gcloud bucket |
MantleApi.ProductsApi | getAllProducts | GET /products | Get the products for the authenticated user |
MantleApi.ProductsApi | getProductById | GET /products/{productId} | Get a product and its settings |
MantleApi.ProductsApi | updateKeeperProduct | PUT /products/keeper/{productId} | Update a keeper instance's name |
MantleApi.ProductsApi | updateSealerProduct | PUT /products/sealer/{productId} | Update a sealer instance's name |
MantleApi.ProductsApi | updateTrackerProduct | PUT /products/tracker/{productId} | Update a tracker instance's name |
MantleApi.SealerApi | compareContract | POST /sealer/{productId}/contracts/{contractId}/compare/contract | CONTRACTS Compare a local contract file |
MantleApi.SealerApi | compareContractSignature | POST /sealer/{productId}/contracts/{contractId}/compare/signature | CONTRACTS Compare a local signature |
MantleApi.SealerApi | compareSignature | POST /sealer/{productId}/signatures/compare/{signatureId} | SIGNATURES Compare a local signature file to a signature |
MantleApi.SealerApi | compareTemplate | POST /sealer/{productId}/templates/compare/{templateId} | TEMPLATES Compare a local template file to the template |
MantleApi.SealerApi | createContract | POST /sealer/{productId}/contracts | CONTRACTS Create a contract for specified emails |
MantleApi.SealerApi | createSignature | POST /sealer/{productId}/signatures | SIGNATURES Create a signature for the authenticated user |
MantleApi.SealerApi | createTemplate | POST /sealer/{productId}/templates | TEMPLATES Create a template |
MantleApi.SealerApi | deleteContract | DELETE /sealer/{productId}/contracts/{contractId} | CONTRACTS Delete a contract |
MantleApi.SealerApi | deleteTemplate | DELETE /sealer/{productId}/templates/{templateId} | TEMPLATES Delete a template |
MantleApi.SealerApi | getAllContracts | GET /sealer/{productId}/contracts | CONTRACTS Get all the contracts grouped by signer |
MantleApi.SealerApi | getAllSignatures | GET /sealer/{productId}/signatures | SIGNATURES Get all signatures of the authenticated user’s |
MantleApi.SealerApi | getAllTemplates | GET /sealer/{productId}/templates | TEMPLATES Get all templates |
MantleApi.SealerApi | getAuthenticatedUserContracts | GET /sealer/{productId}/contracts/self | CONTRACTS Get all of the authenticated user’s contracts |
MantleApi.SealerApi | getContractsByTemplateId | GET /sealer/{productId}/templates/{templateId}/contracts | TEMPLATES Get contracts attached to a template |
MantleApi.SealerApi | getLinkToDownloadOriginalFile | GET /sealer/{productId}/contracts/download/{fileId} | CONTRACTS Give a link to download the file uploaded to the gcloud bucket |
MantleApi.SealerApi | getTemplateById | GET /sealer/{productId}/templates/{templateId} | TEMPLATES Get a template |
MantleApi.SealerApi | signContractWhenAuthenticated | POST /sealer/{productId}/contracts/{contractId}/sign | CONTRACTS Sign a contract |
MantleApi.TrackerApi | createAsset | POST /tracker/{productId}/assets | ASSETS Create an asset |
MantleApi.TrackerApi | createAssetBatchTransfer | POST /tracker/{productId}/assets/{assetId}/batches/transfer | ASSETS Create a transfer for one or many batches for an asset |
MantleApi.TrackerApi | createAssetTransfer | POST /tracker/{productId}/assets/{assetId}/transfer | ASSETS Create a transfer for an asset |
MantleApi.TrackerApi | createAssetTransferBulk | POST /tracker/{productId}/assets/transfer/bulk | ASSETS Create transfers in bulk |
MantleApi.TrackerApi | createEntity | POST /tracker/{productId}/entities | ENTITIES Create an entity |
MantleApi.TrackerApi | createMultiAsset | POST /tracker/{productId}/multiassets | MULTIASSETS Creates a multi asset |
MantleApi.TrackerApi | createMultiAssetBatchTransfer | POST /tracker/{productId}/multiassets/{assetId}/batches/transfer | MULTIASSETS Create a transfer for one or many batches for a multi asset |
MantleApi.TrackerApi | createMultiAssetTransfer | POST /tracker/{productId}/multiassets/{assetId}/transfer | MULTIASSETS Create a transfer for a multi asset |
MantleApi.TrackerApi | deleteAsset | DELETE /tracker/{productId}/assets/{assetId} | ASSETS Delete an asset |
MantleApi.TrackerApi | deleteEntity | DELETE /tracker/{productId}/entities/{id} | ENTITIES Delete an entity |
MantleApi.TrackerApi | deleteMultiAsset | DELETE /tracker/{productId}/multiassets/{assetId} | MULTIASSETS Delete a multi asset |
MantleApi.TrackerApi | editAsset | PUT /tracker/{productId}/assets/{assetId} | ASSETS Edit an asset |
MantleApi.TrackerApi | editEntity | PUT /tracker/{productId}/entities/{id} | ENTITIES Edit an entity |
MantleApi.TrackerApi | editMultiAsset | PUT /tracker/{productId}/multiassets/{assetId} | MULTIASSETS Edit a multi asset |
MantleApi.TrackerApi | getAllAssets | GET /tracker/{productId}/assets | ASSETS Get all assets |
MantleApi.TrackerApi | getAllMultiAssets | GET /tracker/{productId}/multiassets | MULTIASSETS Get all multi assets |
MantleApi.TrackerApi | getAllTransactions | GET /tracker/{productId}/transactions | TRANSACTIONS Get all transactions |
MantleApi.TrackerApi | getAssetById | GET /tracker/{productId}/assets/{assetId} | ASSETS Get a specific asset's details |
MantleApi.TrackerApi | getAssetDetailedBalance | GET /tracker/{productId}/balances/{assetId} | BALANCES Get all authenticated user's asset balance batches |
MantleApi.TrackerApi | getAssetIssuedBatchTransactions | GET /tracker/{productId}/assets/{assetId}/batches/{batchId}/transactions | ASSETS Get all transactions of a specific batch for an asset |
MantleApi.TrackerApi | getAssetIssuedBatches | GET /tracker/{productId}/assets/{assetId}/batches | ASSETS Get all issued batches for an asset |
MantleApi.TrackerApi | getBalances | GET /tracker/{productId}/balances | BALANCES Get all authenticated user's assets balances |
MantleApi.TrackerApi | getMultiAssetById | GET /tracker/{productId}/multiassets/{assetId} | MULTIASSETS Get a specific multi asset's details |
MantleApi.TrackerApi | getMultiAssetIssuedBatchTransactions | GET /tracker/{productId}/multiassets/{assetId}/batches/{batchId}/transactions | MULTIASSETS Get all transactions of a specific batch for a multi asset |
MantleApi.TrackerApi | getMultiAssetIssuedBatches | GET /tracker/{productId}/multiassets/{assetId}/batches | MULTIASSETS Get all issued batches for a multi asset |
MantleApi.TrackerApi | getOwnedIdentities | GET /tracker/{productId}/entities | ENTITIES Get all entities of a user |
MantleApi.TrackerApi | getTransactionsByAssetId | GET /tracker/{productId}/assets/{assetId}/transactions | ASSETS Get all transactions for an asset |
MantleApi.TrackerApi | getTransactionsByMultiAssetId | GET /tracker/{productId}/multiassets/{assetId}/transactions | MULTIASSETS Get all transactions for a multi asset |
MantleApi.TrackerApi | issueAsset | POST /tracker/{productId}/assets/{assetId}/issue | ASSETS Issue an amount of an asset |
MantleApi.TrackerApi | issueAssetBulk | POST /tracker/{productId}/assets/issue/bulk | ASSETS Issue in bulk |
MantleApi.TrackerApi | issueMultiAsset | POST /tracker/{productId}/multiassets/{assetId}/issue | MULTIASSETS Issue an amount of a multi asset |
MantleApi.TrackerApi | issueMultiAssetBulk | POST /tracker/{productId}/multiassets/issue/bulk | MULTIASSETS Issue multi asset in bulk |
MantleApi.TrackerApi | reverse | POST /tracker/{productId}/transactions/{transactionId}/reverse | TRANSACTIONS Revert a transaction |
MantleApi.UsersApi | deleteUser | DELETE /users/{userId} | Delete a user |
MantleApi.UsersApi | disableUser | PUT /users/{userId}/disable | Disable a user |
MantleApi.UsersApi | editUser | PUT /users/{userId} | Edit a user's details |
MantleApi.UsersApi | enableUser | PUT /users/{userId}/enable | Enable a user |
MantleApi.UsersApi | get | GET /users/self | Get the authenticated user |
MantleApi.UsersApi | getAllUsers | GET /users | Get all users |
MantleApi.UsersApi | getUserById | GET /users/{userId} | Get a user |
Documentation for Models
- MantleApi.AnonymousApiKeyResponse
- MantleApi.AssetBalance
- MantleApi.AssetIssueResponse
- MantleApi.AssetTransaction
- MantleApi.Batch
- MantleApi.BreadcrumbingCompareResponse
- MantleApi.BunkerCreateFileResp
- MantleApi.BunkerFileResp
- MantleApi.Contract
- MantleApi.ContractSignatureDiffResponse
- MantleApi.CreateApiKeyRequest
- MantleApi.CreateEntityRequest
- MantleApi.EditUserRequest
- MantleApi.File
- MantleApi.HttpExposedError
- MantleApi.IFormFile
- MantleApi.Invitation
- MantleApi.InvitationCreateRequest
- MantleApi.InvitationSignUpResponse
- MantleApi.IssuedBatchTransactionsResponse
- MantleApi.IssuedBatchesResponse
- MantleApi.KeeperFile
- MantleApi.KeeperFileVersion
- MantleApi.KeeperFolder
- MantleApi.KeeperFolderCreateRequest
- MantleApi.KeeperProductSubscription
- MantleApi.MultiStatusResult
- MantleApi.NonUser
- MantleApi.NonUserResponse
- MantleApi.ProductMenuOption
- MantleApi.ProductSubscription
- MantleApi.SealerBreadcrumbingCompareResponse
- MantleApi.SealerProductSubscription
- MantleApi.SealerProductSubscriptionSettings
- MantleApi.Signature
- MantleApi.SubAssetIdentity
- MantleApi.Template
- MantleApi.TrackerAsset
- MantleApi.TrackerAssetCreateRequest
- MantleApi.TrackerAssetIssueBulkRequest
- MantleApi.TrackerAssetIssueRequest
- MantleApi.TrackerAssetIssueResponse
- MantleApi.TrackerBatchTransferBulkRequest
- MantleApi.TrackerBatchTransferBulkResponse
- MantleApi.TrackerBatchTransferRequest
- MantleApi.TrackerMultiAsset
- MantleApi.TrackerMultiAssetCreateRequest
- MantleApi.TrackerProductSubscription
- MantleApi.TrackerTransferRequest
- MantleApi.UpdateEntityRequest
- MantleApi.UpdateKeeperProductRequest
- MantleApi.UpdateSealerProductRequest
- MantleApi.UpdateTrackerProductRequest
- MantleApi.User
Documentation for Authorization
All endpoints do not require authorization.