LogoLogo
  • Persistence Hub
    • 👓Overview
    • 🌐Persistence Ecosystem
  • Begin & Explore
    • 🔏Wallet Setup
    • 📓Getting Your Persistence Address
    • 💰Acquiring $XPRT Tokens
  • Products
    • 🦾Persistence DEX (V1)
      • 📘Introduction
      • 📖Guides
        • 👨‍💼Managing Assets
        • 💱Trading Assets
        • 🚰Providing Liquidity
        • ⛓️Bonding/Unbonding Tokens
        • 🎉Claiming Rewards
        • 🏗️Creating New Pool
          • 🌀Metastable Pool
          • ⚖️Weighted Pool
          • 🧊Stable Swap Pool
      • 🏊‍♂️Pools
      • ⚡Instant LP Unbonding
      • 🎁Tradooor Rebate Program
      • 💰Fees
      • 🏆Rewards
      • ⚙️Technical Architecture
    • Bitcoin Cross-Chain Swaps (V2)
      • 🌟Introduction
      • 📚Fundamentals
        • 💱BTCfi
        • 🌉Bitcoin Layer 2s
        • Interoperability for BTCfi
        • 💡Intents for Blockchain Interoperability
      • 🔀Traditional Bridges vs. Intent-Based Swaps
      • ⚙️Product Mechanism
  • 💂Security
    • 📖Audits
  • Participate & Explore
    • $XPRT Token
      • 🛒Acquire
      • 📈Stake
      • 🏛️Governance
    • 🖥️Alternative Frontends
      • 🔃Hosting IPFS Versions with Pinata
      • 🤖IPFS Automation
    • 💼Wallets
    • 🔍Explorers
    • 💸Grants
  • Persistence Core-1 Chain
    • 🟢Running Nodes
      • Run a Local Node
      • Run a Testnet Node
      • Run a Mainnet Node
      • Node operations
        • State Sync
        • Run in the background
        • Cosmovisor upgrades
        • Manual upgrades
      • Seed & Peers
    • Public Infrastructure
      • Persistence Testnet
      • Endpoints
      • Snapshots & Archival Nodes
      • Faucets
      • Chain Registry
    • 🛡️Validators
      • Validate on Testnet
      • Validate on Mainnet
      • Validator Communication
    • 📡Relayers
      • IBC Channels
      • IBC Relayers
      • Relay on Mainnet
      • Relay on Testnet
    • 🫗Liquid Staking Module
      • For Validators
    • 📄Smart Contracts
      • Overview
      • Uploading a Contract
    • 👨‍💻Developer Tools
      • Persistence JS
      • Persistence SDK
    • ⚒️Community Tools
  • Community & Support
    • 🇹🇰Foundation Delegations
      • ➡️Round 1 - Closed
      • ➡️Round 2 - Closed
      • ⭐Bonus Delegation
      • ➡️Round 3 - Delegation Period Over
    • ⭕Coin-type Migration from 750 to 118
      • Persistence Wallet
      • Keplr Wallet
      • Ledger Hardware Wallet
      • Cosmostation Wallet
      • Coin98 Super Wallet
      • Math Wallet
      • Leap Wallet
      • Citadel Wallet
    • 🌎Geofencing on Persistence
    • 😍Connect & Follow
Powered by GitBook
On this page
  • Releases:
  • Workflow setup

Was this helpful?

Edit on GitHub
  1. Participate & Explore
  2. Alternative Frontends

IPFS Automation

PreviousHosting IPFS Versions with PinataNextWallets

Last updated 1 year ago

Was this helpful?

This guide has instructions to set up workflow which will run automatically to pin the latest hashes and create/update the transform rules set in Cloudflare whenever new version releases will be published across all apps.

Note: This tool is open-sourced by .

Releases:

  • pWallet -

  • pStake -

  • Dexter -


Workflow setup

Step 1: Clone the repository -

Step 2: Install the dependencies with

Step 3: Copy the .env.sample file and rename it to .env

  1. Set the correct value for `MONGO_URI`. You can use any MongoDB instance, including one inside a self-hosted container. If you don't have a MongoDB instance, you can use the free tier of [] as shown in the image below. Copy the URI marked by the arrow:

    1. Account -> Account Rulesets -> Read

    2. Zone -> Transform Rules -> Read

    3. Zone -> Transform Rules -> Edit

  1. Set the TELEGRAM_BOT_TOKEN in the .env file

  2. Ensure to assign Group Admin Rights and Channel Admin Rights to the created bot using BotFather

Ignore this step if you already have transform rules setup for the IPFS apps.

The rules can have any values for now as our application will fix them for us. We just need to do this for the Rule ID to be available in the next step.

Step 6: Copy the src/utils/config.sample.ts file and rename it to src/utils/config.ts

  1. Get your rulesetId querying the below URL and search for the object with phase: http_request_transform and copy that rulesetId. This becomes your cloudflareRulesetId.

curl https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets \ --header "Authorization: Bearer <API_TOKEN>"

  1. Now use this cloudflareRulesetId to query the below URL and get the respective cloudflareRuleId for individual transform rules and update it in src/utils/config.ts

curlhttps://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets /{ruleset_id} \ --header "Authorization: Bearer <API_TOKEN>"

Step 7: Please modify the appUUID, transformedURL, transformedURL inside cloudflareRuleExpression, cloudflareZoneId, cloudflareRulesetId and cloudflareRuleId as mentioned above and depending on your config.

Step 8: Deploy with a method of your choice, just like any backend application, Dockerfile is included.

Token and set it in the .env file. Make sure to have the pinByHash and unpin permission enabled.

and set it in the .env file. No permissions are required if only fetching releases from public repositories.

and set it in the .env file. Make sure to have the Zone.Transform Rules permissions for the API Token as shown in the image below.

Step 4: for deployment notifications.

Create a new group, add your new bot to it, make it the group admin. Find out the chat ID of the group by checking and selecting the group. The chat ID will be in the URL, it usually starts with -100 for groups that have bot admins. Set the TELEGRAM_CHAT_ID in the .env file.

Step 5: for each of the apps you want to pin.

Add the appUUID, transformedURL, transformedURL inside cloudflareRuleExpression, cloudflareZoneId, cloudflareRulesetId and cloudflareRuleId for each of the apps. You can obtain the cloudflareZoneId by following the instructions in the . The cloudflareRulesetId and cloudflareRuleId can be obtained by following the instructions on .

Example for src/utils/config.ts
🖥️
🤖
Obtain your PINATA_JWT
Obtain your GITHUB_AUTH_TOKEN
Obtain your CLOUDFLARE_API_TOKEN
Create a Telegram Bot
https://web.telegram.org/a/
Create a new Cloudflare Transform Rule
Cloudflare documentation
this page
Kitkat Validator
https://github.com/persistenceOne/persistenceWallet
https://github.com/persistenceOne/pstake-frontend-releases/releases
https://github.com/dexter-zone/dexter-frontend-releases/releases
https://github.com/kitkatfund/ipfs-auto-deploy
MongoDB Atlas