@galacticcouncil/sdk 10.0.0 → 10.2.0-pr222-b403e40
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/build/index.cjs +2 -2
- package/build/index.mjs +2 -2
- package/build/types/aave/AaveClient.d.ts +1 -1
- package/build/types/aave/AaveUtils.d.ts +17 -1
- package/build/types/aave/types.d.ts +1 -0
- package/build/types/evm/adapter.d.ts +11 -0
- package/build/types/evm/client.d.ts +4 -1
- package/build/types/evm/index.d.ts +1 -0
- package/build/types/gho/GhoTokenClient.d.ts +1 -1
- package/build/types/oracle/MmOracleClient.d.ts +2 -2
- package/package.json +3 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApiPromise } from '@polkadot/api';
|
|
2
|
+
import type { PublicClient } from 'viem';
|
|
3
|
+
export declare class EvmRpcAdapter {
|
|
4
|
+
private api;
|
|
5
|
+
constructor(api: ApiPromise);
|
|
6
|
+
getBlock(): Promise<{
|
|
7
|
+
timestamp: bigint;
|
|
8
|
+
number: bigint;
|
|
9
|
+
}>;
|
|
10
|
+
readContract: PublicClient['readContract'];
|
|
11
|
+
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { ApiPromise } from '@polkadot/api';
|
|
2
2
|
import { Chain, PublicClient, WalletClient } from 'viem';
|
|
3
|
+
import { EvmRpcAdapter } from './adapter';
|
|
3
4
|
export declare class EvmClient {
|
|
4
|
-
private
|
|
5
|
+
private api;
|
|
5
6
|
readonly chain: Chain;
|
|
6
7
|
constructor(api: ApiPromise);
|
|
8
|
+
get provider(): any;
|
|
7
9
|
get chainId(): number;
|
|
8
10
|
get chainCurrency(): string;
|
|
9
11
|
get chainDecimals(): number;
|
|
10
12
|
getProvider(): PublicClient;
|
|
11
13
|
getWsProvider(): PublicClient;
|
|
12
14
|
getSigner(address: string): WalletClient;
|
|
15
|
+
getRPCAdapter(): EvmRpcAdapter;
|
|
13
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EvmClient } from '../evm';
|
|
2
1
|
import { MmOracleEntry } from './types';
|
|
2
|
+
import { EvmClient } from '../evm';
|
|
3
3
|
export declare class MmOracleClient {
|
|
4
|
-
private
|
|
4
|
+
private rpcAdapter;
|
|
5
5
|
constructor(evm: EvmClient);
|
|
6
6
|
getData(address: string, blockTimeInSec?: number): Promise<MmOracleEntry>;
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacticcouncil/sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0-pr222-b403e40",
|
|
4
4
|
"description": "Galactic off-chain routing & optimization of orders across pools for best price execution",
|
|
5
5
|
"author": "GalacticCouncil",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"postbuild": "tsc --emitDeclarationOnly --outDir build/types/",
|
|
30
30
|
"clean": "rimraf build",
|
|
31
31
|
"link": "npm ln",
|
|
32
|
-
"test": "NODE_NO_WARNINGS=1 jest"
|
|
32
|
+
"test": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-vm-modules jest"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@galacticcouncil/math-hsm": "^1.1.0",
|
|
@@ -60,6 +60,6 @@
|
|
|
60
60
|
"@polkadot/types-known": "^16.4.8",
|
|
61
61
|
"@polkadot/util": "^13.5.6",
|
|
62
62
|
"@polkadot/util-crypto": "^13.5.6",
|
|
63
|
-
"viem": "^2.
|
|
63
|
+
"viem": "^2.38.3"
|
|
64
64
|
}
|
|
65
65
|
}
|