@hashgraph/hedera-wallet-connect 2.0.4-canary.a83fb1a.0 → 2.0.4-canary.dcc529b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/reown/adapter.js +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
@@ -13,7 +13,7 @@ read transactions. Hedera implements EVM compatible smart contracts using
|
|
13
13
|
[Hyperledger Besu](https://besu.hyperledger.org/) under the hood.
|
14
14
|
|
15
15
|
Ethereum developers and toolsets often expect to interact with Ethereum compatible chains using
|
16
|
-
the [Ethereum JSON-RPC](https://ethereum.org/en/developers/docs/apis/json-rpc/). To
|
16
|
+
the [Ethereum JSON-RPC](https://ethereum.org/en/developers/docs/apis/json-rpc/). To achieve
|
17
17
|
compatibility with this API,
|
18
18
|
[Hedera JSON-RPC Providers](https://docs.hedera.com/hedera/core-concepts/smart-contracts/json-rpc-relay#community-hosted-json-rpc-relays)
|
19
19
|
operate a software middlelayer that translates Ethereum JSON-RPC compatible API calls into
|
@@ -26,7 +26,7 @@ transactions to wallets over the WalletConnect network using the JSON-RPC spec d
|
|
26
26
|
Hedera native transactions or use Ethereum JSON-RPC calls sent to a Hedera JSON-RPC Relay
|
27
27
|
provider which then communicates with Hedera consensus and mirror nodes.
|
28
28
|
|
29
|
-
On a high level, JSON-RPC is a type of API
|
29
|
+
On a high level, JSON-RPC is a type of API structure, such as SOAP, gRPC, REST, GraphQL, etc. In
|
30
30
|
the Hedera ecosystem, there are distinct concepts regarding JSON-RPC APIs to consider:
|
31
31
|
|
32
32
|
- Ethereum JSON-RPC spec defines how to interact with Ethereum compatible networks
|
@@ -34,7 +34,7 @@ the Hedera ecosystem, there are distinct concepts regarding JSON-RPC APIs to con
|
|
34
34
|
- Wallets in the Hedera ecosystem also support a separate specification that defines how to send
|
35
35
|
transactions and messages to wallets over the WalletConnect network without relying on a
|
36
36
|
Hedera JSON-RPC Relay provider. This is a Hedera specific specification defined for utilizing
|
37
|
-
the WalletConnect network
|
37
|
+
the WalletConnect network distinct from other JSON-RPC specs such as the one defined by the
|
38
38
|
Ethereum network.
|
39
39
|
|
40
40
|
For more information see:
|
@@ -64,7 +64,7 @@ reviewing the [Reown docs](https://docs.reown.com/overview).
|
|
64
64
|
1. Add Hedera dependencies to your project:
|
65
65
|
|
66
66
|
```sh
|
67
|
-
npm install @hashgraph/hedera-wallet-connect@2.0.
|
67
|
+
npm install @hashgraph/hedera-wallet-connect@2.0.4-canary.3ca04e9.0 @hashgraph/sdk @walletconnect/modal
|
68
68
|
```
|
69
69
|
|
70
70
|
2. Initialize dApp Connector
|
@@ -121,7 +121,7 @@ await dAppConnector.openModal()
|
|
121
121
|
2. Add Hedera dependencies to your project:
|
122
122
|
|
123
123
|
```sh
|
124
|
-
npm install @hashgraph/hedera-wallet-connect@2.0.
|
124
|
+
npm install @hashgraph/hedera-wallet-connect@2.0.4-canary.3ca04e9.0 @hashgraph/sdk @walletconnect/universal-provider
|
125
125
|
```
|
126
126
|
|
127
127
|
3. Update `createAppKit` with adapters and a universal provider for Hedera. Note the
|
@@ -154,7 +154,7 @@ const hederaEVMAdapter = new HederaAdapter({
|
|
154
154
|
})
|
155
155
|
|
156
156
|
const universalProvider = (await HederaProvider.init({
|
157
|
-
projectId: "YOUR_PROJECT_ID"
|
157
|
+
projectId: "YOUR_PROJECT_ID",
|
158
158
|
metadata,
|
159
159
|
})) as unknown as UniversalProvider, // avoid type mismatch error due to missing of private properties in HederaProvider
|
160
160
|
|
package/dist/reown/adapter.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { CoreHelperUtil, WcHelpersUtil } from '@reown/appkit';
|
2
2
|
import { isReownName } from '@reown/appkit-common';
|
3
3
|
import { AdapterBlueprint } from '@reown/appkit/adapters';
|
4
|
-
import { ProviderUtil } from '@reown/appkit/store';
|
5
4
|
import { LedgerId } from '@hashgraph/sdk';
|
6
5
|
import { BrowserProvider, Contract, formatUnits, JsonRpcSigner, parseUnits } from 'ethers';
|
7
6
|
import { HederaConnector } from './connectors';
|
@@ -221,7 +220,7 @@ export class HederaAdapter extends AdapterBlueprint {
|
|
221
220
|
if (this.namespace !== 'eip155') {
|
222
221
|
throw new Error('Namespace is not eip155');
|
223
222
|
}
|
224
|
-
const provider =
|
223
|
+
const provider = this.provider;
|
225
224
|
if (!provider) {
|
226
225
|
throw new Error('Provider is undefined');
|
227
226
|
}
|
package/package.json
CHANGED