@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.
@@ -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 wsProvider;
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,3 +1,4 @@
1
+ export * from './adapter';
1
2
  export * from './chain';
2
3
  export * from './client';
3
4
  export * from './types';
@@ -1,6 +1,6 @@
1
1
  import { EvmClient } from '../evm';
2
2
  export declare class GhoTokenClient {
3
- private client;
3
+ private rpcAdapter;
4
4
  constructor(evm: EvmClient);
5
5
  getFacilitatorCapacity(address: string, facilitator: string): Promise<bigint>;
6
6
  }
@@ -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 client;
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.0.0",
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.23.7"
63
+ "viem": "^2.38.3"
64
64
  }
65
65
  }