safehands-pharos 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +64 -26
- package/README.md +333 -445
- package/dist/cli.d.ts +5 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +124 -98
- package/dist/cli.js.map +1 -1
- package/dist/demo.d.ts +1 -1
- package/dist/demo.js +171 -171
- package/dist/index.d.ts +2 -2
- package/dist/index.js +138 -85
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +1 -1
- package/dist/init.js +65 -65
- package/dist/lib/auditLog.d.ts +9 -0
- package/dist/lib/auditLog.d.ts.map +1 -0
- package/dist/lib/auditLog.js +30 -0
- package/dist/lib/auditLog.js.map +1 -0
- package/dist/lib/constants.d.ts +291 -291
- package/dist/lib/constants.js +292 -292
- package/dist/lib/dodoApi.d.ts +78 -70
- package/dist/lib/dodoApi.d.ts.map +1 -1
- package/dist/lib/dodoApi.js +196 -178
- package/dist/lib/dodoApi.js.map +1 -1
- package/dist/lib/http.d.ts +14 -14
- package/dist/lib/http.js +118 -118
- package/dist/lib/pharosClient.d.ts +58 -58
- package/dist/lib/pharosClient.d.ts.map +1 -1
- package/dist/lib/pharosClient.js +63 -53
- package/dist/lib/pharosClient.js.map +1 -1
- package/dist/lib/policy/actionPolicyEngine.d.ts +53 -53
- package/dist/lib/policy/actionPolicyEngine.js +212 -212
- package/dist/lib/riskEngine.d.ts +26 -26
- package/dist/lib/riskEngine.js +283 -283
- package/dist/lib/signer/index.d.ts +24 -24
- package/dist/lib/signer/index.d.ts.map +1 -1
- package/dist/lib/signer/index.js +88 -89
- package/dist/lib/signer/index.js.map +1 -1
- package/dist/lib/spendAccumulator.d.ts +10 -0
- package/dist/lib/spendAccumulator.d.ts.map +1 -0
- package/dist/lib/spendAccumulator.js +54 -0
- package/dist/lib/spendAccumulator.js.map +1 -0
- package/dist/lib/testDodoLive.d.ts +1 -1
- package/dist/lib/testDodoLive.js +104 -104
- package/dist/lib/testLiveSafehands.d.ts +1 -1
- package/dist/lib/testLiveSafehands.js +92 -92
- package/dist/lib/testRpc.d.ts +1 -1
- package/dist/lib/testRpc.js +29 -29
- package/dist/lib/testRpcLive.d.ts +1 -1
- package/dist/lib/testRpcLive.js +88 -88
- package/dist/lib/testTools.d.ts +1 -1
- package/dist/lib/testTools.js +397 -397
- package/dist/lib/testX402Live.d.ts +1 -1
- package/dist/lib/testX402Live.js +159 -159
- package/dist/lib/toolResponse.d.ts +25 -25
- package/dist/lib/toolResponse.js +53 -53
- package/dist/lib/wallet/index.d.ts +37 -18
- package/dist/lib/wallet/index.d.ts.map +1 -1
- package/dist/lib/wallet/index.js +128 -70
- package/dist/lib/wallet/index.js.map +1 -1
- package/dist/scripts/checkDeploy.d.ts +1 -1
- package/dist/scripts/checkDeploy.js +24 -24
- package/dist/scripts/deployRegistry.d.ts +1 -1
- package/dist/scripts/deployRegistry.js +100 -100
- package/dist/scripts/testRegistry.d.ts +1 -1
- package/dist/scripts/testRegistry.js +43 -43
- package/dist/tools/approveToken.d.ts +45 -46
- package/dist/tools/approveToken.d.ts.map +1 -1
- package/dist/tools/approveToken.js +85 -83
- package/dist/tools/approveToken.js.map +1 -1
- package/dist/tools/assessRisk.d.ts +79 -79
- package/dist/tools/assessRisk.d.ts.map +1 -1
- package/dist/tools/assessRisk.js +104 -93
- package/dist/tools/assessRisk.js.map +1 -1
- package/dist/tools/checkAllowance.d.ts +43 -36
- package/dist/tools/checkAllowance.d.ts.map +1 -1
- package/dist/tools/checkAllowance.js +56 -42
- package/dist/tools/checkAllowance.js.map +1 -1
- package/dist/tools/checkTokenSecurity.d.ts +46 -46
- package/dist/tools/checkTokenSecurity.d.ts.map +1 -1
- package/dist/tools/checkTokenSecurity.js +95 -88
- package/dist/tools/checkTokenSecurity.js.map +1 -1
- package/dist/tools/createAgentWallet.d.ts +26 -26
- package/dist/tools/createAgentWallet.d.ts.map +1 -1
- package/dist/tools/createAgentWallet.js +58 -59
- package/dist/tools/createAgentWallet.js.map +1 -1
- package/dist/tools/estimateGas.d.ts +79 -79
- package/dist/tools/estimateGas.js +124 -124
- package/dist/tools/executeSwap.d.ts +61 -59
- package/dist/tools/executeSwap.d.ts.map +1 -1
- package/dist/tools/executeSwap.js +141 -129
- package/dist/tools/executeSwap.js.map +1 -1
- package/dist/tools/explainRisk.d.ts +29 -29
- package/dist/tools/explainRisk.js +32 -32
- package/dist/tools/getAgentWallet.d.ts +21 -21
- package/dist/tools/getAgentWallet.js +27 -27
- package/dist/tools/getAgentWalletBalance.d.ts +11 -11
- package/dist/tools/getAgentWalletBalance.js +70 -70
- package/dist/tools/getExecutionHistory.d.ts +49 -51
- package/dist/tools/getExecutionHistory.d.ts.map +1 -1
- package/dist/tools/getExecutionHistory.js +154 -93
- package/dist/tools/getExecutionHistory.js.map +1 -1
- package/dist/tools/getGasPrice.d.ts +43 -43
- package/dist/tools/getGasPrice.js +59 -59
- package/dist/tools/getPoolInfo.d.ts +75 -75
- package/dist/tools/getPoolInfo.js +137 -137
- package/dist/tools/getTokenPrice.d.ts +113 -113
- package/dist/tools/getTokenPrice.js +117 -117
- package/dist/tools/getTransactionStatus.d.ts +43 -57
- package/dist/tools/getTransactionStatus.d.ts.map +1 -1
- package/dist/tools/getTransactionStatus.js +59 -67
- package/dist/tools/getTransactionStatus.js.map +1 -1
- package/dist/tools/getWalletBalance.d.ts +68 -68
- package/dist/tools/getWalletBalance.js +87 -87
- package/dist/tools/publishRiskScore.d.ts +63 -63
- package/dist/tools/publishRiskScore.d.ts.map +1 -1
- package/dist/tools/publishRiskScore.js +88 -85
- package/dist/tools/publishRiskScore.js.map +1 -1
- package/dist/tools/queryRiskRegistry.d.ts +38 -48
- package/dist/tools/queryRiskRegistry.d.ts.map +1 -1
- package/dist/tools/queryRiskRegistry.js +55 -60
- package/dist/tools/queryRiskRegistry.js.map +1 -1
- package/dist/tools/safehandsPreflightCheck.d.ts +77 -77
- package/dist/tools/safehandsPreflightCheck.js +47 -47
- package/dist/tools/safehandsRiskReport.d.ts +81 -81
- package/dist/tools/safehandsRiskReport.js +28 -28
- package/dist/tools/safehandsSafeExecute.d.ts +20 -20
- package/dist/tools/safehandsSafeExecute.d.ts.map +1 -1
- package/dist/tools/safehandsSafeExecute.js +81 -75
- package/dist/tools/safehandsSafeExecute.js.map +1 -1
- package/dist/tools/safehandsWalletHealth.d.ts +14 -14
- package/dist/tools/safehandsWalletHealth.js +103 -103
- package/dist/tools/safehandsX402Preflight.d.ts +26 -26
- package/dist/tools/safehandsX402Preflight.js +65 -65
- package/dist/tools/sendPayment.d.ts +57 -58
- package/dist/tools/sendPayment.d.ts.map +1 -1
- package/dist/tools/sendPayment.js +117 -108
- package/dist/tools/sendPayment.js.map +1 -1
- package/dist/tools/simulateTransaction.d.ts +60 -81
- package/dist/tools/simulateTransaction.d.ts.map +1 -1
- package/dist/tools/simulateTransaction.js +83 -88
- package/dist/tools/simulateTransaction.js.map +1 -1
- package/dist/tools/tokenRegistryStatus.d.ts +26 -26
- package/dist/tools/tokenRegistryStatus.js +96 -96
- package/dist/tools/x402PayAndFetch.d.ts +81 -81
- package/dist/tools/x402PayAndFetch.d.ts.map +1 -1
- package/dist/tools/x402PayAndFetch.js +152 -149
- package/dist/tools/x402PayAndFetch.js.map +1 -1
- package/dist/x402Server.d.ts +1 -1
- package/dist/x402Server.js +252 -252
- package/examples/dashboard/index.html +337 -0
- package/package.json +83 -84
- package/.agents/skill/safehands/SKILL.md +0 -212
- package/.agents/skill/safehands/assets/networks.json +0 -24
- package/.agents/skill/safehands/assets/tokens.json +0 -66
- package/.agents/wallets.json +0 -20
- package/docs/reports/OFFICIAL_DOCS_ALIGNMENT_REPORT.md +0 -137
- package/docs/reports/final_audit_report.md +0 -307
- package/docs/reports/live_verification_report.md +0 -147
- package/docs/reports/pharos_skill_engine_alignment_report.md +0 -85
package/dist/lib/constants.d.ts
CHANGED
|
@@ -1,292 +1,292 @@
|
|
|
1
|
-
export declare const PHAROS_ENVIRONMENT: string;
|
|
2
|
-
export declare const CHAIN_ID: number;
|
|
3
|
-
export declare const RPC_URL: string;
|
|
4
|
-
export declare const EXPLORER_BASE: string;
|
|
5
|
-
export declare const IS_MAINNET = false;
|
|
6
|
-
export declare const CHAIN_REGISTRY: {
|
|
7
|
-
readonly pharosAtlanticTestnet: {
|
|
8
|
-
readonly environment: "atlantic-testnet";
|
|
9
|
-
readonly chainId: 688689;
|
|
10
|
-
readonly isMainnet: false;
|
|
11
|
-
readonly rpcUrlEnv: "PHAROS_RPC_URL";
|
|
12
|
-
readonly defaultRpcUrl: "https://atlantic.dplabs-internal.com/";
|
|
13
|
-
readonly explorerUrl: "https://atlantic.pharosscan.xyz/";
|
|
14
|
-
readonly docsSource: "https://docs.pharosnetwork.xyz/developer-guide/hardhat/write-your-first-nft";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
/** Native PHRS — sentinel address used by DODO API for native token */
|
|
18
|
-
export declare const PHRS_ADDRESS: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
19
|
-
export declare const USDT_ADDRESS: "0xE7E84B8B4f39C507499c40B4ac199B050e2882d5";
|
|
20
|
-
/** Primary USDC for Pharos Skill Engine (from official tokens.json) */
|
|
21
|
-
export declare const USDC_ADDRESS: "0xE0BE08c77f415F577A1B3A9aD7a1Df1479564ec8";
|
|
22
|
-
/** Alternate USDC listed by Circle's contract addresses page (not in Skill Engine tokens.json) */
|
|
23
|
-
export declare const CIRCLE_USDC_ADDRESS: "0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B";
|
|
24
|
-
/** @deprecated Use USDC_ADDRESS instead. Kept for backward compatibility. */
|
|
25
|
-
export declare const X402_DEMO_USDC_ADDRESS: "0xE0BE08c77f415F577A1B3A9aD7a1Df1479564ec8";
|
|
26
|
-
export declare const TEST_USDC_ADDRESS: "0xE0BE08c77f415F577A1B3A9aD7a1Df1479564ec8";
|
|
27
|
-
export declare const WBTC_ADDRESS: "0x0c64F03EEa5c30946D5c55B4b532D08ad74638a4";
|
|
28
|
-
export declare const WETH_ADDRESS: "0x7d211F77525ea39A0592794f793cC1036eEaccD5";
|
|
29
|
-
export declare const WPHRS_ADDRESS: "0x838800b758277CC111B2d48Ab01e5E164f8E9471";
|
|
30
|
-
export declare const TOKEN_REGISTRY: {
|
|
31
|
-
readonly PHRS: {
|
|
32
|
-
readonly symbol: "PHRS";
|
|
33
|
-
readonly address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
34
|
-
readonly decimals: 18;
|
|
35
|
-
readonly chainId: number;
|
|
36
|
-
readonly environment: string;
|
|
37
|
-
readonly isMainnet: false;
|
|
38
|
-
readonly isCanonical: true;
|
|
39
|
-
readonly isTestToken: true;
|
|
40
|
-
readonly purpose: "native PHRS sentinel address for DODO route API";
|
|
41
|
-
readonly docsSource: "https://docs.pharos.xyz/";
|
|
42
|
-
};
|
|
43
|
-
readonly USDC: {
|
|
44
|
-
readonly symbol: "USDC";
|
|
45
|
-
readonly address: "0xE0BE08c77f415F577A1B3A9aD7a1Df1479564ec8";
|
|
46
|
-
readonly decimals: 6;
|
|
47
|
-
readonly chainId: number;
|
|
48
|
-
readonly environment: string;
|
|
49
|
-
readonly isMainnet: false;
|
|
50
|
-
readonly isCanonical: true;
|
|
51
|
-
readonly isTestToken: true;
|
|
52
|
-
readonly purpose: "Pharos Skill Engine USDC — the USDC listed in the official pharos-skill-engine-0.1.0 assets/tokens.json for atlantic-testnet";
|
|
53
|
-
readonly docsSource: "pharos-skill-engine-0.1.0/assets/tokens.json";
|
|
54
|
-
readonly verificationStatus: "DOCS_VERIFIED_FROM_PHAROS_SKILL_ENGINE";
|
|
55
|
-
};
|
|
56
|
-
readonly CIRCLE_USDC: {
|
|
57
|
-
readonly symbol: "CIRCLE_USDC";
|
|
58
|
-
readonly address: "0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B";
|
|
59
|
-
readonly decimals: 6;
|
|
60
|
-
readonly chainId: number;
|
|
61
|
-
readonly environment: string;
|
|
62
|
-
readonly isMainnet: false;
|
|
63
|
-
readonly isCanonical: true;
|
|
64
|
-
readonly isTestToken: true;
|
|
65
|
-
readonly purpose: "Alternate USDC listed by Circle contract addresses page and Pharos docs token registry; not the primary token in Skill Engine tokens.json";
|
|
66
|
-
readonly docsSource: "https://developers.circle.com/stablecoins/usdc-contract-addresses and https://docs.pharos.xyz/getting-started/token-registry";
|
|
67
|
-
readonly verificationStatus: "CIRCLE_REFERENCED_USDC";
|
|
68
|
-
};
|
|
69
|
-
readonly USDT: {
|
|
70
|
-
readonly symbol: "USDT";
|
|
71
|
-
readonly address: "0xE7E84B8B4f39C507499c40B4ac199B050e2882d5";
|
|
72
|
-
readonly decimals: 6;
|
|
73
|
-
readonly chainId: number;
|
|
74
|
-
readonly environment: string;
|
|
75
|
-
readonly isMainnet: false;
|
|
76
|
-
readonly isCanonical: true;
|
|
77
|
-
readonly isTestToken: true;
|
|
78
|
-
readonly purpose: "canonical Pharos Atlantic Testnet USDT (Tether USD)";
|
|
79
|
-
readonly docsSource: "https://docs.pharos.xyz/getting-started/token-registry";
|
|
80
|
-
readonly verificationStatus: "DOCS_VERIFIED";
|
|
81
|
-
};
|
|
82
|
-
readonly WBTC: {
|
|
83
|
-
readonly symbol: "WBTC";
|
|
84
|
-
readonly address: "0x0c64F03EEa5c30946D5c55B4b532D08ad74638a4";
|
|
85
|
-
readonly decimals: 18;
|
|
86
|
-
readonly chainId: number;
|
|
87
|
-
readonly environment: string;
|
|
88
|
-
readonly isMainnet: false;
|
|
89
|
-
readonly isCanonical: true;
|
|
90
|
-
readonly isTestToken: true;
|
|
91
|
-
readonly purpose: "canonical Pharos Atlantic Testnet WBTC (Wrapped BTC)";
|
|
92
|
-
readonly docsSource: "https://docs.pharos.xyz/getting-started/token-registry";
|
|
93
|
-
readonly verificationStatus: "DOCS_VERIFIED";
|
|
94
|
-
};
|
|
95
|
-
readonly WETH: {
|
|
96
|
-
readonly symbol: "WETH";
|
|
97
|
-
readonly address: "0x7d211F77525ea39A0592794f793cC1036eEaccD5";
|
|
98
|
-
readonly decimals: 18;
|
|
99
|
-
readonly chainId: number;
|
|
100
|
-
readonly environment: string;
|
|
101
|
-
readonly isMainnet: false;
|
|
102
|
-
readonly isCanonical: true;
|
|
103
|
-
readonly isTestToken: true;
|
|
104
|
-
readonly purpose: "canonical Pharos Atlantic Testnet WETH (Wrapped ETH)";
|
|
105
|
-
readonly docsSource: "https://docs.pharos.xyz/getting-started/token-registry";
|
|
106
|
-
readonly verificationStatus: "DOCS_VERIFIED";
|
|
107
|
-
};
|
|
108
|
-
readonly WPHRS: {
|
|
109
|
-
readonly symbol: "WPHRS";
|
|
110
|
-
readonly address: "0x838800b758277CC111B2d48Ab01e5E164f8E9471";
|
|
111
|
-
readonly decimals: 18;
|
|
112
|
-
readonly chainId: number;
|
|
113
|
-
readonly environment: string;
|
|
114
|
-
readonly isMainnet: false;
|
|
115
|
-
readonly isCanonical: true;
|
|
116
|
-
readonly isTestToken: true;
|
|
117
|
-
readonly purpose: "canonical Pharos Atlantic Testnet WPHRS (Wrapped PHRS)";
|
|
118
|
-
readonly docsSource: "https://docs.pharos.xyz/getting-started/token-registry";
|
|
119
|
-
readonly verificationStatus: "DOCS_VERIFIED";
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
export declare const TOKEN_DECIMALS: Record<string, number>;
|
|
123
|
-
export declare const TOKEN_MAP: Record<string, `0x${string}`>;
|
|
124
|
-
export declare const DODO_APPROVE_ADDRESS: "0x4Cf317b8918FbE8A890c01eDAb7d548555Ac2cE9";
|
|
125
|
-
export declare const DODO_ROUTE_PROXY_ADDRESS: "0x819829e5CF6e19F9fED92F6b4CC1edF45a2cC4A2";
|
|
126
|
-
export declare const POSITION_MANAGER_ADDRESS: "0x1c430d84DD6185b1Ea2d4693e0033799d193542f";
|
|
127
|
-
export declare const DODO_API_BASE: string;
|
|
128
|
-
export declare const DODO_API_KEY: string | undefined;
|
|
129
|
-
export declare const DODO_DEFAULT_SLIPPAGE = 3.225;
|
|
130
|
-
export declare const DODO_ROUTE_ENDPOINT = "/route-service/v2/widget/getdodoroute";
|
|
131
|
-
export declare const RISK_BLOCK_THRESHOLD = 80;
|
|
132
|
-
export declare const RISK_WARN_THRESHOLD = 60;
|
|
133
|
-
export declare const MAX_SLIPPAGE_PCT = 5;
|
|
134
|
-
export declare const MAX_BALANCE_USAGE_PCT = 90;
|
|
135
|
-
export declare const MAX_TX_AMOUNT_PHRS: string;
|
|
136
|
-
export declare const MAX_APPROVAL_AMOUNT_USDC: string;
|
|
137
|
-
export declare const MAX_DAILY_SPEND_USD: string;
|
|
138
|
-
export declare const MAX_X402_PAYMENT_USDC: string;
|
|
139
|
-
export declare const X402_PAYMENT_TOKEN_ADDRESS: `0x${string}`;
|
|
140
|
-
export declare const RISK_WEIGHTS: {
|
|
141
|
-
readonly liquidityRisk: 0.25;
|
|
142
|
-
readonly slippageRisk: 0.25;
|
|
143
|
-
readonly counterpartyRisk: 0.2;
|
|
144
|
-
readonly balanceRisk: 0.15;
|
|
145
|
-
readonly marketConditionRisk: 0.15;
|
|
146
|
-
};
|
|
147
|
-
export declare const ERC20_ABI: readonly [{
|
|
148
|
-
readonly name: "approve";
|
|
149
|
-
readonly type: "function";
|
|
150
|
-
readonly stateMutability: "nonpayable";
|
|
151
|
-
readonly inputs: readonly [{
|
|
152
|
-
readonly name: "spender";
|
|
153
|
-
readonly type: "address";
|
|
154
|
-
}, {
|
|
155
|
-
readonly name: "amount";
|
|
156
|
-
readonly type: "uint256";
|
|
157
|
-
}];
|
|
158
|
-
readonly outputs: readonly [{
|
|
159
|
-
readonly name: "";
|
|
160
|
-
readonly type: "bool";
|
|
161
|
-
}];
|
|
162
|
-
}, {
|
|
163
|
-
readonly name: "allowance";
|
|
164
|
-
readonly type: "function";
|
|
165
|
-
readonly stateMutability: "view";
|
|
166
|
-
readonly inputs: readonly [{
|
|
167
|
-
readonly name: "owner";
|
|
168
|
-
readonly type: "address";
|
|
169
|
-
}, {
|
|
170
|
-
readonly name: "spender";
|
|
171
|
-
readonly type: "address";
|
|
172
|
-
}];
|
|
173
|
-
readonly outputs: readonly [{
|
|
174
|
-
readonly name: "";
|
|
175
|
-
readonly type: "uint256";
|
|
176
|
-
}];
|
|
177
|
-
}, {
|
|
178
|
-
readonly name: "balanceOf";
|
|
179
|
-
readonly type: "function";
|
|
180
|
-
readonly stateMutability: "view";
|
|
181
|
-
readonly inputs: readonly [{
|
|
182
|
-
readonly name: "account";
|
|
183
|
-
readonly type: "address";
|
|
184
|
-
}];
|
|
185
|
-
readonly outputs: readonly [{
|
|
186
|
-
readonly name: "";
|
|
187
|
-
readonly type: "uint256";
|
|
188
|
-
}];
|
|
189
|
-
}, {
|
|
190
|
-
readonly name: "decimals";
|
|
191
|
-
readonly type: "function";
|
|
192
|
-
readonly stateMutability: "view";
|
|
193
|
-
readonly inputs: readonly [];
|
|
194
|
-
readonly outputs: readonly [{
|
|
195
|
-
readonly name: "";
|
|
196
|
-
readonly type: "uint8";
|
|
197
|
-
}];
|
|
198
|
-
}, {
|
|
199
|
-
readonly name: "symbol";
|
|
200
|
-
readonly type: "function";
|
|
201
|
-
readonly stateMutability: "view";
|
|
202
|
-
readonly inputs: readonly [];
|
|
203
|
-
readonly outputs: readonly [{
|
|
204
|
-
readonly name: "";
|
|
205
|
-
readonly type: "string";
|
|
206
|
-
}];
|
|
207
|
-
}, {
|
|
208
|
-
readonly name: "transfer";
|
|
209
|
-
readonly type: "function";
|
|
210
|
-
readonly stateMutability: "nonpayable";
|
|
211
|
-
readonly inputs: readonly [{
|
|
212
|
-
readonly name: "to";
|
|
213
|
-
readonly type: "address";
|
|
214
|
-
}, {
|
|
215
|
-
readonly name: "amount";
|
|
216
|
-
readonly type: "uint256";
|
|
217
|
-
}];
|
|
218
|
-
readonly outputs: readonly [{
|
|
219
|
-
readonly name: "";
|
|
220
|
-
readonly type: "bool";
|
|
221
|
-
}];
|
|
222
|
-
}];
|
|
223
|
-
export declare const RISK_REGISTRY_ADDRESS: `0x${string}`;
|
|
224
|
-
export declare const RISK_REGISTRY_ABI: readonly [{
|
|
225
|
-
readonly name: "publish";
|
|
226
|
-
readonly type: "function";
|
|
227
|
-
readonly stateMutability: "nonpayable";
|
|
228
|
-
readonly inputs: readonly [{
|
|
229
|
-
readonly name: "wallet";
|
|
230
|
-
readonly type: "address";
|
|
231
|
-
}, {
|
|
232
|
-
readonly name: "score";
|
|
233
|
-
readonly type: "uint256";
|
|
234
|
-
}, {
|
|
235
|
-
readonly name: "riskLevel";
|
|
236
|
-
readonly type: "string";
|
|
237
|
-
}, {
|
|
238
|
-
readonly name: "recommendation";
|
|
239
|
-
readonly type: "string";
|
|
240
|
-
}];
|
|
241
|
-
readonly outputs: readonly [];
|
|
242
|
-
}, {
|
|
243
|
-
readonly name: "query";
|
|
244
|
-
readonly type: "function";
|
|
245
|
-
readonly stateMutability: "view";
|
|
246
|
-
readonly inputs: readonly [{
|
|
247
|
-
readonly name: "wallet";
|
|
248
|
-
readonly type: "address";
|
|
249
|
-
}];
|
|
250
|
-
readonly outputs: readonly [{
|
|
251
|
-
readonly name: "";
|
|
252
|
-
readonly type: "tuple";
|
|
253
|
-
readonly components: readonly [{
|
|
254
|
-
readonly name: "score";
|
|
255
|
-
readonly type: "uint256";
|
|
256
|
-
}, {
|
|
257
|
-
readonly name: "riskLevel";
|
|
258
|
-
readonly type: "string";
|
|
259
|
-
}, {
|
|
260
|
-
readonly name: "recommendation";
|
|
261
|
-
readonly type: "string";
|
|
262
|
-
}, {
|
|
263
|
-
readonly name: "timestamp";
|
|
264
|
-
readonly type: "uint256";
|
|
265
|
-
}, {
|
|
266
|
-
readonly name: "assessedBy";
|
|
267
|
-
readonly type: "address";
|
|
268
|
-
}];
|
|
269
|
-
}];
|
|
270
|
-
}, {
|
|
271
|
-
readonly anonymous: false;
|
|
272
|
-
readonly name: "RiskPublished";
|
|
273
|
-
readonly type: "event";
|
|
274
|
-
readonly inputs: readonly [{
|
|
275
|
-
readonly indexed: true;
|
|
276
|
-
readonly name: "wallet";
|
|
277
|
-
readonly type: "address";
|
|
278
|
-
}, {
|
|
279
|
-
readonly indexed: false;
|
|
280
|
-
readonly name: "score";
|
|
281
|
-
readonly type: "uint256";
|
|
282
|
-
}, {
|
|
283
|
-
readonly indexed: false;
|
|
284
|
-
readonly name: "riskLevel";
|
|
285
|
-
readonly type: "string";
|
|
286
|
-
}, {
|
|
287
|
-
readonly indexed: false;
|
|
288
|
-
readonly name: "assessedBy";
|
|
289
|
-
readonly type: "address";
|
|
290
|
-
}];
|
|
291
|
-
}];
|
|
1
|
+
export declare const PHAROS_ENVIRONMENT: string;
|
|
2
|
+
export declare const CHAIN_ID: number;
|
|
3
|
+
export declare const RPC_URL: string;
|
|
4
|
+
export declare const EXPLORER_BASE: string;
|
|
5
|
+
export declare const IS_MAINNET = false;
|
|
6
|
+
export declare const CHAIN_REGISTRY: {
|
|
7
|
+
readonly pharosAtlanticTestnet: {
|
|
8
|
+
readonly environment: "atlantic-testnet";
|
|
9
|
+
readonly chainId: 688689;
|
|
10
|
+
readonly isMainnet: false;
|
|
11
|
+
readonly rpcUrlEnv: "PHAROS_RPC_URL";
|
|
12
|
+
readonly defaultRpcUrl: "https://atlantic.dplabs-internal.com/";
|
|
13
|
+
readonly explorerUrl: "https://atlantic.pharosscan.xyz/";
|
|
14
|
+
readonly docsSource: "https://docs.pharosnetwork.xyz/developer-guide/hardhat/write-your-first-nft";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/** Native PHRS — sentinel address used by DODO API for native token */
|
|
18
|
+
export declare const PHRS_ADDRESS: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
19
|
+
export declare const USDT_ADDRESS: "0xE7E84B8B4f39C507499c40B4ac199B050e2882d5";
|
|
20
|
+
/** Primary USDC for Pharos Skill Engine (from official tokens.json) */
|
|
21
|
+
export declare const USDC_ADDRESS: "0xE0BE08c77f415F577A1B3A9aD7a1Df1479564ec8";
|
|
22
|
+
/** Alternate USDC listed by Circle's contract addresses page (not in Skill Engine tokens.json) */
|
|
23
|
+
export declare const CIRCLE_USDC_ADDRESS: "0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B";
|
|
24
|
+
/** @deprecated Use USDC_ADDRESS instead. Kept for backward compatibility. */
|
|
25
|
+
export declare const X402_DEMO_USDC_ADDRESS: "0xE0BE08c77f415F577A1B3A9aD7a1Df1479564ec8";
|
|
26
|
+
export declare const TEST_USDC_ADDRESS: "0xE0BE08c77f415F577A1B3A9aD7a1Df1479564ec8";
|
|
27
|
+
export declare const WBTC_ADDRESS: "0x0c64F03EEa5c30946D5c55B4b532D08ad74638a4";
|
|
28
|
+
export declare const WETH_ADDRESS: "0x7d211F77525ea39A0592794f793cC1036eEaccD5";
|
|
29
|
+
export declare const WPHRS_ADDRESS: "0x838800b758277CC111B2d48Ab01e5E164f8E9471";
|
|
30
|
+
export declare const TOKEN_REGISTRY: {
|
|
31
|
+
readonly PHRS: {
|
|
32
|
+
readonly symbol: "PHRS";
|
|
33
|
+
readonly address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
34
|
+
readonly decimals: 18;
|
|
35
|
+
readonly chainId: number;
|
|
36
|
+
readonly environment: string;
|
|
37
|
+
readonly isMainnet: false;
|
|
38
|
+
readonly isCanonical: true;
|
|
39
|
+
readonly isTestToken: true;
|
|
40
|
+
readonly purpose: "native PHRS sentinel address for DODO route API";
|
|
41
|
+
readonly docsSource: "https://docs.pharos.xyz/";
|
|
42
|
+
};
|
|
43
|
+
readonly USDC: {
|
|
44
|
+
readonly symbol: "USDC";
|
|
45
|
+
readonly address: "0xE0BE08c77f415F577A1B3A9aD7a1Df1479564ec8";
|
|
46
|
+
readonly decimals: 6;
|
|
47
|
+
readonly chainId: number;
|
|
48
|
+
readonly environment: string;
|
|
49
|
+
readonly isMainnet: false;
|
|
50
|
+
readonly isCanonical: true;
|
|
51
|
+
readonly isTestToken: true;
|
|
52
|
+
readonly purpose: "Pharos Skill Engine USDC — the USDC listed in the official pharos-skill-engine-0.1.0 assets/tokens.json for atlantic-testnet";
|
|
53
|
+
readonly docsSource: "pharos-skill-engine-0.1.0/assets/tokens.json";
|
|
54
|
+
readonly verificationStatus: "DOCS_VERIFIED_FROM_PHAROS_SKILL_ENGINE";
|
|
55
|
+
};
|
|
56
|
+
readonly CIRCLE_USDC: {
|
|
57
|
+
readonly symbol: "CIRCLE_USDC";
|
|
58
|
+
readonly address: "0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B";
|
|
59
|
+
readonly decimals: 6;
|
|
60
|
+
readonly chainId: number;
|
|
61
|
+
readonly environment: string;
|
|
62
|
+
readonly isMainnet: false;
|
|
63
|
+
readonly isCanonical: true;
|
|
64
|
+
readonly isTestToken: true;
|
|
65
|
+
readonly purpose: "Alternate USDC listed by Circle contract addresses page and Pharos docs token registry; not the primary token in Skill Engine tokens.json";
|
|
66
|
+
readonly docsSource: "https://developers.circle.com/stablecoins/usdc-contract-addresses and https://docs.pharos.xyz/getting-started/token-registry";
|
|
67
|
+
readonly verificationStatus: "CIRCLE_REFERENCED_USDC";
|
|
68
|
+
};
|
|
69
|
+
readonly USDT: {
|
|
70
|
+
readonly symbol: "USDT";
|
|
71
|
+
readonly address: "0xE7E84B8B4f39C507499c40B4ac199B050e2882d5";
|
|
72
|
+
readonly decimals: 6;
|
|
73
|
+
readonly chainId: number;
|
|
74
|
+
readonly environment: string;
|
|
75
|
+
readonly isMainnet: false;
|
|
76
|
+
readonly isCanonical: true;
|
|
77
|
+
readonly isTestToken: true;
|
|
78
|
+
readonly purpose: "canonical Pharos Atlantic Testnet USDT (Tether USD)";
|
|
79
|
+
readonly docsSource: "https://docs.pharos.xyz/getting-started/token-registry";
|
|
80
|
+
readonly verificationStatus: "DOCS_VERIFIED";
|
|
81
|
+
};
|
|
82
|
+
readonly WBTC: {
|
|
83
|
+
readonly symbol: "WBTC";
|
|
84
|
+
readonly address: "0x0c64F03EEa5c30946D5c55B4b532D08ad74638a4";
|
|
85
|
+
readonly decimals: 18;
|
|
86
|
+
readonly chainId: number;
|
|
87
|
+
readonly environment: string;
|
|
88
|
+
readonly isMainnet: false;
|
|
89
|
+
readonly isCanonical: true;
|
|
90
|
+
readonly isTestToken: true;
|
|
91
|
+
readonly purpose: "canonical Pharos Atlantic Testnet WBTC (Wrapped BTC)";
|
|
92
|
+
readonly docsSource: "https://docs.pharos.xyz/getting-started/token-registry";
|
|
93
|
+
readonly verificationStatus: "DOCS_VERIFIED";
|
|
94
|
+
};
|
|
95
|
+
readonly WETH: {
|
|
96
|
+
readonly symbol: "WETH";
|
|
97
|
+
readonly address: "0x7d211F77525ea39A0592794f793cC1036eEaccD5";
|
|
98
|
+
readonly decimals: 18;
|
|
99
|
+
readonly chainId: number;
|
|
100
|
+
readonly environment: string;
|
|
101
|
+
readonly isMainnet: false;
|
|
102
|
+
readonly isCanonical: true;
|
|
103
|
+
readonly isTestToken: true;
|
|
104
|
+
readonly purpose: "canonical Pharos Atlantic Testnet WETH (Wrapped ETH)";
|
|
105
|
+
readonly docsSource: "https://docs.pharos.xyz/getting-started/token-registry";
|
|
106
|
+
readonly verificationStatus: "DOCS_VERIFIED";
|
|
107
|
+
};
|
|
108
|
+
readonly WPHRS: {
|
|
109
|
+
readonly symbol: "WPHRS";
|
|
110
|
+
readonly address: "0x838800b758277CC111B2d48Ab01e5E164f8E9471";
|
|
111
|
+
readonly decimals: 18;
|
|
112
|
+
readonly chainId: number;
|
|
113
|
+
readonly environment: string;
|
|
114
|
+
readonly isMainnet: false;
|
|
115
|
+
readonly isCanonical: true;
|
|
116
|
+
readonly isTestToken: true;
|
|
117
|
+
readonly purpose: "canonical Pharos Atlantic Testnet WPHRS (Wrapped PHRS)";
|
|
118
|
+
readonly docsSource: "https://docs.pharos.xyz/getting-started/token-registry";
|
|
119
|
+
readonly verificationStatus: "DOCS_VERIFIED";
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export declare const TOKEN_DECIMALS: Record<string, number>;
|
|
123
|
+
export declare const TOKEN_MAP: Record<string, `0x${string}`>;
|
|
124
|
+
export declare const DODO_APPROVE_ADDRESS: "0x4Cf317b8918FbE8A890c01eDAb7d548555Ac2cE9";
|
|
125
|
+
export declare const DODO_ROUTE_PROXY_ADDRESS: "0x819829e5CF6e19F9fED92F6b4CC1edF45a2cC4A2";
|
|
126
|
+
export declare const POSITION_MANAGER_ADDRESS: "0x1c430d84DD6185b1Ea2d4693e0033799d193542f";
|
|
127
|
+
export declare const DODO_API_BASE: string;
|
|
128
|
+
export declare const DODO_API_KEY: string | undefined;
|
|
129
|
+
export declare const DODO_DEFAULT_SLIPPAGE = 3.225;
|
|
130
|
+
export declare const DODO_ROUTE_ENDPOINT = "/route-service/v2/widget/getdodoroute";
|
|
131
|
+
export declare const RISK_BLOCK_THRESHOLD = 80;
|
|
132
|
+
export declare const RISK_WARN_THRESHOLD = 60;
|
|
133
|
+
export declare const MAX_SLIPPAGE_PCT = 5;
|
|
134
|
+
export declare const MAX_BALANCE_USAGE_PCT = 90;
|
|
135
|
+
export declare const MAX_TX_AMOUNT_PHRS: string;
|
|
136
|
+
export declare const MAX_APPROVAL_AMOUNT_USDC: string;
|
|
137
|
+
export declare const MAX_DAILY_SPEND_USD: string;
|
|
138
|
+
export declare const MAX_X402_PAYMENT_USDC: string;
|
|
139
|
+
export declare const X402_PAYMENT_TOKEN_ADDRESS: `0x${string}`;
|
|
140
|
+
export declare const RISK_WEIGHTS: {
|
|
141
|
+
readonly liquidityRisk: 0.25;
|
|
142
|
+
readonly slippageRisk: 0.25;
|
|
143
|
+
readonly counterpartyRisk: 0.2;
|
|
144
|
+
readonly balanceRisk: 0.15;
|
|
145
|
+
readonly marketConditionRisk: 0.15;
|
|
146
|
+
};
|
|
147
|
+
export declare const ERC20_ABI: readonly [{
|
|
148
|
+
readonly name: "approve";
|
|
149
|
+
readonly type: "function";
|
|
150
|
+
readonly stateMutability: "nonpayable";
|
|
151
|
+
readonly inputs: readonly [{
|
|
152
|
+
readonly name: "spender";
|
|
153
|
+
readonly type: "address";
|
|
154
|
+
}, {
|
|
155
|
+
readonly name: "amount";
|
|
156
|
+
readonly type: "uint256";
|
|
157
|
+
}];
|
|
158
|
+
readonly outputs: readonly [{
|
|
159
|
+
readonly name: "";
|
|
160
|
+
readonly type: "bool";
|
|
161
|
+
}];
|
|
162
|
+
}, {
|
|
163
|
+
readonly name: "allowance";
|
|
164
|
+
readonly type: "function";
|
|
165
|
+
readonly stateMutability: "view";
|
|
166
|
+
readonly inputs: readonly [{
|
|
167
|
+
readonly name: "owner";
|
|
168
|
+
readonly type: "address";
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "spender";
|
|
171
|
+
readonly type: "address";
|
|
172
|
+
}];
|
|
173
|
+
readonly outputs: readonly [{
|
|
174
|
+
readonly name: "";
|
|
175
|
+
readonly type: "uint256";
|
|
176
|
+
}];
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: "balanceOf";
|
|
179
|
+
readonly type: "function";
|
|
180
|
+
readonly stateMutability: "view";
|
|
181
|
+
readonly inputs: readonly [{
|
|
182
|
+
readonly name: "account";
|
|
183
|
+
readonly type: "address";
|
|
184
|
+
}];
|
|
185
|
+
readonly outputs: readonly [{
|
|
186
|
+
readonly name: "";
|
|
187
|
+
readonly type: "uint256";
|
|
188
|
+
}];
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "decimals";
|
|
191
|
+
readonly type: "function";
|
|
192
|
+
readonly stateMutability: "view";
|
|
193
|
+
readonly inputs: readonly [];
|
|
194
|
+
readonly outputs: readonly [{
|
|
195
|
+
readonly name: "";
|
|
196
|
+
readonly type: "uint8";
|
|
197
|
+
}];
|
|
198
|
+
}, {
|
|
199
|
+
readonly name: "symbol";
|
|
200
|
+
readonly type: "function";
|
|
201
|
+
readonly stateMutability: "view";
|
|
202
|
+
readonly inputs: readonly [];
|
|
203
|
+
readonly outputs: readonly [{
|
|
204
|
+
readonly name: "";
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
}];
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "transfer";
|
|
209
|
+
readonly type: "function";
|
|
210
|
+
readonly stateMutability: "nonpayable";
|
|
211
|
+
readonly inputs: readonly [{
|
|
212
|
+
readonly name: "to";
|
|
213
|
+
readonly type: "address";
|
|
214
|
+
}, {
|
|
215
|
+
readonly name: "amount";
|
|
216
|
+
readonly type: "uint256";
|
|
217
|
+
}];
|
|
218
|
+
readonly outputs: readonly [{
|
|
219
|
+
readonly name: "";
|
|
220
|
+
readonly type: "bool";
|
|
221
|
+
}];
|
|
222
|
+
}];
|
|
223
|
+
export declare const RISK_REGISTRY_ADDRESS: `0x${string}`;
|
|
224
|
+
export declare const RISK_REGISTRY_ABI: readonly [{
|
|
225
|
+
readonly name: "publish";
|
|
226
|
+
readonly type: "function";
|
|
227
|
+
readonly stateMutability: "nonpayable";
|
|
228
|
+
readonly inputs: readonly [{
|
|
229
|
+
readonly name: "wallet";
|
|
230
|
+
readonly type: "address";
|
|
231
|
+
}, {
|
|
232
|
+
readonly name: "score";
|
|
233
|
+
readonly type: "uint256";
|
|
234
|
+
}, {
|
|
235
|
+
readonly name: "riskLevel";
|
|
236
|
+
readonly type: "string";
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "recommendation";
|
|
239
|
+
readonly type: "string";
|
|
240
|
+
}];
|
|
241
|
+
readonly outputs: readonly [];
|
|
242
|
+
}, {
|
|
243
|
+
readonly name: "query";
|
|
244
|
+
readonly type: "function";
|
|
245
|
+
readonly stateMutability: "view";
|
|
246
|
+
readonly inputs: readonly [{
|
|
247
|
+
readonly name: "wallet";
|
|
248
|
+
readonly type: "address";
|
|
249
|
+
}];
|
|
250
|
+
readonly outputs: readonly [{
|
|
251
|
+
readonly name: "";
|
|
252
|
+
readonly type: "tuple";
|
|
253
|
+
readonly components: readonly [{
|
|
254
|
+
readonly name: "score";
|
|
255
|
+
readonly type: "uint256";
|
|
256
|
+
}, {
|
|
257
|
+
readonly name: "riskLevel";
|
|
258
|
+
readonly type: "string";
|
|
259
|
+
}, {
|
|
260
|
+
readonly name: "recommendation";
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "timestamp";
|
|
264
|
+
readonly type: "uint256";
|
|
265
|
+
}, {
|
|
266
|
+
readonly name: "assessedBy";
|
|
267
|
+
readonly type: "address";
|
|
268
|
+
}];
|
|
269
|
+
}];
|
|
270
|
+
}, {
|
|
271
|
+
readonly anonymous: false;
|
|
272
|
+
readonly name: "RiskPublished";
|
|
273
|
+
readonly type: "event";
|
|
274
|
+
readonly inputs: readonly [{
|
|
275
|
+
readonly indexed: true;
|
|
276
|
+
readonly name: "wallet";
|
|
277
|
+
readonly type: "address";
|
|
278
|
+
}, {
|
|
279
|
+
readonly indexed: false;
|
|
280
|
+
readonly name: "score";
|
|
281
|
+
readonly type: "uint256";
|
|
282
|
+
}, {
|
|
283
|
+
readonly indexed: false;
|
|
284
|
+
readonly name: "riskLevel";
|
|
285
|
+
readonly type: "string";
|
|
286
|
+
}, {
|
|
287
|
+
readonly indexed: false;
|
|
288
|
+
readonly name: "assessedBy";
|
|
289
|
+
readonly type: "address";
|
|
290
|
+
}];
|
|
291
|
+
}];
|
|
292
292
|
//# sourceMappingURL=constants.d.ts.map
|