Skip to content

Commit b186426

Browse files
committed
Merge in dev and add bloom ci
2 parents 558ce90 + 3f67ce2 commit b186426

File tree

13 files changed

+961
-1
lines changed

13 files changed

+961
-1
lines changed

.circleci/config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,12 @@ jobs:
466466
working_directory: ~/web3-onboard-monorepo/packages/passport
467467
steps:
468468
- node-build-steps
469+
build-bloom:
470+
docker:
471+
- image: cimg/node:18.0.0
472+
working_directory: ~/web3-onboard-monorepo/packages/bloom
473+
steps:
474+
- node-build-steps
469475

470476
# Build staging/Alpha releases
471477
build-staging-core:
@@ -768,6 +774,12 @@ jobs:
768774
working_directory: ~/web3-onboard-monorepo/packages/passport
769775
steps:
770776
- node-staging-build-steps
777+
build-staging-bloom:
778+
docker:
779+
- image: cimg/node:18.0.0
780+
working_directory: ~/web3-onboard-monorepo/packages/bloom
781+
steps:
782+
- node-staging-build-steps
771783

772784
workflows:
773785
version: 2
@@ -1073,3 +1085,9 @@ workflows:
10731085
<<: *deploy_production_filters
10741086
- build-staging-passport:
10751087
<<: *deploy_staging_filters
1088+
bloom:
1089+
jobs:
1090+
- build-bloom:
1091+
<<: *deploy_production_filters
1092+
- build-staging-bloom:
1093+
<<: *deploy_staging_filters
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
title: Bloom
3+
---
4+
5+
# {$frontmatter.title}
6+
7+
Wallet module for connecting Bloom to web3-onboard.
8+
9+
## Install
10+
11+
<Tabs values={['yarn', 'npm']}>
12+
<TabPanel value="yarn">
13+
14+
```sh copy
15+
yarn add @web3-onboard/bloom
16+
```
17+
18+
</TabPanel>
19+
<TabPanel value="npm">
20+
21+
```sh copy
22+
npm install @web3-onboard/bloom
23+
```
24+
25+
</TabPanel>
26+
</Tabs>
27+
28+
29+
```typescript
30+
type WalletConnectOptions = {
31+
/**
32+
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
33+
*/
34+
projectId: string
35+
/**
36+
* Defaults to `appMetadata.explore` that is supplied to the web3-onboard init
37+
* Strongly recommended to provide atleast one URL as it is required by some wallets (i.e. MetaMask)
38+
* To connect with walletconnect
39+
*/
40+
dappUrl?: string
41+
/**
42+
* List of Required Chain(s) ID for wallets to support in number format (integer or hex)
43+
* Defaults to [1] - Ethereum
44+
*/
45+
requiredChains?: number[] | undefined
46+
/**
47+
* List of Optional Chain(s) ID for wallets to support in number format (integer or hex)
48+
* Defaults to the chains provided within the web3-onboard init chain property
49+
*/
50+
optionalChains?: number[] | undefined
51+
/**
52+
* Additional required methods to be added to the default list of ['eth_sendTransaction', 'personal_sign']
53+
* Passed methods to be included along with the defaults methods - see https://docs.walletconnect.com/2.0/advanced/providers/ethereum#required-and-optional-methods
54+
*/
55+
additionalRequiredMethods?: string[] | undefined
56+
/**
57+
* Additional methods to be added to the default list of ['eth_sendTransaction', 'eth_signTransaction', 'personal_sign', 'eth_sign', 'eth_signTypedData', 'eth_signTypedData_v4']
58+
* Passed methods to be included along with the defaults methods - see https://docs.walletconnect.com/2.0/web/walletConnectModal/options
59+
*/
60+
additionalOptionalMethods?: string[] | undefined
61+
)
62+
```
63+
64+
## Usage
65+
66+
```typescript
67+
import Onboard from '@web3-onboard/core'
68+
import bloomModule from '@web3-onboard/bloom'
69+
70+
const wcInitOptions = {
71+
/**
72+
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
73+
*/
74+
projectId: 'abc123...',
75+
/**
76+
* Chains required to be supported by all wallets connecting to your DApp
77+
*/
78+
requiredChains: [1],
79+
/**
80+
* Chains required to be supported by all wallets connecting to your DApp
81+
*/
82+
optionalChains: [42161, 8453, 10, 137, 56],
83+
/**
84+
* Defaults to `appMetadata.explore` that is supplied to the web3-onboard init
85+
* Strongly recommended to provide atleast one URL as it is required by some wallets (i.e. MetaMask)
86+
* To connect with WalletConnect
87+
*/
88+
dappUrl: 'http://YourAwesomeDapp.com'
89+
}
90+
91+
// initialize the module with options
92+
const bloom = bloomModule(wcInitOptions)
93+
94+
// can also initialize with no options...
95+
96+
const onboard = Onboard({
97+
// ... other Onboard options
98+
wallets: [
99+
bloom
100+
//... other wallets
101+
]
102+
})
103+
104+
const connectedWallets = await onboard.connectWallet()
105+
106+
// Assuming only wallet connect is connected, index 0
107+
// `instance` will give insight into the WalletConnect info
108+
// such as namespaces, methods, chains, etc per wallet connected
109+
const { instance } = connectedWallets[0]
110+
111+
console.log(connectedWallets)
112+
```
113+
114+
## Build Environments
115+
116+
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)

packages/bloom/README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# @web3-onboard/bloom
2+
3+
## Wallet module for connecting Bloom to web3-onboard
4+
5+
### Install
6+
7+
`npm i @web3-onboard/core @web3-onboard/bloom`
8+
9+
## Options
10+
11+
```typescript
12+
type WalletConnectOptions = {
13+
/**
14+
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
15+
*/
16+
projectId: string
17+
/**
18+
* Defaults to `appMetadata.explore` that is supplied to the web3-onboard init
19+
* Strongly recommended to provide atleast one URL as it is required by some wallets (i.e. MetaMask)
20+
* To connect with walletconnect
21+
*/
22+
dappUrl?: string
23+
/**
24+
* List of Required Chain(s) ID for wallets to support in number format (integer or hex)
25+
* Defaults to [1] - Ethereum
26+
*/
27+
requiredChains?: number[] | undefined
28+
/**
29+
* List of Optional Chain(s) ID for wallets to support in number format (integer or hex)
30+
* Defaults to the chains provided within the web3-onboard init chain property
31+
*/
32+
optionalChains?: number[] | undefined
33+
/**
34+
* Additional required methods to be added to the default list of ['eth_sendTransaction', 'personal_sign']
35+
* Passed methods to be included along with the defaults methods - see https://docs.walletconnect.com/2.0/advanced/providers/ethereum#required-and-optional-methods
36+
*/
37+
additionalRequiredMethods?: string[] | undefined
38+
/**
39+
* Additional methods to be added to the default list of ['eth_sendTransaction', 'eth_signTransaction', 'personal_sign', 'eth_sign', 'eth_signTypedData', 'eth_signTypedData_v4']
40+
* Passed methods to be included along with the defaults methods - see https://docs.walletconnect.com/2.0/web/walletConnectModal/options
41+
*/
42+
additionalOptionalMethods?: string[] | undefined
43+
}
44+
```
45+
46+
## Usage
47+
48+
```typescript
49+
import Onboard from '@web3-onboard/core'
50+
import walletConnectModule from '@web3-onboard/walletconnect'
51+
52+
const wcInitOptions = {
53+
/**
54+
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
55+
*/
56+
projectId: 'abc123...',
57+
/**
58+
* Chains required to be supported by all wallets connecting to your DApp
59+
*/
60+
requiredChains: [1],
61+
/**
62+
* Chains required to be supported by all wallets connecting to your DApp
63+
*/
64+
optionalChains: [42161, 8453, 10, 137, 56],
65+
/**
66+
* Defaults to `appMetadata.explore` that is supplied to the web3-onboard init
67+
* Strongly recommended to provide atleast one URL as it is required by some wallets (i.e. MetaMask)
68+
* To connect with WalletConnect
69+
*/
70+
dappUrl: 'http://YourAwesomeDapp.com'
71+
}
72+
73+
// initialize the module with options
74+
const bloom = initBloom(wcInitOptions)
75+
76+
// can also initialize with no options...
77+
78+
const onboard = Onboard({
79+
// ... other Onboard options
80+
wallets: [
81+
bloom
82+
//... other wallets
83+
]
84+
})
85+
86+
const connectedWallets = await onboard.connectWallet()
87+
88+
// Assuming only wallet connect is connected, index 0
89+
// `instance` will give insight into the WalletConnect info
90+
// such as namespaces, methods, chains, etc per wallet connected
91+
const { instance } = connectedWallets[0]
92+
93+
console.log(connectedWallets)
94+
```

packages/bloom/package.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"name": "@web3-onboard/bloom",
3+
"version": "2.0.0",
4+
"description": "Unstoppable Domains module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
5+
"keywords": [
6+
"Bloom",
7+
"Iota",
8+
"Shimmer",
9+
"Ethereum",
10+
"Web3",
11+
"EVM",
12+
"dapp",
13+
"Multichain",
14+
"Wallet",
15+
"Transaction",
16+
"Provider",
17+
"Hardware Wallet",
18+
"Notifications",
19+
"React",
20+
"Svelte",
21+
"Vue",
22+
"Next",
23+
"Nuxt",
24+
"MetaMask",
25+
"Coinbase",
26+
"WalletConnect",
27+
"Ledger",
28+
"Trezor",
29+
"Connect Wallet",
30+
"Ethereum Hooks",
31+
"Blocknative",
32+
"Mempool",
33+
"pending",
34+
"confirmed",
35+
"Injected Wallet",
36+
"Crypto",
37+
"Crypto Wallet",
38+
"Domain Name",
39+
"Unstoppable Domains",
40+
"Unstoppable"
41+
],
42+
"repository": {
43+
"type": "git",
44+
"url": "https://github.com/blocknative/web3-onboard.git",
45+
"directory": "packages/bloom"
46+
},
47+
"homepage": "https://onboard.blocknative.com",
48+
"bugs": "https://github.com/blocknative/web3-onboard/issues",
49+
"module": "dist/index.js",
50+
"browser": "dist/index.js",
51+
"main": "dist/index.js",
52+
"type": "module",
53+
"typings": "dist/index.d.ts",
54+
"files": [
55+
"dist"
56+
],
57+
"scripts": {
58+
"build": "tsc",
59+
"dev": "tsc -w",
60+
"type-check": "tsc --noEmit"
61+
},
62+
"license": "MIT",
63+
"devDependencies": {
64+
"typescript": "^5.4.5",
65+
"@walletconnect/types": "^2.13.0"
66+
},
67+
"dependencies": {
68+
"@walletconnect/ethereum-provider": "^2.13.0",
69+
"@web3-onboard/common": "^2.4.1",
70+
"joi": "17.9.1",
71+
"rxjs": "^7.5.2"
72+
}
73+
}

0 commit comments

Comments
 (0)