From 426954ed20806c3763c46be809b78bae5722743b Mon Sep 17 00:00:00 2001 From: Stephan D Date: Fri, 16 Jan 2026 14:36:28 +0100 Subject: [PATCH] deps bump --- api/gateway/chain/go.mod | 2 +- api/gateway/chain/go.sum | 4 +- .../seed_payment_plan_templates.mongosh.js | 94 +++++++++++++++++++ frontend/pshared/pubspec.yaml | 2 +- 4 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 api/payments/orchestrator/scripts/seed_payment_plan_templates.mongosh.js diff --git a/api/gateway/chain/go.mod b/api/gateway/chain/go.mod index 1b1614f..8c74452 100644 --- a/api/gateway/chain/go.mod +++ b/api/gateway/chain/go.mod @@ -22,7 +22,7 @@ require ( require ( github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20260112020553-64c30dda3cfd // indirect + github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20260116123424-9c8b2bad3688 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.24.4 // indirect github.com/bmatcuk/doublestar/v4 v4.9.2 // indirect diff --git a/api/gateway/chain/go.sum b/api/gateway/chain/go.sum index 554829f..8c90834 100644 --- a/api/gateway/chain/go.sum +++ b/api/gateway/chain/go.sum @@ -6,8 +6,8 @@ github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20260112020553-64c30dda3cfd h1:ifR6oQZU+7Lqemu0dqf6X4pVWuzmMeKX6WtwZ87rH+M= -github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20260112020553-64c30dda3cfd/go.mod h1:ioLG6R+5bUSO1oeGSDxOV3FADARuMoytZCSX6MEMQkI= +github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20260116123424-9c8b2bad3688 h1:heyVIwznmKcWu1dhijYnRnHTvRzVgWduNlLcRXFVxP8= +github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20260116123424-9c8b2bad3688/go.mod h1:ioLG6R+5bUSO1oeGSDxOV3FADARuMoytZCSX6MEMQkI= github.com/VictoriaMetrics/fastcache v1.13.0 h1:AW4mheMR5Vd9FkAPUv+NH6Nhw+fmbTMGMsNAoA/+4G0= github.com/VictoriaMetrics/fastcache v1.13.0/go.mod h1:hHXhl4DA2fTL2HTZDJFXWgW0LNjo6B+4aj2Wmng3TjU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= diff --git a/api/payments/orchestrator/scripts/seed_payment_plan_templates.mongosh.js b/api/payments/orchestrator/scripts/seed_payment_plan_templates.mongosh.js new file mode 100644 index 0000000..9cf3892 --- /dev/null +++ b/api/payments/orchestrator/scripts/seed_payment_plan_templates.mongosh.js @@ -0,0 +1,94 @@ +(() => { + const dbName = (typeof process !== "undefined" && process.env.MONGO_DB) ? process.env.MONGO_DB : db.getName(); + const targetDb = db.getSiblingDB(dbName); + const collection = targetDb.getCollection("payment_plan_templates"); + const now = new Date(); + + const templates = [ + { + fromRail: "CRYPTO", + toRail: "LEDGER", + network: "", + isEnabled: true, + steps: [ + { stepId: "crypto_send", rail: "CRYPTO", operation: "payout.crypto" }, + { stepId: "crypto_fee", rail: "CRYPTO", operation: "fee.send", dependsOn: ["crypto_send"] }, + { stepId: "settlement_send", rail: "PROVIDER_SETTLEMENT", operation: "send", dependsOn: ["crypto_send"] }, + { stepId: "settlement_observe", rail: "PROVIDER_SETTLEMENT", operation: "observe.confirm", dependsOn: ["settlement_send"] }, + { stepId: "ledger_credit", rail: "LEDGER", operation: "ledger.credit", dependsOn: ["settlement_observe"] }, + ], + }, + { + fromRail: "LEDGER", + toRail: "CARD_PAYOUT", + network: "", + isEnabled: true, + steps: [ + { stepId: "ledger_block", rail: "LEDGER", operation: "ledger.block" }, + { stepId: "card_payout", rail: "CARD_PAYOUT", operation: "payout.card", dependsOn: ["ledger_block"] }, + { + stepId: "ledger_debit", + rail: "LEDGER", + operation: "ledger.debit", + dependsOn: ["card_payout"], + commitPolicy: "AFTER_SUCCESS", + commitAfter: ["card_payout"], + }, + { stepId: "ledger_release", rail: "LEDGER", operation: "ledger.release", dependsOn: ["card_payout"] }, + ], + }, + { + fromRail: "CRYPTO", + toRail: "CARD_PAYOUT", + network: "", + isEnabled: true, + steps: [ + { stepId: "crypto_send", rail: "CRYPTO", operation: "payout.crypto" }, + { stepId: "crypto_fee", rail: "CRYPTO", operation: "fee.send", dependsOn: ["crypto_send"] }, + { stepId: "settlement_send", rail: "PROVIDER_SETTLEMENT", operation: "send", dependsOn: ["crypto_send"] }, + { stepId: "settlement_observe", rail: "PROVIDER_SETTLEMENT", operation: "observe.confirm", dependsOn: ["settlement_send"] }, + { stepId: "ledger_credit", rail: "LEDGER", operation: "ledger.credit", dependsOn: ["settlement_observe"] }, + { stepId: "ledger_block", rail: "LEDGER", operation: "ledger.block", dependsOn: ["ledger_credit"] }, + { stepId: "card_payout", rail: "CARD_PAYOUT", operation: "payout.card", dependsOn: ["ledger_block"] }, + { + stepId: "ledger_debit", + rail: "LEDGER", + operation: "ledger.debit", + dependsOn: ["card_payout"], + commitPolicy: "AFTER_SUCCESS", + commitAfter: ["card_payout"], + }, + { stepId: "ledger_release", rail: "LEDGER", operation: "ledger.release", dependsOn: ["card_payout"] }, + ], + }, + ]; + + const ops = templates.map((tpl) => ({ + updateOne: { + filter: { + fromRail: tpl.fromRail, + toRail: tpl.toRail, + network: tpl.network, + }, + update: { + $set: { + fromRail: tpl.fromRail, + toRail: tpl.toRail, + network: tpl.network, + isEnabled: tpl.isEnabled, + steps: tpl.steps, + updatedAt: now, + }, + $setOnInsert: { + _id: new ObjectId(), + createdAt: now, + }, + }, + upsert: true, + }, + })); + + const result = collection.bulkWrite(ops); + print("Payment plan templates upserted"); + printjson(result); +})(); diff --git a/frontend/pshared/pubspec.yaml b/frontend/pshared/pubspec.yaml index 65f17a1..c882fb8 100644 --- a/frontend/pshared/pubspec.yaml +++ b/frontend/pshared/pubspec.yaml @@ -7,7 +7,7 @@ environment: # Add regular dependencies here. dependencies: - analyzer: 9.0.0 + analyzer: ^10.0.0 json_annotation: ^4.9.0 http: ^1.1.0 provider: ^6.0.5