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,624 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TrustChain OAuth Bridge — 10 endpoints 实战锁版 (baobei #312/#314)
|
|
4
|
+
*
|
|
5
|
+
* 接口契约 (跟 docs/oauth-bridge-v0.1-spec.md 一致):
|
|
6
|
+
* POST /api/oauth/wechat/login — 微信 jscode2session + JWT
|
|
7
|
+
* POST /api/oauth/alipay/login — 支付宝 auth_code + JWT
|
|
8
|
+
* POST /api/oauth/douyin/login — 抖音 code + JWT
|
|
9
|
+
* POST /api/oauth/link — 已有 chain address 想绑新平台 → link_code
|
|
10
|
+
* POST /api/oauth/link/confirm — link_code + confirm → 写入 users
|
|
11
|
+
* POST /api/oauth/refresh — refresh_token → new access_token
|
|
12
|
+
* GET /api/oauth/user/:address — 查 user 全平台 openid
|
|
13
|
+
* POST /api/oauth/unlink — 解绑平台 (至少留 1 登录方式)
|
|
14
|
+
* GET /api/oauth/apps/:id — OAuth 应用详情
|
|
15
|
+
* POST /api/oauth/authorize — OAuth authorize 页面后端
|
|
16
|
+
*
|
|
17
|
+
* 实战锁版 (Lesson #312/#313/#314/#335/#266a/#345 综合):
|
|
18
|
+
* - DB: users.chain_address / wechat_openid / alipay_userid / other_openids
|
|
19
|
+
* - API: JWT sub = chain_address (Lesson #335 三处一致)
|
|
20
|
+
* - Adapter Pattern: 3 平台抽象 OAuthAdapter 接口
|
|
21
|
+
* - fail loud: 任何 DB/API 错误抛错 (Lesson #266a)
|
|
22
|
+
* - 写路径 env var: 微信 appid/secret, 支付宝 private_key (Lesson #345)
|
|
23
|
+
*
|
|
24
|
+
* @see src/api/oauth-adapters.ts (Adapter Pattern)
|
|
25
|
+
* @see src/utils/jwt.ts (HS256 JWT)
|
|
26
|
+
* @see src/utils/crypto.ts (server generate keypair)
|
|
27
|
+
* @see src/db/oauth-migrate.ts (DB schema)
|
|
28
|
+
*/
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.runOAuthBridgeMigrations = void 0;
|
|
31
|
+
exports.createOAuthBridgeRouter = createOAuthBridgeRouter;
|
|
32
|
+
const express_1 = require("express");
|
|
33
|
+
const jwt_1 = require("../utils/jwt");
|
|
34
|
+
const crypto_1 = require("../utils/crypto");
|
|
35
|
+
const oauth_adapters_1 = require("./oauth-adapters");
|
|
36
|
+
const oauth_migrate_1 = require("../db/oauth-migrate");
|
|
37
|
+
const ALLOWED_PLATFORMS = ['wechat', 'alipay', 'douyin'];
|
|
38
|
+
/**
|
|
39
|
+
* 创建 OAuth bridge router
|
|
40
|
+
*
|
|
41
|
+
* 实战锁版: 自动跑 migrations (runOAuthBridgeMigrations), fail loud if failed
|
|
42
|
+
*/
|
|
43
|
+
function createOAuthBridgeRouter(config) {
|
|
44
|
+
const db = config.db;
|
|
45
|
+
const registry = config.registry || new oauth_adapters_1.OAuthAdapterRegistry();
|
|
46
|
+
const issuerNodeId = config.issuerNodeId || 'trustchain-node';
|
|
47
|
+
const accessExpiresIn = config.accessTokenExpiresIn ?? 3600;
|
|
48
|
+
const refreshExpiresIn = config.refreshTokenExpiresIn ?? 30 * 24 * 3600;
|
|
49
|
+
const linkExpiresIn = config.linkCodeExpiresIn ?? 600;
|
|
50
|
+
// 跑 migrations (idempotent, fail loud)
|
|
51
|
+
(0, oauth_migrate_1.runOAuthBridgeMigrations)(db);
|
|
52
|
+
const router = (0, express_1.Router)();
|
|
53
|
+
// ============================================================
|
|
54
|
+
// 1. POST /api/oauth/wechat/login
|
|
55
|
+
// ============================================================
|
|
56
|
+
router.post('/wechat/login', async (req, res) => {
|
|
57
|
+
try {
|
|
58
|
+
const { code } = req.body || {};
|
|
59
|
+
if (!code || typeof code !== 'string') {
|
|
60
|
+
return res.status(400).json({ error: 'code required' });
|
|
61
|
+
}
|
|
62
|
+
const result = await handleSocialLogin({
|
|
63
|
+
db,
|
|
64
|
+
registry,
|
|
65
|
+
platform: 'wechat',
|
|
66
|
+
platformCode: code,
|
|
67
|
+
issuerNodeId,
|
|
68
|
+
accessExpiresIn,
|
|
69
|
+
refreshExpiresIn,
|
|
70
|
+
});
|
|
71
|
+
res.json(result);
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
console.error('[OAuthBridge] wechat/login error:', e);
|
|
75
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
// ============================================================
|
|
79
|
+
// 2. POST /api/oauth/alipay/login
|
|
80
|
+
// ============================================================
|
|
81
|
+
router.post('/alipay/login', async (req, res) => {
|
|
82
|
+
try {
|
|
83
|
+
const { auth_code, code } = req.body || {};
|
|
84
|
+
const platformCode = auth_code || code; // 兼容两种命名
|
|
85
|
+
if (!platformCode || typeof platformCode !== 'string') {
|
|
86
|
+
return res.status(400).json({ error: 'auth_code required' });
|
|
87
|
+
}
|
|
88
|
+
const result = await handleSocialLogin({
|
|
89
|
+
db,
|
|
90
|
+
registry,
|
|
91
|
+
platform: 'alipay',
|
|
92
|
+
platformCode,
|
|
93
|
+
issuerNodeId,
|
|
94
|
+
accessExpiresIn,
|
|
95
|
+
refreshExpiresIn,
|
|
96
|
+
});
|
|
97
|
+
res.json(result);
|
|
98
|
+
}
|
|
99
|
+
catch (e) {
|
|
100
|
+
console.error('[OAuthBridge] alipay/login error:', e);
|
|
101
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
// ============================================================
|
|
105
|
+
// 3. POST /api/oauth/douyin/login
|
|
106
|
+
// ============================================================
|
|
107
|
+
router.post('/douyin/login', async (req, res) => {
|
|
108
|
+
try {
|
|
109
|
+
const { code } = req.body || {};
|
|
110
|
+
if (!code || typeof code !== 'string') {
|
|
111
|
+
return res.status(400).json({ error: 'code required' });
|
|
112
|
+
}
|
|
113
|
+
const result = await handleSocialLogin({
|
|
114
|
+
db,
|
|
115
|
+
registry,
|
|
116
|
+
platform: 'douyin',
|
|
117
|
+
platformCode: code,
|
|
118
|
+
issuerNodeId,
|
|
119
|
+
accessExpiresIn,
|
|
120
|
+
refreshExpiresIn,
|
|
121
|
+
});
|
|
122
|
+
res.json(result);
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
console.error('[OAuthBridge] douyin/login error:', e);
|
|
126
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
// ============================================================
|
|
130
|
+
// 4. POST /api/oauth/link
|
|
131
|
+
// 已有 chain_address 想绑新平台 → link_code
|
|
132
|
+
// 实战: 需已登录 (Bearer JWT), 用 sub 当 chain_address
|
|
133
|
+
// ============================================================
|
|
134
|
+
router.post('/link', async (req, res) => {
|
|
135
|
+
try {
|
|
136
|
+
// 验证 Bearer JWT
|
|
137
|
+
const claims = await verifyBearerOrThrow(req);
|
|
138
|
+
const chainAddress = claims.sub;
|
|
139
|
+
const { platform, code } = req.body || {};
|
|
140
|
+
if (!ALLOWED_PLATFORMS.includes(platform)) {
|
|
141
|
+
return res.status(400).json({ error: 'platform must be wechat/alipay/douyin' });
|
|
142
|
+
}
|
|
143
|
+
if (!code || typeof code !== 'string') {
|
|
144
|
+
return res.status(400).json({ error: 'code required' });
|
|
145
|
+
}
|
|
146
|
+
// 调 adapter 拿 openid
|
|
147
|
+
const adapter = registry.get(platform);
|
|
148
|
+
const loginResult = await adapter.codeToProfile(code);
|
|
149
|
+
// 创建 link_code
|
|
150
|
+
const linkCode = (0, crypto_1.generateRandomCode)(16);
|
|
151
|
+
const now = Date.now();
|
|
152
|
+
const expiresAt = now + linkExpiresIn * 1000;
|
|
153
|
+
db.prepare(`INSERT INTO oauth_link_codes (user_id, platform, code, openid, expires_at, used, created_at)
|
|
154
|
+
VALUES (?, ?, ?, ?, ?, 0, ?)`).run(claims.sub, platform, linkCode, loginResult.profile.openid, expiresAt, now);
|
|
155
|
+
res.json({
|
|
156
|
+
ok: true,
|
|
157
|
+
link_code: linkCode,
|
|
158
|
+
platform,
|
|
159
|
+
openid: loginResult.profile.openid,
|
|
160
|
+
expires_at: expiresAt,
|
|
161
|
+
expires_in: linkExpiresIn,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
catch (e) {
|
|
165
|
+
if (e instanceof jwt_1.JwtVerifyError) {
|
|
166
|
+
return res.status(401).json({ error: e.code, detail: e.message });
|
|
167
|
+
}
|
|
168
|
+
console.error('[OAuthBridge] link error:', e);
|
|
169
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
// ============================================================
|
|
173
|
+
// 5. POST /api/oauth/link/confirm
|
|
174
|
+
// link_code + confirm → 写入 users.wechat_openid 等
|
|
175
|
+
// ============================================================
|
|
176
|
+
router.post('/link/confirm', async (req, res) => {
|
|
177
|
+
try {
|
|
178
|
+
const { link_code, confirm } = req.body || {};
|
|
179
|
+
if (!link_code || typeof link_code !== 'string') {
|
|
180
|
+
return res.status(400).json({ error: 'link_code required' });
|
|
181
|
+
}
|
|
182
|
+
if (confirm !== true) {
|
|
183
|
+
return res.status(400).json({ error: 'confirm: true required' });
|
|
184
|
+
}
|
|
185
|
+
const now = Date.now();
|
|
186
|
+
const row = db
|
|
187
|
+
.prepare(`SELECT * FROM oauth_link_codes WHERE code = ? AND used = 0`)
|
|
188
|
+
.get(link_code);
|
|
189
|
+
if (!row) {
|
|
190
|
+
return res.status(404).json({ error: 'link_code not found or used' });
|
|
191
|
+
}
|
|
192
|
+
if (row.expires_at < now) {
|
|
193
|
+
return res.status(410).json({ error: 'link_code expired' });
|
|
194
|
+
}
|
|
195
|
+
if (!row.openid) {
|
|
196
|
+
return res
|
|
197
|
+
.status(500)
|
|
198
|
+
.json({ error: 'link_code_corrupt', detail: 'openid missing (schema v2 必填)' });
|
|
199
|
+
}
|
|
200
|
+
// 拿 user 当前状态, 写入新平台 openid
|
|
201
|
+
const userRow = db.prepare(`SELECT id, chain_address FROM users WHERE id = ?`).get(row.user_id);
|
|
202
|
+
if (!userRow) {
|
|
203
|
+
return res.status(404).json({ error: 'user_not_found' });
|
|
204
|
+
}
|
|
205
|
+
// 写 openid 到 users 表 (3 平台不同列)
|
|
206
|
+
if (row.platform === 'wechat') {
|
|
207
|
+
db.prepare(`UPDATE users SET wechat_openid = ? WHERE id = ?`).run(row.openid, row.user_id);
|
|
208
|
+
}
|
|
209
|
+
else if (row.platform === 'alipay') {
|
|
210
|
+
db.prepare(`UPDATE users SET alipay_userid = ? WHERE id = ?`).run(row.openid, row.user_id);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
// 抖音走 other_openids JSON
|
|
214
|
+
const cur = db.prepare(`SELECT other_openids FROM users WHERE id = ?`).get(row.user_id);
|
|
215
|
+
let obj = {};
|
|
216
|
+
if (cur?.other_openids) {
|
|
217
|
+
try {
|
|
218
|
+
obj = JSON.parse(cur.other_openids);
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
obj = {};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
obj[row.platform] = row.openid;
|
|
225
|
+
db.prepare(`UPDATE users SET other_openids = ? WHERE id = ?`).run(JSON.stringify(obj), row.user_id);
|
|
226
|
+
}
|
|
227
|
+
// 标记 used
|
|
228
|
+
db.prepare(`UPDATE oauth_link_codes SET used = 1 WHERE id = ?`).run(row.id);
|
|
229
|
+
res.json({
|
|
230
|
+
ok: true,
|
|
231
|
+
user_id: row.user_id,
|
|
232
|
+
chain_address: userRow.chain_address,
|
|
233
|
+
platform: row.platform,
|
|
234
|
+
openid: row.openid,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
catch (e) {
|
|
238
|
+
console.error('[OAuthBridge] link/confirm error:', e);
|
|
239
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
// ============================================================
|
|
243
|
+
// 6. POST /api/oauth/refresh
|
|
244
|
+
// refresh_token → new access_token (refresh token 也 rotation)
|
|
245
|
+
// ============================================================
|
|
246
|
+
router.post('/refresh', async (req, res) => {
|
|
247
|
+
try {
|
|
248
|
+
const { refresh_token } = req.body || {};
|
|
249
|
+
if (!refresh_token || typeof refresh_token !== 'string') {
|
|
250
|
+
return res.status(400).json({ error: 'refresh_token required' });
|
|
251
|
+
}
|
|
252
|
+
const now = Date.now();
|
|
253
|
+
const row = db
|
|
254
|
+
.prepare(`SELECT * FROM oauth_bridge_tokens WHERE refresh_token = ? AND revoked = 0`)
|
|
255
|
+
.get(refresh_token);
|
|
256
|
+
if (!row) {
|
|
257
|
+
return res.status(401).json({ error: 'invalid_refresh_token' });
|
|
258
|
+
}
|
|
259
|
+
if (row.expires_at < now) {
|
|
260
|
+
return res.status(401).json({ error: 'refresh_token_expired' });
|
|
261
|
+
}
|
|
262
|
+
const userRow = db.prepare(`SELECT chain_address FROM users WHERE id = ?`).get(row.user_id);
|
|
263
|
+
if (!userRow || !userRow.chain_address) {
|
|
264
|
+
return res.status(404).json({ error: 'user_not_found' });
|
|
265
|
+
}
|
|
266
|
+
// 撤销旧 token (rotation)
|
|
267
|
+
db.prepare(`UPDATE oauth_bridge_tokens SET revoked = 1 WHERE id = ?`).run(row.id);
|
|
268
|
+
// 签新 access_token + refresh_token
|
|
269
|
+
const newAccess = (0, jwt_1.signJwt)({
|
|
270
|
+
sub: userRow.chain_address,
|
|
271
|
+
chain_address: userRow.chain_address,
|
|
272
|
+
platform: row.platform,
|
|
273
|
+
openid: row.openid,
|
|
274
|
+
}, { expiresIn: accessExpiresIn }, issuerNodeId);
|
|
275
|
+
const newRefresh = (0, crypto_1.generateRefreshToken)();
|
|
276
|
+
const newExpiresAt = now + refreshExpiresIn * 1000;
|
|
277
|
+
db.prepare(`INSERT INTO oauth_bridge_tokens (user_id, platform, openid, access_token, refresh_token, expires_at, scope, created_at)
|
|
278
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run(row.user_id, row.platform, row.openid, newAccess, newRefresh, newExpiresAt, row.scope ?? '', now);
|
|
279
|
+
res.json({
|
|
280
|
+
access_token: newAccess,
|
|
281
|
+
refresh_token: newRefresh,
|
|
282
|
+
token_type: 'Bearer',
|
|
283
|
+
expires_in: accessExpiresIn,
|
|
284
|
+
platform: row.platform,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
catch (e) {
|
|
288
|
+
console.error('[OAuthBridge] refresh error:', e);
|
|
289
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
// ============================================================
|
|
293
|
+
// 7. GET /api/oauth/user/:address
|
|
294
|
+
// 查 user 全平台 openid
|
|
295
|
+
// ============================================================
|
|
296
|
+
router.get('/user/:address', async (req, res) => {
|
|
297
|
+
try {
|
|
298
|
+
const address = String(req.params.address || '');
|
|
299
|
+
if (!address || !address.startsWith('tct1')) {
|
|
300
|
+
return res.status(400).json({ error: 'invalid chain address (must start with tct1)' });
|
|
301
|
+
}
|
|
302
|
+
const userRow = db
|
|
303
|
+
.prepare(`SELECT id, chain_address, wechat_openid, alipay_userid, other_openids, created_at, last_login_at
|
|
304
|
+
FROM users WHERE chain_address = ? OR address = ?`)
|
|
305
|
+
.get(address, address);
|
|
306
|
+
if (!userRow) {
|
|
307
|
+
return res.status(404).json({ error: 'user_not_found' });
|
|
308
|
+
}
|
|
309
|
+
let otherOpenids = {};
|
|
310
|
+
if (userRow.other_openids) {
|
|
311
|
+
try {
|
|
312
|
+
otherOpenids = JSON.parse(userRow.other_openids);
|
|
313
|
+
}
|
|
314
|
+
catch {
|
|
315
|
+
// 忽略 JSON parse 错 (data 损坏)
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
res.json({
|
|
319
|
+
user_id: userRow.id,
|
|
320
|
+
chain_address: userRow.chain_address,
|
|
321
|
+
platforms: {
|
|
322
|
+
wechat: !!userRow.wechat_openid,
|
|
323
|
+
alipay: !!userRow.alipay_userid,
|
|
324
|
+
douyin: !!otherOpenids.douyin,
|
|
325
|
+
github: !!otherOpenids.github,
|
|
326
|
+
google: !!otherOpenids.google,
|
|
327
|
+
},
|
|
328
|
+
openids: {
|
|
329
|
+
wechat: userRow.wechat_openid,
|
|
330
|
+
alipay: userRow.alipay_userid,
|
|
331
|
+
...otherOpenids,
|
|
332
|
+
},
|
|
333
|
+
created_at: userRow.created_at,
|
|
334
|
+
last_login_at: userRow.last_login_at,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
catch (e) {
|
|
338
|
+
console.error('[OAuthBridge] user/:address error:', e);
|
|
339
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
// ============================================================
|
|
343
|
+
// 8. POST /api/oauth/unlink
|
|
344
|
+
// 解绑某平台 (至少留 1 登录方式)
|
|
345
|
+
// ============================================================
|
|
346
|
+
router.post('/unlink', async (req, res) => {
|
|
347
|
+
try {
|
|
348
|
+
const claims = await verifyBearerOrThrow(req);
|
|
349
|
+
const { platform } = req.body || {};
|
|
350
|
+
if (!ALLOWED_PLATFORMS.includes(platform)) {
|
|
351
|
+
return res.status(400).json({ error: 'platform must be wechat/alipay/douyin' });
|
|
352
|
+
}
|
|
353
|
+
const userRow = db
|
|
354
|
+
.prepare(`SELECT wechat_openid, alipay_userid, other_openids FROM users WHERE id = ?`)
|
|
355
|
+
.get(claims.sub);
|
|
356
|
+
if (!userRow) {
|
|
357
|
+
return res.status(404).json({ error: 'user_not_found' });
|
|
358
|
+
}
|
|
359
|
+
// 计算当前登录方式数量
|
|
360
|
+
const loginMethods = [];
|
|
361
|
+
if (userRow.wechat_openid)
|
|
362
|
+
loginMethods.push('wechat');
|
|
363
|
+
if (userRow.alipay_userid)
|
|
364
|
+
loginMethods.push('alipay');
|
|
365
|
+
let otherObj = {};
|
|
366
|
+
if (userRow.other_openids) {
|
|
367
|
+
try {
|
|
368
|
+
otherObj = JSON.parse(userRow.other_openids);
|
|
369
|
+
for (const k of Object.keys(otherObj)) {
|
|
370
|
+
if (otherObj[k])
|
|
371
|
+
loginMethods.push(k);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
catch { }
|
|
375
|
+
}
|
|
376
|
+
// 解绑后还剩几个?
|
|
377
|
+
const remaining = loginMethods.filter((m) => m !== platform);
|
|
378
|
+
if (remaining.length === 0) {
|
|
379
|
+
return res
|
|
380
|
+
.status(400)
|
|
381
|
+
.json({ error: 'must_keep_at_least_one_login_method' });
|
|
382
|
+
}
|
|
383
|
+
// 清空
|
|
384
|
+
let col = null;
|
|
385
|
+
if (platform === 'wechat')
|
|
386
|
+
col = 'wechat_openid';
|
|
387
|
+
else if (platform === 'alipay')
|
|
388
|
+
col = 'alipay_userid';
|
|
389
|
+
else {
|
|
390
|
+
// 抖音走 other_openids
|
|
391
|
+
delete otherObj[platform];
|
|
392
|
+
db.prepare(`UPDATE users SET other_openids = ? WHERE id = ?`).run(JSON.stringify(otherObj), claims.sub);
|
|
393
|
+
return res.json({ ok: true, unlinked: platform, remaining_methods: remaining });
|
|
394
|
+
}
|
|
395
|
+
db.prepare(`UPDATE users SET ${col} = NULL WHERE id = ?`).run(claims.sub);
|
|
396
|
+
res.json({ ok: true, unlinked: platform, remaining_methods: remaining });
|
|
397
|
+
}
|
|
398
|
+
catch (e) {
|
|
399
|
+
if (e instanceof jwt_1.JwtVerifyError) {
|
|
400
|
+
return res.status(401).json({ error: e.code, detail: e.message });
|
|
401
|
+
}
|
|
402
|
+
console.error('[OAuthBridge] unlink error:', e);
|
|
403
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
// ============================================================
|
|
407
|
+
// 9. GET /api/oauth/apps/:id
|
|
408
|
+
// OAuth 应用详情 (跟 OAuth 2.0 protocol 共用)
|
|
409
|
+
// MVP: 简单返回 mock, 跟 AuthPlugin oauth_apps 后续对接
|
|
410
|
+
// ============================================================
|
|
411
|
+
router.get('/apps/:id', async (req, res) => {
|
|
412
|
+
try {
|
|
413
|
+
const { id } = req.params;
|
|
414
|
+
if (!id)
|
|
415
|
+
return res.status(400).json({ error: 'id required' });
|
|
416
|
+
// 实战: 跟 oauth_apps 表对接
|
|
417
|
+
const row = db
|
|
418
|
+
.prepare(`SELECT id, name, description, client_id, redirect_uris, scopes, owner_address, created_at, is_active
|
|
419
|
+
FROM oauth_apps WHERE id = ?`)
|
|
420
|
+
.get(id);
|
|
421
|
+
if (!row) {
|
|
422
|
+
return res.status(404).json({ error: 'app_not_found' });
|
|
423
|
+
}
|
|
424
|
+
if (row.is_active !== 1) {
|
|
425
|
+
return res.status(410).json({ error: 'app_disabled' });
|
|
426
|
+
}
|
|
427
|
+
res.json({
|
|
428
|
+
app: {
|
|
429
|
+
id: row.id,
|
|
430
|
+
name: row.name,
|
|
431
|
+
description: row.description,
|
|
432
|
+
client_id: row.client_id,
|
|
433
|
+
redirect_uris: JSON.parse(row.redirect_uris),
|
|
434
|
+
scopes: JSON.parse(row.scopes),
|
|
435
|
+
owner_address: row.owner_address,
|
|
436
|
+
created_at: row.created_at,
|
|
437
|
+
},
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
catch (e) {
|
|
441
|
+
console.error('[OAuthBridge] apps/:id error:', e);
|
|
442
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
// ============================================================
|
|
446
|
+
// 10. POST /api/oauth/authorize
|
|
447
|
+
// OAuth authorize 页面后端 (返回授权页 metadata)
|
|
448
|
+
// ============================================================
|
|
449
|
+
router.post('/authorize', async (req, res) => {
|
|
450
|
+
try {
|
|
451
|
+
const claims = await verifyBearerOrThrow(req);
|
|
452
|
+
const { client_id, redirect_uri, scope, state, approved } = req.body || {};
|
|
453
|
+
if (!client_id || !redirect_uri || !scope) {
|
|
454
|
+
return res.status(400).json({ error: 'client_id/redirect_uri/scope required' });
|
|
455
|
+
}
|
|
456
|
+
// 查 app
|
|
457
|
+
const appRow = db
|
|
458
|
+
.prepare(`SELECT * FROM oauth_apps WHERE client_id = ? AND is_active = 1`)
|
|
459
|
+
.get(client_id);
|
|
460
|
+
if (!appRow)
|
|
461
|
+
return res.status(404).json({ error: 'app_not_found' });
|
|
462
|
+
// 验证 redirect_uri
|
|
463
|
+
const allowedRedirects = JSON.parse(appRow.redirect_uris);
|
|
464
|
+
if (!allowedRedirects.includes(redirect_uri)) {
|
|
465
|
+
return res.status(400).json({ error: 'invalid_redirect_uri' });
|
|
466
|
+
}
|
|
467
|
+
// 拒绝
|
|
468
|
+
if (!approved) {
|
|
469
|
+
const denyUrl = new URL(redirect_uri);
|
|
470
|
+
denyUrl.searchParams.set('error', 'access_denied');
|
|
471
|
+
if (state)
|
|
472
|
+
denyUrl.searchParams.set('state', state);
|
|
473
|
+
return res.json({ redirect_url: denyUrl.toString() });
|
|
474
|
+
}
|
|
475
|
+
// 实战锁版: 简化 authorize — 返回 redirect_url with code (跟 OAuth 2.0 类似)
|
|
476
|
+
// 真实 code 签发逻辑省略 (属于 OAuth 2.0 protocol 范围, AuthPlugin 有完整实现)
|
|
477
|
+
const code = (0, crypto_1.sha256Hex)(`${client_id}:${claims.sub}:${Date.now()}:${(0, crypto_1.generateRandomCode)(8)}`).slice(0, 32);
|
|
478
|
+
const okUrl = new URL(redirect_uri);
|
|
479
|
+
okUrl.searchParams.set('code', code);
|
|
480
|
+
if (state)
|
|
481
|
+
okUrl.searchParams.set('state', state);
|
|
482
|
+
res.json({
|
|
483
|
+
redirect_url: okUrl.toString(),
|
|
484
|
+
code,
|
|
485
|
+
scope: scope.split(' '),
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
catch (e) {
|
|
489
|
+
if (e instanceof jwt_1.JwtVerifyError) {
|
|
490
|
+
return res.status(401).json({ error: e.code, detail: e.message });
|
|
491
|
+
}
|
|
492
|
+
console.error('[OAuthBridge] authorize error:', e);
|
|
493
|
+
res.status(500).json({ error: 'internal', detail: e?.message });
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
// ============================================================
|
|
497
|
+
// Health check (实战锁版)
|
|
498
|
+
// ============================================================
|
|
499
|
+
router.get('/health', (_req, res) => {
|
|
500
|
+
res.json({
|
|
501
|
+
ok: true,
|
|
502
|
+
service: 'oauth-bridge',
|
|
503
|
+
version: '0.1',
|
|
504
|
+
platforms: ALLOWED_PLATFORMS,
|
|
505
|
+
mock_mode: registry.list().map((a) => ({ platform: a.platform, mock: a.isMockMode() })),
|
|
506
|
+
issuer: issuerNodeId,
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
return { router, db };
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Social login 核心流程 (3 平台共用):
|
|
513
|
+
* 1. 调 adapter 拿 openid/profile
|
|
514
|
+
* 2. 查 users by openid
|
|
515
|
+
* 3. 存在 → JWT + refresh_token
|
|
516
|
+
* 4. 不存在 → 创建 user (server generate keypair, chain_address 入库)
|
|
517
|
+
* 5. 写 oauth_bridge_tokens
|
|
518
|
+
* 6. 返回 { user, access_token, refresh_token }
|
|
519
|
+
*/
|
|
520
|
+
async function handleSocialLogin(args) {
|
|
521
|
+
const { db, registry, platform, platformCode, issuerNodeId, accessExpiresIn, refreshExpiresIn } = args;
|
|
522
|
+
// 1. 调 adapter
|
|
523
|
+
const adapter = registry.get(platform);
|
|
524
|
+
const loginResult = await adapter.codeToProfile(platformCode);
|
|
525
|
+
const openid = loginResult.profile.openid;
|
|
526
|
+
if (!openid) {
|
|
527
|
+
throw new Error(`[OAuthBridge] ${platform} adapter returned empty openid`);
|
|
528
|
+
}
|
|
529
|
+
// 2. 查 user by openid (3 平台不同列)
|
|
530
|
+
let userRow;
|
|
531
|
+
let userCol;
|
|
532
|
+
if (platform === 'wechat')
|
|
533
|
+
userCol = 'wechat_openid';
|
|
534
|
+
else if (platform === 'alipay')
|
|
535
|
+
userCol = 'alipay_userid';
|
|
536
|
+
else
|
|
537
|
+
userCol = 'other_openids'; // 抖音走 JSON
|
|
538
|
+
if (platform === 'douyin') {
|
|
539
|
+
// 查 JSON 包含 douyin
|
|
540
|
+
const allUsers = db
|
|
541
|
+
.prepare(`SELECT id, chain_address, other_openids FROM users WHERE other_openids LIKE ?`)
|
|
542
|
+
.all(`%"douyin":"${openid}"%`);
|
|
543
|
+
userRow = allUsers[0];
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
userRow = db
|
|
547
|
+
.prepare(`SELECT id, chain_address FROM users WHERE ${userCol} = ?`)
|
|
548
|
+
.get(openid);
|
|
549
|
+
}
|
|
550
|
+
// 3. 不存在 → 创建 user
|
|
551
|
+
// 实战锁版 (Lesson #313): user.id = chain_address (主键 = 业务身份)
|
|
552
|
+
// JWT sub = chain_address, 三处一致 (Lesson #335)
|
|
553
|
+
if (!userRow) {
|
|
554
|
+
const creds = (0, crypto_1.generateNewUserCredentials)();
|
|
555
|
+
const chainAddress = creds.chainAddress;
|
|
556
|
+
const now = Date.now();
|
|
557
|
+
// 写 users (id = chain_address, 主键 = 业务身份)
|
|
558
|
+
if (platform === 'wechat') {
|
|
559
|
+
db.prepare(`INSERT INTO users (id, username, address, chain_address, wechat_openid, created_at, updated_at, is_active)
|
|
560
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, 1)`).run(chainAddress, `wx_${openid.slice(0, 12)}`, chainAddress, chainAddress, openid, now, now);
|
|
561
|
+
}
|
|
562
|
+
else if (platform === 'alipay') {
|
|
563
|
+
db.prepare(`INSERT INTO users (id, username, address, chain_address, alipay_userid, created_at, updated_at, is_active)
|
|
564
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, 1)`).run(chainAddress, `ali_${openid.slice(0, 12)}`, chainAddress, chainAddress, openid, now, now);
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
db.prepare(`INSERT INTO users (id, username, address, chain_address, other_openids, created_at, updated_at, is_active)
|
|
568
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, 1)`).run(chainAddress, `dy_${openid.slice(0, 12)}`, chainAddress, chainAddress, JSON.stringify({ douyin: openid }), now, now);
|
|
569
|
+
}
|
|
570
|
+
userRow = { id: chainAddress, chain_address: chainAddress };
|
|
571
|
+
// 输出 mnemonic (一次性, MVP server-generated 模式)
|
|
572
|
+
// 实战锁版: 通过 HTTPS + 单次返回, 不持久化到 DB
|
|
573
|
+
// eslint-disable-next-line no-console
|
|
574
|
+
console.log(`[OAuthBridge] created user ${chainAddress} via ${platform}, mnemonic (ONCE): ${creds.mnemonic}`);
|
|
575
|
+
}
|
|
576
|
+
const chainAddress = userRow.chain_address;
|
|
577
|
+
const userId = userRow.id; // = chain_address (Lesson #313 主键)
|
|
578
|
+
// 4. 签 JWT
|
|
579
|
+
const accessToken = (0, jwt_1.signJwt)({
|
|
580
|
+
sub: chainAddress,
|
|
581
|
+
chain_address: chainAddress,
|
|
582
|
+
platform,
|
|
583
|
+
openid,
|
|
584
|
+
}, { expiresIn: accessExpiresIn }, issuerNodeId);
|
|
585
|
+
const refreshToken = (0, crypto_1.generateRefreshToken)();
|
|
586
|
+
const now = Date.now();
|
|
587
|
+
const accessExpiresAt = now + accessExpiresIn * 1000;
|
|
588
|
+
const refreshExpiresAt = now + refreshExpiresIn * 1000;
|
|
589
|
+
// 5. 写 oauth_bridge_tokens
|
|
590
|
+
db.prepare(`INSERT INTO oauth_bridge_tokens (user_id, platform, openid, access_token, refresh_token, expires_at, scope, created_at)
|
|
591
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run(userId, platform, openid, accessToken, refreshToken, refreshExpiresAt, loginResult.scope || '', now);
|
|
592
|
+
// 6. 更新 last_login_at
|
|
593
|
+
db.prepare(`UPDATE users SET last_login_at = ? WHERE id = ?`).run(now, userId);
|
|
594
|
+
return {
|
|
595
|
+
user: {
|
|
596
|
+
id: userId,
|
|
597
|
+
chain_address: chainAddress,
|
|
598
|
+
platform,
|
|
599
|
+
openid,
|
|
600
|
+
},
|
|
601
|
+
access_token: accessToken,
|
|
602
|
+
refresh_token: refreshToken,
|
|
603
|
+
token_type: 'Bearer',
|
|
604
|
+
expires_in: accessExpiresIn,
|
|
605
|
+
expires_at: accessExpiresAt,
|
|
606
|
+
platform,
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* 验证 Bearer JWT, 抛错 (Lesson #266a fail loud)
|
|
611
|
+
*/
|
|
612
|
+
async function verifyBearerOrThrow(req) {
|
|
613
|
+
const authHeader = req.headers.authorization;
|
|
614
|
+
if (!authHeader || !authHeader.startsWith('Bearer ')) {
|
|
615
|
+
const e = new jwt_1.JwtVerifyError('malformed', 'Missing Bearer token');
|
|
616
|
+
throw e;
|
|
617
|
+
}
|
|
618
|
+
const token = authHeader.substring(7);
|
|
619
|
+
return (0, jwt_1.verifyJwt)(token);
|
|
620
|
+
}
|
|
621
|
+
// ===================== Public re-exports =====================
|
|
622
|
+
var oauth_migrate_2 = require("../db/oauth-migrate");
|
|
623
|
+
Object.defineProperty(exports, "runOAuthBridgeMigrations", { enumerable: true, get: function () { return oauth_migrate_2.runOAuthBridgeMigrations; } });
|
|
624
|
+
//# sourceMappingURL=oauth-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-bridge.js","sourceRoot":"","sources":["../../src/api/oauth-bridge.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;AAqDH,0DAukBC;AA1nBD,qCAAoD;AAEpD,sCAMsB;AACtB,4CAMyB;AACzB,qDAI0B;AAC1B,uDAA+D;AAuB/D,MAAM,iBAAiB,GAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE1E;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,MAAyB;IAC/D,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,IAAI,qCAAoB,EAAE,CAAC;IAC/D,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,iBAAiB,CAAC;IAC9D,MAAM,eAAe,GAAG,MAAM,CAAC,oBAAoB,IAAI,IAAI,CAAC;IAC5D,MAAM,gBAAgB,GAAG,MAAM,CAAC,qBAAqB,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACxE,MAAM,aAAa,GAAG,MAAM,CAAC,iBAAiB,IAAI,GAAG,CAAC;IAEtD,uCAAuC;IACvC,IAAA,wCAAwB,EAAC,EAAE,CAAC,CAAC;IAE7B,MAAM,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;IAExB,+DAA+D;IAC/D,kCAAkC;IAClC,+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