@t-0/provider-starter-ts 0.4.6 → 0.4.8

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": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "CLI tool to scaffold a Node.js t-0 Network integration service",
5
5
  "main": "dist/create.js",
6
6
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "author": "New Settlement Technologies Inc.",
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
- "@t-0/provider-sdk": "^1.0.48",
33
+ "@t-0/provider-sdk": "^1.0.49",
34
34
  "chalk": "^4.1.2",
35
35
  "fs-extra": "^11.1.1",
36
36
  "inquirer": "^8.2.5"
@@ -11,7 +11,7 @@ export default async function getQuote(networkClient: Client<typeof NetworkServi
11
11
  amount: {
12
12
  amount: {
13
13
  case: 'payInAmount',
14
- value: toProtoDecimal(1000, 0)
14
+ value: toProtoDecimal(10, 0)
15
15
  },
16
16
  }
17
17
  })
@@ -30,6 +30,7 @@ invariant(networkPublicKeyHex, 'Network public key is not set');
30
30
  async function main() {
31
31
  console.log('🚀 Service starting...');
32
32
  console.log(`📡 Port: ${port}`);
33
+ console.log(`🔑 Network Public Key: ${networkPublicKeyHex}`);
33
34
  const networkClient = createClient(privateKeyHex!, endpoint, NetworkService);
34
35
 
35
36
  await publishQuotes(networkClient, quotePublishingInterval)
@@ -15,7 +15,7 @@ export default async function publishQuotes(networkClient: Client<typeof Network
15
15
  bands: [{
16
16
  // note that rate is always USD/XXX, os that for EUR quote should be USD/EUR
17
17
  rate: toProtoDecimal(863, -3), // rate 0.863
18
- maxAmount: toProtoDecimal(1000, 0), // maximum amount in USD, could be 1000,5000,10000 or 25000
18
+ maxAmount: toProtoDecimal(25000, 0), // maximum amount in USD, could be 1000,5000,10000 or 25000
19
19
  clientQuoteId: randomUUID(),
20
20
  }],
21
21
  currency: 'EUR',
@@ -28,7 +28,7 @@ export default async function publishQuotes(networkClient: Client<typeof Network
28
28
  bands: [{
29
29
  // note that rate is always USD/XXX, os that for EUR quote should be USD/EUR
30
30
  rate: toProtoDecimal(873, -3), // rate 0.873
31
- maxAmount: toProtoDecimal(1000, 0), // maximum amount in USD, could be 1000,5000,10000 or 25000
31
+ maxAmount: toProtoDecimal(25000, 0), // maximum amount in USD, could be 1000,5000,10000 or 25000
32
32
  clientQuoteId: randomUUID(),
33
33
  }],
34
34
  currency: 'EUR',
@@ -42,7 +42,7 @@ const CreateProviderService = (networkClient: Client<typeof NetworkService>) =>
42
42
 
43
43
  async updateLimit(req: UpdateLimitRequest, _: HandlerContext) {
44
44
  // TODO: optionally implement updates on your limits and limits usage
45
- console.log(`Received update of limits with provider ${req.limits[0].creditorId}`)
45
+ console.log(`Received update of limits with provider ${req.limits[0].counterpartId}`)
46
46
  return {} as UpdateLimitResponse
47
47
  },
48
48