@textrp/briij-js-sdk 42.0.0 → 43.0.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/README.md CHANGED
@@ -110,6 +110,77 @@ For `acceptVerification()`, configure either:
110
110
 
111
111
  The SDK signs `NFTokenModify` via Xaman and emits Matrix verification events with the resulting transaction hash.
112
112
 
113
+ ## XRPL wallet login and recovery envelope
114
+
115
+ The SDK supports the custom login type `io.briij.login.xrpl` with two-step challenge flow:
116
+
117
+ - `client.getXrplAuthChallenge({ address, network, preferred_localpart, username, display_name })`
118
+ - `client.completeXrplAuth({ session, address, signature, public_key, network, wallet_e2ee_recovery })`
119
+
120
+ For wallet-backed encryption recovery, the SDK exports:
121
+
122
+ - account-data constants:
123
+ - `WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE` (`org.textrp.wallet.e2ee_recovery.v1`)
124
+ - `WALLET_IDENTITY_ACCOUNT_DATA_TYPE` (`org.textrp.wallet.identity`)
125
+ - helper methods on `BriijClient`:
126
+ - `setWalletRecoveryEnvelope(envelope)`
127
+ - `getWalletRecoveryEnvelopeFromServer()`
128
+ - `getWalletIdentityFromServer()`
129
+ - chain-agnostic utilities in `wallet-recovery.ts`:
130
+ - `createDualWrapEnvelope(...)`
131
+ - `validateRecoveryEnvelopeShape(...)`
132
+ - `unwrapWithWallet(...)`
133
+ - `unwrapWithPassword(...)`
134
+ - `deriveWalletWrapKeyFromSecret(...)`
135
+
136
+ This is additive and does not alter core Olm/Megolm behavior.
137
+
138
+ ### Example: XRPL two-step login with wallet recovery envelope
139
+
140
+ ```javascript
141
+ import {
142
+ createClient,
143
+ createDualWrapEnvelope,
144
+ deriveWalletWrapKeyFromSecret,
145
+ } from "@textrp/briij-js-sdk";
146
+
147
+ const homeserver = "http://127.0.0.1:8008";
148
+ const network = "xrpl";
149
+ const address = "rYourClassicAddress";
150
+ const publicKey = "ED...";
151
+ const backupPassword = "your-backup-password";
152
+ const walletSecret = "wallet-secret-used-for-wrap-key";
153
+
154
+ const client = createClient({ baseUrl: homeserver });
155
+ const { session, challenge } = await client.getXrplAuthChallenge({
156
+ address,
157
+ network,
158
+ username: "alice_wallet",
159
+ });
160
+
161
+ // Use your wallet integration for this step.
162
+ const signature = await signChallengeWithWallet(challenge);
163
+
164
+ const walletWrapKey = await deriveWalletWrapKeyFromSecret(walletSecret, "xrpl", address, homeserver);
165
+ const wallet_e2ee_recovery = await createDualWrapEnvelope({
166
+ chainId: "xrpl",
167
+ accountId: address,
168
+ backupPassword,
169
+ walletWrapKey,
170
+ });
171
+
172
+ await client.completeXrplAuth({
173
+ session,
174
+ address,
175
+ signature,
176
+ public_key: publicKey,
177
+ network,
178
+ wallet_e2ee_recovery,
179
+ });
180
+ ```
181
+
182
+ There is a full Node example at `examples/node/xrpl-login-recovery.js`.
183
+
113
184
  ## Authenticated media
114
185
 
115
186
  Servers supporting [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/pull/3916) (spec 1.11) will require clients, like
@@ -15,6 +15,8 @@ export interface ILoginFlowsResponse {
15
15
  flows: LoginFlow[];
16
16
  }
17
17
  export declare const XRPL_WALLET_LOGIN_TYPE = "io.briij.login.xrpl";
18
+ export declare const WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.e2ee_recovery.v1";
19
+ export declare const WALLET_IDENTITY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.identity";
18
20
  export type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;
19
21
  export interface ILoginFlow {
20
22
  type: string;
@@ -158,12 +160,63 @@ export interface LoginRequest {
158
160
  }
159
161
  export type ILoginParams = LoginRequest;
160
162
  export interface XrplWalletChallengePayload {
163
+ session?: string;
161
164
  nonce: string;
162
165
  timestamp: number | string;
163
166
  message: string;
164
167
  public_key: string;
165
168
  algorithm?: "secp256k1" | "ed25519" | string;
166
169
  }
170
+ export interface XrplAuthChallengeRequest extends Omit<LoginRequest, "type"> {
171
+ type: typeof XRPL_WALLET_LOGIN_TYPE;
172
+ address: string;
173
+ network: string;
174
+ preferred_localpart?: string;
175
+ username?: string;
176
+ display_name?: string;
177
+ }
178
+ export interface XrplAuthChallengeResponse {
179
+ session: string;
180
+ challenge: string;
181
+ }
182
+ export interface XrplAuthCompleteRequest extends Omit<LoginRequest, "type"> {
183
+ type: typeof XRPL_WALLET_LOGIN_TYPE;
184
+ session: string;
185
+ address: string;
186
+ signature: string;
187
+ public_key?: string;
188
+ network?: string;
189
+ wallet_e2ee_recovery?: WalletE2eeRecoveryEnvelope;
190
+ }
191
+ export interface WalletRecoveryWrap {
192
+ alg: string;
193
+ kdf: string;
194
+ salt: string;
195
+ nonce: string;
196
+ ciphertext: string;
197
+ aad?: string;
198
+ params?: Record<string, unknown>;
199
+ }
200
+ export interface WalletRecoveryPasswordWrap extends WalletRecoveryWrap {
201
+ kdf: string;
202
+ params?: Record<string, unknown>;
203
+ }
204
+ export interface WalletE2eeRecoveryEnvelope {
205
+ envelope_version: number;
206
+ chain_id: string;
207
+ account_id: string;
208
+ created_at_ms: number;
209
+ key_id: string;
210
+ wallet_wrap: WalletRecoveryWrap;
211
+ password_wrap: WalletRecoveryPasswordWrap;
212
+ }
213
+ export interface WalletIdentityAccountData {
214
+ chain_id: string;
215
+ account_id: string;
216
+ public_key: string | null;
217
+ network?: string | null;
218
+ key_type?: string | null;
219
+ }
167
220
  export interface XrplWalletLoginRequest extends Omit<LoginRequest, "type"> {
168
221
  type: typeof XRPL_WALLET_LOGIN_TYPE;
169
222
  wallet_address: string;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/@types/auth.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,YAAY,EAAE,MAAM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AAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACzB"}
@@ -30,6 +30,8 @@ import { UnstableValue } from "../NamespacedValue.js";
30
30
  */
31
31
 
32
32
  export var XRPL_WALLET_LOGIN_TYPE = "io.briij.login.xrpl";
33
+ export var WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.e2ee_recovery.v1";
34
+ export var WALLET_IDENTITY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.identity";
33
35
  export var OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue("oauth_aware_preferred", "org.matrix.msc3824.delegated_oidc_compatibility");
34
36
 
35
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","names":["UnstableValue","XRPL_WALLET_LOGIN_TYPE","OAUTH_AWARE_PREFERRED_FLOW_FIELD","DELEGATED_OIDC_COMPATIBILITY","IdentityProviderBrand","SSOAction"],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type IClientWellKnown } from \"../client.ts\";\n\n// disable lint because these are wire responses\n/* eslint-disable camelcase */\n\n/**\n * Represents a response to the CSAPI `/refresh` endpoint.\n */\nexport interface IRefreshTokenResponse {\n access_token: string;\n expires_in_ms: number;\n refresh_token: string;\n}\n\n/* eslint-enable camelcase */\n\n/**\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\n */\nexport interface ILoginFlowsResponse {\n flows: LoginFlow[];\n}\n\nexport const XRPL_WALLET_LOGIN_TYPE = \"io.briij.login.xrpl\";\n\nexport type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;\n\nexport interface ILoginFlow {\n type: string;\n}\n\nexport interface IPasswordFlow extends ILoginFlow {\n type: \"m.login.password\";\n}\n\nexport interface IXrplWalletLoginFlow extends ILoginFlow {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n}\n\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\n \"oauth_aware_preferred\",\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\n);\n\n/**\n * @alias\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\n */\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\n\n/**\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\n */\nexport interface ISSOFlow extends ILoginFlow {\n type: \"m.login.sso\" | \"m.login.cas\";\n // eslint-disable-next-line camelcase\n identity_providers?: IIdentityProvider[];\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\n}\n\nexport enum IdentityProviderBrand {\n Gitlab = \"gitlab\",\n Github = \"github\",\n Apple = \"apple\",\n Google = \"google\",\n Facebook = \"facebook\",\n Twitter = \"twitter\",\n}\n\nexport interface IIdentityProvider {\n id: string;\n name: string;\n icon?: string;\n brand?: IdentityProviderBrand | string;\n}\n\nexport enum SSOAction {\n /** The user intends to login to an existing account */\n LOGIN = \"login\",\n\n /** The user intends to register for a new account */\n REGISTER = \"register\",\n}\n\n/**\n * A client can identify a user using their Matrix ID.\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\n */\ntype UserLoginIdentifier = {\n type: \"m.id.user\";\n user: string;\n};\n\n/**\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\n * where the 3PID was previously associated using the /account/3pid API.\n * See the 3PID Types Appendix for a list of Third-party ID media.\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\n */\ntype ThirdPartyLoginIdentifier = {\n type: \"m.id.thirdparty\";\n medium: string;\n address: string;\n};\n\n/**\n * A client can identify a user using a phone number associated with the user’s account,\n * where the phone number was previously associated using the /account/3pid API.\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\n * If the client wishes to canonicalise the phone number,\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\n *\n * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.\n *\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\n */\ntype PhoneLoginIdentifier = {\n type: \"m.id.phone\";\n country: string;\n phone: string;\n};\n\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\n\n/**\n * User Identifiers usable for login & user-interactive authentication.\n *\n * Extensibly allows more than Matrix specified identifiers.\n */\nexport type UserIdentifier =\n | SpecUserIdentifier\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\n\n/**\n * Request body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginRequest {\n /**\n * The login type being used.\n */\n type: \"m.login.password\" | \"m.login.token\" | string;\n /**\n * ID of the client device.\n * If this does not correspond to a known client device, a new device will be created.\n * The given device ID must not be the same as a cross-signing key ID.\n * The server will auto-generate a device_id if this is not specified.\n */\n device_id?: string;\n /**\n * Identification information for a user\n */\n identifier?: UserIdentifier;\n /**\n * A display name to assign to the newly-created device.\n * Ignored if device_id corresponds to a known device.\n */\n initial_device_display_name?: string;\n /**\n * When logging in using a third-party identifier, the medium of the identifier.\n * Must be `email`.\n * @deprecated in favour of `identifier`.\n */\n medium?: \"email\";\n /**\n * Required when type is `m.login.password`. The user’s password.\n */\n password?: string;\n /**\n * If true, the client supports refresh tokens.\n */\n refresh_token?: boolean;\n /**\n * Required when type is `m.login.token`. Part of Token-based login.\n */\n token?: string;\n /**\n * The fully qualified user ID or just local part of the user ID, to log in.\n * @deprecated in favour of identifier.\n */\n user?: string;\n // Extensible\n [key: string]: any;\n}\n\n// Export for backwards compatibility\nexport type ILoginParams = LoginRequest;\n\nexport interface XrplWalletChallengePayload {\n nonce: string;\n timestamp: number | string;\n message: string;\n public_key: string;\n algorithm?: \"secp256k1\" | \"ed25519\" | string;\n}\n\nexport interface XrplWalletLoginRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n wallet_address: string;\n signature: string;\n challenge: string | XrplWalletChallengePayload;\n network?: string;\n}\n\n/**\n * Response body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginResponse {\n /**\n * An access token for the account.\n * This access token can then be used to authorize other requests.\n */\n access_token: string;\n /**\n * ID of the logged-in device.\n * Will be the same as the corresponding parameter in the request, if one was specified.\n */\n device_id: string;\n /**\n * The fully-qualified Matrix ID for the account.\n */\n user_id: string;\n /**\n * The lifetime of the access token, in milliseconds.\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\n * If not given, the client can assume that the access token will not expire.\n */\n expires_in_ms?: number;\n /**\n * A refresh token for the account.\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\n */\n refresh_token?: string;\n /**\n * Optional client configuration provided by the server.\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\n * This object takes the same form as the one returned from .well-known autodiscovery.\n */\n well_known?: IClientWellKnown;\n /**\n * The server_name of the homeserver on which the account has been registered.\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\n */\n home_server?: string;\n}\n\n/**\n * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token\n */\nexport interface LoginTokenPostResponse {\n /**\n * The token to use with `m.login.token` to authenticate.\n */\n login_token: string;\n /**\n * Expiration in milliseconds.\n */\n expires_in_ms: number;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAKA,OAAO,IAAMC,sBAAsB,GAAG,qBAAqB;AAgB3D,OAAO,IAAMC,gCAAgC,GAAG,IAAIF,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAMG,4BAA4B,GAAGD,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAYE,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAgBjC,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAIjB;EAJQA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AAmBA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"auth.js","names":["UnstableValue","XRPL_WALLET_LOGIN_TYPE","WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE","WALLET_IDENTITY_ACCOUNT_DATA_TYPE","OAUTH_AWARE_PREFERRED_FLOW_FIELD","DELEGATED_OIDC_COMPATIBILITY","IdentityProviderBrand","SSOAction"],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type IClientWellKnown } from \"../client.ts\";\n\n// disable lint because these are wire responses\n/* eslint-disable camelcase */\n\n/**\n * Represents a response to the CSAPI `/refresh` endpoint.\n */\nexport interface IRefreshTokenResponse {\n access_token: string;\n expires_in_ms: number;\n refresh_token: string;\n}\n\n/* eslint-enable camelcase */\n\n/**\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\n */\nexport interface ILoginFlowsResponse {\n flows: LoginFlow[];\n}\n\nexport const XRPL_WALLET_LOGIN_TYPE = \"io.briij.login.xrpl\";\nexport const WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE = \"org.textrp.wallet.e2ee_recovery.v1\";\nexport const WALLET_IDENTITY_ACCOUNT_DATA_TYPE = \"org.textrp.wallet.identity\";\n\nexport type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;\n\nexport interface ILoginFlow {\n type: string;\n}\n\nexport interface IPasswordFlow extends ILoginFlow {\n type: \"m.login.password\";\n}\n\nexport interface IXrplWalletLoginFlow extends ILoginFlow {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n}\n\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\n \"oauth_aware_preferred\",\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\n);\n\n/**\n * @alias\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\n */\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\n\n/**\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\n */\nexport interface ISSOFlow extends ILoginFlow {\n type: \"m.login.sso\" | \"m.login.cas\";\n // eslint-disable-next-line camelcase\n identity_providers?: IIdentityProvider[];\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\n}\n\nexport enum IdentityProviderBrand {\n Gitlab = \"gitlab\",\n Github = \"github\",\n Apple = \"apple\",\n Google = \"google\",\n Facebook = \"facebook\",\n Twitter = \"twitter\",\n}\n\nexport interface IIdentityProvider {\n id: string;\n name: string;\n icon?: string;\n brand?: IdentityProviderBrand | string;\n}\n\nexport enum SSOAction {\n /** The user intends to login to an existing account */\n LOGIN = \"login\",\n\n /** The user intends to register for a new account */\n REGISTER = \"register\",\n}\n\n/**\n * A client can identify a user using their Matrix ID.\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\n */\ntype UserLoginIdentifier = {\n type: \"m.id.user\";\n user: string;\n};\n\n/**\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\n * where the 3PID was previously associated using the /account/3pid API.\n * See the 3PID Types Appendix for a list of Third-party ID media.\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\n */\ntype ThirdPartyLoginIdentifier = {\n type: \"m.id.thirdparty\";\n medium: string;\n address: string;\n};\n\n/**\n * A client can identify a user using a phone number associated with the user’s account,\n * where the phone number was previously associated using the /account/3pid API.\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\n * If the client wishes to canonicalise the phone number,\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\n *\n * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.\n *\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\n */\ntype PhoneLoginIdentifier = {\n type: \"m.id.phone\";\n country: string;\n phone: string;\n};\n\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\n\n/**\n * User Identifiers usable for login & user-interactive authentication.\n *\n * Extensibly allows more than Matrix specified identifiers.\n */\nexport type UserIdentifier =\n | SpecUserIdentifier\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\n\n/**\n * Request body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginRequest {\n /**\n * The login type being used.\n */\n type: \"m.login.password\" | \"m.login.token\" | string;\n /**\n * ID of the client device.\n * If this does not correspond to a known client device, a new device will be created.\n * The given device ID must not be the same as a cross-signing key ID.\n * The server will auto-generate a device_id if this is not specified.\n */\n device_id?: string;\n /**\n * Identification information for a user\n */\n identifier?: UserIdentifier;\n /**\n * A display name to assign to the newly-created device.\n * Ignored if device_id corresponds to a known device.\n */\n initial_device_display_name?: string;\n /**\n * When logging in using a third-party identifier, the medium of the identifier.\n * Must be `email`.\n * @deprecated in favour of `identifier`.\n */\n medium?: \"email\";\n /**\n * Required when type is `m.login.password`. The user’s password.\n */\n password?: string;\n /**\n * If true, the client supports refresh tokens.\n */\n refresh_token?: boolean;\n /**\n * Required when type is `m.login.token`. Part of Token-based login.\n */\n token?: string;\n /**\n * The fully qualified user ID or just local part of the user ID, to log in.\n * @deprecated in favour of identifier.\n */\n user?: string;\n // Extensible\n [key: string]: any;\n}\n\n// Export for backwards compatibility\nexport type ILoginParams = LoginRequest;\n\nexport interface XrplWalletChallengePayload {\n session?: string;\n nonce: string;\n timestamp: number | string;\n message: string;\n public_key: string;\n algorithm?: \"secp256k1\" | \"ed25519\" | string;\n}\n\nexport interface XrplAuthChallengeRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n address: string;\n network: string;\n preferred_localpart?: string;\n username?: string;\n display_name?: string;\n}\n\nexport interface XrplAuthChallengeResponse {\n session: string;\n challenge: string;\n}\n\nexport interface XrplAuthCompleteRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n session: string;\n address: string;\n signature: string;\n public_key?: string;\n network?: string;\n wallet_e2ee_recovery?: WalletE2eeRecoveryEnvelope;\n}\n\nexport interface WalletRecoveryWrap {\n alg: string;\n kdf: string;\n salt: string;\n nonce: string;\n ciphertext: string;\n aad?: string;\n params?: Record<string, unknown>;\n}\n\nexport interface WalletRecoveryPasswordWrap extends WalletRecoveryWrap {\n kdf: string;\n params?: Record<string, unknown>;\n}\n\nexport interface WalletE2eeRecoveryEnvelope {\n envelope_version: number;\n chain_id: string;\n account_id: string;\n created_at_ms: number;\n key_id: string;\n wallet_wrap: WalletRecoveryWrap;\n password_wrap: WalletRecoveryPasswordWrap;\n}\n\nexport interface WalletIdentityAccountData {\n chain_id: string;\n account_id: string;\n public_key: string | null;\n network?: string | null;\n key_type?: string | null;\n}\n\nexport interface XrplWalletLoginRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n wallet_address: string;\n signature: string;\n challenge: string | XrplWalletChallengePayload;\n network?: string;\n}\n\n/**\n * Response body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginResponse {\n /**\n * An access token for the account.\n * This access token can then be used to authorize other requests.\n */\n access_token: string;\n /**\n * ID of the logged-in device.\n * Will be the same as the corresponding parameter in the request, if one was specified.\n */\n device_id: string;\n /**\n * The fully-qualified Matrix ID for the account.\n */\n user_id: string;\n /**\n * The lifetime of the access token, in milliseconds.\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\n * If not given, the client can assume that the access token will not expire.\n */\n expires_in_ms?: number;\n /**\n * A refresh token for the account.\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\n */\n refresh_token?: string;\n /**\n * Optional client configuration provided by the server.\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\n * This object takes the same form as the one returned from .well-known autodiscovery.\n */\n well_known?: IClientWellKnown;\n /**\n * The server_name of the homeserver on which the account has been registered.\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\n */\n home_server?: string;\n}\n\n/**\n * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token\n */\nexport interface LoginTokenPostResponse {\n /**\n * The token to use with `m.login.token` to authenticate.\n */\n login_token: string;\n /**\n * Expiration in milliseconds.\n */\n expires_in_ms: number;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAKA,OAAO,IAAMC,sBAAsB,GAAG,qBAAqB;AAC3D,OAAO,IAAMC,sCAAsC,GAAG,oCAAoC;AAC1F,OAAO,IAAMC,iCAAiC,GAAG,4BAA4B;AAgB7E,OAAO,IAAMC,gCAAgC,GAAG,IAAIJ,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAMK,4BAA4B,GAAGD,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAYE,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAgBjC,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAIjB;EAJQA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AA6EA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
@@ -363,6 +363,38 @@ export interface AccountDataEvents extends SecretStorageAccountDataEvents {
363
363
  [EventType.InvitePermissionConfig]: {
364
364
  default_action?: string;
365
365
  };
366
+ "org.textrp.wallet.e2ee_recovery.v1": {
367
+ envelope_version: number;
368
+ chain_id: string;
369
+ account_id: string;
370
+ created_at_ms: number;
371
+ key_id: string;
372
+ wallet_wrap: {
373
+ alg: string;
374
+ kdf: string;
375
+ salt: string;
376
+ nonce: string;
377
+ ciphertext: string;
378
+ aad?: string;
379
+ params?: Record<string, unknown>;
380
+ };
381
+ password_wrap: {
382
+ alg: string;
383
+ kdf: string;
384
+ salt: string;
385
+ nonce: string;
386
+ ciphertext: string;
387
+ aad?: string;
388
+ params?: Record<string, unknown>;
389
+ };
390
+ };
391
+ "org.textrp.wallet.identity": {
392
+ chain_id: string;
393
+ account_id: string;
394
+ public_key: string | null;
395
+ network?: string | null;
396
+ key_type?: string | null;
397
+ };
366
398
  }
367
399
  /**
368
400
  * Subset of AccountDataEvents, excluding events specified in https://spec.matrix.org/v1.17/client-server-api/#server-behaviour-12
@@ -1 +1 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src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omType","ToDeviceMessageId","UNSTABLE_MSC3088_PURPOSE","UNSTABLE_MSC3088_ENABLED","UNSTABLE_MSC3089_TREE_SUBTYPE","UNSTABLE_MSC3089_LEAF","UNSTABLE_MSC3089_BRANCH","UNSTABLE_MSC2716_MARKER","MSC3912_RELATION_BASED_REDACTIONS_PROP","UNSTABLE_ELEMENT_FUNCTIONAL_USERS","EVENT_VISIBILITY_CHANGE_TYPE","PUSHER_ENABLED","PUSHER_DEVICE_ID","LOCAL_NOTIFICATION_SETTINGS_PREFIX","UNSIGNED_THREAD_ID_FIELD","UNSIGNED_MEMBERSHIP_FIELD"],"sources":["../../src/@types/event.ts"],"sourcesContent":["/*\nCopyright 2020-2026 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type EitherAnd } from \"matrix-events-sdk\";\n\nimport { NamespacedValue, UnstableValue } from \"../NamespacedValue.ts\";\nimport {\n type PolicyRuleEventContent,\n type RoomAvatarEventContent,\n type RoomCanonicalAliasEventContent,\n type RoomCreateEventContent,\n type RoomEncryptionEventContent,\n type RoomGuestAccessEventContent,\n type RoomHistoryVisibilityEventContent,\n type RoomJoinRulesEventContent,\n type RoomMemberEventContent,\n type RoomNameEventContent,\n type RoomPinnedEventsEventContent,\n type RoomPolicyContent,\n type RoomPowerLevelsEventContent,\n type RoomServerAclEventContent,\n type RoomThirdPartyInviteEventContent,\n type RoomTombstoneEventContent,\n type RoomTopicEventContent,\n type SpaceChildEventContent,\n type SpaceParentEventContent,\n} from \"./state_events.ts\";\nimport { type IGroupCallRoomMemberState, type IGroupCallRoomState } from \"../webrtc/groupCall.ts\";\nimport { type MSC3089EventContent } from \"../models/MSC3089Branch.ts\";\nimport { type M_BEACON, type M_BEACON_INFO, type MBeaconEventContent, type MBeaconInfoEventContent } from \"./beacon.ts\";\nimport { type EmptyObject } from \"./common.ts\";\nimport { type ReactionEventContent, type RoomMessageEventContent, type StickerEventContent } from \"./events.ts\";\nimport {\n type MCallAnswer,\n type MCallBase,\n type MCallCandidates,\n type MCallHangupReject,\n type MCallInviteNegotiate,\n type MCallReplacesEvent,\n type MCallSelectAnswer,\n type SDPStreamMetadata,\n} from \"../webrtc/callEventTypes.ts\";\nimport {\n type IRTCNotificationContent,\n type IRTCDeclineContent,\n type EncryptionKeysEventContent,\n type ICallNotifyContent,\n} from \"../matrixrtc/types.ts\";\nimport { type M_POLL_END, type M_POLL_START, type PollEndEventContent, type PollStartEventContent } from \"./polls.ts\";\nimport { type RtcMembershipData, type SessionMembershipData } from \"../matrixrtc/membershipData/index.ts\";\nimport { type LocalNotificationSettings } from \"./local_notifications.ts\";\nimport { type IPushRules } from \"./PushRules.ts\";\nimport { type SecretInfo, type SecretStorageKeyDescription } from \"../secret-storage.ts\";\nimport { type POLICIES_ACCOUNT_EVENT_TYPE } from \"../models/invites-ignorer-types.ts\";\n\nexport enum EventType {\n // Room state events\n RoomCanonicalAlias = \"m.room.canonical_alias\",\n RoomCreate = \"m.room.create\",\n RoomJoinRules = \"m.room.join_rules\",\n RoomMember = \"m.room.member\",\n RoomThirdPartyInvite = \"m.room.third_party_invite\",\n RoomPowerLevels = \"m.room.power_levels\",\n RoomName = \"m.room.name\",\n RoomTopic = \"m.room.topic\",\n RoomAvatar = \"m.room.avatar\",\n RoomPinnedEvents = \"m.room.pinned_events\",\n RoomEncryption = \"m.room.encryption\",\n RoomHistoryVisibility = \"m.room.history_visibility\",\n RoomGuestAccess = \"m.room.guest_access\",\n RoomServerAcl = \"m.room.server_acl\",\n RoomTombstone = \"m.room.tombstone\",\n RoomPredecessor = \"org.matrix.msc3946.room_predecessor\",\n\n // Moderation policy lists\n PolicyRuleUser = \"m.policy.rule.user\",\n PolicyRuleRoom = \"m.policy.rule.room\",\n PolicyRuleServer = \"m.policy.rule.server\",\n\n SpaceChild = \"m.space.child\",\n SpaceParent = \"m.space.parent\",\n\n // Room timeline events\n RoomRedaction = \"m.room.redaction\",\n RoomMessage = \"m.room.message\",\n RoomMessageEncrypted = \"m.room.encrypted\",\n Sticker = \"m.sticker\",\n CallInvite = \"m.call.invite\",\n CallCandidates = \"m.call.candidates\",\n CallAnswer = \"m.call.answer\",\n CallHangup = \"m.call.hangup\",\n CallReject = \"m.call.reject\",\n CallSelectAnswer = \"m.call.select_answer\",\n CallNegotiate = \"m.call.negotiate\",\n CallSDPStreamMetadataChanged = \"m.call.sdp_stream_metadata_changed\",\n CallSDPStreamMetadataChangedPrefix = \"org.matrix.call.sdp_stream_metadata_changed\",\n CallReplaces = \"m.call.replaces\",\n CallAssertedIdentity = \"m.call.asserted_identity\",\n CallAssertedIdentityPrefix = \"org.matrix.call.asserted_identity\",\n CallEncryptionKeysPrefix = \"io.element.call.encryption_keys\",\n KeyVerificationRequest = \"m.key.verification.request\",\n KeyVerificationStart = \"m.key.verification.start\",\n KeyVerificationCancel = \"m.key.verification.cancel\",\n KeyVerificationMac = \"m.key.verification.mac\",\n KeyVerificationDone = \"m.key.verification.done\",\n KeyVerificationKey = \"m.key.verification.key\",\n KeyVerificationAccept = \"m.key.verification.accept\",\n // Not used directly - see READY_TYPE in VerificationRequest.\n KeyVerificationReady = \"m.key.verification.ready\",\n // use of this is discouraged https://matrix.org/docs/spec/client_server/r0.6.1#m-room-message-feedback\n RoomMessageFeedback = \"m.room.message.feedback\",\n Reaction = \"m.reaction\",\n PollStart = \"org.matrix.msc3381.poll.start\",\n UserVerifyRequest = \"m.user.verify.request\",\n UserVerifyAccept = \"m.user.verify.accept\",\n UserVerified = \"m.user.verified\",\n\n // Room ephemeral events\n Typing = \"m.typing\",\n Receipt = \"m.receipt\",\n Presence = \"m.presence\",\n\n // Room account_data events\n FullyRead = \"m.fully_read\",\n Tag = \"m.tag\",\n SpaceOrder = \"org.matrix.msc3230.space_order\", // MSC3230\n MarkedUnread = \"m.marked_unread\",\n\n // User account_data events\n PushRules = \"m.push_rules\",\n Direct = \"m.direct\",\n IgnoredUserList = \"m.ignored_user_list\",\n InvitePermissionConfig = \"m.invite_permission_config\", // MSC4380\n\n // to_device events\n RoomKey = \"m.room_key\",\n RoomKeyRequest = \"m.room_key_request\",\n ForwardedRoomKey = \"m.forwarded_room_key\",\n Dummy = \"m.dummy\",\n SecretRequest = \"m.secret.request\",\n SecretSend = \"m.secret.send\",\n\n // Group call events\n GroupCallPrefix = \"org.matrix.msc3401.call\",\n GroupCallMemberPrefix = \"org.matrix.msc3401.call.member\",\n\n // MatrixRTC events\n RTCMembership = \"org.matrix.msc4143.rtc.member\",\n CallNotify = \"org.matrix.msc4075.call.notify\",\n RTCNotification = \"org.matrix.msc4075.rtc.notification\",\n RTCDecline = \"org.matrix.msc4310.rtc.decline\",\n\n // Policy servers\n RoomPolicy = \"org.matrix.msc4284.policy\",\n}\n\nexport enum RelationType {\n Annotation = \"m.annotation\",\n Replace = \"m.replace\",\n Reference = \"m.reference\",\n\n // Don't use this yet: it's only the stable version. The code still assumes we support the unstable prefix and,\n // moreover, our tests currently use the unstable prefix. Use THREAD_RELATION_TYPE.name.\n // Once we support *only* the stable prefix, THREAD_RELATION_TYPE can die and we can switch to this.\n Thread = \"m.thread\",\n}\n\nexport enum MsgType {\n Text = \"m.text\",\n Emote = \"m.emote\",\n Notice = \"m.notice\",\n Image = \"m.image\",\n File = \"m.file\",\n Audio = \"m.audio\",\n Location = \"m.location\",\n Video = \"m.video\",\n KeyVerificationRequest = \"m.key.verification.request\",\n}\n\nexport const RoomCreateTypeField = \"type\";\n\nexport enum RoomType {\n Space = \"m.space\",\n UnstableCall = \"org.matrix.msc3417.call\",\n ElementVideo = \"io.element.video\",\n}\n\nexport const ToDeviceMessageId = \"org.matrix.msgid\";\n\n/**\n * Identifier for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_PURPOSE = new UnstableValue(\"m.room.purpose\", \"org.matrix.msc3088.purpose\");\n\n/**\n * Enabled flag for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_ENABLED = new UnstableValue(\"m.enabled\", \"org.matrix.msc3088.enabled\");\n\n/**\n * Subtype for an [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_TREE_SUBTYPE = new UnstableValue(\"m.data_tree\", \"org.matrix.msc3089.data_tree\");\n\n/**\n * Leaf type for an event in a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_LEAF = new UnstableValue(\"m.leaf\", \"org.matrix.msc3089.leaf\");\n\n/**\n * Branch (Leaf Reference) type for the index approach in a\n * [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. Note that this reference is\n * UNSTABLE and subject to breaking changes, including its eventual removal.\n */\nexport const UNSTABLE_MSC3089_BRANCH = new UnstableValue(\"m.branch\", \"org.matrix.msc3089.branch\");\n\n/**\n * Marker event type to point back at imported historical content in a room. See\n * [MSC2716](https://github.com/matrix-org/matrix-spec-proposals/pull/2716).\n * Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC2716_MARKER = new UnstableValue(\"m.room.marker\", \"org.matrix.msc2716.marker\");\n\n/**\n * Name of the request property for relation based redactions.\n * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}\n */\nexport const MSC3912_RELATION_BASED_REDACTIONS_PROP = new UnstableValue(\n \"with_rel_types\",\n \"org.matrix.msc3912.with_relations\",\n);\n\n/**\n * Functional members type for declaring a purpose of room members (e.g. helpful bots).\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n *\n * Schema (TypeScript):\n * ```\n * {\n * service_members?: string[]\n * }\n * ```\n *\n * @example\n * ```\n * {\n * \"service_members\": [\n * \"@helperbot:localhost\",\n * \"@reminderbot:alice.tdl\"\n * ]\n * }\n * ```\n */\nexport const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new UnstableValue(\n \"io.element.functional_members\",\n \"io.element.functional_members\",\n);\n\n/**\n * A type of message that affects visibility of a message,\n * as per https://github.com/matrix-org/matrix-doc/pull/3531\n *\n * @experimental\n */\nexport const EVENT_VISIBILITY_CHANGE_TYPE = new UnstableValue(\"m.visibility\", \"org.matrix.msc3531.visibility\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_ENABLED = new UnstableValue(\"enabled\", \"org.matrix.msc3881.enabled\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_DEVICE_ID = new UnstableValue(\"device_id\", \"org.matrix.msc3881.device_id\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3890\n *\n * @experimental\n */\nexport const LOCAL_NOTIFICATION_SETTINGS_PREFIX = new UnstableValue(\n \"m.local_notification_settings\",\n \"org.matrix.msc3890.local_notification_settings\",\n);\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/4023\n *\n * @experimental\n */\nexport const UNSIGNED_THREAD_ID_FIELD = new UnstableValue(\"thread_id\", \"org.matrix.msc4023.thread_id\");\n\n/**\n * https://github.com/matrix-org/matrix-spec-proposals/pull/4115\n *\n * @experimental\n */\nexport const UNSIGNED_MEMBERSHIP_FIELD = new NamespacedValue(\"membership\", \"io.element.msc4115.membership\");\n\n/**\n * Mapped type from event type to content type for all specified non-state room events.\n */\nexport interface TimelineEvents {\n [EventType.RoomMessage]: RoomMessageEventContent;\n [EventType.Sticker]: StickerEventContent;\n [EventType.Reaction]: ReactionEventContent;\n [EventType.CallReplaces]: MCallReplacesEvent;\n [EventType.CallAnswer]: MCallAnswer;\n [EventType.CallSelectAnswer]: MCallSelectAnswer;\n [EventType.CallNegotiate]: Omit<MCallInviteNegotiate, \"offer\">;\n [EventType.CallInvite]: MCallInviteNegotiate;\n [EventType.CallCandidates]: MCallCandidates;\n [EventType.CallHangup]: MCallHangupReject;\n [EventType.CallReject]: MCallHangupReject;\n [EventType.CallSDPStreamMetadataChangedPrefix]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallSDPStreamMetadataChanged]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallEncryptionKeysPrefix]: EncryptionKeysEventContent;\n [EventType.CallNotify]: ICallNotifyContent;\n [EventType.RTCNotification]: IRTCNotificationContent;\n [EventType.RTCDecline]: IRTCDeclineContent;\n [M_BEACON.name]: MBeaconEventContent;\n [M_POLL_START.name]: PollStartEventContent;\n [M_POLL_END.name]: PollEndEventContent;\n [EventType.RTCMembership]: RtcMembershipData | { msc4354_sticky_key: string }; // An object containing just the sticky key is empty.\n [EventType.UserVerifyRequest]: {\n tx_hash: string;\n issuer_xrpl_address: string;\n target_xrpl_address: string;\n credential_type_bytes?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n };\n [EventType.UserVerifyAccept]: {\n tx_hash: string;\n issuer_xrpl_address: string;\n accepter_xrpl_address: string;\n credential_type_bytes?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n nft_token_id?: string;\n ipfs_uri?: string;\n };\n}\n\n/**\n * Mapped type from event type to content type for all specified room state events.\n */\nexport interface StateEvents {\n [EventType.RoomCanonicalAlias]: RoomCanonicalAliasEventContent;\n [EventType.RoomCreate]: RoomCreateEventContent;\n [EventType.RoomJoinRules]: RoomJoinRulesEventContent;\n [EventType.RoomMember]: RoomMemberEventContent;\n // XXX: Spec says this event has 3 required fields but kicking such an invitation requires sending `{}`\n [EventType.RoomThirdPartyInvite]: RoomThirdPartyInviteEventContent | EmptyObject;\n [EventType.RoomPowerLevels]: RoomPowerLevelsEventContent;\n [EventType.RoomName]: RoomNameEventContent;\n [EventType.RoomTopic]: RoomTopicEventContent;\n [EventType.RoomAvatar]: RoomAvatarEventContent;\n [EventType.RoomPinnedEvents]: RoomPinnedEventsEventContent;\n [EventType.RoomEncryption]: RoomEncryptionEventContent;\n [EventType.RoomHistoryVisibility]: RoomHistoryVisibilityEventContent;\n [EventType.RoomGuestAccess]: RoomGuestAccessEventContent;\n [EventType.RoomServerAcl]: RoomServerAclEventContent;\n [EventType.RoomTombstone]: RoomTombstoneEventContent;\n [EventType.SpaceChild]: SpaceChildEventContent;\n [EventType.SpaceParent]: SpaceParentEventContent;\n\n [EventType.PolicyRuleUser]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleRoom]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleServer]: PolicyRuleEventContent | EmptyObject;\n\n // MSC4284: Policy servers\n [EventType.RoomPolicy]: RoomPolicyContent | EmptyObject;\n\n // MSC3401\n [EventType.GroupCallPrefix]: IGroupCallRoomState;\n [EventType.GroupCallMemberPrefix]: IGroupCallRoomMemberState | SessionMembershipData | EmptyObject;\n [EventType.RTCMembership]: RtcMembershipData | EmptyObject;\n // MSC3089\n [UNSTABLE_MSC3089_BRANCH.name]: MSC3089EventContent;\n\n // MSC3672\n [M_BEACON_INFO.name]: MBeaconInfoEventContent;\n [EventType.UserVerified]: {\n status: \"requested\" | \"verified\";\n credential_type?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n tx_hash: string;\n validated: boolean;\n [key: string]: unknown;\n };\n}\n\n/**\n * Mapped type from event type to content type for all specified room-specific account_data events.\n */\nexport interface RoomAccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.FullyRead]: { event_id: string };\n [EventType.Tag]: { tags: { [name: string]: { order?: number } } };\n [EventType.SpaceOrder]: { order: string };\n [EventType.MarkedUnread]: { unread: boolean };\n}\n\n/**\n * Mapped type from event type to content type for all specified global account_data events.\n */\nexport interface AccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.PushRules]: IPushRules;\n [EventType.Direct]: { [userId: string]: string[] };\n [EventType.IgnoredUserList]: { ignored_users: { [userId: string]: EmptyObject } };\n \"m.secret_storage.default_key\": { key: string };\n // Flag set by the rust SDK (Element X) and also used by us to mark that the user opted out of backup\n // (I don't know why it's m.org.matrix...)\n \"m.org.matrix.custom.backup_disabled\": { disabled: boolean };\n \"m.identity_server\": { base_url: string | null };\n [key: `${typeof LOCAL_NOTIFICATION_SETTINGS_PREFIX.name}.${string}`]: LocalNotificationSettings;\n [key: `m.secret_storage.key.${string}`]: SecretStorageKeyDescription;\n\n // Invites-ignorer events\n [POLICIES_ACCOUNT_EVENT_TYPE.name]: { [key: string]: any };\n [POLICIES_ACCOUNT_EVENT_TYPE.altName]: { [key: string]: any };\n\n [EventType.InvitePermissionConfig]: { default_action?: string };\n}\n\n/**\n * Subset of AccountDataEvents, excluding events specified in https://spec.matrix.org/v1.17/client-server-api/#server-behaviour-12\n */\nexport type WritableAccountDataEvents = Exclude<AccountDataEvents, \"m.fully_read\" | \"m.push_rules\">;\n\n/**\n * Mapped type from event type to content type for all specified global events encrypted by secret storage.\n *\n * See https://spec.matrix.org/v1.13/client-server-api/#msecret_storagev1aes-hmac-sha2-1\n */\nexport interface SecretStorageAccountDataEvents {\n \"m.megolm_backup.v1\": SecretInfo;\n \"m.cross_signing.master\": SecretInfo;\n \"m.cross_signing.self_signing\": SecretInfo;\n \"m.cross_signing.user_signing\": SecretInfo;\n \"org.matrix.msc3814\": SecretInfo;\n}\n"],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AAgB,EAChB,mCACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMc,iCAAiC,GAAG,IAAId,aAAa,CAC9D,+BAA+B,EAC/B,+BACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMe,4BAA4B,GAAG,IAAIf,aAAa,CAAC,cAAc,EAAE,+BAA+B,CAAC;;AAE9G;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMgB,cAAc,GAAG,IAAIhB,aAAa,CAAC,SAAS,EAAE,4BAA4B,CAAC;;AAExF;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMiB,gBAAgB,GAAG,IAAIjB,aAAa,CAAC,WAAW,EAAE,8BAA8B,CAAC;;AAE9F;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMkB,kCAAkC,GAAG,IAAIlB,aAAa,CAC/D,+BAA+B,EAC/B,gDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMmB,wBAAwB,GAAG,IAAInB,aAAa,CAAC,WAAW,EAAE,8BAA8B,CAAC;;AAEtG;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMoB,yBAAyB,GAAG,IAAIrB,eAAe,CAAC,YAAY,EAAE,+BAA+B,CAAC;;AAE3G;AACA;AACA;;AAiDA;AACA;AACA;;AA+CA;AACA;AACA;;AAQA;AACA;AACA;;AAoBA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"event.js","names":["NamespacedValue","UnstableValue","EventType","RelationType","MsgType","RoomCreateTypeField","RoomType","ToDeviceMessageId","UNSTABLE_MSC3088_PURPOSE","UNSTABLE_MSC3088_ENABLED","UNSTABLE_MSC3089_TREE_SUBTYPE","UNSTABLE_MSC3089_LEAF","UNSTABLE_MSC3089_BRANCH","UNSTABLE_MSC2716_MARKER","MSC3912_RELATION_BASED_REDACTIONS_PROP","UNSTABLE_ELEMENT_FUNCTIONAL_USERS","EVENT_VISIBILITY_CHANGE_TYPE","PUSHER_ENABLED","PUSHER_DEVICE_ID","LOCAL_NOTIFICATION_SETTINGS_PREFIX","UNSIGNED_THREAD_ID_FIELD","UNSIGNED_MEMBERSHIP_FIELD"],"sources":["../../src/@types/event.ts"],"sourcesContent":["/*\nCopyright 2020-2026 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type EitherAnd } from \"matrix-events-sdk\";\n\nimport { NamespacedValue, UnstableValue } from \"../NamespacedValue.ts\";\nimport {\n type PolicyRuleEventContent,\n type RoomAvatarEventContent,\n type RoomCanonicalAliasEventContent,\n type RoomCreateEventContent,\n type RoomEncryptionEventContent,\n type RoomGuestAccessEventContent,\n type RoomHistoryVisibilityEventContent,\n type RoomJoinRulesEventContent,\n type RoomMemberEventContent,\n type RoomNameEventContent,\n type RoomPinnedEventsEventContent,\n type RoomPolicyContent,\n type RoomPowerLevelsEventContent,\n type RoomServerAclEventContent,\n type RoomThirdPartyInviteEventContent,\n type RoomTombstoneEventContent,\n type RoomTopicEventContent,\n type SpaceChildEventContent,\n type SpaceParentEventContent,\n} from \"./state_events.ts\";\nimport { type IGroupCallRoomMemberState, type IGroupCallRoomState } from \"../webrtc/groupCall.ts\";\nimport { type MSC3089EventContent } from \"../models/MSC3089Branch.ts\";\nimport { type M_BEACON, type M_BEACON_INFO, type MBeaconEventContent, type MBeaconInfoEventContent } from \"./beacon.ts\";\nimport { type EmptyObject } from \"./common.ts\";\nimport { type ReactionEventContent, type RoomMessageEventContent, type StickerEventContent } from \"./events.ts\";\nimport {\n type MCallAnswer,\n type MCallBase,\n type MCallCandidates,\n type MCallHangupReject,\n type MCallInviteNegotiate,\n type MCallReplacesEvent,\n type MCallSelectAnswer,\n type SDPStreamMetadata,\n} from \"../webrtc/callEventTypes.ts\";\nimport {\n type IRTCNotificationContent,\n type IRTCDeclineContent,\n type EncryptionKeysEventContent,\n type ICallNotifyContent,\n} from \"../matrixrtc/types.ts\";\nimport { type M_POLL_END, type M_POLL_START, type PollEndEventContent, type PollStartEventContent } from \"./polls.ts\";\nimport { type RtcMembershipData, type SessionMembershipData } from \"../matrixrtc/membershipData/index.ts\";\nimport { type LocalNotificationSettings } from \"./local_notifications.ts\";\nimport { type IPushRules } from \"./PushRules.ts\";\nimport { type SecretInfo, type SecretStorageKeyDescription } from \"../secret-storage.ts\";\nimport { type POLICIES_ACCOUNT_EVENT_TYPE } from \"../models/invites-ignorer-types.ts\";\n\nexport enum EventType {\n // Room state events\n RoomCanonicalAlias = \"m.room.canonical_alias\",\n RoomCreate = \"m.room.create\",\n RoomJoinRules = \"m.room.join_rules\",\n RoomMember = \"m.room.member\",\n RoomThirdPartyInvite = \"m.room.third_party_invite\",\n RoomPowerLevels = \"m.room.power_levels\",\n RoomName = \"m.room.name\",\n RoomTopic = \"m.room.topic\",\n RoomAvatar = \"m.room.avatar\",\n RoomPinnedEvents = \"m.room.pinned_events\",\n RoomEncryption = \"m.room.encryption\",\n RoomHistoryVisibility = \"m.room.history_visibility\",\n RoomGuestAccess = \"m.room.guest_access\",\n RoomServerAcl = \"m.room.server_acl\",\n RoomTombstone = \"m.room.tombstone\",\n RoomPredecessor = \"org.matrix.msc3946.room_predecessor\",\n\n // Moderation policy lists\n PolicyRuleUser = \"m.policy.rule.user\",\n PolicyRuleRoom = \"m.policy.rule.room\",\n PolicyRuleServer = \"m.policy.rule.server\",\n\n SpaceChild = \"m.space.child\",\n SpaceParent = \"m.space.parent\",\n\n // Room timeline events\n RoomRedaction = \"m.room.redaction\",\n RoomMessage = \"m.room.message\",\n RoomMessageEncrypted = \"m.room.encrypted\",\n Sticker = \"m.sticker\",\n CallInvite = \"m.call.invite\",\n CallCandidates = \"m.call.candidates\",\n CallAnswer = \"m.call.answer\",\n CallHangup = \"m.call.hangup\",\n CallReject = \"m.call.reject\",\n CallSelectAnswer = \"m.call.select_answer\",\n CallNegotiate = \"m.call.negotiate\",\n CallSDPStreamMetadataChanged = \"m.call.sdp_stream_metadata_changed\",\n CallSDPStreamMetadataChangedPrefix = \"org.matrix.call.sdp_stream_metadata_changed\",\n CallReplaces = \"m.call.replaces\",\n CallAssertedIdentity = \"m.call.asserted_identity\",\n CallAssertedIdentityPrefix = \"org.matrix.call.asserted_identity\",\n CallEncryptionKeysPrefix = \"io.element.call.encryption_keys\",\n KeyVerificationRequest = \"m.key.verification.request\",\n KeyVerificationStart = \"m.key.verification.start\",\n KeyVerificationCancel = \"m.key.verification.cancel\",\n KeyVerificationMac = \"m.key.verification.mac\",\n KeyVerificationDone = \"m.key.verification.done\",\n KeyVerificationKey = \"m.key.verification.key\",\n KeyVerificationAccept = \"m.key.verification.accept\",\n // Not used directly - see READY_TYPE in VerificationRequest.\n KeyVerificationReady = \"m.key.verification.ready\",\n // use of this is discouraged https://matrix.org/docs/spec/client_server/r0.6.1#m-room-message-feedback\n RoomMessageFeedback = \"m.room.message.feedback\",\n Reaction = \"m.reaction\",\n PollStart = \"org.matrix.msc3381.poll.start\",\n UserVerifyRequest = \"m.user.verify.request\",\n UserVerifyAccept = \"m.user.verify.accept\",\n UserVerified = \"m.user.verified\",\n\n // Room ephemeral events\n Typing = \"m.typing\",\n Receipt = \"m.receipt\",\n Presence = \"m.presence\",\n\n // Room account_data events\n FullyRead = \"m.fully_read\",\n Tag = \"m.tag\",\n SpaceOrder = \"org.matrix.msc3230.space_order\", // MSC3230\n MarkedUnread = \"m.marked_unread\",\n\n // User account_data events\n PushRules = \"m.push_rules\",\n Direct = \"m.direct\",\n IgnoredUserList = \"m.ignored_user_list\",\n InvitePermissionConfig = \"m.invite_permission_config\", // MSC4380\n\n // to_device events\n RoomKey = \"m.room_key\",\n RoomKeyRequest = \"m.room_key_request\",\n ForwardedRoomKey = \"m.forwarded_room_key\",\n Dummy = \"m.dummy\",\n SecretRequest = \"m.secret.request\",\n SecretSend = \"m.secret.send\",\n\n // Group call events\n GroupCallPrefix = \"org.matrix.msc3401.call\",\n GroupCallMemberPrefix = \"org.matrix.msc3401.call.member\",\n\n // MatrixRTC events\n RTCMembership = \"org.matrix.msc4143.rtc.member\",\n CallNotify = \"org.matrix.msc4075.call.notify\",\n RTCNotification = \"org.matrix.msc4075.rtc.notification\",\n RTCDecline = \"org.matrix.msc4310.rtc.decline\",\n\n // Policy servers\n RoomPolicy = \"org.matrix.msc4284.policy\",\n}\n\nexport enum RelationType {\n Annotation = \"m.annotation\",\n Replace = \"m.replace\",\n Reference = \"m.reference\",\n\n // Don't use this yet: it's only the stable version. The code still assumes we support the unstable prefix and,\n // moreover, our tests currently use the unstable prefix. Use THREAD_RELATION_TYPE.name.\n // Once we support *only* the stable prefix, THREAD_RELATION_TYPE can die and we can switch to this.\n Thread = \"m.thread\",\n}\n\nexport enum MsgType {\n Text = \"m.text\",\n Emote = \"m.emote\",\n Notice = \"m.notice\",\n Image = \"m.image\",\n File = \"m.file\",\n Audio = \"m.audio\",\n Location = \"m.location\",\n Video = \"m.video\",\n KeyVerificationRequest = \"m.key.verification.request\",\n}\n\nexport const RoomCreateTypeField = \"type\";\n\nexport enum RoomType {\n Space = \"m.space\",\n UnstableCall = \"org.matrix.msc3417.call\",\n ElementVideo = \"io.element.video\",\n}\n\nexport const ToDeviceMessageId = \"org.matrix.msgid\";\n\n/**\n * Identifier for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_PURPOSE = new UnstableValue(\"m.room.purpose\", \"org.matrix.msc3088.purpose\");\n\n/**\n * Enabled flag for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_ENABLED = new UnstableValue(\"m.enabled\", \"org.matrix.msc3088.enabled\");\n\n/**\n * Subtype for an [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_TREE_SUBTYPE = new UnstableValue(\"m.data_tree\", \"org.matrix.msc3089.data_tree\");\n\n/**\n * Leaf type for an event in a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_LEAF = new UnstableValue(\"m.leaf\", \"org.matrix.msc3089.leaf\");\n\n/**\n * Branch (Leaf Reference) type for the index approach in a\n * [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. Note that this reference is\n * UNSTABLE and subject to breaking changes, including its eventual removal.\n */\nexport const UNSTABLE_MSC3089_BRANCH = new UnstableValue(\"m.branch\", \"org.matrix.msc3089.branch\");\n\n/**\n * Marker event type to point back at imported historical content in a room. See\n * [MSC2716](https://github.com/matrix-org/matrix-spec-proposals/pull/2716).\n * Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC2716_MARKER = new UnstableValue(\"m.room.marker\", \"org.matrix.msc2716.marker\");\n\n/**\n * Name of the request property for relation based redactions.\n * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}\n */\nexport const MSC3912_RELATION_BASED_REDACTIONS_PROP = new UnstableValue(\n \"with_rel_types\",\n \"org.matrix.msc3912.with_relations\",\n);\n\n/**\n * Functional members type for declaring a purpose of room members (e.g. helpful bots).\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n *\n * Schema (TypeScript):\n * ```\n * {\n * service_members?: string[]\n * }\n * ```\n *\n * @example\n * ```\n * {\n * \"service_members\": [\n * \"@helperbot:localhost\",\n * \"@reminderbot:alice.tdl\"\n * ]\n * }\n * ```\n */\nexport const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new UnstableValue(\n \"io.element.functional_members\",\n \"io.element.functional_members\",\n);\n\n/**\n * A type of message that affects visibility of a message,\n * as per https://github.com/matrix-org/matrix-doc/pull/3531\n *\n * @experimental\n */\nexport const EVENT_VISIBILITY_CHANGE_TYPE = new UnstableValue(\"m.visibility\", \"org.matrix.msc3531.visibility\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_ENABLED = new UnstableValue(\"enabled\", \"org.matrix.msc3881.enabled\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_DEVICE_ID = new UnstableValue(\"device_id\", \"org.matrix.msc3881.device_id\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3890\n *\n * @experimental\n */\nexport const LOCAL_NOTIFICATION_SETTINGS_PREFIX = new UnstableValue(\n \"m.local_notification_settings\",\n \"org.matrix.msc3890.local_notification_settings\",\n);\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/4023\n *\n * @experimental\n */\nexport const UNSIGNED_THREAD_ID_FIELD = new UnstableValue(\"thread_id\", \"org.matrix.msc4023.thread_id\");\n\n/**\n * https://github.com/matrix-org/matrix-spec-proposals/pull/4115\n *\n * @experimental\n */\nexport const UNSIGNED_MEMBERSHIP_FIELD = new NamespacedValue(\"membership\", \"io.element.msc4115.membership\");\n\n/**\n * Mapped type from event type to content type for all specified non-state room events.\n */\nexport interface TimelineEvents {\n [EventType.RoomMessage]: RoomMessageEventContent;\n [EventType.Sticker]: StickerEventContent;\n [EventType.Reaction]: ReactionEventContent;\n [EventType.CallReplaces]: MCallReplacesEvent;\n [EventType.CallAnswer]: MCallAnswer;\n [EventType.CallSelectAnswer]: MCallSelectAnswer;\n [EventType.CallNegotiate]: Omit<MCallInviteNegotiate, \"offer\">;\n [EventType.CallInvite]: MCallInviteNegotiate;\n [EventType.CallCandidates]: MCallCandidates;\n [EventType.CallHangup]: MCallHangupReject;\n [EventType.CallReject]: MCallHangupReject;\n [EventType.CallSDPStreamMetadataChangedPrefix]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallSDPStreamMetadataChanged]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallEncryptionKeysPrefix]: EncryptionKeysEventContent;\n [EventType.CallNotify]: ICallNotifyContent;\n [EventType.RTCNotification]: IRTCNotificationContent;\n [EventType.RTCDecline]: IRTCDeclineContent;\n [M_BEACON.name]: MBeaconEventContent;\n [M_POLL_START.name]: PollStartEventContent;\n [M_POLL_END.name]: PollEndEventContent;\n [EventType.RTCMembership]: RtcMembershipData | { msc4354_sticky_key: string }; // An object containing just the sticky key is empty.\n [EventType.UserVerifyRequest]: {\n tx_hash: string;\n issuer_xrpl_address: string;\n target_xrpl_address: string;\n credential_type_bytes?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n };\n [EventType.UserVerifyAccept]: {\n tx_hash: string;\n issuer_xrpl_address: string;\n accepter_xrpl_address: string;\n credential_type_bytes?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n nft_token_id?: string;\n ipfs_uri?: string;\n };\n}\n\n/**\n * Mapped type from event type to content type for all specified room state events.\n */\nexport interface StateEvents {\n [EventType.RoomCanonicalAlias]: RoomCanonicalAliasEventContent;\n [EventType.RoomCreate]: RoomCreateEventContent;\n [EventType.RoomJoinRules]: RoomJoinRulesEventContent;\n [EventType.RoomMember]: RoomMemberEventContent;\n // XXX: Spec says this event has 3 required fields but kicking such an invitation requires sending `{}`\n [EventType.RoomThirdPartyInvite]: RoomThirdPartyInviteEventContent | EmptyObject;\n [EventType.RoomPowerLevels]: RoomPowerLevelsEventContent;\n [EventType.RoomName]: RoomNameEventContent;\n [EventType.RoomTopic]: RoomTopicEventContent;\n [EventType.RoomAvatar]: RoomAvatarEventContent;\n [EventType.RoomPinnedEvents]: RoomPinnedEventsEventContent;\n [EventType.RoomEncryption]: RoomEncryptionEventContent;\n [EventType.RoomHistoryVisibility]: RoomHistoryVisibilityEventContent;\n [EventType.RoomGuestAccess]: RoomGuestAccessEventContent;\n [EventType.RoomServerAcl]: RoomServerAclEventContent;\n [EventType.RoomTombstone]: RoomTombstoneEventContent;\n [EventType.SpaceChild]: SpaceChildEventContent;\n [EventType.SpaceParent]: SpaceParentEventContent;\n\n [EventType.PolicyRuleUser]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleRoom]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleServer]: PolicyRuleEventContent | EmptyObject;\n\n // MSC4284: Policy servers\n [EventType.RoomPolicy]: RoomPolicyContent | EmptyObject;\n\n // MSC3401\n [EventType.GroupCallPrefix]: IGroupCallRoomState;\n [EventType.GroupCallMemberPrefix]: IGroupCallRoomMemberState | SessionMembershipData | EmptyObject;\n [EventType.RTCMembership]: RtcMembershipData | EmptyObject;\n // MSC3089\n [UNSTABLE_MSC3089_BRANCH.name]: MSC3089EventContent;\n\n // MSC3672\n [M_BEACON_INFO.name]: MBeaconInfoEventContent;\n [EventType.UserVerified]: {\n status: \"requested\" | \"verified\";\n credential_type?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n tx_hash: string;\n validated: boolean;\n [key: string]: unknown;\n };\n}\n\n/**\n * Mapped type from event type to content type for all specified room-specific account_data events.\n */\nexport interface RoomAccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.FullyRead]: { event_id: string };\n [EventType.Tag]: { tags: { [name: string]: { order?: number } } };\n [EventType.SpaceOrder]: { order: string };\n [EventType.MarkedUnread]: { unread: boolean };\n}\n\n/**\n * Mapped type from event type to content type for all specified global account_data events.\n */\nexport interface AccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.PushRules]: IPushRules;\n [EventType.Direct]: { [userId: string]: string[] };\n [EventType.IgnoredUserList]: { ignored_users: { [userId: string]: EmptyObject } };\n \"m.secret_storage.default_key\": { key: string };\n // Flag set by the rust SDK (Element X) and also used by us to mark that the user opted out of backup\n // (I don't know why it's m.org.matrix...)\n \"m.org.matrix.custom.backup_disabled\": { disabled: boolean };\n \"m.identity_server\": { base_url: string | null };\n [key: `${typeof LOCAL_NOTIFICATION_SETTINGS_PREFIX.name}.${string}`]: LocalNotificationSettings;\n [key: `m.secret_storage.key.${string}`]: SecretStorageKeyDescription;\n\n // Invites-ignorer events\n [POLICIES_ACCOUNT_EVENT_TYPE.name]: { [key: string]: any };\n [POLICIES_ACCOUNT_EVENT_TYPE.altName]: { [key: string]: any };\n\n [EventType.InvitePermissionConfig]: { default_action?: string };\n \"org.textrp.wallet.e2ee_recovery.v1\": {\n envelope_version: number;\n chain_id: string;\n account_id: string;\n created_at_ms: number;\n key_id: string;\n wallet_wrap: {\n alg: string;\n kdf: string;\n salt: string;\n nonce: string;\n ciphertext: string;\n aad?: string;\n params?: Record<string, unknown>;\n };\n password_wrap: {\n alg: string;\n kdf: string;\n salt: string;\n nonce: string;\n ciphertext: string;\n aad?: string;\n params?: Record<string, unknown>;\n };\n };\n \"org.textrp.wallet.identity\": {\n chain_id: string;\n account_id: string;\n public_key: string | null;\n network?: string | null;\n key_type?: string | null;\n };\n}\n\n/**\n * Subset of AccountDataEvents, excluding events specified in https://spec.matrix.org/v1.17/client-server-api/#server-behaviour-12\n */\nexport type WritableAccountDataEvents = Exclude<AccountDataEvents, \"m.fully_read\" | \"m.push_rules\">;\n\n/**\n * Mapped type from event type to content type for all specified global events encrypted by secret storage.\n *\n * See https://spec.matrix.org/v1.13/client-server-api/#msecret_storagev1aes-hmac-sha2-1\n */\nexport interface SecretStorageAccountDataEvents {\n \"m.megolm_backup.v1\": SecretInfo;\n \"m.cross_signing.master\": SecretInfo;\n \"m.cross_signing.self_signing\": SecretInfo;\n \"m.cross_signing.user_signing\": SecretInfo;\n \"org.matrix.msc3814\": SecretInfo;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,eAAe,EAAEC,aAAa,QAAQ,uBAAuB;AAkDtE,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAmBjB;EAnBQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EA2BjB;EA3BQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAoDjB;EApDQA,SAAS;EAsDjB;EAtDQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EA8DjB;EA9DQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAmEjB;EAnEQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAsE8B;EAtEvCA,SAAS;EAyEjB;EAzEQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EA6EsC;EAEvD;EA/EQA,SAAS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;AAEjG;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMY,uBAAuB,GAAG,IAAIZ,aAAa,CAAC,eAAe,EAAE,2BAA2B,CAAC;;AAEtG;AACA;AACA;AACA;AACA,OAAO,IAAMa,sCAAsC,GAAG,IAAIb,aAAa,CACnE,gBAAgB,EAChB,mCACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMc,iCAAiC,GAAG,IAAId,aAAa,CAC9D,+BAA+B,EAC/B,+BACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMe,4BAA4B,GAAG,IAAIf,aAAa,CAAC,cAAc,EAAE,+BAA+B,CAAC;;AAE9G;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMgB,cAAc,GAAG,IAAIhB,aAAa,CAAC,SAAS,EAAE,4BAA4B,CAAC;;AAExF;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMiB,gBAAgB,GAAG,IAAIjB,aAAa,CAAC,WAAW,EAAE,8BAA8B,CAAC;;AAE9F;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMkB,kCAAkC,GAAG,IAAIlB,aAAa,CAC/D,+BAA+B,EAC/B,gDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMmB,wBAAwB,GAAG,IAAInB,aAAa,CAAC,WAAW,EAAE,8BAA8B,CAAC;;AAEtG;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMoB,yBAAyB,GAAG,IAAIrB,eAAe,CAAC,YAAY,EAAE,+BAA+B,CAAC;;AAE3G;AACA;AACA;;AAiDA;AACA;AACA;;AA+CA;AACA;AACA;;AAQA;AACA;AACA;;AAoDA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA","ignoreList":[]}
package/lib/briij.d.ts CHANGED
@@ -31,6 +31,7 @@ export * from "./interactive-auth.ts";
31
31
  export * from "./xrpl/identity.ts";
32
32
  export * from "./xrpl/trust.ts";
33
33
  export * from "./xrpl/verification.ts";
34
+ export * from "./wallet-recovery.ts";
34
35
  export * from "./version-support.ts";
35
36
  export * from "./service-types.ts";
36
37
  export * from "./store/memory.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"briij.d.ts","sourceRoot":"","sources":["../src/briij.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CA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* from "./xrpl/identity.js";
49
49
  export * from "./xrpl/trust.js";
50
50
  export * from "./xrpl/verification.js";
51
+ export * from "./wallet-recovery.js";
51
52
  export * from "./version-support.js";
52
53
  export * from "./service-types.js";
53
54
  export * from "./store/memory.js";
package/lib/briij.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"briij.js","names":["MemoryCryptoStore","MemoryStore","BriijScheduler","BriijClient","RoomWidgetClient","_ContentHelpers","ContentHelpers","_SecretStorage","SecretStorage","createNewBriijCall","CallEvent","GroupCall","GroupCallEvent","GroupCallIntent","GroupCallState","GroupCallType","GroupCallStatsReportEvent","SyncState","SetPresence","SlidingSyncEvent","MediaHandlerEvent","CallFeedEvent","StatsReport","Relations","RelationsEvent","TypedEventEmitter","LocalStorageErrors","localStorageErrorsEventsEmitter","IdentityProviderBrand","SSOAction","LocationAssetType","DebugLogger","cryptoStoreFactory","setCryptoStoreFactory","fac","amendClientOpts","opts","_opts$store","_opts$scheduler","_opts$cryptoStore","store","localStorage","globalThis","scheduler","cryptoStore","createClient","createRoomWidgetClient","widgetApi","capabilities","roomId","sendContentLoaded","arguments","length","undefined"],"sources":["../src/briij.ts"],"sourcesContent":["/*\nCopyright 2015-2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type WidgetApi } from \"matrix-widget-api\";\n\nimport { MemoryCryptoStore } from \"./crypto/store/memory-crypto-store.ts\";\nimport { MemoryStore } from \"./store/memory.ts\";\nimport { BriijScheduler } from \"./scheduler.ts\";\nimport { BriijClient, type ICreateClientOpts } from \"./client.ts\";\nimport { RoomWidgetClient, type ICapabilities } from \"./embedded.ts\";\nimport { type CryptoStore } from \"./crypto/store/base.ts\";\n\nexport * from \"./client.ts\";\nexport * from \"./serverCapabilities.ts\";\nexport * from \"./embedded.ts\";\nexport * from \"./http-api/index.ts\";\nexport * from \"./autodiscovery.ts\";\nexport * from \"./sync-accumulator.ts\";\nexport * from \"./errors.ts\";\nexport * from \"./base64.ts\";\nexport * from \"./models/beacon.ts\";\nexport * from \"./models/event.ts\";\nexport * from \"./models/room.ts\";\nexport * from \"./models/event-timeline.ts\";\nexport * from \"./models/event-timeline-set.ts\";\nexport * from \"./models/poll.ts\";\nexport * from \"./models/room-member.ts\";\nexport * from \"./models/room-state.ts\";\nexport * from \"./models/thread.ts\";\nexport * from \"./models/typed-event-emitter.ts\";\nexport * from \"./models/user.ts\";\nexport * from \"./models/device.ts\";\nexport * from \"./models/search-result.ts\";\nexport * from \"./oidc/index.ts\";\nexport * from \"./scheduler.ts\";\nexport * from \"./filter.ts\";\nexport * from \"./timeline-window.ts\";\nexport * from \"./interactive-auth.ts\";\nexport * from \"./xrpl/identity.ts\";\nexport * from \"./xrpl/trust.ts\";\nexport * from \"./xrpl/verification.ts\";\nexport * from \"./version-support.ts\";\nexport * from \"./service-types.ts\";\nexport * from \"./store/memory.ts\";\nexport * from \"./store/indexeddb.ts\";\nexport * from \"./crypto/store/memory-crypto-store.ts\";\nexport * from \"./crypto/store/localStorage-crypto-store.ts\";\nexport * from \"./crypto/store/indexeddb-crypto-store.ts\";\nexport type { OutgoingRoomKeyRequest } from \"./crypto/store/base.ts\";\nexport * from \"./content-repo.ts\";\nexport type * from \"./@types/common.ts\";\nexport type * from \"./@types/uia.ts\";\nexport * from \"./@types/event.ts\";\nexport * from \"./@types/PushRules.ts\";\nexport * from \"./@types/partials.ts\";\nexport * from \"./@types/requests.ts\";\nexport * from \"./@types/search.ts\";\nexport * from \"./@types/beacon.ts\";\nexport * from \"./@types/topic.ts\";\nexport * from \"./@types/location.ts\";\nexport * from \"./@types/threepids.ts\";\nexport * from \"./@types/auth.ts\";\nexport * from \"./@types/polls.ts\";\nexport type * from \"./@types/local_notifications.ts\";\nexport type * from \"./@types/registration.ts\";\nexport * from \"./@types/read_receipts.ts\";\nexport * from \"./@types/crypto.ts\";\nexport * from \"./@types/extensible_events.ts\";\nexport * from \"./@types/IIdentityServerProvider.ts\";\nexport * from \"./@types/membership.ts\";\nexport * from \"./models/room-summary.ts\";\nexport * from \"./models/event-status.ts\";\nexport * from \"./models/profile-keys.ts\";\nexport * from \"./models/related-relations.ts\";\nexport type { RoomSummary } from \"./client.ts\";\nexport * as ContentHelpers from \"./content-helpers.ts\";\nexport * as SecretStorage from \"./secret-storage.ts\";\nexport { createNewBriijCall, CallEvent } from \"./webrtc/call.ts\";\nexport type { BriijCall } from \"./webrtc/call.ts\";\nexport {\n GroupCall,\n GroupCallEvent,\n GroupCallIntent,\n GroupCallState,\n GroupCallType,\n GroupCallStatsReportEvent,\n} from \"./webrtc/groupCall.ts\";\n\nexport { SyncState, SetPresence } from \"./sync.ts\";\nexport type { ISyncStateData as SyncStateData } from \"./sync.ts\";\nexport { SlidingSyncEvent } from \"./sliding-sync.ts\";\nexport { MediaHandlerEvent } from \"./webrtc/mediaHandler.ts\";\nexport { CallFeedEvent } from \"./webrtc/callFeed.ts\";\nexport { StatsReport } from \"./webrtc/stats/statsReport.ts\";\nexport { Relations, RelationsEvent } from \"./models/relations.ts\";\nexport { TypedEventEmitter } from \"./models/typed-event-emitter.ts\";\nexport { LocalStorageErrors, localStorageErrorsEventsEmitter } from \"./store/local-storage-events-emitter.ts\";\nexport { IdentityProviderBrand, SSOAction } from \"./@types/auth.ts\";\nexport type { ISSOFlow as SSOFlow, LoginFlow } from \"./@types/auth.ts\";\nexport type { IHierarchyRelation as HierarchyRelation, IHierarchyRoom as HierarchyRoom } from \"./@types/spaces.ts\";\nexport { LocationAssetType } from \"./@types/location.ts\";\nexport { DebugLogger } from \"./logger.ts\";\n\nlet cryptoStoreFactory = (): CryptoStore => new MemoryCryptoStore();\n\n/**\n * Configure a different factory to be used for creating crypto stores\n *\n * @param fac - a function which will return a new `CryptoStore`\n */\nexport function setCryptoStoreFactory(fac: () => CryptoStore): void {\n cryptoStoreFactory = fac;\n}\n\nfunction amendClientOpts(opts: ICreateClientOpts): ICreateClientOpts {\n opts.store =\n opts.store ??\n new MemoryStore({\n localStorage: globalThis.localStorage,\n });\n opts.scheduler = opts.scheduler ?? new BriijScheduler();\n opts.cryptoStore = opts.cryptoStore ?? cryptoStoreFactory();\n\n return opts;\n}\n\n/**\n * Construct a Briij client. Similar to {@link BriijClient}\n * except that the 'request', 'store' and 'scheduler' dependencies are satisfied.\n * @param opts - The configuration options for this client. These configuration\n * options will be passed directly to {@link BriijClient}.\n *\n * @returns A new Briij client.\n * @see {@link BriijClient} for the full list of options for\n * `opts`.\n */\nexport function createClient(opts: ICreateClientOpts): BriijClient {\n return new BriijClient(amendClientOpts(opts));\n}\n\n/**\n * Construct a Briij client that works in a widget.\n * This client has a subset of features compared to a full client.\n * It uses the widget-api to communicate with matrix. (widget \\<-\\> client \\<-\\> homeserver)\n * @returns A new Briij client with a subset of features.\n * @param opts - The configuration options for this client. These configuration\n * options will be passed directly to {@link BriijClient}.\n * @param widgetApi - The widget api to use for communication.\n * @param capabilities - The capabilities the widget client will request.\n * @param roomId - The room id the widget is associated with.\n * @param sendContentLoaded - Whether to send a content loaded widget action immediately after initial setup.\n * Set to `false` if the widget uses `waitForIFrameLoad=true` (in this case the client does not expect a content loaded action at all),\n * or if the the widget wants to send the `ContentLoaded` action at a later point in time after the initial setup.\n */\nexport function createRoomWidgetClient(\n widgetApi: WidgetApi,\n capabilities: ICapabilities,\n roomId: string,\n opts: ICreateClientOpts,\n sendContentLoaded = true,\n): BriijClient {\n return new RoomWidgetClient(widgetApi, capabilities, roomId, amendClientOpts(opts), sendContentLoaded);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,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AAU,CAACD;EAC7B,CAAC,CAAC;EACNL,IAAI,CAACO,SAAS,IAAAL,eAAA,GAAGF,IAAI,CAACO,SAAS,cAAAL,eAAA,cAAAA,eAAA,GAAI,IAAIpC,cAAc,CAAC,CAAC;EACvDkC,IAAI,CAACQ,WAAW,IAAAL,iBAAA,GAAGH,IAAI,CAACQ,WAAW,cAAAL,iBAAA,cAAAA,iBAAA,GAAIP,kBAAkB,CAAC,CAAC;EAE3D,OAAOI,IAAI;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASS,YAAYA,CAACT,IAAuB,EAAe;EAC/D,OAAO,IAAIjC,WAAW,CAACgC,eAAe,CAACC,IAAI,CAAC,CAAC;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,sBAAsBA,CAClCC,SAAoB,EACpBC,YAA2B,EAC3BC,MAAc,EACdb,IAAuB,EAEZ;EAAA,IADXc,iBAAiB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAExB,OAAO,IAAI/C,gBAAgB,CAAC2C,SAAS,EAAEC,YAAY,EAAEC,MAAM,EAAEd,eAAe,CAACC,IAAI,CAAC,EAAEc,iBAAiB,CAAC;AAC1G","ignoreList":[]}
1
+ {"version":3,"file":"briij.js","names":["MemoryCryptoStore","MemoryStore","BriijScheduler","BriijClient","RoomWidgetClient","_ContentHelpers","ContentHelpers","_SecretStorage","SecretStorage","createNewBriijCall","CallEvent","GroupCall","GroupCallEvent","GroupCallIntent","GroupCallState","GroupCallType","GroupCallStatsReportEvent","SyncState","SetPresence","SlidingSyncEvent","MediaHandlerEvent","CallFeedEvent","StatsReport","Relations","RelationsEvent","TypedEventEmitter","LocalStorageErrors","localStorageErrorsEventsEmitter","IdentityProviderBrand","SSOAction","LocationAssetType","DebugLogger","cryptoStoreFactory","setCryptoStoreFactory","fac","amendClientOpts","opts","_opts$store","_opts$scheduler","_opts$cryptoStore","store","localStorage","globalThis","scheduler","cryptoStore","createClient","createRoomWidgetClient","widgetApi","capabilities","roomId","sendContentLoaded","arguments","length","undefined"],"sources":["../src/briij.ts"],"sourcesContent":["/*\nCopyright 2015-2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type WidgetApi } from \"matrix-widget-api\";\n\nimport { MemoryCryptoStore } from \"./crypto/store/memory-crypto-store.ts\";\nimport { MemoryStore } from \"./store/memory.ts\";\nimport { BriijScheduler } from \"./scheduler.ts\";\nimport { BriijClient, type ICreateClientOpts } from \"./client.ts\";\nimport { RoomWidgetClient, type ICapabilities } from \"./embedded.ts\";\nimport { type CryptoStore } from \"./crypto/store/base.ts\";\n\nexport * from \"./client.ts\";\nexport * from \"./serverCapabilities.ts\";\nexport * from \"./embedded.ts\";\nexport * from \"./http-api/index.ts\";\nexport * from \"./autodiscovery.ts\";\nexport * from \"./sync-accumulator.ts\";\nexport * from \"./errors.ts\";\nexport * from \"./base64.ts\";\nexport * from \"./models/beacon.ts\";\nexport * from \"./models/event.ts\";\nexport * from \"./models/room.ts\";\nexport * from \"./models/event-timeline.ts\";\nexport * from \"./models/event-timeline-set.ts\";\nexport * from \"./models/poll.ts\";\nexport * from \"./models/room-member.ts\";\nexport * from \"./models/room-state.ts\";\nexport * from \"./models/thread.ts\";\nexport * from \"./models/typed-event-emitter.ts\";\nexport * from \"./models/user.ts\";\nexport * from \"./models/device.ts\";\nexport * from \"./models/search-result.ts\";\nexport * from \"./oidc/index.ts\";\nexport * from \"./scheduler.ts\";\nexport * from \"./filter.ts\";\nexport * from \"./timeline-window.ts\";\nexport * from \"./interactive-auth.ts\";\nexport * from \"./xrpl/identity.ts\";\nexport * from \"./xrpl/trust.ts\";\nexport * from \"./xrpl/verification.ts\";\nexport * from \"./wallet-recovery.ts\";\nexport * from \"./version-support.ts\";\nexport * from \"./service-types.ts\";\nexport * from \"./store/memory.ts\";\nexport * from \"./store/indexeddb.ts\";\nexport * from \"./crypto/store/memory-crypto-store.ts\";\nexport * from \"./crypto/store/localStorage-crypto-store.ts\";\nexport * from \"./crypto/store/indexeddb-crypto-store.ts\";\nexport type { OutgoingRoomKeyRequest } from \"./crypto/store/base.ts\";\nexport * from \"./content-repo.ts\";\nexport type * from \"./@types/common.ts\";\nexport type * from \"./@types/uia.ts\";\nexport * from \"./@types/event.ts\";\nexport * from \"./@types/PushRules.ts\";\nexport * from \"./@types/partials.ts\";\nexport * from \"./@types/requests.ts\";\nexport * from \"./@types/search.ts\";\nexport * from \"./@types/beacon.ts\";\nexport * from \"./@types/topic.ts\";\nexport * from \"./@types/location.ts\";\nexport * from \"./@types/threepids.ts\";\nexport * from \"./@types/auth.ts\";\nexport * from \"./@types/polls.ts\";\nexport type * from \"./@types/local_notifications.ts\";\nexport type * from \"./@types/registration.ts\";\nexport * from \"./@types/read_receipts.ts\";\nexport * from \"./@types/crypto.ts\";\nexport * from \"./@types/extensible_events.ts\";\nexport * from \"./@types/IIdentityServerProvider.ts\";\nexport * from \"./@types/membership.ts\";\nexport * from \"./models/room-summary.ts\";\nexport * from \"./models/event-status.ts\";\nexport * from \"./models/profile-keys.ts\";\nexport * from \"./models/related-relations.ts\";\nexport type { RoomSummary } from \"./client.ts\";\nexport * as ContentHelpers from \"./content-helpers.ts\";\nexport * as SecretStorage from \"./secret-storage.ts\";\nexport { createNewBriijCall, CallEvent } from \"./webrtc/call.ts\";\nexport type { BriijCall } from \"./webrtc/call.ts\";\nexport {\n GroupCall,\n GroupCallEvent,\n GroupCallIntent,\n GroupCallState,\n GroupCallType,\n GroupCallStatsReportEvent,\n} from \"./webrtc/groupCall.ts\";\n\nexport { SyncState, SetPresence } from \"./sync.ts\";\nexport type { ISyncStateData as SyncStateData } from \"./sync.ts\";\nexport { SlidingSyncEvent } from \"./sliding-sync.ts\";\nexport { MediaHandlerEvent } from \"./webrtc/mediaHandler.ts\";\nexport { CallFeedEvent } from \"./webrtc/callFeed.ts\";\nexport { StatsReport } from \"./webrtc/stats/statsReport.ts\";\nexport { Relations, RelationsEvent } from \"./models/relations.ts\";\nexport { TypedEventEmitter } from \"./models/typed-event-emitter.ts\";\nexport { LocalStorageErrors, localStorageErrorsEventsEmitter } from \"./store/local-storage-events-emitter.ts\";\nexport { IdentityProviderBrand, SSOAction } from \"./@types/auth.ts\";\nexport type { ISSOFlow as SSOFlow, LoginFlow } from \"./@types/auth.ts\";\nexport type { IHierarchyRelation as HierarchyRelation, IHierarchyRoom as HierarchyRoom } from \"./@types/spaces.ts\";\nexport { LocationAssetType } from \"./@types/location.ts\";\nexport { DebugLogger } from \"./logger.ts\";\n\nlet cryptoStoreFactory = (): CryptoStore => new MemoryCryptoStore();\n\n/**\n * Configure a different factory to be used for creating crypto stores\n *\n * @param fac - a function which will return a new `CryptoStore`\n */\nexport function setCryptoStoreFactory(fac: () => CryptoStore): void {\n cryptoStoreFactory = fac;\n}\n\nfunction amendClientOpts(opts: ICreateClientOpts): ICreateClientOpts {\n opts.store =\n opts.store ??\n new MemoryStore({\n localStorage: globalThis.localStorage,\n });\n opts.scheduler = opts.scheduler ?? new BriijScheduler();\n opts.cryptoStore = opts.cryptoStore ?? cryptoStoreFactory();\n\n return opts;\n}\n\n/**\n * Construct a Briij client. Similar to {@link BriijClient}\n * except that the 'request', 'store' and 'scheduler' dependencies are satisfied.\n * @param opts - The configuration options for this client. These configuration\n * options will be passed directly to {@link BriijClient}.\n *\n * @returns A new Briij client.\n * @see {@link BriijClient} for the full list of options for\n * `opts`.\n */\nexport function createClient(opts: ICreateClientOpts): BriijClient {\n return new BriijClient(amendClientOpts(opts));\n}\n\n/**\n * Construct a Briij client that works in a widget.\n * This client has a subset of features compared to a full client.\n * It uses the widget-api to communicate with matrix. (widget \\<-\\> client \\<-\\> homeserver)\n * @returns A new Briij client with a subset of features.\n * @param opts - The configuration options for this client. These configuration\n * options will be passed directly to {@link BriijClient}.\n * @param widgetApi - The widget api to use for communication.\n * @param capabilities - The capabilities the widget client will request.\n * @param roomId - The room id the widget is associated with.\n * @param sendContentLoaded - Whether to send a content loaded widget action immediately after initial setup.\n * Set to `false` if the widget uses `waitForIFrameLoad=true` (in this case the client does not expect a content loaded action at all),\n * or if the the widget wants to send the `ContentLoaded` action at a later point in time after the initial setup.\n */\nexport function createRoomWidgetClient(\n widgetApi: WidgetApi,\n capabilities: ICapabilities,\n roomId: string,\n opts: ICreateClientOpts,\n sendContentLoaded = true,\n): BriijClient {\n return new RoomWidgetClient(widgetApi, capabilities, roomId, amendClientOpts(opts), sendContentLoaded);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,iBAAiB,QAAQ,uCAAuC;AACzE,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,WAAW,QAAgC,aAAa;AACjE,SAASC,gBAAgB,QAA4B,eAAe;AAGpE,cAAc,aAAa;AAC3B,cAAc,yBAAyB;AACvC,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,oBAAoB;AAClC,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,4BAA4B;AAC1C,cAAc,gCAAgC;AAC9C,cAAc,kBAAkB;AAChC,cAAc,yBAAyB;AACvC,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,iCAA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AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,sBAAsBA,CAClCC,SAAoB,EACpBC,YAA2B,EAC3BC,MAAc,EACdb,IAAuB,EAEZ;EAAA,IADXc,iBAAiB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAExB,OAAO,IAAI/C,gBAAgB,CAAC2C,SAAS,EAAEC,YAAY,EAAEC,MAAM,EAAEd,eAAe,CAACC,IAAI,CAAC,EAAEc,iBAAiB,CAAC;AAC1G","ignoreList":[]}
package/lib/client.d.ts CHANGED
@@ -41,7 +41,7 @@ import { type IThreepid } from "./@types/threepids.ts";
41
41
  import { type CryptoStore } from "./crypto/store/base.ts";
42
42
  import { GroupCall, type GroupCallIntent, type GroupCallType, type IGroupCallDataChannelOptions } from "./webrtc/groupCall.ts";
43
43
  import { MediaHandler } from "./webrtc/mediaHandler.ts";
44
- import { type ILoginFlowsResponse, type IRefreshTokenResponse, type LoginRequest, type LoginResponse, type LoginTokenPostResponse, type SSOAction, type XrplWalletChallengePayload } from "./@types/auth.ts";
44
+ import { type ILoginFlowsResponse, type IRefreshTokenResponse, type LoginRequest, type LoginResponse, type LoginTokenPostResponse, type SSOAction, type WalletE2eeRecoveryEnvelope, type WalletIdentityAccountData, type XrplAuthChallengeRequest, type XrplAuthChallengeResponse, type XrplAuthCompleteRequest, type XrplWalletChallengePayload } from "./@types/auth.ts";
45
45
  import { TypedEventEmitter } from "./models/typed-event-emitter.ts";
46
46
  import { ReceiptType } from "./@types/read_receipts.ts";
47
47
  import { type MSC3575SlidingSyncRequest, type MSC3575SlidingSyncResponse, type SlidingSync } from "./sliding-sync.ts";
@@ -2484,14 +2484,44 @@ export declare class BriijClient extends TypedEventEmitter<EmittedEvents, Client
2484
2484
  */
2485
2485
  loginWithPassword(user: string, password: string): Promise<LoginResponse>;
2486
2486
  /**
2487
- * @param user - Matrix user ID localpart or fully qualified MXID.
2488
- * @param walletAddress - XRPL/Xahau classic wallet address.
2489
- * @param signature - Hex signature for the challenge message.
2490
- * @param challenge - Signed challenge payload.
2491
- * @param network - Ledger network identifier. Defaults to `xrpl`.
2487
+ * Request an XRPL login challenge from the homeserver.
2488
+ *
2489
+ * The briij homeserver responds with HTTP 401 as the successful challenge
2490
+ * response, so this helper normalizes that into a resolved promise.
2491
+ */
2492
+ getXrplAuthChallenge(request: Omit<XrplAuthChallengeRequest, "type">): Promise<XrplAuthChallengeResponse>;
2493
+ /**
2494
+ * Complete XRPL login using the previously issued challenge session.
2495
+ *
2492
2496
  * @returns Promise which resolves to a LoginResponse object.
2493
2497
  * @returns Rejects: with an error response.
2494
2498
  */
2499
+ completeXrplAuth(request: Omit<XrplAuthCompleteRequest, "type">): Promise<LoginResponse>;
2500
+ /**
2501
+ * Store a chain-agnostic wallet recovery envelope in account data.
2502
+ *
2503
+ * This uses a stable account-data type and does not affect core E2EE state.
2504
+ *
2505
+ * @param envelope - Wallet recovery envelope payload.
2506
+ */
2507
+ setWalletRecoveryEnvelope(envelope: WalletE2eeRecoveryEnvelope): Promise<EmptyObject>;
2508
+ /**
2509
+ * Fetch wallet recovery envelope directly from the homeserver.
2510
+ *
2511
+ * @returns The stored envelope, or null if not found.
2512
+ */
2513
+ getWalletRecoveryEnvelopeFromServer(): Promise<WalletE2eeRecoveryEnvelope | null>;
2514
+ /**
2515
+ * Fetch canonical wallet identity metadata from the homeserver.
2516
+ *
2517
+ * @returns Wallet identity metadata, or null if not found.
2518
+ */
2519
+ getWalletIdentityFromServer(): Promise<WalletIdentityAccountData | null>;
2520
+ /**
2521
+ * @deprecated Use `getXrplAuthChallenge` + `completeXrplAuth` for explicit
2522
+ * two-step XRPL login flow. This wrapper now expects `challenge` to include
2523
+ * the `session` and optional `public_key`.
2524
+ */
2495
2525
  loginWithXrplWallet(user: string, walletAddress: string, signature: string, challenge: string | XrplWalletChallengePayload, network?: string): Promise<LoginResponse>;
2496
2526
  /**
2497
2527
  * @param redirectUrl - The URL to redirect to after the HS