Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade telescope and regen #78

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/injective-react/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
6 changes: 3 additions & 3 deletions libs/injective-react/src/helper-func-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down Expand Up @@ -43,7 +43,7 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {

export interface ITxArgs<TMsg> {
signerAddress: string;
message: TMsg;
message: TMsg | TMsg[];
fee: StdFee | 'auto';
memo: string;
}
Expand Down Expand Up @@ -86,7 +86,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {

return async (
signerAddress: string,
message: TMsg,
message: TMsg | TMsg[],
fee: StdFee | 'auto',
memo: string
): Promise<DeliverTxResponse> => {
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
4 changes: 2 additions & 2 deletions libs/injective-react/src/react-query.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down Expand Up @@ -147,7 +147,7 @@ export interface ReactMutationParams<TData, TError, TVariables, TContext = unkno
export interface UseMutationBuilderOptions<TMsg> {
builderMutationFn: (clientResolver?: SigningClientResolver) => (
signerAddress: string,
message: TMsg,
message: TMsg | TMsg[],
fee: StdFee | 'auto',
memo: string
) => Promise<DeliverTxResponse>,
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-react/src/varint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/varint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injective-vue/src/vue-query.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
6 changes: 3 additions & 3 deletions libs/injectivejs/src/helper-func-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down Expand Up @@ -43,7 +43,7 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {

export interface ITxArgs<TMsg> {
signerAddress: string;
message: TMsg;
message: TMsg | TMsg[];
fee: StdFee | 'auto';
memo: string;
}
Expand Down Expand Up @@ -86,7 +86,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {

return async (
signerAddress: string,
message: TMsg,
message: TMsg | TMsg[],
fee: StdFee | 'auto',
memo: string
): Promise<DeliverTxResponse> => {
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/injectivejs/src/varint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
53 changes: 22 additions & 31 deletions libs/interchain-react/src/helper-func-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand All @@ -22,23 +22,23 @@ export interface QueryBuilderOptions<TReq, TRes> {
}

export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {
registerDependencies(opts.deps ?? []);
registerDependencies(opts.deps ?? []);

return async (request: TReq) => {
let rpc: Rpc | undefined;
return async (request: TReq) => {
let rpc: Rpc | undefined;

if (isRpc(opts.clientResolver)) {
rpc = opts.clientResolver;
} else {
rpc = opts.clientResolver ? await getRpcClient(opts.clientResolver) : undefined;
}
if(isRpc(opts.clientResolver)) {
rpc = opts.clientResolver;
} else {
rpc = opts.clientResolver ? await getRpcClient(opts.clientResolver) : undefined;
}

if (!rpc) throw new Error("Query Rpc is not initialized");
if (!rpc) throw new Error("Query Rpc is not initialized");

const data = opts.encode(request).finish();
const response = await rpc.request(opts.service, opts.method, data);
return opts.decode(response);
};
const data = opts.encode(request).finish();
const response = await rpc.request(opts.service, opts.method, data);
return opts.decode(response);
};
}

export interface ITxArgs<TMsg> {
Expand Down Expand Up @@ -93,7 +93,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
let client: ISigningClient | undefined;

// if opts.getSigningClient is a function, call it to get the SigningClient instance
if (isISigningClient(opts.clientResolver)) {
if(isISigningClient(opts.clientResolver)) {
client = opts.clientResolver;
}

Expand All @@ -103,21 +103,12 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
client.addEncoders(opts.encoders ?? []);
client.addConverters(opts.converters ?? []);

const data = Array.isArray(message) ?
message.map(msg => {
return {
typeUrl: opts.typeUrl,
value: msg,
}
}) :
[
{
typeUrl: opts.typeUrl,
value: message,
},
];


const data = [
{
typeUrl: opts.typeUrl,
value: message,
},
];
return client.signAndBroadcast!(signerAddress, data, fee, memo);
};
}
Expand Down Expand Up @@ -205,7 +196,7 @@ export interface AminoConverter {
}

export type SigningClientResolver = string | HttpEndpoint | ISigningClient;
export type RpcResolver = string | HttpEndpoint | Rpc;
export type RpcResolver = string | HttpEndpoint | Rpc ;

function registerDependencies(deps: TelescopeGeneratedCodec<any, any, any>[]) {
for (const dep of deps) {
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/react-query.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-react/src/varint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-vue/src/binary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-vue/src/extern.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-vue/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/interchain-vue/src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This file and any referenced files were automatically generated by @cosmology/[email protected].7
* This file and any referenced files were automatically generated by @cosmology/[email protected].8
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/
Expand Down
Loading
Loading