@aastar/sdk 0.16.6 → 0.16.11
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/.github/workflows/gas-analytics-daily.yml +52 -0
- package/CHANGELOG.md +43 -0
- package/README.md +39 -139
- package/backup/run_sdk_regression.sh +135 -0
- package/config.anvil.json +1 -1
- package/config.sepolia.json +19 -1
- package/docs/API_REFERENCE.md +9 -169
- package/docs/L4_Manual_Test_CheatSheet.md +22 -65
- package/docs/Reputation-to-Credit_Mapping_Whitepaper.md +242 -0
- package/docs/TESTER_GUIDE_GASLESS.md +23 -277
- package/docs/api/@aastar/account/README.md +15 -0
- package/docs/api/@aastar/account/classes/UserOpClient.md +87 -0
- package/docs/api/@aastar/account/functions/createEOAWalletClient.md +21 -0
- package/docs/api/@aastar/account/functions/getUserOpHash.md +23 -0
- package/docs/api/@aastar/account/functions/packUserOpLimits.md +19 -0
- package/docs/api/@aastar/account/functions/toSimpleSmartAccount.md +83 -0
- package/docs/api/@aastar/account/type-aliases/EOAWalletClient.md +37 -0
- package/docs/api/@aastar/account/type-aliases/SimpleSmartAccount.md +39 -0
- package/docs/api/@aastar/core/README.md +211 -0
- package/docs/api/@aastar/core/classes/BLSSigner.md +147 -0
- package/docs/api/@aastar/core/classes/BaseClient.md +9657 -0
- package/docs/api/@aastar/core/classes/ContractConfigManager.md +25 -0
- package/docs/api/@aastar/core/classes/RequirementChecker.md +1837 -0
- package/docs/api/@aastar/core/classes/SepoliaFaucetAPI.md +13661 -0
- package/docs/api/@aastar/core/classes/StateValidator.md +133 -0
- package/docs/api/@aastar/core/enumerations/EntryPointVersion.md +17 -0
- package/docs/api/@aastar/core/enumerations/NodeType.md +33 -0
- package/docs/api/@aastar/core/enumerations/RolePermissionLevel.md +43 -0
- package/docs/api/@aastar/core/functions/accountActions.md +2720 -0
- package/docs/api/@aastar/core/functions/accountFactoryActions.md +2720 -0
- package/docs/api/@aastar/core/functions/aggregatorActions.md +2720 -0
- package/docs/api/@aastar/core/functions/createAAStarPublicClient.md +3105 -0
- package/docs/api/@aastar/core/functions/dvtActions.md +2720 -0
- package/docs/api/@aastar/core/functions/entryPointActions.md +2724 -0
- package/docs/api/@aastar/core/functions/gTokenActions.md +2714 -0
- package/docs/api/@aastar/core/functions/gTokenExtendedActions.md +2720 -0
- package/docs/api/@aastar/core/functions/getAddressUrl.md +32 -0
- package/docs/api/@aastar/core/functions/getAllCommunityConfigs.md +9 -0
- package/docs/api/@aastar/core/functions/getAllV2Contracts.md +20 -0
- package/docs/api/@aastar/core/functions/getBlockExplorer.md +26 -0
- package/docs/api/@aastar/core/functions/getChainId.md +26 -0
- package/docs/api/@aastar/core/functions/getCommunities.md +76 -0
- package/docs/api/@aastar/core/functions/getCommunity.md +32 -0
- package/docs/api/@aastar/core/functions/getCommunityConfig.md +15 -0
- package/docs/api/@aastar/core/functions/getContract.md +37 -0
- package/docs/api/@aastar/core/functions/getContractNetworks.md +18 -0
- package/docs/api/@aastar/core/functions/getContracts.md +194 -0
- package/docs/api/@aastar/core/functions/getCoreContracts.md +71 -0
- package/docs/api/@aastar/core/functions/getDeploymentDate.md +32 -0
- package/docs/api/@aastar/core/functions/getEntryPoint.md +25 -0
- package/docs/api/@aastar/core/functions/getNetwork.md +26 -0
- package/docs/api/@aastar/core/functions/getPaymasterV4_1.md +25 -0
- package/docs/api/@aastar/core/functions/getRoleName.md +15 -0
- package/docs/api/@aastar/core/functions/getRpcUrl.md +25 -0
- package/docs/api/@aastar/core/functions/getSimpleAccountFactory.md +25 -0
- package/docs/api/@aastar/core/functions/getSuperPaymasterV2.md +25 -0
- package/docs/api/@aastar/core/functions/getTestAccounts.md +30 -0
- package/docs/api/@aastar/core/functions/getTestTokenContracts.md +38 -0
- package/docs/api/@aastar/core/functions/getTokenContracts.md +31 -0
- package/docs/api/@aastar/core/functions/getTxUrl.md +32 -0
- package/docs/api/@aastar/core/functions/getV2ContractByAddress.md +28 -0
- package/docs/api/@aastar/core/functions/getV2ContractByName.md +28 -0
- package/docs/api/@aastar/core/functions/getV2ContractsByDate.md +26 -0
- package/docs/api/@aastar/core/functions/isContractNetworkSupported.md +27 -0
- package/docs/api/@aastar/core/functions/isRegisteredCommunity.md +15 -0
- package/docs/api/@aastar/core/functions/isV2Contract.md +27 -0
- package/docs/api/@aastar/core/functions/paymasterActions.md +2720 -0
- package/docs/api/@aastar/core/functions/paymasterFactoryActions.md +2720 -0
- package/docs/api/@aastar/core/functions/registryActions.md +2720 -0
- package/docs/api/@aastar/core/functions/reputationActions.md +2720 -0
- package/docs/api/@aastar/core/functions/sbtActions.md +2720 -0
- package/docs/api/@aastar/core/functions/stakingActions.md +2720 -0
- package/docs/api/@aastar/core/functions/superPaymasterActions.md +2720 -0
- package/docs/api/@aastar/core/functions/tokenActions.md +2714 -0
- package/docs/api/@aastar/core/functions/xPNTsFactoryActions.md +2720 -0
- package/docs/api/@aastar/core/interfaces/AccountBalance.md +41 -0
- package/docs/api/@aastar/core/interfaces/BalanceValidationParams.md +51 -0
- package/docs/api/@aastar/core/interfaces/ClientConfig.md +4841 -0
- package/docs/api/@aastar/core/interfaces/CommunityConfig.md +81 -0
- package/docs/api/@aastar/core/interfaces/ContractVersion.md +63 -0
- package/docs/api/@aastar/core/interfaces/DeploymentValidationParams.md +39 -0
- package/docs/api/@aastar/core/interfaces/RoleConfig.md +83 -0
- package/docs/api/@aastar/core/interfaces/RoleRequirement.md +43 -0
- package/docs/api/@aastar/core/interfaces/RoleValidationParams.md +55 -0
- package/docs/api/@aastar/core/interfaces/SuperPaymasterConfig.md +57 -0
- package/docs/api/@aastar/core/interfaces/TokenBalanceValidationParams.md +63 -0
- package/docs/api/@aastar/core/interfaces/TransactionOptions.md +24 -0
- package/docs/api/@aastar/core/interfaces/ValidationParams.md +25 -0
- package/docs/api/@aastar/core/interfaces/ValidationResult.md +25 -0
- package/docs/api/@aastar/core/type-aliases/AccountActions.md +151 -0
- package/docs/api/@aastar/core/type-aliases/AccountFactoryActions.md +55 -0
- package/docs/api/@aastar/core/type-aliases/AggregatorActions.md +471 -0
- package/docs/api/@aastar/core/type-aliases/BusinessResult.md +12 -0
- package/docs/api/@aastar/core/type-aliases/ContractCategory.md +5 -0
- package/docs/api/@aastar/core/type-aliases/ContractNetwork.md +5 -0
- package/docs/api/@aastar/core/type-aliases/DVTActions.md +319 -0
- package/docs/api/@aastar/core/type-aliases/EntryPointActions.md +103 -0
- package/docs/api/@aastar/core/type-aliases/GTokenExtendedActions.md +239 -0
- package/docs/api/@aastar/core/type-aliases/NetworkContracts.md +5 -0
- package/docs/api/@aastar/core/type-aliases/PaymasterActions.md +1087 -0
- package/docs/api/@aastar/core/type-aliases/PaymasterFactoryActions.md +263 -0
- package/docs/api/@aastar/core/type-aliases/RegistryActions.md +1543 -0
- package/docs/api/@aastar/core/type-aliases/ReputationActions.md +811 -0
- package/docs/api/@aastar/core/type-aliases/SBTActions.md +1199 -0
- package/docs/api/@aastar/core/type-aliases/StakingActions.md +703 -0
- package/docs/api/@aastar/core/type-aliases/SuperPaymasterActions.md +1311 -0
- package/docs/api/@aastar/core/type-aliases/SupportedNetwork.md +3 -0
- package/docs/api/@aastar/core/type-aliases/TokenActions.md +1227 -0
- package/docs/api/@aastar/core/type-aliases/XPNTsFactoryActions.md +395 -0
- package/docs/api/@aastar/core/variables/AASTAR_COMMUNITY.md +8 -0
- package/docs/api/@aastar/core/variables/ALL_ADDRESSES.md +75 -0
- package/docs/api/@aastar/core/variables/ALL_ROLES.md +5 -0
- package/docs/api/@aastar/core/variables/APNTS_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/BLSAggregatorABI.md +3 -0
- package/docs/api/@aastar/core/variables/BLSAggregatorArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/BLSHelpers.md +101 -0
- package/docs/api/@aastar/core/variables/BLSValidatorABI.md +3 -0
- package/docs/api/@aastar/core/variables/BLSValidatorArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/BLS_AGGREGATOR_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/BLS_VALIDATOR_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/BPS_DENOMINATOR.md +5 -0
- package/docs/api/@aastar/core/variables/BRANDING.md +67 -0
- package/docs/api/@aastar/core/variables/BREAD_COMMUNITY.md +8 -0
- package/docs/api/@aastar/core/variables/CHAIN_MAINNET.md +3 -0
- package/docs/api/@aastar/core/variables/CHAIN_SEPOLIA.md +5 -0
- package/docs/api/@aastar/core/variables/COMMUNITIES.md +5 -0
- package/docs/api/@aastar/core/variables/COMMUNITY_OWNERS.md +15 -0
- package/docs/api/@aastar/core/variables/CONTRACTS.md +179 -0
- package/docs/api/@aastar/core/variables/CONTRACT_METADATA.md +67 -0
- package/docs/api/@aastar/core/variables/CONTRACT_SRC_HASH.md +5 -0
- package/docs/api/@aastar/core/variables/CORE_ADDRESSES.md +51 -0
- package/docs/api/@aastar/core/variables/DEFAULT_ADMIN_ROLE.md +17 -0
- package/docs/api/@aastar/core/variables/DEFAULT_APNTS_PRICE_USD.md +5 -0
- package/docs/api/@aastar/core/variables/DEFAULT_CALL_GAS_LIMIT.md +3 -0
- package/docs/api/@aastar/core/variables/DEFAULT_GAS_TOKEN_MINT_AMOUNT.md +5 -0
- package/docs/api/@aastar/core/variables/DEFAULT_PRE_VERIFICATION_GAS.md +3 -0
- package/docs/api/@aastar/core/variables/DEFAULT_TIMEOUT_MS.md +5 -0
- package/docs/api/@aastar/core/variables/DEFAULT_TOKEN_NAME.md +3 -0
- package/docs/api/@aastar/core/variables/DEFAULT_TOKEN_SYMBOL.md +5 -0
- package/docs/api/@aastar/core/variables/DEFAULT_USDT_MINT_AMOUNT.md +5 -0
- package/docs/api/@aastar/core/variables/DEFAULT_VERIFICATION_GAS_LIMIT.md +5 -0
- package/docs/api/@aastar/core/variables/DVTValidatorABI.md +3 -0
- package/docs/api/@aastar/core/variables/DVTValidatorArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/DVT_VALIDATOR_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/ENTRY_POINT_0_8_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/ENTRY_POINT_0_9_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/ENTRY_POINT_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/EntryPointABI.md +3 -0
- package/docs/api/@aastar/core/variables/EntryPointArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/FAUCET_API_URL.md +5 -0
- package/docs/api/@aastar/core/variables/GTOKEN_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/GTOKEN_STAKING_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/GTokenABI.md +3 -0
- package/docs/api/@aastar/core/variables/GTokenArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/GTokenStakingABI.md +3 -0
- package/docs/api/@aastar/core/variables/GTokenStakingArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/INITIAL_ROLE_STAKES.md +13 -0
- package/docs/api/@aastar/core/variables/LINKS.md +33 -0
- package/docs/api/@aastar/core/variables/MAX_SERVICE_FEE.md +5 -0
- package/docs/api/@aastar/core/variables/MONITORING_ADDRESSES.md +15 -0
- package/docs/api/@aastar/core/variables/MySBTABI.md +3 -0
- package/docs/api/@aastar/core/variables/MySBTArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/NETWORKS.md +79 -0
- package/docs/api/@aastar/core/variables/NODE_STAKE_AMOUNTS.md +31 -0
- package/docs/api/@aastar/core/variables/OFFICIAL_ADDRESSES.md +11 -0
- package/docs/api/@aastar/core/variables/PAYMASTER_ADDRESSES.md +15 -0
- package/docs/api/@aastar/core/variables/PAYMASTER_FACTORY_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/PAYMASTER_V4_IMPL_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/PaymasterABI.md +3 -0
- package/docs/api/@aastar/core/variables/PaymasterArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/PaymasterFactoryABI.md +3 -0
- package/docs/api/@aastar/core/variables/PaymasterFactoryArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/PaymasterV4ABI.md +3 -0
- package/docs/api/@aastar/core/variables/PaymasterV4Artifact.md +13 -0
- package/docs/api/@aastar/core/variables/REGISTRY_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/REPUTATION_SYSTEM_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/ROLE_ANODE.md +29 -0
- package/docs/api/@aastar/core/variables/ROLE_COMMUNITY.md +29 -0
- package/docs/api/@aastar/core/variables/ROLE_DVT.md +29 -0
- package/docs/api/@aastar/core/variables/ROLE_ENDUSER.md +33 -0
- package/docs/api/@aastar/core/variables/ROLE_KMS.md +29 -0
- package/docs/api/@aastar/core/variables/ROLE_NAMES.md +3 -0
- package/docs/api/@aastar/core/variables/ROLE_PAYMASTER_AOA.md +29 -0
- package/docs/api/@aastar/core/variables/ROLE_PAYMASTER_SUPER.md +33 -0
- package/docs/api/@aastar/core/variables/ROLE_PERMISSION_LEVELS.md +3 -0
- package/docs/api/@aastar/core/variables/RegistryABI.md +3 -0
- package/docs/api/@aastar/core/variables/RegistryArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/ReputationSystemABI.md +3 -0
- package/docs/api/@aastar/core/variables/ReputationSystemArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/SBT_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/SEPOLIA_CONTRACTS.md +175 -0
- package/docs/api/@aastar/core/variables/SEPOLIA_V2_VERSIONS.md +67 -0
- package/docs/api/@aastar/core/variables/SERVICE_FEE_RATE.md +5 -0
- package/docs/api/@aastar/core/variables/SUPER_PAYMASTER_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/SimpleAccountABI.md +3 -0
- package/docs/api/@aastar/core/variables/SimpleAccountArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/SimpleAccountFactoryABI.md +3 -0
- package/docs/api/@aastar/core/variables/SimpleAccountFactoryArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/SuperPaymasterABI.md +3 -0
- package/docs/api/@aastar/core/variables/SuperPaymasterArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/TEST_ACCOUNT_ADDRESSES.md +11 -0
- package/docs/api/@aastar/core/variables/TEST_ACCOUNT_POOL_SIZE.md +5 -0
- package/docs/api/@aastar/core/variables/TEST_COMMUNITIES.md +19 -0
- package/docs/api/@aastar/core/variables/TEST_TOKEN_ADDRESSES.md +19 -0
- package/docs/api/@aastar/core/variables/TOKEN_ADDRESSES.md +11 -0
- package/docs/api/@aastar/core/variables/V2_SUMMARY.md +39 -0
- package/docs/api/@aastar/core/variables/XPNTS_FACTORY_ADDRESS.md +3 -0
- package/docs/api/@aastar/core/variables/xPNTsFactoryABI.md +3 -0
- package/docs/api/@aastar/core/variables/xPNTsFactoryArtifact.md +13 -0
- package/docs/api/@aastar/core/variables/xPNTsTokenABI.md +3 -0
- package/docs/api/@aastar/core/variables/xPNTsTokenArtifact.md +13 -0
- package/docs/api/@aastar/paymaster/README.md +23 -0
- package/docs/api/@aastar/paymaster/classes/PaymasterClient.md +388 -0
- package/docs/api/@aastar/paymaster/classes/PaymasterOperator.md +451 -0
- package/docs/api/@aastar/paymaster/classes/SuperPaymasterAdminClient.md +189 -0
- package/docs/api/@aastar/paymaster/classes/SuperPaymasterClient.md +55 -0
- package/docs/api/@aastar/paymaster/functions/buildPaymasterData.md +34 -0
- package/docs/api/@aastar/paymaster/functions/buildSuperPaymasterData.md +30 -0
- package/docs/api/@aastar/paymaster/functions/checkEligibility.md +28 -0
- package/docs/api/@aastar/paymaster/functions/formatUserOpV07.md +15 -0
- package/docs/api/@aastar/paymaster/functions/getPaymasterV4Middleware.md +32 -0
- package/docs/api/@aastar/paymaster/functions/getSuperPaymasterMiddleware.md +32 -0
- package/docs/api/@aastar/paymaster/functions/getUserOpHashV07.md +21 -0
- package/docs/api/@aastar/paymaster/type-aliases/GaslessReadinessReport.md +55 -0
- package/docs/api/@aastar/paymaster/type-aliases/GaslessTransactionConfig.md +59 -0
- package/docs/api/@aastar/paymaster/type-aliases/PaymasterConfig.md +43 -0
- package/docs/api/@aastar/paymaster/type-aliases/PaymasterV4MiddlewareConfig.md +35 -0
- package/docs/api/@aastar/tokens/README.md +3 -0
- package/docs/api/@aastar/tokens/classes/FinanceClient.md +10385 -0
- package/docs/api/README.md +4 -8
- package/env.template +3 -5
- package/examples/l1-api-demo.ts +196 -107
- package/examples/l2-clients-demo.ts +70 -73
- package/examples/l3-community-launch.ts +49 -0
- package/examples/l3-user-onboarding.ts +36 -54
- package/examples/prepare-gasless.ts +1 -1
- package/examples/simple-gasless-demo.ts +55 -26
- package/examples/simple-superpaymaster-demo.ts +2 -2
- package/ext/aastar-shared-config/generate-comparison-table.sh +0 -0
- package/ext/aastar-shared-config/sync-abis.sh +0 -0
- package/ext/aastar-shared-config/sync-versions.mjs +0 -0
- package/ext/aastar-shared-config/verify-all.sh +0 -0
- package/ext/aastar-shared-config/verify-contracts.sh +0 -0
- package/l4-setup.sh +1 -11
- package/lib/shared-config/generate-comparison-table.sh +0 -0
- package/lib/shared-config/sync-abis.sh +0 -0
- package/lib/shared-config/sync-versions.mjs +0 -0
- package/lib/shared-config/verify-all.sh +0 -0
- package/lib/shared-config/verify-contracts.sh +0 -0
- package/package.json +36 -32
- package/packages/account/__tests__/index.test.ts +9 -0
- package/packages/account/node_modules/.bin/tsc +21 -0
- package/packages/account/node_modules/.bin/tsserver +21 -0
- package/packages/account/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/account/package.json +3 -5
- package/packages/account/src/eoa.ts +2 -4
- package/packages/account/tsconfig.json +2 -1
- package/packages/analytics/README.md +68 -0
- package/packages/analytics/__tests__/index.test.ts +25 -0
- package/packages/analytics/data/attribution_dataset.csv +29 -0
- package/packages/analytics/data/complete_dataset.csv +29 -0
- package/packages/analytics/data/eth_price_cache.json +4 -0
- package/packages/analytics/data/full_dataset.csv +11 -0
- package/packages/analytics/data/full_dataset.json +134 -0
- package/packages/analytics/data/parsed_transactions.csv +29 -0
- package/packages/analytics/node_modules/.bin/tsc +21 -0
- package/packages/analytics/node_modules/.bin/tsserver +21 -0
- package/packages/analytics/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/analytics/package.json +2 -5
- package/packages/analytics/reports/full/attribution_analysis_20260119.md +42 -0
- package/packages/analytics/reports/full/attribution_analysis_fresh_20260119.md +67 -0
- package/packages/analytics/reports/full/competitive_analysis_20260119.md +103 -0
- package/packages/analytics/reports/full/comprehensive_analysis_20260119.md +107 -0
- package/packages/analytics/reports/full/comprehensive_analysis_v4_1_20260119.md +74 -0
- package/packages/analytics/reports/full/economic_audit_v4_2_20260119.md +74 -0
- package/packages/analytics/reports/full/profit_audit_v4_3_20260119.md +74 -0
- package/packages/analytics/reports/full/profit_audit_v4_4_20260119.md +74 -0
- package/packages/analytics/reports/full/profit_audit_v4_5_20260119.md +74 -0
- package/packages/analytics/reports/full/profit_audit_v4_6_20260119.md +74 -0
- package/packages/analytics/reports/full/profit_audit_v4_final_20260119.md +74 -0
- package/packages/analytics/reports/full/profit_audit_v4_final_v2_20260119.md +74 -0
- package/packages/analytics/reports/full/profit_audit_v4_final_v3_20260119.md +74 -0
- package/packages/analytics/reports/full/profit_audit_v4_final_v4_20260119.md +75 -0
- package/packages/analytics/reports/full/profit_audit_v4_final_v5_20260119.md +76 -0
- package/packages/analytics/reports/full/two_layer_analysis_20260119.md +81 -0
- package/packages/analytics/reports/full/two_layer_analysis_academic_20260119.md +81 -0
- package/packages/analytics/reports/full/two_layer_analysis_dynamic_20260119.md +81 -0
- package/packages/analytics/reports/full/two_layer_analysis_final_20260119.md +81 -0
- package/packages/analytics/reports/full/two_layer_analysis_final_fixed_20260119.md +81 -0
- package/packages/analytics/reports/full/two_layer_analysis_fixed_20260119.md +52 -0
- package/packages/analytics/reports/full/two_layer_analysis_normalized_20260119.md +81 -0
- package/packages/analytics/reports/full/tx_0xc30cfcbb.md +39 -0
- package/packages/analytics/src/analyzers/AttributionAnalyzer.ts +124 -0
- package/packages/analytics/src/analyzers/ComparisonAnalyzer.ts +89 -0
- package/packages/analytics/src/analyzers/TransactionAnalyzer.ts +111 -0
- package/packages/analytics/src/analyzers/TrendAnalyzer.ts +107 -0
- package/packages/analytics/src/cli-analyze-tx.ts +45 -0
- package/packages/analytics/src/cli.ts +39 -0
- package/packages/analytics/src/core/BenchmarkLoader.ts +163 -0
- package/packages/analytics/src/core/CostCalculator.ts +202 -0
- package/packages/analytics/src/core/DataCollector.ts +245 -0
- package/packages/analytics/src/gas-analyzer-v4.ts +118 -0
- package/packages/analytics/src/gas-analyzer.ts +184 -0
- package/packages/analytics/src/test-logparser.ts +63 -0
- package/packages/analytics/src/utils/EventDecoder.ts +152 -0
- package/packages/analytics/src/utils/LogParser.ts +220 -0
- package/packages/analytics/src/utils/PriceOracle.ts +117 -0
- package/packages/analytics/test/AttributionAnalyzer.test.ts +42 -0
- package/packages/analytics/test/CostCalculator.test.ts +75 -0
- package/packages/analytics/tsconfig.json +2 -1
- package/packages/community/__tests__/index.test.ts +9 -0
- package/packages/community/node_modules/.bin/tsc +21 -0
- package/packages/community/node_modules/.bin/tsserver +21 -0
- package/packages/community/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/community/package.json +27 -0
- package/packages/community/src/index.ts +326 -0
- package/packages/community/tsconfig.json +8 -0
- package/packages/core/__tests__/actions/account-comprehensive.test.ts +92 -0
- package/packages/core/__tests__/actions/aggregator.test.ts +62 -0
- package/packages/core/__tests__/actions/comprehensive-batch1.test.ts +86 -0
- package/packages/core/__tests__/actions/comprehensive-batch2.test.ts +39 -0
- package/packages/core/__tests__/actions/comprehensive-batch3.test.ts +35 -0
- package/packages/core/__tests__/actions/comprehensive-error.test.ts +115 -0
- package/packages/core/__tests__/actions/dvt.test.ts +39 -0
- package/packages/core/__tests__/actions/edge-cases.test.ts +39 -0
- package/packages/core/__tests__/actions/error-paths.test.ts +82 -0
- package/packages/core/__tests__/actions/factory.test.ts +81 -0
- package/packages/core/__tests__/actions/faucet.test.ts +131 -0
- package/packages/core/__tests__/actions/paymaster.test.ts +116 -0
- package/packages/core/__tests__/actions/registry.test.ts +81 -0
- package/packages/core/__tests__/actions/reputation.test.ts +43 -0
- package/packages/core/__tests__/actions/sbt.test.ts +145 -0
- package/packages/core/__tests__/actions/staking.test.ts +30 -0
- package/packages/core/__tests__/actions/superPaymaster.test.ts +158 -0
- package/packages/core/__tests__/actions/tokens-extended.test.ts +18 -0
- package/packages/core/__tests__/actions/tokens.test.ts +122 -0
- package/packages/core/__tests__/clients.test.ts +77 -0
- package/packages/core/__tests__/contracts-config.test.ts +69 -0
- package/packages/core/__tests__/index.test.ts +9 -0
- package/packages/core/__tests__/mocks/client.ts +40 -0
- package/packages/core/node_modules/.bin/tsc +21 -0
- package/packages/core/node_modules/.bin/tsserver +21 -0
- package/packages/core/node_modules/.bin/tsx +21 -0
- package/packages/core/node_modules/.bin/vite +21 -0
- package/packages/core/node_modules/.bin/vitest +21 -0
- package/packages/core/node_modules/.bin/yaml +21 -0
- package/packages/core/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/core/package.json +5 -12
- package/packages/core/src/abis/SuperPaymaster.json +1 -1
- package/packages/core/src/abis/aPNTs.json +1160 -0
- package/packages/core/src/abis/abi.config.json +3 -3
- package/packages/core/src/abis/index.ts +37 -50
- package/packages/core/src/actions/account.ts +137 -126
- package/packages/core/src/actions/aggregator.ts +363 -33
- package/packages/core/src/actions/dvt.ts +261 -45
- package/packages/core/src/actions/entryPoint.ts +56 -233
- package/packages/core/src/actions/factory.ts +671 -552
- package/packages/core/src/actions/faucet.ts +181 -322
- package/packages/core/src/actions/index.ts +2 -5
- package/packages/core/src/actions/paymaster.ts +780 -0
- package/packages/core/src/actions/registry.ts +926 -825
- package/packages/core/src/actions/reputation.ts +568 -278
- package/packages/core/src/actions/sbt.ts +867 -632
- package/packages/core/src/actions/staking.ts +440 -285
- package/packages/core/src/actions/superPaymaster.ts +1058 -793
- package/packages/core/src/actions/tokens.ts +468 -514
- package/packages/core/src/clients/BaseClient.ts +3 -3
- package/packages/core/src/clients/BundlerClient.ts +132 -0
- package/packages/core/src/communities.ts +2 -2
- package/packages/core/src/constants.ts +1 -32
- package/packages/core/src/contract-addresses.ts +3 -10
- package/packages/core/src/contract-versions.ts +374 -0
- package/packages/core/src/contracts.ts +2 -2
- package/packages/core/src/errors/index.ts +173 -0
- package/packages/core/src/index.ts +2 -1
- package/packages/core/src/requirementChecker.ts +39 -1
- package/packages/core/src/roles.ts +50 -61
- package/packages/core/src/validators/index.ts +88 -0
- package/packages/core/tsconfig.json +2 -1
- package/packages/dapp/__tests__/index.test.ts +9 -0
- package/packages/dapp/node_modules/.bin/tsc +21 -0
- package/packages/dapp/node_modules/.bin/tsserver +21 -0
- package/packages/dapp/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/dapp/package.json +3 -5
- package/packages/dapp/tsconfig.json +2 -1
- package/packages/enduser/__tests__/CommunityClient.test.ts +205 -0
- package/packages/enduser/__tests__/UserClient.test.ts +294 -0
- package/packages/enduser/__tests__/index.test.ts +16 -0
- package/packages/enduser/__tests__/mocks/client.ts +22 -0
- package/packages/enduser/node_modules/.bin/tsc +21 -0
- package/packages/enduser/node_modules/.bin/tsserver +21 -0
- package/packages/enduser/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/enduser/package.json +26 -0
- package/packages/enduser/src/CommunityClient.ts +235 -0
- package/packages/enduser/src/UserClient.ts +447 -0
- package/packages/enduser/src/index.ts +2 -0
- package/packages/enduser/src/testAccountManager.ts +374 -0
- package/packages/enduser/tsconfig.json +10 -0
- package/packages/identity/__tests__/index.test.ts +9 -0
- package/packages/identity/node_modules/.bin/tsc +21 -0
- package/packages/identity/node_modules/.bin/tsserver +21 -0
- package/packages/identity/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/identity/package.json +3 -5
- package/packages/identity/tsconfig.json +2 -1
- package/packages/operator/__tests__/PaymasterOperatorClient.test.ts +258 -0
- package/packages/operator/__tests__/ProtocolClient.test.ts +135 -0
- package/packages/operator/__tests__/index.test.ts +16 -0
- package/packages/operator/__tests__/mocks/client.ts +22 -0
- package/packages/operator/node_modules/.bin/tsc +21 -0
- package/packages/operator/node_modules/.bin/tsserver +21 -0
- package/packages/operator/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/operator/package.json +26 -0
- package/packages/operator/src/PaymasterOperatorClient.ts +454 -0
- package/packages/operator/src/ProtocolClient.ts +154 -0
- package/packages/operator/src/index.ts +2 -0
- package/packages/operator/tsconfig.json +10 -0
- package/packages/patterns/node_modules/.bin/tsc +21 -0
- package/packages/patterns/node_modules/.bin/tsserver +21 -0
- package/packages/paymaster/__tests__/PaymasterOperator.test.ts +123 -0
- package/packages/paymaster/__tests__/index.test.ts +9 -0
- package/packages/paymaster/node_modules/.bin/tsc +21 -0
- package/packages/paymaster/node_modules/.bin/tsserver +21 -0
- package/packages/paymaster/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/paymaster/package.json +4 -6
- package/packages/paymaster/src/V4/BundlerCompat.ts +47 -0
- package/packages/paymaster/src/V4/PaymasterClient.ts +122 -17
- package/packages/paymaster/src/V4/PaymasterUtils.ts +37 -23
- package/packages/paymaster/src/V4/SuperPaymasterClient.ts +17 -11
- package/packages/paymaster/tsconfig.json +8 -3
- package/packages/sdk/README.md +21 -0
- package/packages/sdk/__tests__/index.test.ts +9 -0
- package/packages/sdk/aastar/package.json +1 -1
- package/packages/sdk/aastar/tsconfig.json +2 -1
- package/packages/sdk/node_modules/.bin/tsc +21 -0
- package/packages/sdk/node_modules/.bin/tsserver +21 -0
- package/packages/sdk/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/sdk/package.json +4 -14
- package/packages/sdk/src/clients/admin.ts +10 -108
- package/packages/sdk/src/clients/community.ts +242 -176
- package/packages/sdk/src/clients/endUser.ts +168 -291
- package/packages/sdk/src/clients/operator.ts +87 -162
- package/packages/sdk/src/errors/decoder.ts +41 -84
- package/packages/sdk/src/index.ts +10 -9
- package/packages/sdk/src/utils/keys.ts +0 -15
- package/packages/sdk/src/utils/roleData.ts +26 -15
- package/packages/sdk/src/utils/testScenarios.ts +2 -2
- package/packages/sdk/src/utils/userOp.ts +3 -11
- package/packages/sdk/tsconfig.json +2 -1
- package/packages/tokens/__tests__/index.test.ts +9 -0
- package/packages/tokens/node_modules/.bin/tsc +21 -0
- package/packages/tokens/node_modules/.bin/tsserver +21 -0
- package/packages/tokens/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/tokens/package.json +3 -5
- package/packages/tokens/src/index.ts +0 -15
- package/packages/tokens/tsconfig.json +2 -1
- package/publish.sh +30 -0
- package/run_l4_gasless_regression.sh +35 -5
- package/run_sdk_regression.sh +3 -9
- package/scripts/01_prepare_all.ts +198 -149
- package/scripts/02_test_eoa.ts +24 -27
- package/scripts/03_test_standard_aa.ts +153 -48
- package/scripts/04_test_paymaster_v4.ts +198 -41
- package/scripts/05_test_superpaymaster.ts +362 -40
- package/scripts/11_test_core_flows_full.ts +197 -75
- package/scripts/18_test_dvt_sdk_flow.ts +1 -1
- package/scripts/19_sdk_experiment_runner.ts +135 -42
- package/scripts/20_sdk_full_capability.ts +77 -75
- package/scripts/analyze_abi_coverage.ts +4 -4
- package/scripts/analyze_missing_functions.ts +136 -0
- package/scripts/canary-bundler.ts +47 -0
- package/scripts/check-chainlink.ts +28 -0
- package/scripts/check-jason-status.ts +61 -160
- package/scripts/check-roles.ts +1 -1
- package/scripts/complete-jack-superpaymaster.ts +1 -1
- package/scripts/deploy_and_init_v3.sh +0 -0
- package/scripts/deploy_jason_pm.ts +114 -0
- package/scripts/dev_tools/extract_abis.sh +0 -0
- package/scripts/dev_tools/extract_addresses_to_env.sh +0 -0
- package/scripts/extract-docs.sh +9 -78
- package/scripts/l4-debug-bob.ts +62 -0
- package/scripts/l4-paymasterv4-transfer-test.ts +12 -20
- package/scripts/l4-setup.ts +1235 -341
- package/scripts/l4-state.json +16 -14
- package/scripts/manual-update-price.ts +39 -0
- package/scripts/phase1_verify_contracts.ts +1 -1
- package/scripts/publish_all.sh +0 -0
- package/scripts/query-jack-token.ts +1 -1
- package/scripts/run_automated_experiment.sh +0 -0
- package/scripts/run_full_regression.sh +38 -0
- package/scripts/run_l4_gasless_regression.sh +0 -0
- package/scripts/run_sdk_experiment.sh +0 -0
- package/scripts/run_sdk_regression-v2.sh +0 -0
- package/scripts/sdk_regression_v2.ts +20 -34
- package/scripts/security_audit.sh +0 -0
- package/scripts/setup-bbq-community.ts +2 -2
- package/scripts/setup-dancing-community.ts +3 -3
- package/scripts/test-brown-v4-deploy.ts +2 -2
- package/scripts/test-faucet-and-gasless.ts +119 -139
- package/scripts/test-jack-gasless.ts +1 -1
- package/scripts/test-jack-registration.ts +2 -2
- package/scripts/test-jack-superpaymaster-api.ts +2 -2
- package/scripts/test-kms-gasless.ts +307 -93
- package/scripts/update-price-dvt.ts +53 -0
- package/scripts/v2_regression/01_setup_and_fund.ts +1 -1
- package/scripts/v2_regression/02_operator_onboarding.ts +140 -14
- package/scripts/v2_regression/03_community_registry.ts +58 -24
- package/scripts/v2_regression/04_enduser_flow.ts +49 -16
- package/scripts/v2_regression/05_admin_audit.ts +1 -1
- package/scripts/verify-bob-token.ts +41 -0
- package/sdk-abi-coverage.sh +1 -0
- package/sdk-build-and-test.sh +1 -0
- package/sdk-test-coverage.sh +1 -0
- package/simple-test-paymaster.sh +1 -1
- package/simple-test-superpaymaster.sh +3 -1
- package/tests/check-aa-balance.ts +31 -0
- package/tests/l1-regression.test.ts +13 -34
- package/tests/l4-test-anni-gasless.ts +497 -85
- package/tests/l4-test-jason1-gasless.ts +29 -21
- package/tests/l4-test-jason2-gasless.ts +21 -15
- package/tests/l4-test-pmv4-deposit.ts +2 -2
- package/tests/l4-test-pmv4-gasless.ts +2 -2
- package/tests/l4-test-pmv4-submit.ts +2 -2
- package/tests/regression/config.ts +4 -2
- package/tests/regression/index.ts +0 -0
- package/tests/regression/l1-tests.ts +16 -35
- package/tests/regression/l2-tests.ts +149 -93
- package/tests/regression/l3-tests.ts +16 -113
- package/tests/regression/l4-comprehensive-gasless.ts +478 -0
- package/tests/regression/l4-gasless.ts +115 -13
- package/tests/regression/l4-reputation-tiers.ts +102 -0
- package/tests/test-bundler-compat.ts +132 -0
- package/tests/test-candide-bundler.ts +117 -0
- package/tests/test-candide-paymaster.ts +101 -0
- package/tests/test-candide-sdk.ts +116 -0
- package/tests/test-candide-simple.ts +204 -0
- package/tests/test-pimlico-complete.ts +134 -0
- package/tests/utils/contractVerifier.ts +3 -3
- package/tsconfig.build.json +23 -0
- package/tsconfig.json +5 -19
- package/typedoc.json +5 -39
- package/update-version.sh +20 -0
- package/vitest.config.ts +6 -5
- package/.eslintrc.cjs +0 -30
- package/docs/ABI_Change_Tracking_Workflow.md +0 -41
- package/docs/Faucet_Gasless_Plan.md +0 -56
- package/docs/api/@aastar/account.md +0 -235
- package/docs/api/@aastar/analytics.md +0 -219
- package/docs/api/@aastar/core.md +0 -26830
- package/docs/api/@aastar/dapp.md +0 -130
- package/docs/api/@aastar/identity.md +0 -482
- package/docs/api/@aastar/paymaster.md +0 -1387
- package/docs/api/@aastar/sdk/README.md +0 -155
- package/docs/api/@aastar/sdk/node.md +0 -4044
- package/docs/api/@aastar/tokens.md +0 -1971
- package/docs/changelog.md +0 -99
- package/docs/examples/README.md +0 -18
- package/docs/guide/concepts/account-abstraction.md +0 -95
- package/docs/guide/concepts/rainbow-bridge.md +0 -68
- package/docs/guide/concepts/reputation.md +0 -95
- package/docs/guide/concepts/superpaymaster.md +0 -141
- package/docs/guide/use-cases/community-management.md +0 -141
- package/docs/guide/use-cases/gasless-transactions.md +0 -71
- package/docs/guide/use-cases/operator-staking.md +0 -84
- package/docs/guide/use-cases/yop.md +0 -72
- package/docs/refactor/2026-01-13-221242-trae-refactor.md +0 -224
- package/docs/refactor/2026-01-13-audit-analysis.md +0 -96
- package/docs/refactor/2026-01-13-audit-report-v0.16.2.md +0 -76
- package/docs/refactor/2026-01-13-audit-report-v0.17.0.md +0 -74
- package/docs/refactor/2026-01-13-cursor-refactor.md +0 -511
- package/docs/refactor/2026-01-13-refactor-plan.md +0 -88
- package/docs/refactor/2026-01-13-refactor-response-plan.md +0 -77
- package/docs/refactor/2026-01-13-refactor-review.md +0 -39
- package/docs/refactor/2026-01-13-sdk-enhancement-plan.md +0 -120
- package/docs/refactor/2026-01-14-audit-response.md +0 -242
- package/docs/refactor/2026-01-14-audit-summary.md +0 -133
- package/docs/refactor/cursor-2026-01-13-14-00-audit-report.md +0 -267
- package/packages/account/src/accounts/simple.test.ts +0 -93
- package/packages/account/src/eoa.test.ts +0 -37
- package/packages/account/src/index.test.ts +0 -34
- package/packages/core/scripts/audit-abi-coverage.ts +0 -165
- package/packages/core/scripts/debug-regex.ts +0 -36
- package/packages/core/src/abis/.abi-hashes.json +0 -26
- package/packages/core/src/actions/StateValidator.test.ts +0 -175
- package/packages/core/src/actions/account.test.ts +0 -155
- package/packages/core/src/actions/aggregator.test.ts +0 -88
- package/packages/core/src/actions/dvt.test.ts +0 -124
- package/packages/core/src/actions/entryPoint.test.ts +0 -176
- package/packages/core/src/actions/factory.test.ts +0 -250
- package/packages/core/src/actions/faucet.test.ts +0 -202
- package/packages/core/src/actions/gtokenExtended.test.ts +0 -162
- package/packages/core/src/actions/gtokenExtended.ts +0 -153
- package/packages/core/src/actions/paymasterV4.test.ts +0 -209
- package/packages/core/src/actions/paymasterV4.ts +0 -455
- package/packages/core/src/actions/registry.test.ts +0 -443
- package/packages/core/src/actions/reputation.test.ts +0 -225
- package/packages/core/src/actions/sbt.test.ts +0 -322
- package/packages/core/src/actions/staking.test.ts +0 -273
- package/packages/core/src/actions/superPaymaster.test.ts +0 -356
- package/packages/core/src/actions/tokens.test.ts +0 -60
- package/packages/core/src/actions/validators.test.ts +0 -239
- package/packages/core/src/actions/validators.ts +0 -590
- package/packages/core/src/contracts.test.ts +0 -58
- package/packages/core/src/requirementChecker.test.ts +0 -71
- package/packages/core/src/roles.test.ts +0 -34
- package/packages/core/src/utils/validation.test.ts +0 -50
- package/packages/core/src/utils/validation.ts +0 -66
- package/packages/core/vitest.config.ts +0 -14
- package/packages/paymaster/src/V4/PaymasterClient.test.ts +0 -114
- package/packages/paymaster/src/V4/PaymasterOperator.test.ts +0 -80
- package/packages/paymaster/src/V4/PaymasterUtils.test.ts +0 -54
- package/packages/paymaster/src/V4/SuperPaymasterClient.test.ts +0 -79
- package/packages/sdk/coverage_output.txt +0 -393
- package/packages/sdk/coverage_output_final.txt +0 -739
- package/packages/sdk/coverage_output_final_v2.txt +0 -722
- package/packages/sdk/coverage_output_final_v3.txt +0 -722
- package/packages/sdk/src/clients/ExperimentClient.test.ts +0 -65
- package/packages/sdk/src/clients/admin.test.ts +0 -98
- package/packages/sdk/src/clients/clients.test.ts +0 -104
- package/packages/sdk/src/clients/community.test.ts +0 -118
- package/packages/sdk/src/clients/endUser.test.ts +0 -221
- package/packages/sdk/src/clients/operator.test.ts +0 -162
- package/packages/sdk/src/errors/AAStarError.test.ts +0 -92
- package/packages/sdk/src/errors/AAStarError.ts +0 -70
- package/packages/sdk/src/errors/decoder.test.ts +0 -107
- package/packages/sdk/src/node/index.ts +0 -8
- package/packages/sdk/src/types/result.ts +0 -29
- package/packages/sdk/src/utils/errorHandler.test.ts +0 -102
- package/packages/sdk/src/utils/eventDecoder.test.ts +0 -56
- package/packages/sdk/src/utils/eventDecoder.ts +0 -66
- package/packages/sdk/src/utils/funding.test.ts +0 -117
- package/packages/sdk/src/utils/keys.test.ts +0 -105
- package/packages/sdk/src/utils/roleData.test.ts +0 -85
- package/packages/sdk/src/utils/testScenarios.test.ts +0 -79
- package/packages/sdk/src/utils/userOp.test.ts +0 -190
- package/scripts/debug-addr.ts +0 -43
- package/scripts/debug-community-registration.ts +0 -92
- package/scripts/debug-deploy-v4.ts +0 -116
- package/scripts/debug-paymaster.ts +0 -127
- package/scripts/debug-register-role.ts +0 -101
- package/scripts/debug-version.ts +0 -71
- package/scripts/debug_account_c.ts +0 -43
- package/scripts/debug_bls.ts +0 -58
- package/scripts/debug_config_v036.ts +0 -13
- package/scripts/debug_contracts.ts +0 -2
- package/scripts/debug_env.ts +0 -69
- package/scripts/debug_find_paymaster.ts +0 -98
- package/scripts/debug_isolated_registration.ts +0 -256
- package/scripts/debug_paymaster_config.ts +0 -19
- package/scripts/debug_pim_addr.ts +0 -23
- package/scripts/debug_pm_status.ts +0 -51
- package/scripts/debug_registry.ts +0 -39
- package/scripts/debug_registry_setup.ts +0 -129
- package/scripts/debug_sanity.ts +0 -32
- package/scripts/debug_shared_config.ts +0 -10
- package/scripts/debug_token_compat.ts +0 -51
- package/scripts/debug_tokens.ts +0 -41
- package/scripts/debug_vcheck.ts +0 -33
- package/scripts/test_groups.ts +0 -138
- package/scripts/test_multi_community_anvil.ts +0 -276
- package/scripts/test_new_sdk_apis_sepolia.ts +0 -193
- package/scripts/test_sdk_join_idempotent.ts +0 -233
- package/scripts/test_simple_sepolia.ts +0 -44
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LogParser - 批量解析历史测试日志
|
|
3
|
+
*
|
|
4
|
+
* 功能:
|
|
5
|
+
* - 遍历 logs/*.log 文件
|
|
6
|
+
* - 提取 transaction hash, userOp hash, test type
|
|
7
|
+
* - 支持 Anvil 和 Sepolia 两种环境
|
|
8
|
+
* - 返回标准化的交易记录
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import * as fs from 'fs';
|
|
12
|
+
import * as path from 'path';
|
|
13
|
+
|
|
14
|
+
export interface TransactionRecord {
|
|
15
|
+
txHash: string; // 交易哈希
|
|
16
|
+
userOpHash?: string; // UserOperation 哈希
|
|
17
|
+
testType: string; // 测试类型 (jason1-gasless, anni-gasless, etc.)
|
|
18
|
+
network: 'anvil' | 'sepolia'; // 网络环境
|
|
19
|
+
timestamp: Date; // 日志时间戳
|
|
20
|
+
logFile: string; // 来源日志文件
|
|
21
|
+
success: boolean; // 是否成功
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class LogParser {
|
|
25
|
+
private logsDir: string;
|
|
26
|
+
|
|
27
|
+
constructor(logsDir?: string) {
|
|
28
|
+
this.logsDir = logsDir || path.resolve(__dirname, '../../../../logs');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 解析所有日志文件
|
|
33
|
+
*/
|
|
34
|
+
async parseAll(): Promise<TransactionRecord[]> {
|
|
35
|
+
const logFiles = this.getLogFiles();
|
|
36
|
+
const records: TransactionRecord[] = [];
|
|
37
|
+
|
|
38
|
+
for (const logFile of logFiles) {
|
|
39
|
+
const fileRecords = await this.parseFile(logFile);
|
|
40
|
+
records.push(...fileRecords);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
console.log(`✅ 解析完成:从 ${logFiles.length} 个日志文件中提取 ${records.length} 条交易记录`);
|
|
44
|
+
return records;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 解析单个日志文件
|
|
49
|
+
*/
|
|
50
|
+
private async parseFile(filePath: string): Promise<TransactionRecord[]> {
|
|
51
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
52
|
+
const fileName = path.basename(filePath);
|
|
53
|
+
|
|
54
|
+
// 从文件名提取网络和时间戳
|
|
55
|
+
const network = fileName.includes('anvil') ? 'anvil' : 'sepolia';
|
|
56
|
+
const timestampMatch = fileName.match(/(\d{8}_\d{6})/);
|
|
57
|
+
const timestamp = timestampMatch
|
|
58
|
+
? this.parseTimestamp(timestampMatch[1])
|
|
59
|
+
: new Date(fs.statSync(filePath).mtime);
|
|
60
|
+
|
|
61
|
+
const records: TransactionRecord[] = [];
|
|
62
|
+
const lines = content.split('\n');
|
|
63
|
+
|
|
64
|
+
let currentTest: string | null = null;
|
|
65
|
+
let currentSuccess = false;
|
|
66
|
+
|
|
67
|
+
for (let i = 0; i < lines.length; i++) {
|
|
68
|
+
const line = lines[i];
|
|
69
|
+
|
|
70
|
+
// 识别测试类型
|
|
71
|
+
const testMatch = line.match(/📋 Test: (.+)/);
|
|
72
|
+
if (testMatch) {
|
|
73
|
+
currentTest = testMatch[1].trim();
|
|
74
|
+
currentSuccess = false;
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// 提取交易哈希
|
|
79
|
+
const txHashMatch = line.match(/(?:Transaction|transaction):\s*(0x[a-fA-F0-9]{64})/);
|
|
80
|
+
if (txHashMatch && currentTest) {
|
|
81
|
+
const txHash = txHashMatch[1];
|
|
82
|
+
|
|
83
|
+
// 尝试查找关联的 UserOp Hash
|
|
84
|
+
const userOpHash = this.findUserOpHash(lines, i);
|
|
85
|
+
|
|
86
|
+
records.push({
|
|
87
|
+
txHash,
|
|
88
|
+
userOpHash,
|
|
89
|
+
testType: currentTest,
|
|
90
|
+
network,
|
|
91
|
+
timestamp,
|
|
92
|
+
logFile: fileName,
|
|
93
|
+
success: true, // 如果记录了 tx,默认认为成功
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 检测成功标志
|
|
98
|
+
if (line.includes('🎉') || line.includes('SUCCESS') || line.includes('✅')) {
|
|
99
|
+
currentSuccess = true;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// 提取 UserOp Hash(独立出现的情况)
|
|
103
|
+
const userOpMatch = line.match(/UserOp(?:\s+submitted!?)?\s+Hash:\s*(0x[a-fA-F0-9]{64})/i);
|
|
104
|
+
if (userOpMatch && currentTest) {
|
|
105
|
+
const userOpHash = userOpMatch[1];
|
|
106
|
+
|
|
107
|
+
// 检查是否已有对应的 tx 记录
|
|
108
|
+
const existing = records.find(r => r.userOpHash === userOpHash);
|
|
109
|
+
if (!existing) {
|
|
110
|
+
// 尝试向后查找对应的 tx hash
|
|
111
|
+
const txHash = this.findTxHash(lines, i);
|
|
112
|
+
|
|
113
|
+
if (txHash) {
|
|
114
|
+
records.push({
|
|
115
|
+
txHash,
|
|
116
|
+
userOpHash,
|
|
117
|
+
testType: currentTest,
|
|
118
|
+
network,
|
|
119
|
+
timestamp,
|
|
120
|
+
logFile: fileName,
|
|
121
|
+
success: true,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return records;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 在指定行附近查找 UserOp Hash
|
|
133
|
+
*/
|
|
134
|
+
private findUserOpHash(lines: string[], startLine: number): string | undefined {
|
|
135
|
+
const searchRange = 20; // 向前后各搜索20行
|
|
136
|
+
|
|
137
|
+
for (let i = Math.max(0, startLine - searchRange); i < Math.min(lines.length, startLine + searchRange); i++) {
|
|
138
|
+
const match = lines[i].match(/UserOp(?:\s+submitted!?)?\s+Hash:\s*(0x[a-fA-F0-9]{64})/i);
|
|
139
|
+
if (match) {
|
|
140
|
+
return match[1];
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 在指定行之后查找 Transaction Hash
|
|
149
|
+
*/
|
|
150
|
+
private findTxHash(lines: string[], startLine: number): string | undefined {
|
|
151
|
+
const searchRange = 30; // 向后搜索30行
|
|
152
|
+
|
|
153
|
+
for (let i = startLine; i < Math.min(lines.length, startLine + searchRange); i++) {
|
|
154
|
+
const match = lines[i].match(/(?:Transaction|transaction):\s*(0x[a-fA-F0-9]{64})/);
|
|
155
|
+
if (match) {
|
|
156
|
+
return match[1];
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* 解析时间戳字符串
|
|
165
|
+
*/
|
|
166
|
+
private parseTimestamp(timestampStr: string): Date {
|
|
167
|
+
// 格式: YYYYMMDD_HHMMSS
|
|
168
|
+
const year = parseInt(timestampStr.substring(0, 4));
|
|
169
|
+
const month = parseInt(timestampStr.substring(4, 6)) - 1;
|
|
170
|
+
const day = parseInt(timestampStr.substring(6, 8));
|
|
171
|
+
const hour = parseInt(timestampStr.substring(9, 11));
|
|
172
|
+
const minute = parseInt(timestampStr.substring(11, 13));
|
|
173
|
+
const second = parseInt(timestampStr.substring(13, 15));
|
|
174
|
+
|
|
175
|
+
return new Date(year, month, day, hour, minute, second);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* 获取所有日志文件路径
|
|
180
|
+
*/
|
|
181
|
+
private getLogFiles(): string[] {
|
|
182
|
+
if (!fs.existsSync(this.logsDir)) {
|
|
183
|
+
throw new Error(`日志目录不存在: ${this.logsDir}`);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const files = fs.readdirSync(this.logsDir)
|
|
187
|
+
.filter(f => f.endsWith('.log'))
|
|
188
|
+
.map(f => path.join(this.logsDir, f))
|
|
189
|
+
.sort(); // 按文件名排序
|
|
190
|
+
|
|
191
|
+
return files;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* 统计概览
|
|
196
|
+
*/
|
|
197
|
+
getStatistics(records: TransactionRecord[]): {
|
|
198
|
+
total: number;
|
|
199
|
+
byNetwork: Record<string, number>;
|
|
200
|
+
byTestType: Record<string, number>;
|
|
201
|
+
successRate: number;
|
|
202
|
+
} {
|
|
203
|
+
const byNetwork: Record<string, number> = {};
|
|
204
|
+
const byTestType: Record<string, number> = {};
|
|
205
|
+
let successCount = 0;
|
|
206
|
+
|
|
207
|
+
for (const record of records) {
|
|
208
|
+
byNetwork[record.network] = (byNetwork[record.network] || 0) + 1;
|
|
209
|
+
byTestType[record.testType] = (byTestType[record.testType] || 0) + 1;
|
|
210
|
+
if (record.success) successCount++;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return {
|
|
214
|
+
total: records.length,
|
|
215
|
+
byNetwork,
|
|
216
|
+
byTestType,
|
|
217
|
+
successRate: records.length > 0 ? successCount / records.length : 0,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PriceOracle - ETH 价格查询与缓存
|
|
3
|
+
*
|
|
4
|
+
* 支持:
|
|
5
|
+
* - CoinGecko API (主要)
|
|
6
|
+
* - 本地缓存 (每小时更新)
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import * as fs from 'fs';
|
|
10
|
+
import * as path from 'path';
|
|
11
|
+
|
|
12
|
+
interface PriceCache {
|
|
13
|
+
eth_usd: number;
|
|
14
|
+
apnts_usd: number;
|
|
15
|
+
timestamp: number; // Unix timestamp
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class PriceOracle {
|
|
19
|
+
private cacheFile: string;
|
|
20
|
+
private cacheDuration: number; // 缓存有效期(秒)
|
|
21
|
+
|
|
22
|
+
constructor(cacheFile?: string, cacheDuration = 3600) {
|
|
23
|
+
this.cacheFile = cacheFile || path.resolve(__dirname, '../../../../packages/analytics/data/eth_price_cache.json');
|
|
24
|
+
this.cacheDuration = cacheDuration;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 获取 ETH 价格(USD)
|
|
29
|
+
*/
|
|
30
|
+
async getEthPrice(): Promise<number> {
|
|
31
|
+
// 检查缓存
|
|
32
|
+
const cached = this.loadCache();
|
|
33
|
+
const now = Math.floor(Date.now() / 1000);
|
|
34
|
+
|
|
35
|
+
if (cached && (now - cached.timestamp) < this.cacheDuration) {
|
|
36
|
+
console.log(`💵 使用缓存 ETH 价格: $${cached.eth_usd} (更新于 ${new Date(cached.timestamp * 1000).toISOString()})`);
|
|
37
|
+
return cached.eth_usd;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 从 CoinGecko 获取
|
|
41
|
+
try {
|
|
42
|
+
const ethPrice = await this.fetchETHFromCoinGecko();
|
|
43
|
+
const currentAPNTs = cached?.apnts_usd || 0.02; // 默认 0.02
|
|
44
|
+
|
|
45
|
+
this.saveCache({
|
|
46
|
+
eth_usd: ethPrice,
|
|
47
|
+
apnts_usd: currentAPNTs,
|
|
48
|
+
timestamp: now
|
|
49
|
+
});
|
|
50
|
+
return ethPrice;
|
|
51
|
+
} catch (error) {
|
|
52
|
+
console.warn('⚠️ 无法获取价格,使用默认值');
|
|
53
|
+
return 3300; // 默认值
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 获取 aPNTs 价格(USD)
|
|
59
|
+
* 未来可扩展为从 SuperPaymaster 合约查询
|
|
60
|
+
*/
|
|
61
|
+
async getAPNTsPrice(): Promise<number> {
|
|
62
|
+
const cached = this.loadCache();
|
|
63
|
+
const now = Math.floor(Date.now() / 1000);
|
|
64
|
+
|
|
65
|
+
if (cached && (now - cached.timestamp) < this.cacheDuration) {
|
|
66
|
+
return cached.apnts_usd || 0.02;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 默认保持 0.02,但预留更新逻辑
|
|
70
|
+
return 0.02;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 从 CoinGecko API 获取 ETH 价格
|
|
75
|
+
*/
|
|
76
|
+
private async fetchETHFromCoinGecko(): Promise<number> {
|
|
77
|
+
const url = 'https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd';
|
|
78
|
+
|
|
79
|
+
const response = await fetch(url);
|
|
80
|
+
if (!response.ok) {
|
|
81
|
+
throw new Error(`CoinGecko API 错误: ${response.status}`);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const data = await response.json();
|
|
85
|
+
return data.ethereum.usd;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 加载缓存
|
|
90
|
+
*/
|
|
91
|
+
private loadCache(): PriceCache | null {
|
|
92
|
+
try {
|
|
93
|
+
if (fs.existsSync(this.cacheFile)) {
|
|
94
|
+
const content = fs.readFileSync(this.cacheFile, 'utf8');
|
|
95
|
+
return JSON.parse(content);
|
|
96
|
+
}
|
|
97
|
+
} catch (e) {
|
|
98
|
+
// Ignore
|
|
99
|
+
}
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 保存缓存
|
|
105
|
+
*/
|
|
106
|
+
private saveCache(cache: PriceCache): void {
|
|
107
|
+
try {
|
|
108
|
+
const dir = path.dirname(this.cacheFile);
|
|
109
|
+
if (!fs.existsSync(dir)) {
|
|
110
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
111
|
+
}
|
|
112
|
+
fs.writeFileSync(this.cacheFile, JSON.stringify(cache, null, 2), 'utf8');
|
|
113
|
+
} catch (e) {
|
|
114
|
+
console.warn('⚠️ 缓存保存失败:', e);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { AttributionAnalyzer } from '../src/analyzers/AttributionAnalyzer';
|
|
3
|
+
import type { CostBreakdown } from '../src/core/CostCalculator';
|
|
4
|
+
|
|
5
|
+
describe('AttributionAnalyzer', () => {
|
|
6
|
+
const analyzer = new AttributionAnalyzer();
|
|
7
|
+
const ethPrice = 3000;
|
|
8
|
+
|
|
9
|
+
it('should simulate L2 costs with dynamic calldata pricing', () => {
|
|
10
|
+
const mockBreakdown: CostBreakdown = {
|
|
11
|
+
intrinsic: {
|
|
12
|
+
gasUsed: 200000n,
|
|
13
|
+
aPNTsConsumed: 0n,
|
|
14
|
+
overheadGas: 0n,
|
|
15
|
+
efficiency: 1
|
|
16
|
+
},
|
|
17
|
+
economic: {
|
|
18
|
+
l1EthCost: 200000n * 1000000000n, // 0.0002 ETH (1 Gwei gas price)
|
|
19
|
+
l1UsdCost: 0.60, // $0.60
|
|
20
|
+
protocolUsdRevenue: 0.70,
|
|
21
|
+
protocolUsdProfit: 0.10,
|
|
22
|
+
protocolUsdSubsidy: 0
|
|
23
|
+
},
|
|
24
|
+
meta: {
|
|
25
|
+
txHash: '0x',
|
|
26
|
+
blockNumber: 1n,
|
|
27
|
+
timestamp: 1n,
|
|
28
|
+
mode: 'v4'
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const sim = analyzer.simulateL2Cost(mockBreakdown, ethPrice);
|
|
33
|
+
|
|
34
|
+
// 1. L2 Execution: 200k gas * 0.001 Gwei = 0.0000002 ETH = $0.0006
|
|
35
|
+
expect(sim.totalL2Usd).toBeGreaterThan(0);
|
|
36
|
+
expect(sim.totalL2Usd).toBeLessThan(0.01); // Should be very cheap
|
|
37
|
+
|
|
38
|
+
// 2. Savings Ratio
|
|
39
|
+
// $0.60 / ~$0.001 should be around 600x
|
|
40
|
+
expect(sim.savingsRatio).toBeGreaterThan(50);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { CostCalculator } from '../src/core/CostCalculator';
|
|
3
|
+
import type { OnChainData } from '../src/core/DataCollector';
|
|
4
|
+
import { parseEther } from 'viem';
|
|
5
|
+
|
|
6
|
+
describe('CostCalculator', () => {
|
|
7
|
+
// Mock Prices: ETH = $3000, aPNTs = $0.02
|
|
8
|
+
const calculator = new CostCalculator(3000, 0.02);
|
|
9
|
+
|
|
10
|
+
it('should calculate SuperPaymaster (V3) costs correctly', () => {
|
|
11
|
+
const mockData: OnChainData = {
|
|
12
|
+
txHash: '0x123',
|
|
13
|
+
gasUsed: 100000n,
|
|
14
|
+
effectiveGasPrice: parseEther('0.000000001'), // 1 Gwei
|
|
15
|
+
blockNumber: 1n,
|
|
16
|
+
blockTimestamp: 1000n,
|
|
17
|
+
paymasterEvents: [
|
|
18
|
+
{
|
|
19
|
+
type: 'TransactionSponsored',
|
|
20
|
+
user: '0xUser',
|
|
21
|
+
apntsConsumed: 1000000000000000000n // 1 aPNTs (18 decimals)
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
// Layer 1 Cost = 100k gas * 1 gwei = 0.0001 ETH ($0.30)
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const result = calculator.calculate(mockData);
|
|
28
|
+
|
|
29
|
+
expect(result.meta.mode).toBe('super');
|
|
30
|
+
|
|
31
|
+
// Revenue: 1 aPNTs * $0.02 = $0.02
|
|
32
|
+
expect(result.economic.protocolUsdRevenue).toBeCloseTo(0.02);
|
|
33
|
+
|
|
34
|
+
// Cost: 0.0001 ETH * $3000 = $0.30
|
|
35
|
+
expect(result.economic.l1UsdCost).toBeCloseTo(0.30);
|
|
36
|
+
|
|
37
|
+
// Profit: $0.02 - $0.30 = -$0.28
|
|
38
|
+
expect(result.economic.protocolUsdProfit).toBeCloseTo(-0.28);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('should calculate Paymaster V4 costs correctly (Token)', () => {
|
|
42
|
+
const mockData: OnChainData = {
|
|
43
|
+
txHash: '0x456',
|
|
44
|
+
gasUsed: 100000n,
|
|
45
|
+
effectiveGasPrice: parseEther('0.000000001'), // 1 Gwei
|
|
46
|
+
blockNumber: 1n,
|
|
47
|
+
blockTimestamp: 1000n,
|
|
48
|
+
paymasterEvents: [
|
|
49
|
+
{
|
|
50
|
+
type: 'PostOpProcessed',
|
|
51
|
+
user: '0xUser',
|
|
52
|
+
token: '0xToken',
|
|
53
|
+
tokenCost: 1000000000000000000n, // 1 Unit ($1 assumed for non-ETH)
|
|
54
|
+
actualGasCostWei: parseEther('0.0001'),
|
|
55
|
+
protocolRevenue: 0n
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const result = calculator.calculate(mockData);
|
|
61
|
+
|
|
62
|
+
expect(result.meta.mode).toBe('v4');
|
|
63
|
+
|
|
64
|
+
// Revenue: 1 Unit * $1 (implicit assumption for general tokens in V4 logic)
|
|
65
|
+
// Wait, current logic for V4 non-ETH is formatUnits(tokenCost, 18).
|
|
66
|
+
// If 1 unit = 1e18 wei, then revenue is 1.0
|
|
67
|
+
expect(result.economic.protocolUsdRevenue).toBeCloseTo(1.0);
|
|
68
|
+
|
|
69
|
+
// Cost: $0.30
|
|
70
|
+
expect(result.economic.l1UsdCost).toBeCloseTo(0.30);
|
|
71
|
+
|
|
72
|
+
// Profit: $0.70
|
|
73
|
+
expect(result.economic.protocolUsdProfit).toBeCloseTo(0.70);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/bin/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/bin/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/bin/tsc" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../../../../node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/bin/tsc" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/bin/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/bin/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/typescript@5.7.2/node_modules:/Users/jason/Dev/mycelium/my-exploration/projects/aastar-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/bin/tsserver" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../../../../node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/bin/tsserver" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"4.0.17","results":[[":__tests__/index.test.ts",{"duration":3.6658239999999296,"failed":false}]]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aastar/community",
|
|
3
|
+
"version": "0.16.11",
|
|
4
|
+
"description": "Community management client for AAstar SDK",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"test": "vitest run"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"aastar",
|
|
13
|
+
"community",
|
|
14
|
+
"dao",
|
|
15
|
+
"web3"
|
|
16
|
+
],
|
|
17
|
+
"author": "AAstar Team",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@aastar/core": "workspace:*",
|
|
21
|
+
"@aastar/tokens": "workspace:*",
|
|
22
|
+
"viem": "2.43.3"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "5.7.2"
|
|
26
|
+
}
|
|
27
|
+
}
|