@hashgraph/hedera-wallet-connect 2.0.1-canary.3eab33b.0 → 2.0.1-canary.4c32afe.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.
@@ -1,11 +1,11 @@
1
- import { Wallet as HederaWallet, AccountId, Transaction, Query } from '@hashgraph/sdk';
1
+ import { Wallet as HederaWallet, AccountId, Transaction, Query, PrivateKey } from '@hashgraph/sdk';
2
2
  import { JsonRpcError, JsonRpcResult } from '@walletconnect/jsonrpc-utils';
3
3
  import { HederaChainId, HederaJsonRpcMethod, GetNodeAddressesResult, ExecuteTransactionResult, SignAndExecuteQueryResult, SignMessageResult, SignAndExecuteTransactionResult, SignTransactionResult, WalletRequestEventArgs } from '../..';
4
4
  import Provider from '../../lib/wallet/provider';
5
5
  interface IInitArgs {
6
6
  chainId: HederaChainId;
7
7
  accountId: AccountId | string;
8
- privateKey: string;
8
+ privateKey: PrivateKey;
9
9
  _provider?: Provider;
10
10
  }
11
11
  export interface HIP820WalletInterface {
@@ -1,6 +1,6 @@
1
1
  import { Buffer } from 'buffer';
2
2
  import { getSdkError } from '@walletconnect/utils';
3
- import { Wallet as HederaWallet, Client, AccountId, PrecheckStatusError, PrivateKey, } from '@hashgraph/sdk';
3
+ import { Wallet as HederaWallet, Client, AccountId, PrecheckStatusError, } from '@hashgraph/sdk';
4
4
  import { proto } from '@hashgraph/proto';
5
5
  import { formatJsonRpcError, formatJsonRpcResult, } from '@walletconnect/jsonrpc-utils';
6
6
  import { HederaJsonRpcMethod, base64StringToQuery, Uint8ArrayToBase64String, stringToSignerMessage, signerSignaturesToSignatureMap, getHederaError, base64StringToTransaction, signatureMapToBase64String, } from '../..';
@@ -22,7 +22,7 @@ export class HIP820Wallet {
22
22
  const network = chainId.split(':')[1];
23
23
  const client = Client.forName(network);
24
24
  const provider = _provider !== null && _provider !== void 0 ? _provider : new Provider(client);
25
- const wallet = new HederaWallet(accountId, PrivateKey.fromString(privateKey), provider);
25
+ const wallet = new HederaWallet(accountId, privateKey, provider);
26
26
  return new HIP820Wallet(wallet);
27
27
  }
28
28
  /*
@@ -140,7 +140,7 @@ export class HIP820Wallet {
140
140
  // 2. hedera_executeTransaction
141
141
  async hedera_executeTransaction(id, signedTransaction) {
142
142
  try {
143
- const response = await signedTransaction.executeWithSigner(this.wallet);
143
+ const response = await this.wallet.call(signedTransaction);
144
144
  return formatJsonRpcResult(id, response.toJSON());
145
145
  }
146
146
  catch (e) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hashgraph/hedera-wallet-connect",
3
- "version": "2.0.1-canary.3eab33b.0",
4
- "description": "A library to facilitate integrating Hedera",
3
+ "version": "2.0.1-canary.4c32afe.0",
4
+ "description": "A library to facilitate integrating Hedera with WalletConnect",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/hashgraph/hedera-wallet-connect.git"