flipmeme-sdk 1.1.9 → 1.2.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/dist/index.d.mts +24 -8
- package/dist/index.d.ts +24 -8
- package/dist/index.js +893 -298
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +911 -300
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as bn_js from 'bn.js';
|
|
2
|
-
import * as _solana_web3_js from '@solana/web3.js';
|
|
3
2
|
import { PublicKey, Transaction, VersionedTransaction, Connection, TransactionSignature } from '@solana/web3.js';
|
|
4
3
|
import { AnchorProvider } from '@coral-xyz/anchor';
|
|
5
4
|
import { SendTransactionOptions } from '@solana/wallet-adapter-base';
|
|
@@ -48,10 +47,12 @@ interface ReserveToken {
|
|
|
48
47
|
mintAndBuy: NFTMintData[] | null;
|
|
49
48
|
}
|
|
50
49
|
interface BuyParams {
|
|
50
|
+
merkleTree: PublicKey;
|
|
51
51
|
collectionId: string;
|
|
52
52
|
collectionSymbol: string;
|
|
53
53
|
creatorAddress: string;
|
|
54
54
|
quantity: number;
|
|
55
|
+
baseUri: string;
|
|
55
56
|
reserveToken: ReserveToken | null;
|
|
56
57
|
notify: any | undefined;
|
|
57
58
|
}
|
|
@@ -112,17 +113,17 @@ declare class FlipmemeSDK {
|
|
|
112
113
|
constructor(chainType: BlockchainType, config: EthereumConfig | SolanaConfig);
|
|
113
114
|
updateConfig(chainType: BlockchainType, config: EthereumConfig | SolanaConfig): void;
|
|
114
115
|
createCollection(params: CollectionParams): Promise<CreateCollectionResponse>;
|
|
115
|
-
getCollectionPda(): Promise<CollectionInfo>;
|
|
116
116
|
buy(params: BuyParams): Promise<BuyResponse[]>;
|
|
117
117
|
flipSell(params: SellParams): Promise<SellResponse[]>;
|
|
118
118
|
profileSell(data: ProfileSellParams): Promise<SellResponse[]>;
|
|
119
119
|
buyCredit(params: BuyCreditParams): Promise<string>;
|
|
120
120
|
getTotalPrice(type: PurcahseTye, collectionId: string, amount: number): Promise<string>;
|
|
121
|
+
createMerkle(collectionId: string, maxBufferSize: number, maxDepth: number): Promise<PublicKey>;
|
|
121
122
|
/**For testing */
|
|
122
123
|
getStateInfo(): Promise<{
|
|
123
|
-
admin:
|
|
124
|
-
treasury:
|
|
125
|
-
lpProvisioner:
|
|
124
|
+
admin: PublicKey;
|
|
125
|
+
treasury: PublicKey;
|
|
126
|
+
lpProvisioner: PublicKey;
|
|
126
127
|
collectionCount: number;
|
|
127
128
|
protocolFeeBps: number;
|
|
128
129
|
sellerFeeBasisPoints: number;
|
|
@@ -138,7 +139,7 @@ declare class FlipmemeSDK {
|
|
|
138
139
|
midPoint: number;
|
|
139
140
|
padding: number[];
|
|
140
141
|
};
|
|
141
|
-
creator:
|
|
142
|
+
creator: PublicKey;
|
|
142
143
|
totalSol: bn_js;
|
|
143
144
|
totalSupply: number;
|
|
144
145
|
mintCount: number;
|
|
@@ -150,9 +151,24 @@ declare class FlipmemeSDK {
|
|
|
150
151
|
bump: number;
|
|
151
152
|
collectionNftBump: number;
|
|
152
153
|
};
|
|
153
|
-
collectionAddress:
|
|
154
|
+
collectionAddress: PublicKey;
|
|
154
155
|
}>;
|
|
155
156
|
getTransactionTest(signature: string): Promise<BuyResponse[]>;
|
|
157
|
+
getInstructionData(instruction: string): Promise<void>;
|
|
156
158
|
}
|
|
157
159
|
|
|
158
|
-
|
|
160
|
+
declare enum ENV {
|
|
161
|
+
Devnet = "Devnet",
|
|
162
|
+
Mainnet = "Mainnet"
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare class Utility {
|
|
166
|
+
/**
|
|
167
|
+
* this function is used to create merkle tree on backend side for bubblegum cNFT for metaplex
|
|
168
|
+
* backend pays the merkle tree create fee
|
|
169
|
+
*/
|
|
170
|
+
static createMerkleTree(env: ENV, payerPrivateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
171
|
+
static createMerkleTreeFromContract(env: ENV, privateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export { BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type CreateCollectionResponse, type EthereumConfig, FlipmemeSDK, type NFTMintData, type NFTTradingData, type ProfileSellParams, PurcahseTye, type ReserveToken, type SellParams, type SellResponse, type SolanaConfig, Utility, isEthereumConfig, isSolanaConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as bn_js from 'bn.js';
|
|
2
|
-
import * as _solana_web3_js from '@solana/web3.js';
|
|
3
2
|
import { PublicKey, Transaction, VersionedTransaction, Connection, TransactionSignature } from '@solana/web3.js';
|
|
4
3
|
import { AnchorProvider } from '@coral-xyz/anchor';
|
|
5
4
|
import { SendTransactionOptions } from '@solana/wallet-adapter-base';
|
|
@@ -48,10 +47,12 @@ interface ReserveToken {
|
|
|
48
47
|
mintAndBuy: NFTMintData[] | null;
|
|
49
48
|
}
|
|
50
49
|
interface BuyParams {
|
|
50
|
+
merkleTree: PublicKey;
|
|
51
51
|
collectionId: string;
|
|
52
52
|
collectionSymbol: string;
|
|
53
53
|
creatorAddress: string;
|
|
54
54
|
quantity: number;
|
|
55
|
+
baseUri: string;
|
|
55
56
|
reserveToken: ReserveToken | null;
|
|
56
57
|
notify: any | undefined;
|
|
57
58
|
}
|
|
@@ -112,17 +113,17 @@ declare class FlipmemeSDK {
|
|
|
112
113
|
constructor(chainType: BlockchainType, config: EthereumConfig | SolanaConfig);
|
|
113
114
|
updateConfig(chainType: BlockchainType, config: EthereumConfig | SolanaConfig): void;
|
|
114
115
|
createCollection(params: CollectionParams): Promise<CreateCollectionResponse>;
|
|
115
|
-
getCollectionPda(): Promise<CollectionInfo>;
|
|
116
116
|
buy(params: BuyParams): Promise<BuyResponse[]>;
|
|
117
117
|
flipSell(params: SellParams): Promise<SellResponse[]>;
|
|
118
118
|
profileSell(data: ProfileSellParams): Promise<SellResponse[]>;
|
|
119
119
|
buyCredit(params: BuyCreditParams): Promise<string>;
|
|
120
120
|
getTotalPrice(type: PurcahseTye, collectionId: string, amount: number): Promise<string>;
|
|
121
|
+
createMerkle(collectionId: string, maxBufferSize: number, maxDepth: number): Promise<PublicKey>;
|
|
121
122
|
/**For testing */
|
|
122
123
|
getStateInfo(): Promise<{
|
|
123
|
-
admin:
|
|
124
|
-
treasury:
|
|
125
|
-
lpProvisioner:
|
|
124
|
+
admin: PublicKey;
|
|
125
|
+
treasury: PublicKey;
|
|
126
|
+
lpProvisioner: PublicKey;
|
|
126
127
|
collectionCount: number;
|
|
127
128
|
protocolFeeBps: number;
|
|
128
129
|
sellerFeeBasisPoints: number;
|
|
@@ -138,7 +139,7 @@ declare class FlipmemeSDK {
|
|
|
138
139
|
midPoint: number;
|
|
139
140
|
padding: number[];
|
|
140
141
|
};
|
|
141
|
-
creator:
|
|
142
|
+
creator: PublicKey;
|
|
142
143
|
totalSol: bn_js;
|
|
143
144
|
totalSupply: number;
|
|
144
145
|
mintCount: number;
|
|
@@ -150,9 +151,24 @@ declare class FlipmemeSDK {
|
|
|
150
151
|
bump: number;
|
|
151
152
|
collectionNftBump: number;
|
|
152
153
|
};
|
|
153
|
-
collectionAddress:
|
|
154
|
+
collectionAddress: PublicKey;
|
|
154
155
|
}>;
|
|
155
156
|
getTransactionTest(signature: string): Promise<BuyResponse[]>;
|
|
157
|
+
getInstructionData(instruction: string): Promise<void>;
|
|
156
158
|
}
|
|
157
159
|
|
|
158
|
-
|
|
160
|
+
declare enum ENV {
|
|
161
|
+
Devnet = "Devnet",
|
|
162
|
+
Mainnet = "Mainnet"
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare class Utility {
|
|
166
|
+
/**
|
|
167
|
+
* this function is used to create merkle tree on backend side for bubblegum cNFT for metaplex
|
|
168
|
+
* backend pays the merkle tree create fee
|
|
169
|
+
*/
|
|
170
|
+
static createMerkleTree(env: ENV, payerPrivateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
171
|
+
static createMerkleTreeFromContract(env: ENV, privateKey: string, collectionSize: number, collectionId: string): Promise<PublicKey>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export { BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type CreateCollectionResponse, type EthereumConfig, FlipmemeSDK, type NFTMintData, type NFTTradingData, type ProfileSellParams, PurcahseTye, type ReserveToken, type SellParams, type SellResponse, type SolanaConfig, Utility, isEthereumConfig, isSolanaConfig };
|