@injectivelabs/wallet-magic 1.16.38-alpha.2 → 1.16.38-alpha.3
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/cjs/index.cjs +4 -3
- package/dist/cjs/index.d.cts +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -1
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
let magic_sdk = require("magic-sdk");
|
|
2
2
|
let __magic_ext_oauth2 = require("@magic-ext/oauth2");
|
|
3
3
|
let __magic_ext_cosmos = require("@magic-ext/cosmos");
|
|
4
|
-
let
|
|
4
|
+
let __injectivelabs_sdk_ts_core_tx = require("@injectivelabs/sdk-ts/core/tx");
|
|
5
|
+
let __injectivelabs_sdk_ts_utils = require("@injectivelabs/sdk-ts/utils");
|
|
5
6
|
let __injectivelabs_wallet_base = require("@injectivelabs/wallet-base");
|
|
6
7
|
let __injectivelabs_exceptions = require("@injectivelabs/exceptions");
|
|
7
8
|
|
|
@@ -106,7 +107,7 @@ var Magic = class extends __injectivelabs_wallet_base.BaseConcreteStrategy {
|
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
async getSessionOrConfirm(address) {
|
|
109
|
-
return Promise.resolve(`0x${(0,
|
|
110
|
+
return Promise.resolve(`0x${(0, __injectivelabs_sdk_ts_utils.uint8ArrayToHex)((0, __injectivelabs_sdk_ts_utils.stringToUint8Array)(`Confirmation for ${address} at time: ${Date.now()}`))}`);
|
|
110
111
|
}
|
|
111
112
|
async sendEvmTransaction(_transaction, _options) {
|
|
112
113
|
throw new __injectivelabs_exceptions.CosmosWalletException(/* @__PURE__ */ new Error("sendEvmTransaction is not supported. Leap only supports sending cosmos transactions"), {
|
|
@@ -117,7 +118,7 @@ var Magic = class extends __injectivelabs_wallet_base.BaseConcreteStrategy {
|
|
|
117
118
|
async sendTransaction(transaction, options) {
|
|
118
119
|
const { endpoints, txTimeout } = options;
|
|
119
120
|
if (!endpoints) throw new __injectivelabs_exceptions.WalletException(/* @__PURE__ */ new Error("You have to pass endpoints.grpc within the options for using Magic wallet"));
|
|
120
|
-
const response = await new
|
|
121
|
+
const response = await new __injectivelabs_sdk_ts_core_tx.TxGrpcApi(endpoints.grpc).broadcast(transaction, { txTimeout });
|
|
121
122
|
if (response.code !== 0) throw new __injectivelabs_exceptions.TransactionException(new Error(response.rawLog), {
|
|
122
123
|
code: __injectivelabs_exceptions.UnspecifiedErrorCode,
|
|
123
124
|
contextCode: response.code,
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseConcreteStrategy, BrowserEip1993Provider, ConcreteWalletStrategy, MagicProvider, SendTransactionOptions, StdSignDoc, WalletDeviceType } from "@injectivelabs/wallet-base";
|
|
2
2
|
import { AccountAddress, EvmChainId } from "@injectivelabs/ts-types";
|
|
3
|
-
import { AminoSignResponse, DirectSignResponse, TxRaw } from "@injectivelabs/sdk-ts";
|
|
3
|
+
import { AminoSignResponse, DirectSignResponse, TxRaw } from "@injectivelabs/sdk-ts/types";
|
|
4
4
|
|
|
5
5
|
//#region src/strategy/strategy.d.ts
|
|
6
6
|
declare class Magic extends BaseConcreteStrategy implements ConcreteWalletStrategy {
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AminoSignResponse, DirectSignResponse, TxRaw } from "@injectivelabs/sdk-ts";
|
|
2
1
|
import { BaseConcreteStrategy, BrowserEip1993Provider, ConcreteWalletStrategy, MagicProvider, SendTransactionOptions, StdSignDoc, WalletDeviceType } from "@injectivelabs/wallet-base";
|
|
3
2
|
import { AccountAddress, EvmChainId } from "@injectivelabs/ts-types";
|
|
3
|
+
import { AminoSignResponse, DirectSignResponse, TxRaw } from "@injectivelabs/sdk-ts/types";
|
|
4
4
|
|
|
5
5
|
//#region src/strategy/strategy.d.ts
|
|
6
6
|
declare class Magic extends BaseConcreteStrategy implements ConcreteWalletStrategy {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Magic as Magic$1 } from "magic-sdk";
|
|
2
2
|
import { OAuthExtension } from "@magic-ext/oauth2";
|
|
3
3
|
import { CosmosExtension } from "@magic-ext/cosmos";
|
|
4
|
-
import { TxGrpcApi
|
|
4
|
+
import { TxGrpcApi } from "@injectivelabs/sdk-ts/core/tx";
|
|
5
|
+
import { stringToUint8Array, uint8ArrayToHex } from "@injectivelabs/sdk-ts/utils";
|
|
5
6
|
import { BaseConcreteStrategy, MagicProvider, WalletAction, WalletDeviceType } from "@injectivelabs/wallet-base";
|
|
6
7
|
import { CosmosWalletException, ErrorType, TransactionException, UnspecifiedErrorCode, WalletException } from "@injectivelabs/exceptions";
|
|
7
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-magic",
|
|
3
|
-
"version": "1.16.38-alpha.
|
|
3
|
+
"version": "1.16.38-alpha.3",
|
|
4
4
|
"description": "Magic wallet strategy for use with @injectivelabs/wallet-core.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@magic-ext/cosmos": "23.9.1",
|
|
42
42
|
"@magic-ext/oauth2": "9.9.0",
|
|
43
43
|
"magic-sdk": "29.1.0",
|
|
44
|
-
"@injectivelabs/exceptions": "1.16.38-alpha.
|
|
45
|
-
"@injectivelabs/sdk-ts": "1.16.38-alpha.2",
|
|
44
|
+
"@injectivelabs/exceptions": "1.16.38-alpha.2",
|
|
46
45
|
"@injectivelabs/ts-types": "1.16.38-alpha.1",
|
|
47
|
-
"@injectivelabs/
|
|
48
|
-
"@injectivelabs/
|
|
46
|
+
"@injectivelabs/sdk-ts": "1.16.38-alpha.3",
|
|
47
|
+
"@injectivelabs/utils": "1.16.38-alpha.2",
|
|
48
|
+
"@injectivelabs/wallet-base": "1.16.38-alpha.3"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|