@hashgraph/hedera-wallet-connect 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,7 @@ export declare class DAppConnector {
14
14
  supportedEvents: string[];
15
15
  supportedChains: string[];
16
16
  extensions: ExtensionData[];
17
+ onSessionIframeCreated: ((session: SessionTypes.Struct) => void) | null;
17
18
  walletConnectClient: SignClient | undefined;
18
19
  walletConnectModal: WalletConnectModal;
19
20
  signers: DAppSigner[];
@@ -25,7 +26,7 @@ export declare class DAppConnector {
25
26
  * @param projectId - Project ID for the WalletConnect client.
26
27
  * @param methods - Array of supported methods for the DApp (optional).
27
28
  * @param events - Array of supported events for the DApp (optional).
28
- * @param events - Array of supported chains for the DApp (optional).
29
+ * @param chains - Array of supported chains for the DApp (optional).
29
30
  */
30
31
  constructor(metadata: SignClientTypes.Metadata, network: LedgerId, projectId: string, methods?: string[], events?: string[], chains?: string[]);
31
32
  /**
@@ -62,6 +63,10 @@ export declare class DAppConnector {
62
63
  * @returns A Promise that resolves when the connection process is complete.
63
64
  */
64
65
  connectExtension(extensionId: string, pairingTopic?: string): Promise<SessionTypes.Struct>;
66
+ /**
67
+ * Initiates the WallecConnect connection if the wallet in iframe mode is detected.
68
+ */
69
+ private checkIframeConnect;
65
70
  private abortableConnect;
66
71
  /**
67
72
  * Disconnects the current session associated with the specified topic.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/dapp/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAe,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,UAAU,MAAM,4BAA4B,CAAA;AAEnD,OAAO,EAKL,sBAAsB,EACtB,wBAAwB,EAExB,wBAAwB,EACxB,iBAAiB,EAEjB,iBAAiB,EAEjB,y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IACU,eAAe,CAAC,MAAM,EAAE,qBAAqB;CAM3D;AAED,eAAe,aAAa,CAAA"}
@@ -2,7 +2,10 @@ export declare enum EVENTS {
2
2
  extensionQuery = "hedera-extension-query",
3
3
  extensionConnect = "hedera-extension-connect-",
4
4
  extensionOpen = "hedera-extension-open-",
5
- extensionResponse = "hedera-extension-response"
5
+ extensionResponse = "hedera-extension-response",
6
+ iframeQuery = "hedera-iframe-query",
7
+ iframeQueryResponse = "hedera-iframe-response",
8
+ iframeConnect = "hedera-iframe-connect"
6
9
  }
7
10
  export type ExtensionData = {
8
11
  id: string;
@@ -10,9 +13,10 @@ export type ExtensionData = {
10
13
  icon?: string;
11
14
  url?: string;
12
15
  available: boolean;
16
+ availableInIframe: boolean;
13
17
  };
14
- export declare const findExtensions: (onFound: (_metadata: ExtensionData) => void) => void;
18
+ export declare const findExtensions: (onFound: (_metadata: ExtensionData, isIframe: boolean) => void) => void;
15
19
  export declare const extensionQuery: () => void;
16
- export declare const extensionConnect: (id: string, pairingString: string) => void;
20
+ export declare const extensionConnect: (id: string, isIframe: boolean, pairingString: string) => void;
17
21
  export declare const extensionOpen: (id: string) => void;
18
22
  //# sourceMappingURL=extensionController.d.ts.map
@@ -1 +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"}
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;IAC/C,WAAW,wBAAwB;IACnC,mBAAmB,2BAA2B;IAC9C,aAAa,0BAA0B;CACxC;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;IAClB,iBAAiB,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,cAAc,YAChB,CAAC,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,KAC7D,IAeF,CAAA;AAED,eAAO,MAAM,cAAc,YAK1B,CAAA;AAED,eAAO,MAAM,gBAAgB,OAAQ,MAAM,YAAY,OAAO,iBAAiB,MAAM,SAMpF,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,SAEvC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashgraph/hedera-wallet-connect",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "A library to facilitate integrating Hedera with WalletConnect",
5
5
  "repository": {
6
6
  "type": "git",