Skip to content

Commit 66f5a21

Browse files
authoredFeb 22, 2025··
Merge pull request #1154 from onflow/change-lilico-to-flow-wallet
Replace 'Lilico' with 'Flow Wallet'
2 parents d9371d0 + d78ec10 commit 66f5a21

File tree

4 files changed

+137
-121
lines changed

4 files changed

+137
-121
lines changed
 

‎docs/build/guides/mobile/ios-quickstart.md

+84-87
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,13 @@ For run in real device, there are a few steps to deal with signing:
5656

5757
![XCode Target Setup](resources/xcode_setup.png)
5858

59-
6059
## Connecting to a Wallet
6160

6261
To connect with wallets, there is native wallet discovery in the app. Once you click on connect, it will bring out the list of the wallets which support `HTTP/POST` or `WC/RPC` method.
6362

6463
### FCL Config
6564

66-
To make sure, the wallet can recognise your dApp, there is a few field you will need to config before connect to a wallet. The account proof config is optional. In addition, you will need to create a project id from [walletconnect](https://cloud.walletconnect.com/app) cloud before you can connect to the `WC/RPC` compatible wallet such as dapper self custody or lilico wallet.
65+
To make sure, the wallet can recognise your dApp, there is a few field you will need to config before connect to a wallet. The account proof config is optional. In addition, you will need to create a project id from [walletconnect](https://cloud.walletconnect.com/app) cloud before you can connect to the `WC/RPC` compatible wallet such as [Flow Wallet](https://wallet.flow.com/).
6766

6867
```swift
6968
import FCL
@@ -166,91 +165,90 @@ During development, you always can query your NFT with `fcl.query`. Here is an e
166165

167166
- Query cadence
168167

169-
```cadence
170-
import NonFungibleToken from 0xNonFungibleToken
171-
import MonsterMaker from 0xMonsterMaker
172-
import MetadataViews from 0xMetadataViews
173-
174-
access(all) struct Monster {
175-
access(all) let name: String
176-
access(all) let description: String
177-
access(all) let thumbnail: String
178-
access(all) let itemID: UInt64
179-
access(all) let resourceID: UInt64
180-
access(all) let owner: Address
181-
access(all) let component: MonsterMaker.MonsterComponent
182-
183-
init(
184-
name: String,
185-
description: String,
186-
thumbnail: String,
187-
itemID: UInt64,
188-
resourceID: UInt64,
189-
owner: Address,
190-
component: MonsterMaker.MonsterComponent
191-
) {
192-
self.name = name
193-
self.description = description
194-
self.thumbnail = thumbnail
195-
self.itemID = itemID
196-
self.resourceID = resourceID
197-
self.owner = owner
198-
self.component = component
199-
}
200-
}
201-
202-
access(all) fun getMonsterById(address: Address, itemID: UInt64): Monster? {
203-
204-
if let collection = getAccount(address).capabilities.get<&MonsterMaker.Collection>(MonsterMaker.CollectionPublicPath).borrow() {
205-
206-
if let item = collection.borrowMonsterMaker(id: itemID) {
207-
if let view = item.resolveView(Type<MetadataViews.Display>()) {
208-
let display = view as! MetadataViews.Display
209-
let owner: Address = item.owner!.address!
210-
let thumbnail = display.thumbnail as! MetadataViews.HTTPFile
211-
212-
return Monster(
213-
name: display.name,
214-
description: display.description,
215-
thumbnail: thumbnail.url,
216-
itemID: itemID,
217-
resourceID: item.uuid,
218-
owner: address,
219-
component: item.component
220-
)
221-
}
222-
}
223-
}
224-
225-
return nil
226-
}
227-
228-
access(all) fun main(address: Address): [Monster] {
229-
let account = getAccount(address)
230-
let collectionRef = account.capabilities.get<&{NonFungibleToken.Collection}>(MonsterMaker.CollectionPublicPath).borrow()
231-
?? panic("The account with address "
232-
.concat(address.toString)
233-
.concat(" does not have a NonFungibleToken Collection at ")
234-
.concat(MonsterMaker.CollectionPublicPath.toString())
235-
.concat(". Make sure the account address is correct and is initialized their account with a MonsterMaker Collection!"))
236-
237-
let ids = collectionRef.getIDs()
238-
239-
let monsters : [Monster] = []
240-
241-
for id in ids {
242-
if let monster = getMonsterById(address: address, itemID: id) {
243-
monsters.append(monster)
244-
}
245-
}
246-
247-
return monsters
248-
}
249-
```
250-
168+
```cadence
169+
import NonFungibleToken from 0xNonFungibleToken
170+
import MonsterMaker from 0xMonsterMaker
171+
import MetadataViews from 0xMetadataViews
172+
173+
access(all) struct Monster {
174+
access(all) let name: String
175+
access(all) let description: String
176+
access(all) let thumbnail: String
177+
access(all) let itemID: UInt64
178+
access(all) let resourceID: UInt64
179+
access(all) let owner: Address
180+
access(all) let component: MonsterMaker.MonsterComponent
181+
182+
init(
183+
name: String,
184+
description: String,
185+
thumbnail: String,
186+
itemID: UInt64,
187+
resourceID: UInt64,
188+
owner: Address,
189+
component: MonsterMaker.MonsterComponent
190+
) {
191+
self.name = name
192+
self.description = description
193+
self.thumbnail = thumbnail
194+
self.itemID = itemID
195+
self.resourceID = resourceID
196+
self.owner = owner
197+
self.component = component
198+
}
199+
}
200+
201+
access(all) fun getMonsterById(address: Address, itemID: UInt64): Monster? {
202+
203+
if let collection = getAccount(address).capabilities.get<&MonsterMaker.Collection>(MonsterMaker.CollectionPublicPath).borrow() {
204+
205+
if let item = collection.borrowMonsterMaker(id: itemID) {
206+
if let view = item.resolveView(Type<MetadataViews.Display>()) {
207+
let display = view as! MetadataViews.Display
208+
let owner: Address = item.owner!.address!
209+
let thumbnail = display.thumbnail as! MetadataViews.HTTPFile
210+
211+
return Monster(
212+
name: display.name,
213+
description: display.description,
214+
thumbnail: thumbnail.url,
215+
itemID: itemID,
216+
resourceID: item.uuid,
217+
owner: address,
218+
component: item.component
219+
)
220+
}
221+
}
222+
}
223+
224+
return nil
225+
}
226+
227+
access(all) fun main(address: Address): [Monster] {
228+
let account = getAccount(address)
229+
let collectionRef = account.capabilities.get<&{NonFungibleToken.Collection}>(MonsterMaker.CollectionPublicPath).borrow()
230+
?? panic("The account with address "
231+
.concat(address.toString)
232+
.concat(" does not have a NonFungibleToken Collection at ")
233+
.concat(MonsterMaker.CollectionPublicPath.toString())
234+
.concat(". Make sure the account address is correct and is initialized their account with a MonsterMaker Collection!"))
235+
236+
let ids = collectionRef.getIDs()
237+
238+
let monsters : [Monster] = []
239+
240+
for id in ids {
241+
if let monster = getMonsterById(address: address, itemID: id) {
242+
monsters.append(monster)
243+
}
244+
}
245+
246+
return monsters
247+
}
248+
```
251249

252250
```swift
253-
let nftList = try await fcl.query(script: cadenceScript,
251+
let nftList = try await fcl.query(script: cadenceScript,
254252
args: [.address(address)])
255253
.decode([NFTModel].self)
256254
```
@@ -271,11 +269,10 @@ https://github.com/Outblock/fcl-android
271269

272270
**FCL Wallet Connect 2.0**
273271

274-
One of the easiest ways to connect to a wallet via a mobile native dApp is through Flow's new support for Wallet Connect 2.0. This is the pattern that Monster Maker uses to connect to the Dapper Self Custody wallet and Lilico. For more information on FCL Wallet Connect 2.0, check out this page:
272+
One of the easiest ways to connect to a wallet via a mobile native dApp is through Flow's new support for Wallet Connect 2.0. This is the pattern that Monster Maker uses to connect to the [Flow Wallet](https://wallet.flow.com/). For more information on FCL Wallet Connect 2.0, check out this page:
275273

276274
[FCL Wallet Connect](../../../tools/clients/fcl-js/wallet-connect.md)
277275

278-
279276
**How to Build a Native iOS Dapp**
280277

281278
The Agile Monkeys has written a very comprehensive guide on how to build a native mobile application on iOS and interface with fcl-swift. Found here:

‎docs/evm/using.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Manual method: Add Flow EVM as a custom network to MetaMask:
3131

3232
| Name | Value |
3333
| --------------- | ------------------------------------ |
34-
| Network Name | Flow EVM |
34+
| Network Name | Flow EVM |
3535
| Description | The public RPC url for Flow Mainnet |
3636
| RPC Endpoint | https://mainnet.evm.nodes.onflow.org |
3737
| Chain ID | 747 |
@@ -46,7 +46,7 @@ To additionally add the Flow EVM Testnet to MetaMask, follow the same steps as a
4646

4747
| Name | Value |
4848
| --------------- | ------------------------------------ |
49-
| Network Name | Flow EVM Testnet |
49+
| Network Name | Flow EVM Testnet |
5050
| Description | The public RPC url for Flow Testnet |
5151
| RPC Endpoint | https://testnet.evm.nodes.onflow.org |
5252
| Chain ID | 545 |
@@ -59,7 +59,7 @@ Use the [Flow Testnet Faucet](https://faucet.flow.com/fund-account) to fund your
5959

6060
### [Flow Wallet](https://wallet.flow.com)
6161

62-
Flow Wallet is available on [Android](https://play.google.com/store/apps/details?id=io.outblock.lilico&hl=en_US&gl=US) and [iOS](https://apps.apple.com/ca/app/flow-core/id1644169603), with desktop support using the Flow Wallet [Chrome extension](https://chromewebstore.google.com/detail/flow-reference-wallet/hpclkefagolihohboafpheddmmgdffjm). In addition to being able to transact in both EVM and Cadence environments, Flow Wallet will also allow you to view and move assets between EVM and Cadence, making it possible to manage all your assets in one place.
62+
Flow Wallet is available on [Android](https://play.google.com/store/apps/details?id=com.flowfoundation.wallet) and [iOS](https://apps.apple.com/ca/app/flow-wallet-nfts-and-crypto/id6478996750), with desktop support using the Flow Wallet [Chrome extension](https://chromewebstore.google.com/detail/flow-reference-wallet/hpclkefagolihohboafpheddmmgdffjm). In addition to being able to transact in both EVM and Cadence environments, Flow Wallet will also allow you to view and move assets between EVM and Cadence, making it possible to manage all your assets in one place.
6363

6464
To use the Flow Wallet Chrome extension:
6565

‎docs/tools/clients/fcl-js/index.md

+43-25
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ It was created to make developing applications that connect to the Flow blockcha
1111
While FCL itself is a concept and standard, FCL JS is the javascript implementation of FCL and can be used in both browser and server environments. All functionality for connecting and communicating with wallet providers is restricted to the browser. We also have FCL Swift implementation for iOS, see [FCL Swift](https://github.com/zed-io/fcl-swift) contributed by [@lmcmz](https://github.com/lmcmz).
1212

1313
---
14+
1415
## Getting Started
1516

1617
### Requirements
17-
- Node version `v12.0.0 or higher`.
18+
19+
- Node version `v12.0.0 or higher`.
1820

1921
### Installation
2022

@@ -27,45 +29,56 @@ npm i -S @onflow/fcl
2729
```shell
2830
yarn add @onflow/fcl
2931
```
32+
3033
#### Importing
3134

3235
**ES6**
36+
3337
```js
34-
import * as fcl from "@onflow/fcl";
38+
import * as fcl from '@onflow/fcl';
3539
```
40+
3641
**Node.js**
42+
3743
```js
38-
const fcl = require("@onflow/fcl");
44+
const fcl = require('@onflow/fcl');
3945
```
46+
4047
---
48+
4149
## FCL for Dapps
50+
4251
#### Wallet Interactions
4352

44-
- *Wallet Discovery* and *Sign-up/Login*: Onboard users with ease. Never worry about supporting multiple wallets.
45-
Authenticate users with any [FCL compatible wallet](./index.md#current-wallet-providers).
53+
- _Wallet Discovery_ and _Sign-up/Login_: Onboard users with ease. Never worry about supporting multiple wallets.
54+
Authenticate users with any [FCL compatible wallet](./index.md#current-wallet-providers).
55+
4656
```js
4757
// in the browser
48-
import * as fcl from "@onflow/fcl"
58+
import * as fcl from '@onflow/fcl';
4959

5060
fcl.config({
51-
"discovery.wallet": "https://fcl-discovery.onflow.org/testnet/authn", // Endpoint set to Testnet
52-
})
61+
'discovery.wallet': 'https://fcl-discovery.onflow.org/testnet/authn', // Endpoint set to Testnet
62+
});
5363

54-
fcl.authenticate()
64+
fcl.authenticate();
5565
```
66+
5667
![FCL Default Discovery UI](images/discovery.png)
5768

5869
> **Note**: A [Dapper Wallet](https://meetdapper.com/developers) developer account is required. To enable Dapper Wallet inside FCL, you need to [follow this guide](https://docs.meetdapper.com/quickstart).
5970
60-
- *Interact with smart contracts*: Authorize transactions via the user's chosen wallet
61-
- *Prove ownership of a wallet address*: Signing and verifying user signed data
71+
- _Interact with smart contracts_: Authorize transactions via the user's chosen wallet
72+
- _Prove ownership of a wallet address_: Signing and verifying user signed data
6273

6374
[Learn more about wallet interactions >](./api.md#wallet-interactions)
6475

6576
#### Blockchain Interactions
66-
- *Query the chain*: Send arbitrary Cadence scripts to the chain and receive back decoded values
77+
78+
- _Query the chain_: Send arbitrary Cadence scripts to the chain and receive back decoded values
79+
6780
```js
68-
import * as fcl from "@onflow/fcl";
81+
import * as fcl from '@onflow/fcl';
6982

7083
const result = await fcl.query({
7184
cadence: `
@@ -77,14 +90,16 @@ const result = await fcl.query({
7790
args: (arg, t) => [
7891
arg(7, t.Int), // a: Int
7992
arg(6, t.Int), // b: Int
80-
arg("0xba1132bc08f82fe2", t.Address), // addr: Address
93+
arg('0xba1132bc08f82fe2', t.Address), // addr: Address
8194
],
8295
});
8396
console.log(result); // 13
8497
```
85-
- *Mutate the chain*: Send arbitrary transactions with your own signatures or via a user's wallet to perform state changes on chain.
98+
99+
- _Mutate the chain_: Send arbitrary transactions with your own signatures or via a user's wallet to perform state changes on chain.
100+
86101
```js
87-
import * as fcl from "@onflow/fcl";
102+
import * as fcl from '@onflow/fcl';
88103
// in the browser, FCL will automatically connect to the user's wallet to request signatures to run the transaction
89104
const txId = await fcl.mutate({
90105
cadence: `
@@ -96,13 +111,14 @@ const txId = await fcl.mutate({
96111
}
97112
}
98113
`,
99-
args: (arg, t) => [arg("myName", t.String)],
114+
args: (arg, t) => [arg('myName', t.String)],
100115
});
101116
```
102117

103118
[Learn more about on-chain interactions >](./api.md#on-chain-interactions)
104119

105120
#### Utilities
121+
106122
- Get account details from any Flow address
107123
- Get the latest block
108124
- Transaction status polling
@@ -111,7 +127,6 @@ const txId = await fcl.mutate({
111127

112128
[Learn more about utilities >](./api.md#pre-built-interactions)
113129

114-
115130
## Next Steps
116131

117132
See the [Flow App Quick Start](../../../build/getting-started/fcl-quickstart.md).
@@ -122,28 +137,31 @@ Learn Flow's smart contract language to build any script or transactions: [Caden
122137

123138
Explore all of Flow [docs and tools](/).
124139

125-
126140
---
141+
127142
## FCL for Wallet Providers
143+
128144
Wallet providers on Flow have the flexibility to build their user interactions and UI through a variety of ways:
145+
129146
- Front channel communication via Iframe, pop-up, tab, or extension
130147
- Back channel communication via HTTP
131148

132149
FCL is agnostic to the communication channel and is configured to create both custodial and non-custodial wallets. This enables users to interact with wallet providers without needing to download an app or extension.
133150

134-
The communication channels involve responding to a set of pre-defined FCL messages to deliver the requested information to the dapp. Implementing a FCL compatible wallet on Flow is as simple as filling in the responses with the appropriate data when FCL requests them. If using any of the front-channel communication methods, FCL also provides a set of [wallet utilities](https://github.com/onflow/fcl-js/blob/master/packages/fcl/src/wallet-utils/index.js) to simplify this process.
135-
151+
The communication channels involve responding to a set of pre-defined FCL messages to deliver the requested information to the dapp. Implementing a FCL compatible wallet on Flow is as simple as filling in the responses with the appropriate data when FCL requests them. If using any of the front-channel communication methods, FCL also provides a set of [wallet utilities](https://github.com/onflow/fcl-js/blob/master/packages/fcl/src/wallet-utils/index.js) to simplify this process.
136152

137153
### Current Wallet Providers
138-
- [Blocto](https://blocto.portto.io/en/)
139-
- [Ledger](https://ledger.com) (limited transaction support)
154+
155+
- [Flow Wallet](https://wallet.flow.com/)
140156
- [Dapper Wallet](https://www.meetdapper.com/)
141-
- [Lilico](https://lilico.app/)
142-
- [Flipper](https://flipper.org/)
157+
- [Blocto](https://blocto.portto.io/en/)
143158
- [NuFi](https://nu.fi)
159+
- [Ledger](https://ledger.com) (limited transaction support)
144160

145161
### Wallet Discovery
162+
146163
It can be difficult to get users to discover new wallets on a chain. To solve this, we created a wallet discovery service that can be configured and accessed through FCL to display all available Flow wallet providers to the user. This means:
164+
147165
- Dapps can display and support all FCL compatible wallets that launch on Flow without needing to change any code
148166
- Users don't need to sign up for new wallets - they can carry over their existing one to any dapp that uses FCL for authentication and authorization.
149167

‎src/data/tools/index.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -556,12 +556,13 @@ const dapperSelfCustodyWallet: Tool = {
556556
'A mobile self custody wallet to help you explore the world of Flow',
557557
};
558558

559-
const lilicoWallet: Tool = {
560-
title: 'Lilico',
559+
const flowWallet: Tool = {
560+
title: 'Flow Wallet',
561561
tags: ['web', 'extension', 'wallet', 'non-custodial'],
562-
link: 'https://lilico.app/',
563-
iconSrc: 'https://lilico.app/logo-cat.svg',
564-
description: 'The First Extension Wallet on Flow',
562+
link: 'https://wallet.flow.com/',
563+
iconSrc: 'https://lilico.app/logo_mobile.svg',
564+
description:
565+
'A reference wallet created for everyone. Trusted. Battle-tested. Beautifully designed.',
565566
};
566567

567568
const fionaWallet: Tool = {
@@ -624,7 +625,7 @@ export {
624625
dapperWallet,
625626
ledgerWallet,
626627
nufiWallet,
627-
lilicoWallet,
628+
flowWallet,
628629
fionaWallet,
629630
niftoryTool,
630631
flowviewTool,

0 commit comments

Comments
 (0)
Please sign in to comment.