NotarizationClient
@iota/notarization API documentation
Class: NotarizationClient
A client to interact with Notarization objects on the IOTA ledger.
This client is used for read and write operations. For read-only capabilities, you can use NotarizationClientReadOnly, which does not require an account or signing capabilities.
Methods
create()
staticcreate(client,signer):Promise<NotarizationClient>
Creates a new notarization client.
Arguments
client- A read-only notarization client.signer- A transaction signer for signing operations.
Returns
A TransactionBuilder to build and execute the transaction.
Parameters
client
signer
TransactionSigner
Returns
Promise<NotarizationClient>
senderPublicKey()
senderPublicKey():
PublicKey
Retrieves the sender's public key.
Returns
The sender's public key as PublicKey.
Returns
PublicKey
senderAddress()
senderAddress():
string
Retrieves the sender's address.
Returns
The sender's address as a IotaAddress.
Returns
string
network()
network():
string
Retrieves the network identifier.
Returns
The network identifier as a string.
Returns
string
packageId()
packageId():
string
Retrieves the package ID.
Returns
The package ID as a string.
Returns
string
packageHistory()
packageHistory():
string[]
Retrieves the package history.
Returns
An Array<string> containing the package history.
Returns
string[]
iotaClient()
iotaClient():
IotaClient
Retrieves the IOTA client instance.
Returns
The IotaClient instance.
Returns
IotaClient
signer()
signer():
TransactionSigner
Retrieves the transaction signer.
Returns
The TransactionSigner instance.
Returns
TransactionSigner
readOnly()
readOnly():
NotarizationClientReadOnly
Retrieves a read-only version of the notarization client.
Returns
A NotarizationClientReadOnly instance.
Returns
createDynamic()
createDynamic():
NotarizationBuilderDynamic
Creates a dynamic notarization builder
Returns
A NotarizationBuilderDynamic instance.
Returns
createLocked()
createLocked():
NotarizationBuilderLocked
Creates a locked notarization builder.
Returns
A NotarizationBuilderLocked instance.
Returns
updateState()
updateState(
state,object_id):any
Creates a transaction to update the state of a dynamic notarization.
Arguments
state- The new state to update.object_id- The ID of the dynamic notarization object.
Returns
A TransactionBuilder to build and execute the transaction.
Parameters
state
object_id
string
Returns
any
updateMetadata()
updateMetadata(
metadata,object_id):any
Creates a transaction to update the metadata of a notarization.
Arguments
metadata- The new metadata to update (optional).object_id- The ID of the notarization object.
Returns
A TransactionBuilder to build and execute the transaction.
Parameters
metadata
undefined | null | string
object_id
string
Returns
any
destroy()
destroy(
object_id):any
Creates a transaction to destroy a notarization object on the ledger.
Arguments
object_id- The ID of the notarization object to destroy.
Returns
A TransactionBuilder to build and execute the transaction.
Parameters
object_id
string
Returns
any
transferNotarization()
transferNotarization(
object_id,recipient):any
Creates a transaction to transfer a notarization object to a new owner.
Arguments
object_id- The ID of the notarization object to transfer.recipient- The recipient's IOTA address.
Returns
A TransactionBuilder to build and execute the transaction.
Parameters
object_id
string
recipient
string
Returns
any