Skip to content

Commit 687bae2

Browse files
authored
Add a snippet for using the SDK (#133)
1 parent 132225f commit 687bae2

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

SOLVER.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Solvers
2+
-------
3+
4+
To use the Typescript SDK, at the root of this repository, run:
5+
6+
```sh
7+
npm ci && npm run build && npm run pack
8+
```
9+
10+
Which will produce a `.tgz` file that can be installed using npm or any other package manager like:
11+
12+
```sh
13+
npm install /path/to/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-solana-0.0.1.tgz
14+
```
15+
16+
Once installed, it can be used like any other package:
17+
18+
19+
```ts
20+
21+
// ...
22+
import * as tokenRouterSdk from "@wormhole-foundation/example-liquidity-layer-solana/tokenRouter";
23+
import { LiquidityLayerDeposit, LiquidityLayerMessage } from "@wormhole-foundation/example-liquidity-layer-solana/common";
24+
import { PreparedOrder } from "@wormhole-foundation/example-liquidity-layer-solana/tokenRouter/state";
25+
// ...
26+
27+
```
28+

0 commit comments

Comments
 (0)