Publishing
This section covers the configuration fields in blocklet.yml
that are used by a Blocklet Store for listing, distributing, and monetizing your Blocklet. While you can set some of these fields, many are automatically generated and populated by the blocklet publish
command to ensure integrity and provide store-related metadata.
Media#
To make your Blocklet's store page more appealing and informative, you can add screenshots and promotional videos.
Key | Type | Description |
---|---|---|
|
| An array of URLs pointing to screenshots of your Blocklet. |
|
| An array of up to 3 URLs for promotional videos. Must be valid YouTube or Vimeo links. |
Example:
screenshots:
- https://example.com/screenshots/main-dashboard.png
- https://example.com/screenshots/feature-x.png
videos:
- https://www.youtube.com/watch?v=your-video-id
Monetization#
You can monetize your Blocklet by setting a purchase price and defining how the revenue is shared. When a user purchases your Blocklet, an NFT representing the license is minted and transferred to them.
Key | Type | Description |
---|---|---|
|
| The DID of the asset factory used to mint the purchase NFT. This is usually created and maintained by the |
|
| An object containing pricing and revenue sharing rules. |
The payment
Object#
The payment
object contains the following fields:
Key | Type | Description |
---|---|---|
|
| An array that defines the price. Currently, only one price entry is supported. Each object contains |
|
| An array of up to 4 beneficiaries who will share the revenue. The total of all |
|
| Defines pricing for components, which can be fixed or a percentage based on the parent Blocklet's price range. |
Example:
This example sets a price of 99.99 of a specific token and splits the revenue 80/20 between the developer and the marketplace.
nftFactory: 'z2qa... (the asset factory DID)'
payment:
price:
- value: 99.99
address: 'z... (token DID, e.g., zABT_t... for ABT)'
share:
- name: 'Primary Developer'
address: 'z... (developer DID)'
value: 0.8
- name: 'Blocklet Store'
address: 'z... (store DID)'
value: 0.2
Distribution and Provenance#
The following fields are crucial for package integrity and store statistics. They are automatically added or updated during the publishing process. You should not set them manually in your blocklet.yml
source file.
Key | Type | Description |
---|---|---|
|
| Contains information about the distributable tarball, including its |
|
| Contains store statistics like |
|
| An array of cryptographic signatures from the publisher and the Blocklet Store to prove authenticity and integrity. |
|
| An ISO date string indicating when the version was last published. |
|
| A CDN-hosted or optimized URL for the Blocklet's logo, managed by the store. |
Example (For Reference Only)
The following snippet illustrates how these fields might appear in a metadata file after it has been published. It is shown here for informational purposes only.
# NOTE: The following fields are managed by the Blocklet Store and publishing process.
dist:
tarball: 'https://store.arcblock.io/api/blocklets/download/z.../1.0.0.tgz'
integrity: 'sha512-...'
size: 1234567
stats:
downloads: 1500
star: 42
purchases: 120
signatures:
- type: 'BlockletPublish'
name: 'Blocklet Store Signature'
signer: 'z... (store signer DID)'
pk: '...'
created: '2023-10-27T10:00:00.000Z'
sig: '...'
lastPublishedAt: '2023-10-27T10:00:00.000Z'
logoUrl: 'https://cdn.example.com/logos/blocklet.png'
You have now reviewed all the major configuration areas of blocklet.yml
. With a complete configuration, you are ready to bundle and publish your Blocklet. For a complete picture, you may want to revisit the Overview.