Publisher API Reference
This document provides a concise API reference for the Publisher
class within the Hedera DID SDK for JavaScript. This class is responsible for submitting transactions to the Hedera network.
Class Diagram
The class diagram below illustrates the core methods of the Publisher
interface for interacting with the Hedera network.

Methods
publish
publish(transaction: Transaction): Promise<TransactionReceipt>
Submits the given transaction to the Hedera network.
- Parameters
-
-
transaction
: The transaction to be submitted.
-
- Returns
-
A promise that resolves to the
TransactionReceipt
of the submitted transaction.
Errors
Exception code | Description |
---|---|
|
Hashgraph SDK Client is required to create a Publisher. |
|
Hashgraph SDK Client must be configured with a network. |
|
Hashgraph SDK Client must be configured with an operator account. |
|
Unknown network, ledger ID: #. |
Class Implementation
The Hashgraph DID SDK provides the Publisher
class within its publisher-internal
package. For further details, refer to the @hashgraph-did-sdk-js/publisher-internal
package documentation.