-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e746af4
commit f313b1f
Showing
9 changed files
with
132 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
interface Person { | ||
firstName: string; | ||
lastName: string; | ||
} | ||
export declare function greeter(person: Person): string; | ||
export {}; |
Empty file.
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { HealthRes, AuthRes, EntryPointRes, StrategyRes, UserOpReq, TryPayUserOpRes } from '@/types/response'; | ||
/** | ||
* Change the base url to the production or development url | ||
* | ||
* @param isProdUrl is production url | ||
*/ | ||
export declare function init(isProdUrl?: boolean): void; | ||
/** | ||
* | ||
* @returns server is health or not | ||
*/ | ||
export declare const health: () => Promise<HealthRes | any>; | ||
/** | ||
* | ||
* @param apiKey | ||
* @returns | ||
*/ | ||
export declare const auth: (apiKey: string) => Promise<AuthRes | any>; | ||
export declare const getSupportEntryPointV1: (network?: string) => Promise<EntryPointRes | any>; | ||
export declare const getSupportStrategyV1: (network?: string) => Promise<StrategyRes | any>; | ||
export declare const tryPayUserOperationV1: (data: UserOpReq) => Promise<TryPayUserOpRes | any>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
interface BaseRes { | ||
code: number; | ||
message: string; | ||
cost: string; | ||
} | ||
export interface HealthRes extends BaseRes { | ||
data: { | ||
environment: string; | ||
hello: string; | ||
time: string; | ||
version: string; | ||
}; | ||
} | ||
export interface AuthRes { | ||
code: number; | ||
expire: string; | ||
token: string; | ||
} | ||
export interface EntryPoint { | ||
address: string; | ||
desc: string; | ||
network: string; | ||
strategy_id: string; | ||
} | ||
export interface EntryPointRes extends BaseRes { | ||
data: EntryPoint[]; | ||
} | ||
interface ExecuteRestriction { | ||
ban_sender_address: string; | ||
effective_start_time: number; | ||
effective_end_time: number; | ||
global_max_usd: number; | ||
global_max_op_count: number; | ||
} | ||
interface Strategy { | ||
description: string; | ||
enable_4844: boolean; | ||
enable_7560: boolean; | ||
enable_currency: boolean; | ||
enable_eoa: boolean; | ||
enable_erc20: boolean; | ||
entrypoint_address: string; | ||
entrypoint_tag: string; | ||
execute_restriction: ExecuteRestriction[]; | ||
id: string; | ||
network: string; | ||
pay_type: string; | ||
paymaster_address: string; | ||
token: string; | ||
} | ||
export interface StrategyRes extends BaseRes { | ||
data: Strategy[]; | ||
} | ||
export interface TryPayUserOpRes extends BaseRes { | ||
data: { | ||
strategy_id: string; | ||
entrypoint_address: string; | ||
paymaster_address: string; | ||
paymaster_signature: string; | ||
paymaster_and_data: string; | ||
pay_receipt: { | ||
transaction_hash: string; | ||
sponsor: string; | ||
}; | ||
gas_info: { | ||
gas_info: { | ||
max_base_price_wei: number; | ||
max_base_price_gwei: number; | ||
max_base_price_ether: string; | ||
max_priority_price_wei: number; | ||
max_priority_price_gwei: number; | ||
max_priority_price_ether: string; | ||
}; | ||
token_cost: string; | ||
network: string; | ||
token: string; | ||
usd_cost: number; | ||
blob_enable: boolean; | ||
max_fee: number; | ||
}; | ||
}; | ||
} | ||
export interface UserOpReq { | ||
forceStrategyId: string; | ||
userOperation: { | ||
callData: string; | ||
callGasLimit: string; | ||
initCode: string; | ||
maxFeePerGas: string; | ||
maxPriorityFeePerGas: string; | ||
nonce: string; | ||
preVerificationGas: string; | ||
sender: string; | ||
signature: string; | ||
verificationGasLimit: string; | ||
paymasterAndData: string; | ||
}; | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare const Path: { | ||
[key: string]: string; | ||
}; | ||
export default Path; |