@pbpcanada/projectdam-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.
- package/README.md +304 -0
- package/dist/accounts.d.ts +71 -0
- package/dist/accounts.d.ts.map +1 -0
- package/dist/accounts.js +286 -0
- package/dist/accounts.js.map +1 -0
- package/dist/constants.d.ts +35 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +35 -0
- package/dist/constants.js.map +1 -0
- package/dist/idl.d.ts +587 -0
- package/dist/idl.d.ts.map +1 -0
- package/dist/idl.js +922 -0
- package/dist/idl.js.map +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +164 -0
- package/dist/index.js.map +1 -0
- package/dist/instructions.d.ts +35 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +299 -0
- package/dist/instructions.js.map +1 -0
- package/dist/pda.d.ts +81 -0
- package/dist/pda.d.ts.map +1 -0
- package/dist/pda.js +119 -0
- package/dist/pda.js.map +1 -0
- package/dist/types.d.ts +152 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +22 -0
- package/dist/types.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
|
2
|
+
/**
|
|
3
|
+
* Program IDs for ProjectDAM
|
|
4
|
+
*/
|
|
5
|
+
export declare const PROGRAM_IDS: {
|
|
6
|
+
/** ProjectDAM Program ID on Mainnet */
|
|
7
|
+
readonly MAINNET: PublicKey;
|
|
8
|
+
/** ProjectDAM Program ID on Devnet */
|
|
9
|
+
readonly DEVNET: PublicKey;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Default program ID (mainnet)
|
|
13
|
+
*/
|
|
14
|
+
export declare const PROGRAM_ID: PublicKey;
|
|
15
|
+
/**
|
|
16
|
+
* Token Program IDs
|
|
17
|
+
*/
|
|
18
|
+
export declare const TOKEN_PROGRAM_ID: PublicKey;
|
|
19
|
+
export declare const ASSOCIATED_TOKEN_PROGRAM_ID: PublicKey;
|
|
20
|
+
/**
|
|
21
|
+
* Metaplex Program IDs
|
|
22
|
+
*/
|
|
23
|
+
export declare const METAPLEX_PROGRAM_ID: PublicKey;
|
|
24
|
+
export declare const MPL_CORE_PROGRAM_ID: PublicKey;
|
|
25
|
+
/**
|
|
26
|
+
* System Program ID
|
|
27
|
+
*/
|
|
28
|
+
export declare const SYSTEM_PROGRAM_ID: PublicKey;
|
|
29
|
+
/**
|
|
30
|
+
* Constants for calculations
|
|
31
|
+
*/
|
|
32
|
+
export declare const LAMPORTS_PER_SOL = 1000000000;
|
|
33
|
+
export declare const BASIS_POINTS_PER_PERCENT = 100;
|
|
34
|
+
export declare const MAX_SPREAD_BPS = 100;
|
|
35
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,WAAW;IACtB,uCAAuC;;IAEvC,sCAAsC;;CAE9B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU,WAAsB,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,gBAAgB,WAA+D,CAAC;AAC7F,eAAO,MAAM,2BAA2B,WAAgE,CAAC;AAEzG;;GAEG;AACH,eAAO,MAAM,mBAAmB,WAA+D,CAAC;AAChG,eAAO,MAAM,mBAAmB,WAAgE,CAAC;AAEjG;;GAEG;AACH,eAAO,MAAM,iBAAiB,WAAoD,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,gBAAgB,aAAgB,CAAC;AAC9C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,cAAc,MAAM,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
|
2
|
+
/**
|
|
3
|
+
* Program IDs for ProjectDAM
|
|
4
|
+
*/
|
|
5
|
+
export const PROGRAM_IDS = {
|
|
6
|
+
/** ProjectDAM Program ID on Mainnet */
|
|
7
|
+
MAINNET: new PublicKey('DAmKEbaRoFMKRqdYb6zSrfYvH7Zyx1VLBoixKenii25e'),
|
|
8
|
+
/** ProjectDAM Program ID on Devnet */
|
|
9
|
+
DEVNET: new PublicKey('GyX8E52YsmuaojfbhGo6Y5ey8Qg31nbkvYUydEtfY4Ci'),
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Default program ID (mainnet)
|
|
13
|
+
*/
|
|
14
|
+
export const PROGRAM_ID = PROGRAM_IDS.MAINNET;
|
|
15
|
+
/**
|
|
16
|
+
* Token Program IDs
|
|
17
|
+
*/
|
|
18
|
+
export const TOKEN_PROGRAM_ID = new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
|
|
19
|
+
export const ASSOCIATED_TOKEN_PROGRAM_ID = new PublicKey('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');
|
|
20
|
+
/**
|
|
21
|
+
* Metaplex Program IDs
|
|
22
|
+
*/
|
|
23
|
+
export const METAPLEX_PROGRAM_ID = new PublicKey('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s');
|
|
24
|
+
export const MPL_CORE_PROGRAM_ID = new PublicKey('CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d');
|
|
25
|
+
/**
|
|
26
|
+
* System Program ID
|
|
27
|
+
*/
|
|
28
|
+
export const SYSTEM_PROGRAM_ID = new PublicKey('11111111111111111111111111111112');
|
|
29
|
+
/**
|
|
30
|
+
* Constants for calculations
|
|
31
|
+
*/
|
|
32
|
+
export const LAMPORTS_PER_SOL = 1_000_000_000;
|
|
33
|
+
export const BASIS_POINTS_PER_PERCENT = 100;
|
|
34
|
+
export const MAX_SPREAD_BPS = 100; // 1%
|
|
35
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,uCAAuC;IACvC,OAAO,EAAE,IAAI,SAAS,CAAC,8CAA8C,CAAC;IACtE,sCAAsC;IACtC,MAAM,EAAE,IAAI,SAAS,CAAC,8CAA8C,CAAC;CAC7D,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;AAC7F,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,SAAS,CAAC,8CAA8C,CAAC,CAAC;AAEzG;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;AAChG,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,SAAS,CAAC,8CAA8C,CAAC,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,SAAS,CAAC,kCAAkC,CAAC,CAAC;AAEnF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAC9C,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC,CAAC,KAAK"}
|
package/dist/idl.d.ts
ADDED
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProjectDAM Protocol IDL
|
|
3
|
+
* This IDL defines the program interface for the ProjectDAM NFT AMM
|
|
4
|
+
*/
|
|
5
|
+
export declare const DAM_PROTOCOL_IDL: {
|
|
6
|
+
readonly accounts: readonly [{
|
|
7
|
+
readonly discriminator: readonly [155, 12, 170, 224, 30, 250, 204, 130];
|
|
8
|
+
readonly name: "Config";
|
|
9
|
+
}, {
|
|
10
|
+
readonly discriminator: readonly [241, 154, 109, 4, 17, 177, 109, 188];
|
|
11
|
+
readonly name: "Pool";
|
|
12
|
+
}, {
|
|
13
|
+
readonly discriminator: readonly [45, 198, 65, 11, 29, 13, 209, 1];
|
|
14
|
+
readonly name: "PoolNft";
|
|
15
|
+
}];
|
|
16
|
+
readonly address: "GyX8E52YsmuaojfbhGo6Y5ey8Qg31nbkvYUydEtfY4Ci";
|
|
17
|
+
readonly errors: readonly [{
|
|
18
|
+
readonly code: 6000;
|
|
19
|
+
readonly msg: "Invalid price: must be greater than 0";
|
|
20
|
+
readonly name: "InvalidPrice";
|
|
21
|
+
}, {
|
|
22
|
+
readonly code: 6001;
|
|
23
|
+
readonly msg: "Spread too high: maximum 1% (100 bps)";
|
|
24
|
+
readonly name: "SpreadTooHigh";
|
|
25
|
+
}, {
|
|
26
|
+
readonly code: 6002;
|
|
27
|
+
readonly msg: "Pool is inactive";
|
|
28
|
+
readonly name: "PoolInactive";
|
|
29
|
+
}, {
|
|
30
|
+
readonly code: 6003;
|
|
31
|
+
readonly msg: "Protocol is paused";
|
|
32
|
+
readonly name: "ProtocolPaused";
|
|
33
|
+
}, {
|
|
34
|
+
readonly code: 6004;
|
|
35
|
+
readonly msg: "Unauthorized: not pool owner";
|
|
36
|
+
readonly name: "Unauthorized";
|
|
37
|
+
}, {
|
|
38
|
+
readonly code: 6005;
|
|
39
|
+
readonly msg: "Slippage exceeded: price moved beyond limit";
|
|
40
|
+
readonly name: "SlippageExceeded";
|
|
41
|
+
}, {
|
|
42
|
+
readonly code: 6006;
|
|
43
|
+
readonly msg: "Pool type does not support buying NFTs";
|
|
44
|
+
readonly name: "PoolCantBuy";
|
|
45
|
+
}, {
|
|
46
|
+
readonly code: 6007;
|
|
47
|
+
readonly msg: "Insufficient SOL liquidity in pool";
|
|
48
|
+
readonly name: "InsufficientLiquidity";
|
|
49
|
+
}, {
|
|
50
|
+
readonly code: 6008;
|
|
51
|
+
readonly msg: "Invalid amount";
|
|
52
|
+
readonly name: "InvalidAmount";
|
|
53
|
+
}, {
|
|
54
|
+
readonly code: 6009;
|
|
55
|
+
readonly msg: "Invalid collection: NFT does not belong to pool collection";
|
|
56
|
+
readonly name: "InvalidCollection";
|
|
57
|
+
}, {
|
|
58
|
+
readonly code: 6010;
|
|
59
|
+
readonly msg: "Math overflow";
|
|
60
|
+
readonly name: "MathOverflow";
|
|
61
|
+
}];
|
|
62
|
+
readonly events: readonly [{
|
|
63
|
+
readonly discriminator: readonly [218, 177, 248, 106, 85, 103, 233, 63];
|
|
64
|
+
readonly name: "TradeEvent";
|
|
65
|
+
}, {
|
|
66
|
+
readonly discriminator: readonly [78, 100, 12, 227, 55, 120, 11, 201];
|
|
67
|
+
readonly name: "PoolCreatedEvent";
|
|
68
|
+
}];
|
|
69
|
+
readonly instructions: readonly [{
|
|
70
|
+
readonly accounts: readonly [{
|
|
71
|
+
readonly name: "config";
|
|
72
|
+
readonly writable: true;
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "authority";
|
|
75
|
+
readonly signer: true;
|
|
76
|
+
readonly writable: true;
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "systemProgram";
|
|
79
|
+
}];
|
|
80
|
+
readonly args: readonly [{
|
|
81
|
+
readonly name: "feeTreasury";
|
|
82
|
+
readonly type: "pubkey";
|
|
83
|
+
}, {
|
|
84
|
+
readonly name: "pbpBuybackWallet";
|
|
85
|
+
readonly type: "pubkey";
|
|
86
|
+
}];
|
|
87
|
+
readonly discriminator: readonly [208, 127, 21, 1, 194, 190, 196, 70];
|
|
88
|
+
readonly name: "initialize_config";
|
|
89
|
+
}, {
|
|
90
|
+
readonly accounts: readonly [{
|
|
91
|
+
readonly name: "pool";
|
|
92
|
+
readonly writable: true;
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "config";
|
|
95
|
+
readonly writable: true;
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "collectionMint";
|
|
98
|
+
}, {
|
|
99
|
+
readonly name: "owner";
|
|
100
|
+
readonly signer: true;
|
|
101
|
+
readonly writable: true;
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "systemProgram";
|
|
104
|
+
}];
|
|
105
|
+
readonly args: readonly [{
|
|
106
|
+
readonly name: "uuid";
|
|
107
|
+
readonly type: {
|
|
108
|
+
readonly array: readonly ["u8", 6];
|
|
109
|
+
};
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "curveType";
|
|
112
|
+
readonly type: {
|
|
113
|
+
readonly defined: {
|
|
114
|
+
readonly name: "CurveType";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "spotPrice";
|
|
119
|
+
readonly type: "u64";
|
|
120
|
+
}, {
|
|
121
|
+
readonly name: "spreadBps";
|
|
122
|
+
readonly type: "u16";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "poolType";
|
|
125
|
+
readonly type: {
|
|
126
|
+
readonly defined: {
|
|
127
|
+
readonly name: "PoolType";
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
}];
|
|
131
|
+
readonly discriminator: readonly [233, 146, 209, 142, 207, 104, 64, 188];
|
|
132
|
+
readonly name: "create_pool";
|
|
133
|
+
}, {
|
|
134
|
+
readonly accounts: readonly [{
|
|
135
|
+
readonly name: "pool";
|
|
136
|
+
readonly writable: true;
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "poolNft";
|
|
139
|
+
readonly writable: true;
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "config";
|
|
142
|
+
readonly writable: true;
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "collectionMint";
|
|
145
|
+
}, {
|
|
146
|
+
readonly name: "nftMint";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "ownerNftAccount";
|
|
149
|
+
readonly writable: true;
|
|
150
|
+
}, {
|
|
151
|
+
readonly name: "poolNftAccount";
|
|
152
|
+
readonly writable: true;
|
|
153
|
+
}, {
|
|
154
|
+
readonly name: "owner";
|
|
155
|
+
readonly signer: true;
|
|
156
|
+
readonly writable: true;
|
|
157
|
+
}, {
|
|
158
|
+
readonly name: "tokenProgram";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "associatedTokenProgram";
|
|
161
|
+
}, {
|
|
162
|
+
readonly name: "systemProgram";
|
|
163
|
+
}];
|
|
164
|
+
readonly args: readonly [{
|
|
165
|
+
readonly name: "uuid";
|
|
166
|
+
readonly type: {
|
|
167
|
+
readonly array: readonly ["u8", 6];
|
|
168
|
+
};
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "price";
|
|
171
|
+
readonly type: "u64";
|
|
172
|
+
}];
|
|
173
|
+
readonly discriminator: readonly [54, 174, 193, 67, 17, 41, 132, 38];
|
|
174
|
+
readonly name: "list";
|
|
175
|
+
}, {
|
|
176
|
+
readonly accounts: readonly [{
|
|
177
|
+
readonly name: "pool";
|
|
178
|
+
readonly writable: true;
|
|
179
|
+
}, {
|
|
180
|
+
readonly name: "config";
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "poolNft";
|
|
183
|
+
readonly writable: true;
|
|
184
|
+
}, {
|
|
185
|
+
readonly name: "nftMetadata";
|
|
186
|
+
}, {
|
|
187
|
+
readonly name: "nftMint";
|
|
188
|
+
}, {
|
|
189
|
+
readonly name: "poolNftAccount";
|
|
190
|
+
readonly writable: true;
|
|
191
|
+
}, {
|
|
192
|
+
readonly name: "buyerNftAccount";
|
|
193
|
+
readonly writable: true;
|
|
194
|
+
}, {
|
|
195
|
+
readonly name: "poolOwner";
|
|
196
|
+
readonly writable: true;
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "feeBuffer";
|
|
199
|
+
readonly writable: true;
|
|
200
|
+
}, {
|
|
201
|
+
readonly name: "creatorWallet";
|
|
202
|
+
readonly writable: true;
|
|
203
|
+
}, {
|
|
204
|
+
readonly name: "buyer";
|
|
205
|
+
readonly signer: true;
|
|
206
|
+
readonly writable: true;
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "tokenProgram";
|
|
209
|
+
}, {
|
|
210
|
+
readonly name: "associatedTokenProgram";
|
|
211
|
+
}, {
|
|
212
|
+
readonly name: "systemProgram";
|
|
213
|
+
}];
|
|
214
|
+
readonly args: readonly [{
|
|
215
|
+
readonly name: "maxPrice";
|
|
216
|
+
readonly type: "u64";
|
|
217
|
+
}, {
|
|
218
|
+
readonly name: "royaltyBps";
|
|
219
|
+
readonly type: "u16";
|
|
220
|
+
}];
|
|
221
|
+
readonly discriminator: readonly [102, 6, 61, 18, 1, 218, 235, 234];
|
|
222
|
+
readonly name: "buy";
|
|
223
|
+
}, {
|
|
224
|
+
readonly accounts: readonly [{
|
|
225
|
+
readonly name: "pool";
|
|
226
|
+
readonly writable: true;
|
|
227
|
+
}, {
|
|
228
|
+
readonly name: "config";
|
|
229
|
+
}, {
|
|
230
|
+
readonly name: "nftMetadata";
|
|
231
|
+
}, {
|
|
232
|
+
readonly name: "nftMint";
|
|
233
|
+
}, {
|
|
234
|
+
readonly name: "sellerNftAccount";
|
|
235
|
+
readonly writable: true;
|
|
236
|
+
}, {
|
|
237
|
+
readonly name: "poolNftAccount";
|
|
238
|
+
readonly writable: true;
|
|
239
|
+
}, {
|
|
240
|
+
readonly name: "solVault";
|
|
241
|
+
readonly writable: true;
|
|
242
|
+
}, {
|
|
243
|
+
readonly name: "feeBuffer";
|
|
244
|
+
readonly writable: true;
|
|
245
|
+
}, {
|
|
246
|
+
readonly name: "creatorWallet";
|
|
247
|
+
readonly writable: true;
|
|
248
|
+
}, {
|
|
249
|
+
readonly name: "seller";
|
|
250
|
+
readonly signer: true;
|
|
251
|
+
readonly writable: true;
|
|
252
|
+
}, {
|
|
253
|
+
readonly name: "tokenProgram";
|
|
254
|
+
}, {
|
|
255
|
+
readonly name: "associatedTokenProgram";
|
|
256
|
+
}, {
|
|
257
|
+
readonly name: "systemProgram";
|
|
258
|
+
}];
|
|
259
|
+
readonly args: readonly [{
|
|
260
|
+
readonly name: "minPrice";
|
|
261
|
+
readonly type: "u64";
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "royaltyBps";
|
|
264
|
+
readonly type: "u16";
|
|
265
|
+
}];
|
|
266
|
+
readonly discriminator: readonly [51, 230, 133, 164, 1, 127, 131, 173];
|
|
267
|
+
readonly name: "sell";
|
|
268
|
+
}, {
|
|
269
|
+
readonly accounts: readonly [{
|
|
270
|
+
readonly name: "pool";
|
|
271
|
+
readonly writable: true;
|
|
272
|
+
}, {
|
|
273
|
+
readonly name: "poolNft";
|
|
274
|
+
readonly writable: true;
|
|
275
|
+
}, {
|
|
276
|
+
readonly name: "nftMint";
|
|
277
|
+
}, {
|
|
278
|
+
readonly name: "ownerNftAccount";
|
|
279
|
+
readonly writable: true;
|
|
280
|
+
}, {
|
|
281
|
+
readonly name: "poolNftAccount";
|
|
282
|
+
readonly writable: true;
|
|
283
|
+
}, {
|
|
284
|
+
readonly name: "owner";
|
|
285
|
+
readonly signer: true;
|
|
286
|
+
readonly writable: true;
|
|
287
|
+
}, {
|
|
288
|
+
readonly name: "tokenProgram";
|
|
289
|
+
}, {
|
|
290
|
+
readonly name: "associatedTokenProgram";
|
|
291
|
+
}, {
|
|
292
|
+
readonly name: "systemProgram";
|
|
293
|
+
}];
|
|
294
|
+
readonly args: readonly [];
|
|
295
|
+
readonly discriminator: readonly [93, 226, 132, 166, 141, 9, 48, 101];
|
|
296
|
+
readonly name: "deposit_nft";
|
|
297
|
+
}, {
|
|
298
|
+
readonly accounts: readonly [{
|
|
299
|
+
readonly name: "pool";
|
|
300
|
+
readonly writable: true;
|
|
301
|
+
}, {
|
|
302
|
+
readonly name: "solVault";
|
|
303
|
+
readonly writable: true;
|
|
304
|
+
}, {
|
|
305
|
+
readonly name: "owner";
|
|
306
|
+
readonly signer: true;
|
|
307
|
+
readonly writable: true;
|
|
308
|
+
}, {
|
|
309
|
+
readonly name: "systemProgram";
|
|
310
|
+
}];
|
|
311
|
+
readonly args: readonly [{
|
|
312
|
+
readonly name: "amount";
|
|
313
|
+
readonly type: "u64";
|
|
314
|
+
}];
|
|
315
|
+
readonly discriminator: readonly [108, 81, 78, 117, 237, 119, 0, 35];
|
|
316
|
+
readonly name: "deposit_sol";
|
|
317
|
+
}, {
|
|
318
|
+
readonly accounts: readonly [{
|
|
319
|
+
readonly name: "pool";
|
|
320
|
+
readonly writable: true;
|
|
321
|
+
}, {
|
|
322
|
+
readonly name: "poolNft";
|
|
323
|
+
readonly writable: true;
|
|
324
|
+
}, {
|
|
325
|
+
readonly name: "nftMint";
|
|
326
|
+
}, {
|
|
327
|
+
readonly name: "poolNftAccount";
|
|
328
|
+
readonly writable: true;
|
|
329
|
+
}, {
|
|
330
|
+
readonly name: "ownerNftAccount";
|
|
331
|
+
readonly writable: true;
|
|
332
|
+
}, {
|
|
333
|
+
readonly name: "owner";
|
|
334
|
+
readonly signer: true;
|
|
335
|
+
readonly writable: true;
|
|
336
|
+
}, {
|
|
337
|
+
readonly name: "tokenProgram";
|
|
338
|
+
}, {
|
|
339
|
+
readonly name: "associatedTokenProgram";
|
|
340
|
+
}, {
|
|
341
|
+
readonly name: "systemProgram";
|
|
342
|
+
}];
|
|
343
|
+
readonly args: readonly [];
|
|
344
|
+
readonly discriminator: readonly [81, 166, 166, 57, 172, 97, 41, 88];
|
|
345
|
+
readonly name: "delist";
|
|
346
|
+
}, {
|
|
347
|
+
readonly accounts: readonly [{
|
|
348
|
+
readonly name: "pool";
|
|
349
|
+
readonly writable: true;
|
|
350
|
+
}, {
|
|
351
|
+
readonly name: "owner";
|
|
352
|
+
readonly signer: true;
|
|
353
|
+
}];
|
|
354
|
+
readonly args: readonly [{
|
|
355
|
+
readonly name: "newSpotPrice";
|
|
356
|
+
readonly type: {
|
|
357
|
+
readonly option: "u64";
|
|
358
|
+
};
|
|
359
|
+
}, {
|
|
360
|
+
readonly name: "newSpreadBps";
|
|
361
|
+
readonly type: {
|
|
362
|
+
readonly option: "u16";
|
|
363
|
+
};
|
|
364
|
+
}];
|
|
365
|
+
readonly discriminator: readonly [239, 77, 186, 213, 72, 168, 141, 90];
|
|
366
|
+
readonly name: "update_pool";
|
|
367
|
+
}];
|
|
368
|
+
readonly metadata: {
|
|
369
|
+
readonly name: "dam_protocol";
|
|
370
|
+
readonly version: "0.1.0";
|
|
371
|
+
readonly spec: "0.1.0";
|
|
372
|
+
};
|
|
373
|
+
readonly types: readonly [{
|
|
374
|
+
readonly name: "CurveType";
|
|
375
|
+
readonly type: {
|
|
376
|
+
readonly kind: "enum";
|
|
377
|
+
readonly variants: readonly [{
|
|
378
|
+
readonly name: "Fixed";
|
|
379
|
+
}, {
|
|
380
|
+
readonly fields: readonly [{
|
|
381
|
+
readonly name: "delta";
|
|
382
|
+
readonly type: "u64";
|
|
383
|
+
}];
|
|
384
|
+
readonly name: "Linear";
|
|
385
|
+
}, {
|
|
386
|
+
readonly fields: readonly [{
|
|
387
|
+
readonly name: "deltaBps";
|
|
388
|
+
readonly type: "u16";
|
|
389
|
+
}];
|
|
390
|
+
readonly name: "Exponential";
|
|
391
|
+
}];
|
|
392
|
+
};
|
|
393
|
+
}, {
|
|
394
|
+
readonly name: "PoolType";
|
|
395
|
+
readonly type: {
|
|
396
|
+
readonly kind: "enum";
|
|
397
|
+
readonly variants: readonly [{
|
|
398
|
+
readonly name: "Nft";
|
|
399
|
+
}, {
|
|
400
|
+
readonly name: "Token";
|
|
401
|
+
}, {
|
|
402
|
+
readonly name: "Trade";
|
|
403
|
+
}];
|
|
404
|
+
};
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "Config";
|
|
407
|
+
readonly type: {
|
|
408
|
+
readonly kind: "struct";
|
|
409
|
+
readonly fields: readonly [{
|
|
410
|
+
readonly name: "bump";
|
|
411
|
+
readonly type: "u8";
|
|
412
|
+
}, {
|
|
413
|
+
readonly name: "authority";
|
|
414
|
+
readonly type: "pubkey";
|
|
415
|
+
}, {
|
|
416
|
+
readonly name: "protocolFeeBps";
|
|
417
|
+
readonly type: "u16";
|
|
418
|
+
}, {
|
|
419
|
+
readonly name: "buybackBps";
|
|
420
|
+
readonly type: "u16";
|
|
421
|
+
}, {
|
|
422
|
+
readonly name: "feeTreasury";
|
|
423
|
+
readonly type: "pubkey";
|
|
424
|
+
}, {
|
|
425
|
+
readonly name: "pbpBuybackWallet";
|
|
426
|
+
readonly type: "pubkey";
|
|
427
|
+
}, {
|
|
428
|
+
readonly name: "totalPools";
|
|
429
|
+
readonly type: "u64";
|
|
430
|
+
}, {
|
|
431
|
+
readonly name: "totalTrades";
|
|
432
|
+
readonly type: "u64";
|
|
433
|
+
}, {
|
|
434
|
+
readonly name: "feeBuffer";
|
|
435
|
+
readonly type: "u64";
|
|
436
|
+
}, {
|
|
437
|
+
readonly name: "paused";
|
|
438
|
+
readonly type: "bool";
|
|
439
|
+
}];
|
|
440
|
+
};
|
|
441
|
+
}, {
|
|
442
|
+
readonly name: "Pool";
|
|
443
|
+
readonly type: {
|
|
444
|
+
readonly kind: "struct";
|
|
445
|
+
readonly fields: readonly [{
|
|
446
|
+
readonly name: "bump";
|
|
447
|
+
readonly type: "u8";
|
|
448
|
+
}, {
|
|
449
|
+
readonly name: "owner";
|
|
450
|
+
readonly type: "pubkey";
|
|
451
|
+
}, {
|
|
452
|
+
readonly name: "uuid";
|
|
453
|
+
readonly type: {
|
|
454
|
+
readonly array: readonly ["u8", 6];
|
|
455
|
+
};
|
|
456
|
+
}, {
|
|
457
|
+
readonly name: "collection";
|
|
458
|
+
readonly type: "pubkey";
|
|
459
|
+
}, {
|
|
460
|
+
readonly name: "curveType";
|
|
461
|
+
readonly type: {
|
|
462
|
+
readonly defined: {
|
|
463
|
+
readonly name: "CurveType";
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
}, {
|
|
467
|
+
readonly name: "spotPrice";
|
|
468
|
+
readonly type: "u64";
|
|
469
|
+
}, {
|
|
470
|
+
readonly name: "spreadBps";
|
|
471
|
+
readonly type: "u16";
|
|
472
|
+
}, {
|
|
473
|
+
readonly name: "nftCount";
|
|
474
|
+
readonly type: "u16";
|
|
475
|
+
}, {
|
|
476
|
+
readonly name: "solBalance";
|
|
477
|
+
readonly type: "u64";
|
|
478
|
+
}, {
|
|
479
|
+
readonly name: "buyCount";
|
|
480
|
+
readonly type: "u64";
|
|
481
|
+
}, {
|
|
482
|
+
readonly name: "sellCount";
|
|
483
|
+
readonly type: "u64";
|
|
484
|
+
}, {
|
|
485
|
+
readonly name: "poolType";
|
|
486
|
+
readonly type: {
|
|
487
|
+
readonly defined: {
|
|
488
|
+
readonly name: "PoolType";
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
}, {
|
|
492
|
+
readonly name: "isActive";
|
|
493
|
+
readonly type: "bool";
|
|
494
|
+
}, {
|
|
495
|
+
readonly name: "createdAt";
|
|
496
|
+
readonly type: "i64";
|
|
497
|
+
}];
|
|
498
|
+
};
|
|
499
|
+
}, {
|
|
500
|
+
readonly name: "PoolNft";
|
|
501
|
+
readonly type: {
|
|
502
|
+
readonly kind: "struct";
|
|
503
|
+
readonly fields: readonly [{
|
|
504
|
+
readonly name: "bump";
|
|
505
|
+
readonly type: "u8";
|
|
506
|
+
}, {
|
|
507
|
+
readonly name: "pool";
|
|
508
|
+
readonly type: "pubkey";
|
|
509
|
+
}, {
|
|
510
|
+
readonly name: "nftMint";
|
|
511
|
+
readonly type: "pubkey";
|
|
512
|
+
}, {
|
|
513
|
+
readonly name: "depositor";
|
|
514
|
+
readonly type: "pubkey";
|
|
515
|
+
}, {
|
|
516
|
+
readonly name: "depositedAt";
|
|
517
|
+
readonly type: "i64";
|
|
518
|
+
}, {
|
|
519
|
+
readonly name: "priceAtDeposit";
|
|
520
|
+
readonly type: "u64";
|
|
521
|
+
}];
|
|
522
|
+
};
|
|
523
|
+
}, {
|
|
524
|
+
readonly name: "TradeEvent";
|
|
525
|
+
readonly type: {
|
|
526
|
+
readonly kind: "struct";
|
|
527
|
+
readonly fields: readonly [{
|
|
528
|
+
readonly name: "pool";
|
|
529
|
+
readonly type: "pubkey";
|
|
530
|
+
}, {
|
|
531
|
+
readonly name: "buyer";
|
|
532
|
+
readonly type: "pubkey";
|
|
533
|
+
}, {
|
|
534
|
+
readonly name: "seller";
|
|
535
|
+
readonly type: "pubkey";
|
|
536
|
+
}, {
|
|
537
|
+
readonly name: "nftMint";
|
|
538
|
+
readonly type: "pubkey";
|
|
539
|
+
}, {
|
|
540
|
+
readonly name: "price";
|
|
541
|
+
readonly type: "u64";
|
|
542
|
+
}, {
|
|
543
|
+
readonly name: "protocolFee";
|
|
544
|
+
readonly type: "u64";
|
|
545
|
+
}, {
|
|
546
|
+
readonly name: "creatorRoyalty";
|
|
547
|
+
readonly type: "u64";
|
|
548
|
+
}, {
|
|
549
|
+
readonly name: "isBuy";
|
|
550
|
+
readonly type: "bool";
|
|
551
|
+
}];
|
|
552
|
+
};
|
|
553
|
+
}, {
|
|
554
|
+
readonly name: "PoolCreatedEvent";
|
|
555
|
+
readonly type: {
|
|
556
|
+
readonly kind: "struct";
|
|
557
|
+
readonly fields: readonly [{
|
|
558
|
+
readonly name: "pool";
|
|
559
|
+
readonly type: "pubkey";
|
|
560
|
+
}, {
|
|
561
|
+
readonly name: "owner";
|
|
562
|
+
readonly type: "pubkey";
|
|
563
|
+
}, {
|
|
564
|
+
readonly name: "collection";
|
|
565
|
+
readonly type: "pubkey";
|
|
566
|
+
}, {
|
|
567
|
+
readonly name: "curveType";
|
|
568
|
+
readonly type: {
|
|
569
|
+
readonly defined: {
|
|
570
|
+
readonly name: "CurveType";
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
}, {
|
|
574
|
+
readonly name: "spotPrice";
|
|
575
|
+
readonly type: "u64";
|
|
576
|
+
}, {
|
|
577
|
+
readonly name: "poolType";
|
|
578
|
+
readonly type: {
|
|
579
|
+
readonly defined: {
|
|
580
|
+
readonly name: "PoolType";
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
}];
|
|
584
|
+
};
|
|
585
|
+
}];
|
|
586
|
+
};
|
|
587
|
+
//# sourceMappingURL=idl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idl.d.ts","sourceRoot":"","sources":["../src/idl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAo5BnB,CAAC"}
|