@sign-global/tokentable-core 1.2.2 → 1.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @sign-global/tokentable-core
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat: add claim strategy configuration
8
+
9
+ ## 1.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - feat: add Discord OAuth support
14
+
3
15
  ## 1.2.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1388,6 +1388,7 @@ declare const SupportedChains: ({
1388
1388
  declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
1389
1389
  declare const CONST: {
1390
1390
  readonly TWITTER_AUTH_SUCCESS: "twitter:auth:success";
1391
+ readonly DISCORD_AUTH_SUCCESS: "discord:auth:success";
1391
1392
  readonly GOOGLE_AUTH_SUCCESS: "google:auth:success";
1392
1393
  readonly WELCOME_SIGNATURE_STATEMENT: "Welcome to TokenTable!";
1393
1394
  };
@@ -1846,7 +1847,8 @@ declare enum AirdropSigIdentityTypeEnum {
1846
1847
  SolanaWallet = "Solana Wallet",
1847
1848
  EVMWallet = "EVM Wallet",
1848
1849
  TONWallet = "TON Wallet",
1849
- Google = "Google Account"
1850
+ Google = "Google Account",
1851
+ Discord = "Discord Account"
1850
1852
  }
1851
1853
  interface IProjectExtra {
1852
1854
  kyc: boolean;
@@ -2094,6 +2096,7 @@ interface WalletBindParams {
2094
2096
  }
2095
2097
  declare const connectTwitter: (data: SocialConnectParams, baseURL?: string) => Promise<SidResponse>;
2096
2098
  declare const connectGoogleApi: (data: SocialConnectParams, baseURL?: string) => Promise<SidResponse>;
2099
+ declare const connectDiscordApi: (data: SocialConnectParams, baseURL?: string) => Promise<SidResponse>;
2097
2100
  declare const checkEligibility: (data: {
2098
2101
  projectId: string;
2099
2102
  }, baseURL?: string) => Promise<IAirdropSignatureData>;
@@ -2108,6 +2111,7 @@ declare const checkGetSignatures: (data: {
2108
2111
  projectId: string;
2109
2112
  claimIds: string[];
2110
2113
  recipient: string;
2114
+ strategy?: string;
2111
2115
  }, baseURL?: string) => Promise<{
2112
2116
  signatures: IClaimSignature[];
2113
2117
  }>;
@@ -2191,4 +2195,4 @@ declare const getAvailableClaimAmountForSignature: ({ contractAddress, chainId,
2191
2195
  }[];
2192
2196
  }) => Promise<string | 0>;
2193
2197
 
2194
- export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$2 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$2 as EvmSignatureAirdropService, type FetchTokenMetadataOptions, type FetchTokenVersionOptions, type IAirdropClaim, type IAirdropClaimData, type IAirdropData, type IAirdropOptions, type IAirdropService, type IAirdropSignatureClaim, type IAirdropSignatureData, type IAirdropSignatureIdentity, type IClaimSignature, type IContractConfig, type IExtraData, type IProject, type IProjectExtra, type ISignatureClaimData, type IWalletClient, type Identity, AirdropService$1 as SolanaAirdropService, SignatureAirdropService$1 as SolanaSignatureAirdropService, SplTokenVersion, SignatureAirdropService as SuiSignatureAirdropService, type SupportedChainType, SupportedChains, type ThemeConfig, AirdropService as TonAirdropService, TonAirdropVersionEnum, TonWalletService, ZERO_ADDRESS, apiClient, batchCheckClaimedForSignature, bindWallet, checkEligibility, checkGetSignatures, cleanUrlParams, clusterApiUrl, connectGoogleApi, connectTwitter, delay, disconnectRecipient, fetchTokenVersion, flipAddressType, getAirdropContractConfig, getAirdropPro, getAirdropProject, getAirdropProjectId, getAirdropQuery, getAvailableClaimAmountForSignature, getChainById, getChainConfig, getChainRpc, getCustomNaNoId, getJettonInfo, getOrCreateAssociatedTokenAccount, getTonProjectIdByAddress, hexStrToU8Array, isBeforeByUnix, isGreaterThan, isMobile, mevmDevNet, retry, safeParseJSON, safePlus, signBrBTestnet, solanaDevNet, solanaMainNet, suiMainNet, suiTestNet, tonMainNet, tonTestNet };
2198
+ export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$2 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$2 as EvmSignatureAirdropService, type FetchTokenMetadataOptions, type FetchTokenVersionOptions, type IAirdropClaim, type IAirdropClaimData, type IAirdropData, type IAirdropOptions, type IAirdropService, type IAirdropSignatureClaim, type IAirdropSignatureData, type IAirdropSignatureIdentity, type IClaimSignature, type IContractConfig, type IExtraData, type IProject, type IProjectExtra, type ISignatureClaimData, type IWalletClient, type Identity, AirdropService$1 as SolanaAirdropService, SignatureAirdropService$1 as SolanaSignatureAirdropService, SplTokenVersion, SignatureAirdropService as SuiSignatureAirdropService, type SupportedChainType, SupportedChains, type ThemeConfig, AirdropService as TonAirdropService, TonAirdropVersionEnum, TonWalletService, ZERO_ADDRESS, apiClient, batchCheckClaimedForSignature, bindWallet, checkEligibility, checkGetSignatures, cleanUrlParams, clusterApiUrl, connectDiscordApi, connectGoogleApi, connectTwitter, delay, disconnectRecipient, fetchTokenVersion, flipAddressType, getAirdropContractConfig, getAirdropPro, getAirdropProject, getAirdropProjectId, getAirdropQuery, getAvailableClaimAmountForSignature, getChainById, getChainConfig, getChainRpc, getCustomNaNoId, getJettonInfo, getOrCreateAssociatedTokenAccount, getTonProjectIdByAddress, hexStrToU8Array, isBeforeByUnix, isGreaterThan, isMobile, mevmDevNet, retry, safeParseJSON, safePlus, signBrBTestnet, solanaDevNet, solanaMainNet, suiMainNet, suiTestNet, tonMainNet, tonTestNet };
package/dist/index.d.ts CHANGED
@@ -1388,6 +1388,7 @@ declare const SupportedChains: ({
1388
1388
  declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
1389
1389
  declare const CONST: {
1390
1390
  readonly TWITTER_AUTH_SUCCESS: "twitter:auth:success";
1391
+ readonly DISCORD_AUTH_SUCCESS: "discord:auth:success";
1391
1392
  readonly GOOGLE_AUTH_SUCCESS: "google:auth:success";
1392
1393
  readonly WELCOME_SIGNATURE_STATEMENT: "Welcome to TokenTable!";
1393
1394
  };
@@ -1846,7 +1847,8 @@ declare enum AirdropSigIdentityTypeEnum {
1846
1847
  SolanaWallet = "Solana Wallet",
1847
1848
  EVMWallet = "EVM Wallet",
1848
1849
  TONWallet = "TON Wallet",
1849
- Google = "Google Account"
1850
+ Google = "Google Account",
1851
+ Discord = "Discord Account"
1850
1852
  }
1851
1853
  interface IProjectExtra {
1852
1854
  kyc: boolean;
@@ -2094,6 +2096,7 @@ interface WalletBindParams {
2094
2096
  }
2095
2097
  declare const connectTwitter: (data: SocialConnectParams, baseURL?: string) => Promise<SidResponse>;
2096
2098
  declare const connectGoogleApi: (data: SocialConnectParams, baseURL?: string) => Promise<SidResponse>;
2099
+ declare const connectDiscordApi: (data: SocialConnectParams, baseURL?: string) => Promise<SidResponse>;
2097
2100
  declare const checkEligibility: (data: {
2098
2101
  projectId: string;
2099
2102
  }, baseURL?: string) => Promise<IAirdropSignatureData>;
@@ -2108,6 +2111,7 @@ declare const checkGetSignatures: (data: {
2108
2111
  projectId: string;
2109
2112
  claimIds: string[];
2110
2113
  recipient: string;
2114
+ strategy?: string;
2111
2115
  }, baseURL?: string) => Promise<{
2112
2116
  signatures: IClaimSignature[];
2113
2117
  }>;
@@ -2191,4 +2195,4 @@ declare const getAvailableClaimAmountForSignature: ({ contractAddress, chainId,
2191
2195
  }[];
2192
2196
  }) => Promise<string | 0>;
2193
2197
 
2194
- export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$2 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$2 as EvmSignatureAirdropService, type FetchTokenMetadataOptions, type FetchTokenVersionOptions, type IAirdropClaim, type IAirdropClaimData, type IAirdropData, type IAirdropOptions, type IAirdropService, type IAirdropSignatureClaim, type IAirdropSignatureData, type IAirdropSignatureIdentity, type IClaimSignature, type IContractConfig, type IExtraData, type IProject, type IProjectExtra, type ISignatureClaimData, type IWalletClient, type Identity, AirdropService$1 as SolanaAirdropService, SignatureAirdropService$1 as SolanaSignatureAirdropService, SplTokenVersion, SignatureAirdropService as SuiSignatureAirdropService, type SupportedChainType, SupportedChains, type ThemeConfig, AirdropService as TonAirdropService, TonAirdropVersionEnum, TonWalletService, ZERO_ADDRESS, apiClient, batchCheckClaimedForSignature, bindWallet, checkEligibility, checkGetSignatures, cleanUrlParams, clusterApiUrl, connectGoogleApi, connectTwitter, delay, disconnectRecipient, fetchTokenVersion, flipAddressType, getAirdropContractConfig, getAirdropPro, getAirdropProject, getAirdropProjectId, getAirdropQuery, getAvailableClaimAmountForSignature, getChainById, getChainConfig, getChainRpc, getCustomNaNoId, getJettonInfo, getOrCreateAssociatedTokenAccount, getTonProjectIdByAddress, hexStrToU8Array, isBeforeByUnix, isGreaterThan, isMobile, mevmDevNet, retry, safeParseJSON, safePlus, signBrBTestnet, solanaDevNet, solanaMainNet, suiMainNet, suiTestNet, tonMainNet, tonTestNet };
2198
+ export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$2 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$2 as EvmSignatureAirdropService, type FetchTokenMetadataOptions, type FetchTokenVersionOptions, type IAirdropClaim, type IAirdropClaimData, type IAirdropData, type IAirdropOptions, type IAirdropService, type IAirdropSignatureClaim, type IAirdropSignatureData, type IAirdropSignatureIdentity, type IClaimSignature, type IContractConfig, type IExtraData, type IProject, type IProjectExtra, type ISignatureClaimData, type IWalletClient, type Identity, AirdropService$1 as SolanaAirdropService, SignatureAirdropService$1 as SolanaSignatureAirdropService, SplTokenVersion, SignatureAirdropService as SuiSignatureAirdropService, type SupportedChainType, SupportedChains, type ThemeConfig, AirdropService as TonAirdropService, TonAirdropVersionEnum, TonWalletService, ZERO_ADDRESS, apiClient, batchCheckClaimedForSignature, bindWallet, checkEligibility, checkGetSignatures, cleanUrlParams, clusterApiUrl, connectDiscordApi, connectGoogleApi, connectTwitter, delay, disconnectRecipient, fetchTokenVersion, flipAddressType, getAirdropContractConfig, getAirdropPro, getAirdropProject, getAirdropProjectId, getAirdropQuery, getAvailableClaimAmountForSignature, getChainById, getChainConfig, getChainRpc, getCustomNaNoId, getJettonInfo, getOrCreateAssociatedTokenAccount, getTonProjectIdByAddress, hexStrToU8Array, isBeforeByUnix, isGreaterThan, isMobile, mevmDevNet, retry, safeParseJSON, safePlus, signBrBTestnet, solanaDevNet, solanaMainNet, suiMainNet, suiTestNet, tonMainNet, tonTestNet };
package/dist/index.js CHANGED
@@ -56,6 +56,7 @@ __export(index_exports, {
56
56
  checkGetSignatures: () => checkGetSignatures,
57
57
  cleanUrlParams: () => cleanUrlParams,
58
58
  clusterApiUrl: () => clusterApiUrl,
59
+ connectDiscordApi: () => connectDiscordApi,
59
60
  connectGoogleApi: () => connectGoogleApi,
60
61
  connectTwitter: () => connectTwitter,
61
62
  delay: () => delay,
@@ -413,6 +414,7 @@ var SupportedChains = [
413
414
  var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
414
415
  var CONST = {
415
416
  TWITTER_AUTH_SUCCESS: "twitter:auth:success",
417
+ DISCORD_AUTH_SUCCESS: "discord:auth:success",
416
418
  GOOGLE_AUTH_SUCCESS: "google:auth:success",
417
419
  WELCOME_SIGNATURE_STATEMENT: "Welcome to TokenTable!"
418
420
  };
@@ -3806,6 +3808,7 @@ var AirdropSigIdentityTypeEnum = /* @__PURE__ */ ((AirdropSigIdentityTypeEnum2)
3806
3808
  AirdropSigIdentityTypeEnum2["EVMWallet"] = "EVM Wallet";
3807
3809
  AirdropSigIdentityTypeEnum2["TONWallet"] = "TON Wallet";
3808
3810
  AirdropSigIdentityTypeEnum2["Google"] = "Google Account";
3811
+ AirdropSigIdentityTypeEnum2["Discord"] = "Discord Account";
3809
3812
  return AirdropSigIdentityTypeEnum2;
3810
3813
  })(AirdropSigIdentityTypeEnum || {});
3811
3814
  var ETokenType = /* @__PURE__ */ ((ETokenType2) => {
@@ -10598,6 +10601,12 @@ var connectGoogleApi = async (data, baseURL) => {
10598
10601
  headers: getSidHeader(data.projectId)
10599
10602
  });
10600
10603
  };
10604
+ var connectDiscordApi = async (data, baseURL) => {
10605
+ const client = createApiClient(baseURL);
10606
+ return client.post("/airdrop-open/connect-discord", data, {
10607
+ headers: getSidHeader(data.projectId)
10608
+ });
10609
+ };
10601
10610
  var checkEligibility = async (data, baseURL) => {
10602
10611
  const headers = getSidHeader(data.projectId);
10603
10612
  if (!headers.sid)
@@ -12732,6 +12741,7 @@ var SignatureAirdropService3 = class {
12732
12741
  checkGetSignatures,
12733
12742
  cleanUrlParams,
12734
12743
  clusterApiUrl,
12744
+ connectDiscordApi,
12735
12745
  connectGoogleApi,
12736
12746
  connectTwitter,
12737
12747
  delay,