Skip to content

Commit

Permalink
holy wow i did it
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Oct 30, 2024
1 parent 6f9fb54 commit 8cfda8c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions simapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,38 @@ yarn
# publish
npm publish
```


## Connect to a TS locally without publish

```bash
cd chain-js
yarn link

mkdir t # testing
cd t

npm i typescript --save-dev
npx tsc --init

touch index.ts

```ts
import {nameservice} from '@reecepbcups/chain-js';
console.log(`Hello world`);
const client = nameservice.ClientFactory.createRPCQueryClient({ rpcEndpoint: 'http://localhost:26657' });
client.then((client) => {
client.nameservice.v1.params().then((res) => {
console.log(res);
});
});
```
yarn link "@reecepbcups/chain-js" # TODO: just simlink directly with relative paths
npx ts-node index.ts
```

0 comments on commit 8cfda8c

Please sign in to comment.