@magic-sdk/provider 29.5.0-canary.912.16609029673.0 → 29.5.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.
@@ -3,6 +3,6 @@ export type { MagicSDKAdditionalConfiguration, MagicSDKExtensionsOption } from '
3
3
  export { createSDK } from './core/sdk-environment';
4
4
  export { ViewController } from './core/view-controller';
5
5
  export * from './core/sdk-exceptions';
6
- export { Extension } from './modules/base-extension';
6
+ export { Extension, MultichainExtension } from './modules/base-extension';
7
7
  export type { WithExtensions, InstanceWithExtensions } from './modules/base-extension';
8
8
  export * from './util';
@@ -3,7 +3,7 @@ import { BaseModule } from './base-module';
3
3
  import { SDKBase, MagicSDKAdditionalConfiguration, MagicSDKExtensionsOption } from '../core/sdk';
4
4
  import { MagicExtensionError, MagicExtensionWarning } from '../core/sdk-exceptions';
5
5
  import { createPromiEvent, encodeJSON, decodeJSON, storage, isPromiEvent } from '../util';
6
- export declare abstract class BaseExtension<TName extends string> extends BaseModule {
6
+ export declare abstract class BaseExtension<TName extends string, TConfig extends any = any> extends BaseModule {
7
7
  /**
8
8
  * A structure describing the platform and version compatibility of this
9
9
  * extension.
@@ -15,6 +15,7 @@ export declare abstract class BaseExtension<TName extends string> extends BaseMo
15
15
  '@magic-sdk/react-native-expo': boolean | string;
16
16
  };
17
17
  abstract readonly name: TName;
18
+ abstract readonly config: TConfig;
18
19
  private __sdk_access_field_descriptors__;
19
20
  private __is_initialized__;
20
21
  protected utils: {
@@ -76,6 +77,15 @@ export declare class Extension {
76
77
  */
77
78
  static Internal: typeof InternalExtension;
78
79
  }
80
+ /**
81
+ * Base class for multi-chain extensions, extracting getPublicAddress logic.
82
+ */
83
+ export declare abstract class MultichainExtension<TName extends string, TConfig extends any = any> extends InternalExtension<TName, TConfig> {
84
+ readonly config: TConfig;
85
+ readonly chain: string;
86
+ constructor(config: TConfig);
87
+ getPublicAddress<ResultType = any>(): Promise<ResultType>;
88
+ }
79
89
  /**
80
90
  * These fields are exposed on the `Extension` type,
81
91
  * but should be hidden from the public interface.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-sdk/provider",
3
- "version": "29.5.0-canary.912.16609029673.0",
3
+ "version": "29.5.0",
4
4
  "description": "Core business logic for Magic SDK packages.",
5
5
  "author": "Magic Labs <team@magic.link> (https://magic.link/)",
6
6
  "license": "MIT",
@@ -32,11 +32,11 @@
32
32
  "tslib": "^2.3.1"
33
33
  },
34
34
  "dependencies": {
35
- "@magic-sdk/types": "24.22.0-canary.912.16609029673.0",
35
+ "@magic-sdk/types": "^24.21.0",
36
36
  "eventemitter3": "^4.0.4"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "localforage": "^1.7.4"
40
40
  },
41
- "gitHead": "8f620b937f964107d220c610374b1123a2845acf"
41
+ "gitHead": "1ef062ea699d48d5e9a9375a93b7c147632b05ca"
42
42
  }