@dynamic-labs/wallet-connector-core 1.1.0-alpha.21 → 1.1.0-alpha.23

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/CHANGELOG.md CHANGED
@@ -1,4 +1,19 @@
1
1
 
2
+ ## [1.1.0-alpha.23](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.22...v1.1.0-alpha.23) (2024-02-01)
3
+
4
+
5
+ ### Features
6
+
7
+ * bitcoin signPsbt ([3c964de](https://github.com/dynamic-labs/DynamicAuth/commit/3c964dea8a55debaf184c5a94f0f5fabdda3c877))
8
+ * embedded wallet email auth flow ([#4353](https://github.com/dynamic-labs/DynamicAuth/issues/4353)) ([4875da3](https://github.com/dynamic-labs/DynamicAuth/commit/4875da32c47c27facef1b1cdbdc214566bbfd171))
9
+
10
+ ## [1.1.0-alpha.22](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.21...v1.1.0-alpha.22) (2024-02-01)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * onAuthFlowClose not being called ([#4563](https://github.com/dynamic-labs/DynamicAuth/issues/4563)) ([c4b2648](https://github.com/dynamic-labs/DynamicAuth/commit/c4b264885b7dba6e204ef49bf642d25c7d287b04))
16
+
2
17
  ## [1.1.0-alpha.21](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.20...v1.1.0-alpha.21) (2024-02-01)
3
18
 
4
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-connector-core",
3
- "version": "1.1.0-alpha.21",
3
+ "version": "1.1.0-alpha.23",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -29,11 +29,11 @@
29
29
  "@dynamic-labs/sdk-api": "0.0.356"
30
30
  },
31
31
  "peerDependencies": {
32
- "@dynamic-labs/logger": "1.1.0-alpha.21",
33
- "@dynamic-labs/rpc-providers": "1.1.0-alpha.21",
32
+ "@dynamic-labs/logger": "1.1.0-alpha.23",
33
+ "@dynamic-labs/rpc-providers": "1.1.0-alpha.23",
34
34
  "@dynamic-labs/sdk-api": "0.0.356",
35
- "@dynamic-labs/utils": "1.1.0-alpha.21",
36
- "@dynamic-labs/wallet-book": "1.1.0-alpha.21",
35
+ "@dynamic-labs/utils": "1.1.0-alpha.23",
36
+ "@dynamic-labs/wallet-book": "1.1.0-alpha.23",
37
37
  "eventemitter3": "5.0.1"
38
38
  }
39
39
  }
@@ -3,8 +3,22 @@ type BitcoinTransaction = {
3
3
  amount: bigint;
4
4
  recipientAddress: string;
5
5
  };
6
+ export type BitcoinSignPsbtRequest = {
7
+ allowedSighash: number[];
8
+ unsignedPsbtBase64: string;
9
+ signature?: BitcoinSignPsbtRequestSignature[];
10
+ };
11
+ export type BitcoinSignPsbtRequestSignature = {
12
+ address: string;
13
+ signingIndexes: number[] | undefined;
14
+ disableAddressValidation?: boolean;
15
+ };
16
+ export type BitcoinSignPsbtResponse = {
17
+ signedPsbt: string;
18
+ };
6
19
  export interface IBitcoinWalletConnector extends WalletConnectorBase {
7
20
  sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
8
21
  sendRawTransaction(transactionHex: string): Promise<string | undefined>;
22
+ signPsbt(request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
9
23
  }
10
24
  export {};
@@ -12,17 +12,21 @@ export interface WebAuthnAttestation {
12
12
  export type RecoveryWebAuthnAttestation = WebAuthnAttestation & {
13
13
  organizationId: string;
14
14
  };
15
+ export type AuthenticatorType = 'passkey' | 'email';
15
16
  export interface IPasskeyWalletConnector extends WalletConnectorBase {
16
17
  getWebAuthnAttestation(): Promise<WebAuthnAttestation>;
17
- getRecoverPasskeyHandler: () => PasskeyRecoveryHandler;
18
+ getAuthenticatorHandler: () => AuthenticatorRecoveryHandler;
18
19
  getExportHandler: () => ExportHandler;
19
20
  }
20
- export interface PasskeyRecoveryHandler {
21
- initRecovery: (iframeContainer: HTMLElement, iframeElementId: string) => Promise<string | null>;
21
+ export interface AuthenticatorRecoveryHandler {
22
+ initRecovery: (authType: AuthenticatorType, iframeContainer: HTMLElement, iframeElementId: string, sessionExpiration?: number) => Promise<string | null>;
22
23
  verifyRecoveryCode: (recoveryBundle: string, organizationId?: string) => Promise<unknown>;
23
24
  completeRecovery: (recoveryParams: RecoveryWebAuthnAttestation) => Promise<unknown>;
25
+ addPasskeyAuthenticator: (passkeyAuthenticatorParams: RecoveryWebAuthnAttestation) => Promise<unknown>;
24
26
  clear: () => void;
27
+ isSessionActive: () => boolean;
25
28
  get publicKey(): string | undefined | null;
29
+ get recoveryType(): AuthenticatorType | undefined | null;
26
30
  set recoveryUserId(recoveryUserId: string);
27
31
  }
28
32
  export interface ExportHandler {