@aastar/sdk 0.14.0 → 0.16.6
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/.eslintrc.cjs +30 -0
- package/.gitmodules +9 -0
- package/README.md +299 -0
- package/aastar-sdk.code-workspace +14 -0
- package/abis/BLSAggregator.json +572 -0
- package/abis/BLSValidator.json +39 -0
- package/abis/DVTValidator.json +383 -0
- package/abis/Eip7702Support.json +24 -0
- package/abis/EntryPoint.json +1379 -0
- package/abis/GToken.json +510 -0
- package/abis/GTokenStaking.json +918 -0
- package/abis/LegacyAccount.json +625 -0
- package/abis/MySBT.json +1547 -0
- package/abis/Paymaster.json +1192 -0
- package/abis/PaymasterFactory.json +637 -0
- package/abis/PaymasterV4_2.json +1193 -0
- package/abis/Registry.json +1677 -0
- package/abis/ReputationSystem.json +659 -0
- package/abis/SenderCreator.json +99 -0
- package/abis/Simple7702Account.json +395 -0
- package/abis/SimpleAccount.json +625 -0
- package/abis/SimpleAccountFactory.json +108 -0
- package/abis/SimpleAccountFactoryV08.json +87 -0
- package/abis/SimpleAccountV08.json +557 -0
- package/abis/SuperPaymaster.json +1568 -0
- package/abis/UserOperationLib.json +57 -0
- package/abis/aPNTs.json +1160 -0
- package/abis/xPNTsFactory.json +715 -0
- package/abis/xPNTsToken.json +1160 -0
- package/config/networks/README.md +54 -0
- package/config/networks/mainnet.env.example +39 -0
- package/config/networks/optimism-sepolia.env.example +35 -0
- package/config/networks/optimism.env.example +36 -0
- package/config/networks/sepolia.env.example +36 -0
- package/config.anvil.json +1 -0
- package/config.sepolia.json +1 -0
- package/config.test.json +27 -0
- package/data/experiment_data.csv +36 -0
- package/data/industry_baseline_2025-12-23.json +154 -0
- package/data/industry_baseline_latest.json +154 -0
- package/docs/ABI_Change_Tracking_Workflow.md +41 -0
- package/docs/ABI_MAINTENANCE_PLAN.md +132 -0
- package/docs/API_REFERENCE.md +956 -0
- package/docs/Configuration_Sync.md +47 -0
- package/docs/DAO_Mining_Distribution_Plan.md +522 -0
- package/docs/DEMO_REFACTOR_PLAN.md +289 -0
- package/docs/DOCUMENTATION_PLAN.md +455 -0
- package/docs/ENV_SEPOLIA_UPDATE.md +68 -0
- package/docs/Faucet_Gasless_Plan.md +56 -0
- package/docs/L2_BUSINESS_CLIENTS_PLAN.md +394 -0
- package/docs/L4_Manual_Test_CheatSheet.md +215 -0
- package/docs/Plan.md +266 -0
- package/docs/Regression_Testing_Guide.md +70 -0
- package/docs/SDK_ABI_COVERAGE.md +839 -0
- package/docs/SDK_COVERAGE_STRATEGY.md +397 -0
- package/docs/SDK_Optimization_Evaluation_Plan.md +51 -0
- package/docs/SDK_REGRESSION_AND_API_PLAN.md +98 -0
- package/docs/SDK_STAGE3_PLAN.md +151 -0
- package/docs/SEPOLIA_ENV_REFERENCE.md +51 -0
- package/docs/STAGE3.md +191 -0
- package/docs/Script_Comparison_Report.md +91 -0
- package/docs/Sepolia_Latest_Deployment.md +117 -0
- package/docs/TESTER_GUIDE_GASLESS.md +663 -0
- package/docs/TEST_COVERAGE_MATRIX.md +72 -0
- package/docs/TODO_SDK_COVERAGE.md +55 -0
- package/docs/USER_CASE_DESIGN.md +110 -0
- package/docs/Verifier_L4_Gasless_Plan.md +454 -0
- package/docs/api/@aastar/account.md +235 -0
- package/docs/api/@aastar/analytics.md +219 -0
- package/docs/api/@aastar/core.md +26830 -0
- package/docs/api/@aastar/dapp.md +130 -0
- package/docs/api/@aastar/identity.md +482 -0
- package/docs/api/@aastar/paymaster.md +1387 -0
- package/docs/api/@aastar/sdk/README.md +155 -0
- package/docs/api/@aastar/sdk/node.md +4044 -0
- package/docs/api/@aastar/tokens.md +1971 -0
- package/docs/api/README.md +10 -0
- package/docs/changelog.md +99 -0
- package/docs/examples/README.md +18 -0
- package/docs/examples/community-flow.md +28 -0
- package/docs/examples/enduser-flow.md +24 -0
- package/docs/examples/index.md +18 -0
- package/docs/examples/multi-chain.md +31 -0
- package/docs/examples/operator-flow.md +28 -0
- package/docs/guide/CLI_GUIDE.md +65 -0
- package/docs/guide/DOCUMENTATION_PLAN.md +455 -0
- package/docs/guide/Security-solution.md +106 -0
- package/docs/guide/TEST_COMMANDS.md +320 -0
- package/docs/guide/concepts/account-abstraction.md +95 -0
- package/docs/guide/concepts/rainbow-bridge.md +68 -0
- package/docs/guide/concepts/reputation.md +95 -0
- package/docs/guide/concepts/superpaymaster.md +141 -0
- package/docs/guide/getting-started.md +133 -0
- package/docs/guide/installation.md +40 -0
- package/docs/guide/paper-data-collection.md +69 -0
- package/docs/guide/quick-start.md +52 -0
- package/docs/guide/task_breakdown.md +121 -0
- package/docs/guide/use-cases/community-management.md +141 -0
- package/docs/guide/use-cases/gasless-transactions.md +71 -0
- package/docs/guide/use-cases/operator-staking.md +84 -0
- package/docs/guide/use-cases/yop.md +72 -0
- package/docs/old-solution.md +1078 -0
- package/docs/paper-data-collection.md +69 -0
- package/docs/refactor/2026-01-13-221242-trae-refactor.md +224 -0
- package/docs/refactor/2026-01-13-audit-analysis.md +96 -0
- package/docs/refactor/2026-01-13-audit-report-v0.16.2.md +76 -0
- package/docs/refactor/2026-01-13-audit-report-v0.17.0.md +74 -0
- package/docs/refactor/2026-01-13-cursor-refactor.md +511 -0
- package/docs/refactor/2026-01-13-refactor-plan.md +88 -0
- package/docs/refactor/2026-01-13-refactor-response-plan.md +77 -0
- package/docs/refactor/2026-01-13-refactor-review.md +39 -0
- package/docs/refactor/2026-01-13-sdk-enhancement-plan.md +120 -0
- package/docs/refactor/2026-01-14-audit-response.md +242 -0
- package/docs/refactor/2026-01-14-audit-summary.md +133 -0
- package/docs/refactor/cursor-2026-01-13-14-00-audit-report.md +267 -0
- package/docs/technical_plan.md +510 -0
- package/docs/zh/examples/community-flow.md +38 -0
- package/docs/zh/examples/complete-workflow.md +10 -0
- package/docs/zh/examples/enduser-flow.md +33 -0
- package/docs/zh/examples/index.md +18 -0
- package/docs/zh/examples/multi-chain.md +46 -0
- package/docs/zh/examples/operator-flow.md +37 -0
- package/docs/zh/guide/CLI_GUIDE.md +48 -0
- package/docs/zh/guide/DOCUMENTATION_PLAN.md +455 -0
- package/docs/zh/guide/Plan.md +266 -0
- package/docs/zh/guide/SDK_Optimization_Evaluation_Plan.md +51 -0
- package/docs/zh/guide/Security-solution.md +106 -0
- package/docs/zh/guide/TEST_COMMANDS.md +125 -0
- package/docs/zh/guide/TEST_COVERAGE_MATRIX.md +72 -0
- package/docs/zh/guide/concepts/account-abstraction.md +95 -0
- package/docs/zh/guide/concepts/rainbow-bridge.md +68 -0
- package/docs/zh/guide/concepts/reputation.md +95 -0
- package/docs/zh/guide/concepts/superpaymaster.md +141 -0
- package/docs/zh/guide/getting-started.md +133 -0
- package/docs/zh/guide/installation.md +107 -0
- package/docs/zh/guide/old-solution.md +1078 -0
- package/docs/zh/guide/paper-data-collection.md +69 -0
- package/docs/zh/guide/quick-start.md +134 -0
- package/docs/zh/guide/sdk-readme.md +253 -0
- package/docs/zh/guide/task_breakdown.md +76 -0
- package/docs/zh/guide/technical_plan.md +510 -0
- package/docs/zh/guide/use-cases/community-management.md +141 -0
- package/docs/zh/guide/use-cases/gasless-transactions.md +71 -0
- package/docs/zh/guide/use-cases/operator-staking.md +84 -0
- package/docs/zh/guide/use-cases/yop.md +72 -0
- package/env.template +32 -0
- package/examples/l1-api-demo.ts +184 -0
- package/examples/l2-clients-demo.ts +138 -0
- package/examples/l3-user-onboarding.ts +74 -0
- package/examples/prepare-gasless.ts +89 -0
- package/examples/sdk-demo/DEVELOPER_GUIDE.md +159 -0
- package/examples/sdk-demo/README.md +30 -0
- package/examples/sdk-demo/usage.ts +137 -0
- package/examples/simple-gasless-demo.ts +80 -0
- package/examples/simple-superpaymaster-demo.ts +96 -0
- package/ext/aastar-shared-config/.env.example +6 -0
- package/ext/aastar-shared-config/.github/workflows/check-secrets.yml +257 -0
- package/ext/aastar-shared-config/AGENTS.md +21 -0
- package/ext/aastar-shared-config/CHANGELOG.md +99 -0
- package/ext/aastar-shared-config/LICENSE +21 -0
- package/ext/aastar-shared-config/QUICK_START.md +215 -0
- package/ext/aastar-shared-config/README.md +412 -0
- package/ext/aastar-shared-config/SHARED_CONFIG_SUMMARY.md +273 -0
- package/ext/aastar-shared-config/check-locker-status.mjs +7 -0
- package/ext/aastar-shared-config/favicon.ico +0 -0
- package/ext/aastar-shared-config/generate-comparison-table.sh +67 -0
- package/ext/aastar-shared-config/package.json +46 -0
- package/ext/aastar-shared-config/pnpm-lock.yaml +1182 -0
- package/ext/aastar-shared-config/src/abis/BLSAggregator.json +1 -0
- package/ext/aastar-shared-config/src/abis/DVTValidator.json +1 -0
- package/ext/aastar-shared-config/src/abis/GToken.json +1 -0
- package/ext/aastar-shared-config/src/abis/GTokenStaking.json +1 -0
- package/ext/aastar-shared-config/src/abis/MySBT.json +1 -0
- package/ext/aastar-shared-config/src/abis/PaymasterFactory.json +1 -0
- package/ext/aastar-shared-config/src/abis/PaymasterV4.json +1098 -0
- package/ext/aastar-shared-config/src/abis/Registry.json +1 -0
- package/ext/aastar-shared-config/src/abis/SimpleAccount.json +557 -0
- package/ext/aastar-shared-config/src/abis/SimpleAccountFactory.json +87 -0
- package/ext/aastar-shared-config/src/abis/SuperPaymasterV2.json +1 -0
- package/ext/aastar-shared-config/src/abis/index.ts +45 -0
- package/ext/aastar-shared-config/src/abis/xPNTsFactory.json +1 -0
- package/ext/aastar-shared-config/src/abis/xPNTsToken.json +1 -0
- package/ext/aastar-shared-config/src/branding.ts +32 -0
- package/ext/aastar-shared-config/src/communities.ts +93 -0
- package/ext/aastar-shared-config/src/constants.ts +67 -0
- package/ext/aastar-shared-config/src/contract-addresses.ts +95 -0
- package/ext/aastar-shared-config/src/contract-versions.ts +374 -0
- package/ext/aastar-shared-config/src/contracts.ts +414 -0
- package/ext/aastar-shared-config/src/index.ts +14 -0
- package/ext/aastar-shared-config/src/networks.ts +117 -0
- package/ext/aastar-shared-config/sync-abis.sh +92 -0
- package/ext/aastar-shared-config/sync-versions.mjs +150 -0
- package/ext/aastar-shared-config/tsconfig.json +18 -0
- package/ext/aastar-shared-config/tsup.config.ts +10 -0
- package/ext/aastar-shared-config/verify-all.sh +207 -0
- package/ext/aastar-shared-config/verify-contracts.sh +85 -0
- package/ext/aastar-shared-config/verify-mysbt-v243.mjs +27 -0
- package/ext/aastar-shared-config/verify-onchain-versions.mjs +93 -0
- package/l4-setup.sh +11 -0
- package/lib/SHARED_CONFIG_REFERENCE.md +133 -0
- package/lib/shared-config/.env.example +6 -0
- package/lib/shared-config/.github/workflows/check-secrets.yml +257 -0
- package/lib/shared-config/AGENTS.md +21 -0
- package/lib/shared-config/CHANGELOG.md +99 -0
- package/lib/shared-config/LICENSE +21 -0
- package/lib/shared-config/QUICK_START.md +215 -0
- package/lib/shared-config/README.md +412 -0
- package/lib/shared-config/SHARED_CONFIG_SUMMARY.md +273 -0
- package/lib/shared-config/check-locker-status.mjs +7 -0
- package/lib/shared-config/favicon.ico +0 -0
- package/lib/shared-config/generate-comparison-table.sh +67 -0
- package/lib/shared-config/package.json +46 -0
- package/lib/shared-config/pnpm-lock.yaml +1182 -0
- package/lib/shared-config/src/abis/BLSAggregator.json +1 -0
- package/lib/shared-config/src/abis/DVTValidator.json +1 -0
- package/lib/shared-config/src/abis/GToken.json +1 -0
- package/lib/shared-config/src/abis/GTokenStaking.json +1 -0
- package/lib/shared-config/src/abis/MySBT.json +1 -0
- package/lib/shared-config/src/abis/PaymasterFactory.json +1 -0
- package/lib/shared-config/src/abis/PaymasterV4.json +1098 -0
- package/lib/shared-config/src/abis/Registry.json +1 -0
- package/lib/shared-config/src/abis/SimpleAccount.json +557 -0
- package/lib/shared-config/src/abis/SimpleAccountFactory.json +87 -0
- package/lib/shared-config/src/abis/SuperPaymasterV2.json +1 -0
- package/lib/shared-config/src/abis/index.ts +45 -0
- package/lib/shared-config/src/abis/xPNTsFactory.json +1 -0
- package/lib/shared-config/src/abis/xPNTsToken.json +1 -0
- package/lib/shared-config/src/branding.ts +32 -0
- package/lib/shared-config/src/communities.ts +93 -0
- package/lib/shared-config/src/constants.ts +67 -0
- package/lib/shared-config/src/contract-addresses.ts +95 -0
- package/lib/shared-config/src/contract-versions.ts +374 -0
- package/lib/shared-config/src/contracts.ts +414 -0
- package/lib/shared-config/src/index.ts +14 -0
- package/lib/shared-config/src/networks.ts +117 -0
- package/lib/shared-config/sync-abis.sh +92 -0
- package/lib/shared-config/sync-versions.mjs +150 -0
- package/lib/shared-config/tsconfig.json +18 -0
- package/lib/shared-config/tsup.config.ts +10 -0
- package/lib/shared-config/verify-all.sh +207 -0
- package/lib/shared-config/verify-contracts.sh +85 -0
- package/lib/shared-config/verify-mysbt-v243.mjs +27 -0
- package/lib/shared-config/verify-onchain-versions.mjs +93 -0
- package/package.json +58 -22
- package/packages/account/package.json +23 -0
- package/packages/account/src/accounts/simple.test.ts +93 -0
- package/packages/account/src/accounts/simple.ts +84 -0
- package/packages/account/src/eoa.test.ts +37 -0
- package/packages/account/src/eoa.ts +33 -0
- package/packages/account/src/index.test.ts +34 -0
- package/packages/account/src/index.ts +61 -0
- package/packages/account/tsconfig.json +11 -0
- package/packages/analytics/package.json +28 -0
- package/packages/analytics/src/index.ts +145 -0
- package/packages/analytics/tsconfig.json +11 -0
- package/packages/core/package.json +32 -0
- package/packages/core/scripts/audit-abi-coverage.ts +165 -0
- package/packages/core/scripts/debug-regex.ts +36 -0
- package/packages/core/src/abis/.abi-hashes.json +26 -0
- package/packages/core/src/abis/BLSAggregator.json +686 -0
- package/packages/core/src/abis/BLSValidator.json +42 -0
- package/packages/core/src/abis/DVTValidator.json +368 -0
- package/packages/core/src/abis/Eip7702Support.json +24 -0
- package/packages/core/src/abis/EntryPoint.json +1382 -0
- package/packages/core/src/abis/GToken.json +513 -0
- package/packages/core/src/abis/GTokenStaking.json +949 -0
- package/packages/core/src/abis/LegacyAccount.json +625 -0
- package/packages/core/src/abis/MySBT.json +1518 -0
- package/packages/core/src/abis/Paymaster.json +1143 -0
- package/packages/core/src/abis/PaymasterFactory.json +640 -0
- package/packages/core/src/abis/Registry.json +1942 -0
- package/packages/core/src/abis/ReputationSystem.json +699 -0
- package/packages/core/src/abis/SenderCreator.json +99 -0
- package/packages/core/src/abis/Simple7702Account.json +395 -0
- package/packages/core/src/abis/SimpleAccount.json +560 -0
- package/packages/core/src/abis/SimpleAccountFactory.json +111 -0
- package/packages/core/src/abis/SimpleAccountFactoryV08.json +87 -0
- package/packages/core/src/abis/SimpleAccountV08.json +557 -0
- package/packages/core/src/abis/SuperPaymaster.json +1781 -0
- package/packages/core/src/abis/UserOperationLib.json +57 -0
- package/packages/core/src/abis/abi.config.json +24 -0
- package/packages/core/src/abis/index.ts +104 -0
- package/packages/core/src/abis/xPNTsFactory.json +718 -0
- package/packages/core/src/abis/xPNTsToken.json +1280 -0
- package/packages/core/src/actions/StateValidator.test.ts +175 -0
- package/packages/core/src/actions/StateValidator.ts +253 -0
- package/packages/core/src/actions/account.test.ts +155 -0
- package/packages/core/src/actions/account.ts +179 -0
- package/packages/core/src/actions/aggregator.test.ts +88 -0
- package/packages/core/src/actions/aggregator.ts +41 -0
- package/packages/core/src/actions/dvt.test.ts +124 -0
- package/packages/core/src/actions/dvt.ts +53 -0
- package/packages/core/src/actions/entryPoint.test.ts +176 -0
- package/packages/core/src/actions/entryPoint.ts +266 -0
- package/packages/core/src/actions/factory.test.ts +250 -0
- package/packages/core/src/actions/factory.ts +613 -0
- package/packages/core/src/actions/faucet.test.ts +202 -0
- package/packages/core/src/actions/faucet.ts +421 -0
- package/packages/core/src/actions/gtokenExtended.test.ts +162 -0
- package/packages/core/src/actions/gtokenExtended.ts +153 -0
- package/packages/core/src/actions/index.ts +18 -0
- package/packages/core/src/actions/paymasterV4.test.ts +209 -0
- package/packages/core/src/actions/paymasterV4.ts +455 -0
- package/packages/core/src/actions/registry.test.ts +443 -0
- package/packages/core/src/actions/registry.ts +860 -0
- package/packages/core/src/actions/reputation.test.ts +225 -0
- package/packages/core/src/actions/reputation.ts +378 -0
- package/packages/core/src/actions/sbt.test.ts +322 -0
- package/packages/core/src/actions/sbt.ts +681 -0
- package/packages/core/src/actions/staking.test.ts +273 -0
- package/packages/core/src/actions/staking.ts +421 -0
- package/packages/core/src/actions/superPaymaster.test.ts +356 -0
- package/packages/core/src/actions/superPaymaster.ts +828 -0
- package/packages/core/src/actions/tokens.test.ts +60 -0
- package/packages/core/src/actions/tokens.ts +527 -0
- package/packages/core/src/actions/validators.test.ts +239 -0
- package/packages/core/src/actions/validators.ts +590 -0
- package/packages/core/src/branding.ts +32 -0
- package/packages/core/src/clients/BaseClient.ts +78 -0
- package/packages/core/src/clients/types.ts +69 -0
- package/packages/core/src/clients.ts +13 -0
- package/packages/core/src/communities.ts +93 -0
- package/packages/core/src/config/ContractConfigManager.ts +63 -0
- package/packages/core/src/constants.ts +145 -0
- package/packages/core/src/contract-addresses.ts +125 -0
- package/packages/core/src/contracts.test.ts +58 -0
- package/packages/core/src/contracts.ts +414 -0
- package/packages/core/src/crypto/blsSigner.ts +124 -0
- package/packages/core/src/crypto/index.ts +1 -0
- package/packages/core/src/index.ts +22 -0
- package/packages/core/src/networks.ts +127 -0
- package/packages/core/src/requirementChecker.test.ts +71 -0
- package/packages/core/src/requirementChecker.ts +187 -0
- package/packages/core/src/roles.test.ts +34 -0
- package/packages/core/src/roles.ts +255 -0
- package/packages/core/src/utils/validation.test.ts +50 -0
- package/packages/core/src/utils/validation.ts +66 -0
- package/packages/core/src/utils.ts +23 -0
- package/packages/core/tsconfig.json +12 -0
- package/packages/core/vitest.config.ts +14 -0
- package/packages/dapp/package.json +30 -0
- package/packages/dapp/src/index.ts +4 -0
- package/packages/dapp/src/ui/components/EvaluationPanel.tsx +40 -0
- package/packages/dapp/src/ui/hooks/useCreditScore.ts +44 -0
- package/packages/dapp/src/ui/hooks/useSuperPaymaster.ts +31 -0
- package/packages/dapp/src/ui/index.ts +22 -0
- package/packages/dapp/tsconfig.json +12 -0
- package/packages/identity/package.json +25 -0
- package/packages/identity/src/index.ts +114 -0
- package/packages/identity/src/mysbt.ts +48 -0
- package/packages/identity/tsconfig.json +11 -0
- package/packages/paymaster/package.json +25 -0
- package/packages/paymaster/src/SuperPaymaster/index.ts +168 -0
- package/packages/paymaster/src/V4/PaymasterClient.test.ts +114 -0
- package/packages/paymaster/src/V4/PaymasterClient.ts +385 -0
- package/packages/paymaster/src/V4/PaymasterOperator.test.ts +80 -0
- package/packages/paymaster/src/V4/PaymasterOperator.ts +282 -0
- package/packages/paymaster/src/V4/PaymasterUtils.test.ts +54 -0
- package/packages/paymaster/src/V4/PaymasterUtils.ts +185 -0
- package/packages/paymaster/src/V4/SuperPaymasterClient.test.ts +79 -0
- package/packages/paymaster/src/V4/SuperPaymasterClient.ts +123 -0
- package/packages/paymaster/src/V4/index.ts +4 -0
- package/packages/paymaster/src/index.ts +5 -0
- package/packages/paymaster/tsconfig.json +11 -0
- package/packages/sdk/README.md +150 -0
- package/packages/sdk/aastar/package.json +21 -0
- package/packages/sdk/aastar/src/index.ts +3 -0
- package/packages/sdk/aastar/tsconfig.json +7 -0
- package/packages/sdk/coverage_output.txt +393 -0
- package/packages/sdk/coverage_output_final.txt +739 -0
- package/packages/sdk/coverage_output_final_v2.txt +722 -0
- package/packages/sdk/coverage_output_final_v3.txt +722 -0
- package/packages/sdk/examples/config.json +1 -0
- package/packages/sdk/examples/regression_test.ts +106 -0
- package/packages/sdk/package.json +44 -0
- package/packages/sdk/src/clients/ExperimentClient.test.ts +65 -0
- package/packages/sdk/src/clients/ExperimentClient.ts +80 -0
- package/packages/sdk/src/clients/admin.test.ts +98 -0
- package/packages/sdk/src/clients/admin.ts +154 -0
- package/packages/sdk/src/clients/clients.test.ts +104 -0
- package/packages/sdk/src/clients/community.test.ts +118 -0
- package/packages/sdk/src/clients/community.ts +337 -0
- package/packages/sdk/src/clients/endUser.test.ts +221 -0
- package/packages/sdk/src/clients/endUser.ts +551 -0
- package/packages/sdk/src/clients/operator.test.ts +162 -0
- package/packages/sdk/src/clients/operator.ts +355 -0
- package/packages/sdk/src/errors/AAStarError.test.ts +92 -0
- package/packages/sdk/src/errors/AAStarError.ts +70 -0
- package/packages/sdk/src/errors/decoder.test.ts +107 -0
- package/packages/sdk/src/errors/decoder.ts +91 -0
- package/packages/sdk/src/index.ts +23 -0
- package/packages/sdk/src/node/index.ts +8 -0
- package/packages/sdk/src/types/result.ts +29 -0
- package/packages/sdk/src/utils/errorHandler.test.ts +102 -0
- package/packages/sdk/src/utils/errorHandler.ts +167 -0
- package/packages/sdk/src/utils/eventDecoder.test.ts +56 -0
- package/packages/sdk/src/utils/eventDecoder.ts +66 -0
- package/packages/sdk/src/utils/funding.test.ts +117 -0
- package/packages/sdk/src/utils/funding.ts +280 -0
- package/packages/sdk/src/utils/keys.test.ts +105 -0
- package/packages/sdk/src/utils/keys.ts +174 -0
- package/packages/sdk/src/utils/roleData.test.ts +85 -0
- package/packages/sdk/src/utils/roleData.ts +140 -0
- package/packages/sdk/src/utils/testScenarios.test.ts +79 -0
- package/packages/sdk/src/utils/testScenarios.ts +128 -0
- package/packages/sdk/src/utils/userOp.test.ts +190 -0
- package/packages/sdk/src/utils/userOp.ts +265 -0
- package/packages/sdk/tests/scenarios/01_onboard_community.ts +62 -0
- package/packages/sdk/tests/scenarios/02_onboard_operator.ts +109 -0
- package/packages/sdk/tests/scenarios/03_onboard_user.ts +53 -0
- package/packages/sdk/tests/scenarios/04_gasless_tx_flow.ts +68 -0
- package/packages/sdk/tests/scenarios/check_entrypoint.ts +19 -0
- package/packages/sdk/tests/scenarios/check_initialization.ts +65 -0
- package/packages/sdk/tests/scenarios/debug_addresses.ts +26 -0
- package/packages/sdk/tests/scenarios/diagnose_scenario4.ts +55 -0
- package/packages/sdk/tests/scenarios/setup.ts +33 -0
- package/packages/sdk/tests/scenarios/test_entrypoint_nonce.ts +46 -0
- package/packages/sdk/tsconfig.json +11 -0
- package/packages/tokens/package.json +25 -0
- package/packages/tokens/src/index.ts +273 -0
- package/packages/tokens/tsconfig.json +11 -0
- package/pnpm-workspace.yaml +2 -0
- package/run_l4_gasless_regression.sh +79 -0
- package/run_sdk_regression.sh +238 -0
- package/scripts/00_utils.ts +59 -0
- package/scripts/00_verify_phase1.ts +130 -0
- package/scripts/01_1_prep_gtoken.ts +81 -0
- package/scripts/01_2_register_sbt.ts +88 -0
- package/scripts/01_3_prep_tokens_paymaster.ts +102 -0
- package/scripts/01_prepare_all.ts +222 -0
- package/scripts/02_test_eoa.ts +53 -0
- package/scripts/03_test_standard_aa.ts +68 -0
- package/scripts/04_0_check_deploy.ts +24 -0
- package/scripts/04_1_check_allowance.ts +44 -0
- package/scripts/04_2_construct_verify.ts +96 -0
- package/scripts/04_3_verify_estimate.ts +66 -0
- package/scripts/04_4_verify_pack.ts +74 -0
- package/scripts/04_test_paymaster_v4.ts +60 -0
- package/scripts/05_1_deposit.ts +48 -0
- package/scripts/05_test_superpaymaster.ts +58 -0
- package/scripts/06_local_test_v3_admin.ts +163 -0
- package/scripts/06_local_test_v3_execution.ts +132 -0
- package/scripts/06_local_test_v3_full.ts +490 -0
- package/scripts/06_local_test_v3_funding.ts +124 -0
- package/scripts/06_local_test_v3_reputation.ts +234 -0
- package/scripts/07_local_test_v3_audit.ts +181 -0
- package/scripts/08_local_test_registry_lifecycle.ts +382 -0
- package/scripts/09_local_test_community_lifecycle.ts +385 -0
- package/scripts/09_local_test_community_simple.ts +108 -0
- package/scripts/09_scenario_bread_independent.ts +247 -0
- package/scripts/10_scenario_super_shared.ts +196 -0
- package/scripts/10_test_protocol_admin_full.ts +173 -0
- package/scripts/11_scenario_hacker_defense.ts +104 -0
- package/scripts/11_test_core_flows_full.ts +157 -0
- package/scripts/12_test_slash_mechanism.ts +205 -0
- package/scripts/12_test_slash_queries.ts +83 -0
- package/scripts/12_test_staking_exit.ts +152 -0
- package/scripts/12_test_staking_slash.ts +301 -0
- package/scripts/12_test_tier2_slash.ts +139 -0
- package/scripts/13_test_sbt_burn_linkage.ts +266 -0
- package/scripts/14_test_credit_redesign.ts +266 -0
- package/scripts/15_test_bls_full.ts +148 -0
- package/scripts/15_test_dvt_bls_full.ts +140 -0
- package/scripts/17_test_cross_role_collaboration.ts +95 -0
- package/scripts/18_sdk_e2e_verification.ts +67 -0
- package/scripts/18_test_dvt_sdk_flow.ts +138 -0
- package/scripts/18_test_lifecycle_completion.ts +144 -0
- package/scripts/19_sdk_experiment_runner.ts +114 -0
- package/scripts/19_sdk_experiment_runner.ts.backup +391 -0
- package/scripts/20_sdk_full_capability.ts +93 -0
- package/scripts/20_test_superpaymaster_new_apis.ts +193 -0
- package/scripts/21_test_paymasterv4_complete.ts +341 -0
- package/scripts/22_test_bls_signing.ts +260 -0
- package/scripts/23_test_middleware.ts +197 -0
- package/scripts/98_edge_reentrancy.ts +85 -0
- package/scripts/99_bug_hunting_fast.ts +99 -0
- package/scripts/analyze_abi_coverage.ts +169 -0
- package/scripts/check-admin.ts +95 -0
- package/scripts/check-jason-status.ts +184 -0
- package/scripts/check-roles.ts +36 -0
- package/scripts/clear-nonce.ts +47 -0
- package/scripts/collect_industry_baseline.ts +236 -0
- package/scripts/complete-jack-superpaymaster.ts +171 -0
- package/scripts/complete_env_config.ts +97 -0
- package/scripts/debug-addr.ts +43 -0
- package/scripts/debug-community-registration.ts +92 -0
- package/scripts/debug-deploy-v4.ts +116 -0
- package/scripts/debug-paymaster.ts +127 -0
- package/scripts/debug-register-role.ts +101 -0
- package/scripts/debug-version.ts +71 -0
- package/scripts/debug_account_c.ts +43 -0
- package/scripts/debug_bls.ts +58 -0
- package/scripts/debug_config_v036.ts +13 -0
- package/scripts/debug_contracts.ts +2 -0
- package/scripts/debug_env.ts +69 -0
- package/scripts/debug_find_paymaster.ts +98 -0
- package/scripts/debug_isolated_registration.ts +256 -0
- package/scripts/debug_paymaster_config.ts +19 -0
- package/scripts/debug_pim_addr.ts +23 -0
- package/scripts/debug_pm_status.ts +51 -0
- package/scripts/debug_registry.ts +39 -0
- package/scripts/debug_registry_setup.ts +129 -0
- package/scripts/debug_sanity.ts +32 -0
- package/scripts/debug_shared_config.ts +10 -0
- package/scripts/debug_token_compat.ts +51 -0
- package/scripts/debug_tokens.ts +41 -0
- package/scripts/debug_vcheck.ts +33 -0
- package/scripts/deploy-sync.ts +104 -0
- package/scripts/deploy_and_init_v3.sh +134 -0
- package/scripts/deploy_anvil_accounts.ts +144 -0
- package/scripts/deploy_paymaster_v4.ts +139 -0
- package/scripts/deploy_test_accounts.ts +401 -0
- package/scripts/deprecated/check_aa_entrypoint.ts +29 -0
- package/scripts/deprecated/check_paymaster_deposits.ts +45 -0
- package/scripts/deprecated/debug_aoa_function.ts +28 -0
- package/scripts/deprecated/debug_aoa_issue.ts +16 -0
- package/scripts/deprecated/debug_pimlico_aa23.ts +40 -0
- package/scripts/deprecated/debug_summary.ts +34 -0
- package/scripts/deprecated/deploy_v07_aa.ts +99 -0
- package/scripts/deprecated/fix_all_issues.ts +61 -0
- package/scripts/deprecated/fund_bpnts.ts +52 -0
- package/scripts/deprecated/get_factory_addresses.ts +28 -0
- package/scripts/deprecated/recheck_pim.ts +34 -0
- package/scripts/dev_tools/extract_abis.sh +151 -0
- package/scripts/dev_tools/extract_addresses_to_env.sh +67 -0
- package/scripts/dev_tools/final_safe_harmonize.py +77 -0
- package/scripts/dev_tools/safe_harmonize.py +107 -0
- package/scripts/dev_tools/surgical_harmonize.py +83 -0
- package/scripts/experiment/stage3/SETUP_GUIDE.md +258 -0
- package/scripts/experiment/stage3/archived_scripts/00_token_distribution.ts +78 -0
- package/scripts/experiment/stage3/archived_scripts/01_dao_launch.ts +96 -0
- package/scripts/experiment/stage3/archived_scripts/01b_bread_launch.ts +112 -0
- package/scripts/experiment/stage3/archived_scripts/02_operator_setup.ts +84 -0
- package/scripts/experiment/stage3/archived_scripts/02b_operator_b_setup.ts +104 -0
- package/scripts/experiment/stage3/archived_scripts/02c_finalize_operators.ts +86 -0
- package/scripts/experiment/stage3/archived_scripts/02d_operator_collateral.ts +89 -0
- package/scripts/experiment/stage3/archived_scripts/03_user_onboarding.ts +83 -0
- package/scripts/experiment/stage3/archived_scripts/03b_deploy_aa_account.ts +61 -0
- package/scripts/experiment/stage3/archived_scripts/03c_aa_onboarding.ts +104 -0
- package/scripts/experiment/stage3/archived_scripts/03d_mint_points.ts +60 -0
- package/scripts/experiment/stage3/archived_scripts/04_benchmarking.ts +100 -0
- package/scripts/experiment/stage3/archived_scripts/05_multi_op_setup.ts +149 -0
- package/scripts/experiment/stage3/archived_scripts/README.md +58 -0
- package/scripts/experiment/stage3/archived_scripts/check_roles.ts +29 -0
- package/scripts/experiment/stage3/archived_scripts/decode_error.ts +23 -0
- package/scripts/experiment/stage3/archived_scripts/fund_user.ts +51 -0
- package/scripts/experiment/stage3/archived_scripts/gen_b_key.ts +3 -0
- package/scripts/experiment/stage3/archived_scripts/gen_keys.ts +4 -0
- package/scripts/experiment/stage3/archived_scripts/setup.ts +105 -0
- package/scripts/experiment/stage3/archived_scripts/test_key.ts +4 -0
- package/scripts/experiment/stage3/archived_scripts/verify_state.ts +59 -0
- package/scripts/experiment/stage3/refactored/00_token_distribution.ts +46 -0
- package/scripts/experiment/stage3/refactored/02_operator_setup.ts +65 -0
- package/scripts/experiment/stage3/refactored/03_user_onboarding.ts +68 -0
- package/scripts/experiment/stage3/refactored/05_multi_op_setup.ts +63 -0
- package/scripts/experiment/stage3/refactored/README.md +71 -0
- package/scripts/extract-docs.sh +141 -0
- package/scripts/fund-jack.ts +38 -0
- package/scripts/generate_env_from_deployment.ts +109 -0
- package/scripts/inspect-anni-token.ts +116 -0
- package/scripts/inspect-factory.ts +83 -0
- package/scripts/l4-paymasterv4-transfer-test.ts +228 -0
- package/scripts/l4-setup.ts +453 -0
- package/scripts/l4-state.json +80 -0
- package/scripts/phase1_verify_contracts.ts +207 -0
- package/scripts/pre_test_sync.ts +83 -0
- package/scripts/prepare_sepolia_resources.ts +154 -0
- package/scripts/publish_all.sh +39 -0
- package/scripts/query-jack-token.ts +22 -0
- package/scripts/quick_setup.ts +124 -0
- package/scripts/quick_setup_account.ts +80 -0
- package/scripts/run_automated_experiment.sh +121 -0
- package/scripts/run_daily_experiment.ts +70 -0
- package/scripts/run_l4_gasless_regression.sh +32 -0
- package/scripts/run_sdk_experiment.sh +13 -0
- package/scripts/run_sdk_regression-v2.sh +38 -0
- package/scripts/sdk_regression_v2.ts +162 -0
- package/scripts/security_audit.sh +172 -0
- package/scripts/setup-bbq-community.ts +187 -0
- package/scripts/setup-dancing-community.ts +223 -0
- package/scripts/setup_test_accounts.ts +88 -0
- package/scripts/setup_test_environment.ts +147 -0
- package/scripts/sync_anvil_config.cjs +44 -0
- package/scripts/sync_config_to_env.ts +88 -0
- package/scripts/sync_contract_addresses.ts +186 -0
- package/scripts/sync_sepolia_config.cjs +90 -0
- package/scripts/sync_sepolia_config.mjs +74 -0
- package/scripts/test-brown-v4-deploy.ts +90 -0
- package/scripts/test-faucet-and-gasless.ts +170 -0
- package/scripts/test-jack-gasless.ts +119 -0
- package/scripts/test-jack-registration.ts +133 -0
- package/scripts/test-jack-superpaymaster-api.ts +112 -0
- package/scripts/test-kms-gasless.ts +138 -0
- package/scripts/test_groups.ts +138 -0
- package/scripts/test_multi_community_anvil.ts +276 -0
- package/scripts/test_new_sdk_apis_sepolia.ts +193 -0
- package/scripts/test_sdk_join_idempotent.ts +233 -0
- package/scripts/test_simple_sepolia.ts +44 -0
- package/scripts/update_env_from_config.ts +83 -0
- package/scripts/v2_regression/00_validate_env.ts +101 -0
- package/scripts/v2_regression/01_setup_and_fund.ts +132 -0
- package/scripts/v2_regression/02_operator_onboarding.ts +174 -0
- package/scripts/v2_regression/03_community_registry.ts +139 -0
- package/scripts/v2_regression/04_enduser_flow.ts +141 -0
- package/scripts/v2_regression/05_admin_audit.ts +157 -0
- package/scripts/v2_regression/README.md +161 -0
- package/scripts/validate_env.ts +112 -0
- package/scripts/verify-tx-status.ts +81 -0
- package/scripts/verify_onchain_milestone.ts +114 -0
- package/scripts/verify_phase1.ts +66 -0
- package/scripts/verify_phase2.ts +66 -0
- package/sdk_experiment_data.csv +4 -0
- package/simple-test-paymaster.sh +2 -0
- package/simple-test-superpaymaster.sh +1 -0
- package/tests/l1-regression.test.ts +458 -0
- package/tests/l4-test-anni-gasless.ts +105 -0
- package/tests/l4-test-jason1-gasless.ts +150 -0
- package/tests/l4-test-jason2-gasless.ts +174 -0
- package/tests/l4-test-pmv4-deposit.ts +111 -0
- package/tests/l4-test-pmv4-gasless.ts +166 -0
- package/tests/l4-test-pmv4-submit.ts +223 -0
- package/tests/regression/README.md +168 -0
- package/tests/regression/config.ts +215 -0
- package/tests/regression/display-versions.ts +85 -0
- package/tests/regression/index.ts +67 -0
- package/tests/regression/l1-tests.ts +267 -0
- package/tests/regression/l2-tests.ts +171 -0
- package/tests/regression/l3-tests.ts +125 -0
- package/tests/regression/l4-gasless.ts +897 -0
- package/tests/regression/l4-runner.ts +52 -0
- package/tests/reports/phase1_contract_verification.md +45 -0
- package/tests/utils/contractVerifier.ts +237 -0
- package/tests/utils/userOpHelper.ts +194 -0
- package/tsconfig.json +41 -0
- package/typedoc.json +59 -0
- package/vitest.config.ts +16 -0
- package/dist/clients/admin.d.ts +0 -12
- package/dist/clients/admin.d.ts.map +0 -1
- package/dist/clients/admin.js +0 -20
- package/dist/clients/admin.js.map +0 -1
- package/dist/clients/community.d.ts +0 -12
- package/dist/clients/community.d.ts.map +0 -1
- package/dist/clients/community.js +0 -18
- package/dist/clients/community.js.map +0 -1
- package/dist/clients/endUser.d.ts +0 -12
- package/dist/clients/endUser.d.ts.map +0 -1
- package/dist/clients/endUser.js +0 -20
- package/dist/clients/endUser.js.map +0 -1
- package/dist/clients/operator.d.ts +0 -18
- package/dist/clients/operator.d.ts.map +0 -1
- package/dist/clients/operator.js +0 -65
- package/dist/clients/operator.js.map +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Shared-Config 参考指南
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
`lib/shared-config` 是作为**参考和学习资料**添加的git submodule,用于了解AAStar社区的最佳实践和配置组织方式。
|
|
6
|
+
|
|
7
|
+
**重要**: 这不是一个npm依赖,而是一个学习参考。`@aastar/core`模块应该借鉴其设计,但不直接导入。
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Shared-Config 结构分析
|
|
12
|
+
|
|
13
|
+
### 核心文件
|
|
14
|
+
|
|
15
|
+
1. **`contract-addresses.ts`** - 合约地址的单一真相来源
|
|
16
|
+
- 按网络组织(Sepolia, Mainnet, Optimism等)
|
|
17
|
+
- 包含所有V3合约地址
|
|
18
|
+
- **借鉴点**: 统一的地址管理模式
|
|
19
|
+
|
|
20
|
+
2. **`contracts.ts`** - 合约配置和元数据
|
|
21
|
+
- 合约名称、版本、部署信息
|
|
22
|
+
- **借鉴点**: 合约元数据组织方式
|
|
23
|
+
|
|
24
|
+
3. **`contract-versions.ts`** - 版本管理
|
|
25
|
+
- 链上版本验证
|
|
26
|
+
- **借鉴点**: 版本追踪机制
|
|
27
|
+
|
|
28
|
+
4. **`communities.ts`** - 社区配置
|
|
29
|
+
- 社区列表和元数据
|
|
30
|
+
- **借鉴点**: 社区数据结构
|
|
31
|
+
|
|
32
|
+
5. **`networks.ts`** - 网络配置
|
|
33
|
+
- RPC端点、Chain ID等
|
|
34
|
+
- **借鉴点**: 多链配置模式
|
|
35
|
+
|
|
36
|
+
6. **`constants.ts`** - 常量定义
|
|
37
|
+
- 协议参数、魔数等
|
|
38
|
+
- **借鉴点**: 常量集中管理
|
|
39
|
+
|
|
40
|
+
7. **`branding.ts`** - 品牌资源
|
|
41
|
+
- Logo、颜色等
|
|
42
|
+
- **借鉴点**: 品牌一致性
|
|
43
|
+
|
|
44
|
+
8. **`abis/`** - ABI文件
|
|
45
|
+
- 所有合约的ABI
|
|
46
|
+
- **借鉴点**: ABI组织方式
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 当前Core模块状态
|
|
51
|
+
|
|
52
|
+
`@aastar/core` 已经有类似的文件:
|
|
53
|
+
- ✅ `contract-addresses.ts` - 已存在
|
|
54
|
+
- ✅ `contracts.ts` - 已存在
|
|
55
|
+
- ✅ `contract-versions.ts` - 已存在
|
|
56
|
+
- ✅ `communities.ts` - 已存在
|
|
57
|
+
- ✅ `abis/` - 已存在
|
|
58
|
+
|
|
59
|
+
**结论**: Core模块已经借鉴了shared-config的组织方式,无需额外迁移。
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 使用建议
|
|
64
|
+
|
|
65
|
+
### 1. 作为参考资料
|
|
66
|
+
|
|
67
|
+
当需要了解最新的合约地址、版本或配置时:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
cd lib/shared-config
|
|
71
|
+
git pull origin main
|
|
72
|
+
# 查看最新配置
|
|
73
|
+
cat src/contract-addresses.ts
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 2. 同步更新
|
|
77
|
+
|
|
78
|
+
定期检查shared-config的更新,手动同步到core:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# 查看shared-config的变更
|
|
82
|
+
cd lib/shared-config
|
|
83
|
+
git log --oneline -10
|
|
84
|
+
|
|
85
|
+
# 手动更新core模块相应文件
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 3. 学习最佳实践
|
|
89
|
+
|
|
90
|
+
参考shared-config的:
|
|
91
|
+
- 类型定义方式
|
|
92
|
+
- 配置组织结构
|
|
93
|
+
- 文档注释风格
|
|
94
|
+
- 导出模式
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 维护指南
|
|
99
|
+
|
|
100
|
+
### 更新Submodule
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# 更新到最新版本
|
|
104
|
+
git submodule update --remote lib/shared-config
|
|
105
|
+
|
|
106
|
+
# 提交submodule更新
|
|
107
|
+
git add lib/shared-config
|
|
108
|
+
git commit -m "chore: update shared-config reference"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 不要导入
|
|
112
|
+
|
|
113
|
+
❌ **错误做法**:
|
|
114
|
+
```typescript
|
|
115
|
+
import { CONTRACTS } from '../../lib/shared-config/src';
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
✅ **正确做法**:
|
|
119
|
+
```typescript
|
|
120
|
+
// 在 @aastar/core 中维护自己的配置
|
|
121
|
+
export const CONTRACTS = {
|
|
122
|
+
// 借鉴 shared-config 的结构,但独立维护
|
|
123
|
+
};
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 总结
|
|
129
|
+
|
|
130
|
+
- **Submodule目的**: 参考学习,不是依赖
|
|
131
|
+
- **Core模块**: 独立维护,借鉴设计
|
|
132
|
+
- **更新策略**: 手动同步,保持独立性
|
|
133
|
+
- **最佳实践**: 学习结构,不直接导入
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
name: Security - Check for Private Keys
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [ main, master, develop ]
|
|
6
|
+
push:
|
|
7
|
+
branches: [ main, master, develop ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
check-secrets:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
name: Scan for Private Keys and Secrets
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout code
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
|
|
20
|
+
- name: Check for private keys and sensitive data
|
|
21
|
+
run: |
|
|
22
|
+
#!/bin/bash
|
|
23
|
+
set -e
|
|
24
|
+
|
|
25
|
+
RED='\033[0;31m'
|
|
26
|
+
GREEN='\033[0;32m'
|
|
27
|
+
YELLOW='\033[1;33m'
|
|
28
|
+
BLUE='\033[0;34m'
|
|
29
|
+
NC='\033[0m'
|
|
30
|
+
|
|
31
|
+
# 排除的目录
|
|
32
|
+
EXCLUDED_DIRS="node_modules|\.git|\.netlify|\.svelte-kit|build|dist|\.next|contracts/broadcast|contracts/cache|contracts/lib|test-results|playwright-report|\.auth|vendor|cache|out"
|
|
33
|
+
|
|
34
|
+
# 扫描的文件扩展名
|
|
35
|
+
SCAN_EXTENSIONS="\.(ts|tsx|js|jsx|svelte|sol|md|json|env|example|toml|yaml|yml)$"
|
|
36
|
+
|
|
37
|
+
echo -e "${BLUE}🔒 GitHub Actions: Scanning repository for private keys...${NC}\n"
|
|
38
|
+
|
|
39
|
+
# 获取所有文件(排除特定目录)
|
|
40
|
+
FILES_TO_SCAN=$(find . -type f | grep -E "$SCAN_EXTENSIONS" | grep -v -E "$EXCLUDED_DIRS" || true)
|
|
41
|
+
|
|
42
|
+
if [ -z "$FILES_TO_SCAN" ]; then
|
|
43
|
+
echo -e "${GREEN}✅ No files to scan${NC}"
|
|
44
|
+
exit 0
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
FILE_COUNT=$(echo "$FILES_TO_SCAN" | wc -l | tr -d ' ')
|
|
48
|
+
echo -e "${BLUE}📋 Scanning ${FILE_COUNT} file(s) for secrets...${NC}\n"
|
|
49
|
+
|
|
50
|
+
# 检测模式
|
|
51
|
+
# 1. Ethereum private key: 0x + 64 hex chars
|
|
52
|
+
ETHEREUM_KEY_PATTERN='0x[a-fA-F0-9]{64}'
|
|
53
|
+
|
|
54
|
+
# 2. PEM format private keys
|
|
55
|
+
PEM_PATTERN='BEGIN.*PRIVATE KEY'
|
|
56
|
+
|
|
57
|
+
# 3. AWS access key
|
|
58
|
+
AWS_ACCESS_PATTERN='AKIA[0-9A-Z]{16}'
|
|
59
|
+
|
|
60
|
+
# 4. AWS secret key
|
|
61
|
+
AWS_SECRET_PATTERN='aws_secret_access_key[[:space:]]*=[[:space:]]*[a-zA-Z0-9/+]{40}'
|
|
62
|
+
|
|
63
|
+
# 5. Private key with actual hex value
|
|
64
|
+
PRIVATE_KEY_WITH_VALUE_PATTERN='private[_-]key[[:space:]]*[:=][[:space:]]*0x[a-fA-F0-9]{32,}'
|
|
65
|
+
|
|
66
|
+
# 6. OpenAI API keys (sk-... or sk-proj-...)
|
|
67
|
+
OPENAI_KEY_PATTERN='sk-[a-zA-Z0-9]{48,}'
|
|
68
|
+
OPENAI_PROJ_KEY_PATTERN='sk-proj-[a-zA-Z0-9_-]{48,}'
|
|
69
|
+
|
|
70
|
+
# 7. Google AI (Gemini) API keys (AIza...)
|
|
71
|
+
GOOGLE_AI_KEY_PATTERN='AIza[a-zA-Z0-9_-]{35,}'
|
|
72
|
+
|
|
73
|
+
# 8. Anthropic (Claude) API keys (sk-ant-...)
|
|
74
|
+
ANTHROPIC_KEY_PATTERN='sk-ant-[a-zA-Z0-9_-]{95,}'
|
|
75
|
+
|
|
76
|
+
# 9. GitHub Personal Access Tokens (ghp_..., gho_..., ghs_...)
|
|
77
|
+
GITHUB_PAT_PATTERN='gh[pousr]_[a-zA-Z0-9]{36,}'
|
|
78
|
+
|
|
79
|
+
# 10. Stripe API keys (sk_live_..., sk_test_...)
|
|
80
|
+
STRIPE_KEY_PATTERN='sk_(live|test)_[a-zA-Z0-9]{24,}'
|
|
81
|
+
|
|
82
|
+
# 11. Generic API keys
|
|
83
|
+
API_KEY_PATTERN='api[_-]key[[:space:]]*[:=][[:space:]]*[\"\\x27][a-zA-Z0-9]{32,}[\"\\x27]'
|
|
84
|
+
|
|
85
|
+
FOUND_SECRETS=0
|
|
86
|
+
TOTAL_FINDINGS=0
|
|
87
|
+
|
|
88
|
+
for FILE in $FILES_TO_SCAN; do
|
|
89
|
+
if [ ! -f "$FILE" ]; then
|
|
90
|
+
continue
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
FINDINGS=""
|
|
94
|
+
|
|
95
|
+
# Check Ethereum keys
|
|
96
|
+
if grep -nE "$ETHEREUM_KEY_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
97
|
+
FINDINGS="${FINDINGS} [CRITICAL] Ethereum Private Key (256-bit hex)\n"
|
|
98
|
+
FINDINGS="${FINDINGS}$(grep -nE "$ETHEREUM_KEY_PATTERN" "$FILE" | head -3 | sed 's/^/ /')\n"
|
|
99
|
+
FOUND_SECRETS=1
|
|
100
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# Check PEM keys
|
|
104
|
+
if grep -nE "$PEM_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
105
|
+
FINDINGS="${FINDINGS} [CRITICAL] PEM Private Key\n"
|
|
106
|
+
FINDINGS="${FINDINGS}$(grep -nE "$PEM_PATTERN" "$FILE" | head -3 | sed 's/^/ /')\n"
|
|
107
|
+
FOUND_SECRETS=1
|
|
108
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
# Check AWS access keys
|
|
112
|
+
if grep -nE "$AWS_ACCESS_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
113
|
+
FINDINGS="${FINDINGS} [CRITICAL] AWS Access Key\n"
|
|
114
|
+
FINDINGS="${FINDINGS}$(grep -nE "$AWS_ACCESS_PATTERN" "$FILE" | head -3 | sed 's/^/ /')\n"
|
|
115
|
+
FOUND_SECRETS=1
|
|
116
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
# Check AWS secret keys
|
|
120
|
+
if grep -nE "$AWS_SECRET_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
121
|
+
FINDINGS="${FINDINGS} [CRITICAL] AWS Secret Key\n"
|
|
122
|
+
FINDINGS="${FINDINGS}$(grep -nE "$AWS_SECRET_PATTERN" "$FILE" | head -3 | sed 's/^/ /')\n"
|
|
123
|
+
FOUND_SECRETS=1
|
|
124
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
# Check private keys with values
|
|
128
|
+
if grep -nEi "$PRIVATE_KEY_WITH_VALUE_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
129
|
+
PRIVATE_KEY_LINES=$(grep -nEi "$PRIVATE_KEY_WITH_VALUE_PATTERN" "$FILE" | grep -v "^[[:space:]]*#" | grep -v "^[[:space:]]*//")
|
|
130
|
+
if [ -n "$PRIVATE_KEY_LINES" ]; then
|
|
131
|
+
FINDINGS="${FINDINGS} [CRITICAL] Private Key with Hex Value\n"
|
|
132
|
+
FINDINGS="${FINDINGS}$(echo "$PRIVATE_KEY_LINES" | head -3 | sed 's/^/ /')\n"
|
|
133
|
+
FOUND_SECRETS=1
|
|
134
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
135
|
+
fi
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
# Check OpenAI API keys
|
|
139
|
+
if grep -nE "$OPENAI_KEY_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
140
|
+
OPENAI_LINES=$(grep -nE "$OPENAI_KEY_PATTERN" "$FILE" | grep -v "^[[:space:]]*#" | grep -v "^[[:space:]]*//")
|
|
141
|
+
if [ -n "$OPENAI_LINES" ]; then
|
|
142
|
+
FINDINGS="${FINDINGS} [CRITICAL] OpenAI API Key\n"
|
|
143
|
+
FINDINGS="${FINDINGS}$(echo "$OPENAI_LINES" | head -3 | sed 's/^/ /')\n"
|
|
144
|
+
FOUND_SECRETS=1
|
|
145
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
146
|
+
fi
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
if grep -nE "$OPENAI_PROJ_KEY_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
150
|
+
OPENAI_PROJ_LINES=$(grep -nE "$OPENAI_PROJ_KEY_PATTERN" "$FILE" | grep -v "^[[:space:]]*#" | grep -v "^[[:space:]]*//")
|
|
151
|
+
if [ -n "$OPENAI_PROJ_LINES" ]; then
|
|
152
|
+
FINDINGS="${FINDINGS} [CRITICAL] OpenAI Project API Key\n"
|
|
153
|
+
FINDINGS="${FINDINGS}$(echo "$OPENAI_PROJ_LINES" | head -3 | sed 's/^/ /')\n"
|
|
154
|
+
FOUND_SECRETS=1
|
|
155
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
156
|
+
fi
|
|
157
|
+
fi
|
|
158
|
+
|
|
159
|
+
# Check Google AI (Gemini) API keys
|
|
160
|
+
if grep -nE "$GOOGLE_AI_KEY_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
161
|
+
GOOGLE_LINES=$(grep -nE "$GOOGLE_AI_KEY_PATTERN" "$FILE" | grep -v "^[[:space:]]*#" | grep -v "^[[:space:]]*//")
|
|
162
|
+
if [ -n "$GOOGLE_LINES" ]; then
|
|
163
|
+
FINDINGS="${FINDINGS} [CRITICAL] Google AI (Gemini) API Key\n"
|
|
164
|
+
FINDINGS="${FINDINGS}$(echo "$GOOGLE_LINES" | head -3 | sed 's/^/ /')\n"
|
|
165
|
+
FOUND_SECRETS=1
|
|
166
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
167
|
+
fi
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
# Check Anthropic (Claude) API keys
|
|
171
|
+
if grep -nE "$ANTHROPIC_KEY_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
172
|
+
ANTHROPIC_LINES=$(grep -nE "$ANTHROPIC_KEY_PATTERN" "$FILE" | grep -v "^[[:space:]]*#" | grep -v "^[[:space:]]*//")
|
|
173
|
+
if [ -n "$ANTHROPIC_LINES" ]; then
|
|
174
|
+
FINDINGS="${FINDINGS} [CRITICAL] Anthropic (Claude) API Key\n"
|
|
175
|
+
FINDINGS="${FINDINGS}$(echo "$ANTHROPIC_LINES" | head -3 | sed 's/^/ /')\n"
|
|
176
|
+
FOUND_SECRETS=1
|
|
177
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
178
|
+
fi
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
# Check GitHub tokens
|
|
182
|
+
if grep -nE "$GITHUB_PAT_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
183
|
+
GITHUB_LINES=$(grep -nE "$GITHUB_PAT_PATTERN" "$FILE" | grep -v "^[[:space:]]*#" | grep -v "^[[:space:]]*//")
|
|
184
|
+
if [ -n "$GITHUB_LINES" ]; then
|
|
185
|
+
FINDINGS="${FINDINGS} [CRITICAL] GitHub Personal Access Token\n"
|
|
186
|
+
FINDINGS="${FINDINGS}$(echo "$GITHUB_LINES" | head -3 | sed 's/^/ /')\n"
|
|
187
|
+
FOUND_SECRETS=1
|
|
188
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
189
|
+
fi
|
|
190
|
+
fi
|
|
191
|
+
|
|
192
|
+
# Check Stripe API keys
|
|
193
|
+
if grep -nE "$STRIPE_KEY_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
194
|
+
STRIPE_LINES=$(grep -nE "$STRIPE_KEY_PATTERN" "$FILE" | grep -v "^[[:space:]]*#" | grep -v "^[[:space:]]*//")
|
|
195
|
+
if [ -n "$STRIPE_LINES" ]; then
|
|
196
|
+
FINDINGS="${FINDINGS} [CRITICAL] Stripe API Key\n"
|
|
197
|
+
FINDINGS="${FINDINGS}$(echo "$STRIPE_LINES" | head -3 | sed 's/^/ /')\n"
|
|
198
|
+
FOUND_SECRETS=1
|
|
199
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
200
|
+
fi
|
|
201
|
+
fi
|
|
202
|
+
|
|
203
|
+
# Check API keys
|
|
204
|
+
if grep -nEi "$API_KEY_PATTERN" "$FILE" > /dev/null 2>&1; then
|
|
205
|
+
API_KEY_LINES=$(grep -nEi "$API_KEY_PATTERN" "$FILE" | grep -v "^[[:space:]]*#" | grep -v "^[[:space:]]*//")
|
|
206
|
+
if [ -n "$API_KEY_LINES" ]; then
|
|
207
|
+
FINDINGS="${FINDINGS} [WARNING] Possible API Key\n"
|
|
208
|
+
FINDINGS="${FINDINGS}$(echo "$API_KEY_LINES" | head -3 | sed 's/^/ /')\n"
|
|
209
|
+
FOUND_SECRETS=1
|
|
210
|
+
TOTAL_FINDINGS=$((TOTAL_FINDINGS + 1))
|
|
211
|
+
fi
|
|
212
|
+
fi
|
|
213
|
+
|
|
214
|
+
if [ -n "$FINDINGS" ]; then
|
|
215
|
+
echo -e "${RED}❌ ${FILE}:${NC}"
|
|
216
|
+
echo -e "$FINDINGS"
|
|
217
|
+
fi
|
|
218
|
+
done
|
|
219
|
+
|
|
220
|
+
if [ $FOUND_SECRETS -eq 1 ]; then
|
|
221
|
+
echo -e "${RED}========================================${NC}"
|
|
222
|
+
echo -e "${RED}🚨 SECURITY ALERT: ${TOTAL_FINDINGS} secret(s) detected!${NC}\n"
|
|
223
|
+
echo -e "${YELLOW}⚠️ Do NOT merge this code!${NC}\n"
|
|
224
|
+
echo -e "Actions required:"
|
|
225
|
+
echo -e " 1. ${YELLOW}Remove${NC} all private keys and secrets from the code"
|
|
226
|
+
echo -e " 2. Use ${BLUE}.env${NC} files for sensitive data (add to ${BLUE}.gitignore${NC})"
|
|
227
|
+
echo -e " 3. Rotate any exposed credentials immediately"
|
|
228
|
+
echo -e " 4. Review git history for leaked secrets"
|
|
229
|
+
echo -e " 5. Consider using tools like ${BLUE}git-secrets${NC} or ${BLUE}truffleHog${NC}\n"
|
|
230
|
+
echo -e "${RED}========================================${NC}\n"
|
|
231
|
+
|
|
232
|
+
# 设置 GitHub Actions 注解
|
|
233
|
+
echo "::error::Private keys or secrets detected in the codebase. Please remove them before merging."
|
|
234
|
+
|
|
235
|
+
exit 1
|
|
236
|
+
fi
|
|
237
|
+
|
|
238
|
+
echo -e "${GREEN}========================================${NC}"
|
|
239
|
+
echo -e "${GREEN}✅ No private keys detected${NC}"
|
|
240
|
+
echo -e "${GREEN}✅ Security check passed!${NC}"
|
|
241
|
+
echo -e "${GREEN}========================================${NC}\n"
|
|
242
|
+
|
|
243
|
+
exit 0
|
|
244
|
+
|
|
245
|
+
- name: Comment on PR (if secrets found)
|
|
246
|
+
if: failure() && github.event_name == 'pull_request'
|
|
247
|
+
uses: actions/github-script@v7
|
|
248
|
+
with:
|
|
249
|
+
script: |
|
|
250
|
+
github.rest.issues.createComment({
|
|
251
|
+
issue_number: context.issue.number,
|
|
252
|
+
owner: context.repo.owner,
|
|
253
|
+
repo: context.repo.repo,
|
|
254
|
+
body: '🚨 **Security Alert**: Private keys or secrets detected in this PR!\n\n' +
|
|
255
|
+
'⚠️ Please remove all sensitive data before merging.\n\n' +
|
|
256
|
+
'Check the Actions log for details about what was found.'
|
|
257
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# AAStar Shared Config - Agent Guidelines
|
|
2
|
+
|
|
3
|
+
## Build Commands
|
|
4
|
+
- `pnpm build` - Build CJS/ESM modules with types
|
|
5
|
+
- `pnpm dev` - Build with watch mode
|
|
6
|
+
- `pnpm verify` - Verify onchain contract versions
|
|
7
|
+
- `pnpm sync-abis` - Sync contract ABIs from SuperPaymaster repo
|
|
8
|
+
- `pnpm sync-versions` - Auto-sync contract versions from on-chain data
|
|
9
|
+
- `pnpm sync-all` - Sync both ABIs and versions
|
|
10
|
+
- `./sync-abis.sh` - Sync contract ABIs before publish
|
|
11
|
+
|
|
12
|
+
## Code Style
|
|
13
|
+
- **TypeScript**: Strict mode enabled, ES2020 target
|
|
14
|
+
- **Imports**: Use `export * from './module'` pattern in index.ts
|
|
15
|
+
- **Constants**: UPPER_SNAKE_CASE for all constants
|
|
16
|
+
- **Types**: Use `as const` for immutable objects
|
|
17
|
+
- **Functions**: JSDoc comments with @examples
|
|
18
|
+
- **Error Handling**: Throw descriptive Error messages with context
|
|
19
|
+
- **File Structure**: Separate addresses, contracts, constants, branding
|
|
20
|
+
- **Naming**: camelCase for functions, PascalCase for types
|
|
21
|
+
- **Comments**: JSDoc format with @param and @returns
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.3.1] - 2025-11-08
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Community Configurations**: New `communities.ts` module with typed community configs
|
|
12
|
+
- `AASTAR_COMMUNITY`: AAstar community (PAYMASTER_SUPER, aPNTs, MySBT)
|
|
13
|
+
- `BREAD_COMMUNITY`: Bread community (PAYMASTER_AOA, bPNTs, MySBT)
|
|
14
|
+
- Helper functions: `getCommunityConfig()`, `getAllCommunityConfigs()`, `isRegisteredCommunity()`
|
|
15
|
+
- **Test Communities**: Updated `TEST_COMMUNITIES` with AAstar and Bread communities
|
|
16
|
+
- AAstar: `0x411BD567E46C0781248dbB6a9211891C032885e5` (50 GT staked)
|
|
17
|
+
- Bread: `0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA` (50 GT staked)
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- Updated test community documentation with detailed metadata
|
|
21
|
+
- Added community-to-token mappings (aPNTs/bPNTs)
|
|
22
|
+
- Added MySBT as supported SBT for both communities
|
|
23
|
+
|
|
24
|
+
## [0.3.0] - 2025-11-08
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- **Registry v2.2.0**: New deployment with auto-stake registration functionality (`0x028aB52B4E0EF26820043ca4F1B5Fe14FfC1EF75`)
|
|
28
|
+
- `registerCommunityWithAutoStake()` - One-click registration + staking
|
|
29
|
+
- Node type configuration (AOA/Super/ANode/KMS)
|
|
30
|
+
- MySBT-style auto-stake pattern
|
|
31
|
+
- **SuperPaymasterV2 v2.0.1**: Updated deployment with Oracle security enhancements (`0xfaB5B2A129DF8308a70DA2fE77c61001e4Df58BC`)
|
|
32
|
+
- Chainlink oracle `answeredInRound` validation
|
|
33
|
+
- Price data staleness check (1 hour timeout)
|
|
34
|
+
- Price bounds validation ($100 - $100,000)
|
|
35
|
+
- **Updated ABIs**: Registry.json and SuperPaymasterV2.json with latest contract versions
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- **Registry**: Updated from `0xf384c592D5258c91805128291c5D4c069DD30CA6` to `0x028aB52B4E0EF26820043ca4F1B5Fe14FfC1EF75`
|
|
39
|
+
- **SuperPaymasterV2**: Updated from `0x95B20d8FdF173a1190ff71e41024991B2c5e58eF` to `0xfaB5B2A129DF8308a70DA2fE77c61001e4Df58BC`
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
- **Deployment Order**: SuperPaymasterV2 now correctly references Registry v2.2.0 (immutable REGISTRY field)
|
|
43
|
+
- **Oracle Security**: Enhanced Chainlink price feed validation to prevent stale data usage
|
|
44
|
+
|
|
45
|
+
### Notes
|
|
46
|
+
- SuperPaymasterV2 v2.0.1 is deployed with correct dependency on Registry v2.2.0
|
|
47
|
+
- Previous deployments (`0x33A31d52db2ef2497e93226e0ed1B5d587D7D5e8`, `0x5675062cA5D98c791972eAC24eFa3BC3EBc096f3`) deprecated due to incorrect deployment order
|
|
48
|
+
- GTokenStaking lockers configured for MySBT, SuperPaymasterV2, and Registry
|
|
49
|
+
|
|
50
|
+
## [0.2.2] - 2025-10-30
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
- **Test Tokens category**: Added `testTokens` section for development and testing contracts
|
|
54
|
+
- **Mock USDT**: Added Mock USDT contract address (`0x14EaC6C3D49AEDff3D59773A7d7bfb50182bCfDc`)
|
|
55
|
+
- **getTestTokenContracts()**: New helper function to retrieve test token addresses
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
- Updated `ContractCategory` type to include `'testTokens'`
|
|
59
|
+
|
|
60
|
+
## [0.2.1] - 2025-10-30
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
- Fixed TypeScript declaration file issues with JSON imports
|
|
64
|
+
- Removed ABI exports from main entry point to avoid type errors
|
|
65
|
+
- ABIs are now imported directly from JSON files (see README for usage)
|
|
66
|
+
- Significantly reduced bundle size (50KB → 9KB)
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
- Updated README with correct ABI import instructions
|
|
70
|
+
|
|
71
|
+
## [0.2.0] - 2025-10-30
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
- Comprehensive contract address management system
|
|
75
|
+
- Type-safe helper functions for contract queries
|
|
76
|
+
- Network configuration with utility functions
|
|
77
|
+
- Deployment metadata tracking with dates
|
|
78
|
+
- Enhanced constants with node stake amounts
|
|
79
|
+
- Complete TypeScript type definitions
|
|
80
|
+
- Extensive JSDoc documentation with examples
|
|
81
|
+
|
|
82
|
+
### Changed
|
|
83
|
+
- Removed `process.env` dependencies from constants
|
|
84
|
+
- Renamed `SupportedNetwork` to `ContractNetwork` in contracts module to avoid naming conflicts
|
|
85
|
+
- Updated all contract addresses to latest deployments (as of 2025-10-30)
|
|
86
|
+
- Enhanced README with complete usage examples
|
|
87
|
+
|
|
88
|
+
### Fixed
|
|
89
|
+
- Fixed type conflicts between contracts and networks modules
|
|
90
|
+
- Removed environment variable dependencies for better npm package compatibility
|
|
91
|
+
|
|
92
|
+
## [0.1.0] - 2025-10-24
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
- Initial release
|
|
96
|
+
- Basic contract addresses
|
|
97
|
+
- Network configurations
|
|
98
|
+
- ABIs for core contracts
|
|
99
|
+
- Branding and links configuration
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 AAStar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|