@riocrypto/common-server 1.0.2570 → 1.0.2572
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.
|
@@ -5,11 +5,18 @@ interface InternalTransferAttrs {
|
|
|
5
5
|
adminId: string;
|
|
6
6
|
liquidityAutomationId?: string;
|
|
7
7
|
transferType: InternalTransferType;
|
|
8
|
-
origin: TreasuryProvider;
|
|
9
|
-
destination: TreasuryProvider;
|
|
10
8
|
amount: number;
|
|
11
9
|
currency: Fiat | Crypto;
|
|
12
|
-
|
|
10
|
+
origin: {
|
|
11
|
+
provider: TreasuryProvider;
|
|
12
|
+
amountSent: number;
|
|
13
|
+
status: InternalTransferStatus;
|
|
14
|
+
};
|
|
15
|
+
destination: {
|
|
16
|
+
provider: TreasuryProvider;
|
|
17
|
+
amountReceived: number;
|
|
18
|
+
status: InternalTransferStatus;
|
|
19
|
+
};
|
|
13
20
|
}
|
|
14
21
|
interface InternalTransferDoc extends mongoose.Document {
|
|
15
22
|
id: string;
|
|
@@ -17,11 +24,18 @@ interface InternalTransferDoc extends mongoose.Document {
|
|
|
17
24
|
liquidityAutomationId?: string;
|
|
18
25
|
createdAt: Date;
|
|
19
26
|
transferType: InternalTransferType;
|
|
20
|
-
origin:
|
|
21
|
-
|
|
27
|
+
origin: {
|
|
28
|
+
provider: TreasuryProvider;
|
|
29
|
+
amountSent: number;
|
|
30
|
+
status: InternalTransferStatus;
|
|
31
|
+
};
|
|
32
|
+
destination: {
|
|
33
|
+
provider: TreasuryProvider;
|
|
34
|
+
amountReceived: number;
|
|
35
|
+
status: InternalTransferStatus;
|
|
36
|
+
};
|
|
22
37
|
amount: number;
|
|
23
38
|
currency: Fiat | Crypto;
|
|
24
|
-
status: InternalTransferStatus;
|
|
25
39
|
}
|
|
26
40
|
interface InternalTransferModel extends mongoose.Model<InternalTransferDoc> {
|
|
27
41
|
build(attrs: InternalTransferAttrs): InternalTransferDoc;
|
|
@@ -25,14 +25,36 @@ const buildInternalTransfer = (mongoose) => {
|
|
|
25
25
|
required: true,
|
|
26
26
|
},
|
|
27
27
|
origin: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
provider: {
|
|
29
|
+
type: String,
|
|
30
|
+
enum: Object.values(common_1.TreasuryProvider),
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
amountSent: {
|
|
34
|
+
type: Number,
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
status: {
|
|
38
|
+
type: String,
|
|
39
|
+
enum: Object.values(common_1.InternalTransferStatus),
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
31
42
|
},
|
|
32
43
|
destination: {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
provider: {
|
|
45
|
+
type: String,
|
|
46
|
+
enum: Object.values(common_1.TreasuryProvider),
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
amountReceived: {
|
|
50
|
+
type: Number,
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
status: {
|
|
54
|
+
type: String,
|
|
55
|
+
enum: Object.values(common_1.InternalTransferStatus),
|
|
56
|
+
required: true,
|
|
57
|
+
},
|
|
36
58
|
},
|
|
37
59
|
amount: {
|
|
38
60
|
type: Number,
|
|
@@ -42,11 +64,6 @@ const buildInternalTransfer = (mongoose) => {
|
|
|
42
64
|
type: String,
|
|
43
65
|
required: true,
|
|
44
66
|
},
|
|
45
|
-
status: {
|
|
46
|
-
type: String,
|
|
47
|
-
enum: Object.values(common_1.InternalTransferStatus),
|
|
48
|
-
required: true,
|
|
49
|
-
},
|
|
50
67
|
}, {
|
|
51
68
|
toJSON: {
|
|
52
69
|
transform(doc, ret) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Country, DeferredPaymentType, Fiat, FXProvider, Processor, Side } from "@riocrypto/common";
|
|
1
|
+
import { Country, DeferredPaymentType, EmarketsSettlementType, Fiat, FXProvider, Processor, Side, TransnetworkSettlementType } from "@riocrypto/common";
|
|
2
2
|
import { TVFXDataProvider } from "@riocrypto/common";
|
|
3
3
|
import mongoose from "mongoose";
|
|
4
4
|
interface RioSettingsAttrs {
|
|
@@ -45,9 +45,9 @@ interface RioSettingsAttrs {
|
|
|
45
45
|
fxProviders: {
|
|
46
46
|
[key in FXProvider]: {
|
|
47
47
|
enabled: boolean;
|
|
48
|
-
|
|
49
|
-
buy:
|
|
50
|
-
sell:
|
|
48
|
+
defaultSettlementType?: {
|
|
49
|
+
buy: EmarketsSettlementType | TransnetworkSettlementType;
|
|
50
|
+
sell: EmarketsSettlementType | TransnetworkSettlementType;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
};
|
|
@@ -129,9 +129,9 @@ interface RioSettingsDoc extends mongoose.Document {
|
|
|
129
129
|
fxProviders: {
|
|
130
130
|
[key in FXProvider]: {
|
|
131
131
|
enabled: boolean;
|
|
132
|
-
|
|
133
|
-
buy:
|
|
134
|
-
sell:
|
|
132
|
+
defaultSettlementType?: {
|
|
133
|
+
buy: EmarketsSettlementType | TransnetworkSettlementType;
|
|
134
|
+
sell: EmarketsSettlementType | TransnetworkSettlementType;
|
|
135
135
|
};
|
|
136
136
|
};
|
|
137
137
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2572",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/secret-manager": "^5.3.0",
|
|
29
29
|
"@google-cloud/storage": "^6.9.5",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.7.0",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.2375",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|