Introduction
WalletConnect Sign is a remote signer protocol to communicate securely between web3 wallets and dapps. The protocol establishes a remote pairing between two apps and/or devices using a Relay server to relay payloads. These payloads are symmetrically encrypted through a shared key between the two peers. The pairing is initiated by one peer displaying a QR Code or deep link with a standard WalletConnect URI and is established when the counter-party approves this pairing request.
Installation​
- Web
- iOS
- Android
- Flutter
- Unity
- C#
- npm
- Yarn
- Bun
- pnpm
npm install @walletconnect/sign-client
yarn add @walletconnect/sign-client
bun add @walletconnect/sign-client
pnpm add @walletconnect/sign-client
For Node.js, the WalletConnect SignClient additionally requires lokijs
to manage storage internally.
- npm
- Yarn
- Bun
- pnpm
npm install --save @walletconnect/sign-client lokijs@1.x
yarn add @walletconnect/sign-client lokijs@1.x
bun add --save @walletconnect/sign-client lokijs@1.x
pnpm add @walletconnect/sign-client lokijs@1.x
- SwiftPackageManager
- Cocoapods
You can add a WalletConnect SDK to your project with Swift Package Manager. In order to do that:
- Open XCode
- Go to File -> Add Packages
- Paste the repo GitHub URL: https://github.com/WalletConnect/WalletConnectSwiftV2
- Tap Add Package
- Select WalletConnect check mark
- Update Cocoapods spec repos. Type in terminal
pod repo update
- Initialize Podfile if needed with
pod init
- Add pod to your Podfile:
pod 'WalletConnectSwiftV2'
- Install pods with
pod install
If you encounter any problems during package installation, you can specify the exact path to the repository
pod 'WalletConnectSwiftV2', :git => 'https://github.com/WalletConnect/WalletConnectSwiftV2.git', :tag => '1.0.5'
- Android Core
- Sign
Requirements​
- Android min SDK 23
- Java 11
Installation​
root/build.gradle.kts:
allprojects {
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
}
app/build.gradle.kts
implementation("com.walletconnect:android-core:release_version")
implementation("com.walletconnect:sign:release_version")
flutter pub add walletconnect_flutter_v2
Platform Specific Setup​
Depending on your platform, you will have to add different permissions to get the package to work.
MacOS​
Add the following to your DebugProfile.entitlements
and Release.entitlements
files so that it can connect to the WebSocket server.
<key>com.apple.security.network.client</key>
<true/>
Install via Packages​
Install the WalletConnect Sign Client package via Nuget.
dotnet add package WalletConnect.Sign
Since WalletConnectUnity
is a wrapper around WalletConnectSharp
, usage of the Sign API is identical to C#
. Please refer to C# documentation on how to use the Sign API inside WalletConnectUnity
.
Install the WalletConnectUnity
package from the GitHub repo
Once the WalletConnectUnity
package is imported, create a new empty Game Object in your scene. This will hold the WCSignClient
component and other required components.
Inside the WCSignClient
component, you can configure the Metadata
and other settings inside to the C# SignClientOptions
class.
With WCSignClient
configured, you can grab WCSignClient.Instance.SignClient
field to access the WalletConnectSignClient
API.
void Start()
{
WalletConnectSignClient dappClient = WCSignClient.Instance.SignClient
// ...
}
WalletConnectUnity
will automatically initialize the WalletConnectSignClient
module as well as initialize any required components. Therefore, no additional
configuration is required. All settings, including Metadata
, can be modified in the Unity Editor.
Was this helpful?