3land_sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +352 -0
- package/assets/3land_rebrand.gif +0 -0
- package/assets/battle_sol.gif +0 -0
- package/assets/ds.jpeg +0 -0
- package/assets/future.webp +0 -0
- package/assets/music.mp3 +0 -0
- package/assets/niicl.gif +0 -0
- package/assets/og.png +0 -0
- package/assets/phone.glb +0 -0
- package/assets/testvid.mp4 +0 -0
- package/idl.json +7652 -0
- package/package.json +35 -0
- package/src/index.ts +89 -0
- package/src/library/Irys/irys.ts +412 -0
- package/src/library/Store.ts +613 -0
- package/src/library/implementation/storeImplementation.ts +385 -0
- package/src/library/instructions/store/buySingleEdition.ts +227 -0
- package/src/library/instructions/store/createSingleEdition.ts +49 -0
- package/src/library/instructions/store/createStore.ts +19 -0
- package/src/library/instructions/store/idl.ts +7622 -0
- package/src/library/instructions/store/uploadFilesIryis.ts +133 -0
- package/src/types/accounts/ArchiveDeposit.ts +207 -0
- package/src/types/accounts/Authority.ts +73 -0
- package/src/types/accounts/BurnDeposit.ts +111 -0
- package/src/types/accounts/BurnProgress.ts +97 -0
- package/src/types/accounts/BuyHistory.ts +121 -0
- package/src/types/accounts/BuyTrack.ts +94 -0
- package/src/types/accounts/Card.ts +185 -0
- package/src/types/accounts/CollectionRegistry.ts +145 -0
- package/src/types/accounts/CollectorRegistry.ts +145 -0
- package/src/types/accounts/CreatorRegistry.ts +153 -0
- package/src/types/accounts/CurrencyArtistProof.ts +113 -0
- package/src/types/accounts/GenericUser.ts +185 -0
- package/src/types/accounts/ItemArchive.ts +223 -0
- package/src/types/accounts/ItemReserveList.ts +87 -0
- package/src/types/accounts/ItemReserveList2.ts +73 -0
- package/src/types/accounts/LutVault.ts +97 -0
- package/src/types/accounts/Pack.ts +367 -0
- package/src/types/accounts/PackContent.ts +97 -0
- package/src/types/accounts/PackOpenHolder.ts +141 -0
- package/src/types/accounts/PackReceipt.ts +145 -0
- package/src/types/accounts/PackTraits.ts +101 -0
- package/src/types/accounts/Payment.ts +97 -0
- package/src/types/accounts/PoolVault.ts +177 -0
- package/src/types/accounts/RevealForMe.ts +139 -0
- package/src/types/accounts/SecureHolder.ts +97 -0
- package/src/types/accounts/Single.ts +301 -0
- package/src/types/accounts/Store.ts +180 -0
- package/src/types/accounts/StoresHolder.ts +131 -0
- package/src/types/accounts/ThreeId.ts +189 -0
- package/src/types/accounts/TokenManager.ts +217 -0
- package/src/types/accounts/ZeroCard.ts +73 -0
- package/src/types/accounts/ZeroContent.ts +89 -0
- package/src/types/accounts/ZeroOpenHolder.ts +183 -0
- package/src/types/accounts/index.ts +84 -0
- package/src/types/errors/anchor.ts +773 -0
- package/src/types/errors/index.ts +59 -0
- package/src/types/implementation/implementationTypes.ts +27 -0
- package/src/types/instructions/addBurn.ts +56 -0
- package/src/types/instructions/adjustDepositBurn.ts +33 -0
- package/src/types/instructions/archiveItem.ts +60 -0
- package/src/types/instructions/assignPackDelegate.ts +30 -0
- package/src/types/instructions/burnPay.ts +55 -0
- package/src/types/instructions/buyPack.ts +69 -0
- package/src/types/instructions/buyPay.ts +71 -0
- package/src/types/instructions/buyToken.ts +64 -0
- package/src/types/instructions/claimZeroCard.ts +106 -0
- package/src/types/instructions/closeDepositBurn.ts +47 -0
- package/src/types/instructions/closeRegisterTraits.ts +28 -0
- package/src/types/instructions/createCard.ts +56 -0
- package/src/types/instructions/createCollection.ts +68 -0
- package/src/types/instructions/createPack.ts +71 -0
- package/src/types/instructions/createSingle.ts +71 -0
- package/src/types/instructions/createStore.ts +50 -0
- package/src/types/instructions/createTokenLauncher.ts +82 -0
- package/src/types/instructions/createZeroCard.ts +76 -0
- package/src/types/instructions/deleteCard.ts +32 -0
- package/src/types/instructions/deletePack.ts +40 -0
- package/src/types/instructions/deleteSingle.ts +36 -0
- package/src/types/instructions/deleteTokenLauncher.ts +38 -0
- package/src/types/instructions/depositBurn.ts +55 -0
- package/src/types/instructions/donateUser.ts +84 -0
- package/src/types/instructions/feedPool.ts +61 -0
- package/src/types/instructions/feedTraits.ts +44 -0
- package/src/types/instructions/feedTree.ts +63 -0
- package/src/types/instructions/flagPack.ts +50 -0
- package/src/types/instructions/flagSingle.ts +47 -0
- package/src/types/instructions/gatePay.ts +59 -0
- package/src/types/instructions/index.ts +140 -0
- package/src/types/instructions/initialize.ts +46 -0
- package/src/types/instructions/openPack.ts +79 -0
- package/src/types/instructions/prepareCreator.ts +30 -0
- package/src/types/instructions/preparePack.ts +51 -0
- package/src/types/instructions/prepareTraits.ts +28 -0
- package/src/types/instructions/printPack.ts +95 -0
- package/src/types/instructions/printSingle.ts +108 -0
- package/src/types/instructions/recoverDepositBurn.ts +80 -0
- package/src/types/instructions/registerActivity.ts +43 -0
- package/src/types/instructions/registerCollector.ts +63 -0
- package/src/types/instructions/registerCreator.ts +48 -0
- package/src/types/instructions/registerGenericUser.ts +94 -0
- package/src/types/instructions/registerPackUploads.ts +44 -0
- package/src/types/instructions/registerTraits.ts +42 -0
- package/src/types/instructions/registerUser.ts +50 -0
- package/src/types/instructions/storeLutFor.ts +44 -0
- package/src/types/instructions/unwrapAndDestroy.ts +56 -0
- package/src/types/instructions/updateCard.ts +54 -0
- package/src/types/instructions/updatePack.ts +71 -0
- package/src/types/instructions/updateSingle.ts +64 -0
- package/src/types/instructions/updateStore.ts +47 -0
- package/src/types/instructions/withdrawFromStore.ts +26 -0
- package/src/types/programId.ts +42 -0
- package/src/types/types/AccountClass.ts +868 -0
- package/src/types/types/AccountHasher.ts +89 -0
- package/src/types/types/ActionAfter.ts +202 -0
- package/src/types/types/AllowedCurrencyArgs.ts +53 -0
- package/src/types/types/AuthorityGateTypes.ts +90 -0
- package/src/types/types/BurnCount.ts +60 -0
- package/src/types/types/BurnState.ts +88 -0
- package/src/types/types/BurnTrack.ts +64 -0
- package/src/types/types/BurnType.ts +118 -0
- package/src/types/types/BurnTypeBurn.ts +56 -0
- package/src/types/types/BuyHistoryClass.ts +90 -0
- package/src/types/types/CardClass.ts +56 -0
- package/src/types/types/CardState.ts +238 -0
- package/src/types/types/CardTrack.ts +76 -0
- package/src/types/types/Category.ts +72 -0
- package/src/types/types/CnftData.ts +85 -0
- package/src/types/types/CollectTrack.ts +61 -0
- package/src/types/types/Collection.ts +64 -0
- package/src/types/types/CompactCnftData.ts +76 -0
- package/src/types/types/CoolTimePerAmountArgs.ts +72 -0
- package/src/types/types/Creator.ts +72 -0
- package/src/types/types/CreatorGateArgs.ts +53 -0
- package/src/types/types/CurrencyArtistProof.ts +85 -0
- package/src/types/types/CurrencyType.ts +259 -0
- package/src/types/types/DateTraitInit.ts +61 -0
- package/src/types/types/DateTraitInitMap.ts +72 -0
- package/src/types/types/Deposit.ts +85 -0
- package/src/types/types/DepositFormat.ts +90 -0
- package/src/types/types/DepositState.ts +88 -0
- package/src/types/types/DepositSubtype.ts +90 -0
- package/src/types/types/DepositTrack.ts +69 -0
- package/src/types/types/DepositTrackType.ts +120 -0
- package/src/types/types/DepositType.ts +245 -0
- package/src/types/types/Earnings.ts +37 -0
- package/src/types/types/EditionStoreType.ts +120 -0
- package/src/types/types/EncryptedPayload.ts +61 -0
- package/src/types/types/ExtraParameter.ts +117 -0
- package/src/types/types/FakeBurnCount.ts +64 -0
- package/src/types/types/FakeDeposit.ts +64 -0
- package/src/types/types/FakeTraitPair.ts +61 -0
- package/src/types/types/FakeTraitValue.ts +61 -0
- package/src/types/types/FakeVolumeTrack.ts +64 -0
- package/src/types/types/FeeType.ts +118 -0
- package/src/types/types/FeedingTraits.ts +57 -0
- package/src/types/types/Filter.ts +64 -0
- package/src/types/types/FilterType.ts +56 -0
- package/src/types/types/GeneralStore.ts +56 -0
- package/src/types/types/GenericStore.ts +64 -0
- package/src/types/types/GenericValue.ts +172 -0
- package/src/types/types/GlobalFee.ts +85 -0
- package/src/types/types/GlobalState.ts +148 -0
- package/src/types/types/IndexDate.ts +94 -0
- package/src/types/types/IndexDates.ts +64 -0
- package/src/types/types/Item.ts +53 -0
- package/src/types/types/ItemClass.ts +88 -0
- package/src/types/types/ItemState.ts +298 -0
- package/src/types/types/ItemTrack.ts +76 -0
- package/src/types/types/ListingPerWalletArgs.ts +53 -0
- package/src/types/types/MemeVaultProof.ts +64 -0
- package/src/types/types/MetadataArgs.ts +207 -0
- package/src/types/types/NonFungibleTraitInit.ts +64 -0
- package/src/types/types/NonFungibleTraitInitMap.ts +84 -0
- package/src/types/types/OnlyBetweenTimesArgs.ts +76 -0
- package/src/types/types/OnlyTheseDOWArgs.ts +53 -0
- package/src/types/types/PackConfig.ts +98 -0
- package/src/types/types/PackOpenHolderState.ts +120 -0
- package/src/types/types/PackRule.ts +85 -0
- package/src/types/types/PackState.ts +118 -0
- package/src/types/types/PackType.ts +118 -0
- package/src/types/types/PaymentClass.ts +118 -0
- package/src/types/types/PoolAccess.ts +88 -0
- package/src/types/types/PoolState.ts +88 -0
- package/src/types/types/PoolType.ts +88 -0
- package/src/types/types/Popularity.ts +76 -0
- package/src/types/types/PopularityState.ts +630 -0
- package/src/types/types/PreviousDonationRecord.ts +76 -0
- package/src/types/types/Price.ts +64 -0
- package/src/types/types/PriceRule.ts +216 -0
- package/src/types/types/RecoverDeposit.ts +56 -0
- package/src/types/types/Rule.ts +199 -0
- package/src/types/types/SaleConfig.ts +102 -0
- package/src/types/types/SaleTrack.ts +85 -0
- package/src/types/types/SaleType.ts +148 -0
- package/src/types/types/Seed.ts +61 -0
- package/src/types/types/SelectedCard.ts +61 -0
- package/src/types/types/SelectedZeroCard.ts +61 -0
- package/src/types/types/SemiFungibleTraitInit.ts +61 -0
- package/src/types/types/SemiFungibleTraitInitMap.ts +72 -0
- package/src/types/types/ShortCreator.ts +64 -0
- package/src/types/types/ShortMetadata.ts +145 -0
- package/src/types/types/ShortMetadataArgs.ts +111 -0
- package/src/types/types/StoreConfig.ts +98 -0
- package/src/types/types/StoreRule.ts +145 -0
- package/src/types/types/SuperCategory.ts +61 -0
- package/src/types/types/TightCardMetadata.ts +120 -0
- package/src/types/types/TimeRangeType.ts +120 -0
- package/src/types/types/TimedPerWalletArgs.ts +53 -0
- package/src/types/types/TokenMetadata.ts +72 -0
- package/src/types/types/TokenProgramVersion.ts +90 -0
- package/src/types/types/TokenStandard.ts +150 -0
- package/src/types/types/TokenState.ts +88 -0
- package/src/types/types/TokenType.ts +88 -0
- package/src/types/types/TotalPerTimeArgs.ts +85 -0
- package/src/types/types/TotalPerTimeWalletArgs.ts +61 -0
- package/src/types/types/TrackRegistry.ts +90 -0
- package/src/types/types/TraitInit.ts +210 -0
- package/src/types/types/TraitPass.ts +60 -0
- package/src/types/types/TraitPassType.ts +225 -0
- package/src/types/types/TraitType.ts +267 -0
- package/src/types/types/TraitValue.ts +72 -0
- package/src/types/types/UnlocksAfter.ts +172 -0
- package/src/types/types/UnwrapMetadata.ts +156 -0
- package/src/types/types/UseMethod.ts +118 -0
- package/src/types/types/Uses.ts +76 -0
- package/src/types/types/VerifyCollectionMetadata.ts +109 -0
- package/src/types/types/VolumeTrack.ts +61 -0
- package/src/types/types/WrappedSource.ts +85 -0
- package/src/types/types/ZeroConfig.ts +85 -0
- package/src/types/types/index.ts +798 -0
- package/src/utility/Connection.ts +9 -0
- package/src/utility/Holders.ts +8 -0
- package/src/utility/PdaManager.ts +230 -0
- package/src/utility/config.ts +32 -0
- package/src/utility/utils.ts +191 -0
- package/src/utility/validation.ts +229 -0
- package/tsconfig.json +12 -0
@@ -0,0 +1,630 @@
|
|
1
|
+
import { PublicKey } from "@solana/web3.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
2
|
+
import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
3
|
+
import * as types from "../types" // eslint-disable-line @typescript-eslint/no-unused-vars
|
4
|
+
import * as borsh from "@coral-xyz/borsh"
|
5
|
+
|
6
|
+
export interface NewJSON {
|
7
|
+
kind: "New"
|
8
|
+
}
|
9
|
+
|
10
|
+
export class New {
|
11
|
+
static readonly discriminator = 0
|
12
|
+
static readonly kind = "New"
|
13
|
+
readonly discriminator = 0
|
14
|
+
readonly kind = "New"
|
15
|
+
|
16
|
+
toJSON(): NewJSON {
|
17
|
+
return {
|
18
|
+
kind: "New",
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
toEncodable() {
|
23
|
+
return {
|
24
|
+
New: {},
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
export interface NoneJSON {
|
30
|
+
kind: "None"
|
31
|
+
}
|
32
|
+
|
33
|
+
export class None {
|
34
|
+
static readonly discriminator = 1
|
35
|
+
static readonly kind = "None"
|
36
|
+
readonly discriminator = 1
|
37
|
+
readonly kind = "None"
|
38
|
+
|
39
|
+
toJSON(): NoneJSON {
|
40
|
+
return {
|
41
|
+
kind: "None",
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
toEncodable() {
|
46
|
+
return {
|
47
|
+
None: {},
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
export interface FirstJSON {
|
53
|
+
kind: "First"
|
54
|
+
}
|
55
|
+
|
56
|
+
export class First {
|
57
|
+
static readonly discriminator = 2
|
58
|
+
static readonly kind = "First"
|
59
|
+
readonly discriminator = 2
|
60
|
+
readonly kind = "First"
|
61
|
+
|
62
|
+
toJSON(): FirstJSON {
|
63
|
+
return {
|
64
|
+
kind: "First",
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
toEncodable() {
|
69
|
+
return {
|
70
|
+
First: {},
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
export interface TenJSON {
|
76
|
+
kind: "Ten"
|
77
|
+
}
|
78
|
+
|
79
|
+
export class Ten {
|
80
|
+
static readonly discriminator = 3
|
81
|
+
static readonly kind = "Ten"
|
82
|
+
readonly discriminator = 3
|
83
|
+
readonly kind = "Ten"
|
84
|
+
|
85
|
+
toJSON(): TenJSON {
|
86
|
+
return {
|
87
|
+
kind: "Ten",
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
toEncodable() {
|
92
|
+
return {
|
93
|
+
Ten: {},
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
export interface TwentyFiveJSON {
|
99
|
+
kind: "TwentyFive"
|
100
|
+
}
|
101
|
+
|
102
|
+
export class TwentyFive {
|
103
|
+
static readonly discriminator = 4
|
104
|
+
static readonly kind = "TwentyFive"
|
105
|
+
readonly discriminator = 4
|
106
|
+
readonly kind = "TwentyFive"
|
107
|
+
|
108
|
+
toJSON(): TwentyFiveJSON {
|
109
|
+
return {
|
110
|
+
kind: "TwentyFive",
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
toEncodable() {
|
115
|
+
return {
|
116
|
+
TwentyFive: {},
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
export interface HundredJSON {
|
122
|
+
kind: "Hundred"
|
123
|
+
}
|
124
|
+
|
125
|
+
export class Hundred {
|
126
|
+
static readonly discriminator = 5
|
127
|
+
static readonly kind = "Hundred"
|
128
|
+
readonly discriminator = 5
|
129
|
+
readonly kind = "Hundred"
|
130
|
+
|
131
|
+
toJSON(): HundredJSON {
|
132
|
+
return {
|
133
|
+
kind: "Hundred",
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
toEncodable() {
|
138
|
+
return {
|
139
|
+
Hundred: {},
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
export interface ThousandJSON {
|
145
|
+
kind: "Thousand"
|
146
|
+
}
|
147
|
+
|
148
|
+
export class Thousand {
|
149
|
+
static readonly discriminator = 6
|
150
|
+
static readonly kind = "Thousand"
|
151
|
+
readonly discriminator = 6
|
152
|
+
readonly kind = "Thousand"
|
153
|
+
|
154
|
+
toJSON(): ThousandJSON {
|
155
|
+
return {
|
156
|
+
kind: "Thousand",
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
toEncodable() {
|
161
|
+
return {
|
162
|
+
Thousand: {},
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
export interface TenThousandJSON {
|
168
|
+
kind: "TenThousand"
|
169
|
+
}
|
170
|
+
|
171
|
+
export class TenThousand {
|
172
|
+
static readonly discriminator = 7
|
173
|
+
static readonly kind = "TenThousand"
|
174
|
+
readonly discriminator = 7
|
175
|
+
readonly kind = "TenThousand"
|
176
|
+
|
177
|
+
toJSON(): TenThousandJSON {
|
178
|
+
return {
|
179
|
+
kind: "TenThousand",
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
toEncodable() {
|
184
|
+
return {
|
185
|
+
TenThousand: {},
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
export interface HundredThousandJSON {
|
191
|
+
kind: "HundredThousand"
|
192
|
+
}
|
193
|
+
|
194
|
+
export class HundredThousand {
|
195
|
+
static readonly discriminator = 8
|
196
|
+
static readonly kind = "HundredThousand"
|
197
|
+
readonly discriminator = 8
|
198
|
+
readonly kind = "HundredThousand"
|
199
|
+
|
200
|
+
toJSON(): HundredThousandJSON {
|
201
|
+
return {
|
202
|
+
kind: "HundredThousand",
|
203
|
+
}
|
204
|
+
}
|
205
|
+
|
206
|
+
toEncodable() {
|
207
|
+
return {
|
208
|
+
HundredThousand: {},
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
export interface MillionJSON {
|
214
|
+
kind: "Million"
|
215
|
+
}
|
216
|
+
|
217
|
+
export class Million {
|
218
|
+
static readonly discriminator = 9
|
219
|
+
static readonly kind = "Million"
|
220
|
+
readonly discriminator = 9
|
221
|
+
readonly kind = "Million"
|
222
|
+
|
223
|
+
toJSON(): MillionJSON {
|
224
|
+
return {
|
225
|
+
kind: "Million",
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
toEncodable() {
|
230
|
+
return {
|
231
|
+
Million: {},
|
232
|
+
}
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
236
|
+
export interface TenMillionJSON {
|
237
|
+
kind: "TenMillion"
|
238
|
+
}
|
239
|
+
|
240
|
+
export class TenMillion {
|
241
|
+
static readonly discriminator = 10
|
242
|
+
static readonly kind = "TenMillion"
|
243
|
+
readonly discriminator = 10
|
244
|
+
readonly kind = "TenMillion"
|
245
|
+
|
246
|
+
toJSON(): TenMillionJSON {
|
247
|
+
return {
|
248
|
+
kind: "TenMillion",
|
249
|
+
}
|
250
|
+
}
|
251
|
+
|
252
|
+
toEncodable() {
|
253
|
+
return {
|
254
|
+
TenMillion: {},
|
255
|
+
}
|
256
|
+
}
|
257
|
+
}
|
258
|
+
|
259
|
+
export interface HundredMillionJSON {
|
260
|
+
kind: "HundredMillion"
|
261
|
+
}
|
262
|
+
|
263
|
+
export class HundredMillion {
|
264
|
+
static readonly discriminator = 11
|
265
|
+
static readonly kind = "HundredMillion"
|
266
|
+
readonly discriminator = 11
|
267
|
+
readonly kind = "HundredMillion"
|
268
|
+
|
269
|
+
toJSON(): HundredMillionJSON {
|
270
|
+
return {
|
271
|
+
kind: "HundredMillion",
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
toEncodable() {
|
276
|
+
return {
|
277
|
+
HundredMillion: {},
|
278
|
+
}
|
279
|
+
}
|
280
|
+
}
|
281
|
+
|
282
|
+
export interface BillionJSON {
|
283
|
+
kind: "Billion"
|
284
|
+
}
|
285
|
+
|
286
|
+
export class Billion {
|
287
|
+
static readonly discriminator = 12
|
288
|
+
static readonly kind = "Billion"
|
289
|
+
readonly discriminator = 12
|
290
|
+
readonly kind = "Billion"
|
291
|
+
|
292
|
+
toJSON(): BillionJSON {
|
293
|
+
return {
|
294
|
+
kind: "Billion",
|
295
|
+
}
|
296
|
+
}
|
297
|
+
|
298
|
+
toEncodable() {
|
299
|
+
return {
|
300
|
+
Billion: {},
|
301
|
+
}
|
302
|
+
}
|
303
|
+
}
|
304
|
+
|
305
|
+
export interface TenBillionJSON {
|
306
|
+
kind: "TenBillion"
|
307
|
+
}
|
308
|
+
|
309
|
+
export class TenBillion {
|
310
|
+
static readonly discriminator = 13
|
311
|
+
static readonly kind = "TenBillion"
|
312
|
+
readonly discriminator = 13
|
313
|
+
readonly kind = "TenBillion"
|
314
|
+
|
315
|
+
toJSON(): TenBillionJSON {
|
316
|
+
return {
|
317
|
+
kind: "TenBillion",
|
318
|
+
}
|
319
|
+
}
|
320
|
+
|
321
|
+
toEncodable() {
|
322
|
+
return {
|
323
|
+
TenBillion: {},
|
324
|
+
}
|
325
|
+
}
|
326
|
+
}
|
327
|
+
|
328
|
+
export interface HundrerBillionJSON {
|
329
|
+
kind: "HundrerBillion"
|
330
|
+
}
|
331
|
+
|
332
|
+
export class HundrerBillion {
|
333
|
+
static readonly discriminator = 14
|
334
|
+
static readonly kind = "HundrerBillion"
|
335
|
+
readonly discriminator = 14
|
336
|
+
readonly kind = "HundrerBillion"
|
337
|
+
|
338
|
+
toJSON(): HundrerBillionJSON {
|
339
|
+
return {
|
340
|
+
kind: "HundrerBillion",
|
341
|
+
}
|
342
|
+
}
|
343
|
+
|
344
|
+
toEncodable() {
|
345
|
+
return {
|
346
|
+
HundrerBillion: {},
|
347
|
+
}
|
348
|
+
}
|
349
|
+
}
|
350
|
+
|
351
|
+
export interface TrillionJSON {
|
352
|
+
kind: "Trillion"
|
353
|
+
}
|
354
|
+
|
355
|
+
export class Trillion {
|
356
|
+
static readonly discriminator = 15
|
357
|
+
static readonly kind = "Trillion"
|
358
|
+
readonly discriminator = 15
|
359
|
+
readonly kind = "Trillion"
|
360
|
+
|
361
|
+
toJSON(): TrillionJSON {
|
362
|
+
return {
|
363
|
+
kind: "Trillion",
|
364
|
+
}
|
365
|
+
}
|
366
|
+
|
367
|
+
toEncodable() {
|
368
|
+
return {
|
369
|
+
Trillion: {},
|
370
|
+
}
|
371
|
+
}
|
372
|
+
}
|
373
|
+
|
374
|
+
export interface TenTrillionJSON {
|
375
|
+
kind: "TenTrillion"
|
376
|
+
}
|
377
|
+
|
378
|
+
export class TenTrillion {
|
379
|
+
static readonly discriminator = 16
|
380
|
+
static readonly kind = "TenTrillion"
|
381
|
+
readonly discriminator = 16
|
382
|
+
readonly kind = "TenTrillion"
|
383
|
+
|
384
|
+
toJSON(): TenTrillionJSON {
|
385
|
+
return {
|
386
|
+
kind: "TenTrillion",
|
387
|
+
}
|
388
|
+
}
|
389
|
+
|
390
|
+
toEncodable() {
|
391
|
+
return {
|
392
|
+
TenTrillion: {},
|
393
|
+
}
|
394
|
+
}
|
395
|
+
}
|
396
|
+
|
397
|
+
export interface HundredTrillionJSON {
|
398
|
+
kind: "HundredTrillion"
|
399
|
+
}
|
400
|
+
|
401
|
+
export class HundredTrillion {
|
402
|
+
static readonly discriminator = 17
|
403
|
+
static readonly kind = "HundredTrillion"
|
404
|
+
readonly discriminator = 17
|
405
|
+
readonly kind = "HundredTrillion"
|
406
|
+
|
407
|
+
toJSON(): HundredTrillionJSON {
|
408
|
+
return {
|
409
|
+
kind: "HundredTrillion",
|
410
|
+
}
|
411
|
+
}
|
412
|
+
|
413
|
+
toEncodable() {
|
414
|
+
return {
|
415
|
+
HundredTrillion: {},
|
416
|
+
}
|
417
|
+
}
|
418
|
+
}
|
419
|
+
|
420
|
+
export interface HighestJSON {
|
421
|
+
kind: "Highest"
|
422
|
+
}
|
423
|
+
|
424
|
+
export class Highest {
|
425
|
+
static readonly discriminator = 18
|
426
|
+
static readonly kind = "Highest"
|
427
|
+
readonly discriminator = 18
|
428
|
+
readonly kind = "Highest"
|
429
|
+
|
430
|
+
toJSON(): HighestJSON {
|
431
|
+
return {
|
432
|
+
kind: "Highest",
|
433
|
+
}
|
434
|
+
}
|
435
|
+
|
436
|
+
toEncodable() {
|
437
|
+
return {
|
438
|
+
Highest: {},
|
439
|
+
}
|
440
|
+
}
|
441
|
+
}
|
442
|
+
|
443
|
+
export interface BannedJSON {
|
444
|
+
kind: "Banned"
|
445
|
+
}
|
446
|
+
|
447
|
+
export class Banned {
|
448
|
+
static readonly discriminator = 19
|
449
|
+
static readonly kind = "Banned"
|
450
|
+
readonly discriminator = 19
|
451
|
+
readonly kind = "Banned"
|
452
|
+
|
453
|
+
toJSON(): BannedJSON {
|
454
|
+
return {
|
455
|
+
kind: "Banned",
|
456
|
+
}
|
457
|
+
}
|
458
|
+
|
459
|
+
toEncodable() {
|
460
|
+
return {
|
461
|
+
Banned: {},
|
462
|
+
}
|
463
|
+
}
|
464
|
+
}
|
465
|
+
|
466
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
467
|
+
export function fromDecoded(obj: any): types.PopularityStateKind {
|
468
|
+
if (typeof obj !== "object") {
|
469
|
+
throw new Error("Invalid enum object")
|
470
|
+
}
|
471
|
+
|
472
|
+
if ("New" in obj) {
|
473
|
+
return new New()
|
474
|
+
}
|
475
|
+
if ("None" in obj) {
|
476
|
+
return new None()
|
477
|
+
}
|
478
|
+
if ("First" in obj) {
|
479
|
+
return new First()
|
480
|
+
}
|
481
|
+
if ("Ten" in obj) {
|
482
|
+
return new Ten()
|
483
|
+
}
|
484
|
+
if ("TwentyFive" in obj) {
|
485
|
+
return new TwentyFive()
|
486
|
+
}
|
487
|
+
if ("Hundred" in obj) {
|
488
|
+
return new Hundred()
|
489
|
+
}
|
490
|
+
if ("Thousand" in obj) {
|
491
|
+
return new Thousand()
|
492
|
+
}
|
493
|
+
if ("TenThousand" in obj) {
|
494
|
+
return new TenThousand()
|
495
|
+
}
|
496
|
+
if ("HundredThousand" in obj) {
|
497
|
+
return new HundredThousand()
|
498
|
+
}
|
499
|
+
if ("Million" in obj) {
|
500
|
+
return new Million()
|
501
|
+
}
|
502
|
+
if ("TenMillion" in obj) {
|
503
|
+
return new TenMillion()
|
504
|
+
}
|
505
|
+
if ("HundredMillion" in obj) {
|
506
|
+
return new HundredMillion()
|
507
|
+
}
|
508
|
+
if ("Billion" in obj) {
|
509
|
+
return new Billion()
|
510
|
+
}
|
511
|
+
if ("TenBillion" in obj) {
|
512
|
+
return new TenBillion()
|
513
|
+
}
|
514
|
+
if ("HundrerBillion" in obj) {
|
515
|
+
return new HundrerBillion()
|
516
|
+
}
|
517
|
+
if ("Trillion" in obj) {
|
518
|
+
return new Trillion()
|
519
|
+
}
|
520
|
+
if ("TenTrillion" in obj) {
|
521
|
+
return new TenTrillion()
|
522
|
+
}
|
523
|
+
if ("HundredTrillion" in obj) {
|
524
|
+
return new HundredTrillion()
|
525
|
+
}
|
526
|
+
if ("Highest" in obj) {
|
527
|
+
return new Highest()
|
528
|
+
}
|
529
|
+
if ("Banned" in obj) {
|
530
|
+
return new Banned()
|
531
|
+
}
|
532
|
+
|
533
|
+
throw new Error("Invalid enum object")
|
534
|
+
}
|
535
|
+
|
536
|
+
export function fromJSON(
|
537
|
+
obj: types.PopularityStateJSON
|
538
|
+
): types.PopularityStateKind {
|
539
|
+
switch (obj.kind) {
|
540
|
+
case "New": {
|
541
|
+
return new New()
|
542
|
+
}
|
543
|
+
case "None": {
|
544
|
+
return new None()
|
545
|
+
}
|
546
|
+
case "First": {
|
547
|
+
return new First()
|
548
|
+
}
|
549
|
+
case "Ten": {
|
550
|
+
return new Ten()
|
551
|
+
}
|
552
|
+
case "TwentyFive": {
|
553
|
+
return new TwentyFive()
|
554
|
+
}
|
555
|
+
case "Hundred": {
|
556
|
+
return new Hundred()
|
557
|
+
}
|
558
|
+
case "Thousand": {
|
559
|
+
return new Thousand()
|
560
|
+
}
|
561
|
+
case "TenThousand": {
|
562
|
+
return new TenThousand()
|
563
|
+
}
|
564
|
+
case "HundredThousand": {
|
565
|
+
return new HundredThousand()
|
566
|
+
}
|
567
|
+
case "Million": {
|
568
|
+
return new Million()
|
569
|
+
}
|
570
|
+
case "TenMillion": {
|
571
|
+
return new TenMillion()
|
572
|
+
}
|
573
|
+
case "HundredMillion": {
|
574
|
+
return new HundredMillion()
|
575
|
+
}
|
576
|
+
case "Billion": {
|
577
|
+
return new Billion()
|
578
|
+
}
|
579
|
+
case "TenBillion": {
|
580
|
+
return new TenBillion()
|
581
|
+
}
|
582
|
+
case "HundrerBillion": {
|
583
|
+
return new HundrerBillion()
|
584
|
+
}
|
585
|
+
case "Trillion": {
|
586
|
+
return new Trillion()
|
587
|
+
}
|
588
|
+
case "TenTrillion": {
|
589
|
+
return new TenTrillion()
|
590
|
+
}
|
591
|
+
case "HundredTrillion": {
|
592
|
+
return new HundredTrillion()
|
593
|
+
}
|
594
|
+
case "Highest": {
|
595
|
+
return new Highest()
|
596
|
+
}
|
597
|
+
case "Banned": {
|
598
|
+
return new Banned()
|
599
|
+
}
|
600
|
+
}
|
601
|
+
}
|
602
|
+
|
603
|
+
export function layout(property?: string) {
|
604
|
+
const ret = borsh.rustEnum([
|
605
|
+
borsh.struct([], "New"),
|
606
|
+
borsh.struct([], "None"),
|
607
|
+
borsh.struct([], "First"),
|
608
|
+
borsh.struct([], "Ten"),
|
609
|
+
borsh.struct([], "TwentyFive"),
|
610
|
+
borsh.struct([], "Hundred"),
|
611
|
+
borsh.struct([], "Thousand"),
|
612
|
+
borsh.struct([], "TenThousand"),
|
613
|
+
borsh.struct([], "HundredThousand"),
|
614
|
+
borsh.struct([], "Million"),
|
615
|
+
borsh.struct([], "TenMillion"),
|
616
|
+
borsh.struct([], "HundredMillion"),
|
617
|
+
borsh.struct([], "Billion"),
|
618
|
+
borsh.struct([], "TenBillion"),
|
619
|
+
borsh.struct([], "HundrerBillion"),
|
620
|
+
borsh.struct([], "Trillion"),
|
621
|
+
borsh.struct([], "TenTrillion"),
|
622
|
+
borsh.struct([], "HundredTrillion"),
|
623
|
+
borsh.struct([], "Highest"),
|
624
|
+
borsh.struct([], "Banned"),
|
625
|
+
])
|
626
|
+
if (property !== undefined) {
|
627
|
+
return ret.replicate(property)
|
628
|
+
}
|
629
|
+
return ret
|
630
|
+
}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { PublicKey } from "@solana/web3.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
2
|
+
import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
3
|
+
import * as types from "../types" // eslint-disable-line @typescript-eslint/no-unused-vars
|
4
|
+
import * as borsh from "@coral-xyz/borsh"
|
5
|
+
|
6
|
+
export interface PreviousDonationRecordFields {
|
7
|
+
cnft: types.CnftDataFields
|
8
|
+
amount: BN
|
9
|
+
message: string
|
10
|
+
}
|
11
|
+
|
12
|
+
export interface PreviousDonationRecordJSON {
|
13
|
+
cnft: types.CnftDataJSON
|
14
|
+
amount: string
|
15
|
+
message: string
|
16
|
+
}
|
17
|
+
|
18
|
+
export class PreviousDonationRecord {
|
19
|
+
readonly cnft: types.CnftData
|
20
|
+
readonly amount: BN
|
21
|
+
readonly message: string
|
22
|
+
|
23
|
+
constructor(fields: PreviousDonationRecordFields) {
|
24
|
+
this.cnft = new types.CnftData({ ...fields.cnft })
|
25
|
+
this.amount = fields.amount
|
26
|
+
this.message = fields.message
|
27
|
+
}
|
28
|
+
|
29
|
+
static layout(property?: string) {
|
30
|
+
return borsh.struct(
|
31
|
+
[
|
32
|
+
types.CnftData.layout("cnft"),
|
33
|
+
borsh.u64("amount"),
|
34
|
+
borsh.str("message"),
|
35
|
+
],
|
36
|
+
property
|
37
|
+
)
|
38
|
+
}
|
39
|
+
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
41
|
+
static fromDecoded(obj: any) {
|
42
|
+
return new PreviousDonationRecord({
|
43
|
+
cnft: types.CnftData.fromDecoded(obj.cnft),
|
44
|
+
amount: obj.amount,
|
45
|
+
message: obj.message,
|
46
|
+
})
|
47
|
+
}
|
48
|
+
|
49
|
+
static toEncodable(fields: PreviousDonationRecordFields) {
|
50
|
+
return {
|
51
|
+
cnft: types.CnftData.toEncodable(fields.cnft),
|
52
|
+
amount: fields.amount,
|
53
|
+
message: fields.message,
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
toJSON(): PreviousDonationRecordJSON {
|
58
|
+
return {
|
59
|
+
cnft: this.cnft.toJSON(),
|
60
|
+
amount: this.amount.toString(),
|
61
|
+
message: this.message,
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
static fromJSON(obj: PreviousDonationRecordJSON): PreviousDonationRecord {
|
66
|
+
return new PreviousDonationRecord({
|
67
|
+
cnft: types.CnftData.fromJSON(obj.cnft),
|
68
|
+
amount: new BN(obj.amount),
|
69
|
+
message: obj.message,
|
70
|
+
})
|
71
|
+
}
|
72
|
+
|
73
|
+
toEncodable() {
|
74
|
+
return PreviousDonationRecord.toEncodable(this)
|
75
|
+
}
|
76
|
+
}
|