
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@hashgraph/asset-tokenization-sdk
Advanced tools
The SDK enables the web (or any other client facing application) to interact with the smart contracts deployed on Hedera.
Run the command :
npm ci
Run the command :
npm run build
The SDK tests are located in the tests folder at the root of the sdk module.
Before running the tests you will need to create an ".env" file following the ".env.sample" template.
Then to execute all the tests run this command from the sdk folder:
npm run test
Initialises the SDK.
Request
Response
Connects an account to the SDK.
Request
Response
Disconnects an account from the SDK.
Request
Response : True (success), false (failed)
Sets a new network into the SDK.
Request
Response
Sets a new configuration into the SDK.
Request
Response
Request
Response
Creates a new coupon for the bond.
Request
Response
Request
Response
Creates a new dividend for the equity.
Request
Response
Creates a new voting right for the equity.
Request
Response
Mints new assets to a given account
Request
Response
Redeems assets
Request
Response
Redeems assets from a given account
Request
Response
Transfer assets from a given account
Request
Response
Pauses the Security (can only be executed if the security is not paused)
Request
Response
Unpauses the Security (can only be executed if the security is paused)
Request
Response
Adds an account to the control list (either blacklist or whitelist depending on how the asset was configured during deployment)
Request
Response
Removes an account from the control list (either blacklist or whitelist depending on how the asset was configured during deployment)
Transfer fund to an account
Request
Response
Transfer fund to an account and locks them for a given amount of time
Request
Response
Updates the max supply. Setting max supply to "0" means removing it (unllimited max supply).
Request
Response
Locks funds into an account for a certain period of time
Request
Response
Releases locked funds from an account
Request
Response
Creates a new hold for a specific partition by the token holder.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.escrow: Address of the escrow account.amount: Amount to be held.targetId: Identifier of the target account.expirationDate: Date when the hold expires.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Similar to "Create Hold From by Partition", but can only be executed by accounts with the "Controller Role". Control list restrictions do not apply.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.escrow: Address of the escrow account.amount: Amount to be held.sourceId: Identifier of the source account.targetId: Identifier of the target account.expirationDate: Date when the hold expires.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Similar to "Create Hold by Partition", but can only be executed by an authorized ERC20 account on behalf of the token holder.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.escrow: Address of the escrow account.amount: Amount to be held.sourceId: Identifier of the source account.targetId: Identifier of the target account.expirationDate: Date when the hold expires.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Similar to "Create Hold by Partition", but can only be executed when partitions are protected. Only one of these two methods can be used depending on the partition protection status. Additional fields are required.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.escrow: Address of the escrow account.amount: Amount to be held.sourceId: Identifier of the source account.targetId: Identifier of the target account.expirationDate: Date when the hold expires.deadline: Deadline for the hold execution.nonce: Unique identifier for the request.signature: Digital signature verifying the request.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Can be executed by anyone, but only after the expiration date. Transfers all remaining hold assets back to the original account.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.holdId: Identifier of the hold.targetId: Identifier of the target account.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Can only be executed by the escrow account. Transfers all or part of the held assets back to the original account.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.holdId: Identifier of the hold.targetId: Identifier of the target account.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Creates a new clearing hold for a specific partition by the token holder.
Request:
securityId: Identifier of the security token.partitionId: Identifier of the token partition.escrow: Address of the escrow account.amount: Amount to be held.targetId: Identifier of the target account.clearingExpirationDate: Date when the clearing expires.holdExpirationDate: Date when the hold expires.Response:
payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Similar to "Clearing Create Hold by Partition", but can only be executed by an authorized ERC20 account on behalf of the token holder.
Request:
securityId: Identifier of the security token.partitionId: Identifier of the token partition.escrow: Address of the escrow account.amount: Amount to be held.sourceId: Identifier of the source account.targetId: Identifier of the target account.clearingExpirationDate: Date when the clearing expires.holdExpirationDate: Date when the hold expires.Response:
payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Similar to "Clearing Create Hold by Partition", but can only be executed when partitions are protected. Only one of these two methods can be used depending on the partition protection status. Additional fields are required.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.escrow: Address of the escrow account.amount: Amount to be held.sourceId: Identifier of the source account.targetId: Identifier of the target account.clearingExpirationDate: Date when the clearing expires.holdExpirationDate: Date when the hold expires.deadline: Deadline for the hold execution.nonce: Unique identifier for the request.signature: Digital signature verifying the request.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Creates a new clearing transfer for a specific partition by the token holder.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.amount: Amount to be held.targetId: Identifier of the target account.expirationDate: Date when the clearing expires.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Similar to "Clearing Transfer by Partition", but can only be executed by an authorized ERC20 account on behalf of the token holder.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.amount: Amount to be held.sourceId: Identifier of the source account.targetId: Identifier of the target account.expirationDate: Date when the clearing expires.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Similar to "Clearing Transfer by Partition", but can only be executed when partitions are protected. Only one of these two methods can be used depending on the partition protection status. Additional fields are required.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.amount: Amount to be held.sourceId: Identifier of the source account.targetId: Identifier of the target account.expirationDate: Date when the clearing expires.deadline: Deadline for the hold execution.nonce: Unique identifier for the request.signature: Digital signature verifying the request.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Creates a new clearing redeem for a specific partition by the token holder.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.amount: Amount to be held.expirationDate: Date when the clearing expires.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Similar to "Clearing Redeem by Partition", but can only be executed by an authorized ERC20 account on behalf of the token holder.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.sourceId: Identifier of the source account.amount: Amount to be held.expirationDate: Date when the clearing expires.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Similar to "Clearing Redeem by Partition", but can only be executed when partitions are protected. Only one of these two methods can be used depending on the partition protection status. Additional fields are required.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.amount: Amount to be held.sourceId: Identifier of the source account.expirationDate: Date when the clearing expires.deadline: Deadline for the hold execution.nonce: Unique identifier for the request.signature: Digital signature verifying the request.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Approve the execution of a clearing transaction. Depending on the operation type, a hold will be created or a transfer or redemption will be made.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.targetId: Identifier of the target account.clearingId: Identifier of the clearing.clearingOperationType: Type of operation to perform.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Cancel the execution of a clearing operation. Transfers all assets back to the original account.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.targetId: Identifier of the target account.clearingId: Identifier of the clearing.clearingOperationType: Type of operation to perform.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Can be executed by anyone, but only after the expiration date. Transfers all assets back to the original account.
securityId: Identifier of the security token.partitionId: Identifier of the token partition.targetId: Identifier of the target account.clearingId: Identifier of the clearing.clearingOperationType: Type of operation to perform.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Grant KYC from a target account.
securityId: Identifier of the security token.targetId: Identifier of the target account.vcBase64: Verifiable Credentials (VC) in base64 formatpayload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Revoke KYC from a target account.
Request:
securityId: Identifier of the security token.targetId: Identifier of the target account.Response:
payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Activate internal KYC of a security.
Request:
securityId: Identifier of the security token.Response:
payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Deactivate internal KYC of a security.
securityId: Identifier of the security token.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Add a new issuer (will fail if it already exists).
securityId: Identifier of the security token.issuerId: Identifier of the Issuer.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Remove an existing issuer.
securityId: Identifier of the security token.issuerId: Identifier of the existing Issuer.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Add revocation registry address.
securityId: Identifier of the security token.revocationRegistryId: Identifier of the Revocation Registry.payload: true (success) or false (failed).transactionId: ID of the Hedera transaction, which can be used for tracking in any Hedera block explorer.Assigns a new set of roles for a given account
Request
Response
Grants a role to an account
Request
Response
Revokes a role from an account
Request
Response
Adds a new external pause address to a specific asset.
Request
Response
Removes an existing external pause address from a specific asset.
Request
Response
Updates the active status of multiple external pause addresses for a specific asset.
Request
Response
Adds a new external control list address to a specific asset.
Request
Response
Removes an existing external control list address from a specific asset.
Request
Response
Updates the active status of multiple external control list addresses for a specific asset.
Request
Response
Adds a new external kyc list address to a specific asset.
Request
Response
Removes an existing external kyc list address from a specific asset.
Request
Response
Updates the active status of multiple external kyc list addresses for a specific asset.
Request
Response
Returns the details of a specific regulation and subregulation.
Request
Response
Registers callbacks for the wallet events emitted by the SDK
Request : callbacks to the wallet events (walletInit, walletFound, …)
Response : -
The first thing you have to do when using the SDK is to :
Use the Network.init method, with the following input data:
Use the Network.connect method, with the following input data:
Use the Bond.Create method.
Use the Equity.Create method.
Use the Factory.getRegulationDetails method.
FAQs
Testing to MASTER
We found that @hashgraph/asset-tokenization-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.