3land_sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. package/README.md +352 -0
  2. package/assets/3land_rebrand.gif +0 -0
  3. package/assets/battle_sol.gif +0 -0
  4. package/assets/ds.jpeg +0 -0
  5. package/assets/future.webp +0 -0
  6. package/assets/music.mp3 +0 -0
  7. package/assets/niicl.gif +0 -0
  8. package/assets/og.png +0 -0
  9. package/assets/phone.glb +0 -0
  10. package/assets/testvid.mp4 +0 -0
  11. package/idl.json +7652 -0
  12. package/package.json +35 -0
  13. package/src/index.ts +89 -0
  14. package/src/library/Irys/irys.ts +412 -0
  15. package/src/library/Store.ts +613 -0
  16. package/src/library/implementation/storeImplementation.ts +385 -0
  17. package/src/library/instructions/store/buySingleEdition.ts +227 -0
  18. package/src/library/instructions/store/createSingleEdition.ts +49 -0
  19. package/src/library/instructions/store/createStore.ts +19 -0
  20. package/src/library/instructions/store/idl.ts +7622 -0
  21. package/src/library/instructions/store/uploadFilesIryis.ts +133 -0
  22. package/src/types/accounts/ArchiveDeposit.ts +207 -0
  23. package/src/types/accounts/Authority.ts +73 -0
  24. package/src/types/accounts/BurnDeposit.ts +111 -0
  25. package/src/types/accounts/BurnProgress.ts +97 -0
  26. package/src/types/accounts/BuyHistory.ts +121 -0
  27. package/src/types/accounts/BuyTrack.ts +94 -0
  28. package/src/types/accounts/Card.ts +185 -0
  29. package/src/types/accounts/CollectionRegistry.ts +145 -0
  30. package/src/types/accounts/CollectorRegistry.ts +145 -0
  31. package/src/types/accounts/CreatorRegistry.ts +153 -0
  32. package/src/types/accounts/CurrencyArtistProof.ts +113 -0
  33. package/src/types/accounts/GenericUser.ts +185 -0
  34. package/src/types/accounts/ItemArchive.ts +223 -0
  35. package/src/types/accounts/ItemReserveList.ts +87 -0
  36. package/src/types/accounts/ItemReserveList2.ts +73 -0
  37. package/src/types/accounts/LutVault.ts +97 -0
  38. package/src/types/accounts/Pack.ts +367 -0
  39. package/src/types/accounts/PackContent.ts +97 -0
  40. package/src/types/accounts/PackOpenHolder.ts +141 -0
  41. package/src/types/accounts/PackReceipt.ts +145 -0
  42. package/src/types/accounts/PackTraits.ts +101 -0
  43. package/src/types/accounts/Payment.ts +97 -0
  44. package/src/types/accounts/PoolVault.ts +177 -0
  45. package/src/types/accounts/RevealForMe.ts +139 -0
  46. package/src/types/accounts/SecureHolder.ts +97 -0
  47. package/src/types/accounts/Single.ts +301 -0
  48. package/src/types/accounts/Store.ts +180 -0
  49. package/src/types/accounts/StoresHolder.ts +131 -0
  50. package/src/types/accounts/ThreeId.ts +189 -0
  51. package/src/types/accounts/TokenManager.ts +217 -0
  52. package/src/types/accounts/ZeroCard.ts +73 -0
  53. package/src/types/accounts/ZeroContent.ts +89 -0
  54. package/src/types/accounts/ZeroOpenHolder.ts +183 -0
  55. package/src/types/accounts/index.ts +84 -0
  56. package/src/types/errors/anchor.ts +773 -0
  57. package/src/types/errors/index.ts +59 -0
  58. package/src/types/implementation/implementationTypes.ts +27 -0
  59. package/src/types/instructions/addBurn.ts +56 -0
  60. package/src/types/instructions/adjustDepositBurn.ts +33 -0
  61. package/src/types/instructions/archiveItem.ts +60 -0
  62. package/src/types/instructions/assignPackDelegate.ts +30 -0
  63. package/src/types/instructions/burnPay.ts +55 -0
  64. package/src/types/instructions/buyPack.ts +69 -0
  65. package/src/types/instructions/buyPay.ts +71 -0
  66. package/src/types/instructions/buyToken.ts +64 -0
  67. package/src/types/instructions/claimZeroCard.ts +106 -0
  68. package/src/types/instructions/closeDepositBurn.ts +47 -0
  69. package/src/types/instructions/closeRegisterTraits.ts +28 -0
  70. package/src/types/instructions/createCard.ts +56 -0
  71. package/src/types/instructions/createCollection.ts +68 -0
  72. package/src/types/instructions/createPack.ts +71 -0
  73. package/src/types/instructions/createSingle.ts +71 -0
  74. package/src/types/instructions/createStore.ts +50 -0
  75. package/src/types/instructions/createTokenLauncher.ts +82 -0
  76. package/src/types/instructions/createZeroCard.ts +76 -0
  77. package/src/types/instructions/deleteCard.ts +32 -0
  78. package/src/types/instructions/deletePack.ts +40 -0
  79. package/src/types/instructions/deleteSingle.ts +36 -0
  80. package/src/types/instructions/deleteTokenLauncher.ts +38 -0
  81. package/src/types/instructions/depositBurn.ts +55 -0
  82. package/src/types/instructions/donateUser.ts +84 -0
  83. package/src/types/instructions/feedPool.ts +61 -0
  84. package/src/types/instructions/feedTraits.ts +44 -0
  85. package/src/types/instructions/feedTree.ts +63 -0
  86. package/src/types/instructions/flagPack.ts +50 -0
  87. package/src/types/instructions/flagSingle.ts +47 -0
  88. package/src/types/instructions/gatePay.ts +59 -0
  89. package/src/types/instructions/index.ts +140 -0
  90. package/src/types/instructions/initialize.ts +46 -0
  91. package/src/types/instructions/openPack.ts +79 -0
  92. package/src/types/instructions/prepareCreator.ts +30 -0
  93. package/src/types/instructions/preparePack.ts +51 -0
  94. package/src/types/instructions/prepareTraits.ts +28 -0
  95. package/src/types/instructions/printPack.ts +95 -0
  96. package/src/types/instructions/printSingle.ts +108 -0
  97. package/src/types/instructions/recoverDepositBurn.ts +80 -0
  98. package/src/types/instructions/registerActivity.ts +43 -0
  99. package/src/types/instructions/registerCollector.ts +63 -0
  100. package/src/types/instructions/registerCreator.ts +48 -0
  101. package/src/types/instructions/registerGenericUser.ts +94 -0
  102. package/src/types/instructions/registerPackUploads.ts +44 -0
  103. package/src/types/instructions/registerTraits.ts +42 -0
  104. package/src/types/instructions/registerUser.ts +50 -0
  105. package/src/types/instructions/storeLutFor.ts +44 -0
  106. package/src/types/instructions/unwrapAndDestroy.ts +56 -0
  107. package/src/types/instructions/updateCard.ts +54 -0
  108. package/src/types/instructions/updatePack.ts +71 -0
  109. package/src/types/instructions/updateSingle.ts +64 -0
  110. package/src/types/instructions/updateStore.ts +47 -0
  111. package/src/types/instructions/withdrawFromStore.ts +26 -0
  112. package/src/types/programId.ts +42 -0
  113. package/src/types/types/AccountClass.ts +868 -0
  114. package/src/types/types/AccountHasher.ts +89 -0
  115. package/src/types/types/ActionAfter.ts +202 -0
  116. package/src/types/types/AllowedCurrencyArgs.ts +53 -0
  117. package/src/types/types/AuthorityGateTypes.ts +90 -0
  118. package/src/types/types/BurnCount.ts +60 -0
  119. package/src/types/types/BurnState.ts +88 -0
  120. package/src/types/types/BurnTrack.ts +64 -0
  121. package/src/types/types/BurnType.ts +118 -0
  122. package/src/types/types/BurnTypeBurn.ts +56 -0
  123. package/src/types/types/BuyHistoryClass.ts +90 -0
  124. package/src/types/types/CardClass.ts +56 -0
  125. package/src/types/types/CardState.ts +238 -0
  126. package/src/types/types/CardTrack.ts +76 -0
  127. package/src/types/types/Category.ts +72 -0
  128. package/src/types/types/CnftData.ts +85 -0
  129. package/src/types/types/CollectTrack.ts +61 -0
  130. package/src/types/types/Collection.ts +64 -0
  131. package/src/types/types/CompactCnftData.ts +76 -0
  132. package/src/types/types/CoolTimePerAmountArgs.ts +72 -0
  133. package/src/types/types/Creator.ts +72 -0
  134. package/src/types/types/CreatorGateArgs.ts +53 -0
  135. package/src/types/types/CurrencyArtistProof.ts +85 -0
  136. package/src/types/types/CurrencyType.ts +259 -0
  137. package/src/types/types/DateTraitInit.ts +61 -0
  138. package/src/types/types/DateTraitInitMap.ts +72 -0
  139. package/src/types/types/Deposit.ts +85 -0
  140. package/src/types/types/DepositFormat.ts +90 -0
  141. package/src/types/types/DepositState.ts +88 -0
  142. package/src/types/types/DepositSubtype.ts +90 -0
  143. package/src/types/types/DepositTrack.ts +69 -0
  144. package/src/types/types/DepositTrackType.ts +120 -0
  145. package/src/types/types/DepositType.ts +245 -0
  146. package/src/types/types/Earnings.ts +37 -0
  147. package/src/types/types/EditionStoreType.ts +120 -0
  148. package/src/types/types/EncryptedPayload.ts +61 -0
  149. package/src/types/types/ExtraParameter.ts +117 -0
  150. package/src/types/types/FakeBurnCount.ts +64 -0
  151. package/src/types/types/FakeDeposit.ts +64 -0
  152. package/src/types/types/FakeTraitPair.ts +61 -0
  153. package/src/types/types/FakeTraitValue.ts +61 -0
  154. package/src/types/types/FakeVolumeTrack.ts +64 -0
  155. package/src/types/types/FeeType.ts +118 -0
  156. package/src/types/types/FeedingTraits.ts +57 -0
  157. package/src/types/types/Filter.ts +64 -0
  158. package/src/types/types/FilterType.ts +56 -0
  159. package/src/types/types/GeneralStore.ts +56 -0
  160. package/src/types/types/GenericStore.ts +64 -0
  161. package/src/types/types/GenericValue.ts +172 -0
  162. package/src/types/types/GlobalFee.ts +85 -0
  163. package/src/types/types/GlobalState.ts +148 -0
  164. package/src/types/types/IndexDate.ts +94 -0
  165. package/src/types/types/IndexDates.ts +64 -0
  166. package/src/types/types/Item.ts +53 -0
  167. package/src/types/types/ItemClass.ts +88 -0
  168. package/src/types/types/ItemState.ts +298 -0
  169. package/src/types/types/ItemTrack.ts +76 -0
  170. package/src/types/types/ListingPerWalletArgs.ts +53 -0
  171. package/src/types/types/MemeVaultProof.ts +64 -0
  172. package/src/types/types/MetadataArgs.ts +207 -0
  173. package/src/types/types/NonFungibleTraitInit.ts +64 -0
  174. package/src/types/types/NonFungibleTraitInitMap.ts +84 -0
  175. package/src/types/types/OnlyBetweenTimesArgs.ts +76 -0
  176. package/src/types/types/OnlyTheseDOWArgs.ts +53 -0
  177. package/src/types/types/PackConfig.ts +98 -0
  178. package/src/types/types/PackOpenHolderState.ts +120 -0
  179. package/src/types/types/PackRule.ts +85 -0
  180. package/src/types/types/PackState.ts +118 -0
  181. package/src/types/types/PackType.ts +118 -0
  182. package/src/types/types/PaymentClass.ts +118 -0
  183. package/src/types/types/PoolAccess.ts +88 -0
  184. package/src/types/types/PoolState.ts +88 -0
  185. package/src/types/types/PoolType.ts +88 -0
  186. package/src/types/types/Popularity.ts +76 -0
  187. package/src/types/types/PopularityState.ts +630 -0
  188. package/src/types/types/PreviousDonationRecord.ts +76 -0
  189. package/src/types/types/Price.ts +64 -0
  190. package/src/types/types/PriceRule.ts +216 -0
  191. package/src/types/types/RecoverDeposit.ts +56 -0
  192. package/src/types/types/Rule.ts +199 -0
  193. package/src/types/types/SaleConfig.ts +102 -0
  194. package/src/types/types/SaleTrack.ts +85 -0
  195. package/src/types/types/SaleType.ts +148 -0
  196. package/src/types/types/Seed.ts +61 -0
  197. package/src/types/types/SelectedCard.ts +61 -0
  198. package/src/types/types/SelectedZeroCard.ts +61 -0
  199. package/src/types/types/SemiFungibleTraitInit.ts +61 -0
  200. package/src/types/types/SemiFungibleTraitInitMap.ts +72 -0
  201. package/src/types/types/ShortCreator.ts +64 -0
  202. package/src/types/types/ShortMetadata.ts +145 -0
  203. package/src/types/types/ShortMetadataArgs.ts +111 -0
  204. package/src/types/types/StoreConfig.ts +98 -0
  205. package/src/types/types/StoreRule.ts +145 -0
  206. package/src/types/types/SuperCategory.ts +61 -0
  207. package/src/types/types/TightCardMetadata.ts +120 -0
  208. package/src/types/types/TimeRangeType.ts +120 -0
  209. package/src/types/types/TimedPerWalletArgs.ts +53 -0
  210. package/src/types/types/TokenMetadata.ts +72 -0
  211. package/src/types/types/TokenProgramVersion.ts +90 -0
  212. package/src/types/types/TokenStandard.ts +150 -0
  213. package/src/types/types/TokenState.ts +88 -0
  214. package/src/types/types/TokenType.ts +88 -0
  215. package/src/types/types/TotalPerTimeArgs.ts +85 -0
  216. package/src/types/types/TotalPerTimeWalletArgs.ts +61 -0
  217. package/src/types/types/TrackRegistry.ts +90 -0
  218. package/src/types/types/TraitInit.ts +210 -0
  219. package/src/types/types/TraitPass.ts +60 -0
  220. package/src/types/types/TraitPassType.ts +225 -0
  221. package/src/types/types/TraitType.ts +267 -0
  222. package/src/types/types/TraitValue.ts +72 -0
  223. package/src/types/types/UnlocksAfter.ts +172 -0
  224. package/src/types/types/UnwrapMetadata.ts +156 -0
  225. package/src/types/types/UseMethod.ts +118 -0
  226. package/src/types/types/Uses.ts +76 -0
  227. package/src/types/types/VerifyCollectionMetadata.ts +109 -0
  228. package/src/types/types/VolumeTrack.ts +61 -0
  229. package/src/types/types/WrappedSource.ts +85 -0
  230. package/src/types/types/ZeroConfig.ts +85 -0
  231. package/src/types/types/index.ts +798 -0
  232. package/src/utility/Connection.ts +9 -0
  233. package/src/utility/Holders.ts +8 -0
  234. package/src/utility/PdaManager.ts +230 -0
  235. package/src/utility/config.ts +32 -0
  236. package/src/utility/utils.ts +191 -0
  237. package/src/utility/validation.ts +229 -0
  238. package/tsconfig.json +12 -0
package/README.md ADDED
@@ -0,0 +1,352 @@
1
+ # 3Land Solana SDK
2
+
3
+ A Node.js SDK for interacting with 3Land's Solana programs. This SDK provides a simple and intuitive way to integrate with 3Land's smart contracts on the Solana blockchain.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Prerequisites](#prerequisites)
8
+ 2. [Installation](#installation)
9
+ 3. [Network Configuration](#network-configuration)
10
+ - [Basic Network Selection](#basic-network-selection)
11
+ - [Custom Configuration](#custom-configuration)
12
+ - [Environment Setup](#environment-specific-setup)
13
+ 4. [Wallet Setup](#wallet-setup)
14
+ - [Devnet Setup](#devnet-wallet-setup)
15
+ - [Mainnet Setup](#mainnet-wallet-setup)
16
+ 5. [Usage](#usage)
17
+ - [Creating a Store](#creating-a-store)
18
+ - [Creating a Collection](#creating-a-collection)
19
+ - [Creating a Single Edition NFT](#creating-a-single-edition-nft)
20
+ - [Buying an NFT](#buying-an-nft)
21
+ 6. [Features](#features)
22
+ 7. [Error Handling](#error-handling)
23
+ 8. [Contributing](#contributing)
24
+ 9. [Support](#support)
25
+ 10. [License](#license)
26
+
27
+ ## Prerequisites
28
+
29
+ Before using this SDK, ensure you have the following installed:
30
+
31
+ - Node.js (v16 or higher)
32
+ - npm or yarn
33
+ - [Solana CLI Tools](https://docs.solana.com/cli/install-solana-cli-tools)
34
+
35
+ ## Installation
36
+
37
+ Clone the repo
38
+
39
+ ```bash
40
+ git clone https://github.com/biccsdev/3land_sdk.git
41
+ # TODO: add to npm
42
+ # npm install @3land/solana-sdk
43
+ # or
44
+ # yarn add @3land/solana-sdk
45
+ ```
46
+
47
+ Run this command to install all the packages needed for the sdk
48
+
49
+ ```bash
50
+ npm install
51
+ # or
52
+ yarn add
53
+ ```
54
+
55
+ ## Network Configuration
56
+
57
+ ### Basic Network Selection
58
+
59
+ ```typescript
60
+ import { Store, NetworkType } from "@3land/solana-sdk";
61
+
62
+ // For Devnet (default)
63
+ const devnetStore = new Store();
64
+
65
+ // For Mainnet
66
+ const mainnetStore = new Store({
67
+ network: NetworkType.MAINNET,
68
+ });
69
+ ```
70
+
71
+ ### Custom Configuration
72
+
73
+ ```typescript
74
+ // Using custom RPC endpoint
75
+ const store = new Store({
76
+ network: NetworkType.MAINNET,
77
+ customEndpoint: "https://your-custom-rpc.com",
78
+ });
79
+
80
+ // Using custom configuration
81
+ const storeWithCustomConfig = new Store({
82
+ network: NetworkType.MAINNET,
83
+ customConfig: {
84
+ programId: "your_custom_program_id",
85
+ // other config options...
86
+ },
87
+ });
88
+ ```
89
+
90
+ ### Environment-Specific Setup
91
+
92
+ ```typescript
93
+ import dotenv from "dotenv";
94
+ dotenv.config();
95
+
96
+ const store = new Store({
97
+ network: (process.env.SOLANA_NETWORK as NetworkType) || NetworkType.DEVNET,
98
+ customEndpoint: process.env.SOLANA_RPC_ENDPOINT,
99
+ customConfig: {
100
+ programId: process.env.PROGRAM_ID,
101
+ },
102
+ });
103
+ ```
104
+
105
+ Example `.env` file:
106
+
107
+ ```env
108
+ SOLANA_NETWORK=mainnet-beta
109
+ SOLANA_RPC_ENDPOINT=https://your-custom-rpc.com
110
+ PROGRAM_ID=your_program_id
111
+ ```
112
+
113
+ ## Wallet Setup
114
+
115
+ ### Devnet Wallet Setup
116
+
117
+ ```bash
118
+ solana-keygen new --outfile ~/.config/solana/devnet-wallet.json
119
+ solana config set --url https://api.devnet.solana.com
120
+ solana config set --keypair ~/.config/solana/devnet-wallet.json
121
+ solana airdrop 2
122
+ ```
123
+
124
+ ### Mainnet Wallet Setup
125
+
126
+ ```bash
127
+ solana-keygen new --outfile ~/.config/solana/mainnet-wallet.json
128
+ solana config set --url https://api.mainnet-beta.solana.com
129
+ solana config set --keypair ~/.config/solana/mainnet-wallet.json
130
+ ```
131
+
132
+ ## Usage
133
+
134
+ ### Creating a Store
135
+
136
+ ```typescript
137
+ import { StoreConfig, FeeType } from "@3land/solana-sdk";
138
+ import { BN } from "bn.js";
139
+
140
+ try {
141
+ const storeConfig: StoreConfig = {
142
+ fee: new BN(1000000), // Fee in lamports
143
+ feePercentage: 5, // Must be between 0-100
144
+ feeType: new FeeType.AllMints(),
145
+ trust: payer.publicKey,
146
+ rules: [],
147
+ };
148
+
149
+ // Creator and storeId are optional, will default to payer.publicKey and random number
150
+ const createStoreTxId = await store.createStore(
151
+ walletKeypair,
152
+ "My 3Land Store",
153
+ storeConfig
154
+ );
155
+
156
+ console.log("Store created successfully:", createStoreTxId);
157
+ } catch (error) {
158
+ if (error.name === "ValidationError") {
159
+ console.error("Invalid parameters:", error.message);
160
+ } else {
161
+ console.error("Store creation failed:", error);
162
+ }
163
+ }
164
+ ```
165
+
166
+ ### Creating a Collection
167
+
168
+ ```typescript
169
+ try {
170
+ const creator = new Creator({
171
+ address: payer.publicKey,
172
+ verified: false,
173
+ share: 100,
174
+ });
175
+
176
+ const metadata = {
177
+ symbol: "LAND", // Max 10 characters
178
+ name: "3Land Collection", // Max 32 characters
179
+ uri: "",
180
+ sellerFeeBasisPoints: new BN(0),
181
+ creators: [creator],
182
+ collection: null,
183
+ uses: null,
184
+ };
185
+
186
+ / Prepare your image files
187
+ const imageBuffer = fs.readFileSync("path/to/image.gif").buffer;
188
+ const coverBuffer = fs.readFileSync("path/to/cover.jpeg").buffer;
189
+
190
+ const collectionOptions = {
191
+ symbol: "SDK",
192
+ metadata: {
193
+ name: metadata.name,
194
+ description: "3Land Collection Description",
195
+ files: {
196
+ file: {
197
+ arrayBuffer() {
198
+ return imageBuffer;
199
+ },
200
+ type: "image/png",
201
+ },
202
+ cover: {
203
+ arrayBuffer() {
204
+ return coverBuffer;
205
+ },
206
+ type: "image/png",
207
+ },
208
+ },
209
+ },
210
+ creators: metadata.creators,
211
+ traits: [{ attribute1: "value1" }, { attribute2: "value2" }],
212
+ sellerFeeBasisPoints: metadata.sellerFeeBasisPoints,
213
+ };
214
+
215
+ const collectionTx = await store.createCollection(
216
+ walletKeypair,
217
+ { __kind: "V1", size: 0 },
218
+ metadata,
219
+ {
220
+ options: collectionOptions
221
+ },
222
+ false, // Mutable flag (optional)
223
+ 0 // Supply (optional)
224
+ );
225
+
226
+ console.log("Collection created successfully:", collectionTx);
227
+ } catch (error) {
228
+ console.error("Collection creation failed:", error);
229
+ }
230
+ ```
231
+
232
+ ### Creating a Single Edition NFT
233
+
234
+ ```typescript
235
+ try {
236
+ const metadata = {
237
+ name: "My 3Land NFT",
238
+ uri: "",
239
+ uriType: 1,
240
+ sellerFeeBasisPoints: 500,
241
+ collection: collectionPublicKey,
242
+ creators: [creator],
243
+ };
244
+
245
+ const saleConfig = {
246
+ prices: [
247
+ {
248
+ amount: new BN(1000000),
249
+ priceType: new CurrencyType.Native(),
250
+ },
251
+ ],
252
+ priceType: new PriceRule.None(),
253
+ rules: [],
254
+ sendToVault: 0,
255
+ saleType: new SaleType.Normal(),
256
+ };
257
+
258
+ const singleEditionTx = await store.createSingleEdition(
259
+ walletKeypair,
260
+ storeAccount,
261
+ 100, // Supply
262
+ metadata,
263
+ saleConfig,
264
+ [1, 0, 0], // Category
265
+ [1, 0], // Super Category
266
+ 0, // Event Category
267
+ 12345, // Hash Traits
268
+ collectionPublicKey,
269
+ {
270
+ options: nftOptions,
271
+ }
272
+ );
273
+
274
+ console.log("Single edition created successfully:", singleEditionTx);
275
+ } catch (error) {
276
+ console.error("Single edition creation failed:", error);
277
+ }
278
+ ```
279
+
280
+ ### Buying an NFT
281
+
282
+ ```typescript
283
+ try {
284
+ // Most parameters are optional and have default values
285
+ const buyTx = await store.buySingleEdition(
286
+ walletKeypair,
287
+ [0, 0, 0, 0, 0, 0], // Distribution bumps
288
+ itemAddress // The NFT's item account address
289
+ );
290
+
291
+ console.log("Purchase successful:", buyTx);
292
+ } catch (error) {
293
+ console.error("Purchase failed:", error);
294
+ }
295
+ ```
296
+
297
+ ## Features
298
+
299
+ - **Store Management**
300
+ - Create and configure NFT stores
301
+ - Set custom fee structures
302
+ - **Collection Management**
303
+ - Create NFT collections
304
+ - Configure collection metadata
305
+ - **NFT Operations**
306
+ - Mint single edition NFTs
307
+ - Configure NFT metadata
308
+ - Set pricing and sale rules
309
+ - Handle NFT purchases
310
+ - **Built-in Validations**
311
+ - Input parameter validation
312
+ - Transaction error handling
313
+ - Comprehensive error messages
314
+ - **Decentralized Storage**
315
+ - Integrated with Irys for metadata storage
316
+ - Support for various file types (jpeg, png, glb, mp3, mp4)
317
+ - Automatic URI generation
318
+
319
+ ### Error Types
320
+
321
+ ```typescript
322
+ try {
323
+ // SDK operations
324
+ } catch (error) {
325
+ if (error.name === "ValidationError") {
326
+ // Handle validation errors
327
+ console.error("Invalid parameters:", error.message);
328
+ } else if (error instanceof SendTransactionError) {
329
+ // Handle Solana transaction errors
330
+ console.error("Transaction failed:", error.logs);
331
+ } else {
332
+ // Handle other errors
333
+ console.error("Operation failed:", error);
334
+ }
335
+ }
336
+ ```
337
+
338
+ ## Contributing
339
+
340
+ 1. Fork the repository
341
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
342
+ 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
343
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
344
+ 5. Open a Pull Request
345
+
346
+ ## Support
347
+
348
+ For support, please create an issue in the GitHub repository or contact the 3Land team directly.
349
+
350
+ ## License
351
+
352
+ This project is licensed under the MIT License - see the LICENSE file for details.
Binary file
Binary file
package/assets/ds.jpeg ADDED
Binary file
Binary file
Binary file
Binary file
package/assets/og.png ADDED
Binary file
Binary file
Binary file