@huma-finance/shared 0.0.81-beta.1092 → 0.0.81-beta.1108
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/dist/campaign/index.d.ts +52 -0
- package/dist/campaign/index.js +2 -0
- package/dist/campaign/index.js.map +1 -0
- package/dist/cjs/campaign/index.d.ts +52 -0
- package/dist/cjs/campaign/index.js +3 -0
- package/dist/cjs/campaign/index.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/IdentityServiceV2.d.ts +2 -105
- package/dist/cjs/services/IdentityServiceV2.js +1 -137
- package/dist/cjs/services/IdentityServiceV2.js.map +1 -1
- package/dist/cjs/services/index.d.ts +0 -3
- package/dist/cjs/services/index.js +0 -3
- package/dist/cjs/services/index.js.map +1 -1
- package/dist/cjs/solana/metadata/devnet.js +0 -3
- package/dist/cjs/solana/metadata/devnet.js.map +1 -1
- package/dist/cjs/solana/metadata/mainnet.js +0 -27
- package/dist/cjs/solana/metadata/mainnet.js.map +1 -1
- package/dist/cjs/solana/pool.d.ts +0 -1
- package/dist/cjs/solana/pool.js.map +1 -1
- package/dist/cjs/solana/services/index.d.ts +0 -1
- package/dist/cjs/solana/services/index.js +0 -1
- package/dist/cjs/solana/services/index.js.map +1 -1
- package/dist/cjs/solana/utils/index.d.ts +0 -1
- package/dist/cjs/solana/utils/index.js +0 -1
- package/dist/cjs/solana/utils/index.js.map +1 -1
- package/dist/cjs/utils/config.d.ts +0 -5
- package/dist/cjs/utils/config.js +3 -32
- package/dist/cjs/utils/config.js.map +1 -1
- package/dist/cjs/utils/const.d.ts +1 -3
- package/dist/cjs/utils/const.js +0 -2
- package/dist/cjs/utils/const.js.map +1 -1
- package/dist/cjs/v2/metadata/celo.js +1 -0
- package/dist/cjs/v2/metadata/celo.js.map +1 -1
- package/dist/cjs/v2/metadata/scroll.js +2 -0
- package/dist/cjs/v2/metadata/scroll.js.map +1 -1
- package/dist/cjs/v2/types/index.d.ts +0 -2
- package/dist/cjs/v2/types/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/services/IdentityServiceV2.d.ts +2 -105
- package/dist/services/IdentityServiceV2.js +1 -137
- package/dist/services/IdentityServiceV2.js.map +1 -1
- package/dist/services/index.d.ts +0 -3
- package/dist/services/index.js +0 -3
- package/dist/services/index.js.map +1 -1
- package/dist/solana/metadata/devnet.js +0 -3
- package/dist/solana/metadata/devnet.js.map +1 -1
- package/dist/solana/metadata/mainnet.js +0 -27
- package/dist/solana/metadata/mainnet.js.map +1 -1
- package/dist/solana/pool.d.ts +0 -1
- package/dist/solana/pool.js.map +1 -1
- package/dist/solana/services/index.d.ts +0 -1
- package/dist/solana/services/index.js +0 -1
- package/dist/solana/services/index.js.map +1 -1
- package/dist/solana/utils/index.d.ts +0 -1
- package/dist/solana/utils/index.js +0 -1
- package/dist/solana/utils/index.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/utils/config.d.ts +0 -5
- package/dist/utils/config.js +0 -29
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/const.d.ts +1 -3
- package/dist/utils/const.js +0 -2
- package/dist/utils/const.js.map +1 -1
- package/dist/v2/metadata/celo.js +1 -0
- package/dist/v2/metadata/celo.js.map +1 -1
- package/dist/v2/metadata/scroll.js +2 -0
- package/dist/v2/metadata/scroll.js.map +1 -1
- package/dist/v2/types/index.d.ts +0 -2
- package/dist/v2/types/index.js.map +1 -1
- package/package.json +2 -3
- package/dist/cjs/services/AuthService.d.ts +0 -9
- package/dist/cjs/services/AuthService.js +0 -19
- package/dist/cjs/services/AuthService.js.map +0 -1
- package/dist/cjs/services/CampaignService.d.ts +0 -110
- package/dist/cjs/services/CampaignService.js +0 -290
- package/dist/cjs/services/CampaignService.js.map +0 -1
- package/dist/cjs/services/IdentityService.d.ts +0 -52
- package/dist/cjs/services/IdentityService.js +0 -84
- package/dist/cjs/services/IdentityService.js.map +0 -1
- package/dist/cjs/solana/services/SolanaGraphService.d.ts +0 -41
- package/dist/cjs/solana/services/SolanaGraphService.js +0 -104
- package/dist/cjs/solana/services/SolanaGraphService.js.map +0 -1
- package/dist/cjs/solana/utils/siwsUtils.d.ts +0 -27
- package/dist/cjs/solana/utils/siwsUtils.js +0 -40
- package/dist/cjs/solana/utils/siwsUtils.js.map +0 -1
- package/dist/services/AuthService.d.ts +0 -9
- package/dist/services/AuthService.js +0 -16
- package/dist/services/AuthService.js.map +0 -1
- package/dist/services/CampaignService.d.ts +0 -110
- package/dist/services/CampaignService.js +0 -287
- package/dist/services/CampaignService.js.map +0 -1
- package/dist/services/IdentityService.d.ts +0 -52
- package/dist/services/IdentityService.js +0 -81
- package/dist/services/IdentityService.js.map +0 -1
- package/dist/solana/services/SolanaGraphService.d.ts +0 -41
- package/dist/solana/services/SolanaGraphService.js +0 -101
- package/dist/solana/services/SolanaGraphService.js.map +0 -1
- package/dist/solana/utils/siwsUtils.d.ts +0 -27
- package/dist/solana/utils/siwsUtils.js +0 -35
- package/dist/solana/utils/siwsUtils.js.map +0 -1
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enum representing the identity status.
|
|
3
|
-
* @typedef {Enum} IdentityStatus
|
|
4
|
-
*/
|
|
5
|
-
declare enum IdentityVerificationStatus {
|
|
6
|
-
ACCREDITED = "ACCREDITED",
|
|
7
|
-
ACCREDITATION_NOT_APPLICABLE = "ACCREDITATION_NOT_APPLICABLE",
|
|
8
|
-
NOT_ACCREDITED = "NOT_ACCREDITED",
|
|
9
|
-
ACCREDITATION_PENDING = "ACCREDITATION_PENDING",
|
|
10
|
-
IDENTITY_VERIFICATION_COMPLETED = "IDENTITY_VERIFICATION_COMPLETED",
|
|
11
|
-
IDENTITY_VERIFICATION_FAILED = "IDENTITY_VERIFICATION_FAILED",
|
|
12
|
-
IDENTITY_VERIFICATION_PENDING = "IDENTITY_VERIFICATION_PENDING",
|
|
13
|
-
IDENTITY_VERIFICATION_UPDATES_REQUIRED = "IDENTITY_VERIFICATION_UPDATES_REQUIRED",
|
|
14
|
-
IDENTITY_VERIFICATION_NOT_STARTED = "IDENTITY_VERIFICATION_NOT_STARTED",
|
|
15
|
-
USER_NOT_ONBOARDED = "USER_NOT_ONBOARDED"
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Object representing the response to the identity verification status request.
|
|
19
|
-
* @typedef {Object} VerificationStatus
|
|
20
|
-
* @property {string} walletAddress the wallet address to get the verification status.
|
|
21
|
-
* @property {IdentityVerificationStatus} identityVerificationStatus The wallet's identity verification status.
|
|
22
|
-
* @property {boolean} isVerified the wallet address has been verified or not.
|
|
23
|
-
* @property {boolean} isNotOnboarded the wallet address has been not onboarded or not.
|
|
24
|
-
*/
|
|
25
|
-
export type VerificationStatusResult = {
|
|
26
|
-
walletAddress: string;
|
|
27
|
-
verificationStatus: IdentityVerificationStatus;
|
|
28
|
-
isVerified: boolean;
|
|
29
|
-
isNotOnboarded: boolean;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Object representing the response to the document signature status request.
|
|
33
|
-
* @typedef {Object} DocSignatureStatus
|
|
34
|
-
* @property {string} envelopeId the envelope id to get the document signature status.
|
|
35
|
-
* @property {string} status the document signature status.
|
|
36
|
-
*/
|
|
37
|
-
export type DocSignatureStatus = {
|
|
38
|
-
envelopeId: string;
|
|
39
|
-
status: 'completed' | 'created' | 'declined' | 'deleted' | 'delivered' | 'processing' | 'sent' | 'signed' | 'template' | 'voided';
|
|
40
|
-
};
|
|
41
|
-
export declare const IdentityService: {
|
|
42
|
-
getVerificationStatus: (walletAddress: string, pool: string, chainId: number, isDev?: boolean) => Promise<VerificationStatusResult>;
|
|
43
|
-
onboard: (walletAddress: string, code: string, pool: string, chainId: number, isDev?: boolean) => Promise<string>;
|
|
44
|
-
getDocSignatureStatus: (envelopeId: string, chainId: number, isDev?: boolean) => Promise<DocSignatureStatus>;
|
|
45
|
-
requestDocSignature: (walletAddress: string, chainId: number, isDev?: boolean) => Promise<{
|
|
46
|
-
envelopeId: string;
|
|
47
|
-
}>;
|
|
48
|
-
resendDocSignatureLink: (envelopeId: string, chainId: number, isDev?: boolean) => Promise<{
|
|
49
|
-
envelopeId: string;
|
|
50
|
-
}>;
|
|
51
|
-
};
|
|
52
|
-
export {};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IdentityService = void 0;
|
|
4
|
-
const config_1 = require("../utils/config");
|
|
5
|
-
const request_1 = require("../utils/request");
|
|
6
|
-
/**
|
|
7
|
-
* Enum representing the identity status.
|
|
8
|
-
* @typedef {Enum} IdentityStatus
|
|
9
|
-
*/
|
|
10
|
-
var IdentityVerificationStatus;
|
|
11
|
-
(function (IdentityVerificationStatus) {
|
|
12
|
-
IdentityVerificationStatus["ACCREDITED"] = "ACCREDITED";
|
|
13
|
-
IdentityVerificationStatus["ACCREDITATION_NOT_APPLICABLE"] = "ACCREDITATION_NOT_APPLICABLE";
|
|
14
|
-
IdentityVerificationStatus["NOT_ACCREDITED"] = "NOT_ACCREDITED";
|
|
15
|
-
IdentityVerificationStatus["ACCREDITATION_PENDING"] = "ACCREDITATION_PENDING";
|
|
16
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_COMPLETED"] = "IDENTITY_VERIFICATION_COMPLETED";
|
|
17
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_FAILED"] = "IDENTITY_VERIFICATION_FAILED";
|
|
18
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_PENDING"] = "IDENTITY_VERIFICATION_PENDING";
|
|
19
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_UPDATES_REQUIRED"] = "IDENTITY_VERIFICATION_UPDATES_REQUIRED";
|
|
20
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_NOT_STARTED"] = "IDENTITY_VERIFICATION_NOT_STARTED";
|
|
21
|
-
IdentityVerificationStatus["USER_NOT_ONBOARDED"] = "USER_NOT_ONBOARDED";
|
|
22
|
-
})(IdentityVerificationStatus || (IdentityVerificationStatus = {}));
|
|
23
|
-
/**
|
|
24
|
-
* Get wallet's identity verification status.
|
|
25
|
-
*
|
|
26
|
-
* @param {string} walletAddress The wallet address.
|
|
27
|
-
* @param {string} pool The pool address.
|
|
28
|
-
* @param {number} chainId chain ID.
|
|
29
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
30
|
-
* @returns {Promise<VerificationStatusResult>} Promise that returns the verification status result.
|
|
31
|
-
*/
|
|
32
|
-
const getVerificationStatus = async (walletAddress, pool, chainId, isDev = false) => {
|
|
33
|
-
const result = await (0, request_1.requestPut)(`${config_1.configUtil.getIdentityAPIUrl(chainId, isDev)}/wallets/${walletAddress}/verification-status?poolAddress=${pool}&chainId=${chainId}`);
|
|
34
|
-
result.isVerified = [IdentityVerificationStatus.ACCREDITED].includes(result.verificationStatus);
|
|
35
|
-
result.isNotOnboarded =
|
|
36
|
-
result.verificationStatus === IdentityVerificationStatus.USER_NOT_ONBOARDED;
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Onboard user
|
|
41
|
-
*
|
|
42
|
-
* @param {string} walletAddress The wallet address.
|
|
43
|
-
* @param {string} code The investor code.
|
|
44
|
-
* @param {string} pool Pool address.
|
|
45
|
-
* @param {number} chainId chain ID.
|
|
46
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
47
|
-
* @returns {Promise<string>} Promise that returns the onboard result
|
|
48
|
-
*/
|
|
49
|
-
const onboard = async (walletAddress, code, pool, chainId, isDev = false) => (0, request_1.requestPost)(`${config_1.configUtil.getIdentityAPIUrl(chainId, isDev)}/wallets/${walletAddress}/onboard?code=${code}&poolAddress=${pool}&chainId=${chainId}`);
|
|
50
|
-
/**
|
|
51
|
-
* Get document signature status
|
|
52
|
-
*
|
|
53
|
-
* @param {string} envelopeId The envelope ID.
|
|
54
|
-
* @param {number} chainId chain ID.
|
|
55
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
56
|
-
* @returns {Promise<{envelopeId: string}>} Promise that returns the envelope ID
|
|
57
|
-
*/
|
|
58
|
-
const getDocSignatureStatus = async (envelopeId, chainId, isDev = false) => (0, request_1.requestGet)(`${config_1.configUtil.getIdentityAPIUrl(chainId, isDev)}/${envelopeId}/document-signature-status`);
|
|
59
|
-
/**
|
|
60
|
-
* Request document signature
|
|
61
|
-
*
|
|
62
|
-
* @param {string} walletAddress The wallet address.
|
|
63
|
-
* @param {number} chainId chain ID.
|
|
64
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
65
|
-
* @returns {Promise<{envelopeId: string}>} Promise that returns the envelope ID
|
|
66
|
-
*/
|
|
67
|
-
const requestDocSignature = async (walletAddress, chainId, isDev = false) => (0, request_1.requestPost)(`${config_1.configUtil.getIdentityAPIUrl(chainId, isDev)}/request-document-signature`, { walletAddress, chainId });
|
|
68
|
-
/**
|
|
69
|
-
* Resend document signature link
|
|
70
|
-
*
|
|
71
|
-
* @param {string} envelopeId The envelope ID.
|
|
72
|
-
* @param {number} chainId chain ID.
|
|
73
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
74
|
-
* @returns {Promise<{envelopeId: string}>} Promise that returns the envelope ID
|
|
75
|
-
*/
|
|
76
|
-
const resendDocSignatureLink = async (envelopeId, chainId, isDev = false) => (0, request_1.requestPost)(`${config_1.configUtil.getIdentityAPIUrl(chainId, isDev)}/resend-document-signature-link`, { envelopeId });
|
|
77
|
-
exports.IdentityService = {
|
|
78
|
-
getVerificationStatus,
|
|
79
|
-
onboard,
|
|
80
|
-
getDocSignatureStatus,
|
|
81
|
-
requestDocSignature,
|
|
82
|
-
resendDocSignatureLink,
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=IdentityService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityService.js","sourceRoot":"","sources":["../../../src/services/IdentityService.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,8CAAsE;AAEtE;;;GAGG;AACH,IAAK,0BAWJ;AAXD,WAAK,0BAA0B;IAC7B,uDAAyB,CAAA;IACzB,2FAA6D,CAAA;IAC7D,+DAAiC,CAAA;IACjC,6EAA+C,CAAA;IAC/C,iGAAmE,CAAA;IACnE,2FAA6D,CAAA;IAC7D,6FAA+D,CAAA;IAC/D,+GAAiF,CAAA;IACjF,qGAAuE,CAAA;IACvE,uEAAyC,CAAA;AAC3C,CAAC,EAXI,0BAA0B,KAA1B,0BAA0B,QAW9B;AAsCD;;;;;;;;GAQG;AACH,MAAM,qBAAqB,GAAG,KAAK,EACjC,aAAqB,EACrB,IAAY,EACZ,OAAe,EACf,KAAK,GAAG,KAAK,EACsB,EAAE;IACrC,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAU,EAC7B,GAAG,mBAAU,CAAC,iBAAiB,CAC7B,OAAO,EACP,KAAK,CACN,YAAY,aAAa,oCAAoC,IAAI,YAAY,OAAO,EAAE,CACxF,CAAA;IAED,MAAM,CAAC,UAAU,GAAG,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC,QAAQ,CAClE,MAAM,CAAC,kBAAkB,CAC1B,CAAA;IACD,MAAM,CAAC,cAAc;QACnB,MAAM,CAAC,kBAAkB,KAAK,0BAA0B,CAAC,kBAAkB,CAAA;IAE7E,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,GAAG,KAAK,EACnB,aAAqB,EACrB,IAAY,EACZ,IAAY,EACZ,OAAe,EACf,KAAK,GAAG,KAAK,EACI,EAAE,CACnB,IAAA,qBAAW,EACT,GAAG,mBAAU,CAAC,iBAAiB,CAC7B,OAAO,EACP,KAAK,CACN,YAAY,aAAa,iBAAiB,IAAI,gBAAgB,IAAI,YAAY,OAAO,EAAE,CACzF,CAAA;AAEH;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAG,KAAK,EACjC,UAAkB,EAClB,OAAe,EACf,KAAK,GAAG,KAAK,EACgB,EAAE,CAC/B,IAAA,oBAAU,EACR,GAAG,mBAAU,CAAC,iBAAiB,CAC7B,OAAO,EACP,KAAK,CACN,IAAI,UAAU,4BAA4B,CAC5C,CAAA;AAEH;;;;;;;GAOG;AACH,MAAM,mBAAmB,GAAG,KAAK,EAC/B,aAAqB,EACrB,OAAe,EACf,KAAK,GAAG,KAAK,EACoB,EAAE,CACnC,IAAA,qBAAW,EACT,GAAG,mBAAU,CAAC,iBAAiB,CAC7B,OAAO,EACP,KAAK,CACN,6BAA6B,EAC9B,EAAE,aAAa,EAAE,OAAO,EAAE,CAC3B,CAAA;AAEH;;;;;;;GAOG;AACH,MAAM,sBAAsB,GAAG,KAAK,EAClC,UAAkB,EAClB,OAAe,EACf,KAAK,GAAG,KAAK,EACoB,EAAE,CACnC,IAAA,qBAAW,EACT,GAAG,mBAAU,CAAC,iBAAiB,CAC7B,OAAO,EACP,KAAK,CACN,iCAAiC,EAClC,EAAE,UAAU,EAAE,CACf,CAAA;AAEU,QAAA,eAAe,GAAG;IAC7B,qBAAqB;IACrB,OAAO;IACP,qBAAqB;IACrB,mBAAmB;IACnB,sBAAsB;CACvB,CAAA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export type SolanaEvent = {
|
|
2
|
-
name: string;
|
|
3
|
-
blockNumber: number;
|
|
4
|
-
timestamp: number;
|
|
5
|
-
transactionHash: string;
|
|
6
|
-
owner: string;
|
|
7
|
-
amount: string;
|
|
8
|
-
};
|
|
9
|
-
export type SolanaReceivableEvent = {
|
|
10
|
-
blockNumber: number;
|
|
11
|
-
timestamp: number;
|
|
12
|
-
transactionHash: string;
|
|
13
|
-
pool: string;
|
|
14
|
-
owner: string;
|
|
15
|
-
asset: string;
|
|
16
|
-
paidAmount: string;
|
|
17
|
-
receivableAmount: string;
|
|
18
|
-
referenceId: string;
|
|
19
|
-
currencyCode: number;
|
|
20
|
-
maturityDate: number;
|
|
21
|
-
};
|
|
22
|
-
declare function getRecentActivities(poolConfig: string, first: number, skip: number, isDev: boolean, isTestnet: boolean, filters?: {
|
|
23
|
-
owner?: string;
|
|
24
|
-
events?: string[];
|
|
25
|
-
}): Promise<{
|
|
26
|
-
totalCount: number;
|
|
27
|
-
events: SolanaEvent[];
|
|
28
|
-
} | undefined>;
|
|
29
|
-
declare function getReceivableLivestream(poolConfig: string, first: number, skip: number, isDev: boolean, isTestnet: boolean): Promise<{
|
|
30
|
-
totalCount: number;
|
|
31
|
-
events: SolanaReceivableEvent[];
|
|
32
|
-
} | undefined>;
|
|
33
|
-
/**
|
|
34
|
-
* An object that contains functions to interact with Huma's solana service.
|
|
35
|
-
* @namespace SolanaService
|
|
36
|
-
*/
|
|
37
|
-
export declare const SolanaService: {
|
|
38
|
-
getRecentActivities: typeof getRecentActivities;
|
|
39
|
-
getReceivableLivestream: typeof getReceivableLivestream;
|
|
40
|
-
};
|
|
41
|
-
export {};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SolanaService = void 0;
|
|
4
|
-
const graphql_request_1 = require("graphql-request");
|
|
5
|
-
const config_1 = require("../../utils/config");
|
|
6
|
-
const request_1 = require("../../utils/request");
|
|
7
|
-
function getRecentActivities(poolConfig, first, skip, isDev, isTestnet, filters) {
|
|
8
|
-
const { owner, events } = filters || {};
|
|
9
|
-
const url = config_1.configUtil.getSolanaGraphAPIUrl(isTestnet, isDev);
|
|
10
|
-
let options = `
|
|
11
|
-
poolConfigPDA: "${poolConfig}",
|
|
12
|
-
first: ${first},
|
|
13
|
-
skip: ${skip},
|
|
14
|
-
orderBy: "timestamp",
|
|
15
|
-
orderDirection: "desc"
|
|
16
|
-
`;
|
|
17
|
-
if (owner) {
|
|
18
|
-
options += `, owner: "${owner}"`;
|
|
19
|
-
}
|
|
20
|
-
if (events) {
|
|
21
|
-
options += `, nameIn: ["${events.join('","')}"]`;
|
|
22
|
-
}
|
|
23
|
-
const query = (0, graphql_request_1.gql) `
|
|
24
|
-
query {
|
|
25
|
-
poolActivityEvents(
|
|
26
|
-
${options}
|
|
27
|
-
) {
|
|
28
|
-
totalCount
|
|
29
|
-
events {
|
|
30
|
-
name
|
|
31
|
-
blockNumber
|
|
32
|
-
timestamp
|
|
33
|
-
transactionHash
|
|
34
|
-
owner
|
|
35
|
-
amount
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
return (0, request_1.requestPost)(url, JSON.stringify({ query }))
|
|
41
|
-
.then((res) => {
|
|
42
|
-
var _a;
|
|
43
|
-
if (res.errors) {
|
|
44
|
-
console.error(res.errors);
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
return (_a = res.data) === null || _a === void 0 ? void 0 : _a.poolActivityEvents;
|
|
48
|
-
})
|
|
49
|
-
.catch((err) => {
|
|
50
|
-
console.error(err);
|
|
51
|
-
return undefined;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function getReceivableLivestream(poolConfig, first, skip, isDev, isTestnet) {
|
|
55
|
-
const url = config_1.configUtil.getSolanaGraphAPIUrl(isTestnet, isDev);
|
|
56
|
-
const query = (0, graphql_request_1.gql) `
|
|
57
|
-
query {
|
|
58
|
-
receivableEvents(
|
|
59
|
-
poolConfigPDA: "${poolConfig}",
|
|
60
|
-
first: ${first},
|
|
61
|
-
skip: ${skip},
|
|
62
|
-
orderBy: "timestamp",
|
|
63
|
-
orderDirection: "desc"
|
|
64
|
-
) {
|
|
65
|
-
totalCount
|
|
66
|
-
events {
|
|
67
|
-
blockNumber
|
|
68
|
-
timestamp
|
|
69
|
-
transactionHash
|
|
70
|
-
poolConfigPDA
|
|
71
|
-
owner
|
|
72
|
-
asset
|
|
73
|
-
paidAmount
|
|
74
|
-
receivableAmount
|
|
75
|
-
referenceId
|
|
76
|
-
currencyCode
|
|
77
|
-
maturityDate
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
`;
|
|
82
|
-
return (0, request_1.requestPost)(url, JSON.stringify({ query }))
|
|
83
|
-
.then((res) => {
|
|
84
|
-
var _a;
|
|
85
|
-
if (res.errors) {
|
|
86
|
-
console.error(res.errors);
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
return (_a = res.data) === null || _a === void 0 ? void 0 : _a.receivableEvents;
|
|
90
|
-
})
|
|
91
|
-
.catch((err) => {
|
|
92
|
-
console.error(err);
|
|
93
|
-
return undefined;
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* An object that contains functions to interact with Huma's solana service.
|
|
98
|
-
* @namespace SolanaService
|
|
99
|
-
*/
|
|
100
|
-
exports.SolanaService = {
|
|
101
|
-
getRecentActivities,
|
|
102
|
-
getReceivableLivestream,
|
|
103
|
-
};
|
|
104
|
-
//# sourceMappingURL=SolanaGraphService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaGraphService.js","sourceRoot":"","sources":["../../../../src/solana/services/SolanaGraphService.ts"],"names":[],"mappings":";;;AAAA,qDAAqC;AAErC,+CAA+C;AAC/C,iDAAiD;AAyBjD,SAAS,mBAAmB,CAC1B,UAAkB,EAClB,KAAa,EACb,IAAY,EACZ,KAAc,EACd,SAAkB,EAClB,OAGC;IAQD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;IACvC,MAAM,GAAG,GAAG,mBAAU,CAAC,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;IAE7D,IAAI,OAAO,GAAG;0BACU,UAAU;iBACnB,KAAK;gBACN,IAAI;;;OAGb,CAAA;IACL,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,IAAI,aAAa,KAAK,GAAG,CAAA;IAClC,CAAC;IACD,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,IAAI,eAAe,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAA;IAClD,CAAC;IAED,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;YAGP,OAAO;;;;;;;;;;;;;GAahB,CAAA;IAED,OAAO,IAAA,qBAAW,EAQf,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;SAC/B,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;;QACZ,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACzB,OAAO,SAAS,CAAA;QAClB,CAAC;QACD,OAAO,MAAA,GAAG,CAAC,IAAI,0CAAE,kBAAkB,CAAA;IACrC,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAClB,OAAO,SAAS,CAAA;IAClB,CAAC,CAAC,CAAA;AACN,CAAC;AAED,SAAS,uBAAuB,CAC9B,UAAkB,EAClB,KAAa,EACb,IAAY,EACZ,KAAc,EACd,SAAkB;IAQlB,MAAM,GAAG,GAAG,mBAAU,CAAC,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;IAE7D,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;0BAGO,UAAU;iBACnB,KAAK;gBACN,IAAI;;;;;;;;;;;;;;;;;;;;GAoBjB,CAAA;IAED,OAAO,IAAA,qBAAW,EAQf,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;SAC/B,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;;QACZ,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACzB,OAAO,SAAS,CAAA;QAClB,CAAC;QACD,OAAO,MAAA,GAAG,CAAC,IAAI,0CAAE,gBAAgB,CAAA;IACnC,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAClB,OAAO,SAAS,CAAA;IAClB,CAAC,CAAC,CAAA;AACN,CAAC;AAED;;;GAGG;AACU,QAAA,aAAa,GAAG;IAC3B,mBAAmB;IACnB,uBAAuB;CACxB,CAAA"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare class SiwsMessage {
|
|
2
|
-
/** RFC 4501 dns authority that is requesting the signing. */
|
|
3
|
-
domain: string;
|
|
4
|
-
/** Solana address performing the signing conformant to capitalization */
|
|
5
|
-
address: string;
|
|
6
|
-
/** Human-readable ASCII assertion that the user will sign, and it must not
|
|
7
|
-
* contain `\n`. */
|
|
8
|
-
statement: string;
|
|
9
|
-
/** RFC 3986 URI referring to the resource that is the subject of the signing
|
|
10
|
-
* (as in the __subject__ of a claim). */
|
|
11
|
-
uri: string;
|
|
12
|
-
/** Current version of the message. */
|
|
13
|
-
version: string;
|
|
14
|
-
/** Solana Chain ID to which the session is bound, and the network where
|
|
15
|
-
* Contract Accounts must be resolved. */
|
|
16
|
-
chainId: string;
|
|
17
|
-
/** Randomized token used to prevent replay attacks, at least 8 alphanumeric
|
|
18
|
-
* characters. */
|
|
19
|
-
nonce: string;
|
|
20
|
-
/** ISO 8601 datetime string of the current time. */
|
|
21
|
-
issuedAt: string;
|
|
22
|
-
/** ISO 8601 datetime string that, if present, indicates when the signed
|
|
23
|
-
* authentication message is no longer valid. */
|
|
24
|
-
expirationTime: string;
|
|
25
|
-
constructor(param: Omit<SiwsMessage, 'issuedAt' | 'prepareMessage'>);
|
|
26
|
-
prepareMessage(): string;
|
|
27
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SiwsMessage = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const moment_1 = tslib_1.__importDefault(require("moment"));
|
|
6
|
-
class SiwsMessage {
|
|
7
|
-
constructor(param) {
|
|
8
|
-
this.domain = param.domain;
|
|
9
|
-
this.address = param.address;
|
|
10
|
-
this.statement = param.statement;
|
|
11
|
-
this.uri = param.uri;
|
|
12
|
-
this.version = param.version;
|
|
13
|
-
this.chainId = param.chainId;
|
|
14
|
-
this.nonce = param.nonce;
|
|
15
|
-
this.issuedAt = (0, moment_1.default)().utc().format('YYYY-MM-DDTHH:mm:ss');
|
|
16
|
-
this.expirationTime = param.expirationTime;
|
|
17
|
-
}
|
|
18
|
-
prepareMessage() {
|
|
19
|
-
const headerPrefix = this.domain;
|
|
20
|
-
const header = `${headerPrefix} wants you to sign in with your Solana account:`;
|
|
21
|
-
const uriField = `URI: ${this.uri}`;
|
|
22
|
-
let prefix = [header, this.address].join('\n');
|
|
23
|
-
const versionField = `Version: ${this.version}`;
|
|
24
|
-
const chainField = `Chain ID: ${this.chainId}` || '1';
|
|
25
|
-
const nonceField = `Nonce: ${this.nonce}`;
|
|
26
|
-
const suffixArray = [uriField, versionField, chainField, nonceField];
|
|
27
|
-
this.issuedAt = this.issuedAt || new Date().toISOString();
|
|
28
|
-
suffixArray.push(`Issued At: ${this.issuedAt}`);
|
|
29
|
-
const expiryField = `Expiration Time: ${this.expirationTime}`;
|
|
30
|
-
suffixArray.push(expiryField);
|
|
31
|
-
const suffix = suffixArray.join('\n');
|
|
32
|
-
prefix = [prefix, this.statement].join('\n\n');
|
|
33
|
-
if (this.statement) {
|
|
34
|
-
prefix += '\n';
|
|
35
|
-
}
|
|
36
|
-
return [prefix, suffix].join('\n');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.SiwsMessage = SiwsMessage;
|
|
40
|
-
//# sourceMappingURL=siwsUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"siwsUtils.js","sourceRoot":"","sources":["../../../../src/solana/utils/siwsUtils.ts"],"names":[],"mappings":";;;;AAAA,4DAA2B;AAE3B,MAAa,WAAW;IAiCtB,YAAY,KAAuD;QACjE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;QAC1B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;QAChC,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,IAAA,gBAAM,GAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAA;QAC5D,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAA;IAC5C,CAAC;IAED,cAAc;QACZ,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAA;QAChC,MAAM,MAAM,GAAG,GAAG,YAAY,iDAAiD,CAAA;QAC/E,MAAM,QAAQ,GAAG,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAA;QACnC,IAAI,MAAM,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC9C,MAAM,YAAY,GAAG,YAAY,IAAI,CAAC,OAAO,EAAE,CAAA;QAE/C,MAAM,UAAU,GAAG,aAAa,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,CAAA;QAErD,MAAM,UAAU,GAAG,UAAU,IAAI,CAAC,KAAK,EAAE,CAAA;QAEzC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,CAAC,CAAA;QAEpE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;QAEzD,WAAW,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAA;QAE/C,MAAM,WAAW,GAAG,oBAAoB,IAAI,CAAC,cAAc,EAAE,CAAA;QAE7D,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAE7B,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACrC,MAAM,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9C,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,MAAM,IAAI,IAAI,CAAA;QAChB,CAAC;QACD,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACpC,CAAC;CACF;AAzED,kCAyEC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type CreateSessionResult = {
|
|
2
|
-
nonce: string;
|
|
3
|
-
expiresAt: string;
|
|
4
|
-
};
|
|
5
|
-
export declare const AuthService: {
|
|
6
|
-
createSession: (chainId: number, isDev?: boolean) => Promise<CreateSessionResult>;
|
|
7
|
-
verifySignature: (message: string, signature: string, chainId: number, isDev?: boolean) => Promise<null>;
|
|
8
|
-
verifySolanaTx: (message: string, serializedTx: string, chainId: number, isDev?: boolean) => Promise<null>;
|
|
9
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { configUtil, requestPost } from '../utils';
|
|
2
|
-
const createSession = async (chainId, isDev = false) => requestPost(`${configUtil.getAuthServiceUrl(chainId, isDev)}/session?chainId=${chainId}`);
|
|
3
|
-
const verifySignature = async (message, signature, chainId, isDev = false) => requestPost(`${configUtil.getAuthServiceUrl(chainId, isDev)}/verify-signature?chainId=${chainId}`, {
|
|
4
|
-
message,
|
|
5
|
-
signature,
|
|
6
|
-
});
|
|
7
|
-
const verifySolanaTx = async (message, serializedTx, chainId, isDev = false) => requestPost(`${configUtil.getAuthServiceUrl(chainId, isDev)}/verify-signature?chainId=${chainId}`, {
|
|
8
|
-
message,
|
|
9
|
-
serializedTx,
|
|
10
|
-
});
|
|
11
|
-
export const AuthService = {
|
|
12
|
-
createSession,
|
|
13
|
-
verifySignature,
|
|
14
|
-
verifySolanaTx,
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=AuthService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../src/services/AuthService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAOlD,MAAM,aAAa,GAAG,KAAK,EACzB,OAAe,EACf,QAAiB,KAAK,EACQ,EAAE,CAChC,WAAW,CACT,GAAG,UAAU,CAAC,iBAAiB,CAC7B,OAAO,EACP,KAAK,CACN,oBAAoB,OAAO,EAAE,CAC/B,CAAA;AAEH,MAAM,eAAe,GAAG,KAAK,EAC3B,OAAe,EACf,SAAiB,EACjB,OAAe,EACf,QAAiB,KAAK,EACP,EAAE,CACjB,WAAW,CACT,GAAG,UAAU,CAAC,iBAAiB,CAC7B,OAAO,EACP,KAAK,CACN,6BAA6B,OAAO,EAAE,EACvC;IACE,OAAO;IACP,SAAS;CACV,CACF,CAAA;AAEH,MAAM,cAAc,GAAG,KAAK,EAC1B,OAAe,EACf,YAAoB,EACpB,OAAe,EACf,QAAiB,KAAK,EACP,EAAE,CACjB,WAAW,CACT,GAAG,UAAU,CAAC,iBAAiB,CAC7B,OAAO,EACP,KAAK,CACN,6BAA6B,OAAO,EAAE,EACvC;IACE,OAAO;IACP,YAAY;CACb,CACF,CAAA;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,aAAa;IACb,eAAe;IACf,cAAc;CACf,CAAA"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { SolanaChainEnum, SolanaPoolInfo } from '../solana';
|
|
2
|
-
import { StellarPoolInfo } from '../stellar';
|
|
3
|
-
import { ChainEnum, NETWORK_TYPE } from '../utils/chain';
|
|
4
|
-
import { PoolInfoV2 } from '../v2/utils/pool';
|
|
5
|
-
export type CampaignSeason = {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
estimatedTotalPoints: number;
|
|
9
|
-
};
|
|
10
|
-
export type CampaignPartner = {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
multiplier: number;
|
|
14
|
-
};
|
|
15
|
-
export interface BaseCampaign {
|
|
16
|
-
id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
chainId: string;
|
|
19
|
-
juniorMultiplier: number;
|
|
20
|
-
seniorMultiplier: number;
|
|
21
|
-
lockupPeriodMonths: number;
|
|
22
|
-
poolAddress: string;
|
|
23
|
-
campaignGroupId: string;
|
|
24
|
-
partner?: CampaignPartner | null;
|
|
25
|
-
multiplierRange?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface Campaign extends BaseCampaign {
|
|
28
|
-
poolInfo: PoolInfoV2;
|
|
29
|
-
}
|
|
30
|
-
export interface SolanaCampaign extends BaseCampaign {
|
|
31
|
-
solanaPoolInfo: SolanaPoolInfo;
|
|
32
|
-
}
|
|
33
|
-
export interface StellarCampaign extends BaseCampaign {
|
|
34
|
-
stellarPoolInfo: StellarPoolInfo;
|
|
35
|
-
}
|
|
36
|
-
export type CampaignGroup = {
|
|
37
|
-
id: string;
|
|
38
|
-
name: string;
|
|
39
|
-
campaigns: Campaign[];
|
|
40
|
-
partners: CampaignPartner[];
|
|
41
|
-
};
|
|
42
|
-
export type SolanaCampaignGroup = {
|
|
43
|
-
id: string;
|
|
44
|
-
name: string;
|
|
45
|
-
campaigns: SolanaCampaign[];
|
|
46
|
-
partners: CampaignPartner[];
|
|
47
|
-
};
|
|
48
|
-
export type StellarCampaignGroup = {
|
|
49
|
-
id: string;
|
|
50
|
-
name: string;
|
|
51
|
-
campaigns: StellarCampaign[];
|
|
52
|
-
partners: CampaignPartner[];
|
|
53
|
-
};
|
|
54
|
-
type CampaignPoints = {
|
|
55
|
-
campaignId: string;
|
|
56
|
-
juniorTranchePoints: number;
|
|
57
|
-
seniorTranchePoints: number;
|
|
58
|
-
lockupPeriodMonths: number;
|
|
59
|
-
};
|
|
60
|
-
export type LeaderboardItem = {
|
|
61
|
-
accountId: string;
|
|
62
|
-
accountName: string;
|
|
63
|
-
points: number;
|
|
64
|
-
ranking: number;
|
|
65
|
-
referredCount: number;
|
|
66
|
-
};
|
|
67
|
-
export type HumaAccountPoints = {
|
|
68
|
-
accountId: string;
|
|
69
|
-
totalPoints: number;
|
|
70
|
-
basePoints: number;
|
|
71
|
-
liquidityPoints: number;
|
|
72
|
-
liquidityPointsList: {
|
|
73
|
-
address: string;
|
|
74
|
-
points: number;
|
|
75
|
-
}[];
|
|
76
|
-
referralPoints: number;
|
|
77
|
-
bonusPoints: number;
|
|
78
|
-
};
|
|
79
|
-
export type SeasonPoints = {
|
|
80
|
-
seasonName: string;
|
|
81
|
-
endsAt: string;
|
|
82
|
-
totalPoints: number;
|
|
83
|
-
basePoints: number;
|
|
84
|
-
liquidityPoints: number;
|
|
85
|
-
referralPoints: number;
|
|
86
|
-
bonusPoints: number;
|
|
87
|
-
};
|
|
88
|
-
declare function checkWalletOwnership(wallet: string, networkType: NETWORK_TYPE, isDev: boolean): Promise<boolean | undefined>;
|
|
89
|
-
declare function getLeaderboard(seasonId: string, networkType: NETWORK_TYPE, isDev: boolean): Promise<LeaderboardItem[] | undefined>;
|
|
90
|
-
declare function getHumaAccountRanking(seasonId: string, networkType: NETWORK_TYPE, isDev: boolean): Promise<LeaderboardItem | undefined>;
|
|
91
|
-
declare function getHumaAccountPoints(networkType: NETWORK_TYPE, isDev: boolean): Promise<HumaAccountPoints | undefined>;
|
|
92
|
-
declare function getSeasonPoints(networkType: NETWORK_TYPE, isDev: boolean): Promise<SeasonPoints[] | undefined>;
|
|
93
|
-
declare function getEstimatedPoints(campaignGroupId: string, principal: string, networkType: NETWORK_TYPE, isDev: boolean): Promise<CampaignPoints[]>;
|
|
94
|
-
declare function updateHumaAccountPoints(walletAddress: string, transactionHash: string, chainId: ChainEnum | SolanaChainEnum, networkType: NETWORK_TYPE, isDev: boolean): Promise<{
|
|
95
|
-
pointsAccumulated?: number;
|
|
96
|
-
}>;
|
|
97
|
-
/**
|
|
98
|
-
* An object that contains functions to interact with Huma's campaign service.
|
|
99
|
-
* @namespace CampaignService
|
|
100
|
-
*/
|
|
101
|
-
export declare const CampaignService: {
|
|
102
|
-
checkWalletOwnership: typeof checkWalletOwnership;
|
|
103
|
-
getEstimatedPoints: typeof getEstimatedPoints;
|
|
104
|
-
getLeaderboard: typeof getLeaderboard;
|
|
105
|
-
getHumaAccountRanking: typeof getHumaAccountRanking;
|
|
106
|
-
getHumaAccountPoints: typeof getHumaAccountPoints;
|
|
107
|
-
updateHumaAccountPoints: typeof updateHumaAccountPoints;
|
|
108
|
-
getSeasonPoints: typeof getSeasonPoints;
|
|
109
|
-
};
|
|
110
|
-
export {};
|