Methods
# static compute(program_id, values, program_id, values) → {Operation|Operation}
Create a new compute operation.
Parameters:
Name | Type | Description |
---|---|---|
program_id |
string
|
The program id to be used. |
values |
NadaValues
|
The values to be used as compute values. |
program_id |
string
|
|
values |
NadaValues
|
Example
const operation = Operation.compute(values);
# static retrieve_permissions() → {Operation|Operation}
Create a new retrieve permissions operation.
Example
const operation = Operation.retrieve_permissions();
# static retrieve_value() → {Operation|Operation}
Create a new retrieve value operation.
Example
const operation = Operation.retrieve_value();
# static store_program(program, program) → {Operation|Operation}
Create a new store program operation.
Parameters:
Name | Type | Description |
---|---|---|
program |
UInt8Array
|
The compiled nada program in binary format |
program |
Uint8Array
|
Example
const operation = Operation.store_program();
# static store_values(values, ttl_days, values, ttl_days) → {Operation|Operation}
Create a new store values operation.
Parameters:
Name | Type | Description |
---|---|---|
values |
NadaValues
|
The values to be stored. |
ttl_days |
number
|
The time to live for the values in days. |
values |
NadaValues
|
|
ttl_days |
number
|
Example
const operation = Operation.store_values(values);
# static update_permissions() → {Operation|Operation}
Create a new update permissions operation.
Example
const operation = Operation.update_permissions();
# static update_values(values, ttl_days, values, ttl_days) → {Operation|Operation}
Create a new update values operation.
Parameters:
Name | Type | Description |
---|---|---|
values |
NadaValues
|
The values to be updated. |
ttl_days |
number
|
The time to live for the values in days. |
values |
NadaValues
|
|
ttl_days |
number
|
Example
const operation = Operation.update_values(values);