@t-0/provider-starter-ts 0.2.0 → 0.4.0
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
package/template/src/index.ts
CHANGED
|
@@ -38,7 +38,7 @@ async function main() {
|
|
|
38
38
|
signatureValidation(
|
|
39
39
|
nodeAdapter(
|
|
40
40
|
createService(networkPublicKeyHex!, (r) => {
|
|
41
|
-
r.service(ProviderService, CreateProviderService());
|
|
41
|
+
r.service(ProviderService, CreateProviderService(networkClient));
|
|
42
42
|
})))
|
|
43
43
|
).listen(port);
|
|
44
44
|
console.log("✅ Service ready and is listening at", server.address());
|
|
@@ -54,7 +54,7 @@ async function main() {
|
|
|
54
54
|
|
|
55
55
|
// TODO: Step 2.2 deploy your integration and provide t-0 team base URL of your deployment
|
|
56
56
|
|
|
57
|
-
// TODO: Step 2.3 check that you can submit payment by revisiting ./submit_payment.ts
|
|
57
|
+
// TODO: Step 2.3 check that you can submit payment by revisiting ./submit_payment.ts uncommenting following line
|
|
58
58
|
// await submitPayment(networkClient)
|
|
59
59
|
|
|
60
60
|
// TODO: Step 2.5 ask t-0 team to submit a payment which would trigger your payOut endpoint
|
|
@@ -20,6 +20,19 @@ export default async function publishQuotes(networkClient: Client<typeof Network
|
|
|
20
20
|
quoteType: QuoteType.REALTIME, // REALTIME is only one supported right now
|
|
21
21
|
paymentMethod: PaymentMethodType.SEPA,
|
|
22
22
|
timestamp: timestampFromDate(new Date()), // Current timestamp
|
|
23
|
+
}],
|
|
24
|
+
payOut: [{
|
|
25
|
+
bands: [{
|
|
26
|
+
// note that rate is always USD/XXX, os that for EUR quote should be USD/EUR
|
|
27
|
+
rate: toProtoDecimal(873, -3), // rate 0.873
|
|
28
|
+
maxAmount: toProtoDecimal(1000, 0), // maximum amount in USD, could be 1000,5000,10000 or 25000
|
|
29
|
+
clientQuoteId: randomUUID(),
|
|
30
|
+
}],
|
|
31
|
+
currency: 'EUR',
|
|
32
|
+
expiration: timestampFromDate(new Date(Date.now() + 30 * 1000)), // expiration time (30 seconds from now)
|
|
33
|
+
quoteType: QuoteType.REALTIME, // REALTIME is only one supported right now
|
|
34
|
+
paymentMethod: PaymentMethodType.SEPA,
|
|
35
|
+
timestamp: timestampFromDate(new Date()), // Current timestamp
|
|
23
36
|
}]
|
|
24
37
|
})
|
|
25
38
|
} catch (error) {
|