polkamarkets-js 3.2.0 → 3.3.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/abis/AddAdminToLand.json +1 -0
- package/abis/ClaimMerkleRoot.json +1 -0
- package/abis/CreateLand.json +1 -0
- package/abis/CreateMarkets.json +1 -0
- package/abis/DeployContracts.json +1 -0
- package/abis/DeployMerkleRewardsDistributor.json +1 -0
- package/abis/DeployToken.json +1 -0
- package/abis/DeployUSDT.json +1 -0
- package/abis/MintTokens.json +1 -0
- package/abis/PredictionMarketV3_3.json +1 -0
- package/abis/PublishMerkleRoot.json +1 -0
- package/abis/ResolveMarket.json +1 -0
- package/abis/TradeMarket.json +1 -0
- package/abis/USDT.json +1 -0
- package/package.json +1 -1
- package/script/UpdateMarket.s.sol +56 -0
- package/scripts/AddAdminToLand.s.sol +29 -0
- package/scripts/ClaimMerkleRoot.s.sol +34 -0
- package/scripts/CreateLand.s.sol +28 -0
- package/scripts/CreateMarkets.s.sol +71 -0
- package/scripts/DeployContracts.s.sol +94 -0
- package/scripts/DeployMerkleRewardsDistributor.s.sol +27 -0
- package/scripts/DeployToken.s.sol +17 -0
- package/scripts/DeployUSDT.s.sol +24 -0
- package/scripts/MintTokens.s.sol +21 -0
- package/scripts/PublishMerkleRoot.s.sol +50 -0
- package/scripts/ResolveMarket.s.sol +23 -0
- package/scripts/TradeMarket.s.sol +28 -0
- package/scripts/UpdateMarket.s.sol +55 -0
- package/src/Application.js +2 -1
- package/src/interfaces/index.js +2 -0
- package/src/models/PredictionMarketV3Contract.js +5 -1
- package/src/models/PredictionMarketV3PlusContract.js +39 -2
- package/test/UpdateTest.t.sol +55 -0
- package/test/WhaleTest.t.sol +188 -0
- package/contracts/PredictionMarketV3_4Bad.sol +0 -1487
- package/contracts/PredictionMarketV3_4Good.sol +0 -1508
- package/dist/Application.d.ts +0 -201
- package/dist/Application.d.ts.map +0 -1
- package/dist/Application.js +0 -411
- package/dist/Application.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -16
- package/dist/index.js.map +0 -1
- package/dist/interfaces/index.d.ts +0 -4
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/index.js +0 -22
- package/dist/interfaces/index.js.map +0 -1
- package/dist/models/AchievementsContract.d.ts +0 -43
- package/dist/models/AchievementsContract.d.ts.map +0 -1
- package/dist/models/AchievementsContract.js +0 -177
- package/dist/models/AchievementsContract.js.map +0 -1
- package/dist/models/ArbitrationContract.d.ts +0 -23
- package/dist/models/ArbitrationContract.d.ts.map +0 -1
- package/dist/models/ArbitrationContract.js +0 -47
- package/dist/models/ArbitrationContract.js.map +0 -1
- package/dist/models/ArbitrationProxyContract.d.ts +0 -14
- package/dist/models/ArbitrationProxyContract.d.ts.map +0 -1
- package/dist/models/ArbitrationProxyContract.js +0 -26
- package/dist/models/ArbitrationProxyContract.js.map +0 -1
- package/dist/models/ERC20Contract.d.ts +0 -50
- package/dist/models/ERC20Contract.d.ts.map +0 -1
- package/dist/models/ERC20Contract.js +0 -99
- package/dist/models/ERC20Contract.js.map +0 -1
- package/dist/models/FantasyERC20Contract.d.ts +0 -13
- package/dist/models/FantasyERC20Contract.d.ts.map +0 -1
- package/dist/models/FantasyERC20Contract.js +0 -43
- package/dist/models/FantasyERC20Contract.js.map +0 -1
- package/dist/models/IContract.d.ts +0 -57
- package/dist/models/IContract.d.ts.map +0 -1
- package/dist/models/IContract.js +0 -515
- package/dist/models/IContract.js.map +0 -1
- package/dist/models/PolkamarketsSmartAccount.d.ts +0 -26
- package/dist/models/PolkamarketsSmartAccount.d.ts.map +0 -1
- package/dist/models/PolkamarketsSmartAccount.js +0 -100
- package/dist/models/PolkamarketsSmartAccount.js.map +0 -1
- package/dist/models/PredictionMarketContract.d.ts +0 -113
- package/dist/models/PredictionMarketContract.d.ts.map +0 -1
- package/dist/models/PredictionMarketContract.js +0 -298
- package/dist/models/PredictionMarketContract.js.map +0 -1
- package/dist/models/PredictionMarketV2Contract.d.ts +0 -157
- package/dist/models/PredictionMarketV2Contract.d.ts.map +0 -1
- package/dist/models/PredictionMarketV2Contract.js +0 -431
- package/dist/models/PredictionMarketV2Contract.js.map +0 -1
- package/dist/models/PredictionMarketV3Contract.d.ts +0 -42
- package/dist/models/PredictionMarketV3Contract.d.ts.map +0 -1
- package/dist/models/PredictionMarketV3Contract.js +0 -277
- package/dist/models/PredictionMarketV3Contract.js.map +0 -1
- package/dist/models/PredictionMarketV3ControllerContract.d.ts +0 -128
- package/dist/models/PredictionMarketV3ControllerContract.d.ts.map +0 -1
- package/dist/models/PredictionMarketV3ControllerContract.js +0 -174
- package/dist/models/PredictionMarketV3ControllerContract.js.map +0 -1
- package/dist/models/PredictionMarketV3FactoryContract.d.ts +0 -31
- package/dist/models/PredictionMarketV3FactoryContract.d.ts.map +0 -1
- package/dist/models/PredictionMarketV3FactoryContract.js +0 -81
- package/dist/models/PredictionMarketV3FactoryContract.js.map +0 -1
- package/dist/models/PredictionMarketV3ManagerContract.d.ts +0 -67
- package/dist/models/PredictionMarketV3ManagerContract.d.ts.map +0 -1
- package/dist/models/PredictionMarketV3ManagerContract.js +0 -97
- package/dist/models/PredictionMarketV3ManagerContract.js.map +0 -1
- package/dist/models/PredictionMarketV3QuerierContract.d.ts +0 -33
- package/dist/models/PredictionMarketV3QuerierContract.d.ts.map +0 -1
- package/dist/models/PredictionMarketV3QuerierContract.js +0 -61
- package/dist/models/PredictionMarketV3QuerierContract.js.map +0 -1
- package/dist/models/PredictionMarketV3_2Contract.d.ts +0 -32
- package/dist/models/PredictionMarketV3_2Contract.d.ts.map +0 -1
- package/dist/models/PredictionMarketV3_2Contract.js +0 -169
- package/dist/models/PredictionMarketV3_2Contract.js.map +0 -1
- package/dist/models/RealitioERC20Contract.d.ts +0 -16
- package/dist/models/RealitioERC20Contract.d.ts.map +0 -1
- package/dist/models/RealitioERC20Contract.js +0 -18
- package/dist/models/RealitioERC20Contract.js.map +0 -1
- package/dist/models/VotingContract.d.ts +0 -38
- package/dist/models/VotingContract.d.ts.map +0 -1
- package/dist/models/VotingContract.js +0 -85
- package/dist/models/VotingContract.js.map +0 -1
- package/dist/models/WETH9Contract.d.ts +0 -29
- package/dist/models/WETH9Contract.d.ts.map +0 -1
- package/dist/models/WETH9Contract.js +0 -44
- package/dist/models/WETH9Contract.js.map +0 -1
- package/dist/models/index.d.ts +0 -18
- package/dist/models/index.d.ts.map +0 -1
- package/dist/models/index.js +0 -37
- package/dist/models/index.js.map +0 -1
- package/dist/types/contracts.d.ts +0 -46
- package/dist/types/contracts.d.ts.map +0 -1
- package/dist/types/contracts.js +0 -3
- package/dist/types/contracts.js.map +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -3
- package/dist/types/index.js.map +0 -1
- package/dist/utils/Account.d.ts +0 -34
- package/dist/utils/Account.d.ts.map +0 -1
- package/dist/utils/Account.js +0 -38
- package/dist/utils/Account.js.map +0 -1
- package/dist/utils/Contract.d.ts +0 -31
- package/dist/utils/Contract.d.ts.map +0 -1
- package/dist/utils/Contract.js +0 -123
- package/dist/utils/Contract.js.map +0 -1
- package/dist/utils/Numbers.d.ts +0 -27
- package/dist/utils/Numbers.d.ts.map +0 -1
- package/dist/utils/Numbers.js +0 -87
- package/dist/utils/Numbers.js.map +0 -1
- package/script/CreateMarketLib.sol +0 -1873
- package/script/DeployProxy.s.sol +0 -27
- package/script/DeployUpgradeablePM.s.sol +0 -47
- package/script/PredictionMarketV3_3Flow.s.sol +0 -132
package/dist/Application.d.ts
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import Web3 from "web3";
|
|
2
|
-
declare global {
|
|
3
|
-
interface Window {
|
|
4
|
-
web3?: Web3;
|
|
5
|
-
ethereum?: any;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
interface ApplicationConfig {
|
|
9
|
-
web3Provider: string;
|
|
10
|
-
web3PrivateKey?: string;
|
|
11
|
-
web3EventsProvider?: string;
|
|
12
|
-
gasPrice?: string;
|
|
13
|
-
isSocialLogin?: boolean;
|
|
14
|
-
socialLoginParams?: any;
|
|
15
|
-
startBlock?: number;
|
|
16
|
-
defaultDecimals?: number;
|
|
17
|
-
}
|
|
18
|
-
declare class Application {
|
|
19
|
-
private web3Provider;
|
|
20
|
-
private web3EventsProvider?;
|
|
21
|
-
private gasPrice?;
|
|
22
|
-
private isSocialLogin;
|
|
23
|
-
private socialLoginParams?;
|
|
24
|
-
private startBlock?;
|
|
25
|
-
private defaultDecimals?;
|
|
26
|
-
private web3?;
|
|
27
|
-
private account?;
|
|
28
|
-
private smartAccount?;
|
|
29
|
-
constructor({ web3Provider, web3PrivateKey, web3EventsProvider, gasPrice, isSocialLogin, socialLoginParams, startBlock, defaultDecimals, }: ApplicationConfig);
|
|
30
|
-
/**********/
|
|
31
|
-
/** CORE **/
|
|
32
|
-
/**********/
|
|
33
|
-
/**
|
|
34
|
-
* @name start
|
|
35
|
-
* @description Start the Application
|
|
36
|
-
*/
|
|
37
|
-
start(): void;
|
|
38
|
-
/**
|
|
39
|
-
* @name login
|
|
40
|
-
* @description Login with Metamask or a web3 provider
|
|
41
|
-
*/
|
|
42
|
-
login(provider?: any, isConnectedWallet?: boolean | null): Promise<boolean>;
|
|
43
|
-
/**
|
|
44
|
-
* @name isLoggedIn
|
|
45
|
-
* @description Returns wether metamask account is connected to service or not
|
|
46
|
-
*/
|
|
47
|
-
isLoggedIn(): Promise<boolean>;
|
|
48
|
-
private contractDefaultParams;
|
|
49
|
-
/*************/
|
|
50
|
-
/** GETTERS **/
|
|
51
|
-
/*************/
|
|
52
|
-
/**
|
|
53
|
-
* @name getPredictionMarketContract
|
|
54
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
55
|
-
* @description Create a PredictionMarket Contract
|
|
56
|
-
*/
|
|
57
|
-
getPredictionMarketContract({ contractAddress, }?: {
|
|
58
|
-
contractAddress?: string | null;
|
|
59
|
-
}): any;
|
|
60
|
-
/**
|
|
61
|
-
* @name getPredictionMarketV2Contract
|
|
62
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
63
|
-
* @description Create a PredictionMarketV2 Contract
|
|
64
|
-
*/
|
|
65
|
-
getPredictionMarketV2Contract({ contractAddress, }?: {
|
|
66
|
-
contractAddress?: string | null;
|
|
67
|
-
}): any;
|
|
68
|
-
/**
|
|
69
|
-
* @name getPredictionMarketV3Contract
|
|
70
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
71
|
-
* @description Create a PredictionMarketV3 Contract
|
|
72
|
-
*/
|
|
73
|
-
getPredictionMarketV3Contract({ contractAddress, querierContractAddress, }?: {
|
|
74
|
-
contractAddress?: string | null;
|
|
75
|
-
querierContractAddress?: string | null;
|
|
76
|
-
}): any;
|
|
77
|
-
/**
|
|
78
|
-
* @name getPredictionMarketV3_2Contract
|
|
79
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
80
|
-
* @description Create a PredictionMarketV3 Contract
|
|
81
|
-
*/
|
|
82
|
-
getPredictionMarketV3_2Contract({ contractAddress, querierContractAddress, }?: {
|
|
83
|
-
contractAddress?: string | null;
|
|
84
|
-
querierContractAddress?: string | null;
|
|
85
|
-
}): any;
|
|
86
|
-
/**
|
|
87
|
-
* @name getPredictionMarketV3FactoryContract
|
|
88
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
89
|
-
* @description Create a PredictionMarketV3Factory Contract
|
|
90
|
-
*/
|
|
91
|
-
getPredictionMarketV3FactoryContract({ contractAddress, }?: {
|
|
92
|
-
contractAddress?: string | null;
|
|
93
|
-
}): any;
|
|
94
|
-
/**
|
|
95
|
-
* @name PredictionMarketV3ControllerContract
|
|
96
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
97
|
-
* @description Create a PredictionMarketV3ControllerContract Contract
|
|
98
|
-
*/
|
|
99
|
-
getPredictionMarketV3ControllerContract({ contractAddress, }?: {
|
|
100
|
-
contractAddress?: string | null;
|
|
101
|
-
}): any;
|
|
102
|
-
/**
|
|
103
|
-
* @name getPredictionMarketV3ManagerContract
|
|
104
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
105
|
-
* @description Create a PredictionMarketV3Manager Contract
|
|
106
|
-
*/
|
|
107
|
-
getPredictionMarketV3ManagerContract({ contractAddress, }?: {
|
|
108
|
-
contractAddress?: string | null;
|
|
109
|
-
}): any;
|
|
110
|
-
/**
|
|
111
|
-
* @name getAchievementsContract
|
|
112
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
113
|
-
* @description Create a PredictionMarket Contract
|
|
114
|
-
*/
|
|
115
|
-
getAchievementsContract({ contractAddress, predictionMarketContractAddress, realitioERC20ContractAddress, }?: {
|
|
116
|
-
contractAddress?: string | null;
|
|
117
|
-
predictionMarketContractAddress?: string | null;
|
|
118
|
-
realitioERC20ContractAddress?: string | null;
|
|
119
|
-
}): any;
|
|
120
|
-
/**
|
|
121
|
-
* @name getVotingContract
|
|
122
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
123
|
-
* @description Create a Voting Contract
|
|
124
|
-
*/
|
|
125
|
-
getVotingContract({ contractAddress, }?: {
|
|
126
|
-
contractAddress?: string | null;
|
|
127
|
-
}): any;
|
|
128
|
-
/**
|
|
129
|
-
* @name getFantasyERC20Contract
|
|
130
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
131
|
-
* @description Create a Fantasy ERC20 Contract
|
|
132
|
-
*/
|
|
133
|
-
getFantasyERC20Contract({ contractAddress, }?: {
|
|
134
|
-
contractAddress?: string | null;
|
|
135
|
-
}): any;
|
|
136
|
-
/**
|
|
137
|
-
* @name getRealitioERC20Contract
|
|
138
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
139
|
-
* @description Create a RealitioERC20 Contract
|
|
140
|
-
*/
|
|
141
|
-
getRealitioERC20Contract({ contractAddress, }?: {
|
|
142
|
-
contractAddress?: string | null;
|
|
143
|
-
}): any;
|
|
144
|
-
/**
|
|
145
|
-
* @name getERC20Contract
|
|
146
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
147
|
-
* @description Create a ERC20 Contract
|
|
148
|
-
*/
|
|
149
|
-
getERC20Contract({ contractAddress, }: {
|
|
150
|
-
contractAddress?: string | null;
|
|
151
|
-
}): any;
|
|
152
|
-
/**
|
|
153
|
-
* @name getWETH9Contract
|
|
154
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
155
|
-
* @description Create a WETH9 Contract
|
|
156
|
-
*/
|
|
157
|
-
getWETH9Contract({ contractAddress, }: {
|
|
158
|
-
contractAddress?: string | null;
|
|
159
|
-
}): any;
|
|
160
|
-
/**
|
|
161
|
-
* @name getArbitrationContract
|
|
162
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
163
|
-
* @description Create a Arbitration Contract
|
|
164
|
-
*/
|
|
165
|
-
getArbitrationContract({ contractAddress, }: {
|
|
166
|
-
contractAddress?: string | null;
|
|
167
|
-
}): any;
|
|
168
|
-
/**
|
|
169
|
-
* @name getArbitrationProxyContract
|
|
170
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
171
|
-
* @description Create a Arbitration Proxy Contract
|
|
172
|
-
*/
|
|
173
|
-
getArbitrationProxyContract({ contractAddress, }: {
|
|
174
|
-
contractAddress?: string | null;
|
|
175
|
-
}): any;
|
|
176
|
-
/***********/
|
|
177
|
-
/** UTILS **/
|
|
178
|
-
/***********/
|
|
179
|
-
/**
|
|
180
|
-
* @name getETHNetwork
|
|
181
|
-
* @description Access current ETH Network used
|
|
182
|
-
* @returns {String} Eth Network
|
|
183
|
-
*/
|
|
184
|
-
getETHNetwork(): Promise<string>;
|
|
185
|
-
/**
|
|
186
|
-
* @name getAddress
|
|
187
|
-
* @description Access current Address Being Used under Web3 Injector (ex : Metamask)
|
|
188
|
-
* @returns {Address} Address
|
|
189
|
-
*/
|
|
190
|
-
getAddress(): Promise<string>;
|
|
191
|
-
/**
|
|
192
|
-
* @name getETHBalance
|
|
193
|
-
* @description Access current ETH Balance Available for the Injected Web3 Address
|
|
194
|
-
* @returns {Integer} Balance
|
|
195
|
-
*/
|
|
196
|
-
getETHBalance(): Promise<string>;
|
|
197
|
-
socialLoginWithJWT(id: string, jwtToken: string): Promise<void>;
|
|
198
|
-
socialLoginLogout(): Promise<void>;
|
|
199
|
-
}
|
|
200
|
-
export default Application;
|
|
201
|
-
//# sourceMappingURL=Application.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Application.d.ts","sourceRoot":"","sources":["../src/Application.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AA0BxB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,IAAI,CAAC,EAAE,IAAI,CAAC;QACZ,QAAQ,CAAC,EAAE,GAAG,CAAC;KAChB;CACF;AAED,UAAU,iBAAiB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA8BD,cAAM,WAAW;IACf,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,kBAAkB,CAAC,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,iBAAiB,CAAC,CAAM;IAChC,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,OAAO,CAAC,eAAe,CAAC,CAAS;IACjC,OAAO,CAAC,IAAI,CAAC,CAAO;IACpB,OAAO,CAAC,OAAO,CAAC,CAAU;IAC1B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,EAAE,MAAM,GAAG,IAAI,CAAC;KACjC,GAAG,GAAG;IAUP;;;;OAIG;IACH,2BAA2B,CAAC,EAC1B,eAAsB,GACvB,EAAE;QACD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACjC,GAAG,GAAG;IAUP,aAAa;IACb,aAAa;IACb,aAAa;IAEb;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAQtC;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAYnC;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAShC,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/D,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAMzC;AAED,eAAe,WAAW,CAAC"}
|
package/dist/Application.js
DELETED
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const web3_1 = __importDefault(require("web3"));
|
|
7
|
-
const Account_1 = __importDefault(require("./utils/Account"));
|
|
8
|
-
// Import contract classes
|
|
9
|
-
const index_1 = require("./models/index");
|
|
10
|
-
// Import PolkamarketsSmartAccount - using require until converted to TypeScript
|
|
11
|
-
const PolkamarketsSmartAccount = require("./models/PolkamarketsSmartAccount");
|
|
12
|
-
const networksEnum = Object.freeze({
|
|
13
|
-
1: "Main",
|
|
14
|
-
2: "Morden",
|
|
15
|
-
3: "Ropsten",
|
|
16
|
-
4: "Rinkeby",
|
|
17
|
-
42: "Kovan",
|
|
18
|
-
});
|
|
19
|
-
class Application {
|
|
20
|
-
constructor({ web3Provider, web3PrivateKey, web3EventsProvider, gasPrice, isSocialLogin = false, socialLoginParams, startBlock, defaultDecimals, }) {
|
|
21
|
-
this.web3Provider = web3Provider;
|
|
22
|
-
// evm logs http source (optional)
|
|
23
|
-
this.web3EventsProvider = web3EventsProvider;
|
|
24
|
-
// fixed gas price for txs (optional)
|
|
25
|
-
this.gasPrice = gasPrice;
|
|
26
|
-
this.isSocialLogin = isSocialLogin;
|
|
27
|
-
this.startBlock = startBlock;
|
|
28
|
-
this.defaultDecimals = defaultDecimals;
|
|
29
|
-
if (this.isSocialLogin) {
|
|
30
|
-
this.socialLoginParams = socialLoginParams;
|
|
31
|
-
}
|
|
32
|
-
// IMPORTANT: this parameter should only be used for testing purposes
|
|
33
|
-
if (web3PrivateKey && !this.isSocialLogin) {
|
|
34
|
-
this.start();
|
|
35
|
-
this.login();
|
|
36
|
-
this.account = new Account_1.default(this.web3, this.web3.eth.accounts.privateKeyToAccount(web3PrivateKey));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**********/
|
|
40
|
-
/** CORE **/
|
|
41
|
-
/**********/
|
|
42
|
-
/**
|
|
43
|
-
* @name start
|
|
44
|
-
* @description Start the Application
|
|
45
|
-
*/
|
|
46
|
-
start() {
|
|
47
|
-
this.web3 = new web3_1.default(new web3_1.default.providers.HttpProvider(this.web3Provider));
|
|
48
|
-
this.web3.eth.handleRevert = true;
|
|
49
|
-
if (typeof window !== "undefined") {
|
|
50
|
-
window.web3 = this.web3;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @name login
|
|
55
|
-
* @description Login with Metamask or a web3 provider
|
|
56
|
-
*/
|
|
57
|
-
async login(provider = null, isConnectedWallet = null) {
|
|
58
|
-
if (this.isSocialLogin) {
|
|
59
|
-
if (!this.smartAccount) {
|
|
60
|
-
this.smartAccount =
|
|
61
|
-
PolkamarketsSmartAccount.singleton.getInstanceIfExists();
|
|
62
|
-
}
|
|
63
|
-
if ((!this.smartAccount || !this.smartAccount.provider) && provider) {
|
|
64
|
-
PolkamarketsSmartAccount.singleton.clearInstance();
|
|
65
|
-
this.smartAccount = PolkamarketsSmartAccount.singleton.getInstance(provider, this.socialLoginParams.networkConfig, isConnectedWallet);
|
|
66
|
-
}
|
|
67
|
-
return true;
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
try {
|
|
71
|
-
if (typeof window === "undefined") {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
if (window.ethereum) {
|
|
75
|
-
window.web3 = new web3_1.default(window.ethereum);
|
|
76
|
-
this.web3 = window.web3;
|
|
77
|
-
await window.ethereum.enable();
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
catch (err) {
|
|
83
|
-
throw err;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* @name isLoggedIn
|
|
89
|
-
* @description Returns wether metamask account is connected to service or not
|
|
90
|
-
*/
|
|
91
|
-
async isLoggedIn() {
|
|
92
|
-
if (this.isSocialLogin) {
|
|
93
|
-
return !!(this.smartAccount && this.smartAccount.provider);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
try {
|
|
97
|
-
if (typeof window === "undefined" ||
|
|
98
|
-
typeof window.ethereum === "undefined") {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
const accounts = await window.ethereum.request({
|
|
102
|
-
method: "eth_accounts",
|
|
103
|
-
});
|
|
104
|
-
return accounts.length > 0;
|
|
105
|
-
}
|
|
106
|
-
catch (err) {
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
contractDefaultParams(contractAddress) {
|
|
112
|
-
return {
|
|
113
|
-
web3: this.web3,
|
|
114
|
-
contractAddress,
|
|
115
|
-
acc: this.account,
|
|
116
|
-
web3EventsProvider: this.web3EventsProvider,
|
|
117
|
-
gasPrice: this.gasPrice,
|
|
118
|
-
isSocialLogin: this.isSocialLogin,
|
|
119
|
-
startBlock: this.startBlock,
|
|
120
|
-
defaultDecimals: this.defaultDecimals,
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
/*************/
|
|
124
|
-
/** GETTERS **/
|
|
125
|
-
/*************/
|
|
126
|
-
/**
|
|
127
|
-
* @name getPredictionMarketContract
|
|
128
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
129
|
-
* @description Create a PredictionMarket Contract
|
|
130
|
-
*/
|
|
131
|
-
getPredictionMarketContract({ contractAddress = null, } = {}) {
|
|
132
|
-
try {
|
|
133
|
-
return new index_1.PredictionMarketContract({
|
|
134
|
-
...this.contractDefaultParams(contractAddress),
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
catch (err) {
|
|
138
|
-
throw err;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* @name getPredictionMarketV2Contract
|
|
143
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
144
|
-
* @description Create a PredictionMarketV2 Contract
|
|
145
|
-
*/
|
|
146
|
-
getPredictionMarketV2Contract({ contractAddress = null, } = {}) {
|
|
147
|
-
try {
|
|
148
|
-
return new index_1.PredictionMarketV2Contract({
|
|
149
|
-
...this.contractDefaultParams(contractAddress),
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
catch (err) {
|
|
153
|
-
throw err;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* @name getPredictionMarketV3Contract
|
|
158
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
159
|
-
* @description Create a PredictionMarketV3 Contract
|
|
160
|
-
*/
|
|
161
|
-
getPredictionMarketV3Contract({ contractAddress = null, querierContractAddress = null, } = {}) {
|
|
162
|
-
try {
|
|
163
|
-
return new index_1.PredictionMarketV3Contract({
|
|
164
|
-
...this.contractDefaultParams(contractAddress),
|
|
165
|
-
querierContractAddress,
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
catch (err) {
|
|
169
|
-
throw err;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* @name getPredictionMarketV3_2Contract
|
|
174
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
175
|
-
* @description Create a PredictionMarketV3 Contract
|
|
176
|
-
*/
|
|
177
|
-
getPredictionMarketV3_2Contract({ contractAddress = null, querierContractAddress = null, } = {}) {
|
|
178
|
-
try {
|
|
179
|
-
return new index_1.PredictionMarketV3_2Contract({
|
|
180
|
-
...this.contractDefaultParams(contractAddress),
|
|
181
|
-
querierContractAddress,
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
catch (err) {
|
|
185
|
-
throw err;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* @name getPredictionMarketV3FactoryContract
|
|
190
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
191
|
-
* @description Create a PredictionMarketV3Factory Contract
|
|
192
|
-
*/
|
|
193
|
-
getPredictionMarketV3FactoryContract({ contractAddress = null, } = {}) {
|
|
194
|
-
try {
|
|
195
|
-
return new index_1.PredictionMarketV3FactoryContract({
|
|
196
|
-
...this.contractDefaultParams(contractAddress),
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
catch (err) {
|
|
200
|
-
throw err;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* @name PredictionMarketV3ControllerContract
|
|
205
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
206
|
-
* @description Create a PredictionMarketV3ControllerContract Contract
|
|
207
|
-
*/
|
|
208
|
-
getPredictionMarketV3ControllerContract({ contractAddress = null, } = {}) {
|
|
209
|
-
try {
|
|
210
|
-
return new index_1.PredictionMarketV3ControllerContract({
|
|
211
|
-
...this.contractDefaultParams(contractAddress),
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
catch (err) {
|
|
215
|
-
throw err;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* @name getPredictionMarketV3ManagerContract
|
|
220
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
221
|
-
* @description Create a PredictionMarketV3Manager Contract
|
|
222
|
-
*/
|
|
223
|
-
getPredictionMarketV3ManagerContract({ contractAddress = null, } = {}) {
|
|
224
|
-
try {
|
|
225
|
-
return new index_1.PredictionMarketV3ManagerContract({
|
|
226
|
-
...this.contractDefaultParams(contractAddress),
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
catch (err) {
|
|
230
|
-
throw err;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* @name getAchievementsContract
|
|
235
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
236
|
-
* @description Create a PredictionMarket Contract
|
|
237
|
-
*/
|
|
238
|
-
getAchievementsContract({ contractAddress = null, predictionMarketContractAddress = null, realitioERC20ContractAddress = null, } = {}) {
|
|
239
|
-
try {
|
|
240
|
-
return new index_1.AchievementsContract({
|
|
241
|
-
...this.contractDefaultParams(contractAddress),
|
|
242
|
-
predictionMarketContractAddress,
|
|
243
|
-
realitioERC20ContractAddress,
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
catch (err) {
|
|
247
|
-
throw err;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* @name getVotingContract
|
|
252
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
253
|
-
* @description Create a Voting Contract
|
|
254
|
-
*/
|
|
255
|
-
getVotingContract({ contractAddress = null, } = {}) {
|
|
256
|
-
try {
|
|
257
|
-
return new index_1.VotingContract({
|
|
258
|
-
...this.contractDefaultParams(contractAddress),
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
catch (err) {
|
|
262
|
-
throw err;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* @name getFantasyERC20Contract
|
|
267
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
268
|
-
* @description Create a Fantasy ERC20 Contract
|
|
269
|
-
*/
|
|
270
|
-
getFantasyERC20Contract({ contractAddress = null, } = {}) {
|
|
271
|
-
try {
|
|
272
|
-
return new index_1.FantasyERC20Contract({
|
|
273
|
-
...this.contractDefaultParams(contractAddress),
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
catch (err) {
|
|
277
|
-
throw err;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* @name getRealitioERC20Contract
|
|
282
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
283
|
-
* @description Create a RealitioERC20 Contract
|
|
284
|
-
*/
|
|
285
|
-
getRealitioERC20Contract({ contractAddress = null, } = {}) {
|
|
286
|
-
try {
|
|
287
|
-
return new index_1.RealitioERC20Contract({
|
|
288
|
-
...this.contractDefaultParams(contractAddress),
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
catch (err) {
|
|
292
|
-
throw err;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* @name getERC20Contract
|
|
297
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
298
|
-
* @description Create a ERC20 Contract
|
|
299
|
-
*/
|
|
300
|
-
getERC20Contract({ contractAddress = null, }) {
|
|
301
|
-
try {
|
|
302
|
-
return new index_1.ERC20Contract({
|
|
303
|
-
...this.contractDefaultParams(contractAddress),
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
catch (err) {
|
|
307
|
-
throw err;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* @name getWETH9Contract
|
|
312
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
313
|
-
* @description Create a WETH9 Contract
|
|
314
|
-
*/
|
|
315
|
-
getWETH9Contract({ contractAddress = null, }) {
|
|
316
|
-
try {
|
|
317
|
-
return new index_1.WETH9Contract({
|
|
318
|
-
...this.contractDefaultParams(contractAddress),
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
catch (err) {
|
|
322
|
-
throw err;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* @name getArbitrationContract
|
|
327
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
328
|
-
* @description Create a Arbitration Contract
|
|
329
|
-
*/
|
|
330
|
-
getArbitrationContract({ contractAddress = null, }) {
|
|
331
|
-
try {
|
|
332
|
-
return new index_1.ArbitrationContract({
|
|
333
|
-
...this.contractDefaultParams(contractAddress),
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
catch (err) {
|
|
337
|
-
throw err;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* @name getArbitrationProxyContract
|
|
342
|
-
* @param {Address} ContractAddress (Opt) If it is deployed
|
|
343
|
-
* @description Create a Arbitration Proxy Contract
|
|
344
|
-
*/
|
|
345
|
-
getArbitrationProxyContract({ contractAddress = null, }) {
|
|
346
|
-
try {
|
|
347
|
-
return new index_1.ArbitrationProxyContract({
|
|
348
|
-
...this.contractDefaultParams(contractAddress),
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
catch (err) {
|
|
352
|
-
throw err;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
/***********/
|
|
356
|
-
/** UTILS **/
|
|
357
|
-
/***********/
|
|
358
|
-
/**
|
|
359
|
-
* @name getETHNetwork
|
|
360
|
-
* @description Access current ETH Network used
|
|
361
|
-
* @returns {String} Eth Network
|
|
362
|
-
*/
|
|
363
|
-
async getETHNetwork() {
|
|
364
|
-
const netId = await this.web3.eth.net.getId();
|
|
365
|
-
const networkName = networksEnum.hasOwnProperty(netId)
|
|
366
|
-
? networksEnum[netId]
|
|
367
|
-
: "Unknown";
|
|
368
|
-
return networkName;
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* @name getAddress
|
|
372
|
-
* @description Access current Address Being Used under Web3 Injector (ex : Metamask)
|
|
373
|
-
* @returns {Address} Address
|
|
374
|
-
*/
|
|
375
|
-
async getAddress() {
|
|
376
|
-
if (this.isSocialLogin) {
|
|
377
|
-
if (this.smartAccount && this.smartAccount.provider) {
|
|
378
|
-
return await this.smartAccount.getAddress();
|
|
379
|
-
}
|
|
380
|
-
return "";
|
|
381
|
-
}
|
|
382
|
-
else {
|
|
383
|
-
const accounts = await this.web3.eth.getAccounts();
|
|
384
|
-
return accounts[0];
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* @name getETHBalance
|
|
389
|
-
* @description Access current ETH Balance Available for the Injected Web3 Address
|
|
390
|
-
* @returns {Integer} Balance
|
|
391
|
-
*/
|
|
392
|
-
async getETHBalance() {
|
|
393
|
-
const address = await this.getAddress();
|
|
394
|
-
if (typeof window !== "undefined" && window.web3) {
|
|
395
|
-
const wei = await window.web3.eth.getBalance(address);
|
|
396
|
-
return this.web3.utils.fromWei(wei, "ether");
|
|
397
|
-
}
|
|
398
|
-
throw new Error("Window or web3 not available");
|
|
399
|
-
}
|
|
400
|
-
async socialLoginWithJWT(id, jwtToken) {
|
|
401
|
-
throw new Error("Not implemented");
|
|
402
|
-
}
|
|
403
|
-
async socialLoginLogout() {
|
|
404
|
-
if (this.smartAccount) {
|
|
405
|
-
PolkamarketsSmartAccount.singleton.clearInstance();
|
|
406
|
-
this.smartAccount = null;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
exports.default = Application;
|
|
411
|
-
//# sourceMappingURL=Application.js.map
|
package/dist/Application.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../src/Application.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,8DAAsC;AAEtC,0BAA0B;AAC1B,0CAgBwB;AAExB,gFAAgF;AAChF,MAAM,wB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,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa;QACjB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QACxC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YACjD,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC,IAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,EAAU,EAAE,QAAgB;QACnD,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,wBAAwB,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;YACnD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,CAAC;IACH,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Application from "./Application";
|
|
2
|
-
import Account from "./utils/Account";
|
|
3
|
-
import Contract from "./utils/Contract";
|
|
4
|
-
import Numbers from "./utils/Numbers";
|
|
5
|
-
export { Application, Account, Contract, Numbers };
|
|
6
|
-
export default Application;
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,OAAO,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAEnD,eAAe,WAAW,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Numbers = exports.Contract = exports.Account = exports.Application = void 0;
|
|
7
|
-
const Application_1 = __importDefault(require("./Application"));
|
|
8
|
-
exports.Application = Application_1.default;
|
|
9
|
-
const Account_1 = __importDefault(require("./utils/Account"));
|
|
10
|
-
exports.Account = Account_1.default;
|
|
11
|
-
const Contract_1 = __importDefault(require("./utils/Contract"));
|
|
12
|
-
exports.Contract = Contract_1.default;
|
|
13
|
-
const Numbers_1 = __importDefault(require("./utils/Numbers"));
|
|
14
|
-
exports.Numbers = Numbers_1.default;
|
|
15
|
-
exports.default = Application_1.default;
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAwC;AAK/B,sBALF,qBAAW,CAKE;AAJpB,8DAAsC;AAIhB,kBAJf,iBAAO,CAIe;AAH7B,gEAAwC;AAGT,mBAHxB,kBAAQ,CAGwB;AAFvC,8DAAsC;AAEG,kBAFlC,iBAAO,CAEkC;AAEhD,kBAAe,qBAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEtE,QAAA,MAAM,KAAK,EAAE,kBAiBZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|