mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-28 00:28:04 +03:00
get referral data
This commit is contained in:
@@ -258,6 +258,15 @@ class BlockchainService {
|
||||
)
|
||||
};
|
||||
|
||||
getReferralData = (walletAddress: string) => fetchWithValidation(
|
||||
`${this.apiUrl}/api/referral-data/${walletAddress}`,
|
||||
z.object({
|
||||
referer: z.string(),
|
||||
isReferral: z.boolean(),
|
||||
}),
|
||||
{ headers: this.basicAuthHeaders }
|
||||
);
|
||||
|
||||
getGasPriceWei = () => fetchWithValidation(
|
||||
`${this.apiUrl}/api/gasPrice`,
|
||||
z.string(),
|
||||
|
||||
@@ -14,3 +14,4 @@ export { default as userVotesSchema } from './userVotesSchema.js';
|
||||
export { default as userEarnedSchema } from './userEarnedSchema.js';
|
||||
export { default as poolsV3InfoSchema } from './poolsV3InfoSchema.js';
|
||||
export { pricesWithQuoteAssetSchema } from './pricesWithQuoteAssetSchema.js';
|
||||
export { referralDataSchema } from './referralDataSchema.js';
|
||||
@@ -0,0 +1,6 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const referralDataSchema = z.object({
|
||||
referer: z.string(),
|
||||
isReferral: z.boolean(),
|
||||
});
|
||||
Reference in New Issue
Block a user