diff --git a/scripts/build.sh b/scripts/build.sh index 6ae379be..3e1f9cb3 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,10 +1,18 @@ #!/bin/bash set -e +# TODO: This assumes nibiru is a relative path in the current working directory, but this doesn't work locally cd nibiru git checkout releases/v0.21.x cd .. yarn gql-generate yarn proto-gen yarn build:tsc -yarn docgen + +echo "Fix path resolution" +dist_folder="./dist" +# Go through all ts and js files in the dist folder +find "$dist_folder" -type f \( -name "*.ts" -o -name "*.js" \) -exec sed -i 's|require("@/|require("src/|g' {} + + + +# yarn docgen diff --git a/src/sdk/msg/encode-types.ts b/src/sdk/msg/encode-types.ts index 13f471f3..0fb71b3d 100644 --- a/src/sdk/msg/encode-types.ts +++ b/src/sdk/msg/encode-types.ts @@ -1,9 +1,18 @@ import { EncodeObject } from "@cosmjs/proto-signing" +import { PerpMsgFactory } from "./perp" +import { SpotMsgFactory } from "./spot" export interface MsgTypeUrls { [msg: string]: string } +export declare class MsgFactory { + spot: typeof SpotMsgFactory + perp: typeof PerpMsgFactory +} + +export declare const Msg: MsgFactory + /** TxMessage: a message contained within a transaction. * * @field typeUrl: registered identifier for the proto message