flipmeme-sdk 1.2.2 → 1.2.4
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 +128 -5
- package/dist/index.d.ts +128 -5
- package/dist/index.js +126 -126
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +123 -126
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -66,7 +66,6 @@ interface BuyResponse {
|
|
|
66
66
|
interface SellResponse {
|
|
67
67
|
seller: string;
|
|
68
68
|
collectionAddress: string;
|
|
69
|
-
nftAddress: string;
|
|
70
69
|
tokenId: string;
|
|
71
70
|
price: string;
|
|
72
71
|
nextPrice: string;
|
|
@@ -91,7 +90,7 @@ interface BuyCreditParams {
|
|
|
91
90
|
adminPubKey: PublicKey;
|
|
92
91
|
amount: number;
|
|
93
92
|
}
|
|
94
|
-
declare enum
|
|
93
|
+
declare enum PurcahseType {
|
|
95
94
|
BUY = "buy",
|
|
96
95
|
SELL = "sell"
|
|
97
96
|
}
|
|
@@ -138,7 +137,7 @@ declare class FlipmemeSDK {
|
|
|
138
137
|
flipSell(params: SellParams): Promise<SellResponse[]>;
|
|
139
138
|
profileSell(data: ProfileSellParams): Promise<SellResponse[]>;
|
|
140
139
|
buyCredit(params: BuyCreditParams): Promise<string>;
|
|
141
|
-
getTotalPrice(type:
|
|
140
|
+
getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
|
|
142
141
|
createMerkle(collectionId: string, maxBufferSize: number, maxDepth: number): Promise<PublicKey>;
|
|
143
142
|
/**For testing */
|
|
144
143
|
getStateInfo(): Promise<{
|
|
@@ -174,14 +173,138 @@ declare class FlipmemeSDK {
|
|
|
174
173
|
};
|
|
175
174
|
collectionAddress: PublicKey;
|
|
176
175
|
}>;
|
|
177
|
-
getTransactionTest(signature: string): Promise<BuyResponse[]>;
|
|
176
|
+
getTransactionTest(signature: string, transactionType?: string): Promise<BuyResponse[] | SellResponse[]>;
|
|
178
177
|
getInstructionData(instruction: string): Promise<void>;
|
|
179
178
|
}
|
|
180
179
|
|
|
180
|
+
declare const SOLANA: {
|
|
181
|
+
STATE_ID_STR: string;
|
|
182
|
+
TREASURY_ID_STR: string;
|
|
183
|
+
LP_PROVISIONER_ID_STR: string;
|
|
184
|
+
TOKEN_METADATA_PROGRAM_ID_STR: string;
|
|
185
|
+
MPL_CORE_STR: string;
|
|
186
|
+
ADMIN_FOR_CREDIT_BUY_STR: string;
|
|
187
|
+
MPL_BUBBLEGUM_STR: string;
|
|
188
|
+
SPL_ACCOUNT_COMPRESSION_STR: string;
|
|
189
|
+
SPL_NOOP_STR: string;
|
|
190
|
+
SPL_TOKEN_STR: string;
|
|
191
|
+
SPL_ATA_TOKEN_STR: string;
|
|
192
|
+
RENT_TOKEN_STR: string;
|
|
193
|
+
};
|
|
181
194
|
declare enum ENV {
|
|
182
195
|
Devnet = "Devnet",
|
|
183
196
|
Mainnet = "Mainnet"
|
|
184
197
|
}
|
|
198
|
+
declare const RPC: {
|
|
199
|
+
Devnet: string;
|
|
200
|
+
Mainnet: string;
|
|
201
|
+
};
|
|
202
|
+
declare const SOLANA_PUBKEYS: {
|
|
203
|
+
STATE_ID: PublicKey;
|
|
204
|
+
TREASURY_ID: PublicKey;
|
|
205
|
+
LP_PROVISIONER_ID: PublicKey;
|
|
206
|
+
TOKEN_METADATA_PROGRAM_ID: PublicKey;
|
|
207
|
+
ADMIN_FOR_CREDIT_BUY: PublicKey;
|
|
208
|
+
MPL_BUBBLEGUM_ID: PublicKey;
|
|
209
|
+
SPL_ACCOUNT_COMPRESSION_ID: PublicKey;
|
|
210
|
+
SPL_NOOP_ID: PublicKey;
|
|
211
|
+
SPL_TOKEN_ID: PublicKey;
|
|
212
|
+
SPL_ATA_TOKEN_ID: PublicKey;
|
|
213
|
+
RENT_TOKEN_ID: PublicKey;
|
|
214
|
+
};
|
|
215
|
+
declare const SDK_SOLANA_CONFIG: {
|
|
216
|
+
CHUNK_SIZE: number;
|
|
217
|
+
};
|
|
218
|
+
declare const VALID_SIZE_PAIR: {
|
|
219
|
+
3: {
|
|
220
|
+
maxBufferSize: number;
|
|
221
|
+
maxDepth: number;
|
|
222
|
+
};
|
|
223
|
+
4: {
|
|
224
|
+
maxBufferSize: number;
|
|
225
|
+
maxDepth: number;
|
|
226
|
+
};
|
|
227
|
+
5: {
|
|
228
|
+
maxBufferSize: number;
|
|
229
|
+
maxDepth: number;
|
|
230
|
+
};
|
|
231
|
+
6: {
|
|
232
|
+
maxBufferSize: number;
|
|
233
|
+
maxDepth: number;
|
|
234
|
+
};
|
|
235
|
+
7: {
|
|
236
|
+
maxBufferSize: number;
|
|
237
|
+
maxDepth: number;
|
|
238
|
+
};
|
|
239
|
+
8: {
|
|
240
|
+
maxBufferSize: number;
|
|
241
|
+
maxDepth: number;
|
|
242
|
+
};
|
|
243
|
+
9: {
|
|
244
|
+
maxBufferSize: number;
|
|
245
|
+
maxDepth: number;
|
|
246
|
+
};
|
|
247
|
+
10: {
|
|
248
|
+
maxBufferSize: number;
|
|
249
|
+
maxDepth: number;
|
|
250
|
+
};
|
|
251
|
+
11: {
|
|
252
|
+
maxBufferSize: number;
|
|
253
|
+
maxDepth: number;
|
|
254
|
+
};
|
|
255
|
+
12: {
|
|
256
|
+
maxBufferSize: number;
|
|
257
|
+
maxDepth: number;
|
|
258
|
+
};
|
|
259
|
+
13: {
|
|
260
|
+
maxBufferSize: number;
|
|
261
|
+
maxDepth: number;
|
|
262
|
+
};
|
|
263
|
+
14: {
|
|
264
|
+
maxBufferSize: number;
|
|
265
|
+
maxDepth: number;
|
|
266
|
+
};
|
|
267
|
+
15: {
|
|
268
|
+
maxBufferSize: number;
|
|
269
|
+
maxDepth: number;
|
|
270
|
+
};
|
|
271
|
+
16: {
|
|
272
|
+
maxBufferSize: number;
|
|
273
|
+
maxDepth: number;
|
|
274
|
+
};
|
|
275
|
+
17: {
|
|
276
|
+
maxBufferSize: number;
|
|
277
|
+
maxDepth: number;
|
|
278
|
+
};
|
|
279
|
+
18: {
|
|
280
|
+
maxBufferSize: number;
|
|
281
|
+
maxDepth: number;
|
|
282
|
+
};
|
|
283
|
+
19: {
|
|
284
|
+
maxBufferSize: number;
|
|
285
|
+
maxDepth: number;
|
|
286
|
+
};
|
|
287
|
+
20: {
|
|
288
|
+
maxBufferSize: number;
|
|
289
|
+
maxDepth: number;
|
|
290
|
+
};
|
|
291
|
+
21: {
|
|
292
|
+
maxBufferSize: number;
|
|
293
|
+
maxDepth: number;
|
|
294
|
+
};
|
|
295
|
+
22: {
|
|
296
|
+
maxBufferSize: number;
|
|
297
|
+
maxDepth: number;
|
|
298
|
+
};
|
|
299
|
+
23: {
|
|
300
|
+
maxBufferSize: number;
|
|
301
|
+
maxDepth: number;
|
|
302
|
+
};
|
|
303
|
+
24: {
|
|
304
|
+
maxBufferSize: number;
|
|
305
|
+
maxDepth: number;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
185
308
|
|
|
186
309
|
declare class Utility {
|
|
187
310
|
/**
|
|
@@ -192,4 +315,4 @@ declare class Utility {
|
|
|
192
315
|
static createMerkleTreeFromContract(env: ENV, privateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
193
316
|
}
|
|
194
317
|
|
|
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,
|
|
318
|
+
export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type Compression, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NFTTradingData, type Ownership, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, SDK_SOLANA_CONFIG, SOLANA, SOLANA_PUBKEYS, type SellParams, type SellResponse, type SolanaConfig, Utility, VALID_SIZE_PAIR, isEthereumConfig, isSolanaConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -66,7 +66,6 @@ interface BuyResponse {
|
|
|
66
66
|
interface SellResponse {
|
|
67
67
|
seller: string;
|
|
68
68
|
collectionAddress: string;
|
|
69
|
-
nftAddress: string;
|
|
70
69
|
tokenId: string;
|
|
71
70
|
price: string;
|
|
72
71
|
nextPrice: string;
|
|
@@ -91,7 +90,7 @@ interface BuyCreditParams {
|
|
|
91
90
|
adminPubKey: PublicKey;
|
|
92
91
|
amount: number;
|
|
93
92
|
}
|
|
94
|
-
declare enum
|
|
93
|
+
declare enum PurcahseType {
|
|
95
94
|
BUY = "buy",
|
|
96
95
|
SELL = "sell"
|
|
97
96
|
}
|
|
@@ -138,7 +137,7 @@ declare class FlipmemeSDK {
|
|
|
138
137
|
flipSell(params: SellParams): Promise<SellResponse[]>;
|
|
139
138
|
profileSell(data: ProfileSellParams): Promise<SellResponse[]>;
|
|
140
139
|
buyCredit(params: BuyCreditParams): Promise<string>;
|
|
141
|
-
getTotalPrice(type:
|
|
140
|
+
getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
|
|
142
141
|
createMerkle(collectionId: string, maxBufferSize: number, maxDepth: number): Promise<PublicKey>;
|
|
143
142
|
/**For testing */
|
|
144
143
|
getStateInfo(): Promise<{
|
|
@@ -174,14 +173,138 @@ declare class FlipmemeSDK {
|
|
|
174
173
|
};
|
|
175
174
|
collectionAddress: PublicKey;
|
|
176
175
|
}>;
|
|
177
|
-
getTransactionTest(signature: string): Promise<BuyResponse[]>;
|
|
176
|
+
getTransactionTest(signature: string, transactionType?: string): Promise<BuyResponse[] | SellResponse[]>;
|
|
178
177
|
getInstructionData(instruction: string): Promise<void>;
|
|
179
178
|
}
|
|
180
179
|
|
|
180
|
+
declare const SOLANA: {
|
|
181
|
+
STATE_ID_STR: string;
|
|
182
|
+
TREASURY_ID_STR: string;
|
|
183
|
+
LP_PROVISIONER_ID_STR: string;
|
|
184
|
+
TOKEN_METADATA_PROGRAM_ID_STR: string;
|
|
185
|
+
MPL_CORE_STR: string;
|
|
186
|
+
ADMIN_FOR_CREDIT_BUY_STR: string;
|
|
187
|
+
MPL_BUBBLEGUM_STR: string;
|
|
188
|
+
SPL_ACCOUNT_COMPRESSION_STR: string;
|
|
189
|
+
SPL_NOOP_STR: string;
|
|
190
|
+
SPL_TOKEN_STR: string;
|
|
191
|
+
SPL_ATA_TOKEN_STR: string;
|
|
192
|
+
RENT_TOKEN_STR: string;
|
|
193
|
+
};
|
|
181
194
|
declare enum ENV {
|
|
182
195
|
Devnet = "Devnet",
|
|
183
196
|
Mainnet = "Mainnet"
|
|
184
197
|
}
|
|
198
|
+
declare const RPC: {
|
|
199
|
+
Devnet: string;
|
|
200
|
+
Mainnet: string;
|
|
201
|
+
};
|
|
202
|
+
declare const SOLANA_PUBKEYS: {
|
|
203
|
+
STATE_ID: PublicKey;
|
|
204
|
+
TREASURY_ID: PublicKey;
|
|
205
|
+
LP_PROVISIONER_ID: PublicKey;
|
|
206
|
+
TOKEN_METADATA_PROGRAM_ID: PublicKey;
|
|
207
|
+
ADMIN_FOR_CREDIT_BUY: PublicKey;
|
|
208
|
+
MPL_BUBBLEGUM_ID: PublicKey;
|
|
209
|
+
SPL_ACCOUNT_COMPRESSION_ID: PublicKey;
|
|
210
|
+
SPL_NOOP_ID: PublicKey;
|
|
211
|
+
SPL_TOKEN_ID: PublicKey;
|
|
212
|
+
SPL_ATA_TOKEN_ID: PublicKey;
|
|
213
|
+
RENT_TOKEN_ID: PublicKey;
|
|
214
|
+
};
|
|
215
|
+
declare const SDK_SOLANA_CONFIG: {
|
|
216
|
+
CHUNK_SIZE: number;
|
|
217
|
+
};
|
|
218
|
+
declare const VALID_SIZE_PAIR: {
|
|
219
|
+
3: {
|
|
220
|
+
maxBufferSize: number;
|
|
221
|
+
maxDepth: number;
|
|
222
|
+
};
|
|
223
|
+
4: {
|
|
224
|
+
maxBufferSize: number;
|
|
225
|
+
maxDepth: number;
|
|
226
|
+
};
|
|
227
|
+
5: {
|
|
228
|
+
maxBufferSize: number;
|
|
229
|
+
maxDepth: number;
|
|
230
|
+
};
|
|
231
|
+
6: {
|
|
232
|
+
maxBufferSize: number;
|
|
233
|
+
maxDepth: number;
|
|
234
|
+
};
|
|
235
|
+
7: {
|
|
236
|
+
maxBufferSize: number;
|
|
237
|
+
maxDepth: number;
|
|
238
|
+
};
|
|
239
|
+
8: {
|
|
240
|
+
maxBufferSize: number;
|
|
241
|
+
maxDepth: number;
|
|
242
|
+
};
|
|
243
|
+
9: {
|
|
244
|
+
maxBufferSize: number;
|
|
245
|
+
maxDepth: number;
|
|
246
|
+
};
|
|
247
|
+
10: {
|
|
248
|
+
maxBufferSize: number;
|
|
249
|
+
maxDepth: number;
|
|
250
|
+
};
|
|
251
|
+
11: {
|
|
252
|
+
maxBufferSize: number;
|
|
253
|
+
maxDepth: number;
|
|
254
|
+
};
|
|
255
|
+
12: {
|
|
256
|
+
maxBufferSize: number;
|
|
257
|
+
maxDepth: number;
|
|
258
|
+
};
|
|
259
|
+
13: {
|
|
260
|
+
maxBufferSize: number;
|
|
261
|
+
maxDepth: number;
|
|
262
|
+
};
|
|
263
|
+
14: {
|
|
264
|
+
maxBufferSize: number;
|
|
265
|
+
maxDepth: number;
|
|
266
|
+
};
|
|
267
|
+
15: {
|
|
268
|
+
maxBufferSize: number;
|
|
269
|
+
maxDepth: number;
|
|
270
|
+
};
|
|
271
|
+
16: {
|
|
272
|
+
maxBufferSize: number;
|
|
273
|
+
maxDepth: number;
|
|
274
|
+
};
|
|
275
|
+
17: {
|
|
276
|
+
maxBufferSize: number;
|
|
277
|
+
maxDepth: number;
|
|
278
|
+
};
|
|
279
|
+
18: {
|
|
280
|
+
maxBufferSize: number;
|
|
281
|
+
maxDepth: number;
|
|
282
|
+
};
|
|
283
|
+
19: {
|
|
284
|
+
maxBufferSize: number;
|
|
285
|
+
maxDepth: number;
|
|
286
|
+
};
|
|
287
|
+
20: {
|
|
288
|
+
maxBufferSize: number;
|
|
289
|
+
maxDepth: number;
|
|
290
|
+
};
|
|
291
|
+
21: {
|
|
292
|
+
maxBufferSize: number;
|
|
293
|
+
maxDepth: number;
|
|
294
|
+
};
|
|
295
|
+
22: {
|
|
296
|
+
maxBufferSize: number;
|
|
297
|
+
maxDepth: number;
|
|
298
|
+
};
|
|
299
|
+
23: {
|
|
300
|
+
maxBufferSize: number;
|
|
301
|
+
maxDepth: number;
|
|
302
|
+
};
|
|
303
|
+
24: {
|
|
304
|
+
maxBufferSize: number;
|
|
305
|
+
maxDepth: number;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
185
308
|
|
|
186
309
|
declare class Utility {
|
|
187
310
|
/**
|
|
@@ -192,4 +315,4 @@ declare class Utility {
|
|
|
192
315
|
static createMerkleTreeFromContract(env: ENV, privateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
193
316
|
}
|
|
194
317
|
|
|
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,
|
|
318
|
+
export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type Compression, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NFTTradingData, type Ownership, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, SDK_SOLANA_CONFIG, SOLANA, SOLANA_PUBKEYS, type SellParams, type SellResponse, type SolanaConfig, Utility, VALID_SIZE_PAIR, isEthereumConfig, isSolanaConfig };
|