Welcome
User Guide
Developer guide
Reference Guide
Frequently Asked Questions
Data retention policy
Draft: Default Space How to upgrade by payment?
How to re-subscribe to an expired DID Space
Connecting to the DID Space using the Gateway Address
Switch the DID Space bound to NFT Blender.
The automatic backup of Blocklet is stuck, how can it be quickly restored?
Fix CORS error when connecting DID Space
Pricing policy
Change log
Draft: Purchase DID Space
DID Spaces v0.6.0: OAuth Integration in DID Spaces
DID Spaces v0.5.83: OAuth integrated DID Space
Prod Spaces data retention policy updated
DID Spaces v0.4.26 released: subscription fully adopts pay-as-you-go & supports paid upgrade Default Space
DID Spaces v0.3.75 released: Supports reading and writing component spaces
DID Spaces v1.0.48: 支持预览 post/bookmark/blog/doc
Get the endpoint of the DID Space during the installation startup process.
Overview#
If you want your application to store all data in a specific DID Space (typically the owner's DID Space) upon installation and startup, this tutorial will guide you through the process.
A prime example of this DID Spaces connection method is NFT Maker. NFT Maker connects to DID Spaces during its installation and startup process, obtaining the endpoint of the owner's DID Space. All NFTs subsequently generated on the NFT Maker platform are stored in this DID Space.
Prerequisites#
- Ensure you have a DID Space available for testing. If you don't, you can get one.
- Your application's blocklet.yml configuration file sets
capabilities.didSpace
torequiredOnSetup
, meaning the application requires a connection to the DID Spaces service during installation.
Procedure#
Owner Links DID Space#
During the initial setup process, the system will prompt you to connect to a DID Space. Please select the DID Space to connect to:
After the connection is successful, click Continue. The installation is complete.
Application accesses user's DID Space endpoint#
Your running application can now access the DID Space endpoint via the BLOCKLET_APP_SPACE_ENDPOINT
environment variable. This variable will have the following format:
console.log(process.env.BLOCKLET_APP_SPACE_ENDPOINT);
// 输出形如: https://space.team.arcblock.io/app/api/space/zNKhe8jwgNZX2z7ZUfwNddNECxSe3wyg7VtS/app/zNKfEK9actwBeLhfVvc9U1p1CqVWxtivVxo6/object/
After obtaining the DID Space endpoint, your application can read and write data to this DID Space. See: Using @blocklet/did-space-js to read and write DID Space.