@thru/chain-interfaces 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -5,8 +5,6 @@
5
5
  * keeps the Surface area aligned with other chain adapters.
6
6
  */
7
7
  interface IThruChain {
8
- /** The active Thru address, if connected. */
9
- readonly publicKey: string | null;
10
8
  /** Indicates whether the wallet has approved a Thru connection. */
11
9
  readonly connected: boolean;
12
10
  /**
@@ -29,9 +27,10 @@ declare const AddressType: {
29
27
  readonly THRU: "thru";
30
28
  };
31
29
  type AddressType = typeof AddressType[keyof typeof AddressType];
32
- interface WalletAddress {
33
- addressType: AddressType;
30
+ interface WalletAccount {
31
+ accountType: AddressType;
34
32
  address: string;
33
+ label: string;
35
34
  }
36
35
  interface AppMetadata {
37
36
  appId: string;
@@ -41,7 +40,7 @@ interface AppMetadata {
41
40
  }
42
41
  interface ConnectResult {
43
42
  walletId?: string;
44
- addresses: WalletAddress[];
43
+ accounts: WalletAccount[];
45
44
  status?: 'pending' | 'completed';
46
45
  metadata?: AppMetadata;
47
46
  }
@@ -62,4 +61,4 @@ interface SignMessageResult {
62
61
  publicKey: string;
63
62
  }
64
63
 
65
- export { AddressType, type AppMetadata, type ConnectResult, type ConnectedApp, type IThruChain, type SignMessageParams, type SignMessageResult, type WalletAddress };
64
+ export { AddressType, type AppMetadata, type ConnectResult, type ConnectedApp, type IThruChain, type SignMessageParams, type SignMessageResult, type WalletAccount };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"names":[],"mappings":";AAAO,IAAM,WAAA,GAAc;AAAA,EACzB,IAAA,EAAM;AACR","file":"index.js","sourcesContent":["export const AddressType = {\n THRU: 'thru',\n} as const;\n\nexport type AddressType = typeof AddressType[keyof typeof AddressType];\n\nexport interface WalletAddress {\n addressType: AddressType;\n address: string;\n}\n\nexport interface AppMetadata {\n appId: string;\n appName: string;\n appUrl: string;\n imageUrl?: string;\n}\n\nexport interface ConnectResult {\n walletId?: string;\n addresses: WalletAddress[];\n status?: 'pending' | 'completed';\n metadata?: AppMetadata;\n}\n\nexport interface ConnectedApp {\n accountId: number;\n appId: string;\n origin: string;\n metadata: AppMetadata;\n connectedAt: number;\n updatedAt: number;\n}\n\nexport interface SignMessageParams {\n message: string | Uint8Array;\n networkId: string;\n}\n\nexport interface SignMessageResult {\n signature: Uint8Array;\n publicKey: string;\n}\n"]}
1
+ {"version":3,"sources":["../src/types.ts"],"names":[],"mappings":";AAAO,IAAM,WAAA,GAAc;AAAA,EACzB,IAAA,EAAM;AACR","file":"index.js","sourcesContent":["export const AddressType = {\n THRU: 'thru',\n} as const;\n\nexport type AddressType = typeof AddressType[keyof typeof AddressType];\n\nexport interface WalletAccount {\n accountType: AddressType;\n address: string;\n label: string;\n}\n\nexport interface AppMetadata {\n appId: string;\n appName: string;\n appUrl: string;\n imageUrl?: string;\n}\n\nexport interface ConnectResult {\n walletId?: string;\n accounts: WalletAccount[];\n status?: 'pending' | 'completed';\n metadata?: AppMetadata;\n}\n\nexport interface ConnectedApp {\n accountId: number;\n appId: string;\n origin: string;\n metadata: AppMetadata;\n connectedAt: number;\n updatedAt: number;\n}\n\nexport interface SignMessageParams {\n message: string | Uint8Array;\n networkId: string;\n}\n\nexport interface SignMessageResult {\n signature: Uint8Array;\n publicKey: string;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thru/chain-interfaces",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/src/IThruChain.ts CHANGED
@@ -5,8 +5,6 @@
5
5
  * keeps the Surface area aligned with other chain adapters.
6
6
  */
7
7
  export interface IThruChain {
8
- /** The active Thru address, if connected. */
9
- readonly publicKey: string | null;
10
8
  /** Indicates whether the wallet has approved a Thru connection. */
11
9
  readonly connected: boolean;
12
10
 
package/src/types.ts CHANGED
@@ -4,9 +4,10 @@ export const AddressType = {
4
4
 
5
5
  export type AddressType = typeof AddressType[keyof typeof AddressType];
6
6
 
7
- export interface WalletAddress {
8
- addressType: AddressType;
7
+ export interface WalletAccount {
8
+ accountType: AddressType;
9
9
  address: string;
10
+ label: string;
10
11
  }
11
12
 
12
13
  export interface AppMetadata {
@@ -18,7 +19,7 @@ export interface AppMetadata {
18
19
 
19
20
  export interface ConnectResult {
20
21
  walletId?: string;
21
- addresses: WalletAddress[];
22
+ accounts: WalletAccount[];
22
23
  status?: 'pending' | 'completed';
23
24
  metadata?: AppMetadata;
24
25
  }