@ledgerhq/ledger-key-ring-protocol 0.5.1-fix-build-number-pre.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/.eslintrc.js +33 -0
- package/.turbo/turbo-build.log +4 -0
- package/CHANGELOG.md +299 -0
- package/LICENSE.txt +21 -0
- package/README.md +3 -0
- package/jest.config.js +13 -0
- package/lib/HWDeviceProvider.d.ts +25 -0
- package/lib/HWDeviceProvider.d.ts.map +1 -0
- package/lib/HWDeviceProvider.js +88 -0
- package/lib/HWDeviceProvider.js.map +1 -0
- package/lib/api.d.ts +77 -0
- package/lib/api.d.ts.map +1 -0
- package/lib/api.js +150 -0
- package/lib/api.js.map +1 -0
- package/lib/auth.d.ts +3 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/auth.js +79 -0
- package/lib/auth.js.map +1 -0
- package/lib/errors.d.ts +40 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +18 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/lib/mockSdk.d.ts +22 -0
- package/lib/mockSdk.d.ts.map +1 -0
- package/lib/mockSdk.js +208 -0
- package/lib/mockSdk.js.map +1 -0
- package/lib/qrcode/cipher.d.ts +12 -0
- package/lib/qrcode/cipher.d.ts.map +1 -0
- package/lib/qrcode/cipher.js +52 -0
- package/lib/qrcode/cipher.js.map +1 -0
- package/lib/qrcode/cipher.test.d.ts +2 -0
- package/lib/qrcode/cipher.test.d.ts.map +1 -0
- package/lib/qrcode/cipher.test.js +31 -0
- package/lib/qrcode/cipher.test.js.map +1 -0
- package/lib/qrcode/index.d.ts +70 -0
- package/lib/qrcode/index.d.ts.map +1 -0
- package/lib/qrcode/index.js +309 -0
- package/lib/qrcode/index.js.map +1 -0
- package/lib/qrcode/index.test.d.ts +2 -0
- package/lib/qrcode/index.test.d.ts.map +1 -0
- package/lib/qrcode/index.test.js +131 -0
- package/lib/qrcode/index.test.js.map +1 -0
- package/lib/qrcode/types.d.ts +69 -0
- package/lib/qrcode/types.d.ts.map +1 -0
- package/lib/qrcode/types.js +3 -0
- package/lib/qrcode/types.js.map +1 -0
- package/lib/sdk.d.ts +31 -0
- package/lib/sdk.d.ts.map +1 -0
- package/lib/sdk.js +380 -0
- package/lib/sdk.js.map +1 -0
- package/lib/store.d.ts +71 -0
- package/lib/store.d.ts.map +1 -0
- package/lib/store.js +62 -0
- package/lib/store.js.map +1 -0
- package/lib/types.d.ts +181 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +10 -0
- package/lib/types.js.map +1 -0
- package/lib-es/HWDeviceProvider.d.ts +25 -0
- package/lib-es/HWDeviceProvider.d.ts.map +1 -0
- package/lib-es/HWDeviceProvider.js +81 -0
- package/lib-es/HWDeviceProvider.js.map +1 -0
- package/lib-es/api.d.ts +77 -0
- package/lib-es/api.d.ts.map +1 -0
- package/lib-es/api.js +145 -0
- package/lib-es/api.js.map +1 -0
- package/lib-es/auth.d.ts +3 -0
- package/lib-es/auth.d.ts.map +1 -0
- package/lib-es/auth.js +75 -0
- package/lib-es/auth.js.map +1 -0
- package/lib-es/errors.d.ts +40 -0
- package/lib-es/errors.d.ts.map +1 -0
- package/lib-es/errors.js +15 -0
- package/lib-es/errors.js.map +1 -0
- package/lib-es/index.d.ts +6 -0
- package/lib-es/index.d.ts.map +1 -0
- package/lib-es/index.js +13 -0
- package/lib-es/index.js.map +1 -0
- package/lib-es/mockSdk.d.ts +22 -0
- package/lib-es/mockSdk.d.ts.map +1 -0
- package/lib-es/mockSdk.js +201 -0
- package/lib-es/mockSdk.js.map +1 -0
- package/lib-es/qrcode/cipher.d.ts +12 -0
- package/lib-es/qrcode/cipher.d.ts.map +1 -0
- package/lib-es/qrcode/cipher.js +44 -0
- package/lib-es/qrcode/cipher.js.map +1 -0
- package/lib-es/qrcode/cipher.test.d.ts +2 -0
- package/lib-es/qrcode/cipher.test.d.ts.map +1 -0
- package/lib-es/qrcode/cipher.test.js +29 -0
- package/lib-es/qrcode/cipher.test.js.map +1 -0
- package/lib-es/qrcode/index.d.ts +70 -0
- package/lib-es/qrcode/index.d.ts.map +1 -0
- package/lib-es/qrcode/index.js +301 -0
- package/lib-es/qrcode/index.js.map +1 -0
- package/lib-es/qrcode/index.test.d.ts +2 -0
- package/lib-es/qrcode/index.test.d.ts.map +1 -0
- package/lib-es/qrcode/index.test.js +126 -0
- package/lib-es/qrcode/index.test.js.map +1 -0
- package/lib-es/qrcode/types.d.ts +69 -0
- package/lib-es/qrcode/types.d.ts.map +1 -0
- package/lib-es/qrcode/types.js +2 -0
- package/lib-es/qrcode/types.js.map +1 -0
- package/lib-es/sdk.d.ts +31 -0
- package/lib-es/sdk.d.ts.map +1 -0
- package/lib-es/sdk.js +371 -0
- package/lib-es/sdk.js.map +1 -0
- package/lib-es/store.d.ts +71 -0
- package/lib-es/store.d.ts.map +1 -0
- package/lib-es/store.js +51 -0
- package/lib-es/store.js.map +1 -0
- package/lib-es/types.d.ts +181 -0
- package/lib-es/types.d.ts.map +1 -0
- package/lib-es/types.js +7 -0
- package/lib-es/types.js.map +1 -0
- package/mocks/scenarios/addSameMemberMultipleTimes.json +426 -0
- package/mocks/scenarios/create2trustchainInARow.json +616 -0
- package/mocks/scenarios/getOrCreateTransactionCases.json +591 -0
- package/mocks/scenarios/member3implicitlyAdded.json +648 -0
- package/mocks/scenarios/membersManySelfAdd.json +1427 -0
- package/mocks/scenarios/randomMemberTryToDestroy.json +371 -0
- package/mocks/scenarios/removeMemberWithTheWrongSeed.json +510 -0
- package/mocks/scenarios/removedMemberEjectedOnDeletedTrustchain.json +481 -0
- package/mocks/scenarios/removedMemberEjectedOnGetMembers.json +648 -0
- package/mocks/scenarios/removedMemberEjectedOnRestore.json +648 -0
- package/mocks/scenarios/removingAMemberCreatesAnInteraction.json +593 -0
- package/mocks/scenarios/removingYourselfIsForbidden.json +397 -0
- package/mocks/scenarios/success.json +978 -0
- package/mocks/scenarios/tokenExpires.json +371 -0
- package/mocks/scenarios/twoAddMembersFollowedByDeviceAdd.json +705 -0
- package/mocks/scenarios/userRefusesAuth.json +40 -0
- package/mocks/scenarios/userRefusesRemoveMember.json +542 -0
- package/package.json +91 -0
- package/scripts/README.md +15 -0
- package/scripts/e2e.ts +57 -0
- package/src/HWDeviceProvider.ts +105 -0
- package/src/__tests__/integration/mock.sdk.test.ts +47 -0
- package/src/__tests__/integration/sdk.test.ts +20 -0
- package/src/__tests__/tsconfig.json +8 -0
- package/src/__tests__/unit/sdk.test.ts +236 -0
- package/src/api.ts +202 -0
- package/src/auth.ts +81 -0
- package/src/errors.ts +18 -0
- package/src/index.ts +20 -0
- package/src/mockSdk.ts +253 -0
- package/src/qrcode/cipher.test.ts +30 -0
- package/src/qrcode/cipher.ts +61 -0
- package/src/qrcode/index.test.ts +138 -0
- package/src/qrcode/index.ts +394 -0
- package/src/qrcode/types.ts +70 -0
- package/src/sdk.ts +542 -0
- package/src/store.ts +99 -0
- package/src/types.ts +242 -0
- package/tests/scenarios/_template.ts +18 -0
- package/tests/scenarios/addSameMemberMultipleTimes.ts +20 -0
- package/tests/scenarios/create2trustchainInARow.ts +14 -0
- package/tests/scenarios/getOrCreateTransactionCases.ts +74 -0
- package/tests/scenarios/member3implicitlyAdded.ts +51 -0
- package/tests/scenarios/membersManySelfAdd.ts +18 -0
- package/tests/scenarios/randomMemberTryToDestroy.ts +23 -0
- package/tests/scenarios/removeMemberWithTheWrongSeed.ts +28 -0
- package/tests/scenarios/removedMemberEjectedOnDeletedTrustchain.ts +31 -0
- package/tests/scenarios/removedMemberEjectedOnGetMembers.ts +29 -0
- package/tests/scenarios/removedMemberEjectedOnRestore.ts +31 -0
- package/tests/scenarios/removingAMemberCreatesAnInteraction.ts +42 -0
- package/tests/scenarios/removingYourselfIsForbidden.ts +11 -0
- package/tests/scenarios/success.ts +94 -0
- package/tests/scenarios/tokenExpires.ts +20 -0
- package/tests/scenarios/twoAddMembersFollowedByDeviceAdd.ts +49 -0
- package/tests/scenarios/userRefusesAuth.ts +28 -0
- package/tests/scenarios/userRefusesRemoveMember.ts +66 -0
- package/tests/test-helpers/recordTrustchainSdkTests.ts +178 -0
- package/tests/test-helpers/replayTrustchainSdkTests.ts +141 -0
- package/tests/test-helpers/types.ts +45 -0
- package/tests/tsconfig.json +8 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import Transport from "@ledgerhq/hw-transport";
|
|
3
|
+
import { TrustchainsResponse } from "./api";
|
|
4
|
+
/**
|
|
5
|
+
* The JWT is a JSON Web Token that is used to authenticate the user.
|
|
6
|
+
*/
|
|
7
|
+
export type JWT = {
|
|
8
|
+
accessToken: string;
|
|
9
|
+
permissions: {
|
|
10
|
+
[trustchainId: string]: {
|
|
11
|
+
[path: string]: string[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A function which allow all interactions with the hardware device.
|
|
17
|
+
*/
|
|
18
|
+
export type WithDevice = (deviceId: string, options?: {
|
|
19
|
+
openTimeoutMs?: number;
|
|
20
|
+
}) => <T>(fn: (transport: Transport) => Observable<T>) => Observable<T>;
|
|
21
|
+
/**
|
|
22
|
+
* A Trustchain contains the identifier and the contextual data we need to manage members and encrypt/decrypt data.
|
|
23
|
+
*/
|
|
24
|
+
export type Trustchain = {
|
|
25
|
+
/**
|
|
26
|
+
* The immutable id of the trustchain root
|
|
27
|
+
*/
|
|
28
|
+
rootId: string;
|
|
29
|
+
/**
|
|
30
|
+
* The secret used to encrypt/decrypt the wallet sync data
|
|
31
|
+
*/
|
|
32
|
+
walletSyncEncryptionKey: string;
|
|
33
|
+
/**
|
|
34
|
+
* The derivation path on which the current walletSyncEncryptionKey value is stored
|
|
35
|
+
*/
|
|
36
|
+
applicationPath: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The Trustchain member credentials are stored on each client, with the privatekey only known by the current client.
|
|
40
|
+
*/
|
|
41
|
+
export type MemberCredentials = {
|
|
42
|
+
/**
|
|
43
|
+
* The public key of the member (in hexadecimal)
|
|
44
|
+
*/
|
|
45
|
+
pubkey: string;
|
|
46
|
+
/**
|
|
47
|
+
* The private key of the member (in hexadecimal)
|
|
48
|
+
*/
|
|
49
|
+
privatekey: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* A member of the trustchain
|
|
53
|
+
*/
|
|
54
|
+
export type TrustchainMember = {
|
|
55
|
+
/**
|
|
56
|
+
* The id of the member. It corresponds to the MemberCredentials.pubkey
|
|
57
|
+
*/
|
|
58
|
+
id: string;
|
|
59
|
+
/**
|
|
60
|
+
* The name of the member as displayed in the UI
|
|
61
|
+
*/
|
|
62
|
+
name: string;
|
|
63
|
+
/**
|
|
64
|
+
* a technical permissions of the member. it will often just be Permissions.OWNER
|
|
65
|
+
*/
|
|
66
|
+
permissions: number;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* The TrustchainSDKContext is a context that is used to initialize the TrustchainSDK.
|
|
70
|
+
*/
|
|
71
|
+
export type TrustchainSDKContext = {
|
|
72
|
+
applicationId: number;
|
|
73
|
+
name: string;
|
|
74
|
+
apiBaseUrl: string;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* provide global callbacks for specific lifecycles.
|
|
78
|
+
* this allows us to decouple trustchain with the rest of Ledger Live.
|
|
79
|
+
* For now, we only introduce very specific hooks we need.
|
|
80
|
+
*/
|
|
81
|
+
export type TrustchainLifecycle = {
|
|
82
|
+
/**
|
|
83
|
+
* called when a trustchain rotation is occuring
|
|
84
|
+
* the first function is called when the rotation is starting
|
|
85
|
+
* the second function is called when the rotation is done.
|
|
86
|
+
*
|
|
87
|
+
* in that case, we typically want to delete all other resources depending on it.
|
|
88
|
+
* we do this with the existing jwt token before refreshing it.
|
|
89
|
+
*/
|
|
90
|
+
onTrustchainRotation: (trustchainSdk: TrustchainSDK, oldTrustchain: Trustchain, memberCredentials: MemberCredentials) => Promise<(newTrustchain: Trustchain) => Promise<void>>;
|
|
91
|
+
};
|
|
92
|
+
export declare enum TrustchainResultType {
|
|
93
|
+
created = "created",
|
|
94
|
+
updated = "updated",
|
|
95
|
+
restored = "restored"
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* the trustchain with a result type indicating what happened during getOrCreateTrustchain
|
|
99
|
+
*/
|
|
100
|
+
export type TrustchainResult = {
|
|
101
|
+
type: TrustchainResultType.created;
|
|
102
|
+
trustchain: Trustchain;
|
|
103
|
+
} | {
|
|
104
|
+
type: TrustchainResultType.updated;
|
|
105
|
+
trustchain: Trustchain;
|
|
106
|
+
} | {
|
|
107
|
+
type: TrustchainResultType.restored;
|
|
108
|
+
trustchain: Trustchain;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* cache (default): the SDK will use the cached JWT if it's still valid, otherwise it will refresh it.
|
|
112
|
+
* refresh: the SDK will always refresh the JWT if possible.
|
|
113
|
+
* no-cache: the SDK will always request a new JWT.
|
|
114
|
+
*/
|
|
115
|
+
export type AuthCachePolicy = "no-cache" | "refresh" | "cache";
|
|
116
|
+
/**
|
|
117
|
+
* The main interface for the UI to interact with the trustchain protocol.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
*
|
|
121
|
+
* import { sdk } from "@ledgerhq/ledger-key-ring-protocol";
|
|
122
|
+
*
|
|
123
|
+
* sdk.getOrCreateTrustchain(deviceId, memberCredentials).then(trustchain => console.log(trustchain));
|
|
124
|
+
*/
|
|
125
|
+
export interface TrustchainSDK {
|
|
126
|
+
/**
|
|
127
|
+
* Generate the live credentials that represents a Live instance, member of the trustchain.
|
|
128
|
+
* This method is expected to be used the first time Ledger Live is opened (if Live never generated them before) and then persisted over the future user sessions of Ledger Live in order for the member to be able to authenticate and manage the trustchain.
|
|
129
|
+
*/
|
|
130
|
+
initMemberCredentials(): Promise<MemberCredentials>;
|
|
131
|
+
/**
|
|
132
|
+
* Access a JWT from the TrustchainSDK. manage the reauthentication if needed.
|
|
133
|
+
* A trustchain must have been created and the Live instance must have been added as a member.
|
|
134
|
+
* The returned token will typically be used for regular operations like wallet sync.
|
|
135
|
+
*/
|
|
136
|
+
withAuth<T>(trustchain: Trustchain, memberCredentials: MemberCredentials, f: (jwt: JWT) => Promise<T>, policy?: AuthCachePolicy, ignorePermissionsChecks?: boolean): Promise<T>;
|
|
137
|
+
/**
|
|
138
|
+
* This method will either create the required trustchains (root and application) or restore them.
|
|
139
|
+
* The returned trustchain will be initialized on the root level and also will have the branch derivation corresponding to the contextual applicationId.
|
|
140
|
+
* It will also have the wallet sync encryption key initialized.
|
|
141
|
+
* The latest jwt is also returned because it was potentially updated during the process.
|
|
142
|
+
*/
|
|
143
|
+
getOrCreateTrustchain(deviceId: string, memberCredentials: MemberCredentials, callbacks?: GetOrCreateTrustchainCallbacks, topic?: Uint8Array, currentTrustchain?: Trustchain): Promise<TrustchainResult>;
|
|
144
|
+
/**
|
|
145
|
+
* Restore the current trustchain encryption key, typically due to a key rotation.
|
|
146
|
+
*/
|
|
147
|
+
restoreTrustchain(trustchain: Trustchain, memberCredentials: MemberCredentials): Promise<Trustchain>;
|
|
148
|
+
/**
|
|
149
|
+
* list the current members of the application trustchain
|
|
150
|
+
*/
|
|
151
|
+
getMembers(trustchain: Trustchain, memberCredentials: MemberCredentials): Promise<TrustchainMember[]>;
|
|
152
|
+
/**
|
|
153
|
+
* remove a member from the application trustchain
|
|
154
|
+
*/
|
|
155
|
+
removeMember(deviceId: string, trustchain: Trustchain, memberCredentials: MemberCredentials, member: TrustchainMember, callbacks?: TrustchainDeviceCallbacks): Promise<Trustchain>;
|
|
156
|
+
/**
|
|
157
|
+
* add a member to the application trustchain
|
|
158
|
+
*/
|
|
159
|
+
addMember(trustchain: Trustchain, memberCredentials: MemberCredentials, member: TrustchainMember): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* destroy the trustchain
|
|
162
|
+
*/
|
|
163
|
+
destroyTrustchain(trustchain: Trustchain, memberCredentials: MemberCredentials): Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* encrypt data with the trustchain encryption key
|
|
166
|
+
*/
|
|
167
|
+
encryptUserData(trustchain: Trustchain, obj: object): Promise<Uint8Array>;
|
|
168
|
+
/**
|
|
169
|
+
* decrypt data with the trustchain encryption key
|
|
170
|
+
*/
|
|
171
|
+
decryptUserData(trustchain: Trustchain, data: Uint8Array): Promise<Uint8Array>;
|
|
172
|
+
invalidateJwt(): void;
|
|
173
|
+
}
|
|
174
|
+
export interface TrustchainDeviceCallbacks {
|
|
175
|
+
onStartRequestUserInteraction?: () => void;
|
|
176
|
+
onEndRequestUserInteraction?: () => void;
|
|
177
|
+
}
|
|
178
|
+
export interface GetOrCreateTrustchainCallbacks extends TrustchainDeviceCallbacks {
|
|
179
|
+
onInitialResponse?: (trustchains: TrustchainsResponse) => void;
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,CAAC,YAAY,EAAE,MAAM,GAAG;YACtB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;SAC1B,CAAC;KACH,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;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,gBAAgB,EACxB,SAAS,CAAC,EAAE,yBAAyB,GACpC,OAAO,CAAC,UAAU,CAAC,CAAC;IAEvB;;OAEG;IACH,SAAS,CACP,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;OAEG;IACH,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/F;;OAEG;IACH,eAAe,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE1E;;OAEG;IACH,eAAe,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE/E,aAAa,IAAI,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,6BAA6B,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3C,2BAA2B,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,8BAA+B,SAAQ,yBAAyB;IAC/E,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,mBAAmB,KAAK,IAAI,CAAC;CAChE"}
|
package/lib-es/types.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var TrustchainResultType;
|
|
2
|
+
(function (TrustchainResultType) {
|
|
3
|
+
TrustchainResultType["created"] = "created";
|
|
4
|
+
TrustchainResultType["updated"] = "updated";
|
|
5
|
+
TrustchainResultType["restored"] = "restored";
|
|
6
|
+
})(TrustchainResultType || (TrustchainResultType = {}));
|
|
7
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAwGA,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;IACnB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;AACvB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B"}
|