Replaced with social-app-template
This is a prototype for a DSNP Gateway to allow for simple provider setup.
Environment variables can be setup by creating a .env
file in the root folder.
> `cp .env.example .env`
IPFS_ENDPOINT
(Required): The endpoint for the IPFS API.IPFS_GATEWAY
(Required): IPFS Gateway. Use[CID]
to position the CID correctly in the URL. e.g.https://ipfs.io/ipfs/[CID]
IPFS_BASIC_AUTH_USER
: The Basic Auth for the IPFS connectionIPFS_BASIC_AUTH_SECRET
: The Basic Auth for the IPFS connectionFREQUENCY_NODE
(Required): The WebSocket address for a Frequency Node e.g.ws://127.0.0.1:9944
(Note: Use172.0.0.1
overlocalhost
)FREQUENCY_PUBLIC_ENDPOINT
: The HTTP(S) endpoint so the website can interact with the bare minimum of node interactions. (Required for the Social Web Example Client)PROVIDER_KEY_URI
: The URI or seed phrase for the provider key. e.g.//Alice
PROVIDER_ID
: The ID of the Provider that will be used.PORT
: The port to launch the service on. Defaults to5005
SIWF_URL
: The current Sign-In With Frequency UI deployment. Current Deployed Version:https://amplicalabs.github.io/siwf/ui
SIWF_DOMAIN
: The raw domain that the user is logging in through. Example:localhost
,amplica.io
Note: There are other options, but these are the simplest to get started with.
This is best for Testnet interactions.
- Setup an Infura Account
- Generate an IPFS API Key
- Setup the Environment Variables
IPFS_ENDPOINT="https://ipfs.infura.io:5001"
IPFS_BASIC_AUTH_USER="Infura Project ID"
IPFS_BASIC_AUTH_SECRET="Infura Secret Here"
IPFS_GATEWAY="https://ipfs.io/ipfs/[CID]"
This is best for local only testing.
This uses a local IPFS node with the Kubo API.
- Install IPFS Kubo
- Run
ipfs daemon
- Setup the Environment Variables
IPFS_ENDPOINT="http://127.0.0.1:5001"
IPFS_GATEWAY="http://127.0.0.1:8080/ipfs/[CID]"
Warning: Never expose the RPC API to the public internet.
Note: There are other options, but these are simplest to get started with.
This is best for Testnet interactions.
- Setup the Environment Variables
FREQUENCY_NODE="wss://rpc.rococo.frequency.xyz"
FREQUENCY_PUBLIC_ENDPOINT="https://rpc.rococo.frequency.xyz"
This is for simple local development work.
- Follow the development setup for Frequency
- Run the Node in local "Instant Sealing" mode
make start
OR "Interval Sealing" mode for more realistic delaymake start-interval
- Setup the Environment Variables
FREQUENCY_NODE="ws://127.0.0.1:9944"
FREQUENCY_PUBLIC_ENDPOINT="http://127.0.0.1:9944"
Note: There are other options, but these are simplest to get started with.
- Follow the instructions on the Frequency Provider Dashboard (coming soon)
- Start the Frequency Node
npm run local:init
- Setup the Environment Variables
PROVIDER_KEY_URI="//Alice"
PROVIDER_ID="1"
npm install
npm run watch
ORnpm run start
npm test
: Currently Failingnpm run build
: Builds the TypeScript for./dist
npm run format
: Format codenpm run lint
: Lint code and stylesnpm run gen:types
: Generate types fromopenapi.json
npm run local:init
: Create Provider for//Alice
on localhost Frequency node.