Skip to content
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
3 changes: 0 additions & 3 deletions networks/ethereum/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
export * from './docAuth';
export * from './events';
export * from './signer';
export * from './transaction';
export * from './wallet';
1 change: 0 additions & 1 deletion networks/ethereum/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ export * from './abiEncoder'
export * from './address'
export * from './common'
export * from './ContractEncoder'
export * from './denominations'
export * from './encoding'
95 changes: 1 addition & 94 deletions networks/injective/src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { toDecoder } from '@interchainjs/cosmos/utils';
import { BaseAccount } from '@interchainjs/cosmos-types/cosmos/auth/v1beta1/auth';
import { PubKey as Secp256k1PubKey } from '@interchainjs/cosmos-types/cosmos/crypto/secp256k1/keys';
import { EthAccount } from '@interchainjs/cosmos-types/injective/types/v1beta1/account';
import { Eip712Doc } from '@interchainjs/ethereum/types';
import { IKey, SignerConfig } from '@interchainjs/types';

import { DomainOptions, EthereumChainId } from './types';
Expand Down Expand Up @@ -87,96 +86,4 @@ export const defaultDomainOptions: Required<DomainOptions> = {
ethereumChainId: EthereumChainId.Injective,
salt: '0',
verifyingContract: 'cosmos',
};

export const defaultEip712Types: Pick<Eip712Doc, 'types' | 'primaryType'> = {
primaryType: 'Tx',
types: {
EIP712Domain: [
{
name: 'name',
type: 'string',
},
{
name: 'version',
type: 'string',
},
{
name: 'chainId',
type: 'uint256',
},
{
name: 'verifyingContract',
type: 'string',
},
{
name: 'salt',
type: 'string',
},
],
Tx: [
{
name: 'account_number',
type: 'string',
},
{
name: 'chain_id',
type: 'string',
},
{
name: 'fee',
type: 'Fee',
},
{
name: 'memo',
type: 'string',
},
{
name: 'msgs',
type: 'Msg[]',
},
{
name: 'sequence',
type: 'string',
},
{
name: 'timeout_height',
type: 'string',
},
],
Fee: [
{
name: 'feePayer',
type: 'string',
},
{
name: 'amount',
type: 'Coin[]',
},
{
name: 'gas',
type: 'string',
},
],
Coin: [
{
name: 'denom',
type: 'string',
},
{
name: 'amount',
type: 'string',
},
],
Msg: [
{
name: 'type',
type: 'string',
},
{
name: 'value',
type: 'MsgValue',
},
],
},
};
};
13 changes: 0 additions & 13 deletions networks/injective/src/types/signer.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
import {
CosmosSignArgs,
DocOptions as CosmosDocOptions,
} from '@interchainjs/cosmos/types';
import {
CosmosAminoSigner,
CosmosDirectSigner,
UniCosmosBaseSigner,
} from '@interchainjs/cosmos/types';
import {
BaseWalletAccount,
Eip712Data,
InjectiveDomain,
InjectiveEip712Message,
} from '@interchainjs/types';

export type InjectiveDirectSigner = CosmosDirectSigner;
export type InjectiveAminoSigner = CosmosAminoSigner;
export type InjectiveEip712Signer = UniCosmosBaseSigner<InjectiveEip712Doc>;

export interface InjectiveAccount extends BaseWalletAccount {
cosmosAddress: string;
ethereumAddress: string;
}

export type InjectiveEip712Doc = Eip712Data<
InjectiveDomain,
InjectiveEip712Message
>;

export type InjectiveEip712SignArgs = CosmosSignArgs<DocOptions>;

export enum EthereumChainId {
Mainnet = 1,
Ropsten = 3,
Expand Down
Loading