@liberfi.io/types 0.1.4 → 0.1.7
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/index.d.mts +679 -399
- package/dist/index.d.ts +679 -399
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Window {
|
|
3
|
-
__LIBERFI_VERSION__?: {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
declare const _default: "0.1.0";
|
|
9
|
-
|
|
10
1
|
declare enum Chain {
|
|
11
2
|
ETHEREUM = "1",
|
|
12
3
|
UBIQ = "8",
|
|
@@ -411,33 +402,33 @@ interface TokenStats {
|
|
|
411
402
|
/**
|
|
412
403
|
* token stats by 1m timeframe.
|
|
413
404
|
*/
|
|
414
|
-
"1m"?:
|
|
405
|
+
"1m"?: TokenStatsByResolution;
|
|
415
406
|
/**
|
|
416
407
|
* token stats by 5m timeframe.
|
|
417
408
|
*/
|
|
418
|
-
"5m"?:
|
|
409
|
+
"5m"?: TokenStatsByResolution;
|
|
419
410
|
/**
|
|
420
411
|
* token stats by 15m timeframe.
|
|
421
412
|
*/
|
|
422
|
-
"15m"?:
|
|
413
|
+
"15m"?: TokenStatsByResolution;
|
|
423
414
|
/**
|
|
424
415
|
* token stats by 30m timeframe.
|
|
425
416
|
*/
|
|
426
|
-
"30m"?:
|
|
417
|
+
"30m"?: TokenStatsByResolution;
|
|
427
418
|
/**
|
|
428
419
|
* token stats by 1h timeframe.
|
|
429
420
|
*/
|
|
430
|
-
"1h"?:
|
|
421
|
+
"1h"?: TokenStatsByResolution;
|
|
431
422
|
/**
|
|
432
423
|
* token stats by 4h timeframe.
|
|
433
424
|
*/
|
|
434
|
-
"4h"?:
|
|
425
|
+
"4h"?: TokenStatsByResolution;
|
|
435
426
|
/**
|
|
436
427
|
* token stats by 24h timeframe.
|
|
437
428
|
*/
|
|
438
|
-
"24h"?:
|
|
429
|
+
"24h"?: TokenStatsByResolution;
|
|
439
430
|
}
|
|
440
|
-
interface
|
|
431
|
+
interface TokenStatsByResolution {
|
|
441
432
|
/**
|
|
442
433
|
* buy txs count
|
|
443
434
|
*/
|
|
@@ -727,411 +718,700 @@ interface WalletPortfolios {
|
|
|
727
718
|
portfolios: Array<Portfolio>;
|
|
728
719
|
}
|
|
729
720
|
|
|
730
|
-
|
|
721
|
+
/**
|
|
722
|
+
* Cursor list result data
|
|
723
|
+
*/
|
|
724
|
+
interface CursorList<T> {
|
|
725
|
+
startCursor?: string;
|
|
726
|
+
endCursor?: string;
|
|
727
|
+
hasPrev?: boolean;
|
|
728
|
+
hasNext?: boolean;
|
|
729
|
+
data: Array<T>;
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Cursor list query options
|
|
733
|
+
*/
|
|
734
|
+
interface CursorListOptions {
|
|
735
|
+
cursor?: string;
|
|
736
|
+
limit?: number;
|
|
737
|
+
direction?: "next" | "prev";
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* Options for getting token candles
|
|
741
|
+
*/
|
|
742
|
+
interface GetTokenCandlesOptions {
|
|
743
|
+
after?: Date;
|
|
744
|
+
before?: Date;
|
|
745
|
+
limit?: number;
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Token field for filtering
|
|
749
|
+
*/
|
|
750
|
+
type TokenFieldOption = "price" | "priceChange1m" | "priceChange5m" | "priceChange15m" | "priceChange30m" | "priceChange1h" | "priceChange4h" | "priceChange24h" | "marketCap" | "tvl" | "top10Holdings" | "top10Ratio" | "top100Holdings" | "top100Ratio" | "holders" | "creatorsHoldings" | "creatorsRatio" | "buys1m" | "buys5m" | "buys15m" | "buys30m" | "buys1h" | "buys4h" | "buys24h" | "sells1m" | "sells5m" | "sells15m" | "sells30m" | "sells1h" | "sells4h" | "sells24h" | "trades1m" | "trades5m" | "trades15m" | "trades30m" | "trades1h" | "trades4h" | "trades24h" | "traders1m" | "traders5m" | "traders15m" | "traders30m" | "traders1h" | "traders4h" | "traders24h" | "volumes1m" | "volumes5m" | "volumes15m" | "volumes30m" | "volumes1h" | "volumes4h" | "volumes24h" | "launchedFromProtocolFamily" | "migratedToProtocolFamily" | "tag" | "createdAt" | (string & {});
|
|
751
|
+
/**
|
|
752
|
+
* Token filter option
|
|
753
|
+
*/
|
|
754
|
+
interface TokenFilterOption {
|
|
755
|
+
field: TokenFieldOption;
|
|
756
|
+
operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "nin" | "contains" | "notContains" | "startsWith" | "endsWith" | "isNotNull" | "isNull";
|
|
757
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Options for getting token list
|
|
761
|
+
*/
|
|
762
|
+
interface GetTokenListOptions {
|
|
763
|
+
sortBy?: TokenFieldOption;
|
|
764
|
+
sortDirection?: "asc" | "desc";
|
|
765
|
+
filters?: Array<TokenFilterOption>;
|
|
766
|
+
keywords?: Array<string>;
|
|
767
|
+
excludeKeywords?: Array<string>;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Options for searching tokens
|
|
771
|
+
*/
|
|
772
|
+
interface SearchTokensOptions extends CursorListOptions {
|
|
773
|
+
chains?: Array<Chain>;
|
|
774
|
+
keyword?: string;
|
|
775
|
+
filters?: Array<TokenFilterOption>;
|
|
776
|
+
sortBy?: TokenFieldOption;
|
|
777
|
+
sortDirection?: "asc" | "desc";
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Search token cursor list
|
|
781
|
+
*/
|
|
782
|
+
interface SearchTokenCursorList extends CursorList<Token> {
|
|
783
|
+
total?: number;
|
|
784
|
+
extra?: any;
|
|
785
|
+
}
|
|
786
|
+
declare enum SwapMode {
|
|
787
|
+
EXACT_IN = "ExactIn",
|
|
788
|
+
EXACT_OUT = "ExactOut"
|
|
789
|
+
}
|
|
790
|
+
interface SwapParams {
|
|
791
|
+
chain: Chain;
|
|
792
|
+
userAddress: string;
|
|
793
|
+
input: string;
|
|
794
|
+
output: string;
|
|
795
|
+
mode: SwapMode;
|
|
796
|
+
amount: string;
|
|
797
|
+
slippage?: number;
|
|
798
|
+
priorityFee?: string;
|
|
799
|
+
tipFee?: string;
|
|
800
|
+
isAntiMev?: boolean;
|
|
801
|
+
}
|
|
802
|
+
interface SwapRoutePlan {
|
|
803
|
+
name: string;
|
|
804
|
+
input: string;
|
|
805
|
+
inputAmount: string;
|
|
806
|
+
output: string;
|
|
807
|
+
outputAmount: string;
|
|
808
|
+
feeQuote?: string;
|
|
809
|
+
feeAmount?: string;
|
|
810
|
+
extra?: any;
|
|
811
|
+
}
|
|
812
|
+
interface SwapRoute {
|
|
813
|
+
serializedTx: string;
|
|
814
|
+
plans: Array<SwapRoutePlan>;
|
|
815
|
+
extra?: any;
|
|
816
|
+
}
|
|
817
|
+
interface SendTxParams {
|
|
818
|
+
chain: Chain;
|
|
819
|
+
serializedTx: string;
|
|
820
|
+
extra?: any;
|
|
821
|
+
}
|
|
822
|
+
interface SendTxResult {
|
|
823
|
+
txHash: string;
|
|
824
|
+
extra?: any;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Options for getting trade activities
|
|
828
|
+
*/
|
|
829
|
+
interface GetTradeActivitiesOptions extends CursorListOptions {
|
|
830
|
+
before?: Date;
|
|
831
|
+
after?: Date;
|
|
832
|
+
beforeBlockHeight?: number;
|
|
833
|
+
afterBlockHeight?: number;
|
|
834
|
+
type?: "buy" | "sell";
|
|
835
|
+
poolAddress?: string;
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* API client interface
|
|
839
|
+
*/
|
|
840
|
+
interface IClient {
|
|
731
841
|
/**
|
|
732
|
-
*
|
|
842
|
+
* fetch token info
|
|
843
|
+
* @param chain chain id
|
|
844
|
+
* @param address token address
|
|
845
|
+
* @returns token info
|
|
733
846
|
*/
|
|
734
|
-
|
|
735
|
-
startCursor?: string;
|
|
736
|
-
endCursor?: string;
|
|
737
|
-
hasPrev?: boolean;
|
|
738
|
-
hasNext?: boolean;
|
|
739
|
-
data: Array<T>;
|
|
740
|
-
}
|
|
847
|
+
getToken(chain: Chain, address: string): Promise<Token>;
|
|
741
848
|
/**
|
|
742
|
-
*
|
|
849
|
+
* fetch token infos in batch
|
|
850
|
+
* @param chain chain id
|
|
851
|
+
* @param addresses token addresses
|
|
852
|
+
* @returns token infos
|
|
743
853
|
*/
|
|
744
|
-
|
|
745
|
-
cursor?: string;
|
|
746
|
-
limit?: number;
|
|
747
|
-
direction?: "next" | "prev";
|
|
748
|
-
}
|
|
854
|
+
getTokens(chain: Chain, addresses: Array<string>): Promise<Array<Token>>;
|
|
749
855
|
/**
|
|
750
|
-
*
|
|
856
|
+
* fetch token candles
|
|
857
|
+
* @param chain chain id
|
|
858
|
+
* @param address token address
|
|
859
|
+
* @param resolution token resolution
|
|
860
|
+
* @param options optional query options
|
|
861
|
+
* @returns token candles
|
|
751
862
|
*/
|
|
752
|
-
|
|
753
|
-
after?: Date;
|
|
754
|
-
before?: Date;
|
|
755
|
-
limit?: number;
|
|
756
|
-
}
|
|
863
|
+
getTokenCandles(chain: Chain, address: string, resolution: TokenResolution, options?: GetTokenCandlesOptions): Promise<Array<TokenCandle>>;
|
|
757
864
|
/**
|
|
758
|
-
*
|
|
865
|
+
* fetch token security
|
|
866
|
+
* @param chain chain id
|
|
867
|
+
* @param address token address
|
|
868
|
+
* @returns token security
|
|
759
869
|
*/
|
|
760
|
-
|
|
870
|
+
getTokenSecurity(chain: Chain, address: string): Promise<TokenSecurity>;
|
|
761
871
|
/**
|
|
762
|
-
*
|
|
872
|
+
* fetch token stats
|
|
873
|
+
* @param chain chain id
|
|
874
|
+
* @param address token address
|
|
875
|
+
* @returns token stats
|
|
763
876
|
*/
|
|
764
|
-
|
|
765
|
-
field: TokenFieldOption;
|
|
766
|
-
operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "nin" | "contains" | "notContains" | "startsWith" | "endsWith" | "isNotNull" | "isNull";
|
|
767
|
-
value?: string | number | boolean | Array<string | number | boolean>;
|
|
768
|
-
}
|
|
877
|
+
getTokenStats(chain: Chain, address: string): Promise<TokenStats>;
|
|
769
878
|
/**
|
|
770
|
-
*
|
|
879
|
+
* fetch token holders
|
|
880
|
+
* @param chain chain id
|
|
881
|
+
* @param address token address
|
|
882
|
+
* @param options optional query options
|
|
883
|
+
* @returns token holders
|
|
771
884
|
*/
|
|
772
|
-
|
|
773
|
-
sortBy?: TokenFieldOption;
|
|
774
|
-
sortDirection?: "asc" | "desc";
|
|
775
|
-
filters?: Array<TokenFilterOption>;
|
|
776
|
-
keywords?: Array<string>;
|
|
777
|
-
excludeKeywords?: Array<string>;
|
|
778
|
-
}
|
|
885
|
+
getTokenHolders(chain: Chain, address: string, options?: CursorListOptions): Promise<CursorList<TokenHolder>>;
|
|
779
886
|
/**
|
|
780
|
-
*
|
|
887
|
+
* fetch token market data
|
|
888
|
+
* @param chain chain id
|
|
889
|
+
* @param address token address
|
|
890
|
+
* @returns token market data
|
|
781
891
|
*/
|
|
782
|
-
|
|
783
|
-
chains?: Array<Chain>;
|
|
784
|
-
keyword?: string;
|
|
785
|
-
filters?: Array<TokenFilterOption>;
|
|
786
|
-
sortBy?: TokenFieldOption;
|
|
787
|
-
sortDirection?: "asc" | "desc";
|
|
788
|
-
}
|
|
892
|
+
getTokenMarketData(chain: Chain, address: string): Promise<TokenMarketData>;
|
|
789
893
|
/**
|
|
790
|
-
*
|
|
894
|
+
* fetch `New` token list
|
|
895
|
+
* @param chain chain id
|
|
896
|
+
* @param options optional query options
|
|
897
|
+
* @returns `New` token list
|
|
791
898
|
*/
|
|
792
|
-
|
|
793
|
-
total?: number;
|
|
794
|
-
extra?: any;
|
|
795
|
-
}
|
|
796
|
-
enum SwapMode {
|
|
797
|
-
EXACT_IN = "ExactIn",
|
|
798
|
-
EXACT_OUT = "ExactOut"
|
|
799
|
-
}
|
|
800
|
-
interface SwapParams {
|
|
801
|
-
chain: Chain;
|
|
802
|
-
userAddress: string;
|
|
803
|
-
input: string;
|
|
804
|
-
output: string;
|
|
805
|
-
mode: SwapMode;
|
|
806
|
-
amount: string;
|
|
807
|
-
slippage?: number;
|
|
808
|
-
priorityFee?: string;
|
|
809
|
-
tipFee?: string;
|
|
810
|
-
isAntiMev?: boolean;
|
|
811
|
-
}
|
|
812
|
-
interface SwapRoutePlan {
|
|
813
|
-
name: string;
|
|
814
|
-
input: string;
|
|
815
|
-
inputAmount: string;
|
|
816
|
-
output: string;
|
|
817
|
-
outputAmount: string;
|
|
818
|
-
feeQuote?: string;
|
|
819
|
-
feeAmount?: string;
|
|
820
|
-
extra?: any;
|
|
821
|
-
}
|
|
822
|
-
interface SwapRoute {
|
|
823
|
-
serializedTx: string;
|
|
824
|
-
plans: Array<SwapRoutePlan>;
|
|
825
|
-
extra?: any;
|
|
826
|
-
}
|
|
827
|
-
interface SendTxParams {
|
|
828
|
-
chain: Chain;
|
|
829
|
-
serializedTx: string;
|
|
830
|
-
extra?: any;
|
|
831
|
-
}
|
|
832
|
-
interface SendTxResult {
|
|
833
|
-
txHash: string;
|
|
834
|
-
extra?: any;
|
|
835
|
-
}
|
|
899
|
+
getNewTokens(chain: Chain, options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
836
900
|
/**
|
|
837
|
-
*
|
|
901
|
+
* fetch `Final Stretch` token list
|
|
902
|
+
* @param chain chain id
|
|
903
|
+
* @param options optional query options
|
|
904
|
+
* @returns `Final Stretch` token list
|
|
838
905
|
*/
|
|
839
|
-
|
|
840
|
-
before?: Date;
|
|
841
|
-
after?: Date;
|
|
842
|
-
beforeBlockHeight?: number;
|
|
843
|
-
afterBlockHeight?: number;
|
|
844
|
-
type?: "buy" | "sell";
|
|
845
|
-
poolAddress?: string;
|
|
846
|
-
}
|
|
906
|
+
getFinalStretchTokens(chain: Chain, options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
847
907
|
/**
|
|
848
|
-
*
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
*
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
908
|
+
* fetch `Migrated` token list
|
|
909
|
+
* @param chain chain id
|
|
910
|
+
* @param options optional query options
|
|
911
|
+
* @returns `Migrated` token list
|
|
912
|
+
*/
|
|
913
|
+
getMigratedTokens(chain: Chain, options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
914
|
+
/**
|
|
915
|
+
* fetch `Trending` token list
|
|
916
|
+
* @param chain chain id
|
|
917
|
+
* @param resolution query resolution, e.g. "1m", "5m", "1h", "4h", "24h"
|
|
918
|
+
* @param options optional query options
|
|
919
|
+
* @returns `Trending` token list
|
|
920
|
+
*/
|
|
921
|
+
getTrendingTokens(chain: Chain, resolution: "1m" | "5m" | "1h" | "4h" | "24h", options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
922
|
+
/**
|
|
923
|
+
* fetch `Stock` token list
|
|
924
|
+
* @param chain chain id
|
|
925
|
+
* @param options optional query options
|
|
926
|
+
* @returns `Stock` token list
|
|
927
|
+
*/
|
|
928
|
+
getStockTokens(chain: Chain, options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
929
|
+
/**
|
|
930
|
+
* search tokens
|
|
931
|
+
* @param options optional query options
|
|
932
|
+
* @returns search token cursor list
|
|
933
|
+
*/
|
|
934
|
+
searchTokens(options?: SearchTokensOptions): Promise<SearchTokenCursorList>;
|
|
935
|
+
/**
|
|
936
|
+
* fetch swap route plans
|
|
937
|
+
* @param params swap params
|
|
938
|
+
* @returns swap route plans
|
|
939
|
+
*/
|
|
940
|
+
swapRoute(params: SwapParams): Promise<SwapRoute>;
|
|
941
|
+
/**
|
|
942
|
+
* send tx
|
|
943
|
+
* @param params send tx params
|
|
944
|
+
* @returns send tx result
|
|
945
|
+
*/
|
|
946
|
+
sendTx(params: SendTxParams): Promise<SendTxResult>;
|
|
947
|
+
/**
|
|
948
|
+
* check if tx is successful
|
|
949
|
+
* @param chain chain id
|
|
950
|
+
* @param txHash tx hash
|
|
951
|
+
* @param timeout timeout in milliseconds
|
|
952
|
+
* @returns true if tx is successful, false otherwise
|
|
953
|
+
*/
|
|
954
|
+
checkTxSuccess(chain: Chain, txHash: string, timeout?: number): Promise<boolean>;
|
|
955
|
+
/**
|
|
956
|
+
* fetch wallet portfolios
|
|
957
|
+
* @param chain chain id
|
|
958
|
+
* @param address wallet address
|
|
959
|
+
* @returns wallet portfolios
|
|
960
|
+
*/
|
|
961
|
+
getWalletPortfolios(chain: Chain, address: string): Promise<WalletPortfolios>;
|
|
962
|
+
/**
|
|
963
|
+
* fetch wallet's trade activities
|
|
964
|
+
* @param chain chain id
|
|
965
|
+
* @param address wallet address
|
|
966
|
+
* @param options optional query options
|
|
967
|
+
* @returns wallet's trade activities
|
|
968
|
+
*/
|
|
969
|
+
getWalletTradeActivities(chain: Chain, address: string, options?: GetTradeActivitiesOptions): Promise<CursorList<TradeActivity>>;
|
|
970
|
+
/**
|
|
971
|
+
* fetch token's trade activities
|
|
972
|
+
* @param chain chain id
|
|
973
|
+
* @param address token address
|
|
974
|
+
* @param options optional query options
|
|
975
|
+
* @returns token's trade activities
|
|
976
|
+
*/
|
|
977
|
+
getTokenTradeActivities(chain: Chain, address: string, options?: GetTradeActivitiesOptions): Promise<CursorList<TradeActivity>>;
|
|
978
|
+
/**
|
|
979
|
+
* get presigned upload url
|
|
980
|
+
* @returns presigned upload url
|
|
981
|
+
*/
|
|
982
|
+
getPresignedUploadUrl(): Promise<string>;
|
|
983
|
+
}
|
|
984
|
+
interface ISubscription {
|
|
985
|
+
unsubscribe(): void;
|
|
986
|
+
}
|
|
987
|
+
interface TokenSubscribed {
|
|
988
|
+
chain: Chain;
|
|
989
|
+
address: string;
|
|
990
|
+
name?: string;
|
|
991
|
+
symbol?: string;
|
|
992
|
+
decimals?: number;
|
|
993
|
+
image?: string;
|
|
994
|
+
description?: string;
|
|
995
|
+
socialMedias?: TokenSocialMedias;
|
|
996
|
+
launchedFrom?: TokenLaunchedFrom;
|
|
997
|
+
migratedTo?: TokenMigratedTo;
|
|
998
|
+
createdAt: Date;
|
|
999
|
+
}
|
|
1000
|
+
interface WalletPnlSubscribed {
|
|
1001
|
+
chain: Chain;
|
|
1002
|
+
address: string;
|
|
1003
|
+
balanceInUsd?: string;
|
|
1004
|
+
profitInUsd?: string;
|
|
1005
|
+
}
|
|
1006
|
+
interface PortfolioSubscribed {
|
|
1007
|
+
chain: Chain;
|
|
1008
|
+
address: string;
|
|
1009
|
+
amount?: string;
|
|
1010
|
+
}
|
|
1011
|
+
type PortfolioPnlSubscribed = PortfolioPnl & {
|
|
1012
|
+
chain: Chain;
|
|
1013
|
+
address: string;
|
|
1014
|
+
};
|
|
1015
|
+
/**
|
|
1016
|
+
* Subscribe client interface
|
|
1017
|
+
*/
|
|
1018
|
+
interface ISubscribeClient {
|
|
1019
|
+
/**
|
|
1020
|
+
* Subscribe token's basic info changes
|
|
1021
|
+
* @param chain chain id
|
|
1022
|
+
* @param address token address
|
|
1023
|
+
* @param callback callback function
|
|
1024
|
+
* @returns subscription
|
|
1025
|
+
*/
|
|
1026
|
+
subscribeTokenBasic(chain: Chain, address: string, callback: (tokens: Array<TokenSubscribed>) => void): ISubscription;
|
|
1027
|
+
/**
|
|
1028
|
+
* Subscribe token's market data changes
|
|
1029
|
+
* @param chain chain id
|
|
1030
|
+
* @param address token address
|
|
1031
|
+
* @param callback callback function
|
|
1032
|
+
* @returns subscription
|
|
1033
|
+
*/
|
|
1034
|
+
subscribeTokenMarketData(chain: Chain, address: string, callback: (marketDatas: Array<TokenMarketData>) => void): ISubscription;
|
|
1035
|
+
/**
|
|
1036
|
+
* Subscribe token's stats changes
|
|
1037
|
+
* @param chain chain id
|
|
1038
|
+
* @param address token address
|
|
1039
|
+
* @param callback callback function
|
|
1040
|
+
* @returns subscription
|
|
1041
|
+
*/
|
|
1042
|
+
subscribeTokenStats(chain: Chain, address: string, callback: (stats: Array<TokenStats>) => void): ISubscription;
|
|
1043
|
+
/**
|
|
1044
|
+
* Subscribe token new candles
|
|
1045
|
+
* @param chain chain id
|
|
1046
|
+
* @param address token address
|
|
1047
|
+
* @param resolution token resolution
|
|
1048
|
+
* @param callback callback function
|
|
1049
|
+
* @returns subscription
|
|
1050
|
+
*/
|
|
1051
|
+
subscribeTokenCandles(chain: Chain, address: string, resolution: TokenResolution, callback: (candles: Array<TokenCandle>) => void): ISubscription;
|
|
1052
|
+
/**
|
|
1053
|
+
* Subscribe wallet's pnl changes
|
|
1054
|
+
* @param chain chain id
|
|
1055
|
+
* @param address wallet address
|
|
1056
|
+
* @param callback callback function
|
|
1057
|
+
* @returns subscription
|
|
1058
|
+
*/
|
|
1059
|
+
subscribeWalletPnl(chain: Chain, address: string, callback: (pnls: Array<WalletPnlSubscribed>) => void): ISubscription;
|
|
1060
|
+
/**
|
|
1061
|
+
* Subscribe wallet's portfolio changes
|
|
1062
|
+
* @param chain chain id
|
|
1063
|
+
* @param address wallet address
|
|
1064
|
+
* @param callback callback function
|
|
1065
|
+
* @returns subscription
|
|
1066
|
+
*/
|
|
1067
|
+
subscribeWalletPortfolios(chain: Chain, address: string, callback: (portfolios: Array<PortfolioSubscribed>) => void): ISubscription;
|
|
1068
|
+
/**
|
|
1069
|
+
* Subscribe wallet's portfolio pnl changes
|
|
1070
|
+
* @param chain chain id
|
|
1071
|
+
* @param address wallet address
|
|
1072
|
+
* @param callback callback function
|
|
1073
|
+
* @returns subscription
|
|
1074
|
+
*/
|
|
1075
|
+
subscribeWalletPortfolioPnls(chain: Chain, address: string, callback: (portfolioPnls: Array<PortfolioPnlSubscribed>) => void): ISubscription;
|
|
1076
|
+
/**
|
|
1077
|
+
* Subscribe wallet's new trade activities
|
|
1078
|
+
* @param chain chain id
|
|
1079
|
+
* @param address wallet address
|
|
1080
|
+
* @param callback callback function
|
|
1081
|
+
* @returns subscription
|
|
1082
|
+
*/
|
|
1083
|
+
subscribeWalletTradeActivities(chain: Chain, address: string, callback: (trades: Array<TradeActivity>) => void): ISubscription;
|
|
1084
|
+
/**
|
|
1085
|
+
* Subscribe token's new trade activities
|
|
1086
|
+
* @param chain chain id
|
|
1087
|
+
* @param address token address
|
|
1088
|
+
* @param callback callback function
|
|
1089
|
+
* @returns subscription
|
|
1090
|
+
*/
|
|
1091
|
+
subscribeTokenTradeActivities(chain: Chain, address: string, callback: (trades: Array<TradeActivity>) => void): ISubscription;
|
|
1092
|
+
/**
|
|
1093
|
+
* Subscribe `New` token list changes
|
|
1094
|
+
* @param chain chain id
|
|
1095
|
+
* @param callback callback function
|
|
1096
|
+
* @returns subscription
|
|
1097
|
+
*/
|
|
1098
|
+
subscribeNewTokens(chain: Chain, callback: (tokens: Array<TokenSubscribed>) => void): ISubscription;
|
|
1099
|
+
/**
|
|
1100
|
+
* Subscribe `New` token list's basic info changes
|
|
1101
|
+
* @param chain chain id
|
|
1102
|
+
* @param callback callback function
|
|
1103
|
+
* @returns subscription
|
|
1104
|
+
*/
|
|
1105
|
+
subscribeNewTokensBasic(chain: Chain, callback: (tokens: Array<TokenSubscribed>) => void): ISubscription;
|
|
1106
|
+
/**
|
|
1107
|
+
* Subscribe `New` token list's market data changes
|
|
1108
|
+
* @param chain chain id
|
|
1109
|
+
* @param callback callback function
|
|
1110
|
+
* @returns subscription
|
|
1111
|
+
*/
|
|
1112
|
+
subscribeNewTokensMarketData(chain: Chain, callback: (marketDatas: Array<TokenMarketData>) => void): ISubscription;
|
|
1113
|
+
/**
|
|
1114
|
+
* Subscribe `New` token list's stats changes
|
|
1115
|
+
* @param chain chain id
|
|
1116
|
+
* @param callback callback function
|
|
1117
|
+
* @returns subscription
|
|
1118
|
+
*/
|
|
1119
|
+
subscribeNewTokensStats(chain: Chain, callback: (stats: Array<TokenStats>) => void): ISubscription;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* Media to track
|
|
1124
|
+
*/
|
|
1125
|
+
interface IMedia {
|
|
1126
|
+
/** media id */
|
|
1127
|
+
id: string;
|
|
1128
|
+
/** media type */
|
|
1129
|
+
type: "tweet" | (string & {});
|
|
1130
|
+
/** token type */
|
|
1131
|
+
tokenType?: string;
|
|
1132
|
+
/** token mentioned in the media */
|
|
1133
|
+
token?: MediaToken;
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* Tweet media to track
|
|
1137
|
+
*/
|
|
1138
|
+
interface TweetMedia extends IMedia {
|
|
1139
|
+
/** media type */
|
|
1140
|
+
type: "tweet";
|
|
1141
|
+
/** tweet */
|
|
1142
|
+
tweet: Tweet;
|
|
1143
|
+
/** source tweet, quote or retweet or reply */
|
|
1144
|
+
sourceTweet?: SourceTweet;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Token mentioned in the media
|
|
1148
|
+
*/
|
|
1149
|
+
interface MediaToken {
|
|
1150
|
+
/** chain */
|
|
1151
|
+
chain: Chain;
|
|
1152
|
+
/** token address */
|
|
1153
|
+
address: string;
|
|
1154
|
+
/** token symbol */
|
|
1155
|
+
symbol: string;
|
|
1156
|
+
/** token image url */
|
|
1157
|
+
image?: string;
|
|
1158
|
+
/** token latest price in usd */
|
|
1159
|
+
latestPrice?: string;
|
|
1160
|
+
/** token previous price in usd */
|
|
1161
|
+
previousPrice?: string;
|
|
1162
|
+
/** price change ratio, range is 0-100 */
|
|
1163
|
+
priceChange?: string;
|
|
1164
|
+
}
|
|
1165
|
+
interface Tweet {
|
|
1166
|
+
/** tweet id */
|
|
1167
|
+
tweetId: string;
|
|
1168
|
+
/** tweet type */
|
|
1169
|
+
type: "tweet" | "reply" | "quote" | (string & {});
|
|
1170
|
+
/** tweet author */
|
|
1171
|
+
user: TweetUser;
|
|
1172
|
+
/** tweet unix timestamp in milliseconds */
|
|
1173
|
+
timestamp: number;
|
|
1174
|
+
/** tweet content */
|
|
1175
|
+
content: TweetContent;
|
|
1176
|
+
}
|
|
1177
|
+
interface SourceTweet {
|
|
1178
|
+
/** tweet id */
|
|
1179
|
+
tweetId: string;
|
|
1180
|
+
/** tweet author */
|
|
1181
|
+
user: TweetUser;
|
|
1182
|
+
/** tweet content */
|
|
1183
|
+
content: TweetContent;
|
|
1184
|
+
}
|
|
1185
|
+
interface TweetUser {
|
|
1186
|
+
/** username */
|
|
1187
|
+
username: string;
|
|
1188
|
+
/** screen name */
|
|
1189
|
+
screenName?: string;
|
|
1190
|
+
/** avatar */
|
|
1191
|
+
avatar?: string;
|
|
1192
|
+
/** tags */
|
|
1193
|
+
tags?: Array<string>;
|
|
1194
|
+
}
|
|
1195
|
+
interface TweetContent {
|
|
1196
|
+
/** tweet text content */
|
|
1197
|
+
text?: string;
|
|
1198
|
+
/** tweet medias, e.g. image, video .etc */
|
|
1199
|
+
medias?: Array<TweetContentMedia>;
|
|
1200
|
+
}
|
|
1201
|
+
interface TweetContentMedia {
|
|
1202
|
+
type: "image" | "video" | (string & {});
|
|
1203
|
+
url: string;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* AI generated meme information
|
|
1208
|
+
*/
|
|
1209
|
+
interface GeneratedMemeInfo {
|
|
1210
|
+
/** token symbol */
|
|
1211
|
+
symbol: string;
|
|
1212
|
+
/** token name */
|
|
1213
|
+
name?: string;
|
|
1214
|
+
/** token image url */
|
|
1215
|
+
image?: string;
|
|
1216
|
+
}
|
|
1217
|
+
interface SubscribeTweetMediasOptions {
|
|
1218
|
+
/**
|
|
1219
|
+
* Callback function to handle new tweet medias
|
|
1220
|
+
* @param tweetMedia new tweet media
|
|
1221
|
+
* @returns
|
|
1222
|
+
*/
|
|
1223
|
+
callback: (tweetMedia: TweetMedia) => void;
|
|
1224
|
+
}
|
|
1225
|
+
/**
|
|
1226
|
+
* Interfaces for media track client
|
|
1227
|
+
*/
|
|
1228
|
+
interface IMediaTrackClient {
|
|
1229
|
+
/**
|
|
1230
|
+
* Translate media content text
|
|
1231
|
+
* @param media media to translate
|
|
1232
|
+
* @param targetLanguage target language
|
|
1233
|
+
* @param options translate options
|
|
1234
|
+
* @param options.sourceLanguage source language
|
|
1235
|
+
* @param options.sourceTweet if true, the source tweet will be translated
|
|
1236
|
+
* @returns translated text
|
|
1237
|
+
*/
|
|
1238
|
+
translate(media: IMedia, targetLanguage: string, options?: {
|
|
1239
|
+
sourceLanguage?: string;
|
|
1240
|
+
sourceTweet?: boolean;
|
|
1241
|
+
}): Promise<string>;
|
|
1242
|
+
/**
|
|
1243
|
+
* AI Generated Meme Launch Info
|
|
1244
|
+
* @param media media to generate meme
|
|
1245
|
+
*/
|
|
1246
|
+
generateMeme(media: IMedia): Promise<GeneratedMemeInfo>;
|
|
1247
|
+
/**
|
|
1248
|
+
* Subscribe to new tweet medias
|
|
1249
|
+
* @param options subscribe tweet medias options
|
|
1250
|
+
* @returns subscription
|
|
1251
|
+
*/
|
|
1252
|
+
subscribeTweetMedia(options: SubscribeTweetMediasOptions): ISubscription;
|
|
1253
|
+
/**
|
|
1254
|
+
* Subscribe to tweet media tokens changes
|
|
1255
|
+
* @param options subscribe tweet media tokens options
|
|
1256
|
+
* @returns subscription
|
|
1257
|
+
*/
|
|
1258
|
+
subscribeTweetMediaToken(options: SubscribeTweetMediasOptions): ISubscription;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
interface Channel {
|
|
1262
|
+
/** channel id */
|
|
1263
|
+
id: string;
|
|
1264
|
+
/** owner user id */
|
|
1265
|
+
owner_id: string;
|
|
1266
|
+
/** channel name */
|
|
1267
|
+
name: string;
|
|
1268
|
+
/** channel description */
|
|
1269
|
+
description?: string;
|
|
1270
|
+
/** channel icon */
|
|
1271
|
+
icon?: string;
|
|
1272
|
+
/** channel chain */
|
|
1273
|
+
chain: Chain;
|
|
1274
|
+
/** channel privacy */
|
|
1275
|
+
privacy: "public" | "private";
|
|
1276
|
+
/** whether the current user is subscribed to the channel */
|
|
1277
|
+
is_subscribed: boolean;
|
|
1278
|
+
/** number of subscribers */
|
|
1279
|
+
subscribers_count: number;
|
|
1280
|
+
/** channel sources */
|
|
1281
|
+
sources?: Array<ChannelSource>;
|
|
1282
|
+
/** channel sinks */
|
|
1283
|
+
sinks?: Array<ChannelSink>;
|
|
1284
|
+
/** channel created at */
|
|
1285
|
+
created_at: Date;
|
|
1286
|
+
/** channel updated at */
|
|
1287
|
+
updated_at: Date;
|
|
1288
|
+
}
|
|
1289
|
+
interface ChannelSource {
|
|
1290
|
+
/** source id */
|
|
1291
|
+
id: string;
|
|
1292
|
+
/** source type */
|
|
1293
|
+
type: string;
|
|
1294
|
+
/** source alias */
|
|
1295
|
+
alias?: string;
|
|
1296
|
+
/** source url */
|
|
1297
|
+
url?: string;
|
|
1298
|
+
/** source value */
|
|
1299
|
+
value?: string;
|
|
1300
|
+
/** source config */
|
|
1301
|
+
config?: Record<string, any>;
|
|
1302
|
+
/** source created at */
|
|
1303
|
+
created_at: Date;
|
|
1304
|
+
/** source updated at */
|
|
1305
|
+
updated_at: Date;
|
|
1306
|
+
}
|
|
1307
|
+
interface ChannelSink {
|
|
1308
|
+
/** sink id */
|
|
1309
|
+
id: string;
|
|
1310
|
+
/** sink type */
|
|
1311
|
+
type: string;
|
|
1312
|
+
/** sink url */
|
|
1313
|
+
url?: string;
|
|
1314
|
+
/** sink config */
|
|
1315
|
+
config?: Record<string, any>;
|
|
1316
|
+
/** sink created at */
|
|
1317
|
+
created_at: Date;
|
|
1318
|
+
/** sink updated at */
|
|
1319
|
+
updated_at: Date;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
interface CreateChannelOptions {
|
|
1323
|
+
/** channel name */
|
|
1324
|
+
name: string;
|
|
1325
|
+
/** channel description */
|
|
1326
|
+
description?: string;
|
|
1327
|
+
/** channel icon */
|
|
1328
|
+
icon?: string;
|
|
1329
|
+
/** channel chain */
|
|
1330
|
+
chain: Chain;
|
|
1331
|
+
/** channel privacy */
|
|
1332
|
+
privacy: "public" | "private";
|
|
1333
|
+
}
|
|
1334
|
+
interface UpdateChannelOptions {
|
|
1335
|
+
/** channel id */
|
|
1336
|
+
id: string;
|
|
1337
|
+
/** channel name */
|
|
1338
|
+
name?: string;
|
|
1339
|
+
/** channel description */
|
|
1340
|
+
description?: string;
|
|
1341
|
+
/** channel icon */
|
|
1342
|
+
icon?: string;
|
|
1343
|
+
/** channel chain */
|
|
1344
|
+
chain?: Chain;
|
|
1345
|
+
/** channel privacy */
|
|
1346
|
+
privacy?: "public" | "private";
|
|
1347
|
+
}
|
|
1348
|
+
interface IChannelsClient {
|
|
1349
|
+
/**
|
|
1350
|
+
* Get a channel by id
|
|
1351
|
+
* @param id channel id
|
|
1352
|
+
*/
|
|
1353
|
+
get(id: string): Promise<Channel>;
|
|
1354
|
+
/**
|
|
1355
|
+
* Create a new channel
|
|
1356
|
+
* @param options create channel options
|
|
1357
|
+
*/
|
|
1358
|
+
create(options: CreateChannelOptions): Promise<Channel>;
|
|
1359
|
+
/**
|
|
1360
|
+
* Update a channel
|
|
1361
|
+
* @param options update channel options
|
|
1362
|
+
*/
|
|
1363
|
+
update(options: UpdateChannelOptions): Promise<Channel>;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
type index_CreateChannelOptions = CreateChannelOptions;
|
|
1367
|
+
type index_CursorList<T> = CursorList<T>;
|
|
1368
|
+
type index_CursorListOptions = CursorListOptions;
|
|
1369
|
+
type index_GeneratedMemeInfo = GeneratedMemeInfo;
|
|
1370
|
+
type index_GetTokenCandlesOptions = GetTokenCandlesOptions;
|
|
1371
|
+
type index_GetTokenListOptions = GetTokenListOptions;
|
|
1372
|
+
type index_GetTradeActivitiesOptions = GetTradeActivitiesOptions;
|
|
1373
|
+
type index_IChannelsClient = IChannelsClient;
|
|
1374
|
+
type index_IClient = IClient;
|
|
1375
|
+
type index_IMediaTrackClient = IMediaTrackClient;
|
|
1376
|
+
type index_ISubscribeClient = ISubscribeClient;
|
|
1377
|
+
type index_ISubscription = ISubscription;
|
|
1378
|
+
type index_PortfolioPnlSubscribed = PortfolioPnlSubscribed;
|
|
1379
|
+
type index_PortfolioSubscribed = PortfolioSubscribed;
|
|
1380
|
+
type index_SearchTokenCursorList = SearchTokenCursorList;
|
|
1381
|
+
type index_SearchTokensOptions = SearchTokensOptions;
|
|
1382
|
+
type index_SendTxParams = SendTxParams;
|
|
1383
|
+
type index_SendTxResult = SendTxResult;
|
|
1384
|
+
type index_SubscribeTweetMediasOptions = SubscribeTweetMediasOptions;
|
|
1385
|
+
type index_SwapMode = SwapMode;
|
|
1386
|
+
declare const index_SwapMode: typeof SwapMode;
|
|
1387
|
+
type index_SwapParams = SwapParams;
|
|
1388
|
+
type index_SwapRoute = SwapRoute;
|
|
1389
|
+
type index_SwapRoutePlan = SwapRoutePlan;
|
|
1390
|
+
type index_TokenFieldOption = TokenFieldOption;
|
|
1391
|
+
type index_TokenFilterOption = TokenFilterOption;
|
|
1392
|
+
type index_TokenSubscribed = TokenSubscribed;
|
|
1393
|
+
type index_UpdateChannelOptions = UpdateChannelOptions;
|
|
1394
|
+
type index_WalletPnlSubscribed = WalletPnlSubscribed;
|
|
1395
|
+
declare namespace index {
|
|
1396
|
+
export { type index_CreateChannelOptions as CreateChannelOptions, type index_CursorList as CursorList, type index_CursorListOptions as CursorListOptions, type index_GeneratedMemeInfo as GeneratedMemeInfo, type index_GetTokenCandlesOptions as GetTokenCandlesOptions, type index_GetTokenListOptions as GetTokenListOptions, type index_GetTradeActivitiesOptions as GetTradeActivitiesOptions, type index_IChannelsClient as IChannelsClient, type index_IClient as IClient, type index_IMediaTrackClient as IMediaTrackClient, type index_ISubscribeClient as ISubscribeClient, type index_ISubscription as ISubscription, type index_PortfolioPnlSubscribed as PortfolioPnlSubscribed, type index_PortfolioSubscribed as PortfolioSubscribed, type index_SearchTokenCursorList as SearchTokenCursorList, type index_SearchTokensOptions as SearchTokensOptions, type index_SendTxParams as SendTxParams, type index_SendTxResult as SendTxResult, type index_SubscribeTweetMediasOptions as SubscribeTweetMediasOptions, index_SwapMode as SwapMode, type index_SwapParams as SwapParams, type index_SwapRoute as SwapRoute, type index_SwapRoutePlan as SwapRoutePlan, type index_TokenFieldOption as TokenFieldOption, type index_TokenFilterOption as TokenFilterOption, type index_TokenSubscribed as TokenSubscribed, type index_UpdateChannelOptions as UpdateChannelOptions, type index_WalletPnlSubscribed as WalletPnlSubscribed };
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
declare global {
|
|
1400
|
+
interface Window {
|
|
1401
|
+
__LIBERFI_VERSION__?: {
|
|
1402
|
+
[key: string]: string;
|
|
1403
|
+
};
|
|
1130
1404
|
}
|
|
1131
1405
|
}
|
|
1406
|
+
declare const _default: "0.1.7";
|
|
1132
1407
|
|
|
1133
1408
|
type NetworkId = "testnet" | "mainnet";
|
|
1134
1409
|
|
|
1410
|
+
declare class ApiError extends Error {
|
|
1411
|
+
readonly code: number;
|
|
1412
|
+
constructor(message: string, code: number);
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1135
1415
|
declare enum SolanaTokenProtocol {
|
|
1136
1416
|
BAGS = "bags",
|
|
1137
1417
|
BELIEVE = "believe",
|
|
@@ -1153,4 +1433,4 @@ declare enum SolanaTokenProtocol {
|
|
|
1153
1433
|
type TokenProtocol = keyof typeof SolanaTokenProtocol | (string & {});
|
|
1154
1434
|
declare const SOLANA_TOKEN_PROTOCOLS: SolanaTokenProtocol[];
|
|
1155
1435
|
|
|
1156
|
-
export { API, Chain, ChainNamespace, type NetworkId, type Portfolio, type PortfolioPnl, SOLANA_TOKEN_PROTOCOLS, SolanaTokenProtocol, type Token, type TokenCandle, type TokenCreator, type TokenHistoryPriceObject, type TokenHolder, type TokenLaunchedFrom, type TokenLiquidity, type TokenMarketData, type TokenMigratedTo, type TokenProtocol, type TokenResolution, type TokenSecurity, type TokenSocialMedias, type TokenStats, type
|
|
1436
|
+
export { index as API, ApiError, Chain, ChainNamespace, type Channel, type ChannelSink, type ChannelSource, type CreateChannelOptions, type CursorList, type CursorListOptions, type GeneratedMemeInfo, type GetTokenCandlesOptions, type GetTokenListOptions, type GetTradeActivitiesOptions, type IChannelsClient, type IClient, type IMedia, type IMediaTrackClient, type ISubscribeClient, type ISubscription, type MediaToken, type NetworkId, type Portfolio, type PortfolioPnl, type PortfolioPnlSubscribed, type PortfolioSubscribed, SOLANA_TOKEN_PROTOCOLS, type SearchTokenCursorList, type SearchTokensOptions, type SendTxParams, type SendTxResult, SolanaTokenProtocol, type SourceTweet, type SubscribeTweetMediasOptions, SwapMode, type SwapParams, type SwapRoute, type SwapRoutePlan, type Token, type TokenCandle, type TokenCreator, type TokenFieldOption, type TokenFilterOption, type TokenHistoryPriceObject, type TokenHolder, type TokenLaunchedFrom, type TokenLiquidity, type TokenMarketData, type TokenMigratedTo, type TokenProtocol, type TokenResolution, type TokenSecurity, type TokenSocialMedias, type TokenStats, type TokenStatsByResolution, type TokenSubscribed, type TradeActivity, type TradeDex, type TradeToken, type Tweet, type TweetContent, type TweetContentMedia, type TweetMedia, type TweetUser, type UpdateChannelOptions, type WalletPnlSubscribed, type WalletPortfolios, _default as version };
|