Skip to main content

List Stamps

To list all stamps with the bStamp API, utilize the getAllStamp method from the SDK.


Sample Code Snippet

Here is a JavaScript code snippet demonstrating the use of the getAllStamp method:

import { Bstamp, Network } from 'edeXa-sdk';

async function getAllStamp() {
const bStamp = new Bstamp({
...settings,
authorization: `Bearer ${token}`,
});
const settings = {
network: Network.SANDBOX, // or Network.MAINNET for the mainnet network
};

const dataToStamp = {
hash: 'HASH',
isPrivate: true // or false for public network
}

const version = {
version: API_VERSION.VERSION_1 // or API_VERSION.VERSION_2 for version 2
}

try {
const stamps = await bstamp.getAllStamp(dataToStamp, version);
// Handle success
} catch (error) {
// Handle error
}
}


Key Points to Note

  • Asynchronous Function: The addStamp function operates as an asynchronous (async) function, leveraging await to hold execution until the bstamp.addStamp promise completes.
  • Token Replacement: Make sure to replace token used in Authorization with your token, which you will get in response of authentication method

Request Parameters

ParameterRequiredTypeDescription
hashYesStringEnter your hash value
isPrivateYesBooleanGet from private or public network
versionYesStringUse a specific available version of bStamp

Response Format

KeyTypeDescription
idStringUnique identifier for the stamp
userIdStringID of the user who created the stamp
clientIdStringID for the client application that created the stamp
blockchainIdStringID of the blockchain where the stamp is recorded
nameStringName of the stamp
txIdStringTransaction ID on the blockchain for the stamp
hashStringHash value of the stamped document or data
typeStringType or classification of the stamped content
codeStringAdditional identifier or code for the stamp
originalDocHashStringOriginal hash of the document before stamping
isEsignBooleanIndicates if the document includes an electronic signature
isPrivateBcBooleanIndicates if the stamp was recorded on a private blockchain
createdAtStringTimestamp when the stamp record was created
updatedAtStringTimestamp of the last update to the stamp record