@spritz-finance/service-client 0.23.0 → 0.24.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * as PayoutsClient from "./payoutsServiceClient";
|
|
2
|
-
import { CryptoPayout, CryptoPayoutInput, TreasuryBalances } from "./types";
|
|
2
|
+
import { CryptoPayout, CryptoPayoutInput, ExecuteRainAdminChangeInput, ExecuteRainAdminChangeResult, TreasuryBalances } from "./types";
|
|
3
3
|
export declare function requestCryptoPayout({ userId, type, network, amountFiat, referenceId, toAddress, tokenSymbol, currencyFiat, fromDispatchWallet, }: CryptoPayoutInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<CryptoPayout>>;
|
|
4
4
|
export declare function getPayoutFromHash({ userId, transactionHash, }: {
|
|
5
5
|
userId?: string;
|
|
@@ -22,4 +22,5 @@ export declare function submit7702Message(input: {
|
|
|
22
22
|
to: `0x${string}`;
|
|
23
23
|
chainId: number;
|
|
24
24
|
}): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<string>>;
|
|
25
|
+
export declare function executeRainAdminChange(input: ExecuteRainAdminChangeInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<ExecuteRainAdminChangeResult>>;
|
|
25
26
|
export declare function getTreasuryBalances(): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<TreasuryBalances>>;
|
|
@@ -38,6 +38,7 @@ exports.requestCryptoPayout = requestCryptoPayout;
|
|
|
38
38
|
exports.getPayoutFromHash = getPayoutFromHash;
|
|
39
39
|
exports.requestWithdrawlSignature = requestWithdrawlSignature;
|
|
40
40
|
exports.submit7702Message = submit7702Message;
|
|
41
|
+
exports.executeRainAdminChange = executeRainAdminChange;
|
|
41
42
|
exports.getTreasuryBalances = getTreasuryBalances;
|
|
42
43
|
exports.PayoutsClient = __importStar(require("./payoutsServiceClient"));
|
|
43
44
|
const serviceClient_1 = require("../serviceClient");
|
|
@@ -75,6 +76,11 @@ async function submit7702Message(input) {
|
|
|
75
76
|
.post(`${PAYOUTS_ENDPOINT}/signers/7702`, input)
|
|
76
77
|
.then((res) => res.data);
|
|
77
78
|
}
|
|
79
|
+
async function executeRainAdminChange(input) {
|
|
80
|
+
return serviceClient_1.baseClient
|
|
81
|
+
.post(`${PAYOUTS_ENDPOINT}/signers/rain-admin-change`, input)
|
|
82
|
+
.then((res) => res.data);
|
|
83
|
+
}
|
|
78
84
|
// Served by bridgebot's Hono /api surface; reached through the same gateway
|
|
79
85
|
// host via the /v2/bridgebot base path (the bare /bridgebot base path maps to
|
|
80
86
|
// bridgebot's legacy REST API, which does not carry this route).
|
package/lib/payouts/types.d.ts
CHANGED
|
@@ -32,6 +32,19 @@ export type CryptoPayout = {
|
|
|
32
32
|
createdAt: string;
|
|
33
33
|
updatedAt: string;
|
|
34
34
|
};
|
|
35
|
+
export type RainAdminAction = "add" | "remove";
|
|
36
|
+
export type ExecuteRainAdminChangeInput = {
|
|
37
|
+
action: RainAdminAction;
|
|
38
|
+
chainId: 10 | 137 | 8453 | 42161 | 43114;
|
|
39
|
+
collateralProxyAddress: `0x${string}`;
|
|
40
|
+
userId: string;
|
|
41
|
+
};
|
|
42
|
+
export type ExecuteRainAdminChangeResult = ExecuteRainAdminChangeInput & {
|
|
43
|
+
sourceSignerAddress: `0x${string}`;
|
|
44
|
+
status: "alreadyApplied" | "confirmed";
|
|
45
|
+
targetSignerAddress: `0x${string}`;
|
|
46
|
+
transactionHash?: `0x${string}`;
|
|
47
|
+
};
|
|
35
48
|
export type TreasuryWalletBalance = {
|
|
36
49
|
payoutType: "BRIDGE_TRANSFER" | "RAIN_CARD_DEPOSIT" | "ONRAMP_PURCHASE";
|
|
37
50
|
network: string;
|