@injectivelabs/wallet-magic 1.16.11 → 1.16.13-alpha.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.
@@ -1,6 +1,7 @@
1
- import { TxRaw, DirectSignResponse, AminoSignResponse } from '@injectivelabs/sdk-ts';
2
- import { AccountAddress, EvmChainId } from '@injectivelabs/ts-types';
3
- import { StdSignDoc, MagicProvider, WalletDeviceType, BaseConcreteStrategy, BrowserEip1993Provider, ConcreteWalletStrategy, SendTransactionOptions } from '@injectivelabs/wallet-base';
1
+ import { MagicProvider, WalletDeviceType, BaseConcreteStrategy } from '@injectivelabs/wallet-base';
2
+ import type { AccountAddress, EvmChainId } from '@injectivelabs/ts-types';
3
+ import type { TxRaw, DirectSignResponse, AminoSignResponse } from '@injectivelabs/sdk-ts';
4
+ import type { StdSignDoc, BrowserEip1993Provider, ConcreteWalletStrategy, SendTransactionOptions } from '@injectivelabs/wallet-base';
4
5
  export declare class Magic extends BaseConcreteStrategy implements ConcreteWalletStrategy {
5
6
  provider: BrowserEip1993Provider | undefined;
6
7
  private magicWallet;
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Magic = void 0;
4
- /* eslint-disable class-methods-use-this */
5
- const exceptions_1 = require("@injectivelabs/exceptions");
6
4
  const magic_sdk_1 = require("magic-sdk");
7
- const sdk_ts_1 = require("@injectivelabs/sdk-ts");
8
5
  const oauth2_1 = require("@magic-ext/oauth2");
9
6
  const cosmos_1 = require("@magic-ext/cosmos");
7
+ const sdk_ts_1 = require("@injectivelabs/sdk-ts");
10
8
  const wallet_base_1 = require("@injectivelabs/wallet-base");
9
+ const exceptions_1 = require("@injectivelabs/exceptions");
11
10
  class Magic extends wallet_base_1.BaseConcreteStrategy {
12
11
  provider;
13
12
  magicWallet;
@@ -84,7 +83,6 @@ class Magic extends wallet_base_1.BaseConcreteStrategy {
84
83
  });
85
84
  }
86
85
  }
87
- // eslint-disable-next-line class-methods-use-this
88
86
  async getSessionOrConfirm(address) {
89
87
  return Promise.resolve(`0x${Buffer.from(`Confirmation for ${address} at time: ${Date.now()}`).toString('hex')}`);
90
88
  }
@@ -115,7 +113,6 @@ class Magic extends wallet_base_1.BaseConcreteStrategy {
115
113
  const signature = await magicWallet.cosmos.signTypedData(eip712json);
116
114
  return `0x${signature}`;
117
115
  }
118
- // eslint-disable-next-line class-methods-use-this
119
116
  async signCosmosTransaction(_transaction) {
120
117
  throw new exceptions_1.WalletException(new Error('This wallet does not support signing Cosmos transactions'), {
121
118
  code: exceptions_1.UnspecifiedErrorCode,
@@ -150,7 +147,6 @@ class Magic extends wallet_base_1.BaseConcreteStrategy {
150
147
  context: wallet_base_1.WalletAction.GetEvmTransactionReceipt,
151
148
  });
152
149
  }
153
- // eslint-disable-next-line class-methods-use-this
154
150
  async getPubKey() {
155
151
  throw new exceptions_1.WalletException(new Error('You can only fetch PubKey from Cosmos native wallets'));
156
152
  }
@@ -1,6 +1,7 @@
1
- import { TxRaw, DirectSignResponse, AminoSignResponse } from '@injectivelabs/sdk-ts';
2
- import { AccountAddress, EvmChainId } from '@injectivelabs/ts-types';
3
- import { StdSignDoc, MagicProvider, WalletDeviceType, BaseConcreteStrategy, BrowserEip1993Provider, ConcreteWalletStrategy, SendTransactionOptions } from '@injectivelabs/wallet-base';
1
+ import { MagicProvider, WalletDeviceType, BaseConcreteStrategy } from '@injectivelabs/wallet-base';
2
+ import type { AccountAddress, EvmChainId } from '@injectivelabs/ts-types';
3
+ import type { TxRaw, DirectSignResponse, AminoSignResponse } from '@injectivelabs/sdk-ts';
4
+ import type { StdSignDoc, BrowserEip1993Provider, ConcreteWalletStrategy, SendTransactionOptions } from '@injectivelabs/wallet-base';
4
5
  export declare class Magic extends BaseConcreteStrategy implements ConcreteWalletStrategy {
5
6
  provider: BrowserEip1993Provider | undefined;
6
7
  private magicWallet;
@@ -1,10 +1,9 @@
1
- /* eslint-disable class-methods-use-this */
2
- import { ErrorType, WalletException, UnspecifiedErrorCode, TransactionException, CosmosWalletException, } from '@injectivelabs/exceptions';
3
1
  import { Magic as MagicWallet } from 'magic-sdk';
4
- import { TxGrpcApi, } from '@injectivelabs/sdk-ts';
5
2
  import { OAuthExtension } from '@magic-ext/oauth2';
6
3
  import { CosmosExtension } from '@magic-ext/cosmos';
7
- import { WalletAction, MagicProvider, WalletDeviceType, BaseConcreteStrategy, } from '@injectivelabs/wallet-base';
4
+ import { TxGrpcApi } from '@injectivelabs/sdk-ts';
5
+ import { WalletAction, MagicProvider, WalletDeviceType, BaseConcreteStrategy } from '@injectivelabs/wallet-base';
6
+ import { ErrorType, WalletException, UnspecifiedErrorCode, TransactionException, CosmosWalletException, } from '@injectivelabs/exceptions';
8
7
  export class Magic extends BaseConcreteStrategy {
9
8
  provider;
10
9
  magicWallet;
@@ -81,7 +80,6 @@ export class Magic extends BaseConcreteStrategy {
81
80
  });
82
81
  }
83
82
  }
84
- // eslint-disable-next-line class-methods-use-this
85
83
  async getSessionOrConfirm(address) {
86
84
  return Promise.resolve(`0x${Buffer.from(`Confirmation for ${address} at time: ${Date.now()}`).toString('hex')}`);
87
85
  }
@@ -112,7 +110,6 @@ export class Magic extends BaseConcreteStrategy {
112
110
  const signature = await magicWallet.cosmos.signTypedData(eip712json);
113
111
  return `0x${signature}`;
114
112
  }
115
- // eslint-disable-next-line class-methods-use-this
116
113
  async signCosmosTransaction(_transaction) {
117
114
  throw new WalletException(new Error('This wallet does not support signing Cosmos transactions'), {
118
115
  code: UnspecifiedErrorCode,
@@ -147,7 +144,6 @@ export class Magic extends BaseConcreteStrategy {
147
144
  context: WalletAction.GetEvmTransactionReceipt,
148
145
  });
149
146
  }
150
- // eslint-disable-next-line class-methods-use-this
151
147
  async getPubKey() {
152
148
  throw new WalletException(new Error('You can only fetch PubKey from Cosmos native wallets'));
153
149
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@injectivelabs/wallet-magic",
3
3
  "description": "Magic wallet strategy for use with @injectivelabs/wallet-core.",
4
- "version": "1.16.11",
4
+ "version": "1.16.13-alpha.0",
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "author": {
@@ -56,11 +56,11 @@
56
56
  "start": "node dist/index.js"
57
57
  },
58
58
  "dependencies": {
59
- "@injectivelabs/exceptions": "1.16.11",
60
- "@injectivelabs/sdk-ts": "1.16.11",
61
- "@injectivelabs/ts-types": "1.16.11",
62
- "@injectivelabs/utils": "1.16.11",
63
- "@injectivelabs/wallet-base": "1.16.11",
59
+ "@injectivelabs/exceptions": "1.16.13-alpha.0",
60
+ "@injectivelabs/sdk-ts": "1.16.13-alpha.0",
61
+ "@injectivelabs/ts-types": "1.16.13-alpha.0",
62
+ "@injectivelabs/utils": "1.16.13-alpha.0",
63
+ "@injectivelabs/wallet-base": "1.16.13-alpha.0",
64
64
  "@magic-ext/cosmos": "23.9.1",
65
65
  "@magic-ext/oauth2": "9.9.0",
66
66
  "magic-sdk": "29.1.0"
@@ -68,7 +68,7 @@
68
68
  "devDependencies": {
69
69
  "shx": "^0.3.4"
70
70
  },
71
- "gitHead": "2fc52f1db9da90837e15543c9854367f33c5f5d1",
71
+ "gitHead": "bb71ac9147c0a2f0946ea0c316caf094fbbe2f2c",
72
72
  "typedoc": {
73
73
  "entryPoint": "./src/index.ts",
74
74
  "readmeFile": "./README.md",