@thru/wallet 0.2.28 → 0.2.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thru/wallet",
3
- "version": "0.2.28",
3
+ "version": "0.2.29",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -46,7 +46,7 @@
46
46
  "README.md"
47
47
  ],
48
48
  "dependencies": {
49
- "@thru/sdk": "0.2.28"
49
+ "@thru/sdk": "0.2.29"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@svgr/core": "^8.1.0",
@@ -159,7 +159,7 @@ describe("NativeSDK", () => {
159
159
  });
160
160
  const iframeUrl = new URL(transparentSdk.getIframeSrc());
161
161
 
162
- expect(iframeUrl.origin).toBe("https://wallet.thru.org");
162
+ expect(iframeUrl.origin).toBe("https://app.tid.sh");
163
163
  expect(iframeUrl.pathname).toBe("/embedded/native/transparent");
164
164
 
165
165
  transparentSdk.destroy();
@@ -144,9 +144,9 @@ export interface NativeSDKUiHandlers {
144
144
  const DEFAULT_STORAGE_KEY = "thru.native-sdk.connection.v1";
145
145
  const SELECTED_ACCOUNT_STORAGE_KEY_SUFFIX = ".selected-account.v1";
146
146
  const SIGNING_SESSION_STORAGE_KEY_SUFFIX = ".signing-sessions.v1";
147
- const DEFAULT_NATIVE_WALLET_URL = "https://wallet.thru.org/embedded/native";
147
+ const DEFAULT_NATIVE_WALLET_URL = "https://app.tid.sh/embedded/native";
148
148
  const DEFAULT_TRANSPARENT_WALLET_URL =
149
- "https://wallet.thru.org/embedded/native/transparent";
149
+ "https://app.tid.sh/embedded/native/transparent";
150
150
 
151
151
  const CHECKING_WALLET_AVAILABILITY: WalletAvailability = {
152
152
  status: "checking",
@@ -268,7 +268,7 @@ export class NativeSDK {
268
268
  return this.provider.getIframeSrc();
269
269
  }
270
270
 
271
- /** Wallet origin (e.g. https://wallet.thru.org). */
271
+ /** Wallet origin (e.g. https://app.tid.sh). */
272
272
  getWalletOrigin(): string {
273
273
  return this.provider.getWalletOrigin();
274
274
  }
@@ -29,12 +29,12 @@ import {
29
29
  type WebViewRefLike,
30
30
  } from "./WebViewBridge";
31
31
 
32
- const DEFAULT_WALLET_URL = "https://wallet.thru.org/embedded/native";
32
+ const DEFAULT_WALLET_URL = "https://app.tid.sh/embedded/native";
33
33
  const DEFAULT_ORIGIN = "thru-mobile://app";
34
34
  const TRANSPARENT_FOCUS_SETTLE_MS = 500;
35
35
 
36
36
  export interface NativeProviderConfig {
37
- /** wallet.thru.org/embedded/native URL to load. */
37
+ /** app.tid.sh/embedded/native URL to load. */
38
38
  walletUrl?: string;
39
39
  /** Standard bottom-sheet wallet or transparent auto-signing wallet. */
40
40
  walletExperience?: "standard" | "transparent";
@@ -153,7 +153,7 @@ export class NativeProvider {
153
153
  return this.bridge.getIframeSrc();
154
154
  }
155
155
 
156
- /** Wallet origin (e.g. https://wallet.thru.org). The shell template
156
+ /** Wallet origin (e.g. https://app.tid.sh). The shell template
157
157
  should substitute this for WALLET_ORIGIN_PLACEHOLDER. */
158
158
  getWalletOrigin(): string {
159
159
  return this.bridge.walletOrigin;
@@ -154,9 +154,9 @@ describe('WebViewBridge', () => {
154
154
  process.env.NODE_ENV = 'production';
155
155
 
156
156
  const productionBridge = new WebViewBridge({
157
- walletUrl: 'https://wallet.thru.org/embedded',
157
+ walletUrl: 'https://app.tid.sh/embedded',
158
158
  });
159
- expect(productionBridge.walletOrigin).toBe('https://wallet.thru.org');
159
+ expect(productionBridge.walletOrigin).toBe('https://app.tid.sh');
160
160
  productionBridge.destroy();
161
161
 
162
162
  expect(
@@ -12,12 +12,12 @@ import {
12
12
 
13
13
  /* RN-side analog of `web/packages/embedded-provider/src/IframeManager.ts`.
14
14
  The wallet ships unchanged. The shell HTML (src/shell.html) hosts an
15
- <iframe src="wallet.thru.org/embedded/native"> and forwards
15
+ <iframe src="app.tid.sh/embedded/native"> and forwards
16
16
  iframe<->ReactNativeWebView postMessage traffic. This bridge only
17
17
  speaks the RN side: webView.injectJavaScript out, onMessage in. */
18
18
 
19
19
  const PRODUCTION_WALLET_ORIGINS = [
20
- 'https://wallet.thru.org',
20
+ 'https://app.tid.sh',
21
21
  'https://wallet.tid.sh',
22
22
  ];
23
23
 
@@ -6,8 +6,8 @@ import { getShellHtml } from './shell';
6
6
 
7
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
8
  const TEST_SHELL_OPTIONS = {
9
- walletUrl: 'https://wallet.thru.org/embedded?tn_frame_id=frame_test',
10
- walletOrigin: 'https://wallet.thru.org',
9
+ walletUrl: 'https://app.tid.sh/embedded?tn_frame_id=frame_test',
10
+ walletOrigin: 'https://app.tid.sh',
11
11
  };
12
12
 
13
13
  describe('native shell HTML', () => {
@@ -36,7 +36,7 @@ describe('native shell HTML', () => {
36
36
 
37
37
  it('substitutes shell placeholders without reprocessing inserted values', () => {
38
38
  const walletUrl =
39
- 'https://wallet.thru.org/embedded?marker=WALLET_ORIGIN_PLACEHOLDER';
39
+ 'https://app.tid.sh/embedded?marker=WALLET_ORIGIN_PLACEHOLDER';
40
40
  const walletOrigin = 'thru-mobile://WALLET_URL_PLACEHOLDER/$&';
41
41
 
42
42
  const html = getShellHtml({ walletUrl, walletOrigin });
@@ -95,7 +95,7 @@ export interface ShellOptions {
95
95
  }
96
96
 
97
97
  /**
98
- * Returns the shell HTML for loading wallet.thru.org/embedded inside a
98
+ * Returns the shell HTML for loading app.tid.sh/embedded inside a
99
99
  * react-native-webview. The shell hosts an <iframe> pointing at the wallet
100
100
  * and bridges window.postMessage traffic between the iframe and the
101
101
  * react-native-webview's onMessage / injectJavaScript channels.
@@ -3,7 +3,7 @@ import { IframeManager } from './IframeManager';
3
3
 
4
4
  describe('IframeManager', () => {
5
5
  it('allows trusted production wallet origins', () => {
6
- const thruBridge = new IframeManager('https://wallet.thru.org/embedded');
6
+ const thruBridge = new IframeManager('https://app.tid.sh/embedded');
7
7
  const tidBridge = new IframeManager('https://wallet.tid.sh/embedded');
8
8
 
9
9
  expect(thruBridge).toBeInstanceOf(IframeManager);
@@ -17,7 +17,7 @@ import {
17
17
  * origins so local HTTPS RP-ID testing can use the hosted wallet path.
18
18
  */
19
19
  const PRODUCTION_IFRAME_ORIGINS = [
20
- 'https://wallet.thru.org',
20
+ 'https://app.tid.sh',
21
21
  'https://wallet.tid.sh',
22
22
  ];
23
23