@injectivelabs/wallet-base 1.15.0 → 1.15.1
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/base.d.ts +8 -0
- package/dist/cjs/base.js +15 -0
- package/dist/cjs/base.js.map +1 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +25 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/types/enums.d.ts +52 -0
- package/dist/cjs/types/enums.js +50 -0
- package/dist/cjs/types/enums.js.map +1 -0
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/cjs/types/index.js +20 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/cjs/types/provider.d.ts +21 -0
- package/dist/cjs/types/provider.js +3 -0
- package/dist/cjs/types/provider.js.map +1 -0
- package/dist/cjs/types/strategy.d.ts +202 -0
- package/dist/cjs/types/strategy.js +3 -0
- package/dist/cjs/types/strategy.js.map +1 -0
- package/dist/cjs/utils/address.d.ts +2 -0
- package/dist/cjs/utils/address.js +31 -0
- package/dist/cjs/utils/address.js.map +1 -0
- package/dist/cjs/utils/alchemy.d.ts +1 -0
- package/dist/cjs/utils/alchemy.js +12 -0
- package/dist/cjs/utils/alchemy.js.map +1 -0
- package/dist/cjs/utils/constants.d.ts +6 -0
- package/dist/cjs/utils/constants.js +10 -0
- package/dist/cjs/utils/constants.js.map +1 -0
- package/dist/cjs/utils/cosmos.d.ts +2 -0
- package/dist/cjs/utils/cosmos.js +14 -0
- package/dist/cjs/utils/cosmos.js.map +1 -0
- package/dist/cjs/utils/index.d.ts +6 -0
- package/dist/cjs/utils/index.js +23 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/tx.d.ts +31 -0
- package/dist/cjs/utils/tx.js +15 -0
- package/dist/cjs/utils/tx.js.map +1 -0
- package/dist/cjs/utils/wallet.d.ts +7 -0
- package/dist/cjs/utils/wallet.js +48 -0
- package/dist/cjs/utils/wallet.js.map +1 -0
- package/dist/esm/base.d.ts +8 -0
- package/dist/esm/base.js +12 -0
- package/dist/esm/base.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/types/enums.d.ts +52 -0
- package/dist/esm/types/enums.js +47 -0
- package/dist/esm/types/enums.js.map +1 -0
- package/dist/esm/types/index.d.ts +3 -0
- package/dist/esm/types/index.js +4 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/provider.d.ts +21 -0
- package/dist/esm/types/provider.js +2 -0
- package/dist/esm/types/provider.js.map +1 -0
- package/dist/esm/types/strategy.d.ts +202 -0
- package/dist/esm/types/strategy.js +2 -0
- package/dist/esm/types/strategy.js.map +1 -0
- package/dist/esm/utils/address.d.ts +2 -0
- package/dist/esm/utils/address.js +26 -0
- package/dist/esm/utils/address.js.map +1 -0
- package/dist/esm/utils/alchemy.d.ts +1 -0
- package/dist/esm/utils/alchemy.js +8 -0
- package/dist/esm/utils/alchemy.js.map +1 -0
- package/dist/esm/utils/constants.d.ts +6 -0
- package/dist/esm/utils/constants.js +7 -0
- package/dist/esm/utils/constants.js.map +1 -0
- package/dist/esm/utils/cosmos.d.ts +2 -0
- package/dist/esm/utils/cosmos.js +10 -0
- package/dist/esm/utils/cosmos.js.map +1 -0
- package/dist/esm/utils/index.d.ts +6 -0
- package/dist/esm/utils/index.js +7 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/tx.d.ts +31 -0
- package/dist/esm/utils/tx.js +11 -0
- package/dist/esm/utils/tx.js.map +1 -0
- package/dist/esm/utils/wallet.d.ts +7 -0
- package/dist/esm/utils/wallet.js +39 -0
- package/dist/esm/utils/wallet.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChainId, CosmosChainId, EthereumChainId } from '@injectivelabs/ts-types';
|
|
2
|
+
import { WalletEventListener, ConcreteWalletStrategyArgs, ConcreteCosmosWalletStrategyArgs, ConcreteEthereumWalletStrategyArgs } from './types/index.js';
|
|
3
|
+
export default abstract class BaseConcreteStrategy {
|
|
4
|
+
protected chainId: ChainId | CosmosChainId;
|
|
5
|
+
protected ethereumChainId?: EthereumChainId;
|
|
6
|
+
protected listeners: Partial<Record<WalletEventListener, any>>;
|
|
7
|
+
protected constructor(args: ConcreteWalletStrategyArgs | ConcreteEthereumWalletStrategyArgs | ConcreteCosmosWalletStrategyArgs);
|
|
8
|
+
}
|
package/dist/cjs/base.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class BaseConcreteStrategy {
|
|
4
|
+
chainId;
|
|
5
|
+
ethereumChainId;
|
|
6
|
+
listeners = {};
|
|
7
|
+
constructor(args) {
|
|
8
|
+
this.ethereumChainId = 'ethereumOptions' in args && args.ethereumOptions
|
|
9
|
+
? args.ethereumOptions.ethereumChainId
|
|
10
|
+
: undefined;
|
|
11
|
+
this.chainId = args.chainId;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.default = BaseConcreteStrategy;
|
|
15
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/base.ts"],"names":[],"mappings":";;AAQA,MAA8B,oBAAoB;IACtC,OAAO,CAAyB;IAEhC,eAAe,CAAkB;IAEjC,SAAS,GAA8C,EAAE,CAAA;IAEnE,YAAsB,IAAwG;QAC5H,IAAI,CAAC,eAAe,GAAG,iBAAiB,IAAI,IAAI,IAAI,IAAI,CAAC,eAAe;YACtE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,eAAe;YACtC,CAAC,CAAC,SAAS,CAAA;QACb,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;IAC7B,CAAC;CACF;AAbD,uCAaC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.BaseConcreteStrategy = void 0;
|
|
21
|
+
__exportStar(require("./types/index.js"), exports);
|
|
22
|
+
__exportStar(require("./utils/index.js"), exports);
|
|
23
|
+
var base_js_1 = require("./base.js");
|
|
24
|
+
Object.defineProperty(exports, "BaseConcreteStrategy", { enumerable: true, get: function () { return __importDefault(base_js_1).default; } });
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,mDAAgC;AAChC,qCAA2D;AAAlD,gIAAA,OAAO,OAAwB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { WalletErrorActionModule } from '@injectivelabs/exceptions';
|
|
2
|
+
export declare enum Wallet {
|
|
3
|
+
Leap = "leap",
|
|
4
|
+
Keplr = "keplr",
|
|
5
|
+
Ninji = "ninji",
|
|
6
|
+
Magic = "magic",
|
|
7
|
+
Ledger = "ledger",
|
|
8
|
+
BitGet = "BitGet",
|
|
9
|
+
OWallet = "owallet",
|
|
10
|
+
Phantom = "phantom",
|
|
11
|
+
Metamask = "metamask",
|
|
12
|
+
OkxWallet = "okx-wallet",
|
|
13
|
+
TrustWallet = "trust-wallet",
|
|
14
|
+
PrivateKey = "private-key",
|
|
15
|
+
TrezorBip32 = "trezor-bip32",
|
|
16
|
+
TrezorBip44 = "trezor-bip44",
|
|
17
|
+
Cosmostation = "cosmostation",
|
|
18
|
+
LedgerCosmos = "ledger-cosmos",
|
|
19
|
+
LedgerLegacy = "ledger-legacy",
|
|
20
|
+
WalletConnect = "wallet-connect",
|
|
21
|
+
CosmostationEth = "cosmostation-eth"
|
|
22
|
+
}
|
|
23
|
+
export declare enum MagicProvider {
|
|
24
|
+
Email = "email",
|
|
25
|
+
Apple = "apple",
|
|
26
|
+
Github = "github",
|
|
27
|
+
Google = "google",
|
|
28
|
+
Discord = "discord",
|
|
29
|
+
Twitter = "twitter",
|
|
30
|
+
Facebook = "facebook"
|
|
31
|
+
}
|
|
32
|
+
export declare enum WalletDeviceType {
|
|
33
|
+
Mobile = "mobile",
|
|
34
|
+
Other = "other",
|
|
35
|
+
Browser = "browser",
|
|
36
|
+
Hardware = "hardware"
|
|
37
|
+
}
|
|
38
|
+
export declare enum WalletEventListener {
|
|
39
|
+
AccountChange = "account-change",
|
|
40
|
+
ChainIdChange = "chain-id-change"
|
|
41
|
+
}
|
|
42
|
+
export declare const WalletAction: {
|
|
43
|
+
SignTransaction: WalletErrorActionModule.SignTransaction;
|
|
44
|
+
SignEthereumTransaction: WalletErrorActionModule.SignEthereumTransaction;
|
|
45
|
+
SendTransaction: WalletErrorActionModule.SendTransaction;
|
|
46
|
+
SendEthereumTransaction: WalletErrorActionModule.SendEthereumTransaction;
|
|
47
|
+
SignArbitrary: WalletErrorActionModule.SignArbitrary;
|
|
48
|
+
GetAccounts: WalletErrorActionModule.GetAccounts;
|
|
49
|
+
GetNetworkId: WalletErrorActionModule.GetNetworkId;
|
|
50
|
+
GetChainId: WalletErrorActionModule.GetChainId;
|
|
51
|
+
GetEthereumTransactionReceipt: WalletErrorActionModule.GetEthereumTransactionReceipt;
|
|
52
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletAction = exports.WalletEventListener = exports.WalletDeviceType = exports.MagicProvider = exports.Wallet = void 0;
|
|
4
|
+
const exceptions_1 = require("@injectivelabs/exceptions");
|
|
5
|
+
var Wallet;
|
|
6
|
+
(function (Wallet) {
|
|
7
|
+
Wallet["Leap"] = "leap";
|
|
8
|
+
Wallet["Keplr"] = "keplr";
|
|
9
|
+
Wallet["Ninji"] = "ninji";
|
|
10
|
+
Wallet["Magic"] = "magic";
|
|
11
|
+
Wallet["Ledger"] = "ledger";
|
|
12
|
+
Wallet["BitGet"] = "BitGet";
|
|
13
|
+
Wallet["OWallet"] = "owallet";
|
|
14
|
+
Wallet["Phantom"] = "phantom";
|
|
15
|
+
Wallet["Metamask"] = "metamask";
|
|
16
|
+
Wallet["OkxWallet"] = "okx-wallet";
|
|
17
|
+
Wallet["TrustWallet"] = "trust-wallet";
|
|
18
|
+
Wallet["PrivateKey"] = "private-key";
|
|
19
|
+
Wallet["TrezorBip32"] = "trezor-bip32";
|
|
20
|
+
Wallet["TrezorBip44"] = "trezor-bip44";
|
|
21
|
+
Wallet["Cosmostation"] = "cosmostation";
|
|
22
|
+
Wallet["LedgerCosmos"] = "ledger-cosmos";
|
|
23
|
+
Wallet["LedgerLegacy"] = "ledger-legacy";
|
|
24
|
+
Wallet["WalletConnect"] = "wallet-connect";
|
|
25
|
+
Wallet["CosmostationEth"] = "cosmostation-eth";
|
|
26
|
+
})(Wallet || (exports.Wallet = Wallet = {}));
|
|
27
|
+
var MagicProvider;
|
|
28
|
+
(function (MagicProvider) {
|
|
29
|
+
MagicProvider["Email"] = "email";
|
|
30
|
+
MagicProvider["Apple"] = "apple";
|
|
31
|
+
MagicProvider["Github"] = "github";
|
|
32
|
+
MagicProvider["Google"] = "google";
|
|
33
|
+
MagicProvider["Discord"] = "discord";
|
|
34
|
+
MagicProvider["Twitter"] = "twitter";
|
|
35
|
+
MagicProvider["Facebook"] = "facebook";
|
|
36
|
+
})(MagicProvider || (exports.MagicProvider = MagicProvider = {}));
|
|
37
|
+
var WalletDeviceType;
|
|
38
|
+
(function (WalletDeviceType) {
|
|
39
|
+
WalletDeviceType["Mobile"] = "mobile";
|
|
40
|
+
WalletDeviceType["Other"] = "other";
|
|
41
|
+
WalletDeviceType["Browser"] = "browser";
|
|
42
|
+
WalletDeviceType["Hardware"] = "hardware";
|
|
43
|
+
})(WalletDeviceType || (exports.WalletDeviceType = WalletDeviceType = {}));
|
|
44
|
+
var WalletEventListener;
|
|
45
|
+
(function (WalletEventListener) {
|
|
46
|
+
WalletEventListener["AccountChange"] = "account-change";
|
|
47
|
+
WalletEventListener["ChainIdChange"] = "chain-id-change";
|
|
48
|
+
})(WalletEventListener || (exports.WalletEventListener = WalletEventListener = {}));
|
|
49
|
+
exports.WalletAction = { ...exceptions_1.WalletErrorActionModule };
|
|
50
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/types/enums.ts"],"names":[],"mappings":";;;AAAA,0DAAmE;AAEnE,IAAY,MAoBX;AApBD,WAAY,MAAM;IAChB,uBAAa,CAAA;IACb,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;IACjB,6BAAmB,CAAA;IACnB,6BAAmB,CAAA;IACnB,+BAAqB,CAAA;IACrB,kCAAwB,CAAA;IACxB,sCAA4B,CAAA;IAC5B,oCAA0B,CAAA;IAC1B,sCAA4B,CAAA;IAC5B,sCAA4B,CAAA;IAC5B,uCAA6B,CAAA;IAC7B,wCAA8B,CAAA;IAC9B,wCAA8B,CAAA;IAC9B,0CAAgC,CAAA;IAChC,8CAAoC,CAAA;AACtC,CAAC,EApBW,MAAM,sBAAN,MAAM,QAoBjB;AAED,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;AACvB,CAAC,EARW,aAAa,6BAAb,aAAa,QAQxB;AAED,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;AACvB,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B;AAED,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,uDAAgC,CAAA;IAChC,wDAAiC,CAAA;AACnC,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAEY,QAAA,YAAY,GAAG,EAAE,GAAG,oCAAuB,EAAE,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enums.js"), exports);
|
|
18
|
+
__exportStar(require("./strategy.js"), exports);
|
|
19
|
+
__exportStar(require("./provider.js"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA0B;AAC1B,gDAA6B;AAC7B,gDAA6B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type EIP1193Provider } from 'eip1193-provider';
|
|
2
|
+
export interface BrowserEip1993Provider extends EIP1193Provider {
|
|
3
|
+
removeAllListeners(): void;
|
|
4
|
+
isMetaMask: boolean;
|
|
5
|
+
isTrustWallet: boolean;
|
|
6
|
+
isTrust: boolean;
|
|
7
|
+
isOkxWallet: boolean;
|
|
8
|
+
isPhantom: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface WindowWithEip1193Provider extends Window {
|
|
11
|
+
ethereum: BrowserEip1993Provider;
|
|
12
|
+
okxwallet: BrowserEip1993Provider;
|
|
13
|
+
bitkeep: {
|
|
14
|
+
ethereum: BrowserEip1993Provider;
|
|
15
|
+
};
|
|
16
|
+
providers: BrowserEip1993Provider[];
|
|
17
|
+
trustWallet?: BrowserEip1993Provider;
|
|
18
|
+
phantom?: {
|
|
19
|
+
ethereum?: BrowserEip1993Provider;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/types/provider.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { ChainId, CosmosChainId, AccountAddress, EthereumChainId } from '@injectivelabs/ts-types';
|
|
2
|
+
import type { TxRaw, TxResponse, AminoSignResponse, DirectSignResponse } from '@injectivelabs/sdk-ts';
|
|
3
|
+
import { StdSignDoc } from '@keplr-wallet/types';
|
|
4
|
+
import { WalletDeviceType, Wallet } from './enums.js';
|
|
5
|
+
export type onAccountChangeCallback = (account: string | string[]) => void;
|
|
6
|
+
export type onChainIdChangeCallback = () => void;
|
|
7
|
+
export type CosmosWalletAbstraction = {
|
|
8
|
+
enableGasCheck?(chainId: ChainId): Promise<void> | void;
|
|
9
|
+
disableGasCheck?(chainId: ChainId): Promise<void> | void;
|
|
10
|
+
signEIP712CosmosTx(args: {
|
|
11
|
+
signDoc: StdSignDoc;
|
|
12
|
+
eip712: any;
|
|
13
|
+
}): Promise<AminoSignResponse>;
|
|
14
|
+
};
|
|
15
|
+
export type MagicMetadata = {
|
|
16
|
+
apiKey?: string;
|
|
17
|
+
rpcEndpoint?: string;
|
|
18
|
+
};
|
|
19
|
+
export type WalletConnectMetadata = Record<string, string | Record<string, string> | Record<string, string[]>>;
|
|
20
|
+
export interface WalletStrategyEthereumOptions {
|
|
21
|
+
ethereumChainId: EthereumChainId;
|
|
22
|
+
rpcUrl?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SendTransactionOptions {
|
|
25
|
+
address: string;
|
|
26
|
+
chainId: ChainId;
|
|
27
|
+
txTimeout?: number;
|
|
28
|
+
endpoints: {
|
|
29
|
+
rest: string;
|
|
30
|
+
grpc: string;
|
|
31
|
+
tm?: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface ConcreteWalletStrategyOptions {
|
|
35
|
+
privateKey?: string;
|
|
36
|
+
metadata?: Record<string, string | Record<string, string>>;
|
|
37
|
+
}
|
|
38
|
+
export interface ConcreteWalletStrategyArgs {
|
|
39
|
+
chainId: ChainId;
|
|
40
|
+
options?: ConcreteWalletStrategyOptions;
|
|
41
|
+
}
|
|
42
|
+
export interface ConcreteCosmosWalletStrategyArgs {
|
|
43
|
+
chainId: CosmosChainId | ChainId;
|
|
44
|
+
wallet?: Wallet;
|
|
45
|
+
options?: ConcreteWalletStrategyOptions;
|
|
46
|
+
}
|
|
47
|
+
export interface ConcreteEthereumWalletStrategyArgs extends ConcreteWalletStrategyArgs {
|
|
48
|
+
ethereumOptions: WalletStrategyEthereumOptions;
|
|
49
|
+
}
|
|
50
|
+
export interface ConcreteCosmosWalletStrategy {
|
|
51
|
+
/**
|
|
52
|
+
* The accounts from the wallet (addresses)
|
|
53
|
+
*/
|
|
54
|
+
getAddresses(args?: unknown): Promise<string[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Return the WalletDeviceType connected on the
|
|
57
|
+
* wallet provider (extension, mobile, hardware wallet)
|
|
58
|
+
*/
|
|
59
|
+
getWalletDeviceType(): Promise<WalletDeviceType>;
|
|
60
|
+
/**
|
|
61
|
+
* Get the PubKey from the wallet
|
|
62
|
+
* in base64 for Cosmos native wallets
|
|
63
|
+
*/
|
|
64
|
+
getPubKey(address?: string): Promise<string>;
|
|
65
|
+
/**
|
|
66
|
+
* Perform validations and checks
|
|
67
|
+
* for the wallet (if the chain is supported, etc)
|
|
68
|
+
*/
|
|
69
|
+
enable(args?: unknown): Promise<boolean>;
|
|
70
|
+
/**
|
|
71
|
+
* Sends Cosmos transaction. Returns a transaction hash
|
|
72
|
+
* @param transaction should implement TransactionConfig
|
|
73
|
+
* @param options
|
|
74
|
+
*/
|
|
75
|
+
sendTransaction(transaction: DirectSignResponse | TxRaw, options: SendTransactionOptions): Promise<TxResponse>;
|
|
76
|
+
signCosmosTransaction(transaction: {
|
|
77
|
+
txRaw: TxRaw;
|
|
78
|
+
chainId: string;
|
|
79
|
+
accountNumber: number;
|
|
80
|
+
address: string;
|
|
81
|
+
}): Promise<DirectSignResponse>;
|
|
82
|
+
signAminoTransaction(transaction: {
|
|
83
|
+
stdSignDoc: StdSignDoc;
|
|
84
|
+
address: string;
|
|
85
|
+
}): Promise<AminoSignResponse>;
|
|
86
|
+
}
|
|
87
|
+
export type ConcreteStrategiesArg = {
|
|
88
|
+
[key in Wallet]?: ConcreteWalletStrategy;
|
|
89
|
+
};
|
|
90
|
+
export interface WalletStrategyArguments {
|
|
91
|
+
chainId: ChainId;
|
|
92
|
+
options?: ConcreteWalletStrategyOptions;
|
|
93
|
+
ethereumOptions?: WalletStrategyEthereumOptions;
|
|
94
|
+
disabledWallets?: Wallet[];
|
|
95
|
+
wallet?: Wallet;
|
|
96
|
+
strategies: ConcreteStrategiesArg;
|
|
97
|
+
}
|
|
98
|
+
export interface ConcreteWalletStrategy extends Omit<ConcreteCosmosWalletStrategy, 'sendTransaction' | 'isChainIdSupported' | 'signAminoTransaction'> {
|
|
99
|
+
/**
|
|
100
|
+
* Sends Cosmos transaction. Returns a transaction hash
|
|
101
|
+
* @param transaction should implement TransactionConfig
|
|
102
|
+
* @param options
|
|
103
|
+
*/
|
|
104
|
+
sendTransaction(transaction: DirectSignResponse | TxRaw, options: {
|
|
105
|
+
address: string;
|
|
106
|
+
chainId: ChainId;
|
|
107
|
+
txTimeout?: number;
|
|
108
|
+
endpoints?: {
|
|
109
|
+
rest: string;
|
|
110
|
+
grpc: string;
|
|
111
|
+
tm?: string;
|
|
112
|
+
};
|
|
113
|
+
}): Promise<TxResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Confirm the address on the wallet
|
|
116
|
+
* @param address address
|
|
117
|
+
*/
|
|
118
|
+
getSessionOrConfirm(address?: string): Promise<string>;
|
|
119
|
+
/**
|
|
120
|
+
* Sends Ethereum transaction. Returns a transaction hash
|
|
121
|
+
* @param transaction should implement TransactionConfig
|
|
122
|
+
* @param options
|
|
123
|
+
*/
|
|
124
|
+
sendEthereumTransaction(transaction: unknown, options: {
|
|
125
|
+
address: string;
|
|
126
|
+
ethereumChainId: EthereumChainId;
|
|
127
|
+
}): Promise<string>;
|
|
128
|
+
/**
|
|
129
|
+
* Sign a cosmos transaction using the wallet provider
|
|
130
|
+
*
|
|
131
|
+
* @param transaction
|
|
132
|
+
* @param address - injective address
|
|
133
|
+
*/
|
|
134
|
+
signCosmosTransaction(transaction: {
|
|
135
|
+
txRaw: TxRaw;
|
|
136
|
+
accountNumber: number;
|
|
137
|
+
chainId: string;
|
|
138
|
+
address: string;
|
|
139
|
+
}): Promise<DirectSignResponse>;
|
|
140
|
+
/**
|
|
141
|
+
* Sign an amino sign doc using the wallet provider
|
|
142
|
+
*
|
|
143
|
+
* @param transaction
|
|
144
|
+
* @param address - injective address
|
|
145
|
+
*/
|
|
146
|
+
signAminoCosmosTransaction(transaction: {
|
|
147
|
+
signDoc: StdSignDoc;
|
|
148
|
+
address: string;
|
|
149
|
+
}): Promise<AminoSignResponse>;
|
|
150
|
+
/**
|
|
151
|
+
* Sign EIP712 TypedData using the wallet provider
|
|
152
|
+
* @param eip712TypedData
|
|
153
|
+
* @param address - ethereum address
|
|
154
|
+
*/
|
|
155
|
+
signEip712TypedData(eip712TypedData: string, address: string): Promise<string>;
|
|
156
|
+
signArbitrary(signer: string, data: string | Uint8Array): Promise<string>;
|
|
157
|
+
getEthereumChainId(): Promise<string>;
|
|
158
|
+
getEthereumTransactionReceipt(txHash: string): void;
|
|
159
|
+
onAccountChange?(callback: onAccountChangeCallback): Promise<void> | void;
|
|
160
|
+
onChainIdChange?(callback: onChainIdChangeCallback): Promise<void> | void;
|
|
161
|
+
disconnect?(): Promise<void> | void;
|
|
162
|
+
getCosmosWallet?(chainId: ChainId): CosmosWalletAbstraction;
|
|
163
|
+
}
|
|
164
|
+
export interface WalletStrategy {
|
|
165
|
+
strategies: ConcreteStrategiesArg;
|
|
166
|
+
wallet: Wallet;
|
|
167
|
+
args: WalletStrategyArguments;
|
|
168
|
+
getWallet(): Wallet;
|
|
169
|
+
setWallet(wallet: Wallet): void;
|
|
170
|
+
setOptions(options?: ConcreteWalletStrategyOptions): void;
|
|
171
|
+
getStrategy(): ConcreteWalletStrategy;
|
|
172
|
+
getAddresses(args?: unknown): Promise<AccountAddress[]>;
|
|
173
|
+
getWalletDeviceType(): Promise<WalletDeviceType>;
|
|
174
|
+
getPubKey(address?: string): Promise<string>;
|
|
175
|
+
enable(args?: unknown): Promise<boolean>;
|
|
176
|
+
enableAndGetAddresses(args?: unknown): Promise<AccountAddress[]>;
|
|
177
|
+
getEthereumChainId(): Promise<string>;
|
|
178
|
+
getEthereumTransactionReceipt(txHash: string): Promise<void>;
|
|
179
|
+
getSessionOrConfirm(address?: AccountAddress): Promise<string>;
|
|
180
|
+
sendTransaction(tx: DirectSignResponse | TxRaw, options: SendTransactionOptions): Promise<TxResponse>;
|
|
181
|
+
sendEthereumTransaction(tx: any, options: {
|
|
182
|
+
address: AccountAddress;
|
|
183
|
+
ethereumChainId: EthereumChainId;
|
|
184
|
+
}): Promise<string>;
|
|
185
|
+
signEip712TypedData(eip712TypedData: string, address: AccountAddress): Promise<string>;
|
|
186
|
+
signAminoCosmosTransaction(transaction: {
|
|
187
|
+
signDoc: StdSignDoc;
|
|
188
|
+
address: string;
|
|
189
|
+
}): Promise<AminoSignResponse>;
|
|
190
|
+
signCosmosTransaction(transaction: {
|
|
191
|
+
txRaw: TxRaw;
|
|
192
|
+
accountNumber: number;
|
|
193
|
+
chainId: string;
|
|
194
|
+
address: string;
|
|
195
|
+
}): Promise<DirectSignResponse>;
|
|
196
|
+
signArbitrary(signer: string, data: string | Uint8Array): Promise<string | void>;
|
|
197
|
+
onAccountChange(callback: onAccountChangeCallback): Promise<void>;
|
|
198
|
+
onChainIdChange(callback: onChainIdChangeCallback): Promise<void>;
|
|
199
|
+
disconnect(): Promise<void>;
|
|
200
|
+
getCosmosWallet?(chainId: ChainId): CosmosWalletAbstraction;
|
|
201
|
+
}
|
|
202
|
+
export { StdSignDoc };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strategy.js","sourceRoot":"","sources":["../../../src/types/strategy.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEthereumSignerAddress = exports.getInjectiveSignerAddress = void 0;
|
|
4
|
+
const sdk_ts_1 = require("@injectivelabs/sdk-ts");
|
|
5
|
+
const getInjectiveSignerAddress = (address) => {
|
|
6
|
+
if (!address) {
|
|
7
|
+
return '';
|
|
8
|
+
}
|
|
9
|
+
if (address.startsWith('inj')) {
|
|
10
|
+
return address;
|
|
11
|
+
}
|
|
12
|
+
if (address.startsWith('0x')) {
|
|
13
|
+
return (0, sdk_ts_1.getInjectiveAddress)(address);
|
|
14
|
+
}
|
|
15
|
+
return '';
|
|
16
|
+
};
|
|
17
|
+
exports.getInjectiveSignerAddress = getInjectiveSignerAddress;
|
|
18
|
+
const getEthereumSignerAddress = (address) => {
|
|
19
|
+
if (!address) {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
if (address.startsWith('0x')) {
|
|
23
|
+
return address;
|
|
24
|
+
}
|
|
25
|
+
if (address.startsWith('inj')) {
|
|
26
|
+
return (0, sdk_ts_1.getEthereumAddress)(address);
|
|
27
|
+
}
|
|
28
|
+
return '';
|
|
29
|
+
};
|
|
30
|
+
exports.getEthereumSignerAddress = getEthereumSignerAddress;
|
|
31
|
+
//# sourceMappingURL=address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../src/utils/address.ts"],"names":[],"mappings":";;;AAAA,kDAA+E;AAExE,MAAM,yBAAyB,GAAG,CAAC,OAA2B,EAAE,EAAE;IACvE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,CAAA;IACX,CAAC;IAED,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAA,4BAAmB,EAAC,OAAO,CAAC,CAAA;IACrC,CAAC;IAED,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAdY,QAAA,yBAAyB,6BAcrC;AAEM,MAAM,wBAAwB,GAAG,CAAC,OAA2B,EAAE,EAAE;IACtE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,CAAA;IACX,CAAC;IAED,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAA,2BAAkB,EAAC,OAAO,CAAC,CAAA;IACpC,CAAC;IAED,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAdY,QAAA,wBAAwB,4BAcpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getKeyFromRpcUrl: (rpcUrl: string) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getKeyFromRpcUrl = void 0;
|
|
4
|
+
const getKeyFromRpcUrl = (rpcUrl) => {
|
|
5
|
+
if (!rpcUrl.includes('alchemyapi.io') && !rpcUrl.includes('alchemy.com')) {
|
|
6
|
+
return rpcUrl;
|
|
7
|
+
}
|
|
8
|
+
const [key] = rpcUrl.split('/').reverse();
|
|
9
|
+
return key;
|
|
10
|
+
};
|
|
11
|
+
exports.getKeyFromRpcUrl = getKeyFromRpcUrl;
|
|
12
|
+
//# sourceMappingURL=alchemy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alchemy.js","sourceRoot":"","sources":["../../../src/utils/alchemy.ts"],"names":[],"mappings":";;;AAAO,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAE,EAAE;IACjD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACzE,OAAO,MAAM,CAAA;IACf,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAA;IAEzC,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AARY,QAAA,gBAAgB,oBAQ5B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BigNumber, BigNumberInBase } from '@injectivelabs/utils';
|
|
2
|
+
export declare const GWEI_IN_WEI: BigNumber;
|
|
3
|
+
export declare const TIP_IN_GWEI: BigNumberInBase;
|
|
4
|
+
export declare const DEFAULT_BASE_DERIVATION_PATH = "m/44'/60'";
|
|
5
|
+
export declare const DEFAULT_NUM_ADDRESSES_TO_FETCH = 5;
|
|
6
|
+
export declare const DEFAULT_ADDRESS_SEARCH_LIMIT = 100;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_ADDRESS_SEARCH_LIMIT = exports.DEFAULT_NUM_ADDRESSES_TO_FETCH = exports.DEFAULT_BASE_DERIVATION_PATH = exports.TIP_IN_GWEI = exports.GWEI_IN_WEI = void 0;
|
|
4
|
+
const utils_1 = require("@injectivelabs/utils");
|
|
5
|
+
exports.GWEI_IN_WEI = new utils_1.BigNumber(1000000000);
|
|
6
|
+
exports.TIP_IN_GWEI = new utils_1.BigNumberInBase(2).times(exports.GWEI_IN_WEI);
|
|
7
|
+
exports.DEFAULT_BASE_DERIVATION_PATH = "m/44'/60'";
|
|
8
|
+
exports.DEFAULT_NUM_ADDRESSES_TO_FETCH = 5;
|
|
9
|
+
exports.DEFAULT_ADDRESS_SEARCH_LIMIT = 100;
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":";;;AAAA,gDAAiE;AAEpD,QAAA,WAAW,GAAc,IAAI,iBAAS,CAAC,UAAU,CAAC,CAAA;AAClD,QAAA,WAAW,GAAoB,IAAI,uBAAe,CAAC,CAAC,CAAC,CAAC,KAAK,CACtE,mBAAW,CACZ,CAAA;AAEY,QAAA,4BAA4B,GAAG,WAAW,CAAA;AAC1C,QAAA,8BAA8B,GAAG,CAAC,CAAA;AAClC,QAAA,4BAA4B,GAAG,GAAG,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCosmosSignDocFromSignDoc = void 0;
|
|
4
|
+
const sdk_ts_1 = require("@injectivelabs/sdk-ts");
|
|
5
|
+
const createCosmosSignDocFromSignDoc = (signDoc) => {
|
|
6
|
+
return sdk_ts_1.CosmosTxV1Beta1Tx.SignDoc.fromPartial({
|
|
7
|
+
bodyBytes: signDoc.bodyBytes,
|
|
8
|
+
authInfoBytes: signDoc.authInfoBytes,
|
|
9
|
+
accountNumber: BigInt(signDoc.accountNumber).toString(),
|
|
10
|
+
chainId: signDoc.chainId,
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
exports.createCosmosSignDocFromSignDoc = createCosmosSignDocFromSignDoc;
|
|
14
|
+
//# sourceMappingURL=cosmos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cosmos.js","sourceRoot":"","sources":["../../../src/utils/cosmos.ts"],"names":[],"mappings":";;;AAAA,kDAAyD;AAElD,MAAM,8BAA8B,GAAG,CAC5C,OAAkC,EAC7B,EAAE;IACP,OAAO,0BAAiB,CAAC,OAAO,CAAC,WAAW,CAAC;QAC3C,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;QACvD,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC,CAAA;AACJ,CAAC,CAAA;AATY,QAAA,8BAA8B,kCAS1C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./address.js"), exports);
|
|
18
|
+
__exportStar(require("./tx.js"), exports);
|
|
19
|
+
__exportStar(require("./wallet.js"), exports);
|
|
20
|
+
__exportStar(require("./constants.js"), exports);
|
|
21
|
+
__exportStar(require("./alchemy.js"), exports);
|
|
22
|
+
__exportStar(require("./cosmos.js"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,0CAAuB;AACvB,8CAA2B;AAC3B,iDAA8B;AAC9B,+CAA4B;AAC5B,8CAA2B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ChainId } from '@injectivelabs/ts-types';
|
|
2
|
+
import { Msgs } from '@injectivelabs/sdk-ts';
|
|
3
|
+
export declare const createEip712StdSignDoc: ({ memo, chainId, accountNumber, timeoutHeight, sequence, gas, msgs, }: {
|
|
4
|
+
memo?: string;
|
|
5
|
+
chainId: ChainId;
|
|
6
|
+
timeoutHeight?: string;
|
|
7
|
+
accountNumber: number;
|
|
8
|
+
sequence: number;
|
|
9
|
+
gas?: string;
|
|
10
|
+
msgs: Msgs[];
|
|
11
|
+
}) => {
|
|
12
|
+
chain_id: ChainId;
|
|
13
|
+
timeout_height: string;
|
|
14
|
+
account_number: string;
|
|
15
|
+
sequence: string;
|
|
16
|
+
fee: {
|
|
17
|
+
amount: {
|
|
18
|
+
denom: string;
|
|
19
|
+
amount: string;
|
|
20
|
+
}[];
|
|
21
|
+
gas: string;
|
|
22
|
+
payer: string | undefined;
|
|
23
|
+
granter: string | undefined;
|
|
24
|
+
feePayer: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
msgs: {
|
|
27
|
+
type: string;
|
|
28
|
+
value: any;
|
|
29
|
+
}[];
|
|
30
|
+
memo: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createEip712StdSignDoc = void 0;
|
|
4
|
+
const utils_1 = require("@injectivelabs/utils");
|
|
5
|
+
const createEip712StdSignDoc = ({ memo, chainId, accountNumber, timeoutHeight, sequence, gas, msgs, }) => ({
|
|
6
|
+
chain_id: chainId,
|
|
7
|
+
timeout_height: timeoutHeight || '',
|
|
8
|
+
account_number: accountNumber.toString(),
|
|
9
|
+
sequence: sequence.toString(),
|
|
10
|
+
fee: (0, utils_1.getStdFee)({ gas }),
|
|
11
|
+
msgs: msgs.map((m) => m.toEip712()),
|
|
12
|
+
memo: memo || '',
|
|
13
|
+
});
|
|
14
|
+
exports.createEip712StdSignDoc = createEip712StdSignDoc;
|
|
15
|
+
//# sourceMappingURL=tx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tx.js","sourceRoot":"","sources":["../../../src/utils/tx.ts"],"names":[],"mappings":";;;AACA,gDAAgD;AAGzC,MAAM,sBAAsB,GAAG,CAAC,EACrC,IAAI,EACJ,OAAO,EACP,aAAa,EACb,aAAa,EACb,QAAQ,EACR,GAAG,EACH,IAAI,GASL,EAAE,EAAE,CAAC,CAAC;IACL,QAAQ,EAAE,OAAO;IACjB,cAAc,EAAE,aAAa,IAAI,EAAE;IACnC,cAAc,EAAE,aAAa,CAAC,QAAQ,EAAE;IACxC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE;IAC7B,GAAG,EAAE,IAAA,iBAAS,EAAC,EAAE,GAAG,EAAE,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACnC,IAAI,EAAE,IAAI,IAAI,EAAE;CACjB,CAAC,CAAA;AAxBW,QAAA,sBAAsB,0BAwBjC"}
|