UNPKG

@bandprotocol/bandchain.js

Version:

TypeScript library for Cosmos SDK and BandChain

160 lines (159 loc) 5.39 kB
import { MsgRequestData, MsgReportData, MsgCreateDataSource, MsgEditDataSource, MsgCreateOracleScript, MsgEditOracleScript, MsgActivate, MsgUpdateParams } from "./tx"; export const registry = [["/band.oracle.v1.MsgRequestData", MsgRequestData], ["/band.oracle.v1.MsgReportData", MsgReportData], ["/band.oracle.v1.MsgCreateDataSource", MsgCreateDataSource], ["/band.oracle.v1.MsgEditDataSource", MsgEditDataSource], ["/band.oracle.v1.MsgCreateOracleScript", MsgCreateOracleScript], ["/band.oracle.v1.MsgEditOracleScript", MsgEditOracleScript], ["/band.oracle.v1.MsgActivate", MsgActivate], ["/band.oracle.v1.MsgUpdateParams", MsgUpdateParams]]; export const load = (protoRegistry) => { registry.forEach(([typeUrl, mod]) => { protoRegistry.register(typeUrl, mod); }); }; export const MessageComposer = { encoded: { requestData(value) { return { typeUrl: "/band.oracle.v1.MsgRequestData", value: MsgRequestData.encode(value).finish() }; }, reportData(value) { return { typeUrl: "/band.oracle.v1.MsgReportData", value: MsgReportData.encode(value).finish() }; }, createDataSource(value) { return { typeUrl: "/band.oracle.v1.MsgCreateDataSource", value: MsgCreateDataSource.encode(value).finish() }; }, editDataSource(value) { return { typeUrl: "/band.oracle.v1.MsgEditDataSource", value: MsgEditDataSource.encode(value).finish() }; }, createOracleScript(value) { return { typeUrl: "/band.oracle.v1.MsgCreateOracleScript", value: MsgCreateOracleScript.encode(value).finish() }; }, editOracleScript(value) { return { typeUrl: "/band.oracle.v1.MsgEditOracleScript", value: MsgEditOracleScript.encode(value).finish() }; }, activate(value) { return { typeUrl: "/band.oracle.v1.MsgActivate", value: MsgActivate.encode(value).finish() }; }, updateParams(value) { return { typeUrl: "/band.oracle.v1.MsgUpdateParams", value: MsgUpdateParams.encode(value).finish() }; } }, withTypeUrl: { requestData(value) { return { typeUrl: "/band.oracle.v1.MsgRequestData", value }; }, reportData(value) { return { typeUrl: "/band.oracle.v1.MsgReportData", value }; }, createDataSource(value) { return { typeUrl: "/band.oracle.v1.MsgCreateDataSource", value }; }, editDataSource(value) { return { typeUrl: "/band.oracle.v1.MsgEditDataSource", value }; }, createOracleScript(value) { return { typeUrl: "/band.oracle.v1.MsgCreateOracleScript", value }; }, editOracleScript(value) { return { typeUrl: "/band.oracle.v1.MsgEditOracleScript", value }; }, activate(value) { return { typeUrl: "/band.oracle.v1.MsgActivate", value }; }, updateParams(value) { return { typeUrl: "/band.oracle.v1.MsgUpdateParams", value }; } }, fromPartial: { requestData(value) { return { typeUrl: "/band.oracle.v1.MsgRequestData", value: MsgRequestData.fromPartial(value) }; }, reportData(value) { return { typeUrl: "/band.oracle.v1.MsgReportData", value: MsgReportData.fromPartial(value) }; }, createDataSource(value) { return { typeUrl: "/band.oracle.v1.MsgCreateDataSource", value: MsgCreateDataSource.fromPartial(value) }; }, editDataSource(value) { return { typeUrl: "/band.oracle.v1.MsgEditDataSource", value: MsgEditDataSource.fromPartial(value) }; }, createOracleScript(value) { return { typeUrl: "/band.oracle.v1.MsgCreateOracleScript", value: MsgCreateOracleScript.fromPartial(value) }; }, editOracleScript(value) { return { typeUrl: "/band.oracle.v1.MsgEditOracleScript", value: MsgEditOracleScript.fromPartial(value) }; }, activate(value) { return { typeUrl: "/band.oracle.v1.MsgActivate", value: MsgActivate.fromPartial(value) }; }, updateParams(value) { return { typeUrl: "/band.oracle.v1.MsgUpdateParams", value: MsgUpdateParams.fromPartial(value) }; } } };