Best way to fetch JSON from DID Space in Pages Kit
Hello Team,
Iโve got a question about DID Space.
I want to use it to hold a priceTable.json file for my store, so my React component can pull live prices without redeploying.
๐ Whatโs the recommended way to fetch JSON from DID Space inside a Pages Kit component?
- If the file is public, can I just fetch('https://{did}.abtwallet.io/files/priceTable.json') like a normal URL?
- If itโs private, whatโs the best practice for authenticating a fetch request from the front end?
- Do you suggest using raw JSON files in DID Space, or is there a better pattern (like DID docs) for storing this kind of structured catalog data?
Just trying to set this up clean and scalable so I can manage product catalogs directly from DID Space.
Thanks ๐
5 ๆกๅๅค
ไฝ ๅฅฝ๏ผๆฏๆฏไธช็จๆท้ฝ้่ฆๆ่ชๅทฑ็ priceTable.json๏ผ่ฟๆฏๆดไธชๅบ็จ้ฝไฝฟ็จๅไธไธช priceTable.json ๅข? ไธบไปไน่ฆๅจ pages kit ็ปไปถไธญ่ทๅๅข?
Hi, I just wanted to confirm โ in the Pages Kit environment, can a component directly access a userโs DID Space, or does it have to go through the server (Blocklet API) to read and write files likeย
priceTable.json?Connecting to DID space through the pages kit will be very helpful for some of the custom components im working on.
ๆฏ็๏ผ็ฎๅๆ ๆณๆฏๆๅจ pages kit ็ปไปถไธ็ดๆฅ่ฎฟ้ฎ did spacesใๅช่ฝ้่ฟไฝ ็ๅบ็จ็ๅ็ซฏๆฅๅ ฅ @blocklet/did-space-js ๅจๅ็ซฏ่ฏปๅ priceTable.json๏ผ็ถๅๅไฝฟ็จ pages kit ็ปไปถ่ฏทๆฑไฝ ็ๅบ็จ็ api ๆฅๅฎๆใsee: https://www.arcblock.io/docs/did-space-js/en
Hello Jian and team,
Weโve built a complete invoicing system in Pages Kit that can dynamically calculate line items, tax, discounts, and tips. Printing and invoice management work perfectly โ the only limitation now is that Payment Kit only supports static price IDs for generating payment links.
Weโve noticed that Payment Kitโs cart checkout already creates a temporary checkout session when multiple hard-priced items are sent. Thatโs very close to what we need โ the missing piece is allowing that same flow to accept dynamic modifiers like
tax_rate,discount, andtip.Hereโs what an ideal API call might look like directly from Pages Kit:
In this flow:
checkout_urltied to that DID session.This would allow any Pages Kit app to generate dynamic payment links โ fully automated, secure, and DID-authenticated โ without needing pre-created price IDs or backend API keys.
Since cart checkouts already create ephemeral sessions, this enhancement feels like a natural extension of the current system. It would unlock flexible, real-world billing for all creators and developers using ArcBlock.
Is something like this possible and if so on any part of the roadmap?
Thanks for all your building!
tax_rate/discount/tip ้่ฆๅจๆ่ฎพ็ฝฎ๏ผๆฏ้ๅฏนๅไธช็จๆท่ชๅฎไน่ฟๆฏๅคไธช็จๆท่ชๅฎไน?