https://github.com/graphprotocol/osmosis-ts
https://github.com/graphprotocol/osmosis-ts
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/graphprotocol/osmosis-ts
- Owner: graphprotocol
- Created: 2022-06-03T15:28:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-05T02:57:53.000Z (almost 3 years ago)
- Last Synced: 2024-12-25T16:09:40.023Z (about 1 year ago)
- Language: TypeScript
- Size: 309 KB
- Stars: 0
- Watchers: 11
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# osmosis-ts
TypeScript/AssemblyScript library for decoding Osmosis messages.
## Usage
```typescript
import { osmosis, google } from "@graphprotocol/osmosis-ts";
function logSender(any: google.protobuf.Any) {
if (any.typeUrl == '/osmosis.gamm.v1beta1.MsgSwapExactAmountOut') {
const message = osmosis.gamm.v1beta1.decodeMsgSwapExactAmountOut(any.value);
console.log(message.sender);
}
}
```
## Development
Install [Protocol Buffer Compiler](https://github.com/protocolbuffers/protobuf/releases) (`protoc`) and [Lerna](https://lerna.js.org/).
### Fetch dependencies
```bash
git submodule update --init --force
```
### Build and test
```bash
yarn install
yarn build
yarn test
```
## Update dependencies
In order to update a dependency, change the value of the `branch` option in the corresponding section of the `.gitmodules` file.
> **Note**
> A submodule should always point to a tag.
```bash
git -C checkout
yarn build
yarn test
git commit -m
```