Difference between revisions of "Advanced Usage"
| Line 5: | Line 5: | ||
== Presentation == | == Presentation == | ||
| − | {| class="wikitable" style="border-collapse: collapse; width: 100%; height: 161px;" | + | {| class="wikitable" style="border-collapse: collapse; width: 100%; height: 161px;" |
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | test | | style="width: 33.3333%; height: 23px;" | test | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | test | | style="width: 33.3333%; height: 23px;" | test | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | test | | style="width: 33.3333%; height: 23px;" | test | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | test | | style="width: 33.3333%; height: 23px;" | test | ||
|} | |} | ||
| Line 39: | Line 56: | ||
| − | {| class="wikitable" style="border-collapse: collapse; width: 100%; height: 115px;" | + | {| class="wikitable" style="border-collapse: collapse; width: 100%; height: 115px;" |
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | test | | style="width: 33.3333%; height: 23px;" | test | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | test | | style="width: 33.3333%; height: 23px;" | test | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
|- style="height: 23px;" | |- style="height: 23px;" | ||
| style="width: 33.3333%; height: 23px;" | test | | style="width: 33.3333%; height: 23px;" | test | ||
| style="width: 33.3333%; height: 23px;" | | | style="width: 33.3333%; height: 23px;" | | ||
| + | <br> | ||
| style="width: 33.3333%; height: 23px;" | test | | style="width: 33.3333%; height: 23px;" | test | ||
|} | |} | ||
| Line 65: | Line 93: | ||
You can start by setting these properties on your jig classes, as seen to the right. By convention, jig instances will automatically use the metadata from their class. However, jig instances may also have their own metadata that overrides its class metadata. You can put any information in metadata you deem important, even properties that are not listed above. | You can start by setting these properties on your jig classes, as seen to the right. By convention, jig instances will automatically use the metadata from their class. However, jig instances may also have their own metadata that overrides its class metadata. You can put any information in metadata you deem important, even properties that are not listed above. | ||
| − | {| class="wikitable" style="border-collapse: collapse; width: 100%;" | + | {| class="wikitable" style="border-collapse: collapse; width: 100%; height: 51px; background-color: rgb(224, 62, 45);" |
| − | |- | + | |- style="height: 51px;" |
| − | | style="width: 100%;" | Warning: For performance reasons, we recommended that B:// media metadata use a b:// uri string rather than the previously-recommended B berry objects. | + | | style="width: 100%; height: 51px;" | <span style="color: rgb(0, 0, 0);" >'''Warning: For performance reasons, we recommended that B:// media metadata use a b:// uri string rather than the previously-recommended B berry objects.'''</span> |
|} | |} | ||
| + | |||
<br> | <br> | ||
Revision as of 04:25, 2 April 2023
Standard Metadata
Wallets, explorers, and exchanges will want to show your jigs. You can add special metadata to any jig to help these apps and services do so. Metadata is stored as an object called metadata on your jig, code, or berry, which contains various properties. The following common properties are called standard metadata:
Presentation
| test |
|
test |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| test |
|
test |
Attribution and Licensing
| test |
|
test |
|
|
|
|
|
|
|
|
|
|
|
|
| test |
|
test |
Media stored on-chain using the B:// protocol may be used as metadata for images, audio, or 3D models. To reference previously-uploaded data, use a string formatted either as "b://<txid>" or "b://<txid>_o<vout>". If vout is present, it must be zero-indexed. If it is not present, the first B output in the transaction is used. To upload B data, you may use the EasyB CLI tool.
You can start by setting these properties on your jig classes, as seen to the right. By convention, jig instances will automatically use the metadata from their class. However, jig instances may also have their own metadata that overrides its class metadata. You can put any information in metadata you deem important, even properties that are not listed above.
| Warning: For performance reasons, we recommended that B:// media metadata use a b:// uri string rather than the previously-recommended B berry objects. |
class DigitalPet extends Jig { }
DigitalPet.metadata = {
author: 'Maximus',
license: 'MIT',
emoji: '🐉'
}
run.deploy(DigitalPet)