flipmeme-sdk 1.2.0 → 1.2.2
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 +41 -20
- package/dist/index.d.ts +41 -20
- package/dist/index.js +203 -154
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +176 -133
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -32,34 +32,25 @@ interface CreateCollectionResponse {
|
|
|
32
32
|
collectionAddress: string;
|
|
33
33
|
}
|
|
34
34
|
interface NFTTradingData {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
tokenURI: string;
|
|
38
|
-
symbol?: string;
|
|
39
|
-
}
|
|
40
|
-
interface NFTMintData {
|
|
41
|
-
name: string;
|
|
42
|
-
tokenBaseUri: string;
|
|
43
|
-
symbol?: string;
|
|
35
|
+
tokenIds: number[];
|
|
36
|
+
merkleTree: string;
|
|
44
37
|
}
|
|
45
38
|
interface ReserveToken {
|
|
46
|
-
buy:
|
|
47
|
-
mintAndBuy:
|
|
39
|
+
buy: number[] | null;
|
|
40
|
+
mintAndBuy: string[] | null;
|
|
48
41
|
}
|
|
49
42
|
interface BuyParams {
|
|
50
|
-
merkleTree:
|
|
43
|
+
merkleTree: string;
|
|
51
44
|
collectionId: string;
|
|
52
45
|
collectionSymbol: string;
|
|
53
46
|
creatorAddress: string;
|
|
54
47
|
quantity: number;
|
|
55
48
|
baseUri: string;
|
|
56
49
|
reserveToken: ReserveToken | null;
|
|
57
|
-
notify: any | undefined;
|
|
58
50
|
}
|
|
59
51
|
interface BuyResponse {
|
|
60
52
|
buyer: string;
|
|
61
53
|
collectionAddress: string;
|
|
62
|
-
nftAddress: string;
|
|
63
54
|
tokenId: string;
|
|
64
55
|
tokenName?: string;
|
|
65
56
|
tokenUri?: string;
|
|
@@ -88,12 +79,11 @@ interface SellResponse {
|
|
|
88
79
|
interface SellParams {
|
|
89
80
|
collectionId: string;
|
|
90
81
|
quantity: number;
|
|
91
|
-
|
|
92
|
-
|
|
82
|
+
merkleTree: string;
|
|
83
|
+
ownedTokens: number[];
|
|
93
84
|
}
|
|
94
85
|
interface ProfileSellParams {
|
|
95
|
-
data: Record<string, NFTTradingData
|
|
96
|
-
notify: any | undefined;
|
|
86
|
+
data: Record<string, NFTTradingData>;
|
|
97
87
|
}
|
|
98
88
|
declare function isEthereumConfig(config: EthereumConfig | SolanaConfig): config is EthereumConfig;
|
|
99
89
|
declare function isSolanaConfig(config: EthereumConfig | SolanaConfig): config is SolanaConfig;
|
|
@@ -105,6 +95,37 @@ declare enum PurcahseTye {
|
|
|
105
95
|
BUY = "buy",
|
|
106
96
|
SELL = "sell"
|
|
107
97
|
}
|
|
98
|
+
interface Compression {
|
|
99
|
+
eligible: boolean;
|
|
100
|
+
compressed: boolean;
|
|
101
|
+
data_hash: string;
|
|
102
|
+
creator_hash: string;
|
|
103
|
+
asset_hash: string;
|
|
104
|
+
tree: string;
|
|
105
|
+
seq: number;
|
|
106
|
+
leaf_id: number;
|
|
107
|
+
}
|
|
108
|
+
interface Ownership {
|
|
109
|
+
frozen: boolean;
|
|
110
|
+
delegated: boolean;
|
|
111
|
+
delegate: null;
|
|
112
|
+
ownership_model: string;
|
|
113
|
+
owner: string;
|
|
114
|
+
}
|
|
115
|
+
interface MerkleProof {
|
|
116
|
+
root: string;
|
|
117
|
+
proof: string[];
|
|
118
|
+
leaf: string;
|
|
119
|
+
tree_id: string;
|
|
120
|
+
}
|
|
121
|
+
interface AssetData {
|
|
122
|
+
compression: Compression;
|
|
123
|
+
ownership: Ownership;
|
|
124
|
+
}
|
|
125
|
+
interface AssetInfo {
|
|
126
|
+
assetData: AssetData;
|
|
127
|
+
assetProof: MerkleProof;
|
|
128
|
+
}
|
|
108
129
|
|
|
109
130
|
declare class FlipmemeSDK {
|
|
110
131
|
private blockchainType;
|
|
@@ -166,9 +187,9 @@ declare class Utility {
|
|
|
166
187
|
/**
|
|
167
188
|
* this function is used to create merkle tree on backend side for bubblegum cNFT for metaplex
|
|
168
189
|
* backend pays the merkle tree create fee
|
|
190
|
+
* this function works on mpl_bubblegum version 4.3.1 but I downgrade the mpl_bubblegum for getLeafAsset function
|
|
169
191
|
*/
|
|
170
|
-
static createMerkleTree(env: ENV, payerPrivateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
171
192
|
static createMerkleTreeFromContract(env: ENV, privateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
172
193
|
}
|
|
173
194
|
|
|
174
|
-
export { BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type CreateCollectionResponse, type EthereumConfig, FlipmemeSDK, type
|
|
195
|
+
export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type Compression, type CreateCollectionResponse, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NFTTradingData, type Ownership, type ProfileSellParams, PurcahseTye, type ReserveToken, type SellParams, type SellResponse, type SolanaConfig, Utility, isEthereumConfig, isSolanaConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -32,34 +32,25 @@ interface CreateCollectionResponse {
|
|
|
32
32
|
collectionAddress: string;
|
|
33
33
|
}
|
|
34
34
|
interface NFTTradingData {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
tokenURI: string;
|
|
38
|
-
symbol?: string;
|
|
39
|
-
}
|
|
40
|
-
interface NFTMintData {
|
|
41
|
-
name: string;
|
|
42
|
-
tokenBaseUri: string;
|
|
43
|
-
symbol?: string;
|
|
35
|
+
tokenIds: number[];
|
|
36
|
+
merkleTree: string;
|
|
44
37
|
}
|
|
45
38
|
interface ReserveToken {
|
|
46
|
-
buy:
|
|
47
|
-
mintAndBuy:
|
|
39
|
+
buy: number[] | null;
|
|
40
|
+
mintAndBuy: string[] | null;
|
|
48
41
|
}
|
|
49
42
|
interface BuyParams {
|
|
50
|
-
merkleTree:
|
|
43
|
+
merkleTree: string;
|
|
51
44
|
collectionId: string;
|
|
52
45
|
collectionSymbol: string;
|
|
53
46
|
creatorAddress: string;
|
|
54
47
|
quantity: number;
|
|
55
48
|
baseUri: string;
|
|
56
49
|
reserveToken: ReserveToken | null;
|
|
57
|
-
notify: any | undefined;
|
|
58
50
|
}
|
|
59
51
|
interface BuyResponse {
|
|
60
52
|
buyer: string;
|
|
61
53
|
collectionAddress: string;
|
|
62
|
-
nftAddress: string;
|
|
63
54
|
tokenId: string;
|
|
64
55
|
tokenName?: string;
|
|
65
56
|
tokenUri?: string;
|
|
@@ -88,12 +79,11 @@ interface SellResponse {
|
|
|
88
79
|
interface SellParams {
|
|
89
80
|
collectionId: string;
|
|
90
81
|
quantity: number;
|
|
91
|
-
|
|
92
|
-
|
|
82
|
+
merkleTree: string;
|
|
83
|
+
ownedTokens: number[];
|
|
93
84
|
}
|
|
94
85
|
interface ProfileSellParams {
|
|
95
|
-
data: Record<string, NFTTradingData
|
|
96
|
-
notify: any | undefined;
|
|
86
|
+
data: Record<string, NFTTradingData>;
|
|
97
87
|
}
|
|
98
88
|
declare function isEthereumConfig(config: EthereumConfig | SolanaConfig): config is EthereumConfig;
|
|
99
89
|
declare function isSolanaConfig(config: EthereumConfig | SolanaConfig): config is SolanaConfig;
|
|
@@ -105,6 +95,37 @@ declare enum PurcahseTye {
|
|
|
105
95
|
BUY = "buy",
|
|
106
96
|
SELL = "sell"
|
|
107
97
|
}
|
|
98
|
+
interface Compression {
|
|
99
|
+
eligible: boolean;
|
|
100
|
+
compressed: boolean;
|
|
101
|
+
data_hash: string;
|
|
102
|
+
creator_hash: string;
|
|
103
|
+
asset_hash: string;
|
|
104
|
+
tree: string;
|
|
105
|
+
seq: number;
|
|
106
|
+
leaf_id: number;
|
|
107
|
+
}
|
|
108
|
+
interface Ownership {
|
|
109
|
+
frozen: boolean;
|
|
110
|
+
delegated: boolean;
|
|
111
|
+
delegate: null;
|
|
112
|
+
ownership_model: string;
|
|
113
|
+
owner: string;
|
|
114
|
+
}
|
|
115
|
+
interface MerkleProof {
|
|
116
|
+
root: string;
|
|
117
|
+
proof: string[];
|
|
118
|
+
leaf: string;
|
|
119
|
+
tree_id: string;
|
|
120
|
+
}
|
|
121
|
+
interface AssetData {
|
|
122
|
+
compression: Compression;
|
|
123
|
+
ownership: Ownership;
|
|
124
|
+
}
|
|
125
|
+
interface AssetInfo {
|
|
126
|
+
assetData: AssetData;
|
|
127
|
+
assetProof: MerkleProof;
|
|
128
|
+
}
|
|
108
129
|
|
|
109
130
|
declare class FlipmemeSDK {
|
|
110
131
|
private blockchainType;
|
|
@@ -166,9 +187,9 @@ declare class Utility {
|
|
|
166
187
|
/**
|
|
167
188
|
* this function is used to create merkle tree on backend side for bubblegum cNFT for metaplex
|
|
168
189
|
* backend pays the merkle tree create fee
|
|
190
|
+
* this function works on mpl_bubblegum version 4.3.1 but I downgrade the mpl_bubblegum for getLeafAsset function
|
|
169
191
|
*/
|
|
170
|
-
static createMerkleTree(env: ENV, payerPrivateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
171
192
|
static createMerkleTreeFromContract(env: ENV, privateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
172
193
|
}
|
|
173
194
|
|
|
174
|
-
export { BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type CreateCollectionResponse, type EthereumConfig, FlipmemeSDK, type
|
|
195
|
+
export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type Compression, type CreateCollectionResponse, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NFTTradingData, type Ownership, type ProfileSellParams, PurcahseTye, type ReserveToken, type SellParams, type SellResponse, type SolanaConfig, Utility, isEthereumConfig, isSolanaConfig };
|