@injectivelabs/wallet-magic 1.16.7 → 1.16.8-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.
package/README.md CHANGED
@@ -13,7 +13,7 @@ _Package to use Magic Wallets on Injective via the wallet strategy._
13
13
  ## 📚 Installation
14
14
 
15
15
  ```bash
16
- yarn add @injectivelabs/wallet-magic
16
+ pnpm add @injectivelabs/wallet-magic
17
17
  ```
18
18
 
19
19
  ---
@@ -30,10 +30,9 @@ dependencies and implementations for their specific wallets.
30
30
  Here's a brief example of how to use this package to send 1 INJ.:
31
31
 
32
32
  ```typescript
33
- import { Wallet } from '@injectivelabs/wallet-base';
34
- import { BaseWalletStrategy, MsgBroadcaster } from '@injectivelabs/wallet-core';
35
- import { MagicStrategy } from '@injectivelabs/wallet-magic';
36
-
33
+ import { Wallet } from '@injectivelabs/wallet-base'
34
+ import { BaseWalletStrategy, MsgBroadcaster } from '@injectivelabs/wallet-core'
35
+ import { MagicStrategy } from '@injectivelabs/wallet-magic'
37
36
 
38
37
  const strategyArgs: WalletStrategyArguments = {
39
38
  chainId: ChainId.Mainnet,
@@ -42,8 +41,8 @@ const strategyArgs: WalletStrategyArguments = {
42
41
  [Wallet.Magic]: new MagicStrategy({
43
42
  chainId: ChainId.Mainnet,
44
43
  metadata: {
45
- apiKey: 'YOUR_MAGIC_API_KEY'
46
- }
44
+ apiKey: 'YOUR_MAGIC_API_KEY',
45
+ },
47
46
  }),
48
47
  },
49
48
  }
@@ -56,21 +55,21 @@ const msgBroadcaster = new MsgBroadcaster({
56
55
  })
57
56
 
58
57
  const sendTX = async () => {
59
- const injectiveAddress = 'someInjectiveAddress'
60
-
61
- const message = MsgSend.fromJSON({
62
- srcInjectiveAddress: injectiveAddress,
63
- dstInjectiveAddress: injectiveAddress,
64
- amount: {
65
- amount: '1',
66
- denom: 'inj',
67
- },
68
- })
69
-
70
- return await msgBroadcaster.broadcast({ msgs: message })
71
- }
58
+ const injectiveAddress = 'someInjectiveAddress'
59
+
60
+ const message = MsgSend.fromJSON({
61
+ srcInjectiveAddress: injectiveAddress,
62
+ dstInjectiveAddress: injectiveAddress,
63
+ amount: {
64
+ amount: '1',
65
+ denom: 'inj',
66
+ },
67
+ })
68
+
69
+ return await msgBroadcaster.broadcast({ msgs: message })
70
+ }
72
71
 
73
- const result = await sendTX()
72
+ const result = await sendTX()
74
73
  ```
75
74
 
76
75
  Read more and find example usages on our [WalletStrategy Docs](https://docs.ts.injective.network/wallet/wallet-wallet-strategy)
@@ -1,5 +1,5 @@
1
1
  import { TxRaw, DirectSignResponse, AminoSignResponse } from '@injectivelabs/sdk-ts';
2
- import { AccountAddress, EthereumChainId } from '@injectivelabs/ts-types';
2
+ import { AccountAddress, EvmChainId } from '@injectivelabs/ts-types';
3
3
  import { StdSignDoc, MagicProvider, WalletDeviceType, BaseConcreteStrategy, BrowserEip1993Provider, ConcreteWalletStrategy, SendTransactionOptions } from '@injectivelabs/wallet-base';
4
4
  export declare class Magic extends BaseConcreteStrategy implements ConcreteWalletStrategy {
5
5
  provider: BrowserEip1993Provider | undefined;
@@ -18,7 +18,7 @@ export declare class Magic extends BaseConcreteStrategy implements ConcreteWalle
18
18
  getSessionOrConfirm(address: AccountAddress): Promise<string>;
19
19
  sendEvmTransaction(_transaction: unknown, _options: {
20
20
  address: AccountAddress;
21
- ethereumChainId: EthereumChainId;
21
+ evmChainId: EvmChainId;
22
22
  }): Promise<string>;
23
23
  sendTransaction(transaction: TxRaw, options: SendTransactionOptions): Promise<any>;
24
24
  signEip712TypedData(eip712json: string, _address: AccountAddress): Promise<string>;
@@ -1,5 +1,5 @@
1
1
  import { TxRaw, DirectSignResponse, AminoSignResponse } from '@injectivelabs/sdk-ts';
2
- import { AccountAddress, EthereumChainId } from '@injectivelabs/ts-types';
2
+ import { AccountAddress, EvmChainId } from '@injectivelabs/ts-types';
3
3
  import { StdSignDoc, MagicProvider, WalletDeviceType, BaseConcreteStrategy, BrowserEip1993Provider, ConcreteWalletStrategy, SendTransactionOptions } from '@injectivelabs/wallet-base';
4
4
  export declare class Magic extends BaseConcreteStrategy implements ConcreteWalletStrategy {
5
5
  provider: BrowserEip1993Provider | undefined;
@@ -18,7 +18,7 @@ export declare class Magic extends BaseConcreteStrategy implements ConcreteWalle
18
18
  getSessionOrConfirm(address: AccountAddress): Promise<string>;
19
19
  sendEvmTransaction(_transaction: unknown, _options: {
20
20
  address: AccountAddress;
21
- ethereumChainId: EthereumChainId;
21
+ evmChainId: EvmChainId;
22
22
  }): Promise<string>;
23
23
  sendTransaction(transaction: TxRaw, options: SendTransactionOptions): Promise<any>;
24
24
  signEip712TypedData(eip712json: string, _address: AccountAddress): Promise<string>;
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.7",
4
+ "version": "1.16.8-alpha.0",
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "author": {
@@ -41,10 +41,10 @@
41
41
  }
42
42
  },
43
43
  "scripts": {
44
- "build": "yarn build:cjs && yarn build:esm && yarn build:post",
44
+ "build": "pnpm build:cjs && pnpm build:esm && pnpm build:post",
45
45
  "build:cjs": "tsc --build --force tsconfig.build.json",
46
46
  "build:esm": "tsc --build --force tsconfig.build.esm.json",
47
- "build:watch": "tsc --build -w tsconfig.build.json && tsc -w --build tsconfig.build.esm.json && yarn build:post",
47
+ "build:watch": "tsc --build -w tsconfig.build.json && tsc -w --build tsconfig.build.esm.json && pnpm build:post",
48
48
  "build:post": "shx cp ../../../etc/stub/package.json.stub dist/cjs/package.json && shx cp ../../../etc/stub/package.esm.json.stub dist/esm/package.json",
49
49
  "clean": "tsc --build tsconfig.build.json --clean && tsc --build tsconfig.build.esm.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache && shx mkdir -p dist",
50
50
  "test": "jest",
@@ -56,16 +56,19 @@
56
56
  "start": "node dist/index.js"
57
57
  },
58
58
  "dependencies": {
59
- "@injectivelabs/exceptions": "^1.16.7",
60
- "@injectivelabs/sdk-ts": "^1.16.7",
61
- "@injectivelabs/ts-types": "^1.16.7",
62
- "@injectivelabs/utils": "^1.16.7",
63
- "@injectivelabs/wallet-base": "^1.16.7",
64
- "@magic-ext/cosmos": "24.4.0",
65
- "@magic-ext/oauth2": "11.4.0",
66
- "magic-sdk": "29.4.0"
59
+ "@injectivelabs/exceptions": "1.16.6-alpha.1",
60
+ "@injectivelabs/sdk-ts": "1.16.8-alpha.0",
61
+ "@injectivelabs/ts-types": "1.16.8-alpha.0",
62
+ "@injectivelabs/utils": "1.16.8-alpha.0",
63
+ "@injectivelabs/wallet-base": "1.16.8-alpha.0",
64
+ "@magic-ext/cosmos": "23.9.1",
65
+ "@magic-ext/oauth2": "9.9.0",
66
+ "magic-sdk": "29.1.0"
67
67
  },
68
- "gitHead": "78f656ef404ef511dfe6e4cc9defcae0a7cbec76",
68
+ "devDependencies": {
69
+ "shx": "^0.3.4"
70
+ },
71
+ "gitHead": "8b14637d4e2373c1e753718ffd5a0db67fee6201",
69
72
  "typedoc": {
70
73
  "entryPoint": "./src/index.ts",
71
74
  "readmeFile": "./README.md",