Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Move configuration docs to dev portal #128

Merged
merged 3 commits into from
Nov 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 16 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ npm run dev
yarn dev
```

### Discovery Routes
Then add Discovery to your FCL app:

```
import * as fcl from "@onflow/fcl"

fcl.config({
"discovery.wallet": "https://fcl-discovery.onflow.org/testnet/authn",
"discovery.authn.endpoint": "https://fcl-discovery.onflow.org/api/testnet/authn"
})
```

## Networks

### Discovery UI URLs

| Environment | Example |
| ----------- | ---------------------------------------------------------------------- |
Expand All @@ -32,49 +45,9 @@ yarn dev

> Note: Local will return Dev Wallet as a service for developing locally with the default port of 8701. If you'd like to override the default port add ?port=0000 with the port being whatever you'd like to override it to.

## Configuration (For FCL)

These are examples on how to set configuration from [FCL](https://docs.onflow.org/fcl/) in your application.

### Include Opt In Wallets

**Starting in FCL v0.0.78-alpha.10**

To include opt-in wallets from FCL:

```
import * as fcl from "@onflow/fcl"

fcl.config({
"discovery.wallet": "https://fcl-discovery.onflow.org/testnet/authn",
"discovery.authn.endpoint": "https://fcl-discovery.onflow.org/api/testnet/authn",
"discovery.authn.include": ["0x123"] // Service account address
})
```

**Opt-In Wallet Addresses on Testnet and Mainnet**

| Service | Testnet | Mainnet |
| --------------- | ------------------ | ------------------ |
| `Dapper Wallet` | 0x82ec283f88a62e65 | 0xead892083b3e2c6c |
| `Ledger` | 0x9d2e44203cb13051 | 0xe5cd26afebe62781 |

For more information on including opt-in wallets, see [the FCL docs](https://developers.flow.com/tools/fcl-js/reference/api#more-configuration).

### App Title & Icon
## More Configuration

**Starting in FCL v0.0.79-alpha.4**

To set an app title and icon from FCL:

```
import * as fcl from "@onflow/fcl"

fcl.config({
"app.detail.title": "Test App",
"app.detail.icon": "https://placekitten.com/g/200/200"
})
```
For more configuration options, please see the [**documentation**](https://developers.flow.com/tools/fcl-js/reference/discovery).

## Adding a Wallet to Discovery

Expand Down