@riocrypto/common-server 1.0.2593 → 1.0.2596
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/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/build/models/{unrecognized-bank-payment.d.ts → inbound-bank-deposit.d.ts} +6 -6
- package/build/models/{unrecognized-bank-payment.js → inbound-bank-deposit.js} +9 -9
- package/build/models/inbound-crypto-deposit.d.ts +32 -0
- package/build/models/{unrecognized-crypto-payment.js → inbound-crypto-deposit.js} +10 -10
- package/package.json +2 -2
- package/build/models/unrecognized-crypto-payment.d.ts +0 -32
package/build/index.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export * from "./models/bulk-bank-payout";
|
|
|
101
101
|
export * from "./models/bulk-crypto-payout";
|
|
102
102
|
export * from "./models/twap-settlement";
|
|
103
103
|
export * from "./models/transnetwork-fx-trade";
|
|
104
|
+
export * from "./models/inbound-bank-deposit";
|
|
105
|
+
export * from "./models/inbound-crypto-deposit";
|
|
104
106
|
export * from "./clients/axios-with-logging";
|
|
105
107
|
export * from "./clients/slack-client";
|
|
106
108
|
export * from "./clients/fireblocks-client";
|
package/build/index.js
CHANGED
|
@@ -117,6 +117,8 @@ __exportStar(require("./models/bulk-bank-payout"), exports);
|
|
|
117
117
|
__exportStar(require("./models/bulk-crypto-payout"), exports);
|
|
118
118
|
__exportStar(require("./models/twap-settlement"), exports);
|
|
119
119
|
__exportStar(require("./models/transnetwork-fx-trade"), exports);
|
|
120
|
+
__exportStar(require("./models/inbound-bank-deposit"), exports);
|
|
121
|
+
__exportStar(require("./models/inbound-crypto-deposit"), exports);
|
|
120
122
|
__exportStar(require("./clients/axios-with-logging"), exports);
|
|
121
123
|
__exportStar(require("./clients/slack-client"), exports);
|
|
122
124
|
__exportStar(require("./clients/fireblocks-client"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TreasuryProvider, Fiat } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
-
interface
|
|
3
|
+
interface InboundBankDepositAttrs {
|
|
4
4
|
createdAt: Date;
|
|
5
5
|
amount: number;
|
|
6
6
|
fiat: Fiat;
|
|
@@ -13,7 +13,7 @@ interface UnrecognizedCryptoPaymentAttrs {
|
|
|
13
13
|
destinationTreasuryProvider?: TreasuryProvider;
|
|
14
14
|
destinationProviderId?: string;
|
|
15
15
|
}
|
|
16
|
-
interface
|
|
16
|
+
interface InboundBankDepositDoc extends Document {
|
|
17
17
|
id: string;
|
|
18
18
|
createdAt: Date;
|
|
19
19
|
amount: number;
|
|
@@ -27,8 +27,8 @@ interface UnrecognizedCryptoPaymentDoc extends Document {
|
|
|
27
27
|
destinationTreasuryProvider?: TreasuryProvider;
|
|
28
28
|
destinationProviderId?: string;
|
|
29
29
|
}
|
|
30
|
-
interface
|
|
31
|
-
build(attrs:
|
|
30
|
+
interface InboundBankDepositModel extends Model<InboundBankDepositDoc> {
|
|
31
|
+
build(attrs: InboundBankDepositAttrs): InboundBankDepositDoc;
|
|
32
32
|
}
|
|
33
|
-
declare const
|
|
34
|
-
export {
|
|
33
|
+
declare const buildInboundBankDeposit: (mongoose: Mongoose) => InboundBankDepositModel;
|
|
34
|
+
export { buildInboundBankDeposit, InboundBankDepositDoc, InboundBankDepositAttrs, };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.buildInboundBankDeposit = void 0;
|
|
4
4
|
const common_1 = require("@riocrypto/common");
|
|
5
|
-
const
|
|
5
|
+
const buildInboundBankDeposit = (mongoose) => {
|
|
6
6
|
// if model is already defined, return it
|
|
7
7
|
if (mongoose.models.UnrecognizedCryptoPayment) {
|
|
8
|
-
return mongoose.model("
|
|
8
|
+
return mongoose.model("InboundBankDeposit");
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const InboundBankDepositSchema = new mongoose.Schema({
|
|
11
11
|
createdAt: {
|
|
12
12
|
type: Date,
|
|
13
13
|
required: true,
|
|
@@ -56,10 +56,10 @@ const buildUnrecognizedCryptoPayment = (mongoose) => {
|
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
});
|
|
59
|
-
|
|
60
|
-
return new
|
|
59
|
+
InboundBankDepositSchema.statics.build = (attrs) => {
|
|
60
|
+
return new InboundBankDeposit(attrs);
|
|
61
61
|
};
|
|
62
|
-
const
|
|
63
|
-
return
|
|
62
|
+
const InboundBankDeposit = mongoose.model("InboundBankDeposit", InboundBankDepositSchema);
|
|
63
|
+
return InboundBankDeposit;
|
|
64
64
|
};
|
|
65
|
-
exports.
|
|
65
|
+
exports.buildInboundBankDeposit = buildInboundBankDeposit;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TreasuryProvider, Crypto, InboundCryptoDepositDestinationType } from "@riocrypto/common";
|
|
2
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
interface InboundCryptoDepositAttrs {
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
amount: number;
|
|
6
|
+
crypto: Crypto;
|
|
7
|
+
originBlockchainAddress: string;
|
|
8
|
+
destinationBlockchainAddress: string;
|
|
9
|
+
blockchainTxId: string;
|
|
10
|
+
destinationType: InboundCryptoDepositDestinationType;
|
|
11
|
+
destinationTreasuryProvider?: TreasuryProvider;
|
|
12
|
+
destinationTransactionalFireblocksVaultId?: string;
|
|
13
|
+
destinationProviderId?: string;
|
|
14
|
+
}
|
|
15
|
+
interface InboundCryptoDepositDoc extends Document {
|
|
16
|
+
id: string;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
amount: number;
|
|
19
|
+
crypto: Crypto;
|
|
20
|
+
originBlockchainAddress: string;
|
|
21
|
+
destinationBlockchainAddress: string;
|
|
22
|
+
blockchainTxId: string;
|
|
23
|
+
destinationType: InboundCryptoDepositDestinationType;
|
|
24
|
+
destinationTreasuryProvider?: TreasuryProvider;
|
|
25
|
+
destinationTransactionalFireblocksVaultId?: string;
|
|
26
|
+
destinationProviderId?: string;
|
|
27
|
+
}
|
|
28
|
+
interface InboundCryptoDepositModel extends Model<InboundCryptoDepositDoc> {
|
|
29
|
+
build(attrs: InboundCryptoDepositAttrs): InboundCryptoDepositDoc;
|
|
30
|
+
}
|
|
31
|
+
declare const buildInboundCryptoDeposit: (mongoose: Mongoose) => InboundCryptoDepositModel;
|
|
32
|
+
export { buildInboundCryptoDeposit, InboundCryptoDepositDoc, InboundCryptoDepositAttrs, };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.buildInboundCryptoDeposit = void 0;
|
|
4
4
|
const common_1 = require("@riocrypto/common");
|
|
5
|
-
const
|
|
5
|
+
const buildInboundCryptoDeposit = (mongoose) => {
|
|
6
6
|
// if model is already defined, return it
|
|
7
7
|
if (mongoose.models.UnrecognizedCryptoPayment) {
|
|
8
|
-
return mongoose.model("
|
|
8
|
+
return mongoose.model("InboundCryptoDeposit");
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const InboundCryptoDepositSchema = new mongoose.Schema({
|
|
11
11
|
createdAt: {
|
|
12
12
|
type: Date,
|
|
13
13
|
required: true,
|
|
@@ -36,7 +36,7 @@ const buildUnrecognizedCryptoPayment = (mongoose) => {
|
|
|
36
36
|
destinationType: {
|
|
37
37
|
type: String,
|
|
38
38
|
required: true,
|
|
39
|
-
enum: Object.values(common_1.
|
|
39
|
+
enum: Object.values(common_1.InboundCryptoDepositDestinationType),
|
|
40
40
|
},
|
|
41
41
|
destinationTreasuryProvider: {
|
|
42
42
|
type: String,
|
|
@@ -57,10 +57,10 @@ const buildUnrecognizedCryptoPayment = (mongoose) => {
|
|
|
57
57
|
},
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
|
-
|
|
61
|
-
return new
|
|
60
|
+
InboundCryptoDepositSchema.statics.build = (attrs) => {
|
|
61
|
+
return new InboundCryptoDeposit(attrs);
|
|
62
62
|
};
|
|
63
|
-
const
|
|
64
|
-
return
|
|
63
|
+
const InboundCryptoDeposit = mongoose.model("InboundCryptoDeposit", InboundCryptoDepositSchema);
|
|
64
|
+
return InboundCryptoDeposit;
|
|
65
65
|
};
|
|
66
|
-
exports.
|
|
66
|
+
exports.buildInboundCryptoDeposit = buildInboundCryptoDeposit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2596",
|
|
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.2391",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { TreasuryProvider, Crypto, UnrecognizedCryptoPaymentDestinationType } from "@riocrypto/common";
|
|
2
|
-
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
-
interface UnrecognizedCryptoPaymentAttrs {
|
|
4
|
-
createdAt: Date;
|
|
5
|
-
amount: number;
|
|
6
|
-
crypto: Crypto;
|
|
7
|
-
originBlockchainAddress: string;
|
|
8
|
-
destinationBlockchainAddress: string;
|
|
9
|
-
blockchainTxId: string;
|
|
10
|
-
destinationType: UnrecognizedCryptoPaymentDestinationType;
|
|
11
|
-
destinationTreasuryProvider?: TreasuryProvider;
|
|
12
|
-
destinationTransactionalFireblocksVaultId?: string;
|
|
13
|
-
destinationProviderId?: string;
|
|
14
|
-
}
|
|
15
|
-
interface UnrecognizedCryptoPaymentDoc extends Document {
|
|
16
|
-
id: string;
|
|
17
|
-
createdAt: Date;
|
|
18
|
-
amount: number;
|
|
19
|
-
crypto: Crypto;
|
|
20
|
-
originBlockchainAddress: string;
|
|
21
|
-
destinationBlockchainAddress: string;
|
|
22
|
-
blockchainTxId: string;
|
|
23
|
-
destinationType: UnrecognizedCryptoPaymentDestinationType;
|
|
24
|
-
destinationTreasuryProvider?: TreasuryProvider;
|
|
25
|
-
destinationTransactionalFireblocksVaultId?: string;
|
|
26
|
-
destinationProviderId?: string;
|
|
27
|
-
}
|
|
28
|
-
interface UnrecognizedCryptoPaymentModel extends Model<UnrecognizedCryptoPaymentDoc> {
|
|
29
|
-
build(attrs: UnrecognizedCryptoPaymentAttrs): UnrecognizedCryptoPaymentDoc;
|
|
30
|
-
}
|
|
31
|
-
declare const buildUnrecognizedCryptoPayment: (mongoose: Mongoose) => UnrecognizedCryptoPaymentModel;
|
|
32
|
-
export { buildUnrecognizedCryptoPayment, UnrecognizedCryptoPaymentDoc, UnrecognizedCryptoPaymentAttrs, };
|