Constructor
new NonceSequence(id, authId, nextNonce, maxNonce, status)
Instantiate a nonce sequence with the provided authorization id.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The Id for this sequence. |
authId |
string | The authorization id for this device and drive. |
nextNonce |
Uint8Array | null | The next available nonce to be used. |
maxNonce |
Uint8Array | null | The maximum nonce. |
status |
Status | The status of the sequencer. |
Classes
Members
maxNonce
The maximum nonce.
nextNonce
Then next available nonce.
status
The current status of the sequence.
Methods
getAuthId() → {string}
Get the authorization id for a specific device.
Returns:
The auth id.
- Type
- string
getId() → {string}
The id for this sequence.
Returns:
The id.
- Type
- string
getMaxNonce() → {Uint8Array|null}
Get the max nonce.
Returns:
The maximum nonce.
- Type
- Uint8Array | null
getNextNonce() → {Uint8Array|null}
Get the next nonce.
Returns:
The next nonce.
- Type
- Uint8Array | null
getStatus() → {Status}
Get the sequence status.
Returns:
The status
- Type
- Status
setAuthId(authId)
Set the authorization Id for a specific device.
Parameters:
Name | Type | Description |
---|---|---|
authId |
string | The authorization id |
setId(id)
Set the id.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The sequence id |
setMaxNonce(maxNonce)
Set the max nonce.
Parameters:
Name | Type | Description |
---|---|---|
maxNonce |
Uint8Array | The max nonce |
setNextNonce(nextNonce)
Set the next nonce.
Parameters:
Name | Type | Description |
---|---|---|
nextNonce |
Uint8Array | null | The next nonce |
setStatus(status)
Set the sequence status.
Parameters:
Name | Type | Description |
---|---|---|
status |
Status | The status |