trustbase-seller-backend 0.1.5
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/.agents/skills/wechatpay-payment-integration/SKILL.md +165 -0
- package/.agents/skills/wechatpay-payment-integration/references/APIv3/346/216/245/345/217/243/345/212/250/346/200/201/346/216/222/351/232/234.md +234 -0
- package/.agents/skills/wechatpay-payment-integration/references/wechatpay-dev-cli/344/275/277/347/224/250/350/257/264/346/230/216.md +74 -0
- package/.agents/skills/wechatpay-payment-integration/references//345/237/272/347/241/200/346/246/202/345/277/265/345/217/212/344/270/232/345/212/241/344/273/213/347/273/215.md +109 -0
- package/.agents/skills/wechatpay-payment-integration/references//345/246/202/344/275/225/347/220/206/350/247/243/347/224/250/346/210/267/351/227/256/351/242/230.md +55 -0
- package/.agents/skills/wechatpay-payment-integration/references//346/216/245/345/205/245/350/264/250/351/207/217/346/243/200/346/237/245/346/270/205/345/215/225.md +70 -0
- package/.agents/skills/wechatpay-payment-integration/references//346/226/207/346/241/243/346/243/200/347/264/242/344/270/216/351/227/256/347/255/224.md +99 -0
- package/.agents/skills/wechatpay-payment-integration/scripts/bash/extract_and_sign.sh +231 -0
- package/.agents/skills/wechatpay-payment-integration/scripts/powershell/extract_and_sign.ps1 +199 -0
- package/.agents/skills/wechatpay-payment-integration/scripts/wechatpay-resource-sync.py +646 -0
- package/.env.example +70 -0
- package/MERCHANT-EDITION.md +56 -0
- package/README.md +99 -0
- package/api/__tests__/test-utils.d.ts +33 -0
- package/api/__tests__/test-utils.d.ts.map +1 -0
- package/api/__tests__/test-utils.js +90 -0
- package/api/__tests__/test-utils.js.map +1 -0
- package/api/db/case-library-types.d.ts +47 -0
- package/api/db/case-library-types.d.ts.map +1 -0
- package/api/db/case-library-types.js +105 -0
- package/api/db/case-library-types.js.map +1 -0
- package/api/db/case-library.db.d.ts +5 -0
- package/api/db/case-library.db.d.ts.map +1 -0
- package/api/db/case-library.db.js +127 -0
- package/api/db/case-library.db.js.map +1 -0
- package/api/email.d.ts +56 -0
- package/api/email.d.ts.map +1 -0
- package/api/email.js +307 -0
- package/api/email.js.map +1 -0
- package/api/index.d.ts +22 -0
- package/api/index.d.ts.map +1 -0
- package/api/index.js +41 -0
- package/api/index.js.map +1 -0
- package/api/integration-helpers.d.ts +153 -0
- package/api/integration-helpers.d.ts.map +1 -0
- package/api/integration-helpers.js +361 -0
- package/api/integration-helpers.js.map +1 -0
- package/api/lib/case-summary.d.ts +10 -0
- package/api/lib/case-summary.d.ts.map +1 -0
- package/api/lib/case-summary.js +30 -0
- package/api/lib/case-summary.js.map +1 -0
- package/api/middleware/p2p-auth.d.ts +140 -0
- package/api/middleware/p2p-auth.d.ts.map +1 -0
- package/api/middleware/p2p-auth.js +510 -0
- package/api/middleware/p2p-auth.js.map +1 -0
- package/api/middleware/tool-policy.d.ts +47 -0
- package/api/middleware/tool-policy.d.ts.map +1 -0
- package/api/middleware/tool-policy.js +156 -0
- package/api/middleware/tool-policy.js.map +1 -0
- package/api/oauth-adapters.d.ts +192 -0
- package/api/oauth-adapters.d.ts.map +1 -0
- package/api/oauth-adapters.js +456 -0
- package/api/oauth-adapters.js.map +1 -0
- package/api/oauth-bridge.d.ts +56 -0
- package/api/oauth-bridge.d.ts.map +1 -0
- package/api/oauth-bridge.js +624 -0
- package/api/oauth-bridge.js.map +1 -0
- package/api/oauth-router.d.ts +36 -0
- package/api/oauth-router.d.ts.map +1 -0
- package/api/oauth-router.js +54 -0
- package/api/oauth-router.js.map +1 -0
- package/api/p2p-mcp.d.ts +69 -0
- package/api/p2p-mcp.d.ts.map +1 -0
- package/api/p2p-mcp.js +286 -0
- package/api/p2p-mcp.js.map +1 -0
- package/api/payment-store.d.ts +56 -0
- package/api/payment-store.d.ts.map +1 -0
- package/api/payment-store.js +163 -0
- package/api/payment-store.js.map +1 -0
- package/api/payment.d.ts +14 -0
- package/api/payment.d.ts.map +1 -0
- package/api/payment.js +216 -0
- package/api/payment.js.map +1 -0
- package/api/pwa-stats.d.ts +67 -0
- package/api/pwa-stats.d.ts.map +1 -0
- package/api/pwa-stats.js +269 -0
- package/api/pwa-stats.js.map +1 -0
- package/api/riskcontrol-adapters.d.ts +114 -0
- package/api/riskcontrol-adapters.d.ts.map +1 -0
- package/api/riskcontrol-adapters.js +210 -0
- package/api/riskcontrol-adapters.js.map +1 -0
- package/api/riskcontrol-event-whitelist.d.ts +81 -0
- package/api/riskcontrol-event-whitelist.d.ts.map +1 -0
- package/api/riskcontrol-event-whitelist.js +181 -0
- package/api/riskcontrol-event-whitelist.js.map +1 -0
- package/api/riskcontrol-rules.d.ts +105 -0
- package/api/riskcontrol-rules.d.ts.map +1 -0
- package/api/riskcontrol-rules.js +399 -0
- package/api/riskcontrol-rules.js.map +1 -0
- package/api/riskcontrol-scoring.d.ts +72 -0
- package/api/riskcontrol-scoring.d.ts.map +1 -0
- package/api/riskcontrol-scoring.js +335 -0
- package/api/riskcontrol-scoring.js.map +1 -0
- package/api/riskcontrol-service.d.ts +60 -0
- package/api/riskcontrol-service.d.ts.map +1 -0
- package/api/riskcontrol-service.js +206 -0
- package/api/riskcontrol-service.js.map +1 -0
- package/api/riskcontrol-stream.d.ts +112 -0
- package/api/riskcontrol-stream.d.ts.map +1 -0
- package/api/riskcontrol-stream.js +230 -0
- package/api/riskcontrol-stream.js.map +1 -0
- package/api/riskcontrol-v5-e2e-test.d.ts +15 -0
- package/api/riskcontrol-v5-e2e-test.d.ts.map +1 -0
- package/api/riskcontrol-v5-e2e-test.js +204 -0
- package/api/riskcontrol-v5-e2e-test.js.map +1 -0
- package/api/riskcontrol-v5-router.d.ts +48 -0
- package/api/riskcontrol-v5-router.d.ts.map +1 -0
- package/api/riskcontrol-v5-router.js +226 -0
- package/api/riskcontrol-v5-router.js.map +1 -0
- package/api/riskcontrol-webhook.d.ts +88 -0
- package/api/riskcontrol-webhook.d.ts.map +1 -0
- package/api/riskcontrol-webhook.js +326 -0
- package/api/riskcontrol-webhook.js.map +1 -0
- package/api/routes/case-library.d.ts +4 -0
- package/api/routes/case-library.d.ts.map +1 -0
- package/api/routes/case-library.js +91 -0
- package/api/routes/case-library.js.map +1 -0
- package/api/seller-earnings.d.ts +23 -0
- package/api/seller-earnings.d.ts.map +1 -0
- package/api/seller-earnings.js +258 -0
- package/api/seller-earnings.js.map +1 -0
- package/api/seller-orders.d.ts +25 -0
- package/api/seller-orders.d.ts.map +1 -0
- package/api/seller-orders.js +398 -0
- package/api/seller-orders.js.map +1 -0
- package/api/seller-products-chain.d.ts +31 -0
- package/api/seller-products-chain.d.ts.map +1 -0
- package/api/seller-products-chain.js +308 -0
- package/api/seller-products-chain.js.map +1 -0
- package/api/seller-products.d.ts +30 -0
- package/api/seller-products.d.ts.map +1 -0
- package/api/seller-products.js +453 -0
- package/api/seller-products.js.map +1 -0
- package/api/seller-reputation.d.ts +21 -0
- package/api/seller-reputation.d.ts.map +1 -0
- package/api/seller-reputation.js +204 -0
- package/api/seller-reputation.js.map +1 -0
- package/api/seller-router.d.ts +33 -0
- package/api/seller-router.d.ts.map +1 -0
- package/api/seller-router.js +53 -0
- package/api/seller-router.js.map +1 -0
- package/api/seller-settings.d.ts +23 -0
- package/api/seller-settings.d.ts.map +1 -0
- package/api/seller-settings.js +279 -0
- package/api/seller-settings.js.map +1 -0
- package/api/shipping-store.d.ts +44 -0
- package/api/shipping-store.d.ts.map +1 -0
- package/api/shipping-store.js +154 -0
- package/api/shipping-store.js.map +1 -0
- package/api/shipping.d.ts +16 -0
- package/api/shipping.d.ts.map +1 -0
- package/api/shipping.js +239 -0
- package/api/shipping.js.map +1 -0
- package/api/social-endpoint-verify.d.ts +8 -0
- package/api/social-endpoint-verify.d.ts.map +1 -0
- package/api/social-endpoint-verify.js +152 -0
- package/api/social-endpoint-verify.js.map +1 -0
- package/api/social-posts.d.ts +65 -0
- package/api/social-posts.d.ts.map +1 -0
- package/api/social-posts.js +534 -0
- package/api/social-posts.js.map +1 -0
- package/api/social-router.d.ts +36 -0
- package/api/social-router.d.ts.map +1 -0
- package/api/social-router.js +56 -0
- package/api/social-router.js.map +1 -0
- package/api/social-shares.d.ts +40 -0
- package/api/social-shares.d.ts.map +1 -0
- package/api/social-shares.js +379 -0
- package/api/social-shares.js.map +1 -0
- package/api/social-whitelist.d.ts +41 -0
- package/api/social-whitelist.d.ts.map +1 -0
- package/api/social-whitelist.js +261 -0
- package/api/social-whitelist.js.map +1 -0
- package/api/storefront-orders.d.ts +23 -0
- package/api/storefront-orders.d.ts.map +1 -0
- package/api/storefront-orders.js +349 -0
- package/api/storefront-orders.js.map +1 -0
- package/api/storefront-products.d.ts +21 -0
- package/api/storefront-products.d.ts.map +1 -0
- package/api/storefront-products.js +181 -0
- package/api/storefront-products.js.map +1 -0
- package/api/storefront-router.d.ts +33 -0
- package/api/storefront-router.d.ts.map +1 -0
- package/api/storefront-router.js +47 -0
- package/api/storefront-router.js.map +1 -0
- package/api/storefront-user.d.ts +23 -0
- package/api/storefront-user.d.ts.map +1 -0
- package/api/storefront-user.js +336 -0
- package/api/storefront-user.js.map +1 -0
- package/api/test-db-helper.d.ts +29 -0
- package/api/test-db-helper.d.ts.map +1 -0
- package/api/test-db-helper.js +107 -0
- package/api/test-db-helper.js.map +1 -0
- package/api/traffic.d.ts +22 -0
- package/api/traffic.d.ts.map +1 -0
- package/api/traffic.js +112 -0
- package/api/traffic.js.map +1 -0
- package/api/wc-credentials.d.ts +34 -0
- package/api/wc-credentials.d.ts.map +1 -0
- package/api/wc-credentials.js +296 -0
- package/api/wc-credentials.js.map +1 -0
- package/api/wc-tracker-receiver.d.ts +47 -0
- package/api/wc-tracker-receiver.d.ts.map +1 -0
- package/api/wc-tracker-receiver.js +264 -0
- package/api/wc-tracker-receiver.js.map +1 -0
- package/api/wc-v3.d.ts +40 -0
- package/api/wc-v3.d.ts.map +1 -0
- package/api/wc-v3.js +694 -0
- package/api/wc-v3.js.map +1 -0
- package/bin/tb-doctor.js +32 -0
- package/bin/tb-seller-backend.js +42 -0
- package/check.d.ts +2 -0
- package/check.d.ts.map +1 -0
- package/check.js +19 -0
- package/check.js.map +1 -0
- package/config/export-import.d.ts +108 -0
- package/config/export-import.d.ts.map +1 -0
- package/config/export-import.js +234 -0
- package/config/export-import.js.map +1 -0
- package/config/manager.d.ts +73 -0
- package/config/manager.d.ts.map +1 -0
- package/config/manager.js +246 -0
- package/config/manager.js.map +1 -0
- package/config/profile.d.ts +42 -0
- package/config/profile.d.ts.map +1 -0
- package/config/profile.js +111 -0
- package/config/profile.js.map +1 -0
- package/core/address.js +23 -0
- package/core/advanced-performance.d.ts +149 -0
- package/core/advanced-performance.d.ts.map +1 -0
- package/core/advanced-performance.js +374 -0
- package/core/advanced-performance.js.map +1 -0
- package/core/alerting.d.ts +91 -0
- package/core/alerting.d.ts.map +1 -0
- package/core/alerting.js +379 -0
- package/core/alerting.js.map +1 -0
- package/core/app-store.d.ts +77 -0
- package/core/app-store.d.ts.map +1 -0
- package/core/app-store.js +207 -0
- package/core/app-store.js.map +1 -0
- package/core/boot-env.js +39 -0
- package/core/business-scope-schema.d.ts +60 -0
- package/core/business-scope-schema.d.ts.map +1 -0
- package/core/business-scope-schema.js +165 -0
- package/core/business-scope-schema.js.map +1 -0
- package/core/cache.d.ts +53 -0
- package/core/cache.d.ts.map +1 -0
- package/core/cache.js +130 -0
- package/core/cache.js.map +1 -0
- package/core/chain-listener.d.ts +47 -0
- package/core/chain-listener.d.ts.map +1 -0
- package/core/chain-listener.js +254 -0
- package/core/chain-listener.js.map +1 -0
- package/core/chain-reject.js +107 -0
- package/core/chain-signer.js +258 -0
- package/core/cleanup.d.ts +42 -0
- package/core/cleanup.d.ts.map +1 -0
- package/core/cleanup.js +144 -0
- package/core/cleanup.js.map +1 -0
- package/core/cluster.d.ts +78 -0
- package/core/cluster.d.ts.map +1 -0
- package/core/cluster.js +215 -0
- package/core/cluster.js.map +1 -0
- package/core/community-review.d.ts +82 -0
- package/core/community-review.d.ts.map +1 -0
- package/core/community-review.js +201 -0
- package/core/community-review.js.map +1 -0
- package/core/connection-pool.d.ts +72 -0
- package/core/connection-pool.d.ts.map +1 -0
- package/core/connection-pool.js +173 -0
- package/core/connection-pool.js.map +1 -0
- package/core/consistency.d.ts +130 -0
- package/core/consistency.d.ts.map +1 -0
- package/core/consistency.js +340 -0
- package/core/consistency.js.map +1 -0
- package/core/content-ai.d.ts +303 -0
- package/core/content-ai.d.ts.map +1 -0
- package/core/content-ai.js +344 -0
- package/core/content-ai.js.map +1 -0
- package/core/content-backfill.d.ts +55 -0
- package/core/content-backfill.d.ts.map +1 -0
- package/core/content-backfill.js +174 -0
- package/core/content-backfill.js.map +1 -0
- package/core/conversion-rate-sync.d.ts +97 -0
- package/core/conversion-rate-sync.d.ts.map +1 -0
- package/core/conversion-rate-sync.js +195 -0
- package/core/conversion-rate-sync.js.map +1 -0
- package/core/coverage-backup.d.ts +87 -0
- package/core/coverage-backup.d.ts.map +1 -0
- package/core/coverage-backup.js +265 -0
- package/core/coverage-backup.js.map +1 -0
- package/core/db-installer.d.ts +108 -0
- package/core/db-installer.d.ts.map +1 -0
- package/core/db-installer.js +414 -0
- package/core/db-installer.js.map +1 -0
- package/core/device-analyzer.d.ts +96 -0
- package/core/device-analyzer.d.ts.map +1 -0
- package/core/device-analyzer.js +235 -0
- package/core/device-analyzer.js.map +1 -0
- package/core/discovery.d.ts +165 -0
- package/core/discovery.d.ts.map +1 -0
- package/core/discovery.js +363 -0
- package/core/discovery.js.map +1 -0
- package/core/distributed.d.ts +172 -0
- package/core/distributed.d.ts.map +1 -0
- package/core/distributed.js +422 -0
- package/core/distributed.js.map +1 -0
- package/core/doctor.js +249 -0
- package/core/enforcement.d.ts +57 -0
- package/core/enforcement.d.ts.map +1 -0
- package/core/enforcement.js +115 -0
- package/core/enforcement.js.map +1 -0
- package/core/error-handler.d.ts +131 -0
- package/core/error-handler.d.ts.map +1 -0
- package/core/error-handler.js +291 -0
- package/core/error-handler.js.map +1 -0
- package/core/federated-learning.d.ts +124 -0
- package/core/federated-learning.d.ts.map +1 -0
- package/core/federated-learning.js +338 -0
- package/core/federated-learning.js.map +1 -0
- package/core/fingerprint.d.ts +95 -0
- package/core/fingerprint.d.ts.map +1 -0
- package/core/fingerprint.js +313 -0
- package/core/fingerprint.js.map +1 -0
- package/core/geoip.d.ts +67 -0
- package/core/geoip.d.ts.map +1 -0
- package/core/geoip.js +174 -0
- package/core/geoip.js.map +1 -0
- package/core/gossip.d.ts +141 -0
- package/core/gossip.d.ts.map +1 -0
- package/core/gossip.js +372 -0
- package/core/gossip.js.map +1 -0
- package/core/governance.d.ts +147 -0
- package/core/governance.d.ts.map +1 -0
- package/core/governance.js +351 -0
- package/core/governance.js.map +1 -0
- package/core/indexer-enhancements.d.ts +164 -0
- package/core/indexer-enhancements.d.ts.map +1 -0
- package/core/indexer-enhancements.js +429 -0
- package/core/indexer-enhancements.js.map +1 -0
- package/core/intrusion-detection.d.ts +79 -0
- package/core/intrusion-detection.d.ts.map +1 -0
- package/core/intrusion-detection.js +322 -0
- package/core/intrusion-detection.js.map +1 -0
- package/core/lifecycle.d.ts +118 -0
- package/core/lifecycle.d.ts.map +1 -0
- package/core/lifecycle.js +310 -0
- package/core/lifecycle.js.map +1 -0
- package/core/location.d.ts +99 -0
- package/core/location.d.ts.map +1 -0
- package/core/location.js +219 -0
- package/core/location.js.map +1 -0
- package/core/maxmind-integration.d.ts +68 -0
- package/core/maxmind-integration.d.ts.map +1 -0
- package/core/maxmind-integration.js +245 -0
- package/core/maxmind-integration.js.map +1 -0
- package/core/migration.d.ts +58 -0
- package/core/migration.d.ts.map +1 -0
- package/core/migration.js +223 -0
- package/core/migration.js.map +1 -0
- package/core/monitoring.d.ts +153 -0
- package/core/monitoring.d.ts.map +1 -0
- package/core/monitoring.js +406 -0
- package/core/monitoring.js.map +1 -0
- package/core/offsite-backup.d.ts +71 -0
- package/core/offsite-backup.d.ts.map +1 -0
- package/core/offsite-backup.js +341 -0
- package/core/offsite-backup.js.map +1 -0
- package/core/order-intent-store.js +83 -0
- package/core/order-intent.js +273 -0
- package/core/paths.js +116 -0
- package/core/performance.d.ts +173 -0
- package/core/performance.d.ts.map +1 -0
- package/core/performance.js +386 -0
- package/core/performance.js.map +1 -0
- package/core/product-flag.d.ts +364 -0
- package/core/product-flag.d.ts.map +1 -0
- package/core/product-flag.js +465 -0
- package/core/product-flag.js.map +1 -0
- package/core/protection.d.ts +139 -0
- package/core/protection.d.ts.map +1 -0
- package/core/protection.js +327 -0
- package/core/protection.js.map +1 -0
- package/core/region-adapter.d.ts +152 -0
- package/core/region-adapter.d.ts.map +1 -0
- package/core/region-adapter.js +505 -0
- package/core/region-adapter.js.map +1 -0
- package/core/region-configs.d.ts +12 -0
- package/core/region-configs.d.ts.map +1 -0
- package/core/region-configs.js +907 -0
- package/core/region-configs.js.map +1 -0
- package/core/review-antifraud.d.ts +80 -0
- package/core/review-antifraud.d.ts.map +1 -0
- package/core/review-antifraud.js +193 -0
- package/core/review-antifraud.js.map +1 -0
- package/core/rules-updater.d.ts +89 -0
- package/core/rules-updater.d.ts.map +1 -0
- package/core/rules-updater.js +261 -0
- package/core/rules-updater.js.map +1 -0
- package/core/runtime-data.js +203 -0
- package/core/security.d.ts +144 -0
- package/core/security.d.ts.map +1 -0
- package/core/security.js +390 -0
- package/core/security.js.map +1 -0
- package/core/seller-identity.js +78 -0
- package/core/session-manager.d.ts +93 -0
- package/core/session-manager.d.ts.map +1 -0
- package/core/session-manager.js +262 -0
- package/core/session-manager.js.map +1 -0
- package/core/state-sync.d.ts +121 -0
- package/core/state-sync.d.ts.map +1 -0
- package/core/state-sync.js +287 -0
- package/core/state-sync.js.map +1 -0
- package/core/testing.d.ts +97 -0
- package/core/testing.d.ts.map +1 -0
- package/core/testing.js +361 -0
- package/core/testing.js.map +1 -0
- package/core/trust-score.d.ts +51 -0
- package/core/trust-score.d.ts.map +1 -0
- package/core/trust-score.js +188 -0
- package/core/trust-score.js.map +1 -0
- package/core/trustworthiness.d.ts +140 -0
- package/core/trustworthiness.d.ts.map +1 -0
- package/core/trustworthiness.js +375 -0
- package/core/trustworthiness.js.map +1 -0
- package/core/types.d.ts +258 -0
- package/core/types.d.ts.map +1 -0
- package/core/types.js +9 -0
- package/core/types.js.map +1 -0
- package/core/upgrade-manager.d.ts +114 -0
- package/core/upgrade-manager.d.ts.map +1 -0
- package/core/upgrade-manager.js +264 -0
- package/core/upgrade-manager.js.map +1 -0
- package/core/upgrader.d.ts +107 -0
- package/core/upgrader.d.ts.map +1 -0
- package/core/upgrader.js +389 -0
- package/core/upgrader.js.map +1 -0
- package/core/websocket.d.ts +78 -0
- package/core/websocket.d.ts.map +1 -0
- package/core/websocket.js +292 -0
- package/core/websocket.js.map +1 -0
- package/council/hidden-weight.d.ts +45 -0
- package/council/hidden-weight.d.ts.map +1 -0
- package/council/hidden-weight.js +135 -0
- package/council/hidden-weight.js.map +1 -0
- package/db/email-migrations.sql +31 -0
- package/db/oauth-migrate.d.ts +39 -0
- package/db/oauth-migrate.d.ts.map +1 -0
- package/db/oauth-migrate.js +201 -0
- package/db/oauth-migrate.js.map +1 -0
- package/db/oauth-migrations.sql +92 -0
- package/db/social-migrate.d.ts +12 -0
- package/db/social-migrate.d.ts.map +1 -0
- package/db/social-migrate.js +102 -0
- package/db/social-migrate.js.map +1 -0
- package/db/social-migrations.sql +94 -0
- package/db/store-migrate.d.ts +33 -0
- package/db/store-migrate.d.ts.map +1 -0
- package/db/store-migrate.js +149 -0
- package/db/store-migrate.js.map +1 -0
- package/db/store-migrations.sql +242 -0
- package/debug.d.ts +2 -0
- package/debug.d.ts.map +1 -0
- package/debug.js +18 -0
- package/debug.js.map +1 -0
- package/event-listener.d.ts +93 -0
- package/event-listener.d.ts.map +1 -0
- package/event-listener.js +321 -0
- package/event-listener.js.map +1 -0
- package/event-whitelist.d.ts +79 -0
- package/event-whitelist.d.ts.map +1 -0
- package/event-whitelist.js +533 -0
- package/event-whitelist.js.map +1 -0
- package/index.d.ts +45 -0
- package/index.d.ts.map +1 -0
- package/index.js +361 -0
- package/index.js.map +1 -0
- package/init-node.d.ts +9 -0
- package/init-node.d.ts.map +1 -0
- package/init-node.js +230 -0
- package/init-node.js.map +1 -0
- package/mcp/ai-tools.d.ts +2 -0
- package/mcp/ai-tools.d.ts.map +1 -0
- package/mcp/ai-tools.js +266 -0
- package/mcp/ai-tools.js.map +1 -0
- package/mcp/auto-dispatch-tools.d.ts +2 -0
- package/mcp/auto-dispatch-tools.d.ts.map +1 -0
- package/mcp/auto-dispatch-tools.js +348 -0
- package/mcp/auto-dispatch-tools.js.map +1 -0
- package/mcp/business-scope-tools.d.ts +11 -0
- package/mcp/business-scope-tools.d.ts.map +1 -0
- package/mcp/business-scope-tools.js +179 -0
- package/mcp/business-scope-tools.js.map +1 -0
- package/mcp/buyer-tools.d.ts +67 -0
- package/mcp/buyer-tools.d.ts.map +1 -0
- package/mcp/buyer-tools.js +445 -0
- package/mcp/buyer-tools.js.map +1 -0
- package/mcp/interfaces.d.ts +1058 -0
- package/mcp/interfaces.d.ts.map +1 -0
- package/mcp/interfaces.js +13 -0
- package/mcp/interfaces.js.map +1 -0
- package/mcp/m2m-chat-tool.d.ts +50 -0
- package/mcp/m2m-chat-tool.d.ts.map +1 -0
- package/mcp/m2m-chat-tool.js +432 -0
- package/mcp/m2m-chat-tool.js.map +1 -0
- package/mcp/migrations.d.ts +30 -0
- package/mcp/migrations.d.ts.map +1 -0
- package/mcp/migrations.js +391 -0
- package/mcp/migrations.js.map +1 -0
- package/mcp/peer-tools.d.ts +163 -0
- package/mcp/peer-tools.d.ts.map +1 -0
- package/mcp/peer-tools.js +532 -0
- package/mcp/peer-tools.js.map +1 -0
- package/mcp/plugin-management-tools.d.ts +2 -0
- package/mcp/plugin-management-tools.d.ts.map +1 -0
- package/mcp/plugin-management-tools.js +327 -0
- package/mcp/plugin-management-tools.js.map +1 -0
- package/mcp/product-type-tools.d.ts +2 -0
- package/mcp/product-type-tools.d.ts.map +1 -0
- package/mcp/product-type-tools.js +470 -0
- package/mcp/product-type-tools.js.map +1 -0
- package/mcp/security-tools.d.ts +2 -0
- package/mcp/security-tools.d.ts.map +1 -0
- package/mcp/security-tools.js +313 -0
- package/mcp/security-tools.js.map +1 -0
- package/mcp/seller-query-tools.d.ts +2 -0
- package/mcp/seller-query-tools.d.ts.map +1 -0
- package/mcp/seller-query-tools.js +179 -0
- package/mcp/seller-query-tools.js.map +1 -0
- package/mcp/server.d.ts +11 -0
- package/mcp/server.d.ts.map +1 -0
- package/mcp/server.js +68 -0
- package/mcp/server.js.map +1 -0
- package/mcp/standalone-server.d.ts +34 -0
- package/mcp/standalone-server.d.ts.map +1 -0
- package/mcp/standalone-server.js +261 -0
- package/mcp/standalone-server.js.map +1 -0
- package/mcp/tools-integration.d.ts +31 -0
- package/mcp/tools-integration.d.ts.map +1 -0
- package/mcp/tools-integration.js +288 -0
- package/mcp/tools-integration.js.map +1 -0
- package/mcp/web-panel.d.ts +18 -0
- package/mcp/web-panel.d.ts.map +1 -0
- package/mcp/web-panel.js +1657 -0
- package/mcp/web-panel.js.map +1 -0
- package/middleware/api-key-auth.d.ts +64 -0
- package/middleware/api-key-auth.d.ts.map +1 -0
- package/middleware/api-key-auth.js +255 -0
- package/middleware/api-key-auth.js.map +1 -0
- package/middleware/scope-auth.d.ts +54 -0
- package/middleware/scope-auth.d.ts.map +1 -0
- package/middleware/scope-auth.js +153 -0
- package/middleware/scope-auth.js.map +1 -0
- package/middleware/security.d.ts +48 -0
- package/middleware/security.d.ts.map +1 -0
- package/middleware/security.js +217 -0
- package/middleware/security.js.map +1 -0
- package/middleware/wallet-auth.d.ts +54 -0
- package/middleware/wallet-auth.d.ts.map +1 -0
- package/middleware/wallet-auth.js +158 -0
- package/middleware/wallet-auth.js.map +1 -0
- package/oauth/chain-revocation-sink.d.ts +24 -0
- package/oauth/chain-revocation-sink.d.ts.map +1 -0
- package/oauth/chain-revocation-sink.js +47 -0
- package/oauth/chain-revocation-sink.js.map +1 -0
- package/oauth/gossip-sync.d.ts +25 -0
- package/oauth/gossip-sync.d.ts.map +1 -0
- package/oauth/gossip-sync.js +62 -0
- package/oauth/gossip-sync.js.map +1 -0
- package/oauth/issuer-keys.d.ts +31 -0
- package/oauth/issuer-keys.d.ts.map +1 -0
- package/oauth/issuer-keys.js +117 -0
- package/oauth/issuer-keys.js.map +1 -0
- package/oauth/peer-resolver.d.ts +25 -0
- package/oauth/peer-resolver.d.ts.map +1 -0
- package/oauth/peer-resolver.js +81 -0
- package/oauth/peer-resolver.js.map +1 -0
- package/oauth/revocation-store.d.ts +58 -0
- package/oauth/revocation-store.d.ts.map +1 -0
- package/oauth/revocation-store.js +86 -0
- package/oauth/revocation-store.js.map +1 -0
- package/oauth/token-v2.d.ts +101 -0
- package/oauth/token-v2.d.ts.map +1 -0
- package/oauth/token-v2.js +167 -0
- package/oauth/token-v2.js.map +1 -0
- package/oracle/c5-glue.js +603 -0
- package/oracle/ops-console.js +623 -0
- package/oracle/oracle-sync.d.ts +29 -0
- package/oracle/oracle-sync.d.ts.map +1 -0
- package/oracle/oracle-sync.js +445 -0
- package/oracle/oracle-sync.js.map +1 -0
- package/oracle/registry.d.ts +30 -0
- package/oracle/registry.d.ts.map +1 -0
- package/oracle/registry.js +62 -0
- package/oracle/registry.js.map +1 -0
- package/p2p/availability.d.ts +188 -0
- package/p2p/availability.d.ts.map +1 -0
- package/p2p/availability.js +574 -0
- package/p2p/availability.js.map +1 -0
- package/p2p/bootstrap.d.ts +42 -0
- package/p2p/bootstrap.d.ts.map +1 -0
- package/p2p/bootstrap.js +146 -0
- package/p2p/bootstrap.js.map +1 -0
- package/p2p/buyer-client.d.ts +98 -0
- package/p2p/buyer-client.d.ts.map +1 -0
- package/p2p/buyer-client.js +199 -0
- package/p2p/buyer-client.js.map +1 -0
- package/p2p/cdn-ddns.d.ts +208 -0
- package/p2p/cdn-ddns.d.ts.map +1 -0
- package/p2p/cdn-ddns.js +500 -0
- package/p2p/cdn-ddns.js.map +1 -0
- package/p2p/cluster-sync.d.ts +115 -0
- package/p2p/cluster-sync.d.ts.map +1 -0
- package/p2p/cluster-sync.js +330 -0
- package/p2p/cluster-sync.js.map +1 -0
- package/p2p/consistency-check.d.ts +30 -0
- package/p2p/consistency-check.d.ts.map +1 -0
- package/p2p/consistency-check.js +168 -0
- package/p2p/consistency-check.js.map +1 -0
- package/p2p/endpoint-registry.d.ts +41 -0
- package/p2p/endpoint-registry.d.ts.map +1 -0
- package/p2p/endpoint-registry.js +128 -0
- package/p2p/endpoint-registry.js.map +1 -0
- package/p2p/ipv6.d.ts +120 -0
- package/p2p/ipv6.d.ts.map +1 -0
- package/p2p/ipv6.js +425 -0
- package/p2p/ipv6.js.map +1 -0
- package/p2p/protocol.d.ts +100 -0
- package/p2p/protocol.d.ts.map +1 -0
- package/p2p/protocol.js +330 -0
- package/p2p/protocol.js.map +1 -0
- package/p2p/reliability.d.ts +56 -0
- package/p2p/reliability.d.ts.map +1 -0
- package/p2p/reliability.js +240 -0
- package/p2p/reliability.js.map +1 -0
- package/p2p/seller-service.d.ts +53 -0
- package/p2p/seller-service.d.ts.map +1 -0
- package/p2p/seller-service.js +276 -0
- package/p2p/seller-service.js.map +1 -0
- package/p2p/signing.d.ts +31 -0
- package/p2p/signing.d.ts.map +1 -0
- package/p2p/signing.js +95 -0
- package/p2p/signing.js.map +1 -0
- package/package.json +73 -0
- package/payment/api.d.ts +9 -0
- package/payment/api.d.ts.map +1 -0
- package/payment/api.js +141 -0
- package/payment/api.js.map +1 -0
- package/payment/gateway.d.ts +114 -0
- package/payment/gateway.d.ts.map +1 -0
- package/payment/gateway.js +231 -0
- package/payment/gateway.js.map +1 -0
- package/payments/alipay/index.d.ts +18 -0
- package/payments/alipay/index.d.ts.map +1 -0
- package/payments/alipay/index.js +55 -0
- package/payments/alipay/index.js.map +1 -0
- package/payments/base.d.ts +13 -0
- package/payments/base.d.ts.map +1 -0
- package/payments/base.js +28 -0
- package/payments/base.js.map +1 -0
- package/payments/index.d.ts +18 -0
- package/payments/index.d.ts.map +1 -0
- package/payments/index.js +66 -0
- package/payments/index.js.map +1 -0
- package/payments/template/index.d.ts +18 -0
- package/payments/template/index.d.ts.map +1 -0
- package/payments/template/index.js +57 -0
- package/payments/template/index.js.map +1 -0
- package/payments/types.d.ts +42 -0
- package/payments/types.d.ts.map +1 -0
- package/payments/types.js +3 -0
- package/payments/types.js.map +1 -0
- package/payments/wechat/index.d.ts +18 -0
- package/payments/wechat/index.d.ts.map +1 -0
- package/payments/wechat/index.js +54 -0
- package/payments/wechat/index.js.map +1 -0
- package/peer/chain-signer.d.ts +74 -0
- package/peer/chain-signer.d.ts.map +1 -0
- package/peer/chain-signer.js +149 -0
- package/peer/chain-signer.js.map +1 -0
- package/peer/config.d.ts +71 -0
- package/peer/config.d.ts.map +1 -0
- package/peer/config.js +61 -0
- package/peer/config.js.map +1 -0
- package/peer/index.d.ts +12 -0
- package/peer/index.d.ts.map +1 -0
- package/peer/index.js +46 -0
- package/peer/index.js.map +1 -0
- package/peer/key-store.d.ts +66 -0
- package/peer/key-store.d.ts.map +1 -0
- package/peer/key-store.js +163 -0
- package/peer/key-store.js.map +1 -0
- package/peer/proto-codec.d.ts +103 -0
- package/peer/proto-codec.d.ts.map +1 -0
- package/peer/proto-codec.js +423 -0
- package/peer/proto-codec.js.map +1 -0
- package/peer/registrar.d.ts +88 -0
- package/peer/registrar.d.ts.map +1 -0
- package/peer/registrar.js +271 -0
- package/peer/registrar.js.map +1 -0
- package/peer/registry.d.ts +31 -0
- package/peer/registry.d.ts.map +1 -0
- package/peer/registry.js +143 -0
- package/peer/registry.js.map +1 -0
- package/plugins/auth.d.ts +193 -0
- package/plugins/auth.d.ts.map +1 -0
- package/plugins/auth.js +923 -0
- package/plugins/auth.js.map +1 -0
- package/plugins/manager.d.ts +37 -0
- package/plugins/manager.d.ts.map +1 -0
- package/plugins/manager.js +83 -0
- package/plugins/manager.js.map +1 -0
- package/plugins/oauth.d.ts +249 -0
- package/plugins/oauth.d.ts.map +1 -0
- package/plugins/oauth.js +979 -0
- package/plugins/oauth.js.map +1 -0
- package/plugins/p2p-message.d.ts +133 -0
- package/plugins/p2p-message.d.ts.map +1 -0
- package/plugins/p2p-message.js +443 -0
- package/plugins/p2p-message.js.map +1 -0
- package/plugins/postgresql.d.ts +54 -0
- package/plugins/postgresql.d.ts.map +1 -0
- package/plugins/postgresql.js +743 -0
- package/plugins/postgresql.js.map +1 -0
- package/plugins/relationship.d.ts +141 -0
- package/plugins/relationship.d.ts.map +1 -0
- package/plugins/relationship.js +395 -0
- package/plugins/relationship.js.map +1 -0
- package/plugins/sqlite.d.ts +200 -0
- package/plugins/sqlite.d.ts.map +1 -0
- package/plugins/sqlite.js +2412 -0
- package/plugins/sqlite.js.map +1 -0
- package/port-manager/disguise/ssh.d.ts +19 -0
- package/port-manager/disguise/ssh.d.ts.map +1 -0
- package/port-manager/disguise/ssh.js +104 -0
- package/port-manager/disguise/ssh.js.map +1 -0
- package/port-manager/port-manager.d.ts +65 -0
- package/port-manager/port-manager.d.ts.map +1 -0
- package/port-manager/port-manager.js +164 -0
- package/port-manager/port-manager.js.map +1 -0
- package/port-manager/port-scanner.d.ts +22 -0
- package/port-manager/port-scanner.d.ts.map +1 -0
- package/port-manager/port-scanner.js +187 -0
- package/port-manager/port-scanner.js.map +1 -0
- package/port-manager/types.d.ts +51 -0
- package/port-manager/types.d.ts.map +1 -0
- package/port-manager/types.js +6 -0
- package/port-manager/types.js.map +1 -0
- package/proto/amino/amino.proto +84 -0
- package/proto/cosmos/base/v1beta1/coin.proto +61 -0
- package/proto/cosmos/msg/v1/msg.proto +30 -0
- package/proto/cosmos_proto/cosmos.proto +112 -0
- package/proto/gogoproto/gogo.proto +145 -0
- package/proto/google/protobuf/descriptor.proto +1218 -0
- package/proto/trustchain/economy/v1/params.proto +133 -0
- package/proto/trustchain/economy/v1/tx.proto +162 -0
- package/proto/trustchain/marketplace/v1/params.proto +64 -0
- package/proto/trustchain/marketplace/v1/product.proto +21 -0
- package/proto/trustchain/marketplace/v1/tx.proto +131 -0
- package/proto/trustchain/order/v1/params.proto +94 -0
- package/proto/trustchain/order/v1/tx.proto +156 -0
- package/proto/trustchain/serviceprovider/v1/paymentfact.proto +32 -0
- package/proto/trustchain/serviceprovider/v1/serviceprovider.proto +38 -0
- package/proto/trustchain/serviceprovider/v1/tx.proto +106 -0
- package/proto/trustchain/subchain/v1/params.proto +26 -0
- package/proto/trustchain/subchain/v1/pool.proto +53 -0
- package/proto/trustchain/subchain/v1/tx.proto +159 -0
- package/proto/trustchain/trustcoin/v1/business_scope.proto +126 -0
- package/proto/trustchain/trustcoin/v1/genesis.proto +33 -0
- package/proto/trustchain/trustcoin/v1/params.proto +86 -0
- package/proto/trustchain/trustcoin/v1/query.proto +95 -0
- package/proto/trustchain/trustcoin/v1/tx.proto +160 -0
- package/proto/trustchain/verification/v1/params.proto +46 -0
- package/proto/trustchain/verification/v1/tx.proto +126 -0
- package/proto/trustchain/verification/v1/verification.proto +105 -0
- package/relationship-chain-api.d.ts +13 -0
- package/relationship-chain-api.d.ts.map +1 -0
- package/relationship-chain-api.js +139 -0
- package/relationship-chain-api.js.map +1 -0
- package/relationship-chain.d.ts +90 -0
- package/relationship-chain.d.ts.map +1 -0
- package/relationship-chain.js +201 -0
- package/relationship-chain.js.map +1 -0
- package/routes/agent-pay.js +419 -0
- package/routes/agent-serviceprovider.js +183 -0
- package/routes/ai.d.ts +54 -0
- package/routes/ai.d.ts.map +1 -0
- package/routes/ai.js +293 -0
- package/routes/ai.js.map +1 -0
- package/routes/api-keys.d.ts +12 -0
- package/routes/api-keys.d.ts.map +1 -0
- package/routes/api-keys.js +163 -0
- package/routes/api-keys.js.map +1 -0
- package/routes/app-store.d.ts +12 -0
- package/routes/app-store.d.ts.map +1 -0
- package/routes/app-store.js +207 -0
- package/routes/app-store.js.map +1 -0
- package/routes/auth-management.d.ts +17 -0
- package/routes/auth-management.d.ts.map +1 -0
- package/routes/auth-management.js +257 -0
- package/routes/auth-management.js.map +1 -0
- package/routes/auth.d.ts +9 -0
- package/routes/auth.d.ts.map +1 -0
- package/routes/auth.js +846 -0
- package/routes/auth.js.map +1 -0
- package/routes/brand.d.ts +3 -0
- package/routes/brand.d.ts.map +1 -0
- package/routes/brand.js +109 -0
- package/routes/brand.js.map +1 -0
- package/routes/chain-registry.d.ts +11 -0
- package/routes/chain-registry.d.ts.map +1 -0
- package/routes/chain-registry.js +51 -0
- package/routes/chain-registry.js.map +1 -0
- package/routes/chain-writes-insurance.d.ts +17 -0
- package/routes/chain-writes-insurance.d.ts.map +1 -0
- package/routes/chain-writes-insurance.js +69 -0
- package/routes/chain-writes-insurance.js.map +1 -0
- package/routes/chain-writes-pledge.d.ts +34 -0
- package/routes/chain-writes-pledge.d.ts.map +1 -0
- package/routes/chain-writes-pledge.js +206 -0
- package/routes/chain-writes-pledge.js.map +1 -0
- package/routes/chain-writes-products.d.ts +66 -0
- package/routes/chain-writes-products.d.ts.map +1 -0
- package/routes/chain-writes-products.js +394 -0
- package/routes/chain-writes-products.js.map +1 -0
- package/routes/chain-writes.d.ts +78 -0
- package/routes/chain-writes.d.ts.map +1 -0
- package/routes/chain-writes.js +658 -0
- package/routes/chain-writes.js.map +1 -0
- package/routes/chain.d.ts +10 -0
- package/routes/chain.d.ts.map +1 -0
- package/routes/chain.js +45 -0
- package/routes/chain.js.map +1 -0
- package/routes/compliance.d.ts +3 -0
- package/routes/compliance.d.ts.map +1 -0
- package/routes/compliance.js +53 -0
- package/routes/compliance.js.map +1 -0
- package/routes/council.d.ts +3 -0
- package/routes/council.d.ts.map +1 -0
- package/routes/council.js +477 -0
- package/routes/council.js.map +1 -0
- package/routes/crosschain.d.ts +11 -0
- package/routes/crosschain.d.ts.map +1 -0
- package/routes/crosschain.js +39 -0
- package/routes/crosschain.js.map +1 -0
- package/routes/device.d.ts +3 -0
- package/routes/device.d.ts.map +1 -0
- package/routes/device.js +73 -0
- package/routes/device.js.map +1 -0
- package/routes/devreward.d.ts +54 -0
- package/routes/devreward.d.ts.map +1 -0
- package/routes/devreward.js +129 -0
- package/routes/devreward.js.map +1 -0
- package/routes/economy.d.ts +50 -0
- package/routes/economy.d.ts.map +1 -0
- package/routes/economy.js +273 -0
- package/routes/economy.js.map +1 -0
- package/routes/flowback.d.ts +32 -0
- package/routes/flowback.d.ts.map +1 -0
- package/routes/flowback.js +97 -0
- package/routes/flowback.js.map +1 -0
- package/routes/insurance.d.ts +10 -0
- package/routes/insurance.d.ts.map +1 -0
- package/routes/insurance.js +70 -0
- package/routes/insurance.js.map +1 -0
- package/routes/m2m-viewer.js +195 -0
- package/routes/m2m.d.ts +10 -0
- package/routes/m2m.d.ts.map +1 -0
- package/routes/m2m.js +31 -0
- package/routes/m2m.js.map +1 -0
- package/routes/marketplace.d.ts +15 -0
- package/routes/marketplace.d.ts.map +1 -0
- package/routes/marketplace.js +396 -0
- package/routes/marketplace.js.map +1 -0
- package/routes/node-config.d.ts +6 -0
- package/routes/node-config.d.ts.map +1 -0
- package/routes/node-config.js +500 -0
- package/routes/node-config.js.map +1 -0
- package/routes/oauth-revocation.d.ts +42 -0
- package/routes/oauth-revocation.d.ts.map +1 -0
- package/routes/oauth-revocation.js +99 -0
- package/routes/oauth-revocation.js.map +1 -0
- package/routes/oauth.d.ts +17 -0
- package/routes/oauth.d.ts.map +1 -0
- package/routes/oauth.js +700 -0
- package/routes/oauth.js.map +1 -0
- package/routes/onboard.html +352 -0
- package/routes/onboard.js +435 -0
- package/routes/order.d.ts +8 -0
- package/routes/order.d.ts.map +1 -0
- package/routes/order.js +607 -0
- package/routes/order.js.map +1 -0
- package/routes/p2p-api.d.ts +33 -0
- package/routes/p2p-api.d.ts.map +1 -0
- package/routes/p2p-api.js +274 -0
- package/routes/p2p-api.js.map +1 -0
- package/routes/p2p-message.d.ts +20 -0
- package/routes/p2p-message.d.ts.map +1 -0
- package/routes/p2p-message.js +237 -0
- package/routes/p2p-message.js.map +1 -0
- package/routes/peer.d.ts +22 -0
- package/routes/peer.d.ts.map +1 -0
- package/routes/peer.js +220 -0
- package/routes/peer.js.map +1 -0
- package/routes/plugins.d.ts +4 -0
- package/routes/plugins.d.ts.map +1 -0
- package/routes/plugins.js +138 -0
- package/routes/plugins.js.map +1 -0
- package/routes/port-manager.d.ts +6 -0
- package/routes/port-manager.d.ts.map +1 -0
- package/routes/port-manager.js +212 -0
- package/routes/port-manager.js.map +1 -0
- package/routes/relationship.d.ts +7 -0
- package/routes/relationship.d.ts.map +1 -0
- package/routes/relationship.js +314 -0
- package/routes/relationship.js.map +1 -0
- package/routes/relay.d.ts +3 -0
- package/routes/relay.d.ts.map +1 -0
- package/routes/relay.js +182 -0
- package/routes/relay.js.map +1 -0
- package/routes/reputation.d.ts +10 -0
- package/routes/reputation.d.ts.map +1 -0
- package/routes/reputation.js +141 -0
- package/routes/reputation.js.map +1 -0
- package/routes/reward.d.ts +3 -0
- package/routes/reward.d.ts.map +1 -0
- package/routes/reward.js +130 -0
- package/routes/reward.js.map +1 -0
- package/routes/security-monitoring.d.ts +12 -0
- package/routes/security-monitoring.d.ts.map +1 -0
- package/routes/security-monitoring.js +373 -0
- package/routes/security-monitoring.js.map +1 -0
- package/routes/shop.d.ts +8 -0
- package/routes/shop.d.ts.map +1 -0
- package/routes/shop.js +164 -0
- package/routes/shop.js.map +1 -0
- package/routes/social.d.ts +22 -0
- package/routes/social.d.ts.map +1 -0
- package/routes/social.js +95 -0
- package/routes/social.js.map +1 -0
- package/routes/subchain.d.ts +18 -0
- package/routes/subchain.d.ts.map +1 -0
- package/routes/subchain.js +106 -0
- package/routes/subchain.js.map +1 -0
- package/routes/trustcoin.d.ts +17 -0
- package/routes/trustcoin.d.ts.map +1 -0
- package/routes/trustcoin.js +149 -0
- package/routes/trustcoin.js.map +1 -0
- package/routes/twofa.d.ts +7 -0
- package/routes/twofa.d.ts.map +1 -0
- package/routes/twofa.js +105 -0
- package/routes/twofa.js.map +1 -0
- package/routes/verification.d.ts +8 -0
- package/routes/verification.d.ts.map +1 -0
- package/routes/verification.js +234 -0
- package/routes/verification.js.map +1 -0
- package/routes/wallet.d.ts +4 -0
- package/routes/wallet.d.ts.map +1 -0
- package/routes/wallet.js +770 -0
- package/routes/wallet.js.map +1 -0
- package/run-auth.d.ts +8 -0
- package/run-auth.d.ts.map +1 -0
- package/run-auth.js +82 -0
- package/run-auth.js.map +1 -0
- package/run-p2p-message.d.ts +8 -0
- package/run-p2p-message.d.ts.map +1 -0
- package/run-p2p-message.js +82 -0
- package/run-p2p-message.js.map +1 -0
- package/run-relationship.d.ts +12 -0
- package/run-relationship.d.ts.map +1 -0
- package/run-relationship.js +182 -0
- package/run-relationship.js.map +1 -0
- package/run-unified.d.ts +13 -0
- package/run-unified.d.ts.map +1 -0
- package/run-unified.js +1067 -0
- package/run-unified.js.map +1 -0
- package/run.d.ts +12 -0
- package/run.d.ts.map +1 -0
- package/run.js +889 -0
- package/run.js.map +1 -0
- package/search/ranking.d.ts +55 -0
- package/search/ranking.d.ts.map +1 -0
- package/search/ranking.js +67 -0
- package/search/ranking.js.map +1 -0
- package/shipping/base.d.ts +15 -0
- package/shipping/base.d.ts.map +1 -0
- package/shipping/base.js +39 -0
- package/shipping/base.js.map +1 -0
- package/shipping/index.d.ts +19 -0
- package/shipping/index.d.ts.map +1 -0
- package/shipping/index.js +72 -0
- package/shipping/index.js.map +1 -0
- package/shipping/sf-express/index.d.ts +23 -0
- package/shipping/sf-express/index.d.ts.map +1 -0
- package/shipping/sf-express/index.js +71 -0
- package/shipping/sf-express/index.js.map +1 -0
- package/shipping/template/index.d.ts +20 -0
- package/shipping/template/index.d.ts.map +1 -0
- package/shipping/template/index.js +74 -0
- package/shipping/template/index.js.map +1 -0
- package/shipping/types.d.ts +71 -0
- package/shipping/types.d.ts.map +1 -0
- package/shipping/types.js +6 -0
- package/shipping/types.js.map +1 -0
- package/shipping/virtual/index.d.ts +19 -0
- package/shipping/virtual/index.d.ts.map +1 -0
- package/shipping/virtual/index.js +54 -0
- package/shipping/virtual/index.js.map +1 -0
- package/shipping/yto/index.d.ts +18 -0
- package/shipping/yto/index.d.ts.map +1 -0
- package/shipping/yto/index.js +59 -0
- package/shipping/yto/index.js.map +1 -0
- package/shipping/zto/index.d.ts +18 -0
- package/shipping/zto/index.d.ts.map +1 -0
- package/shipping/zto/index.js +59 -0
- package/shipping/zto/index.js.map +1 -0
- package/skills-lock.json +11 -0
- package/src/db/email-migrations.sql +31 -0
- package/src/db/oauth-migrations.sql +92 -0
- package/src/db/social-migrations.sql +94 -0
- package/src/db/store-migrations.sql +242 -0
- package/test-api-key-revoke.js +167 -0
- package/test-auth-register-ratelimit.js +132 -0
- package/test-auth-tv2.d.ts +2 -0
- package/test-auth-tv2.d.ts.map +1 -0
- package/test-auth-tv2.js +174 -0
- package/test-auth-tv2.js.map +1 -0
- package/test-canonsign-cross.d.ts +2 -0
- package/test-canonsign-cross.d.ts.map +1 -0
- package/test-canonsign-cross.js +32 -0
- package/test-canonsign-cross.js.map +1 -0
- package/test-chain-signer.js +127 -0
- package/test-env-truthy.js +50 -0
- package/test-onboard-contract.js +94 -0
- package/test-ops-console-boundary.js +147 -0
- package/test-oracle-glue.js +232 -0
- package/test-order-create-v394.js +358 -0
- package/test-order-intent.js +245 -0
- package/test-order-lifecycle-v394.js +528 -0
- package/test-p2p-message.d.ts +13 -0
- package/test-p2p-message.d.ts.map +1 -0
- package/test-p2p-message.js +106 -0
- package/test-p2p-message.js.map +1 -0
- package/test-relationship-chain.d.ts +13 -0
- package/test-relationship-chain.d.ts.map +1 -0
- package/test-relationship-chain.js +103 -0
- package/test-relationship-chain.js.map +1 -0
- package/test-runtime-data-path.js +217 -0
- package/test-seller-identity.js +74 -0
- package/test-signing-paths.js +104 -0
- package/test-token-v2.d.ts +2 -0
- package/test-token-v2.d.ts.map +1 -0
- package/test-token-v2.js +172 -0
- package/test-token-v2.js.map +1 -0
- package/test-wallet-auth-nonce.d.ts +12 -0
- package/test-wallet-auth-nonce.d.ts.map +1 -0
- package/test-wallet-auth-nonce.js +126 -0
- package/test-wallet-auth-nonce.js.map +1 -0
- package/test-wallet-submatch.d.ts +13 -0
- package/test-wallet-submatch.d.ts.map +1 -0
- package/test-wallet-submatch.js +86 -0
- package/test-wallet-submatch.js.map +1 -0
- package/tls/self-signed.d.ts +12 -0
- package/tls/self-signed.d.ts.map +1 -0
- package/tls/self-signed.js +63 -0
- package/tls/self-signed.js.map +1 -0
- package/tools/brand.d.ts +11 -0
- package/tools/brand.d.ts.map +1 -0
- package/tools/brand.js +75 -0
- package/tools/brand.js.map +1 -0
- package/tools/chainregistry.d.ts +18 -0
- package/tools/chainregistry.d.ts.map +1 -0
- package/tools/chainregistry.js +175 -0
- package/tools/chainregistry.js.map +1 -0
- package/tools/compliance.d.ts +14 -0
- package/tools/compliance.d.ts.map +1 -0
- package/tools/compliance.js +45 -0
- package/tools/compliance.js.map +1 -0
- package/tools/council.d.ts +17 -0
- package/tools/council.d.ts.map +1 -0
- package/tools/council.js +75 -0
- package/tools/council.js.map +1 -0
- package/tools/device.d.ts +13 -0
- package/tools/device.d.ts.map +1 -0
- package/tools/device.js +45 -0
- package/tools/device.js.map +1 -0
- package/tools/devreward.d.ts +15 -0
- package/tools/devreward.d.ts.map +1 -0
- package/tools/devreward.js +190 -0
- package/tools/devreward.js.map +1 -0
- package/tools/economy.d.ts +14 -0
- package/tools/economy.d.ts.map +1 -0
- package/tools/economy.js +172 -0
- package/tools/economy.js.map +1 -0
- package/tools/flowback.d.ts +14 -0
- package/tools/flowback.d.ts.map +1 -0
- package/tools/flowback.js +146 -0
- package/tools/flowback.js.map +1 -0
- package/tools/insurance.d.ts +13 -0
- package/tools/insurance.d.ts.map +1 -0
- package/tools/insurance.js +45 -0
- package/tools/insurance.js.map +1 -0
- package/tools/marketplace.d.ts +12 -0
- package/tools/marketplace.d.ts.map +1 -0
- package/tools/marketplace.js +124 -0
- package/tools/marketplace.js.map +1 -0
- package/tools/order.d.ts +12 -0
- package/tools/order.d.ts.map +1 -0
- package/tools/order.js +94 -0
- package/tools/order.js.map +1 -0
- package/tools/recovery.d.ts +14 -0
- package/tools/recovery.d.ts.map +1 -0
- package/tools/recovery.js +158 -0
- package/tools/recovery.js.map +1 -0
- package/tools/relay.d.ts +15 -0
- package/tools/relay.d.ts.map +1 -0
- package/tools/relay.js +152 -0
- package/tools/relay.js.map +1 -0
- package/tools/reputation.d.ts +20 -0
- package/tools/reputation.d.ts.map +1 -0
- package/tools/reputation.js +50 -0
- package/tools/reputation.js.map +1 -0
- package/tools/reputation_seller_credit.d.ts +16 -0
- package/tools/reputation_seller_credit.d.ts.map +1 -0
- package/tools/reputation_seller_credit.js +106 -0
- package/tools/reputation_seller_credit.js.map +1 -0
- package/tools/reward.d.ts +14 -0
- package/tools/reward.d.ts.map +1 -0
- package/tools/reward.js +76 -0
- package/tools/reward.js.map +1 -0
- package/tools/shop.d.ts +14 -0
- package/tools/shop.d.ts.map +1 -0
- package/tools/shop.js +95 -0
- package/tools/shop.js.map +1 -0
- package/tools/verification.d.ts +12 -0
- package/tools/verification.d.ts.map +1 -0
- package/tools/verification.js +89 -0
- package/tools/verification.js.map +1 -0
- package/types/store.d.ts +255 -0
- package/types/store.d.ts.map +1 -0
- package/types/store.js +19 -0
- package/types/store.js.map +1 -0
- package/utils/aes-gcm.d.ts +63 -0
- package/utils/aes-gcm.d.ts.map +1 -0
- package/utils/aes-gcm.js +179 -0
- package/utils/aes-gcm.js.map +1 -0
- package/utils/api-response.d.ts +51 -0
- package/utils/api-response.d.ts.map +1 -0
- package/utils/api-response.js +65 -0
- package/utils/api-response.js.map +1 -0
- package/utils/base32.d.ts +5 -0
- package/utils/base32.d.ts.map +1 -0
- package/utils/base32.js +20 -0
- package/utils/base32.js.map +1 -0
- package/utils/crypto.d.ts +77 -0
- package/utils/crypto.d.ts.map +1 -0
- package/utils/crypto.js +164 -0
- package/utils/crypto.js.map +1 -0
- package/utils/encryption.d.ts +81 -0
- package/utils/encryption.d.ts.map +1 -0
- package/utils/encryption.js +247 -0
- package/utils/encryption.js.map +1 -0
- package/utils/env.js +20 -0
- package/utils/jwt.d.ts +110 -0
- package/utils/jwt.d.ts.map +1 -0
- package/utils/jwt.js +275 -0
- package/utils/jwt.js.map +1 -0
- package/utils/qrcode-reader.d.ts +22 -0
- package/utils/qrcode-reader.d.ts.map +1 -0
- package/utils/qrcode-reader.js +90 -0
- package/utils/qrcode-reader.js.map +1 -0
- package/utils/qrcode.d.ts +26 -0
- package/utils/qrcode.d.ts.map +1 -0
- package/utils/qrcode.js +92 -0
- package/utils/qrcode.js.map +1 -0
- package/utils/totp.d.ts +3 -0
- package/utils/totp.d.ts.map +1 -0
- package/utils/totp.js +58 -0
- package/utils/totp.js.map +1 -0
- package/utils/two-factor-auth.d.ts +16 -0
- package/utils/two-factor-auth.d.ts.map +1 -0
- package/utils/two-factor-auth.js +150 -0
- package/utils/two-factor-auth.js.map +1 -0
- package/verifyer/hsm.d.ts +70 -0
- package/verifyer/hsm.d.ts.map +1 -0
- package/verifyer/hsm.js +482 -0
- package/verifyer/hsm.js.map +1 -0
- package/verifyer/index.d.ts +81 -0
- package/verifyer/index.d.ts.map +1 -0
- package/verifyer/index.js +372 -0
- package/verifyer/index.js.map +1 -0
- package/ws/peer-monitor-broadcaster.d.ts +24 -0
- package/ws/peer-monitor-broadcaster.d.ts.map +1 -0
- package/ws/peer-monitor-broadcaster.js +56 -0
- package/ws/peer-monitor-broadcaster.js.map +1 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package trustchain.order.v1;
|
|
3
|
+
|
|
4
|
+
import "amino/amino.proto";
|
|
5
|
+
import "cosmos/msg/v1/msg.proto";
|
|
6
|
+
import "cosmos_proto/cosmos.proto";
|
|
7
|
+
import "gogoproto/gogo.proto";
|
|
8
|
+
import "trustchain/order/v1/params.proto";
|
|
9
|
+
|
|
10
|
+
option go_package = "github.com/oxiaom/trustchain/x/order/types";
|
|
11
|
+
|
|
12
|
+
service Msg {
|
|
13
|
+
option (cosmos.msg.v1.service) = true;
|
|
14
|
+
|
|
15
|
+
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
|
16
|
+
rpc CreateOrder(MsgCreateOrder) returns (MsgCreateOrderResponse);
|
|
17
|
+
rpc ShipOrder(MsgShipOrder) returns (MsgShipOrderResponse);
|
|
18
|
+
rpc ConfirmOrder(MsgConfirmOrder) returns (MsgConfirmOrderResponse);
|
|
19
|
+
rpc DisputeOrder(MsgDisputeOrder) returns (MsgDisputeOrderResponse);
|
|
20
|
+
rpc CancelOrder(MsgCancelOrder) returns (MsgCancelOrderResponse);
|
|
21
|
+
rpc ResolveDispute(MsgResolveDispute) returns (MsgResolveDisputeResponse);
|
|
22
|
+
// MVP Phase 1 (#7): 支付事实确认 (预言机)。authority = params.payment_authority
|
|
23
|
+
// (Phase A 卖家 / Phase B 平台支付服务), 空参数回退模块 authority(gov)。
|
|
24
|
+
rpc ConfirmPayment(MsgConfirmPayment) returns (MsgConfirmPaymentResponse);
|
|
25
|
+
// MVP Phase 1 (#8): 争议窗口后结算 (permissionless crank)
|
|
26
|
+
rpc SettleOrder(MsgSettleOrder) returns (MsgSettleOrderResponse);
|
|
27
|
+
// v0.1 引荐佣金结算 crank (permissionless): 已结算订单的引荐佣金
|
|
28
|
+
// 从卖家经营科目转到 referrer 经营科目 (设计稿 referral-dual-ledger-v0.1 §2.2)。
|
|
29
|
+
rpc TransferCredits(MsgTransferCredits) returns (MsgTransferCreditsResponse);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message MsgUpdateParams {
|
|
33
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
34
|
+
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
35
|
+
Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
36
|
+
}
|
|
37
|
+
message MsgUpdateParamsResponse {}
|
|
38
|
+
|
|
39
|
+
message MsgCreateOrder {
|
|
40
|
+
// v3.9.4 方案 A「卖家代建单」: signer 由 buyer 改为 **seller** (买家不持私钥)。
|
|
41
|
+
// ⚠️ 本文件是 trustchain-relmerge 的 vendor 副本, 字段/注解以链侧 proto 为准。
|
|
42
|
+
option (cosmos.msg.v1.signer) = "seller";
|
|
43
|
+
string buyer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
44
|
+
string seller = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
45
|
+
string sku_id = 3;
|
|
46
|
+
uint64 quantity = 4;
|
|
47
|
+
string price_per_unit = 5; // microTCT
|
|
48
|
+
string shipping_address_hash = 6; // encrypted
|
|
49
|
+
// 多链扩展 - 指定目标链(预留字段,默认空字符串表示当前链)
|
|
50
|
+
string source_chain = 7;
|
|
51
|
+
|
|
52
|
+
// 支付方式(v9):"" / "tct" / "fiat",默认空 = tct(向后兼容)。
|
|
53
|
+
// fiat = 法币线下付款,创建订单时不锁 TCT escrow。
|
|
54
|
+
string payment_method = 8;
|
|
55
|
+
|
|
56
|
+
// v0.1 引荐归因: 入口店地址。买家浏览器在有效引荐会话内下单时填写;
|
|
57
|
+
// 空串 = 无引荐。非空则覆盖写 Attribution (last-touch)。
|
|
58
|
+
string referrer = 9 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
59
|
+
}
|
|
60
|
+
message MsgCreateOrderResponse {
|
|
61
|
+
uint64 order_id = 1;
|
|
62
|
+
string source_chain = 2; // 回显订单所属链
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message MsgShipOrder {
|
|
66
|
+
option (cosmos.msg.v1.signer) = "seller";
|
|
67
|
+
string seller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
68
|
+
uint64 order_id = 2;
|
|
69
|
+
string tracking_info = 3; // encrypted tracking
|
|
70
|
+
}
|
|
71
|
+
message MsgShipOrderResponse {}
|
|
72
|
+
|
|
73
|
+
// 2026-09-23 D2: signer = **submitter** (承载签名者); `buyer` 是**实际发起方**记录
|
|
74
|
+
// (keeper 校验必须 = 订单买家), 不是签名者。
|
|
75
|
+
// submitter 白名单 (keeper `authorizeOrderSubmit`, 三选一): 订单卖家 / params.dispute_authority /
|
|
76
|
+
// (SHIPPED 且过 params.auto_confirm_timeout 后) 任何账户。
|
|
77
|
+
message MsgConfirmOrder {
|
|
78
|
+
option (cosmos.msg.v1.signer) = "submitter";
|
|
79
|
+
string buyer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
80
|
+
uint64 order_id = 2;
|
|
81
|
+
uint64 rating = 3; // 1-5 stars
|
|
82
|
+
string review = 4; // text review
|
|
83
|
+
string submitter = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
84
|
+
}
|
|
85
|
+
message MsgConfirmOrderResponse {}
|
|
86
|
+
|
|
87
|
+
// 2026-09-23 D2: signer = **submitter** (白名单同 MsgConfirmOrder);
|
|
88
|
+
// `disputer` 是**实际发起方**记录 (buyer 或 seller, keeper 校验), 不是签名者。
|
|
89
|
+
message MsgDisputeOrder {
|
|
90
|
+
option (cosmos.msg.v1.signer) = "submitter";
|
|
91
|
+
string disputer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
92
|
+
uint64 order_id = 2;
|
|
93
|
+
string reason = 3;
|
|
94
|
+
string evidence_hash = 4; // hash of evidence documents
|
|
95
|
+
string submitter = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
96
|
+
}
|
|
97
|
+
message MsgDisputeOrderResponse {}
|
|
98
|
+
|
|
99
|
+
// 2026-09-22 方案 A 延伸 (v3.9.4): signer 由 canceller 改为 **seller**;
|
|
100
|
+
// `canceller` 是**实际发起方**记录 (buyer 或 seller), 不是签名者;
|
|
101
|
+
// `seller` 是签名者, keeper 校验必须 = 订单卖家 (仅 seller 字段就是权限门)。
|
|
102
|
+
message MsgCancelOrder {
|
|
103
|
+
option (cosmos.msg.v1.signer) = "seller";
|
|
104
|
+
string canceller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
105
|
+
uint64 order_id = 2;
|
|
106
|
+
string seller = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
107
|
+
}
|
|
108
|
+
message MsgCancelOrderResponse {}
|
|
109
|
+
|
|
110
|
+
message MsgResolveDispute {
|
|
111
|
+
option (cosmos.msg.v1.signer) = "resolver";
|
|
112
|
+
string resolver = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
113
|
+
uint64 order_id = 2;
|
|
114
|
+
uint32 refund_percent = 3; // 0-100, percentage to refund buyer
|
|
115
|
+
string resolution_note = 4; // explanation
|
|
116
|
+
}
|
|
117
|
+
message MsgResolveDisputeResponse {}
|
|
118
|
+
|
|
119
|
+
// MsgConfirmPayment (MVP Phase 1 #7): 支付事实上链 (预言机回调)。
|
|
120
|
+
// PENDING → PAID; 库存扣减在本步执行 (下单只查不占, 支付成功占库存)。
|
|
121
|
+
message MsgConfirmPayment {
|
|
122
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
123
|
+
option (amino.name) = "trustchain/x/order/MsgConfirmPayment";
|
|
124
|
+
|
|
125
|
+
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
126
|
+
uint64 order_id = 2;
|
|
127
|
+
string psp_payment_id = 3; // PSP 支付凭证号 (幂等键, 重复回调直接拒)
|
|
128
|
+
}
|
|
129
|
+
message MsgConfirmPaymentResponse {}
|
|
130
|
+
|
|
131
|
+
// MsgSettleOrder (MVP Phase 1 #8): 结算 crank — 确认收货 + dispute_window 过后,
|
|
132
|
+
// 任何人可触发结算 (释放 escrow/卖家质押/保险担保)。窗口期内被争议则不能结算。
|
|
133
|
+
message MsgSettleOrder {
|
|
134
|
+
option (cosmos.msg.v1.signer) = "caller";
|
|
135
|
+
option (amino.name) = "trustchain/x/order/MsgSettleOrder";
|
|
136
|
+
|
|
137
|
+
string caller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
138
|
+
uint64 order_id = 2;
|
|
139
|
+
}
|
|
140
|
+
message MsgSettleOrderResponse {}
|
|
141
|
+
|
|
142
|
+
// MsgTransferCredits (v0.1 引荐分佣): 引荐佣金结算 crank — 任何人可为
|
|
143
|
+
// 已结算 (settled=true) 订单触发佣金结算, 从卖家经营科目扣佣金,
|
|
144
|
+
// referrer 经营科目入账 (引荐所得记经营, 设计稿 §1.2)。
|
|
145
|
+
// 幂等: 同一 order_id 只结一次; 卖家经营不足时 skip 不写幂等键, 可重试。
|
|
146
|
+
message MsgTransferCredits {
|
|
147
|
+
option (cosmos.msg.v1.signer) = "caller";
|
|
148
|
+
option (amino.name) = "trustchain/x/order/MsgTransferCredits";
|
|
149
|
+
|
|
150
|
+
string caller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // 任何人, 无权限
|
|
151
|
+
uint64 order_id = 2;
|
|
152
|
+
}
|
|
153
|
+
message MsgTransferCreditsResponse {
|
|
154
|
+
string referrer = 1;
|
|
155
|
+
string amount = 2; // microTCT, 卖家经营不足 skip 时为 "0"
|
|
156
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package trustchain.serviceprovider.v1;
|
|
3
|
+
option go_package = "github.com/oxiaom/trustchain/x/serviceprovider/types";
|
|
4
|
+
|
|
5
|
+
import "gogoproto/gogo.proto";
|
|
6
|
+
|
|
7
|
+
// PaymentFact — 支付事实记录 (服务商向主链提交的已验证支付事实)
|
|
8
|
+
// 零 PII 上链: 只存 order_ref/psp_txn_id/amount/evidence_hash(sha256 回调数据), 不存任何个人信息。
|
|
9
|
+
message PaymentFact {
|
|
10
|
+
option (gogoproto.equal) = true;
|
|
11
|
+
|
|
12
|
+
// 提交该事实的服务商地址
|
|
13
|
+
string provider = 1;
|
|
14
|
+
|
|
15
|
+
// 订单引用 (tb-xxxx, 与 seller-backend agent-pay 会话关联)
|
|
16
|
+
string order_ref = 2;
|
|
17
|
+
|
|
18
|
+
// 微信支付交易号 (transaction_id)
|
|
19
|
+
string psp_txn_id = 3;
|
|
20
|
+
|
|
21
|
+
// 金额 (utct)
|
|
22
|
+
string amount = 4;
|
|
23
|
+
|
|
24
|
+
// 证据哈希: sha256(微信支付回调原始数据) — 零 PII, 仅用于独立验证
|
|
25
|
+
string evidence_hash = 5;
|
|
26
|
+
|
|
27
|
+
// 提交时间 (unix 秒)
|
|
28
|
+
uint64 submitted_at = 6;
|
|
29
|
+
|
|
30
|
+
// 状态: PENDING / CONFIRMED / REJECTED
|
|
31
|
+
string status = 7;
|
|
32
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package trustchain.serviceprovider.v1;
|
|
3
|
+
option go_package = "github.com/oxiaom/trustchain/x/serviceprovider/types";
|
|
4
|
+
|
|
5
|
+
import "gogoproto/gogo.proto";
|
|
6
|
+
|
|
7
|
+
// ServiceProvider — 服务商注册表 (主链 x/serviceprovider)
|
|
8
|
+
// 服务商是主链注册的支付事实提交者, 负责验证微信支付回调并向保障链 C5 提交支付事实。
|
|
9
|
+
message ServiceProvider {
|
|
10
|
+
option (gogoproto.equal) = true;
|
|
11
|
+
|
|
12
|
+
// 服务商链上地址 (tct1...)
|
|
13
|
+
string address = 1;
|
|
14
|
+
|
|
15
|
+
// 服务商名称 (如"无锡小播鼠服务商")
|
|
16
|
+
string name = 2;
|
|
17
|
+
|
|
18
|
+
// 绑定的微信支付服务商商户号 (唯一性约束, 一个商户号只能绑定一个服务商)
|
|
19
|
+
string wechat_mchid = 3;
|
|
20
|
+
|
|
21
|
+
// 质押 TCT (utct, 作恶时全额罚没)
|
|
22
|
+
string stake = 4;
|
|
23
|
+
|
|
24
|
+
// 状态: ACTIVE / KICKED / SLASHED
|
|
25
|
+
string status = 5;
|
|
26
|
+
|
|
27
|
+
// 累计赚取 credits (credits 单位)
|
|
28
|
+
string credits_earned = 6;
|
|
29
|
+
|
|
30
|
+
// 注册时间 (unix 秒)
|
|
31
|
+
uint64 registered_at = 7;
|
|
32
|
+
|
|
33
|
+
// 踢出时间 (unix 秒, 0=未踢出)
|
|
34
|
+
uint64 kicked_at = 8;
|
|
35
|
+
|
|
36
|
+
// 踢出原因
|
|
37
|
+
string kick_reason = 9;
|
|
38
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package trustchain.serviceprovider.v1;
|
|
3
|
+
option go_package = "github.com/oxiaom/trustchain/x/serviceprovider/types";
|
|
4
|
+
|
|
5
|
+
import "cosmos/msg/v1/msg.proto";
|
|
6
|
+
import "gogoproto/gogo.proto";
|
|
7
|
+
import "trustchain/serviceprovider/v1/serviceprovider.proto";
|
|
8
|
+
import "trustchain/serviceprovider/v1/paymentfact.proto";
|
|
9
|
+
|
|
10
|
+
// Msg defines the serviceprovider Msg service.
|
|
11
|
+
service Msg {
|
|
12
|
+
option (cosmos.msg.v1.service) = true;
|
|
13
|
+
|
|
14
|
+
// RegisterServiceProvider — 服务商注册 (任何人可申请, 需主链验证)
|
|
15
|
+
rpc RegisterServiceProvider(MsgRegisterServiceProvider) returns (MsgRegisterServiceProviderResponse);
|
|
16
|
+
|
|
17
|
+
// SubmitPaymentFact — 提交支付事实 (仅已注册 ACTIVE 服务商)
|
|
18
|
+
rpc SubmitPaymentFact(MsgSubmitPaymentFact) returns (MsgSubmitPaymentFactResponse);
|
|
19
|
+
|
|
20
|
+
// KickOutServiceProvider — 踢出服务商 (authority 执法)
|
|
21
|
+
rpc KickOutServiceProvider(MsgKickOutServiceProvider) returns (MsgKickOutServiceProviderResponse);
|
|
22
|
+
|
|
23
|
+
// SlashServiceProvider — 罚没质押不踢出 (authority 惩罚)
|
|
24
|
+
rpc SlashServiceProvider(MsgSlashServiceProvider) returns (MsgSlashServiceProviderResponse);
|
|
25
|
+
|
|
26
|
+
// ClaimProviderReward — 领取累计贡献奖励 (服务商自己)
|
|
27
|
+
rpc ClaimProviderReward(MsgClaimProviderReward) returns (MsgClaimProviderRewardResponse);
|
|
28
|
+
|
|
29
|
+
// ConfirmPaymentFact — C5 确认支付事实 (保障链确认成交 → 贡献分+1)
|
|
30
|
+
rpc ConfirmPaymentFact(MsgConfirmPaymentFact) returns (MsgConfirmPaymentFactResponse);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// RegisterServiceProvider — 服务商注册
|
|
34
|
+
message MsgRegisterServiceProvider {
|
|
35
|
+
option (cosmos.msg.v1.signer) = "provider";
|
|
36
|
+
string provider = 1; // 服务商链上地址
|
|
37
|
+
string name = 2; // 服务商名称
|
|
38
|
+
string wechat_mchid = 3; // 绑定的微信服务商商户号 (唯一)
|
|
39
|
+
string stake = 4; // 质押 TCT (utct)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message MsgRegisterServiceProviderResponse {
|
|
43
|
+
string address = 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// SubmitPaymentFact — 提交支付事实
|
|
47
|
+
message MsgSubmitPaymentFact {
|
|
48
|
+
option (cosmos.msg.v1.signer) = "provider";
|
|
49
|
+
string provider = 1; // 服务商地址
|
|
50
|
+
string order_ref = 2; // 订单引用
|
|
51
|
+
string psp_txn_id = 3; // 微信支付交易号
|
|
52
|
+
string amount = 4; // 金额 (utct)
|
|
53
|
+
string evidence_hash = 5; // 证据哈希 (sha256 回调数据)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message MsgSubmitPaymentFactResponse {
|
|
57
|
+
string order_ref = 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// KickOutServiceProvider — 踢出服务商 (authority 执法)
|
|
61
|
+
message MsgKickOutServiceProvider {
|
|
62
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
63
|
+
string authority = 1; // 执法者 (gov 或 emergency)
|
|
64
|
+
string provider = 2; // 目标服务商地址
|
|
65
|
+
string reason = 3; // 踢出原因
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message MsgKickOutServiceProviderResponse {
|
|
69
|
+
string slashed_stake = 1; // 罚没金额 (utct)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// SlashServiceProvider — 罚没质押不踢出 (authority 惩罚)
|
|
73
|
+
message MsgSlashServiceProvider {
|
|
74
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
75
|
+
string authority = 1;
|
|
76
|
+
string provider = 2;
|
|
77
|
+
string amount = 3; // 罚没金额 (utct)
|
|
78
|
+
string reason = 4;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
message MsgSlashServiceProviderResponse {
|
|
82
|
+
string slashed = 1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ClaimProviderReward — 领取累计贡献奖励
|
|
86
|
+
message MsgClaimProviderReward {
|
|
87
|
+
option (cosmos.msg.v1.signer) = "provider";
|
|
88
|
+
string provider = 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
message MsgClaimProviderRewardResponse {
|
|
92
|
+
string claimed = 1; // 领取金额 (credits)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// ConfirmPaymentFact — C5 确认支付事实 (authority 或 params.confirmers 白名单, 预留给保障链 relay)
|
|
96
|
+
message MsgConfirmPaymentFact {
|
|
97
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
98
|
+
string authority = 1;
|
|
99
|
+
string provider = 2; // 服务商地址
|
|
100
|
+
string order_ref = 3; // 订单引用
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
message MsgConfirmPaymentFactResponse {
|
|
104
|
+
string order_ref = 1;
|
|
105
|
+
string status = 2; // CONFIRMED
|
|
106
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package trustchain.subchain.v1;
|
|
4
|
+
|
|
5
|
+
option go_package = "github.com/oxiaom/trustchain/x/subchain/types";
|
|
6
|
+
|
|
7
|
+
import "cosmos/base/v1beta1/coin.proto";
|
|
8
|
+
|
|
9
|
+
// Params defines the x/subchain module parameters (v0.2-final §6/§7).
|
|
10
|
+
message Params {
|
|
11
|
+
// rate_floor 穿透汇率下限 (Q3 反身性阻尼, 默认 "0.1")
|
|
12
|
+
string rate_floor = 1;
|
|
13
|
+
// rate_cap 穿透汇率上限 (默认 "1.0")
|
|
14
|
+
string rate_cap = 2;
|
|
15
|
+
// bootstrap_tct 创世自举 TCT 基数 (Q2 拍板: 子链质押自举, Hub 不白给)
|
|
16
|
+
string bootstrap_tct = 3;
|
|
17
|
+
// stabilization_threshold 平准触发阈值 (汇率偏离比例, 默认 "0.1" = ±10%)
|
|
18
|
+
string stabilization_threshold = 4;
|
|
19
|
+
// stabilization_cap 单次平准划转上限 (占 Pledge 存量比例, 默认 "0.05" = 5%)
|
|
20
|
+
string stabilization_cap = 5;
|
|
21
|
+
// epoch_release 罚没回流节流参数 (Return 池废除后保留节流初衷)
|
|
22
|
+
string epoch_release = 6;
|
|
23
|
+
|
|
24
|
+
// bootstrap_grant_utct 引导金单笔发放额 (utct, 默认 "100000000" = 100 TCT, C2 引导金闭环)
|
|
25
|
+
string bootstrap_grant_utct = 7;
|
|
26
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package trustchain.subchain.v1;
|
|
4
|
+
|
|
5
|
+
option go_package = "github.com/oxiaom/trustchain/x/subchain/types";
|
|
6
|
+
|
|
7
|
+
// 部署语义 (v0.2-final §13.3 + kimi #15702 注意③):
|
|
8
|
+
// x/subchain 部署在【子链本体】上——每条子链是独立链实例跑同一份二进制。
|
|
9
|
+
// 本模块管的是【本子链】的三池 (Free/Pledge/Stabilization) 与质押穿透。
|
|
10
|
+
// Hub 主链侧不 enforce 子链池守恒, 只存 attestation/穿透快照。
|
|
11
|
+
// 因此 chain_id 在子链本体上恒等于本链 ID, 保留字段仅为跨链聚合/审计可读性。
|
|
12
|
+
|
|
13
|
+
// PoolBalance 三池余额 (状态池, 非用途池)。
|
|
14
|
+
// 守恒: free + pledge + stabilization == total_supply (invariant 校验)。
|
|
15
|
+
message PoolBalance {
|
|
16
|
+
string chain_id = 1; // 本子链 ID (部署语义见文件头)
|
|
17
|
+
string free = 2; // 自由流通 (sdk.Int 字符串)
|
|
18
|
+
string pledge = 3; // 质押锁定 (唯一穿透核心)
|
|
19
|
+
string stabilization = 4; // 汇率平准 (权重豁免)
|
|
20
|
+
string total_supply = 5; // 子链积分总存量 (守恒基准, 非 Hub 总量)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// PledgeRecord 质押穿透记录 (快照固化, 防套利)。
|
|
24
|
+
message PledgeRecord {
|
|
25
|
+
string id = 1; // 记录自身标识 (uuid, 主键; 与 order_id 绑定关系区分)
|
|
26
|
+
string chain_id = 2; // 本子链 ID
|
|
27
|
+
string address = 3; // 质押主体 (个人/子链公共账户)
|
|
28
|
+
string amount = 4; // 质押积分量 (sdk.Int 字符串)
|
|
29
|
+
string snapshot_rate = 5; // 穿透汇率快照 (sdkmath.LegacyDec, 18 位)
|
|
30
|
+
string hub_credit = 6; // 穿透授信额度 = amount × snapshot_rate
|
|
31
|
+
uint64 snapshot_height = 7; // 快照区块高度 (终身绑定)
|
|
32
|
+
string order_id = 8; // 绑定订单 (专款专用)
|
|
33
|
+
bool locked = 9; // 锁仓标志
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// RateSnapshot 汇率快照 (区块级, 只增不改)。
|
|
37
|
+
message RateSnapshot {
|
|
38
|
+
string chain_id = 1;
|
|
39
|
+
uint64 height = 2;
|
|
40
|
+
string rate = 3; // chainExchangeRate = clamp(pledge/bootstrap, floor, cap)
|
|
41
|
+
string effective_pledge = 4; // Pledge 池有效存量
|
|
42
|
+
string bootstrap_tct = 5; // 创世自举 TCT (Q2 拍板, Hub 不白给)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// DepositRecord 桥接注资记录 (审计 + 防重放)
|
|
46
|
+
message DepositRecord {
|
|
47
|
+
string id = 1; // deposit-N 自增
|
|
48
|
+
string chain_id = 2; // 本子链 ID
|
|
49
|
+
string user_address = 3; // 收款用户
|
|
50
|
+
string amount = 4; // 注入积分量
|
|
51
|
+
string hub_tx_ref = 5; // Hub 存款凭证 (唯一)
|
|
52
|
+
uint64 height = 6; // 登记块高
|
|
53
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package trustchain.subchain.v1;
|
|
4
|
+
|
|
5
|
+
option go_package = "github.com/oxiaom/trustchain/x/subchain/types";
|
|
6
|
+
|
|
7
|
+
import "cosmos/msg/v1/msg.proto";
|
|
8
|
+
import "amino/amino.proto";
|
|
9
|
+
import "gogoproto/gogo.proto";
|
|
10
|
+
import "trustchain/subchain/v1/pool.proto";
|
|
11
|
+
import "trustchain/subchain/v1/params.proto";
|
|
12
|
+
|
|
13
|
+
// Msg defines the subchain Msg service (三池状态机 + 质押穿透).
|
|
14
|
+
service Msg {
|
|
15
|
+
option (cosmos.msg.v1.service) = true;
|
|
16
|
+
|
|
17
|
+
// PledgeLocal 质押穿透: Free → Pledge + 生成 RateSnapshot + 授信额度
|
|
18
|
+
rpc PledgeLocal(MsgPledgeLocal) returns (MsgPledgeLocalResponse);
|
|
19
|
+
// UnlockPledge 履约解锁: Pledge → Free + 授信销毁
|
|
20
|
+
rpc UnlockPledge(MsgUnlockPledge) returns (MsgUnlockPledgeResponse);
|
|
21
|
+
// SlashToFree 违约罚没: Pledge → Free + 授信作废 (替代原 Return 池)
|
|
22
|
+
rpc SlashToFree(MsgSlashToFree) returns (MsgSlashToFreeResponse);
|
|
23
|
+
// Stabilize 平准调节: Free ↔ Stabilization
|
|
24
|
+
rpc Stabilize(MsgStabilize) returns (MsgStabilizeResponse);
|
|
25
|
+
|
|
26
|
+
// FundPool 池注资 (v3.1 补缺, 引导期): authority 向 Free 注入积分。
|
|
27
|
+
// 原设计缺口: 池无任何注资入口, Free 永远 0, 质押流程无法启动。
|
|
28
|
+
rpc FundPool(MsgFundPool) returns (MsgFundPoolResponse);
|
|
29
|
+
|
|
30
|
+
// UpdateParams 参数治理 (v3.2 补缺): bootstrap_tct 等参数原只能创世设定,
|
|
31
|
+
// bootstrap=0 导致穿透汇率恒 0 (ChainExchangeRate 短路), 治理无门。
|
|
32
|
+
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
|
33
|
+
|
|
34
|
+
// DepositLocal 子链积分桥接 (V133): Hub TCT 存款凭证 → 子链 Free 注入 (MVP 存证式)
|
|
35
|
+
rpc DepositLocal(MsgDepositLocal) returns (MsgDepositLocalResponse);
|
|
36
|
+
|
|
37
|
+
// FundBootstrap 引导金池注资 (C2): authority 从自己账户向 subchain 模块账户注入 TCT
|
|
38
|
+
rpc FundBootstrap(MsgFundBootstrap) returns (MsgFundBootstrapResponse);
|
|
39
|
+
|
|
40
|
+
// DisburseBootstrap 引导金发放 (C2): subchain 模块账户 → 卖家地址, credential_hash 幂等
|
|
41
|
+
rpc DisburseBootstrap(MsgDisburseBootstrap) returns (MsgDisburseBootstrapResponse);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// MsgPledgeLocal 质押穿透 (S4): 质押子链积分 → 穿透生成 Hub 信用额度
|
|
45
|
+
message MsgPledgeLocal {
|
|
46
|
+
option (cosmos.msg.v1.signer) = "address";
|
|
47
|
+
option (amino.name) = "trustchain/subchain/MsgPledgeLocal";
|
|
48
|
+
|
|
49
|
+
string address = 1; // 质押主体 (个人/子链公共账户)
|
|
50
|
+
string amount = 2; // 质押积分量 (sdk.Int 字符串)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message MsgPledgeLocalResponse {
|
|
54
|
+
PledgeRecord record = 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// MsgUnlockPledge 履约解锁 (S6a): 订单履约 → 解锁质押 + 授信销毁
|
|
58
|
+
message MsgUnlockPledge {
|
|
59
|
+
option (cosmos.msg.v1.signer) = "address";
|
|
60
|
+
option (amino.name) = "trustchain/subchain/MsgUnlockPledge";
|
|
61
|
+
|
|
62
|
+
string address = 1; // 质押主体
|
|
63
|
+
string record_id = 2; // 质押记录 id (PledgeRecord.id)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message MsgUnlockPledgeResponse {}
|
|
67
|
+
|
|
68
|
+
// MsgSlashToFree 违约罚没 (S6b): 订单违约 → 罚没并入 Free + 授信作废
|
|
69
|
+
message MsgSlashToFree {
|
|
70
|
+
option (cosmos.msg.v1.signer) = "address";
|
|
71
|
+
option (amino.name) = "trustchain/subchain/MsgSlashToFree";
|
|
72
|
+
|
|
73
|
+
string address = 1; // 执行方 (仲裁/治理)
|
|
74
|
+
string record_id = 2; // 质押记录 id
|
|
75
|
+
string reason = 3; // 罚没原因 (审计)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
message MsgSlashToFreeResponse {}
|
|
79
|
+
|
|
80
|
+
// MsgStabilize 平准调节 (S7): Free ↔ Stabilization
|
|
81
|
+
// 自动模式: 汇率偏离 ±10% 触发; 单次划转 ≤5% Pledge 存量
|
|
82
|
+
message MsgStabilize {
|
|
83
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
84
|
+
option (amino.name) = "trustchain/subchain/MsgStabilize";
|
|
85
|
+
|
|
86
|
+
string authority = 1; // 治理地址
|
|
87
|
+
string direction = 2; // "in" (Free→Stabilization) | "out" (Stabilization→Free)
|
|
88
|
+
string amount = 3; // 划转量 (sdk.Int 字符串)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
message MsgStabilizeResponse {}
|
|
92
|
+
|
|
93
|
+
// MsgFundPool 池注资 (v3.1): authority 引导期向 Free 池注入积分。
|
|
94
|
+
// 仅 authority 可调用; 守恒: Free+amount, TotalSupply+amount。
|
|
95
|
+
message MsgFundPool {
|
|
96
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
97
|
+
option (amino.name) = "trustchain/subchain/MsgFundPool";
|
|
98
|
+
|
|
99
|
+
string authority = 1; // 治理地址
|
|
100
|
+
string amount = 2; // 注资金额 (sdk.Int 字符串)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// MsgFundPoolResponse is the response for FundPool.
|
|
104
|
+
message MsgFundPoolResponse {}
|
|
105
|
+
|
|
106
|
+
// MsgUpdateParams 参数治理 (v3.2 补缺): authority 更新模块参数。
|
|
107
|
+
// 仅 authority(gov) 可调用; params 全量替换 (先 Validate 再写)。
|
|
108
|
+
message MsgUpdateParams {
|
|
109
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
110
|
+
option (amino.name) = "trustchain/subchain/MsgUpdateParams";
|
|
111
|
+
|
|
112
|
+
string authority = 1;
|
|
113
|
+
Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// MsgUpdateParamsResponse is the response for UpdateParams.
|
|
117
|
+
message MsgUpdateParamsResponse {}
|
|
118
|
+
|
|
119
|
+
// MsgDepositLocal 子链积分桥接 (V133): 桥运营方 attestation Hub 侧 TCT 已锁定, 向子链用户注入积分
|
|
120
|
+
message MsgDepositLocal {
|
|
121
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
122
|
+
option (amino.name) = "trustchain/subchain/MsgDepositLocal";
|
|
123
|
+
|
|
124
|
+
string authority = 1; // 桥运营方 (gov/authority, 与 FundPool 同级信任)
|
|
125
|
+
string user_address = 2; // 收款用户 (子链地址)
|
|
126
|
+
string amount = 3; // 注入积分量 (sdk.Int 字符串, TCT:积分 1:1 记账, 真实兑换率由 Hub 侧处理)
|
|
127
|
+
string hub_tx_ref = 4; // Hub 侧 TCT 锁定凭证 (tx hash / attestation id, 防重放唯一)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
message MsgDepositLocalResponse {
|
|
131
|
+
string deposit_id = 1;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// MsgFundBootstrap 引导金池注资 (C2): authority 从自己账户向 subchain 模块账户注入 TCT
|
|
135
|
+
message MsgFundBootstrap {
|
|
136
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
137
|
+
option (amino.name) = "trustchain/subchain/MsgFundBootstrap";
|
|
138
|
+
|
|
139
|
+
string authority = 1; // 注资人 (oracle/authority, 与 FundPool 同级信任)
|
|
140
|
+
string amount = 2; // 注资额 (utct)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
message MsgFundBootstrapResponse {}
|
|
144
|
+
|
|
145
|
+
// MsgDisburseBootstrap 引导金发放 (C2): subchain 模块账户 → 卖家地址
|
|
146
|
+
// 幂等: 同一 credential_hash (sha256(merchant_id)) 只发一次 — 防女巫
|
|
147
|
+
message MsgDisburseBootstrap {
|
|
148
|
+
option (cosmos.msg.v1.signer) = "authority";
|
|
149
|
+
option (amino.name) = "trustchain/subchain/MsgDisburseBootstrap";
|
|
150
|
+
|
|
151
|
+
string authority = 1; // 发放人 (oracle/authority)
|
|
152
|
+
string recipient = 2; // 卖家地址
|
|
153
|
+
string credential_hash = 3; // 实名凭证哈希 (一商户一次)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
message MsgDisburseBootstrapResponse {
|
|
157
|
+
string amount = 1; // 发放额 (utct)
|
|
158
|
+
bool duplicate = 2; // true = 该 credential_hash 已发放过 (幂等成功, 未重复入账)
|
|
159
|
+
}
|