Skip to content

Commit 451ffcd

Browse files
authored
Merge pull request #128 from hyperweb-io/export-all
Export all
2 parents cc5e82b + 85261e3 commit 451ffcd

File tree

11 files changed

+62
-81
lines changed

11 files changed

+62
-81
lines changed

networks/cosmos/src/base/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
export * from './base-signer';
2+
export * from './base-wallet';
3+
export * from './builder-context';
24
export * from './tx-builder';

networks/cosmos/src/index.ts

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1-
throw new Error(
2-
'@interchainjs/cosmos have no entry-point: consult README for usage'
3-
);
1+
// Main exports
2+
export * from './signing-client';
3+
export * from './defaults';
4+
5+
// Types
6+
export * from './types';
7+
8+
// Signers
9+
export * from './signers/amino';
10+
export * from './signers/direct';
11+
12+
// Base
13+
export * from './base';
14+
15+
// Utils
16+
export * from './utils';
17+
18+
// Query
19+
export * from './query/rpc';
20+
21+
// Wallets
22+
export * from './wallets/secp256k1hd';
23+
24+
// Builder
25+
export * from './builder/amino-tx-builder';
26+
export * from './builder/direct-tx-builder';

networks/cosmos/src/signing-client.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ import {
55
AminoConverter,
66
Encoder,
77
QueryClient,
8+
IndexedTx,
9+
TxResponse
810
} from './types';
911
import {
1012
IAminoGenericOfflineSigner,
1113
ICosmosGenericOfflineSigner,
1214
IDirectGenericOfflineSigner,
13-
isOfflineAminoSigner,
14-
isOfflineDirectSigner,
15-
OfflineSigner,
1615
} from './types/wallet';
1716
import { toConverter, toEncoder } from './utils';
1817
import { TxBody, TxRaw } from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx';
@@ -23,11 +22,9 @@ import { fromBase64 } from '@interchainjs/utils';
2322
import {
2423
Block,
2524
BlockResponse,
26-
IndexedTx,
2725
SearchBlockQuery,
2826
SearchTxQuery,
2927
SearchTxQueryObj,
30-
TxResponse,
3128
isSearchBlockQueryObj,
3229
isSearchTxQueryObj,
3330
} from './types/query';

networks/cosmos/src/types/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
export * from './docAuth';
2+
export * from './query';
13
export * from './rpc';
24
export * from './signer';
5+
export * from './wallet';
6+
export * from './signing-client';

networks/cosmos/src/types/query.ts

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,3 @@
1-
import { Event } from '@interchainjs/types';
2-
3-
/** A transaction that is indexed as part of the transaction history */
4-
export interface IndexedTx {
5-
height: number;
6-
/** The position of the transaction within the block. This is a 0-based index. */
7-
txIndex: number;
8-
/** Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex */
9-
hash: string;
10-
/** Transaction execution error code. 0 on success. */
11-
code: number;
12-
events: Event[];
13-
/**
14-
* A string-based log document.
15-
*
16-
* This currently seems to merge attributes of multiple events into one event per type
17-
* (https://github.com/tendermint/tendermint/issues/9595). You might want to use the `events`
18-
* field instead.
19-
*/
20-
rawLog: string;
21-
/**
22-
* Raw transaction bytes stored in Tendermint.
23-
*
24-
* If you hash this, you get the transaction hash (= transaction ID):
25-
*
26-
*/
27-
tx: Uint8Array;
28-
/**
29-
* The message responses of the [TxMsgData](https://github.com/cosmos/cosmos-sdk/blob/v0.46.3/proto/cosmos/base/abci/v1beta1/abci.proto#L128-L140)
30-
* as `Any`s.
31-
* This field is an empty list for chains running Cosmos SDK < 0.46.
32-
*/
33-
msgResponses: Array<{
34-
typeUrl: string;
35-
value: Uint8Array;
36-
}>;
37-
gasUsed: bigint;
38-
gasWanted: bigint;
39-
}
40-
41-
interface ResponseDeliverTx {
42-
code: number;
43-
data: string;
44-
/** nondeterministic */
45-
log: string;
46-
/** nondeterministic */
47-
info: string;
48-
gas_wanted: string;
49-
gas_used: string;
50-
events: Event[];
51-
codespace: string;
52-
}
53-
54-
export interface TxResponse {
55-
hash: string;
56-
height: number;
57-
index: number;
58-
tx: string; // base64 encoded
59-
tx_result: ResponseDeliverTx;
60-
}
61-
621
export type SearchTxQuery =
632
| string
643
| ReadonlyArray<{

networks/cosmos/src/types/rpc.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,9 @@ export interface IndexedTx {
110110
}>;
111111
gasUsed: bigint;
112112
gasWanted: bigint;
113-
data: string;
114-
/** nondeterministic */
115-
log: string;
116-
/** nondeterministic */
117-
info: string;
113+
data?: string;
114+
log?: string;
115+
info?: string;
118116
}
119117

120118
export interface TxResponse {

networks/ethereum/src/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
throw new Error(
2-
'@interchainjs/ethereum have no entry-point: consult README for usage'
3-
);
1+
export * from './api/rpc'
2+
export * from './providers/WebSocketContractMonitor';
3+
export * from './providers/WebSocketProvider';
4+
export * from './signers/SignerFromBrowser';
5+
export * from './signers/SignerFromPrivateKey';
6+
export * from './signers/eip712';
7+
export * from './types';
8+
export * from './utils';
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
export * from './docAuth';
2+
export * from './events';
13
export * from './signer';
4+
export * from './transaction';
5+
export * from './wallet';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export * from './abiEncoder'
2+
export * from './address'
3+
export * from './common'
4+
export * from './ContractEncoder'
5+
export * from './denominations'
6+
export * from './encoding'

networks/injective/src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
throw new Error(
2-
'@interchainjs/injective have no entry-point: consult README for usage'
3-
);
1+
export * from './accounts/inj-account';
2+
export * from './wallets/ethSecp256k1hd';
3+
export * from './defaults';
4+
export * from './utils';

0 commit comments

Comments
 (0)