@zebec-network/admin-sdk 1.0.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.
Files changed (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +730 -0
  3. package/dist/artifacts/abi/index.d.ts +161 -0
  4. package/dist/artifacts/abi/index.js +7 -0
  5. package/dist/artifacts/abi/token.json +350 -0
  6. package/dist/artifacts/abi/weth.json +153 -0
  7. package/dist/artifacts/abi/zebecCard.json +1229 -0
  8. package/dist/artifacts/index.d.ts +11 -0
  9. package/dist/artifacts/index.js +11 -0
  10. package/dist/artifacts/typechain-types/OdysseyZebecCard.d.ts +559 -0
  11. package/dist/artifacts/typechain-types/OdysseyZebecCard.js +1 -0
  12. package/dist/artifacts/typechain-types/Token.d.ts +149 -0
  13. package/dist/artifacts/typechain-types/Token.js +1 -0
  14. package/dist/artifacts/typechain-types/Weth.d.ts +179 -0
  15. package/dist/artifacts/typechain-types/Weth.js +1 -0
  16. package/dist/artifacts/typechain-types/ZebecCard.d.ts +723 -0
  17. package/dist/artifacts/typechain-types/ZebecCard.js +1 -0
  18. package/dist/artifacts/typechain-types/common.d.ts +50 -0
  19. package/dist/artifacts/typechain-types/common.js +1 -0
  20. package/dist/artifacts/typechain-types/factories/OdysseyZebecCard__factory.d.ts +735 -0
  21. package/dist/artifacts/typechain-types/factories/OdysseyZebecCard__factory.js +959 -0
  22. package/dist/artifacts/typechain-types/factories/Token__factory.d.ts +280 -0
  23. package/dist/artifacts/typechain-types/factories/Token__factory.js +374 -0
  24. package/dist/artifacts/typechain-types/factories/Weth__factory.d.ts +219 -0
  25. package/dist/artifacts/typechain-types/factories/Weth__factory.js +292 -0
  26. package/dist/artifacts/typechain-types/factories/ZebecCard__factory.d.ts +966 -0
  27. package/dist/artifacts/typechain-types/factories/ZebecCard__factory.js +1253 -0
  28. package/dist/artifacts/typechain-types/factories/index.d.ts +4 -0
  29. package/dist/artifacts/typechain-types/factories/index.js +7 -0
  30. package/dist/artifacts/typechain-types/index.d.ts +9 -0
  31. package/dist/artifacts/typechain-types/index.js +8 -0
  32. package/dist/artifacts/zebec_instant_card.d.ts +3683 -0
  33. package/dist/artifacts/zebec_instant_card.js +1 -0
  34. package/dist/artifacts/zebec_instant_card.json +2801 -0
  35. package/dist/artifacts/zebec_proxy_stream.d.ts +1933 -0
  36. package/dist/artifacts/zebec_proxy_stream.js +1 -0
  37. package/dist/artifacts/zebec_proxy_stream.json +1497 -0
  38. package/dist/artifacts/zebec_stake_v1.d.ts +1679 -0
  39. package/dist/artifacts/zebec_stake_v1.js +1 -0
  40. package/dist/artifacts/zebec_stake_v1.json +1255 -0
  41. package/dist/artifacts/zebec_stream.d.ts +1481 -0
  42. package/dist/artifacts/zebec_stream.js +1 -0
  43. package/dist/artifacts/zebec_stream.json +1243 -0
  44. package/dist/constants.d.ts +32 -0
  45. package/dist/constants.js +115 -0
  46. package/dist/index.d.ts +6 -0
  47. package/dist/index.js +6 -0
  48. package/dist/pda.d.ts +23 -0
  49. package/dist/pda.js +125 -0
  50. package/dist/services/evmCardService.d.ts +189 -0
  51. package/dist/services/evmCardService.js +322 -0
  52. package/dist/services/index.d.ts +6 -0
  53. package/dist/services/index.js +6 -0
  54. package/dist/services/proxyStreamService.d.ts +72 -0
  55. package/dist/services/proxyStreamService.js +302 -0
  56. package/dist/services/solanaCardV2Service.d.ts +50 -0
  57. package/dist/services/solanaCardV2Service.js +717 -0
  58. package/dist/services/stakingService.d.ts +39 -0
  59. package/dist/services/stakingService.js +265 -0
  60. package/dist/services/streamServices.d.ts +50 -0
  61. package/dist/services/streamServices.js +322 -0
  62. package/dist/services/suiCardService.d.ts +91 -0
  63. package/dist/services/suiCardService.js +487 -0
  64. package/dist/types.d.ts +433 -0
  65. package/dist/types.js +1 -0
  66. package/dist/utils.d.ts +5 -0
  67. package/dist/utils.js +39 -0
  68. package/package.json +57 -0
@@ -0,0 +1,302 @@
1
+ import anchor, { Program, } from "@coral-xyz/anchor";
2
+ import { createMetadataAccountV3, MPL_TOKEN_METADATA_PROGRAM_ID, updateMetadataAccountV2, } from "@metaplex-foundation/mpl-token-metadata";
3
+ import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";
4
+ import { fromWeb3JsPublicKey, toWeb3JsPublicKey, } from "@metaplex-foundation/umi-web3js-adapters";
5
+ import { AuthorityType, createInitializeMintInstruction, createSetAuthorityInstruction, getMinimumBalanceForRentExemptMint, MINT_SIZE, TOKEN_PROGRAM_ID, } from "@solana/spl-token";
6
+ import { AddressLookupTableAccount, Connection, Keypair, PublicKey, SystemProgram, } from "@solana/web3.js";
7
+ import { bpsToPercent, percentToBps } from "@zebec-network/core-utils";
8
+ import { TransactionPayload, } from "@zebec-network/solana-common";
9
+ import BN from "bn.js";
10
+ import { ZEBEC_PROXY_STREAM_IDL, ZEBEC_STREAM_IDL, } from "../artifacts/index.js";
11
+ import { STREAM_PROGRAM_LOOKUP_TABLE_ADDRESS } from "../constants.js";
12
+ import { deriveMintAuthorityPda, deriveProxyConfigPda, deriveStreamConfigPda, } from "../pda.js";
13
+ const { translateAddress, AnchorProvider } = anchor;
14
+ export class ProxyStreamAdminService {
15
+ provider;
16
+ proxyStreamProgram;
17
+ streamProgram;
18
+ network;
19
+ constructor(provider, proxyStreamProgram, streamProgram, network) {
20
+ this.provider = provider;
21
+ this.proxyStreamProgram = proxyStreamProgram;
22
+ this.streamProgram = streamProgram;
23
+ this.network = network;
24
+ }
25
+ static create(provider, network) {
26
+ const proxyStreamProgram = new Program(ZEBEC_PROXY_STREAM_IDL, provider);
27
+ const streamProgram = new Program(ZEBEC_STREAM_IDL, provider);
28
+ return new ProxyStreamAdminService(provider, proxyStreamProgram, streamProgram, network);
29
+ }
30
+ async _createTransactionPayload(payerKey, instructions, signers, addressLookupTableAccounts) {
31
+ const errorMap = new Map();
32
+ this.proxyStreamProgram.idl.errors.map((error) => errorMap.set(error.code, error.msg));
33
+ let signTransaction;
34
+ const provider = this.provider;
35
+ if (provider instanceof AnchorProvider) {
36
+ signTransaction = async (tx) => {
37
+ return provider.wallet.signTransaction(tx);
38
+ };
39
+ }
40
+ return new TransactionPayload(this.provider.connection, errorMap, {
41
+ instructions,
42
+ feePayer: payerKey,
43
+ signers: signers ?? [],
44
+ addressLookupTableAccounts: addressLookupTableAccounts ?? [],
45
+ }, signTransaction);
46
+ }
47
+ get proxyStreamProgramId() {
48
+ return this.proxyStreamProgram.programId;
49
+ }
50
+ get streamProgramId() {
51
+ return this.streamProgram.programId;
52
+ }
53
+ get connection() {
54
+ return this.provider.connection;
55
+ }
56
+ async getInitProxyConfigInstruction(admin, feeVault, mintAuthority, proxyConfig, data) {
57
+ return this.proxyStreamProgram.methods
58
+ .initProxyConfig({
59
+ chainId: data.chainId,
60
+ fee: data.fee,
61
+ minAmount: data.minAmount,
62
+ })
63
+ .accountsPartial({
64
+ feeVault,
65
+ admin,
66
+ mintAuthority,
67
+ proxyConfig,
68
+ })
69
+ .instruction();
70
+ }
71
+ async initProxyConfig(params) {
72
+ const admin = translateAddress(params.admin);
73
+ const feeVault = translateAddress(params.feeVault);
74
+ const [mintAuthority] = deriveMintAuthorityPda(this.proxyStreamProgramId);
75
+ const proxyConfigPda = deriveProxyConfigPda(params.chainId, this.proxyStreamProgramId);
76
+ const [proxyConfig] = proxyConfigPda;
77
+ const fee = Number(percentToBps(params.fee));
78
+ const minAmount = new BN(params.minAmount);
79
+ const ix = await this.getInitProxyConfigInstruction(admin, feeVault, mintAuthority, proxyConfig, {
80
+ chainId: params.chainId,
81
+ fee,
82
+ minAmount,
83
+ });
84
+ return this._createTransactionPayload(admin, [ix]);
85
+ }
86
+ async getUpdateProxyConfigInstruction(admin, proxyConfig, data) {
87
+ return this.proxyStreamProgram.methods
88
+ .updateProxy({
89
+ fee: data.fee,
90
+ newAdmin: data.newAdmin,
91
+ })
92
+ .accountsPartial({
93
+ proxyAdmin: admin,
94
+ proxyConfig,
95
+ })
96
+ .instruction();
97
+ }
98
+ async updateProxyConfig(params) {
99
+ const admin = translateAddress(params.admin);
100
+ const newAdmin = translateAddress(params.newAdmin);
101
+ const [proxyConfig] = deriveProxyConfigPda(params.chainId, this.proxyStreamProgramId);
102
+ const fee = Number(percentToBps(params.fee));
103
+ const ix = await this.getUpdateProxyConfigInstruction(admin, proxyConfig, {
104
+ fee,
105
+ newAdmin,
106
+ });
107
+ return this._createTransactionPayload(admin, [ix]);
108
+ }
109
+ async getSetMintableTokensInstruction(admin, proxyConfig, data) {
110
+ return this.proxyStreamProgram.methods
111
+ .setMintableTokens({
112
+ tokens: data.tokens,
113
+ })
114
+ .accountsPartial({
115
+ proxyAdmin: admin,
116
+ proxyConfig,
117
+ })
118
+ .instruction();
119
+ }
120
+ async getWhitelistTokensInstruction(admin, streamConfig, data) {
121
+ return this.streamProgram.methods
122
+ .whitelistTokens({ tokens: data.tokens })
123
+ .accountsPartial({ admin, streamConfig })
124
+ .instruction();
125
+ }
126
+ async createToken(params) {
127
+ const { tokenInfo } = params;
128
+ const connection = new Connection(this.connection.rpcEndpoint, this.connection.commitment);
129
+ const lamports = await getMinimumBalanceForRentExemptMint(connection);
130
+ const mintKeypair = tokenInfo.mintKeypair ?? Keypair.generate();
131
+ const mint = mintKeypair.publicKey;
132
+ const admin = translateAddress(params.admin);
133
+ const mintAuthority = admin;
134
+ const updateAuthority = admin;
135
+ const [newMintAuthority] = deriveMintAuthorityPda(this.proxyStreamProgramId);
136
+ const umi = createUmi(this.connection.rpcEndpoint);
137
+ const mplProgramId = toWeb3JsPublicKey(MPL_TOKEN_METADATA_PROGRAM_ID);
138
+ const [metadata] = PublicKey.findProgramAddressSync([Buffer.from("metadata"), mplProgramId.toBytes(), mint.toBytes()], mplProgramId);
139
+ const args = {
140
+ data: {
141
+ name: tokenInfo.tokenName,
142
+ symbol: tokenInfo.symbol,
143
+ uri: tokenInfo.metadataUri,
144
+ sellerFeeBasisPoints: 0,
145
+ collection: null,
146
+ creators: null,
147
+ uses: null,
148
+ },
149
+ isMutable: true,
150
+ collectionDetails: null,
151
+ };
152
+ // just a work around to create a umi signer from web3Js PublicKey
153
+ // as umi expects a Signer object. only publicKey is used, so others are null.
154
+ // biome-ignore lint/suspicious/noExplicitAny: see above
155
+ const mintAuthoritySigner = {
156
+ publicKey: fromWeb3JsPublicKey(mintAuthority),
157
+ signTransaction: null,
158
+ signMessage: null,
159
+ signAllTransactions: null,
160
+ };
161
+ const accounts = {
162
+ metadata: fromWeb3JsPublicKey(metadata),
163
+ mint: fromWeb3JsPublicKey(mint),
164
+ payer: mintAuthoritySigner,
165
+ mintAuthority: mintAuthoritySigner,
166
+ updateAuthority: fromWeb3JsPublicKey(updateAuthority),
167
+ };
168
+ const metadataBuilder = createMetadataAccountV3(umi, {
169
+ ...accounts,
170
+ ...args,
171
+ });
172
+ const ix = metadataBuilder.getInstructions()[0];
173
+ if (!ix) {
174
+ throw new Error("Failed to create metadata instruction");
175
+ }
176
+ const createMetadataInstruction = {
177
+ keys: ix.keys.map((key) => {
178
+ return {
179
+ ...key,
180
+ pubkey: toWeb3JsPublicKey(key.pubkey),
181
+ };
182
+ }),
183
+ data: Buffer.from(ix.data),
184
+ programId: toWeb3JsPublicKey(ix.programId),
185
+ };
186
+ const [proxyConfigPda] = deriveProxyConfigPda(params.chainId, this.proxyStreamProgramId);
187
+ const setMintableTokenIx = await this.getSetMintableTokensInstruction(admin, proxyConfigPda, {
188
+ tokens: [mint],
189
+ });
190
+ const [streamConfig] = deriveStreamConfigPda(params.streamConfigName, this.streamProgramId);
191
+ const whiteListTokensIx = await this.getWhitelistTokensInstruction(admin, streamConfig, { tokens: [mint] });
192
+ const ixs = [
193
+ SystemProgram.createAccount({
194
+ fromPubkey: mintAuthority,
195
+ newAccountPubkey: mint,
196
+ space: MINT_SIZE,
197
+ lamports: lamports,
198
+ programId: TOKEN_PROGRAM_ID,
199
+ }),
200
+ createInitializeMintInstruction(mint, tokenInfo.decimals, mintAuthority, null, TOKEN_PROGRAM_ID),
201
+ createMetadataInstruction,
202
+ createSetAuthorityInstruction(mint, mintAuthority, AuthorityType.MintTokens, // authority type
203
+ newMintAuthority),
204
+ setMintableTokenIx,
205
+ whiteListTokensIx,
206
+ ];
207
+ const addressLookupTableAccount = await this.connection
208
+ .getAccountInfo(translateAddress(STREAM_PROGRAM_LOOKUP_TABLE_ADDRESS[this.network]))
209
+ .then((accountInfo) => {
210
+ if (!accountInfo) {
211
+ throw new Error(`Address lookup table for ${STREAM_PROGRAM_LOOKUP_TABLE_ADDRESS[this.network]} account not found`);
212
+ }
213
+ return new AddressLookupTableAccount({
214
+ key: translateAddress(STREAM_PROGRAM_LOOKUP_TABLE_ADDRESS[this.network]),
215
+ state: AddressLookupTableAccount.deserialize(accountInfo.data),
216
+ });
217
+ });
218
+ return this._createTransactionPayload(admin, ixs, [mintKeypair], [addressLookupTableAccount]);
219
+ }
220
+ async updateZTokenMetadata(params) {
221
+ const { tokenInfo } = params;
222
+ const admin = translateAddress(params.admin);
223
+ const mint = translateAddress(params.mint);
224
+ const updateAuthority = admin;
225
+ const umi = createUmi(this.connection.rpcEndpoint);
226
+ const mplProgramId = toWeb3JsPublicKey(MPL_TOKEN_METADATA_PROGRAM_ID);
227
+ const [metadata] = PublicKey.findProgramAddressSync([Buffer.from("metadata"), mplProgramId.toBytes(), mint.toBytes()], mplProgramId);
228
+ const args = {
229
+ data: {
230
+ name: tokenInfo.tokenName,
231
+ symbol: tokenInfo.symbol,
232
+ uri: tokenInfo.metadataUri,
233
+ sellerFeeBasisPoints: 0,
234
+ collection: null,
235
+ creators: null,
236
+ uses: null,
237
+ },
238
+ isMutable: true,
239
+ newUpdateAuthority: fromWeb3JsPublicKey(updateAuthority),
240
+ primarySaleHappened: null,
241
+ };
242
+ // just a work around to create a umi signer from web3Js PublicKey
243
+ // as umi expects a Signer object. only publicKey is used, so others are null.
244
+ // biome-ignore lint/suspicious/noExplicitAny: see above
245
+ const updateAuthoritySigner = {
246
+ publicKey: fromWeb3JsPublicKey(updateAuthority),
247
+ signTransaction: null,
248
+ signMessage: null,
249
+ signAllTransactions: null,
250
+ };
251
+ const accounts = {
252
+ metadata: fromWeb3JsPublicKey(metadata),
253
+ updateAuthority: updateAuthoritySigner,
254
+ };
255
+ const metadataBuilder = updateMetadataAccountV2(umi, {
256
+ ...accounts,
257
+ ...args,
258
+ });
259
+ const ix = metadataBuilder.getInstructions()[0];
260
+ if (!ix) {
261
+ throw new Error("Failed to create update metadata instruction");
262
+ }
263
+ const updateMetadataInstruction = {
264
+ keys: ix.keys.map((key) => {
265
+ return {
266
+ ...key,
267
+ pubkey: toWeb3JsPublicKey(key.pubkey),
268
+ };
269
+ }),
270
+ data: Buffer.from(ix.data),
271
+ programId: toWeb3JsPublicKey(ix.programId),
272
+ };
273
+ return this._createTransactionPayload(admin, [updateMetadataInstruction]);
274
+ }
275
+ async getEmergencyPauseInstruction(admin) {
276
+ return this.proxyStreamProgram.methods
277
+ .emergencyPause()
278
+ .accounts({
279
+ proxyAdmin: admin,
280
+ })
281
+ .instruction();
282
+ }
283
+ async emergencyPause(params) {
284
+ const admin = translateAddress(params.admin);
285
+ const ix = await this.getEmergencyPauseInstruction(admin);
286
+ return this._createTransactionPayload(admin, [ix]);
287
+ }
288
+ async getProxyConfig(chainId) {
289
+ const [proxyConfig] = deriveProxyConfigPda(chainId, this.proxyStreamProgramId);
290
+ const proxyConfigAccount = await this.proxyStreamProgram.account.proxyConfig.fetch(proxyConfig);
291
+ return {
292
+ address: proxyConfig,
293
+ fee: bpsToPercent(proxyConfigAccount.fee.toString()),
294
+ minAmount: proxyConfigAccount.minAmount.toString(),
295
+ proxyAdmin: proxyConfigAccount.proxyAdmin,
296
+ mintableTokens: proxyConfigAccount.mintableTokens,
297
+ feeVault: proxyConfigAccount.feeVault,
298
+ emergencyPaused: proxyConfigAccount.emergencyPause,
299
+ chainId: proxyConfigAccount.chainId,
300
+ };
301
+ }
302
+ }
@@ -0,0 +1,50 @@
1
+ import { type Address, Program, type Provider } from "@coral-xyz/anchor";
2
+ import type { Connection, PublicKey, TransactionInstruction } from "@solana/web3.js";
3
+ import { TransactionPayload } from "@zebec-network/solana-common";
4
+ import { type ZebecCardV2Idl } from "../artifacts/index.js";
5
+ import type { CardConfigInfo, CardPurchaseInfo, DeleteCustomFeesParams, DeletePartnerCustomFeesInstructionData, DeletePartnerCustomFeesParams, InitCardConfigInstructionData, InitCardConfigParams, InitPartnerCardConfigInstructionData, InitPartnerCardConfigParams, ParsedTokenFeeRecord, PartnerCardConfigInfo, SetCardConfigInstructionData, SetCardConfigParams, SetCustomFeesParams, SetPartnerCardConfigInstructionData, SetPartnerCardConfigParams, SetPartnerCustomFeesParams, TokenFeeRecord, UserPurchaseRecordInfo } from "../types.js";
6
+ export declare class ZebecSolanaCardV2AdminService {
7
+ readonly provider: Provider;
8
+ readonly network: "mainnet-beta" | "devnet";
9
+ readonly program: Program<ZebecCardV2Idl>;
10
+ constructor(provider: Provider, network: "mainnet-beta" | "devnet", program: Program<ZebecCardV2Idl>);
11
+ static create(provider: Provider, network: "mainnet-beta" | "devnet"): ZebecSolanaCardV2AdminService;
12
+ private _createPayload;
13
+ get connection(): Connection;
14
+ get programId(): PublicKey;
15
+ getInitCardConfigsInstruction(usdcToken: PublicKey, zicOwner: PublicKey, data: InitCardConfigInstructionData): Promise<TransactionInstruction>;
16
+ getSetCardConfigsInstruction(zicOwner: PublicKey, data: SetCardConfigInstructionData): Promise<TransactionInstruction>;
17
+ getSetCustomFeesInstruction(zicOwner: PublicKey, tokenFeeList: ParsedTokenFeeRecord[]): Promise<TransactionInstruction>;
18
+ getDeleteCustomFeesInstruction(zicOwner: PublicKey, tokenList: PublicKey[]): Promise<TransactionInstruction>;
19
+ initCardConfig(params: InitCardConfigParams): Promise<TransactionPayload>;
20
+ setCardConfig(params: SetCardConfigParams): Promise<TransactionPayload>;
21
+ setCustomFees(params: SetCustomFeesParams): Promise<TransactionPayload>;
22
+ deleteCustomFees(params: DeleteCustomFeesParams): Promise<TransactionPayload>;
23
+ getCardConfigInfo(): Promise<CardConfigInfo>;
24
+ getCardPurchaseInfo(cardPurchasePda: Address): Promise<CardPurchaseInfo>;
25
+ getUserPurchaseRecord(userPurchaseRecordPda: Address): Promise<UserPurchaseRecordInfo>;
26
+ getCustomTokenFees(): Promise<TokenFeeRecord[]>;
27
+ }
28
+ export declare class ZebecSolanaPartnerAdminCardService {
29
+ readonly partnershipName: string;
30
+ readonly provider: Provider;
31
+ readonly network: "mainnet-beta" | "devnet";
32
+ readonly program: Program<ZebecCardV2Idl>;
33
+ constructor(partnershipName: string, provider: Provider, network: "mainnet-beta" | "devnet", program: Program<ZebecCardV2Idl>);
34
+ static create(partnershipName: string, provider: Provider, network: "mainnet-beta" | "devnet"): ZebecSolanaPartnerAdminCardService;
35
+ private _createPayload;
36
+ get connection(): Connection;
37
+ get programId(): PublicKey;
38
+ getInitPartnerCardConfigsInstruction(usdcToken: PublicKey, zicOwner: PublicKey, data: InitPartnerCardConfigInstructionData): Promise<TransactionInstruction>;
39
+ getSetPartnerCardConfigsInstruction(zicOwner: PublicKey, data: SetPartnerCardConfigInstructionData): Promise<TransactionInstruction>;
40
+ getSetPartnerCustomFeesInstruction(zicOwner: PublicKey, partnershipName: string, tokenFeeList: ParsedTokenFeeRecord[]): Promise<TransactionInstruction>;
41
+ getDeletePartnerCustomFeesInstruction(zicOwner: PublicKey, data: DeletePartnerCustomFeesInstructionData): Promise<TransactionInstruction>;
42
+ initPartnerCardConfig(params: InitPartnerCardConfigParams): Promise<TransactionPayload>;
43
+ setPartnerCardConfig(params: SetPartnerCardConfigParams): Promise<TransactionPayload>;
44
+ setPartnerCustomFees(params: SetPartnerCustomFeesParams): Promise<TransactionPayload>;
45
+ deletePartnerCustomFees(params: DeletePartnerCustomFeesParams): Promise<TransactionPayload>;
46
+ getPartnerCardConfigInfo(): Promise<PartnerCardConfigInfo>;
47
+ getPartnerCustomTokenFees(): Promise<TokenFeeRecord[]>;
48
+ getCardPurchaseInfo(cardPurchasePda: Address): Promise<CardPurchaseInfo>;
49
+ getPartnerUserPurchaseRecord(userPurchaseRecordPda: Address): Promise<UserPurchaseRecordInfo>;
50
+ }