@spritz-finance/service-client 0.3.102 → 0.3.103
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as RainClient from './rainServiceClient';
|
|
2
2
|
import { VirtualCardStatus } from '../payableAccounts/types';
|
|
3
|
-
import { ApplicationStatus, CreateRainApplicationInput, RainCard, RainContract, RainUser } from './types';
|
|
3
|
+
import { ApplicationStatus, CreateRainApplicationInput, RainCard, RainContract, RainUser, WithdrawalSignature } from './types';
|
|
4
4
|
export declare function createCardApplication(userId: string, input: CreateRainApplicationInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<RainUser>>;
|
|
5
5
|
export declare function getUserDepositAddress({ userId, network, }: {
|
|
6
6
|
userId: string;
|
|
@@ -21,3 +21,8 @@ export declare function updateCardStatus({ userId, status, cardExternalId, }: {
|
|
|
21
21
|
status: VirtualCardStatus;
|
|
22
22
|
cardExternalId: string;
|
|
23
23
|
}): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<RainCard>>;
|
|
24
|
+
export declare function requestWithdrawalSignature({ userId, network, amount, }: {
|
|
25
|
+
userId: string;
|
|
26
|
+
network: string;
|
|
27
|
+
amount: string;
|
|
28
|
+
}): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<WithdrawalSignature>>;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.updateCardStatus = exports.createRainCard = exports.getApplicationStatus = exports.validateContractAddress = exports.getUserDepositAddress = exports.createCardApplication = exports.RainClient = void 0;
|
|
26
|
+
exports.requestWithdrawalSignature = exports.updateCardStatus = exports.createRainCard = exports.getApplicationStatus = exports.validateContractAddress = exports.getUserDepositAddress = exports.createCardApplication = exports.RainClient = void 0;
|
|
27
27
|
exports.RainClient = __importStar(require("./rainServiceClient"));
|
|
28
28
|
const serviceClient_1 = require("../serviceClient");
|
|
29
29
|
const RAIN_ENDPOINT = '/rain-v2';
|
|
@@ -67,3 +67,13 @@ async function updateCardStatus({ userId, status, cardExternalId, }) {
|
|
|
67
67
|
.then((res) => res.data);
|
|
68
68
|
}
|
|
69
69
|
exports.updateCardStatus = updateCardStatus;
|
|
70
|
+
async function requestWithdrawalSignature({ userId, network, amount, }) {
|
|
71
|
+
return serviceClient_1.baseClient
|
|
72
|
+
.post(`${RAIN_ENDPOINT}/withdrawl-signature`, {
|
|
73
|
+
userId,
|
|
74
|
+
network,
|
|
75
|
+
amount,
|
|
76
|
+
})
|
|
77
|
+
.then((res) => res.data);
|
|
78
|
+
}
|
|
79
|
+
exports.requestWithdrawalSignature = requestWithdrawalSignature;
|
package/lib/rain/types.d.ts
CHANGED
|
@@ -64,3 +64,19 @@ export type RainCard = {
|
|
|
64
64
|
createdAt: string;
|
|
65
65
|
updatedAt: string;
|
|
66
66
|
};
|
|
67
|
+
export type WithdrawalSignature = [
|
|
68
|
+
string,
|
|
69
|
+
string,
|
|
70
|
+
string,
|
|
71
|
+
string,
|
|
72
|
+
number,
|
|
73
|
+
number[],
|
|
74
|
+
string,
|
|
75
|
+
[
|
|
76
|
+
string
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
string
|
|
80
|
+
],
|
|
81
|
+
boolean
|
|
82
|
+
];
|