Skip to content

Commit

Permalink
add status api types
Browse files Browse the repository at this point in the history
  • Loading branch information
nnoln committed Sep 4, 2024
1 parent cb72158 commit e0ce2e3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsquid/squid-types",
"version": "0.1.102",
"version": "0.1.103",
"description": "JS and TS types relating to 0xsquid related projects.",
"main": "dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
23 changes: 21 additions & 2 deletions src/status/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ type TransactionStatus = {
callEventLog: Array<any>;
chainData?: ChainData;
transactionUrl?: string;
destinationAddress?: string;
};

export type YupError = {
path: string;
message: string;
};

export type ApiBasicResponse = {
error?: string | TypeError[] | GMPError;
error?: string | TypeError[] | YupError[] | GMPError;
errorType?: string;
};

Expand Down Expand Up @@ -55,7 +61,7 @@ export type StatusResponse = ApiBasicResponse & {
export type RouteStatus = {
chainId: string | number;
txHash: string;
status: string;
status: RouteActionStatus;
action: AxelarRouteAction;
};

Expand All @@ -70,8 +76,21 @@ export enum AxelarRouteAction {
APPROVED = "approved",
}

export enum RouteActionStatus {
SUCCESS = "success",
FAILURE = "failure",
NOT_FOUND = "not_found",
UNKNOWN = "unknown",
AWAITING = "awaiting",
}

export enum CCTPStatus {
ERROR = "error",
COMPLETE = "complete",
PENDING = "pending",
}

export enum SendTokenStatus {
ASSET_SENT = "asset_sent",
EXECUTED = "executed",
}

0 comments on commit e0ce2e3

Please sign in to comment.