Welcome
User Guide
Developer guide
Reference Guide
Frequently Asked Questions
Pricing policy
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
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 launch, this tutorial will guide you through the process.
A typical application of this DID Spaces connection method is the NFT Maker. During its installation and startup, NFT Maker connects to DID Spaces, obtains the endpoint of the owner's DID Space, and subsequently stores all NFTs generated on the platform within that DID Space.
Prerequisites#
- Ensure you have a DID Space for testing. If not, see Get a DID Space.
- Your app's blocklet.yml configuration file sets
capabilities.didSpace
torequiredOnSetup
, indicating that the app requires a connection to the DID Spaces service during installation.
Procedure#
Owner Links DID Space#
During the application's initial setup, you will be prompted to connect to a DID Space. Please select the DID Space you want to connect to:
After connecting successfully, click Continue. The installation is complete.
Application accesses the user's DID Space endpoint#
At this point, your running application can 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 retrieving the DID Space endpoint, your application can read and write data to this DID Space. For more information, see: Using @blocklet/did-space-js to read and write DID Space.