@magic-sdk/provider 33.0.0 → 33.1.0-canary.964.20943413682.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.
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +3 -3
- package/dist/es/index.js +2 -2
- package/dist/es/index.js.map +3 -3
- package/dist/es/index.mjs +2 -2
- package/dist/es/index.mjs.map +3 -3
- package/dist/types/core/view-controller.d.ts +6 -0
- package/dist/types/util/view-controller-utils.d.ts +1 -3
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MagicIncomingWindowMessage, MagicOutgoingWindowMessage, JsonRpcRequestPayload, MagicMessageEvent, MagicMessageRequest } from '@magic-sdk/types';
|
|
2
2
|
import { JsonRpcResponse } from './json-rpc';
|
|
3
|
+
import { StandardizedMagicRequest } from '../util/view-controller-utils';
|
|
3
4
|
interface RemoveEventListenerFunction {
|
|
4
5
|
(): void;
|
|
5
6
|
}
|
|
@@ -57,5 +58,10 @@ export declare abstract class ViewController {
|
|
|
57
58
|
*/
|
|
58
59
|
private heartBeatCheck;
|
|
59
60
|
protected stopHeartBeat(): void;
|
|
61
|
+
persistMagicEventRefreshToken(event: MagicMessageEvent): Promise<void>;
|
|
62
|
+
createMagicRequest(msgType: string, payload: JsonRpcRequestPayload | JsonRpcRequestPayload[], networkHash: string): Promise<StandardizedMagicRequest>;
|
|
63
|
+
getJWT(): Promise<string | null | undefined>;
|
|
64
|
+
getRT(): Promise<string | null>;
|
|
65
|
+
getDecryptedDeviceShare(networkHash: string): Promise<string | undefined>;
|
|
60
66
|
}
|
|
61
67
|
export {};
|
|
@@ -4,7 +4,7 @@ interface StandardizedResponse {
|
|
|
4
4
|
id?: string | number;
|
|
5
5
|
response?: JsonRpcResponse;
|
|
6
6
|
}
|
|
7
|
-
interface StandardizedMagicRequest {
|
|
7
|
+
export interface StandardizedMagicRequest {
|
|
8
8
|
msgType: string;
|
|
9
9
|
payload: JsonRpcRequestPayload | JsonRpcRequestPayload[];
|
|
10
10
|
jwt?: string;
|
|
@@ -20,7 +20,5 @@ export declare function getRequestPayloadFromBatch(requestPayload: JsonRpcReques
|
|
|
20
20
|
* JSON RPC payload ID.
|
|
21
21
|
*/
|
|
22
22
|
export declare function standardizeResponse(requestPayload: JsonRpcRequestPayload | JsonRpcRequestPayload[], event: MagicMessageEvent): StandardizedResponse;
|
|
23
|
-
export declare function createMagicRequest(msgType: string, payload: JsonRpcRequestPayload | JsonRpcRequestPayload[], networkHash: string): Promise<StandardizedMagicRequest>;
|
|
24
|
-
export declare function persistMagicEventRefreshToken(event: MagicMessageEvent): Promise<void>;
|
|
25
23
|
export declare function debounce<T extends (...args: unknown[]) => void>(func: T, delay: number): (...args: Parameters<T>) => void;
|
|
26
24
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magic-sdk/provider",
|
|
3
|
-
"version": "33.0.0",
|
|
3
|
+
"version": "33.1.0-canary.964.20943413682.0",
|
|
4
4
|
"description": "Core business logic for Magic SDK packages.",
|
|
5
5
|
"author": "Magic Labs <team@magic.link> (https://magic.link/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"localforage": "^1.7.4"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "f7fff21be3219978c98c34c872565dcde4d8307c"
|
|
42
42
|
}
|