flipmeme-sdk 1.0.3 → 1.0.5
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 +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +499 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +489 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -2
package/dist/index.d.mts
CHANGED
|
@@ -27,8 +27,41 @@ interface CollectionParams {
|
|
|
27
27
|
collectionId: string;
|
|
28
28
|
collectionAddress: string;
|
|
29
29
|
}
|
|
30
|
+
interface NFTTradingData {
|
|
31
|
+
name: string;
|
|
32
|
+
tokenId: number;
|
|
33
|
+
tokenURI: string;
|
|
34
|
+
symbol?: string;
|
|
35
|
+
}
|
|
36
|
+
interface ReserveToken {
|
|
37
|
+
tokenAddress: string;
|
|
38
|
+
buy: NFTTradingData[] | null;
|
|
39
|
+
mintAndBuy: NFTTradingData[] | null;
|
|
40
|
+
}
|
|
41
|
+
interface BuyParams {
|
|
42
|
+
collectionId: string;
|
|
43
|
+
collectionSymbol: string;
|
|
44
|
+
creatorAddress: string;
|
|
45
|
+
quantity: number;
|
|
46
|
+
reserveToken: ReserveToken | null;
|
|
47
|
+
notify: any | undefined;
|
|
48
|
+
}
|
|
49
|
+
interface SellParams {
|
|
50
|
+
collectionId: string;
|
|
51
|
+
quantity: number;
|
|
52
|
+
ownedTokens: NFTTradingData[];
|
|
53
|
+
notify: any | undefined;
|
|
54
|
+
}
|
|
55
|
+
interface ProfileSellParams {
|
|
56
|
+
data: Record<string, NFTTradingData[]>;
|
|
57
|
+
notify: any | undefined;
|
|
58
|
+
}
|
|
30
59
|
declare function isEthereumConfig(config: EthereumConfig | SolanaConfig): config is EthereumConfig;
|
|
31
60
|
declare function isSolanaConfig(config: EthereumConfig | SolanaConfig): config is SolanaConfig;
|
|
61
|
+
interface BuyCreditParams {
|
|
62
|
+
adminPubKey: PublicKey;
|
|
63
|
+
amount: number;
|
|
64
|
+
}
|
|
32
65
|
|
|
33
66
|
declare class FlipmemeSDK {
|
|
34
67
|
private blockchainType;
|
|
@@ -37,6 +70,11 @@ declare class FlipmemeSDK {
|
|
|
37
70
|
constructor(chainType: BlockchainType, config: EthereumConfig | SolanaConfig);
|
|
38
71
|
updateConfig(chainType: BlockchainType, config: EthereumConfig | SolanaConfig): void;
|
|
39
72
|
createCollection(params: CollectionParams): Promise<string | void>;
|
|
73
|
+
getCollectionPda(): Promise<CollectionInfo>;
|
|
74
|
+
buy(params: BuyParams): Promise<void>;
|
|
75
|
+
flipSell(params: SellParams): Promise<void>;
|
|
76
|
+
profileSell(data: ProfileSellParams): Promise<void>;
|
|
77
|
+
buyCredit(params: BuyCreditParams): Promise<string>;
|
|
40
78
|
}
|
|
41
79
|
|
|
42
|
-
export { BlockchainType, type CollectionInfo, type CollectionParams, type EthereumConfig, FlipmemeSDK, type SolanaConfig, isEthereumConfig, isSolanaConfig };
|
|
80
|
+
export { BlockchainType, type BuyCreditParams, type BuyParams, type CollectionInfo, type CollectionParams, type EthereumConfig, FlipmemeSDK, type NFTTradingData, type ProfileSellParams, type ReserveToken, type SellParams, type SolanaConfig, isEthereumConfig, isSolanaConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -27,8 +27,41 @@ interface CollectionParams {
|
|
|
27
27
|
collectionId: string;
|
|
28
28
|
collectionAddress: string;
|
|
29
29
|
}
|
|
30
|
+
interface NFTTradingData {
|
|
31
|
+
name: string;
|
|
32
|
+
tokenId: number;
|
|
33
|
+
tokenURI: string;
|
|
34
|
+
symbol?: string;
|
|
35
|
+
}
|
|
36
|
+
interface ReserveToken {
|
|
37
|
+
tokenAddress: string;
|
|
38
|
+
buy: NFTTradingData[] | null;
|
|
39
|
+
mintAndBuy: NFTTradingData[] | null;
|
|
40
|
+
}
|
|
41
|
+
interface BuyParams {
|
|
42
|
+
collectionId: string;
|
|
43
|
+
collectionSymbol: string;
|
|
44
|
+
creatorAddress: string;
|
|
45
|
+
quantity: number;
|
|
46
|
+
reserveToken: ReserveToken | null;
|
|
47
|
+
notify: any | undefined;
|
|
48
|
+
}
|
|
49
|
+
interface SellParams {
|
|
50
|
+
collectionId: string;
|
|
51
|
+
quantity: number;
|
|
52
|
+
ownedTokens: NFTTradingData[];
|
|
53
|
+
notify: any | undefined;
|
|
54
|
+
}
|
|
55
|
+
interface ProfileSellParams {
|
|
56
|
+
data: Record<string, NFTTradingData[]>;
|
|
57
|
+
notify: any | undefined;
|
|
58
|
+
}
|
|
30
59
|
declare function isEthereumConfig(config: EthereumConfig | SolanaConfig): config is EthereumConfig;
|
|
31
60
|
declare function isSolanaConfig(config: EthereumConfig | SolanaConfig): config is SolanaConfig;
|
|
61
|
+
interface BuyCreditParams {
|
|
62
|
+
adminPubKey: PublicKey;
|
|
63
|
+
amount: number;
|
|
64
|
+
}
|
|
32
65
|
|
|
33
66
|
declare class FlipmemeSDK {
|
|
34
67
|
private blockchainType;
|
|
@@ -37,6 +70,11 @@ declare class FlipmemeSDK {
|
|
|
37
70
|
constructor(chainType: BlockchainType, config: EthereumConfig | SolanaConfig);
|
|
38
71
|
updateConfig(chainType: BlockchainType, config: EthereumConfig | SolanaConfig): void;
|
|
39
72
|
createCollection(params: CollectionParams): Promise<string | void>;
|
|
73
|
+
getCollectionPda(): Promise<CollectionInfo>;
|
|
74
|
+
buy(params: BuyParams): Promise<void>;
|
|
75
|
+
flipSell(params: SellParams): Promise<void>;
|
|
76
|
+
profileSell(data: ProfileSellParams): Promise<void>;
|
|
77
|
+
buyCredit(params: BuyCreditParams): Promise<string>;
|
|
40
78
|
}
|
|
41
79
|
|
|
42
|
-
export { BlockchainType, type CollectionInfo, type CollectionParams, type EthereumConfig, FlipmemeSDK, type SolanaConfig, isEthereumConfig, isSolanaConfig };
|
|
80
|
+
export { BlockchainType, type BuyCreditParams, type BuyParams, type CollectionInfo, type CollectionParams, type EthereumConfig, FlipmemeSDK, type NFTTradingData, type ProfileSellParams, type ReserveToken, type SellParams, type SolanaConfig, isEthereumConfig, isSolanaConfig };
|