diff --git a/packages/server/README.md b/packages/server/README.md index 90dc98f..28f2583 100644 --- a/packages/server/README.md +++ b/packages/server/README.md @@ -4,6 +4,4 @@ The Crate Pinning Service exposes an endpoint which conforms to the [IPFS Pinnin ## Setup -Before running, add the `INFURA_PROJECT_ID` and `INFURA_PROJECT_SECRET` variables to your environment. The Infura project should be a Filecoin project. - -Additionally, set the `GOOGLE_APPLICATION_CREDENTIALS` variable for Firebase authentication. +Set the `GOOGLE_APPLICATION_CREDENTIALS` variable for Firebase authentication. diff --git a/packages/server/src/clients/filecoin.ts b/packages/server/src/clients/filecoin.ts index 2199038..005e37b 100644 --- a/packages/server/src/clients/filecoin.ts +++ b/packages/server/src/clients/filecoin.ts @@ -2,15 +2,8 @@ import { mainnet } from "@filecoin-shipyard/lotus-client-schema" import { NodejsProvider } from "@filecoin-shipyard/lotus-client-provider-nodejs" import { LotusRPC } from "@filecoin-shipyard/lotus-client-rpc" -const user = process.env["INFURA_PROJECT_ID"] -const pass = process.env["INFURA_PROJECT_SECRET"] - -const endpointURL = "https://filecoin.infura.io" -const provider = new NodejsProvider(endpointURL, { - authorizationHeader: `Basic ${Buffer.from(`${user}:${pass}`).toString( - "base64" - )}`, -}) +const endpointURL = process.env["FILECOIN_CLIENT_URL"] +const provider = new NodejsProvider(endpointURL) const client = new LotusRPC(provider, { schema: mainnet.fullNode }) export default client