Commit d2a80ce0 authored by Ethen Pociask's avatar Ethen Pociask

[indexer.client] Generated client bindings & updated indexer/.gitignore

parent 567dd291
docker-compose.dev.yml docker-compose.dev.yml
.env .env
/indexer /indexer
api-ts/yarn.lock
api-ts/package-lock.json
\ No newline at end of file
// Code generated by tygo. DO NOT EDIT. // Code generated by tygo. DO NOT EDIT.
////////// //////////
// source: deposits.go // source: models.go
/**
* DepositItem ... Deposit item model for API responses
*/
export interface DepositItem { export interface DepositItem {
guid: string; guid: string;
from: string; from: string;
...@@ -15,29 +18,23 @@ export interface DepositItem { ...@@ -15,29 +18,23 @@ export interface DepositItem {
l1TokenAddress: string; l1TokenAddress: string;
l2TokenAddress: string; l2TokenAddress: string;
} }
/**
* DepositResponse ... Data model for API JSON response
*/
export interface DepositResponse { export interface DepositResponse {
cursor: string; cursor: string;
hasNextPage: boolean; hasNextPage: boolean;
items: DepositItem[]; items: DepositItem[];
} }
/**
////////// * WithdrawalItem ... Data model for API JSON response
// source: routes.go */
export interface Routes {
Logger: any /* log.Logger */;
BridgeTransfersView: any /* database.BridgeTransfersView */;
Router?: any /* chi.Mux */;
}
//////////
// source: withdrawals.go
export interface WithdrawalItem { export interface WithdrawalItem {
guid: string; guid: string;
from: string; from: string;
to: string; to: string;
transactionHash: string; transactionHash: string;
messageHash: string;
timestamp: number /* uint64 */; timestamp: number /* uint64 */;
l2BlockHash: string; l2BlockHash: string;
amount: string; amount: string;
...@@ -46,6 +43,9 @@ export interface WithdrawalItem { ...@@ -46,6 +43,9 @@ export interface WithdrawalItem {
l1TokenAddress: string; l1TokenAddress: string;
l2TokenAddress: string; l2TokenAddress: string;
} }
/**
* WithdrawalResponse ... Data model for API JSON response
*/
export interface WithdrawalResponse { export interface WithdrawalResponse {
cursor: string; cursor: string;
hasNextPage: boolean; hasNextPage: boolean;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
], ],
"scripts": { "scripts": {
"clean": "rm -rf generated.ts indexer.cjs indexer.js", "clean": "rm -rf generated.ts indexer.cjs indexer.js",
"generate": "npm run clean && tygo generate && mv ../api/routes/index.ts generated.ts && tsup", "generate": "npm run clean && tygo generate && mv ../api/models/index.ts generated.ts && tsup",
"test": "vitest" "test": "vitest"
}, },
"keywords": [ "keywords": [
......
packages: packages:
- path: "github.com/ethereum-optimism/optimism/indexer/api/routes" - path: "github.com/ethereum-optimism/optimism/indexer/api/models"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment