Skip to content

Commit f290ddd

Browse files
committed
use @interchianjs/encoding
1 parent df5d973 commit f290ddd

File tree

9 files changed

+15
-10
lines changed

9 files changed

+15
-10
lines changed

networks/cosmos/src/types/codec/converters.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* Common converter functions for API response transformation
33
*/
44

5-
import { fromBase64, fromHex, apiToNumber as encApiToNumber, apiToBigInt as encApiToBigInt } from '@interchainjs/encoding';
5+
import { fromHex, apiToNumber as encApiToNumber, apiToBigInt as encApiToBigInt } from '@interchainjs/encoding';
6+
import { fromBase64 } from '@interchainjs/encoding/base64';
67

78
// Create wrapper functions that match the expected signatures for backward compatibility
89
export const apiToNumber = (value: unknown): number => {

networks/cosmos/src/types/codec/pubkey.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fromBase64 } from '@interchainjs/utils';
1+
import { fromBase64 } from '@interchainjs/encoding/base64';
22

33
export interface DecodedPubkey {
44
readonly type: string;
@@ -7,7 +7,7 @@ export interface DecodedPubkey {
77

88
export function decodePubkey(data: any): DecodedPubkey | null {
99
if (!data) return null;
10-
10+
1111
return {
1212
type: data.type || '',
1313
value: fromBase64(data.value || '')

networks/cosmos/src/types/requests/common/block/block-by-hash-params.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { createCodec } from '../../../codec';
66
import { ensureString } from '../../../codec/converters';
77
import { EncodedBlockByHashParams } from './encoded-block-by-hash-params';
88
import { fromHex } from '@interchainjs/encoding';
9-
import { toBase64 } from '@interchainjs/encoding';
9+
import { toBase64 } from '@interchainjs/encoding/base64';
1010

1111
export interface BlockByHashParams {
1212
readonly hash: string;

networks/cosmos/src/types/requests/common/tx/broadcast-tx-params.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44

55
import { createCodec } from '../../../codec';
6-
import { toBase64 } from '@interchainjs/utils';
6+
import { toBase64 } from '@interchainjs/encoding/base64';
77
import { EncodedBroadcastTxParams } from './encoded-broadcast-tx-params';
88

99
export interface BroadcastTxParams {

networks/cosmos/src/types/responses/common/commit/commit-signature.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
import { createCodec } from '../../../codec';
66
import { ensureNumber, ensureDate } from '../../../codec/converters';
7-
import { fromBase64, fromHex } from '@interchainjs/encoding';
7+
import { fromHex } from '@interchainjs/encoding';
8+
import { fromBase64 } from '@interchainjs/encoding/base64';
89

910
// BlockIdFlag enum
1011
export enum BlockIdFlag {

networks/cosmos/src/types/responses/common/tx/check-tx-response.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import { createCodec } from '../../../codec';
66
import { ensureNumber, ensureBigInt } from '../../../codec/converters';
7-
import { fromBase64 } from '@interchainjs/encoding';
7+
import { fromBase64 } from '@interchainjs/encoding/base64';
88

99
// Types
1010
export interface CheckTxResponse {

networks/cosmos/src/workflows/plugins/amino-signature.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { BaseWorkflowBuilderPlugin } from '@interchainjs/types';
22
import { CosmosWorkflowBuilderContext } from '../context';
33
import { StdSignDoc } from '@interchainjs/types';
4-
import { BaseCryptoBytes, fromBase64 } from '@interchainjs/utils';
4+
import { BaseCryptoBytes } from '@interchainjs/utils';
5+
import { fromBase64 } from '@interchainjs/encoding/base64';
56
import { CosmosDirectDoc, CosmosAminoDoc, CosmosSignerConfig } from '../../signers/types';
67
import { AMINO_SIGN_DOC_STAGING_KEYS } from './amino-sign-doc';
78
import { INPUT_VALIDATION_STAGING_KEYS } from './input-validation';

networks/cosmos/src/workflows/plugins/direct-signature.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { BaseWorkflowBuilderPlugin } from '@interchainjs/types';
22
import { CosmosWorkflowBuilderContext } from '../context';
33
import { SignDoc } from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx';
4-
import { BaseCryptoBytes, fromBase64 } from '@interchainjs/utils';
4+
import { BaseCryptoBytes } from '@interchainjs/utils';
5+
import { fromBase64 } from '@interchainjs/encoding/base64';
56
import { CosmosDirectDoc, CosmosAminoDoc, CosmosSignerConfig } from '../../signers/types';
67
import { DIRECT_SIGN_DOC_STAGING_KEYS } from './direct-sign-doc';
78
import { INPUT_VALIDATION_STAGING_KEYS } from './input-validation';

networks/cosmos/starship/__tests__/gov.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import {
1616
BondStatus,
1717
bondStatusToJSON,
1818
} from 'interchainjs/cosmos/staking/v1beta1/staking';
19-
import { fromBase64, toUtf8 } from '@interchainjs/utils';
19+
import { fromBase64 } from '@interchainjs/encoding/base64';
20+
import { toUtf8 } from '@interchainjs/utils';
2021
import { BigNumber } from 'bignumber.js';
2122
import { useChain } from 'starshipjs';
2223

0 commit comments

Comments
 (0)