Frames
What is a Frame?
A frame is a pre-built set of properties that can be assigned to an item all at once. Frames are created and updated by group managers.
Note the Frames Layer requires the Tags and Attributes Layers as dependencies.
Table Breakdown
Table Name: frames
Table Scope: self
Name
Type
Example
Description
frame_name
name
testframe
Frame name identifier (Primary Key).
group
name
testgroup
Group managing the frame.
default_tags
map<name, string>
[{"key": "tag1", "value": "tag1content"}]
A map of default tag names and content.
default_attributes
map<name, int64_t>
[{"key": "attr1", "value": 4}]
A map of default attribute names and points.
Additional Indices
bygroup
Create a Frame
To create a new frame call the newframe()
action.
Required Authority: group.manager
Action Parameters
Name
Type
Example
Description
frame_name
name
testframe
The name of the frame.
group
name
testgroup
The name of the group.
default_tags
map<name, string>
[{"key": "tag1", "value": "tag1content"}]
The default tags to apply to an Item.
default_attributes
map<name, int64_t>
[{"key": "attr1", "value": 4}]
The default attributes to apply to an Item.
Examples
Apply a Frame
To apply a frame to an Item call the applyframe()
action.
Required Authority: group.manager
Action Parameters
Name
Type
Example
Description
frame_name
name
testframe
The name of the frame to apply to the Item.
serial
uint64_t
5
The serial number of the Item being applied the frame.
overwrite
bool
true
When true, will overwrite any existing tags or attributes on the Item of the same name. When false, these tag and attribute name collisions will skip the frame defaults and leave the existing data in place.
Examples
Quick Build an Item
Frames offer a special action called quickbuild()
that will mint a new item, apply a frame, and then apply frame default override values - all at once. This is a preferred method for rapid complex item creation.
Required Authority: group.manager
Action Parameters
Name
Type
Example
frame_name
name
testframe
The name fo the frame to quick build.
to
name
testaccountb
The name of the account to receive the newly built Item.
override_tags
map<name, string>
[{"key": "tag1", "value": "overridecontent"}]
The set of tag overrides to override frame defaults.
override_attributes
map<name, int64_t>
[{"key": "attr1", "value": 3}]
The set of attribute overrides to override frame defaults.
Examples
Remove a Frame
To remove a frame call the rmvframe()
action.
Required Authority: group.manager
Action Parameters
Name
Type
Example
Description
frame_name
name
testframe
The name of the frame to remove.
memo
string
"frame not needed"
An optional memo field.
Examples
Last updated
Was this helpful?