-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Wallet Connect connector (#61)
Co-authored-by: Pedro Pereira <pedro.2108@hotmail.com>
- Loading branch information
1 parent
eafe351
commit f56bd40
Showing
31 changed files
with
7,525 additions
and
595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@fuel-connectors/walletconnect-connector": patch | ||
"@fuels/connectors": patch | ||
--- | ||
|
||
rename connector name and implement all methods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
/// <reference types="vite/client" /> | ||
|
||
interface ImportMetaEnv { | ||
readonly VITE_APP_WC_PROJECT_ID: string; | ||
} | ||
|
||
interface ImportMeta { | ||
readonly env: ImportMetaEnv; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "@fuel-connectors/walletconnect-connector", | ||
"version": "0.0.1", | ||
"type": "module", | ||
"files": ["dist"], | ||
"main": "./dist/wallet-connector-walletconnect.umd.cjs", | ||
"module": "./dist/wallet-connector-walletconnect.js", | ||
"exports": { | ||
".": { | ||
"import": "./dist/wallet-connector-walletconnect.js", | ||
"require": "./dist/wallet-connector-walletconnect.umd.cjs" | ||
} | ||
}, | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
"build:forc": "pnpm fuels-forc build --release --path ./predicate", | ||
"build:resources": "pnpm run build:forc && tsx ./scripts/generatePredicateResources.ts", | ||
"build": "tsup --dts-only", | ||
"build:watch": "pnpm run build:resources && tsup --watch --dts-only", | ||
"ts:check": "tsc --noEmit", | ||
"test": "vitest" | ||
}, | ||
"peerDependencies": { | ||
"fuels": ">=0.77.0" | ||
}, | ||
"dependencies": { | ||
"@ethereumjs/util": "^9.0.1", | ||
"@ethersproject/bytes": "^5.7.0", | ||
"@wagmi/core": "2.6.15", | ||
"@web3modal/wagmi": "4.1.5", | ||
"memoizee": "^0.4.15", | ||
"viem": "2.9.9" | ||
}, | ||
"devDependencies": { | ||
"@fuel-ts/account": "^0.79.0", | ||
"@fuel-ts/forc": "0.79.0", | ||
"@fuel-ts/fuel-core": "^0.79.0", | ||
"@types/memoizee": "^0.4.11", | ||
"fuels": "^0.79.0", | ||
"jsdom": "24.0.0", | ||
"ts-loader": "^9.5.1", | ||
"ts-node": "^10.9.2", | ||
"tsup": "8.0.2", | ||
"tsx": "^4.7.0", | ||
"typescript": "5.4.3", | ||
"vite": "^5.0.10", | ||
"vite-plugin-dts": "^3.6.4", | ||
"vitest": "^1.4.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[[package]] | ||
name = "core" | ||
source = "path+from-root-566CA1D5F8BEAFBF" | ||
|
||
[[package]] | ||
name = "predicate" | ||
source = "member" | ||
dependencies = ["std"] | ||
|
||
[[package]] | ||
name = "std" | ||
source = "git+https://github.com/fuellabs/sway?tag=v0.49.3#0dc6570377ee9c4a6359ade597fa27351e02a728" | ||
dependencies = ["core"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[project] | ||
authors = ["Fuel Labs <contact@fuel.sh>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "predicate" |
65 changes: 65 additions & 0 deletions
65
packages/walletconnect-connector/predicate/out/release/predicate-abi.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"types": [ | ||
{ | ||
"typeId": 0, | ||
"type": "b256", | ||
"components": null, | ||
"typeParameters": null | ||
}, | ||
{ | ||
"typeId": 1, | ||
"type": "bool", | ||
"components": null, | ||
"typeParameters": null | ||
}, | ||
{ | ||
"typeId": 2, | ||
"type": "struct EvmAddress", | ||
"components": [ | ||
{ | ||
"name": "value", | ||
"type": 0, | ||
"typeArguments": null | ||
} | ||
], | ||
"typeParameters": null | ||
}, | ||
{ | ||
"typeId": 3, | ||
"type": "u64", | ||
"components": null, | ||
"typeParameters": null | ||
} | ||
], | ||
"functions": [ | ||
{ | ||
"inputs": [ | ||
{ | ||
"name": "witness_index", | ||
"type": 3, | ||
"typeArguments": null | ||
} | ||
], | ||
"name": "main", | ||
"output": { | ||
"name": "", | ||
"type": 1, | ||
"typeArguments": null | ||
}, | ||
"attributes": null | ||
} | ||
], | ||
"loggedTypes": [], | ||
"messagesTypes": [], | ||
"configurables": [ | ||
{ | ||
"name": "SIGNER", | ||
"configurableType": { | ||
"name": "", | ||
"type": 2, | ||
"typeArguments": [] | ||
}, | ||
"offset": 1952 | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
packages/walletconnect-connector/predicate/out/release/predicate-bin-root
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0xad8bfa6ad9c15d9d57af61964c2372ed1fa1ace00aeefbc8ed5cf07192510d68 |
Binary file not shown.
Oops, something went wrong.
f56bd40
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using it, thank you