Creates a new instance of OperationFields
.
OperationFields instance
import { OperationFields } from 'p2panda-js';
const fields = new OperationFields({
hasDate: true,
latestYear: 2002,
});
Optional
fields: EasyValues"Easy field values" to populate the operation with basic data types. This can be used to easily create operation fields, even when there is no schema at hand. Please note that only unambigious field types like "str", "int", "float" and "bool" can be used here
Inserts a new field.
import { OperationFields } from 'p2panda-js';
const fields = new OperationFields();
fields.insert('venue', 'relation', '002078619bd4beff4bec4d4ccf75a7a5c25bf5d3c37fbd051a45debf1f17a1f75230');
Name of the field, needs to match schema
Operation field type
Actual user data
Gets a value from a field.
User data
Name of the field, needs to match schema
Generated using TypeDoc
Operation fields containing application data.
Example