@dynamic-labs/solana 1.1.0-alpha.18 → 1.1.0-alpha.19
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,16 @@
|
|
|
1
1
|
|
|
2
|
+
## [1.1.0-alpha.19](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.18...v1.1.0-alpha.19) (2024-01-31)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add PhantomRedirect connector ([#4467](https://github.com/dynamic-labs/DynamicAuth/issues/4467)) ([75d6c95](https://github.com/dynamic-labs/DynamicAuth/commit/75d6c95940fcec185a699c2100b3e2d21a8233d5))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* lock starknet to 5.25.0 since 5.27.0 breaks the build ([#4541](https://github.com/dynamic-labs/DynamicAuth/issues/4541)) ([00b4799](https://github.com/dynamic-labs/DynamicAuth/commit/00b479977f768cb067480e2e565eabf45e1000a2))
|
|
13
|
+
|
|
2
14
|
## [1.1.0-alpha.18](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.17...v1.1.0-alpha.18) (2024-01-30)
|
|
3
15
|
|
|
4
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/solana",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.19",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -28,12 +28,14 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@solana/web3.js": "1.70.1",
|
|
30
30
|
"@dynamic-labs/sdk-api": "0.0.356",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"@dynamic-labs/
|
|
34
|
-
"@dynamic-labs/
|
|
35
|
-
"@dynamic-labs/
|
|
36
|
-
"@dynamic-labs/
|
|
31
|
+
"bs58": "^5.0.0",
|
|
32
|
+
"tweetnacl": "^1.0.3",
|
|
33
|
+
"@dynamic-labs/rpc-providers": "1.1.0-alpha.19",
|
|
34
|
+
"@dynamic-labs/turnkey": "1.1.0-alpha.19",
|
|
35
|
+
"@dynamic-labs/types": "1.1.0-alpha.19",
|
|
36
|
+
"@dynamic-labs/utils": "1.1.0-alpha.19",
|
|
37
|
+
"@dynamic-labs/wallet-book": "1.1.0-alpha.19",
|
|
38
|
+
"@dynamic-labs/wallet-connector-core": "1.1.0-alpha.19",
|
|
37
39
|
"eventemitter3": "5.0.1"
|
|
38
40
|
},
|
|
39
41
|
"peerDependencies": {}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IPhantomRedirectConnector } from '@dynamic-labs/wallet-connector-core';
|
|
2
|
+
import { SolWalletConnector } from '../solWalletConnector';
|
|
3
|
+
import { ISolana } from '..';
|
|
4
|
+
export declare class PhantomRedirect extends SolWalletConnector implements IPhantomRedirectConnector {
|
|
5
|
+
name: string;
|
|
6
|
+
constructor(props: any);
|
|
7
|
+
fetchPublicAddress(): Promise<string | undefined>;
|
|
8
|
+
connect(): Promise<void>;
|
|
9
|
+
getSession(): Promise<string>;
|
|
10
|
+
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
11
|
+
extractSignature(): {
|
|
12
|
+
signature: string;
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
getSigner(): Promise<ISolana | undefined>;
|
|
16
|
+
getConnectedAccounts(): Promise<string[]>;
|
|
17
|
+
endSession(): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Helper method to get inputs from query params and localstorage
|
|
20
|
+
*
|
|
21
|
+
* The second argument is used to read values from the query string
|
|
22
|
+
* e.g. ['data', 'nonce'] -> params.get('data') and params.get('nonce')
|
|
23
|
+
*
|
|
24
|
+
* The third argument is used to read values from local storage
|
|
25
|
+
* e.g. ['address', 'message'] -> storage.address.get() and storage.message.get()
|
|
26
|
+
*
|
|
27
|
+
* Throws an error if any of the inputs are unable to be found in their respective locations
|
|
28
|
+
*/
|
|
29
|
+
private getInputsOrThrow;
|
|
30
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
|
2
|
+
export declare const storage: {
|
|
3
|
+
address: {
|
|
4
|
+
get: () => string | undefined;
|
|
5
|
+
remove: () => void;
|
|
6
|
+
set: (address: PublicKey) => void;
|
|
7
|
+
};
|
|
8
|
+
encryptionPublicKey: {
|
|
9
|
+
get: () => Uint8Array | undefined;
|
|
10
|
+
remove: () => void;
|
|
11
|
+
set: (publicKey: Uint8Array) => void;
|
|
12
|
+
};
|
|
13
|
+
encryptionSecretKey: {
|
|
14
|
+
get: () => Uint8Array | undefined;
|
|
15
|
+
remove: () => void;
|
|
16
|
+
set: (secretKey: Uint8Array) => void;
|
|
17
|
+
};
|
|
18
|
+
message: {
|
|
19
|
+
get: () => string | undefined;
|
|
20
|
+
remove: () => void;
|
|
21
|
+
set: (message: string) => void;
|
|
22
|
+
};
|
|
23
|
+
session: {
|
|
24
|
+
get: () => string | undefined;
|
|
25
|
+
remove: () => void;
|
|
26
|
+
set: (session: string) => void;
|
|
27
|
+
};
|
|
28
|
+
sharedSecret: {
|
|
29
|
+
get: () => Uint8Array | undefined;
|
|
30
|
+
remove: () => void;
|
|
31
|
+
set: (sharedSecret: Uint8Array) => void;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const buildUrl: (path: string, params: URLSearchParams) => string;
|
|
2
|
+
export declare const decryptPayload: (data: string, nonce: string, sharedSecret: Uint8Array) => any;
|
|
3
|
+
export declare const encryptPayload: (payload: any, sharedSecret: Uint8Array) => Uint8Array[];
|