@novasamatech/host-papp 0.7.8-0 → 0.7.8-1
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/sso/auth/impl.js
CHANGED
|
@@ -164,8 +164,8 @@ function retrieveSession({ payload, encrSecret, localAccount, }) {
|
|
|
164
164
|
.map(decrypted => {
|
|
165
165
|
const { sharedSecretDerivationKey, rootUserAccountId, identityAccountId } = HandshakeResponseSensitiveData.dec(decrypted);
|
|
166
166
|
const sharedSecret = createSharedSecret(encrSecret, sharedSecretDerivationKey);
|
|
167
|
-
const
|
|
168
|
-
return createStoredUserSession(localAccount,
|
|
167
|
+
const remoteAccount = createRemoteSessionAccount(createAccountId(identityAccountId), sharedSecret);
|
|
168
|
+
return createStoredUserSession(localAccount, remoteAccount, createAccountId(rootUserAccountId));
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
function createDeeplink(payload) {
|
|
@@ -35,7 +35,7 @@ export function createUserSession({ userSession, statementStore, encryption, sto
|
|
|
35
35
|
id: userSession.id,
|
|
36
36
|
localAccount: userSession.localAccount,
|
|
37
37
|
remoteAccount: userSession.remoteAccount,
|
|
38
|
-
|
|
38
|
+
rootAccountId: userSession.rootAccountId,
|
|
39
39
|
signPayload(payload) {
|
|
40
40
|
return requestQueue.call(() => {
|
|
41
41
|
const messageId = nanoid();
|
|
@@ -14,9 +14,9 @@ declare const storedUserSessionCodec: import("scale-ts").Codec<{
|
|
|
14
14
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
15
15
|
pin: string | undefined;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
rootAccountId: AccountId;
|
|
18
18
|
}>;
|
|
19
|
-
export declare function createStoredUserSession(localAccount: LocalSessionAccount, remoteAccount: RemoteSessionAccount,
|
|
19
|
+
export declare function createStoredUserSession(localAccount: LocalSessionAccount, remoteAccount: RemoteSessionAccount, rootAccountId: AccountId): StoredUserSession;
|
|
20
20
|
export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
21
21
|
add(value: {
|
|
22
22
|
id: string;
|
|
@@ -29,7 +29,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
29
29
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
30
30
|
pin: string | undefined;
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
rootAccountId: AccountId;
|
|
33
33
|
}): import("neverthrow").ResultAsync<{
|
|
34
34
|
id: string;
|
|
35
35
|
localAccount: {
|
|
@@ -41,7 +41,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
41
41
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
42
42
|
pin: string | undefined;
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
rootAccountId: AccountId;
|
|
45
45
|
}, Error>;
|
|
46
46
|
filter(fn: (value: {
|
|
47
47
|
id: string;
|
|
@@ -54,7 +54,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
54
54
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
55
55
|
pin: string | undefined;
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
rootAccountId: AccountId;
|
|
58
58
|
}) => boolean): import("neverthrow").ResultAsync<{
|
|
59
59
|
id: string;
|
|
60
60
|
localAccount: {
|
|
@@ -66,7 +66,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
66
66
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
67
67
|
pin: string | undefined;
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
rootAccountId: AccountId;
|
|
70
70
|
}[], Error>;
|
|
71
71
|
mutate(fn: (value: {
|
|
72
72
|
id: string;
|
|
@@ -79,7 +79,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
79
79
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
80
80
|
pin: string | undefined;
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
rootAccountId: AccountId;
|
|
83
83
|
}[]) => {
|
|
84
84
|
id: string;
|
|
85
85
|
localAccount: {
|
|
@@ -91,7 +91,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
91
91
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
92
92
|
pin: string | undefined;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
rootAccountId: AccountId;
|
|
95
95
|
}[]): import("neverthrow").ResultAsync<{
|
|
96
96
|
id: string;
|
|
97
97
|
localAccount: {
|
|
@@ -103,7 +103,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
103
103
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
104
104
|
pin: string | undefined;
|
|
105
105
|
};
|
|
106
|
-
|
|
106
|
+
rootAccountId: AccountId;
|
|
107
107
|
}[], Error>;
|
|
108
108
|
read(): import("neverthrow").ResultAsync<{
|
|
109
109
|
id: string;
|
|
@@ -116,7 +116,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
116
116
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
117
117
|
pin: string | undefined;
|
|
118
118
|
};
|
|
119
|
-
|
|
119
|
+
rootAccountId: AccountId;
|
|
120
120
|
}[], Error>;
|
|
121
121
|
write(value: {
|
|
122
122
|
id: string;
|
|
@@ -129,7 +129,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
129
129
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
130
130
|
pin: string | undefined;
|
|
131
131
|
};
|
|
132
|
-
|
|
132
|
+
rootAccountId: AccountId;
|
|
133
133
|
}[]): import("neverthrow").ResultAsync<null, Error> | import("neverthrow").ResultAsync<{
|
|
134
134
|
id: string;
|
|
135
135
|
localAccount: {
|
|
@@ -141,7 +141,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
141
141
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
142
142
|
pin: string | undefined;
|
|
143
143
|
};
|
|
144
|
-
|
|
144
|
+
rootAccountId: AccountId;
|
|
145
145
|
}[], Error>;
|
|
146
146
|
clear(): import("neverthrow").ResultAsync<void, Error>;
|
|
147
147
|
subscribe(fn: (value: {
|
|
@@ -155,7 +155,7 @@ export declare const createUserSessionRepository: (storage: StorageAdapter) => {
|
|
|
155
155
|
publicKey: Uint8Array<ArrayBufferLike>;
|
|
156
156
|
pin: string | undefined;
|
|
157
157
|
};
|
|
158
|
-
|
|
158
|
+
rootAccountId: AccountId;
|
|
159
159
|
}[]) => void): VoidFunction;
|
|
160
160
|
};
|
|
161
161
|
export {};
|
|
@@ -7,14 +7,14 @@ const storedUserSessionCodec = Struct({
|
|
|
7
7
|
id: str,
|
|
8
8
|
localAccount: LocalSessionAccountCodec,
|
|
9
9
|
remoteAccount: RemoteSessionAccountCodec,
|
|
10
|
-
|
|
10
|
+
rootAccountId: AccountIdCodec,
|
|
11
11
|
});
|
|
12
|
-
export function createStoredUserSession(localAccount, remoteAccount,
|
|
12
|
+
export function createStoredUserSession(localAccount, remoteAccount, rootAccountId) {
|
|
13
13
|
return {
|
|
14
14
|
id: nanoid(12),
|
|
15
15
|
localAccount: localAccount,
|
|
16
16
|
remoteAccount: remoteAccount,
|
|
17
|
-
|
|
17
|
+
rootAccountId,
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
export const createUserSessionRepository = (storage) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novasamatech/host-papp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.8-
|
|
4
|
+
"version": "0.7.8-1",
|
|
5
5
|
"description": "Polkadot app integration",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@noble/ciphers": "2.2.0",
|
|
30
30
|
"@noble/curves": "2.2.0",
|
|
31
31
|
"@noble/hashes": "2.2.0",
|
|
32
|
-
"@novasamatech/host-api": "0.7.8-
|
|
33
|
-
"@novasamatech/scale": "0.7.8-
|
|
34
|
-
"@novasamatech/statement-store": "0.7.8-
|
|
35
|
-
"@novasamatech/storage-adapter": "0.7.8-
|
|
32
|
+
"@novasamatech/host-api": "0.7.8-1",
|
|
33
|
+
"@novasamatech/scale": "0.7.8-1",
|
|
34
|
+
"@novasamatech/statement-store": "0.7.8-1",
|
|
35
|
+
"@novasamatech/storage-adapter": "0.7.8-1",
|
|
36
36
|
"@polkadot-labs/hdkd-helpers": "^0.0.30",
|
|
37
37
|
"nanoevents": "9.1.0",
|
|
38
38
|
"nanoid": "5.1.9",
|