WoleetApi - JavaScript client for woleet_api
Welcome to Woleet API reference documentation.
It is highly recommanded to read the chapters introducing Woleet API concepts before reading this documentation.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.13.0
- Package version: 1.13.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://www.woleet.io/
For Node.js
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install woleet_api --save
Finally, you need to build the module:
npm run build
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
To use the link you just defined in your project, switch to the directory you want to use your woleet_api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finally, you need to build the module:
npm run build
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
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.
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Please follow the installation instruction and execute the following JS code:
var WoleetApi = require('woleet_api');
var defaultClient = WoleetApi.ApiClient.instance;
// Configure HTTP basic authorization: BasicAuth
var BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME'
BasicAuth.password = 'YOUR PASSWORD'
// Configure API key authorization: JWTAuth
var JWTAuth = defaultClient.authentications['JWTAuth'];
JWTAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWTAuth.apiKeyPrefix['Authorization'] = "Token"
var api = new WoleetApi.AnchorApi()
var anchor = new WoleetApi.Anchor(); // {Anchor} Anchor object to create.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createAnchor(anchor, callback);
All URIs are relative to https://api.woleet.io/v1
Class | Method | HTTP request | Description |
---|---|---|---|
WoleetApi.AnchorApi | createAnchor | POST /anchor | Create a new anchor. |
WoleetApi.AnchorApi | deleteAnchor | DELETE /anchor/{anchorId} | Delete an anchor. |
WoleetApi.AnchorApi | getAnchor | GET /anchor/{anchorId} | Get an anchor by its identifier. |
WoleetApi.AnchorApi | getAnchorAttestation | GET /anchor/{anchorId}/attestation | Download the Proof Attestation document of an anchor. |
WoleetApi.AnchorApi | searchAnchorIds | GET /anchorIds | Search for public anchor identifiers. |
WoleetApi.AnchorApi | searchAnchors | GET /anchors | Search for anchors. |
WoleetApi.AnchorApi | updateAnchor | PUT /anchor/{anchorId} | Update an anchor. |
WoleetApi.ReceiptApi | getOTSReceipt | GET /receipt/{anchorId}/ots | Get the proof receipt of an anchor (OpenTimestamps proof format). |
WoleetApi.ReceiptApi | getReceipt | GET /receipt/{anchorId} | Get the proof receipt of an anchor. |
WoleetApi.ReceiptApi | verifyReceipt | POST /receipt/verify | Verify a proof receipt. |
WoleetApi.SignatureRequestApi | createSignatureRequest | POST /signatureRequest | Create a new signature request. |
WoleetApi.SignatureRequestApi | delegateSignSignatureRequest | POST /signatureRequest/{requestId}/delegate | Sign a signature request by delegating the signature. |
WoleetApi.SignatureRequestApi | deleteSignatureRequest | DELETE /signatureRequest/{requestId} | Delete a signature request. |
WoleetApi.SignatureRequestApi | downloadSignatureRequestFile | GET /signatureRequest/{requestId}/file | Download the file to sign. |
WoleetApi.SignatureRequestApi | getSignatureRequest | GET /signatureRequest/{requestId} | Get a signature request by its identifier. |
WoleetApi.SignatureRequestApi | getSignatureRequestAttestation | GET /signatureRequest/{requestId}/attestation | Download the Signature Attestation document of a signature request. |
WoleetApi.SignatureRequestApi | getSignatureRequestProofBundle | GET /signatureRequest/{requestId}/proofbundle | Get the proof bundle of a signature request. |
WoleetApi.SignatureRequestApi | reportSignatureRequestEvent | POST /signatureRequest/{requestId}/event | Report an event on a signature request. |
WoleetApi.SignatureRequestApi | reportSignatureRequestFeedback | POST /signatureRequest/{requestId}/feedback | Report a feedback about a signature request. |
WoleetApi.SignatureRequestApi | searchSignatureRequestIds | GET /signatureRequestIds | Search for public signature request identifiers. |
WoleetApi.SignatureRequestApi | searchSignatureRequests | GET /signatureRequests | Search for signature requests. |
WoleetApi.SignatureRequestApi | sendSignatureRequestOTP | GET /signatureRequest/{requestId}/otp/{signeeId} | Generate and send an OTP to a signer of a signature request. |
WoleetApi.SignatureRequestApi | sendSignatureRequestReminder | POST /signatureRequest/{requestId}/remind | Send a reminder email to a set of signers of a signature request. |
WoleetApi.SignatureRequestApi | signSignatureRequest | POST /signatureRequest/{requestId}/sign | Sign a signature request by registering a signature. |
WoleetApi.SignatureRequestApi | transitionSignatureRequest | POST /signatureRequest/{requestId}/transition | Change the state of a signature request. |
WoleetApi.SignatureRequestApi | updateSignatureRequest | PUT /signatureRequest/{requestId} | Update a signature request. |
WoleetApi.SignatureRequestApi | uploadSignatureRequestFile | POST /signatureRequest/{requestId}/file | Upload the file to sign. |
WoleetApi.TokenApi | generateToken | GET /token | Generate a JWT token. |
WoleetApi.TokenApi | revokeToken | DELETE /token | Revoke a JWT token. |
WoleetApi.UserApi | getCallbackSecret | GET /user/callbackSecret | Get the current callback secret (null if not set). |
WoleetApi.UserApi | getCredits | GET /user/credits | Get user's credits. |
WoleetApi.UserApi | getTokens | GET /user/tokens | Get user's registered JWT tokens. |
WoleetApi.UserApi | putTokens | PUT /user/tokens | Update user's registered JWT tokens. |
WoleetApi.UserApi | updateCallbackSecret | PUT /user/callbackSecret | Generates a new callback secret. |
- WoleetApi.Anchor
- WoleetApi.AnchorIds
- WoleetApi.Anchors
- WoleetApi.AuthorizedSignee
- WoleetApi.CallbackSecret
- WoleetApi.Credits
- WoleetApi.Identity
- WoleetApi.IdentityVerificationStatus
- WoleetApi.Key
- WoleetApi.Receipt
- WoleetApi.ReceiptAnchorsNode
- WoleetApi.ReceiptProofNode
- WoleetApi.ReceiptSignature
- WoleetApi.ReceiptVerificationStatus
- WoleetApi.SignatureRequest
- WoleetApi.SignatureRequestDelegate
- WoleetApi.SignatureRequestEvent
- WoleetApi.SignatureRequestFeedback
- WoleetApi.SignatureRequestIds
- WoleetApi.SignatureRequestProofBundle
- WoleetApi.SignatureRequestSign
- WoleetApi.SignatureRequestSignResult
- WoleetApi.SignatureRequestState
- WoleetApi.SignatureRequests
- WoleetApi.SignatureVerificationStatus
- WoleetApi.SignedIdentity
- WoleetApi.TimestampVerificationStatus
- WoleetApi.Token
- WoleetApi.Tokens
- WoleetApi.Watcher
- WoleetApi.X500Name
- WoleetApi.X509SubjectIssuer
- Type: HTTP basic authentication
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header