@t-0/provider-starter-ts 1.1.9 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t-0/provider-starter-ts",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "CLI tool to scaffold a Node.js t-0 Network integration service",
5
5
  "main": "dist/create.js",
6
6
  "bin": {
@@ -12,7 +12,7 @@
12
12
  "author": "",
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@t-0/provider-sdk": "^1.1.9",
15
+ "@t-0/provider-sdk": "^1.1.11",
16
16
  "dotenv": "^16.3.1",
17
17
  "tiny-invariant": "^1.3.3"
18
18
  },
@@ -17,6 +17,8 @@ export default async function publishQuotes(networkClient: Client<typeof Network
17
17
  rate: toProtoDecimal(873, -3), // rate 0.873
18
18
  maxAmount: toProtoDecimal(25000, 0), // maximum amount in USD, could be 1000,5000,10000 or 25000
19
19
  clientQuoteId: randomUUID(),
20
+ // optional: set fix to charge a fixed fee per transfer (e.g. wire fees)
21
+ // fix: toProtoDecimal(5, 0), // $5 fixed charge
20
22
  }],
21
23
  currency: 'EUR',
22
24
  expiration: timestampFromDate(new Date(Date.now() + 30 * 1000)), // expiration time (30 seconds from now)
@@ -48,6 +48,7 @@ const CreateProviderService = (networkClient: Client<typeof NetworkService>) =>
48
48
  }
49
49
  })
50
50
  }, 2000);
51
+ // optional: if your provider has multiple legal entities, set beneficiaryProviderLegalEntityId
51
52
  return {
52
53
  result: {
53
54
  case: "accepted",
@@ -70,6 +71,8 @@ const CreateProviderService = (networkClient: Client<typeof NetworkService>) =>
70
71
 
71
72
  async approvePaymentQuote(req: ApprovePaymentQuoteRequest, _: HandlerContext) {
72
73
  // TODO: when the payment goes through the Manual AML Check on the pay-out provider side, the provider submitted the payment will have a last look to approve final quote
74
+ // The request includes payOutFix — the fixed charge in USD for this payout.
75
+ // Consider it alongside payOutRate and payOutAmount when deciding to accept.
73
76
  console.log(`Received approve payment quote request for ${req.paymentId}`)
74
77
  return {
75
78
  result: {