NotarizationClientReadOnly
@iota/notarization API documentation
Class: NotarizationClientReadOnly
A client to interact with Notarization objects on the IOTA ledger.
This client is used for read-only operations, meaning it does not require an account or signing capabilities. For write operations, use NotarizationClient.
Methods
create()
static
create(iota_client
):Promise
<NotarizationClientReadOnly
>
Creates a new instance of otarizationClientReadOnly
.
Arguments
iota_client
- The IOTA client used for interacting with the ledger.
Returns
A new NotarizationClientReadOnly
instance.
Parameters
iota_client
IotaClient
Returns
Promise
<NotarizationClientReadOnly
>
createWithPkgId()
static
createWithPkgId(iota_client
,iota_notarization_pkg_id
):Promise
<NotarizationClientReadOnly
>
Creates a new instance of NotarizationClientReadOnly
using a specific package ID.
Arguments
iota_client
- The IOTA client used for interacting with the ledger.iota_notarization_pkg_id
- The notarization package ID.
Returns
A new NotarizationClientReadOnly
instance.
Parameters
iota_client
IotaClient
iota_notarization_pkg_id
string
Returns
Promise
<NotarizationClientReadOnly
>
packageId()
packageId():
string
Retrieves the package ID of the used notarization package.
Returns
A string representing the package ID.
Returns
string
packageHistory()
packageHistory():
string
[]
Retrieves the history of notarization package IDs.
Returns
An array of strings representing the package history.
Returns
string
[]
iotaClient()
iotaClient():
IotaClient
Retrieves the underlying IOTA client used by this client.
Returns
The IotaClient
instance.
Returns
IotaClient
network()
network():
string
Retrieves the network identifier associated with this client.
Returns
A string representing the network identifier.
Returns
string
chainId()
chainId():
string
Retrieves the chain ID associated with this client.
Returns
A string representing the chain ID.
Returns
string
lastStateChangeTs()
lastStateChangeTs(
notarized_object_id
):Promise
<bigint
>
Retrieves the timestamp of the last state change for a notarization.
Arguments
notarized_object_id
- The ID of the notarization object.
Returns
The timestamp as number
value representing the seconds since the Unix epoch.
Parameters
notarized_object_id
string
Returns
Promise
<bigint
>
createdAtTs()
createdAtTs(
notarized_object_id
):Promise
<bigint
>
Retrieves the creation timestamp for a notarization.
Arguments
notarized_object_id
- The ID of the notarization object.
Returns
The timestamp as number
value representing the seconds since the Unix epoch.
Parameters
notarized_object_id
string
Returns
Promise
<bigint
>
stateVersionCount()
stateVersionCount(
notarized_object_id
):Promise
<bigint
>
Retrieves the count of state versions for a notarization.
Arguments
notarized_object_id
- The ID of a notarization object.
Returns
Count as number
value.
Parameters
notarized_object_id
string
Returns
Promise
<bigint
>
description()
description(
notarized_object_id
):Promise
<undefined
|string
>
Retrieves the description of a notarization.
Arguments
notarized_object_id
- The ID of a notarization object.
Returns
A description string, if existing.
Parameters
notarized_object_id
string
Returns
Promise
<undefined
| string
>
updatableMetadata()
updatableMetadata(
notarized_object_id
):Promise
<undefined
|string
>
Retrieves the updatable metadata of a notarization.
Arguments
notarized_object_id
- The ID of a notarization object.
Returns
A metadata string, if existing.
Parameters
notarized_object_id
string
Returns
Promise
<undefined
| string
>
notarizationMethod()
notarizationMethod(
notarized_object_id
):Promise
<NotarizationMethod
>
Retrieves the notarization method of a notarization.
Arguments
notarized_object_id
- The ID of a notarization object.
Returns
The NotarizationMethod
.
Parameters
notarized_object_id
string
Returns
Promise
<NotarizationMethod
>
lockMetadata()
lockMetadata(
notarized_object_id
):Promise
<undefined
|LockMetadata
>
Retrieves the lock metadata of a notarization.
Arguments
notarized_object_id
- The ID of a notarization object.
Returns
The LockMetadata
, if existing.
Parameters
notarized_object_id
string
Returns
Promise
<undefined
| LockMetadata
>
state()
state(
notarized_object_id
):Promise
<State
>
Retrieves the state of a notarization.
Arguments
notarized_object_id
- The ID of a notarization object.
Returns
The notarization State
.
Parameters
notarized_object_id
string
Returns
Promise
<State
>
isUpdateLocked()
isUpdateLocked(
notarized_object_id
):Promise
<boolean
>
Checks if updates are locked for a notarization object.
Arguments
notarized_object_id
- The ID of a notarization object.
Returns
A boolean indicating whether updates are locked. False means that updates are allowed.
Parameters
notarized_object_id
string
Returns
Promise
<boolean
>
isDestroyAllowed()
isDestroyAllowed(
notarized_object_id
):Promise
<boolean
>
Checks if destruction is allowed for a notarization object.
Arguments
notarized_object_id
- The ID of a notarization object.
Returns
A boolean indicating whether destruction is allowed. False means that destroying is not allowed.
Parameters
notarized_object_id
string
Returns
Promise
<boolean
>
isTransferLocked()
isTransferLocked(
notarized_object_id
):Promise
<boolean
>
Checks if transferring a notarization object is allowed.
Arguments
notarized_object_id
- The ID of a notarization object.
Returns
A boolean indicating whether transfers are locked. False means that transferring is allowed.