@hashgraph/hedera-wallet-connect 1.0.6 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,11 @@ export declare class DAppSigner implements Signer {
5
5
  private readonly signClient;
6
6
  readonly topic: string;
7
7
  private readonly ledgerId;
8
- constructor(accountId: AccountId, signClient: ISignClient, topic: string, ledgerId?: LedgerId);
8
+ readonly extensionId?: string | undefined;
9
+ constructor(accountId: AccountId, signClient: ISignClient, topic: string, ledgerId?: LedgerId, extensionId?: string | undefined);
10
+ private _getHederaClient;
11
+ private get _signerAccountId();
12
+ private _getRandomNodes;
9
13
  request<T>(request: {
10
14
  method: string;
11
15
  params: any;
@@ -24,6 +28,9 @@ export declare class DAppSigner implements Signer {
24
28
  checkTransaction<T extends Transaction>(transaction: T): Promise<T>;
25
29
  populateTransaction<T extends Transaction>(transaction: T): Promise<T>;
26
30
  signTransaction<T extends Transaction>(transaction: T): Promise<T>;
31
+ private _tryExecuteTransactionRequest;
32
+ private _parseQueryResponse;
33
+ private _tryExecuteQueryRequest;
27
34
  call<RequestT, ResponseT, OutputT>(request: Executable<RequestT, ResponseT, OutputT>): Promise<OutputT>;
28
35
  }
29
36
  //# sourceMappingURL=DAppSigner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DAppSigner.d.ts","sourceRoot":"","sources":["../../../../../src/lib/dapp/DAppSigner.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,MAAM,EACN,cAAc,EACd,SAAS,EACT,WAAW,EACX,UAAU,EACV,GAAG,EACH,QAAQ,EACR,eAAe,EACf,WAAW,EACX,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAIvD,qBAAa,UAAW,YAAW,MAAM;IAErC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;aACX,KAAK,EAAE,MAAM;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ;g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sBvB,gBAAgB,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAInE,mBAAmB,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAMtE,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;YAqB1D,6BAA6B;YAsB7B,mBAAmB;YAsBnB,uBAAuB;IAuB/B,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EACrC,OAAO,EAAE,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,GAChD,OAAO,CAAC,OAAO,CAAC;CAgCpB"}
@@ -1,7 +1,8 @@
1
- import { LedgerId } from '@hashgraph/sdk';
2
- import { SignClientTypes } from '@walletconnect/types';
1
+ import { AccountId, LedgerId } from '@hashgraph/sdk';
2
+ import { SessionTypes, SignClientTypes } from '@walletconnect/types';
3
+ import { WalletConnectModal } from '@walletconnect/modal';
3
4
  import SignClient from '@walletconnect/sign-client';
4
- import { GetNodeAddressesResult, ExecuteTransactionParams, ExecuteTransactionResult, SignMessageParams, SignMessageResult, SignAndExecuteQueryResult, SignAndExecuteQueryParams, SignAndExecuteTransactionParams, SignAndExecuteTransactionResult, SignTransactionParams, SignTransactionResult } from '../shared';
5
+ import { GetNodeAddressesResult, ExecuteTransactionParams, ExecuteTransactionResult, SignMessageParams, SignMessageResult, SignAndExecuteQueryResult, SignAndExecuteQueryParams, SignAndExecuteTransactionParams, SignAndExecuteTransactionResult, SignTransactionParams, SignTransactionResult, ExtensionData } from '../shared';
5
6
  import { DAppSigner } from './DAppSigner';
6
7
  export * from './DAppSigner';
7
8
  type BaseLogger = 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'fatal';
@@ -12,7 +13,9 @@ export declare class DAppConnector {
12
13
  supportedMethods: string[];
13
14
  supportedEvents: string[];
14
15
  supportedChains: string[];
16
+ extensions: ExtensionData[];
15
17
  walletConnectClient: SignClient | undefined;
18
+ walletConnectModal: WalletConnectModal;
16
19
  signers: DAppSigner[];
17
20
  isInitializing: boolean;
18
21
  /**
@@ -32,6 +35,7 @@ export declare class DAppConnector {
32
35
  init({ logger }?: {
33
36
  logger?: BaseLogger;
34
37
  }): Promise<void>;
38
+ getSigner(accountId: AccountId): DAppSigner;
35
39
  /**
36
40
  * Initiates the WalletConnect connection flow using a QR code.
37
41
  * @param pairingTopic - The pairing topic for the connection (optional).
@@ -41,15 +45,23 @@ export declare class DAppConnector {
41
45
  /**
42
46
  * Initiates the WalletConnect connection flow using a QR code.
43
47
  * @param pairingTopic - The pairing topic for the connection (optional).
44
- * @returns A Promise that resolves when the connection process is complete.
48
+ * @returns {Promise<SessionTypes.Struct>} - A Promise that resolves when the connection process is complete.
45
49
  */
46
- openModal(pairingTopic?: string): Promise<void>;
50
+ openModal(pairingTopic?: string): Promise<SessionTypes.Struct>;
47
51
  /**
48
52
  * Initiates the WallecConnect connection flow using URI.
49
53
  * @param pairingTopic - The pairing topic for the connection (optional).
54
+ * @param extensionId - The id for the extension used to connect (optional).
55
+ * @returns A Promise that resolves when the connection process is complete.
56
+ */
57
+ connect(launchCallback: (uri: string) => void, pairingTopic?: string, extensionId?: string): Promise<SessionTypes.Struct>;
58
+ /**
59
+ * Initiates the WallecConnect connection flow sending a message to the extension.
60
+ * @param extensionId - The id for the extension used to connect.
61
+ * @param pairingTopic - The pairing topic for the connection (optional).
50
62
  * @returns A Promise that resolves when the connection process is complete.
51
63
  */
52
- connect(launchCallback: (uri: string) => void, pairingTopic?: string): Promise<void>;
64
+ connectExtension(extensionId: string, pairingTopic?: string): Promise<SessionTypes.Struct>;
53
65
  private abortableConnect;
54
66
  /**
55
67
  * Disconnects the current session associated with the specified topic.
@@ -66,9 +78,6 @@ export declare class DAppConnector {
66
78
  disconnectAll(): Promise<void>;
67
79
  private createSigners;
68
80
  private onSessionConnected;
69
- private pingWithTimeout;
70
- private pingWithRetry;
71
- private checkPersistedState;
72
81
  private connectURI;
73
82
  private request;
74
83
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/dapp/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAa,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAA6B,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAIjF,OAAO,UAAU,MAAM,4BAA4B,CAAA;AAEnD,OAAO,EAKL,sBAAsB,EACtB,wBAAwB,EAExB,wBAAwB,EACxB,iBAAiB,EAEjB,iBAAiB,EAEjB,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAE/B,+BAA+B,EAC/B,qBAAqB,EAErB,qBAAqB,EACtB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,cAAc,cAAc,CAAA;AAE5B,KAAK,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEzE,qBAAa,aAAa;IACxB,YAAY,EAAE,eAAe,CAAC,QAAQ,CAAA;IACtC,OAAO,EAAE,QAAQ,CAAmB;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,EAAE,CAAK;IAC/B,eAAe,EAAE,MAAM,EAAE,CAAK;IAC9B,eAAe,EAAE,MAAM,EAAE,CAAK;IAE9B,mBAAmB,EAAE,UAAU,GAAG,SAAS,CAAA;IAC3C,OAAO,EAAE,UAAU,EAAE,CAAK;IAC1B,cAAc,UAAQ;IAEtB;;;;;;;;OAQG;gBAED,QAAQ,EAAE,eAAe,CAAC,QAAQ,EAClC,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,MAAM,CAA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;;;;;;;;;;;;;;;;;;;OAmBG;IACU,eAAe,CAAC,MAAM,EAAE,qBAAqB;CAM3D;AAED,eAAe,aAAa,CAAA"}
@@ -0,0 +1,18 @@
1
+ export declare enum EVENTS {
2
+ extensionQuery = "hedera-extension-query",
3
+ extensionConnect = "hedera-extension-connect-",
4
+ extensionOpen = "hedera-extension-open-",
5
+ extensionResponse = "hedera-extension-response"
6
+ }
7
+ export type ExtensionData = {
8
+ id: string;
9
+ name?: string;
10
+ icon?: string;
11
+ url?: string;
12
+ available: boolean;
13
+ };
14
+ export declare const findExtensions: (onFound: (_metadata: ExtensionData) => void) => void;
15
+ export declare const extensionQuery: () => void;
16
+ export declare const extensionConnect: (id: string, pairingString: string) => void;
17
+ export declare const extensionOpen: (id: string) => void;
18
+ //# sourceMappingURL=extensionController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensionController.d.ts","sourceRoot":"","sources":["../../../../../src/lib/shared/extensionController.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM;IAChB,cAAc,2BAA2B;IACzC,gBAAgB,8BAA8B;IAC9C,aAAa,2BAA2B;IACxC,iBAAiB,8BAA8B;CAChD;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,cAAc,YAAa,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,KAAG,IAgB5E,CAAA;AAED,eAAO,MAAM,cAAc,YAE1B,CAAA;AAED,eAAO,MAAM,gBAAgB,OAAQ,MAAM,iBAAiB,MAAM,SAEjE,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,SAEvC,CAAA"}
@@ -4,4 +4,5 @@ export * from './events';
4
4
  export * from './methods';
5
5
  export * from './payloads';
6
6
  export * from './utils';
7
+ export * from './extensionController';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/shared/index.ts"],"names":[],"mappings":"AAoBA,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/shared/index.ts"],"names":[],"mappings":"AAoBA,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,uBAAuB,CAAA"}
@@ -132,9 +132,21 @@ export declare function stringToSignerMessage(message: string): Uint8Array[];
132
132
  *
133
133
  * @param message - A plain text string
134
134
  * @param base64SignatureMap - A base64 encoded proto.SignatureMap object
135
+ * @param publicKey - A PublicKey object use to verify the signature
135
136
  * @returns boolean - whether or not the first signature in the sigPair is valid for the message and public key
136
137
  */
137
138
  export declare function verifyMessageSignature(message: string, base64SignatureMap: string, publicKey: PublicKey): boolean;
139
+ /**
140
+ * This implementation expects a plain text string, which is prefixed and then signed by a wallet.
141
+ * Because the spec calls for 1 message to be signed and 1 signer, this function expects a single
142
+ * signature and used the first item in the sigPair array.
143
+ *
144
+ * @param message - A plain text string
145
+ * @param signerSignature - A SignerSignature object
146
+ * @param publicKey - A PublicKey object use to verify the signature
147
+ * @returns boolean - whether or not the first signature in the sigPair is valid for the message and public key
148
+ */
149
+ export declare function verifySignerSignature(message: string, signerSignature: SignerSignature, publicKey: PublicKey): boolean;
138
150
  /**
139
151
  *
140
152
  * https://github.com/hashgraph/hedera-sdk-js/blob/c78512b1d43eedf1d8bf2926a5b7ed3368fc39d1/src/P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(client: Client);
5
5
  static fromClient(client: Client): Provider;
6
- getLedgerId(): import("@hashgraph/sdk/lib/LedgerId").default | null;
6
+ getLedgerId(): import("@hashgraph/sdk").LedgerId | null;
7
7
  getNetwork(): {
8
8
  [key: string]: string | AccountId;
9
9
  };
@@ -1,4 +1,4 @@
1
- import { AccountId, Transaction, TransactionId } from '@hashgraph/sdk';
1
+ import { AccountId, Query, Transaction, TransactionId } from '@hashgraph/sdk';
2
2
  export declare const projectId = "ce06497abf4102004138a10edd29c921";
3
3
  export declare const walletMetadata: {
4
4
  name: string;
@@ -20,13 +20,17 @@ export declare const testUserAccountId: AccountId;
20
20
  export declare const testNodeAccountId: AccountId;
21
21
  /** Fixed to a specific timestamp */
22
22
  export declare const testTransactionId: TransactionId;
23
- type Options = {
23
+ type TransactionOptions = {
24
24
  setNodeAccountIds?: boolean;
25
25
  setTransactionId?: boolean;
26
26
  freeze?: boolean;
27
27
  operatorAccountId?: number;
28
28
  };
29
- export declare function prepareTestTransaction<T extends Transaction = Transaction>(transaction: T, options?: Options): T;
29
+ export declare function prepareTestTransaction<T extends Transaction = Transaction>(transaction: T, options?: TransactionOptions): T;
30
+ type QueryOptions = {
31
+ setNodeAccountIds?: boolean;
32
+ };
33
+ export declare function prepareTestQuery<Q extends Query<OutputT>, OutputT>(query: Q, options?: QueryOptions): Q;
30
34
  export declare const testPrivateKeyECDSA = "3030020100300706052b8104000a042204203ce31ffad30d6db47c315bbea08232aad2266d8800a12aa3d8a812486e782759";
31
35
  export declare const testPrivateKeyED25519 = "302e020100300506032b657004220420133eefea772add1f995c96bccf42b08b76daf67665f0c4c5ae308fae9275c142";
32
36
  export declare function useJsonFixture(filename: string): any;
@@ -1 +1 @@
1
- {"version":3,"file":"_helpers.d.ts","sourceRoot":"","sources":["../../../test/_helpers.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEtE,eAAO,MAAM,SAAS,q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AA;AAC1B,eAAO,MAAM,YAAY,eAAe,CAAA;AACxC,eAAO,MAAM,oBAAoB,QAAQ,CAAA;AACzC,eAAO,MAAM,aAAa,IAAI,CAAA;AAC9B,eAAO,MAAM,iBAAiB,WAAsC,CAAA;AACpE,eAAO,MAAM,iBAAiB,WAA+B,CAAA;AAC7D,oCAAoC;AACpC,eAAO,MAAM,iBAAiB,eAE7B,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AACD,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACxE,WAAW,EAAE,CAAC,EACd,OAAO,CAAC,EAAE,kBAAkB,GAC3B,CAAC,CA2BH;AAED,KAAK,YAAY,GAAG;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AACD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAChE,KAAK,EAAE,CAAC,EACR,OAAO,CAAC,EAAE,YAAY,GACrB,CAAC,CAWH;AAGD,eAAO,MAAM,mBAAmB,yGACwE,CAAA;AAExG,eAAO,MAAM,qBAAqB,qGACkE,CAAA;AAUpG,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,OAI9C;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,QAG3D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DAppSigner.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DAppSigner.test.d.ts","sourceRoot":"","sources":["../../../../test/dapp/DAppSigner.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashgraph/hedera-wallet-connect",
3
- "version": "1.0.6",
3
+ "version": "1.2.0",
4
4
  "description": "A library to facilitate integrating Hedera with WalletConnect",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,19 +24,22 @@
24
24
  "@hashgraph/hedera-wallet-connect": "^1.0.5",
25
25
  "@types/jest": "^29.5.3",
26
26
  "@types/node": "^20.11.10",
27
+ "@types/react-dom": "^18.2.21",
27
28
  "@walletconnect/modal": "^2.6.2",
28
29
  "@walletconnect/sign-client": "^2.11.0",
29
30
  "@walletconnect/types": "^2.11.0",
30
31
  "concurrently": "^8.2.2",
31
- "esbuild": "^0.20.0",
32
+ "esbuild": "^0.21.2",
32
33
  "esbuild-plugin-copy": "^2.1.1",
33
- "eslint-plugin-tsdoc": "^0.2.17",
34
+ "eslint-plugin-tsdoc": "^0.3.0",
34
35
  "husky": "^9.0.6",
35
36
  "jest": "^29.7.0",
36
37
  "lint-staged": "^15.1.0",
37
38
  "lokijs": "^1.5.12",
38
39
  "nodemon": "^3.0.3",
39
40
  "prettier": "^3.2.4",
41
+ "react": "^18.2.0",
42
+ "react-dom": "^18.2.0",
40
43
  "rimraf": "^5.0.5",
41
44
  "ts-jest": "^29.1.2",
42
45
  "ts-node": "^10.9.2",
@@ -55,11 +58,14 @@
55
58
  "build": "npm run build:types && node scripts/lib/build.mjs",
56
59
  "build:types": "tsc --emitDeclarationOnly --declaration --declarationMap --outDir dist/types",
57
60
  "build:example": "node scripts/examples/build.mjs",
61
+ "build:demos": "node scripts/demos/build.mjs",
58
62
  "build:docs": "typedoc --options typedoc.json",
59
63
  "watch": "nodemon --watch src/lib/ --ext ts --exec \"npm run build\"",
60
64
  "dev": "rimraf dist && npm run build && concurrently --raw \"npm run watch\" \"node scripts/examples/dev.mjs\"",
65
+ "dev:demos": "rimraf dist && npm run build && concurrently --raw \"npm run watch\" \"node scripts/demos/dev.mjs\"",
61
66
  "test": "jest",
62
67
  "test:connect": "jest --testMatch '**/DAppConnector.test.ts' --verbose",
68
+ "test:signer": "jest --testMatch '**/DAppSigner.test.ts' --verbose",
63
69
  "prepublishOnly": "rm -Rf dist && npm run build",
64
70
  "prepare": "husky install",
65
71
  "prettier:check": "prettier --check ./src/",