Constructor
new TransactionStore(optsopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
opts |
Object |
<optional> |
(TypeScript: |
Classes
Methods
ids() → {Array.<string>}
The ids of every transaction held, without removing any. A GNAP redirect finish carries no state:
the client recognises its transaction by recomputing the interaction hash with each one's nonces.
Returns:
- Type
- Array.<string>
peek(id) → {Record.<string, any>|undefined}
Reads a transaction without removing it.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string |
Returns:
- Type
- Record.<string, any> | undefined
set(id)
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | @param {Record<string, any>} transaction |
sweep(maxAgeMs)
Removes transactions older than maxAgeMs (abandoned sign-ins).
Parameters:
| Name | Type | Description |
|---|---|---|
maxAgeMs |
number |
take(id) → {Record.<string, any>|undefined}
Reads and removes a transaction.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string |
Returns:
- Type
- Record.<string, any> | undefined