Skip to content

Commit ca111b9

Browse files
committed
feat: add search ts types for address, transaction, block, epoch and token
1 parent 6a8b7ad commit ca111b9

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

frontend/types/api/search.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
// Code generated by tygo. DO NOT EDIT.
22
/* eslint-disable */
3+
import type { Address, Hash } from './common'
34

45
//////////
56
// source: search.go
67

8+
export interface PostSearchRequest {
9+
input: string;
10+
networks?: (number | string)[];
11+
types?: string[];
12+
}
713
export interface SearchValidator {
814
index: number /* uint64 */;
915
public_key: string;
@@ -26,11 +32,27 @@ export interface SearchValidatorsByGraffiti {
2632
hex: string;
2733
count: number /* uint64 */;
2834
}
35+
export interface SearchAddress {
36+
address: Address;
37+
}
38+
export interface SearchTransaction {
39+
transaction_hash: Hash;
40+
}
41+
export interface SearchBlock {
42+
block_number: number /* uint64 */;
43+
}
44+
export interface SearchEpoch {
45+
epoch: number /* uint64 */;
46+
}
47+
export interface SearchToken {
48+
address: Address;
49+
token: 'erc20' | 'erc721' | 'erc1155';
50+
}
2951
export interface SearchResult {
3052
type: string;
3153
chain_id: number /* uint64 */;
3254
value: any;
3355
}
3456
export interface InternalPostSearchResponse {
35-
data: ({ type: 'validator'; chain_id: number; value: SearchValidator } | { type: 'validator_list'; chain_id: number; value: SearchValidatorList } | { type: 'validators_by_deposit_address'; chain_id: number; value: SearchValidatorsByDepositAddress } | { type: 'validators_by_withdrawal_credential'; chain_id: number; value: SearchValidatorsByWithdrawalCredential } | { type: 'validators_by_graffiti'; chain_id: number; value: SearchValidatorsByGraffiti })[];
57+
data: ({ type: 'validator'; chain_id: number; value: SearchValidator } | { type: 'validator_list'; chain_id: number; value: SearchValidatorList } | { type: 'validators_by_deposit_address'; chain_id: number; value: SearchValidatorsByDepositAddress } | { type: 'validators_by_withdrawal_credential'; chain_id: number; value: SearchValidatorsByWithdrawalCredential } | { type: 'validators_by_graffiti'; chain_id: number; value: SearchValidatorsByGraffiti } | { type: 'address'; chain_id: number; value: SearchAddress } | { type: 'transaction'; chain_id: number; value: SearchTransaction } | { type: 'block'; chain_id: number; value: SearchBlock } | { type: 'epoch'; chain_id: number; value: SearchEpoch } | { type: 'token'; chain_id: number; value: SearchToken })[];
3658
}

0 commit comments

Comments
 (0)