Files
solisting/target/idl/solisting.json
thesn10 3425bc7ab9 chore: generate solisting IDL
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 21:49:28 +02:00

1429 lines
31 KiB
JSON

{
"address": "",
"metadata": {
"name": "solisting",
"version": "0.1.0",
"spec": "0.1.0"
},
"instructions": [
{
"name": "initialize",
"discriminator": [
175,
175,
109,
31,
13,
152,
155,
237
],
"accounts": [],
"args": []
},
{
"name": "create_listing",
"discriminator": [
18,
168,
45,
24,
191,
31,
117,
54
],
"accounts": [
{
"name": "seller",
"writable": true,
"signer": true
},
{
"name": "listing_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
108,
105,
115,
116,
105,
110,
103
]
},
{
"kind": "account",
"path": "seller"
},
{
"kind": "arg",
"path": "listing_id"
}
]
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "listing_id",
"type": "u64"
},
{
"name": "canonical_currency",
"type": {
"defined": {
"name": "solisting::state::Currency"
}
}
},
{
"name": "price",
"type": "u64"
},
{
"name": "canonical_oracle",
"type": {
"option": "pubkey"
}
},
{
"name": "alt_currencies",
"type": {
"vec": {
"defined": {
"name": "solisting::state::AltCurrencyConfig"
}
}
}
},
{
"name": "accepted_resolvers",
"type": {
"vec": "pubkey"
}
},
{
"name": "quantity",
"type": "u32"
},
{
"name": "metadata_uri",
"type": "string"
}
]
},
{
"name": "update_listing",
"discriminator": [
192,
174,
210,
68,
116,
40,
242,
253
],
"accounts": [
{
"name": "seller",
"signer": true
},
{
"name": "listing_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
108,
105,
115,
116,
105,
110,
103
]
},
{
"kind": "account",
"path": "listing_account.seller",
"account": "ListingAccount"
},
{
"kind": "account",
"path": "listing_account.listing_id",
"account": "ListingAccount"
}
]
}
}
],
"args": [
{
"name": "canonical_currency",
"type": {
"defined": {
"name": "solisting::state::Currency"
}
}
},
{
"name": "price",
"type": "u64"
},
{
"name": "canonical_oracle",
"type": {
"option": "pubkey"
}
},
{
"name": "alt_currencies",
"type": {
"vec": {
"defined": {
"name": "solisting::state::AltCurrencyConfig"
}
}
}
},
{
"name": "accepted_resolvers",
"type": {
"vec": "pubkey"
}
},
{
"name": "quantity",
"type": "u32"
},
{
"name": "metadata_uri",
"type": "string"
}
]
},
{
"name": "close_listing",
"discriminator": [
33,
15,
192,
81,
78,
175,
159,
97
],
"accounts": [
{
"name": "seller",
"writable": true,
"signer": true
},
{
"name": "listing_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
108,
105,
115,
116,
105,
110,
103
]
},
{
"kind": "account",
"path": "listing_account.seller",
"account": "ListingAccount"
},
{
"kind": "account",
"path": "listing_account.listing_id",
"account": "ListingAccount"
}
]
}
}
],
"args": []
},
{
"name": "create_order",
"discriminator": [
141,
54,
37,
207,
237,
210,
250,
215
],
"accounts": [
{
"name": "buyer",
"writable": true,
"signer": true
},
{
"name": "seller"
},
{
"name": "listing_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
108,
105,
115,
116,
105,
110,
103
]
},
{
"kind": "account",
"path": "listing_account.seller",
"account": "ListingAccount"
},
{
"kind": "account",
"path": "listing_account.listing_id",
"account": "ListingAccount"
}
]
}
},
{
"name": "order_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
111,
114,
100,
101,
114
]
},
{
"kind": "account",
"path": "listing_account"
},
{
"kind": "account",
"path": "buyer"
},
{
"kind": "arg",
"path": "order_id"
}
]
}
},
{
"name": "escrow_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
101,
115,
99,
114,
111,
119
]
},
{
"kind": "account",
"path": "seller"
},
{
"kind": "arg",
"path": "escrow_id"
}
],
"program": {
"kind": "const",
"value": [
189,
46,
196,
9,
38,
68,
13,
236,
154,
101,
74,
161,
29,
155,
110,
167,
230,
204,
79,
86,
74,
46,
229,
168,
214,
228,
65,
126,
160,
53,
53,
204
]
}
}
},
{
"name": "descro_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
118,
97,
117,
108,
116
]
},
{
"kind": "account",
"path": "escrow_account"
}
],
"program": {
"kind": "const",
"value": [
189,
46,
196,
9,
38,
68,
13,
236,
154,
101,
74,
161,
29,
155,
110,
167,
230,
204,
79,
86,
74,
46,
229,
168,
214,
228,
65,
126,
160,
53,
53,
204
]
}
}
},
{
"name": "canonical_oracle",
"docs": [
"Pass SystemProgram as placeholder when canonical_oracle is None (stablecoin)."
]
},
{
"name": "target_oracle",
"docs": [
"Pass SystemProgram as placeholder when usd_oracle is None or paying canonical."
]
},
{
"name": "descro_program"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "order_id",
"type": "u64"
},
{
"name": "escrow_id",
"type": "u64"
},
{
"name": "resolver",
"type": "pubkey"
},
{
"name": "payment_currency",
"type": {
"defined": {
"name": "solisting::state::Currency"
}
}
},
{
"name": "expected_amount",
"type": "u64"
},
{
"name": "max_slippage_bps",
"type": "u16"
}
]
},
{
"name": "accept_order",
"discriminator": [
118,
157,
62,
39,
239,
234,
231,
193
],
"accounts": [
{
"name": "seller",
"writable": true,
"signer": true
},
{
"name": "resolver"
},
{
"name": "listing_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
108,
105,
115,
116,
105,
110,
103
]
},
{
"kind": "account",
"path": "listing_account.seller",
"account": "ListingAccount"
},
{
"kind": "account",
"path": "listing_account.listing_id",
"account": "ListingAccount"
}
]
}
},
{
"name": "order_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
111,
114,
100,
101,
114
]
},
{
"kind": "account",
"path": "order_account.listing",
"account": "OrderAccount"
},
{
"kind": "account",
"path": "order_account.buyer",
"account": "OrderAccount"
},
{
"kind": "account",
"path": "order_account.order_id",
"account": "OrderAccount"
}
]
}
},
{
"name": "escrow_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
101,
115,
99,
114,
111,
119
]
},
{
"kind": "account",
"path": "seller"
},
{
"kind": "account",
"path": "order_account.escrow_id",
"account": "OrderAccount"
}
],
"program": {
"kind": "const",
"value": [
189,
46,
196,
9,
38,
68,
13,
236,
154,
101,
74,
161,
29,
155,
110,
167,
230,
204,
79,
86,
74,
46,
229,
168,
214,
228,
65,
126,
160,
53,
53,
204
]
}
}
},
{
"name": "resolver_entry"
},
{
"name": "descro_program"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "reject_order",
"discriminator": [
216,
154,
15,
81,
179,
14,
75,
62
],
"accounts": [
{
"name": "seller",
"writable": true,
"signer": true
},
{
"name": "buyer",
"writable": true
},
{
"name": "listing_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
108,
105,
115,
116,
105,
110,
103
]
},
{
"kind": "account",
"path": "listing_account.seller",
"account": "ListingAccount"
},
{
"kind": "account",
"path": "listing_account.listing_id",
"account": "ListingAccount"
}
]
}
},
{
"name": "order_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
111,
114,
100,
101,
114
]
},
{
"kind": "account",
"path": "order_account.listing",
"account": "OrderAccount"
},
{
"kind": "account",
"path": "order_account.buyer",
"account": "OrderAccount"
},
{
"kind": "account",
"path": "order_account.order_id",
"account": "OrderAccount"
}
]
}
},
{
"name": "escrow_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
101,
115,
99,
114,
111,
119
]
},
{
"kind": "account",
"path": "seller"
},
{
"kind": "account",
"path": "order_account.escrow_id",
"account": "OrderAccount"
}
],
"program": {
"kind": "const",
"value": [
189,
46,
196,
9,
38,
68,
13,
236,
154,
101,
74,
161,
29,
155,
110,
167,
230,
204,
79,
86,
74,
46,
229,
168,
214,
228,
65,
126,
160,
53,
53,
204
]
}
}
},
{
"name": "vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
118,
97,
117,
108,
116
]
},
{
"kind": "account",
"path": "escrow_account"
}
],
"program": {
"kind": "const",
"value": [
189,
46,
196,
9,
38,
68,
13,
236,
154,
101,
74,
161,
29,
155,
110,
167,
230,
204,
79,
86,
74,
46,
229,
168,
214,
228,
65,
126,
160,
53,
53,
204
]
}
}
},
{
"name": "descro_program"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "cancel_order",
"discriminator": [
95,
129,
237,
240,
8,
49,
223,
132
],
"accounts": [
{
"name": "buyer",
"writable": true,
"signer": true
},
{
"name": "listing_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
108,
105,
115,
116,
105,
110,
103
]
},
{
"kind": "account",
"path": "listing_account.seller",
"account": "ListingAccount"
},
{
"kind": "account",
"path": "listing_account.listing_id",
"account": "ListingAccount"
}
]
}
},
{
"name": "order_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
111,
114,
100,
101,
114
]
},
{
"kind": "account",
"path": "order_account.listing",
"account": "OrderAccount"
},
{
"kind": "account",
"path": "order_account.buyer",
"account": "OrderAccount"
},
{
"kind": "account",
"path": "order_account.order_id",
"account": "OrderAccount"
}
]
}
},
{
"name": "escrow_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
101,
115,
99,
114,
111,
119
]
},
{
"kind": "account",
"path": "order_account.seller",
"account": "OrderAccount"
},
{
"kind": "account",
"path": "order_account.escrow_id",
"account": "OrderAccount"
}
],
"program": {
"kind": "const",
"value": [
189,
46,
196,
9,
38,
68,
13,
236,
154,
101,
74,
161,
29,
155,
110,
167,
230,
204,
79,
86,
74,
46,
229,
168,
214,
228,
65,
126,
160,
53,
53,
204
]
}
}
},
{
"name": "vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
118,
97,
117,
108,
116
]
},
{
"kind": "account",
"path": "escrow_account"
}
],
"program": {
"kind": "const",
"value": [
189,
46,
196,
9,
38,
68,
13,
236,
154,
101,
74,
161,
29,
155,
110,
167,
230,
204,
79,
86,
74,
46,
229,
168,
214,
228,
65,
126,
160,
53,
53,
204
]
}
}
},
{
"name": "descro_program"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "close_stale_order",
"discriminator": [
167,
12,
32,
252,
132,
106,
131,
250
],
"accounts": [
{
"name": "caller",
"writable": true,
"signer": true
},
{
"name": "order_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
111,
114,
100,
101,
114
]
},
{
"kind": "account",
"path": "order_account.listing",
"account": "OrderAccount"
},
{
"kind": "account",
"path": "order_account.buyer",
"account": "OrderAccount"
},
{
"kind": "account",
"path": "order_account.order_id",
"account": "OrderAccount"
}
]
}
},
{
"name": "escrow_account"
}
],
"args": []
}
],
"accounts": [
{
"name": "solisting::state::ListingAccount",
"discriminator": [
59,
89,
136,
25,
21,
196,
183,
13
]
},
{
"name": "solisting::state::OrderAccount",
"discriminator": [
79,
67,
112,
155,
214,
14,
32,
55
]
}
],
"types": [
{
"name": "solisting::state::AltCurrencyConfig",
"docs": [
"Per-alt-currency oracle configuration. Each alt currency carries its own Pyth feed",
"because different tokens have different price feeds."
],
"type": {
"kind": "struct",
"fields": [
{
"name": "currency",
"type": {
"defined": {
"name": "solisting::state::Currency"
}
}
},
{
"name": "usd_oracle",
"docs": [
"Pyth V2 PriceFeedAccount for this token priced in USD (TOKEN/USD).",
"`None` = treat as a $1.00 USD stablecoin — no oracle account required at order time."
],
"type": {
"option": "pubkey"
}
}
]
}
},
{
"name": "solisting::state::Currency",
"docs": [
"Payment currency identifier. Amounts are always in the currency's smallest unit:",
"Sol → Lamports (u64), Spl → token units (smallest unit per `decimals`)."
],
"type": {
"kind": "enum",
"variants": [
{
"name": "Sol"
},
{
"name": "Spl",
"fields": [
{
"name": "mint",
"type": "pubkey"
},
{
"name": "decimals",
"type": "u8"
}
]
}
]
}
},
{
"name": "solisting::state::ListingAccount",
"type": {
"kind": "struct",
"fields": [
{
"name": "seller",
"type": "pubkey"
},
{
"name": "canonical_currency",
"docs": [
"Sole source of truth for price. All alt_currencies are derived from this via oracle."
],
"type": {
"defined": {
"name": "solisting::state::Currency"
}
}
},
{
"name": "price",
"docs": [
"Price in canonical_currency's smallest unit."
],
"type": "u64"
},
{
"name": "canonical_oracle",
"docs": [
"Pyth V2 PriceFeedAccount for the canonical currency priced in USD.",
"`None` = canonical is a $1.00 USD stablecoin.",
"For Sol canonical: set to the SOL/USD Pyth feed."
],
"type": {
"option": "pubkey"
}
},
{
"name": "alt_currencies",
"docs": [
"Alt currencies the seller accepts. Amounts are oracle-computed at create_order time.",
"Empty = no oracle ever needed."
],
"type": {
"vec": {
"defined": {
"name": "solisting::state::AltCurrencyConfig"
}
}
}
},
{
"name": "accepted_resolvers",
"docs": [
"Resolvers the seller accepts for dispute resolution. Empty = any resolver ok."
],
"type": {
"vec": "pubkey"
}
},
{
"name": "quantity",
"docs": [
"Total units the seller offers (includes quantity_reserved)."
],
"type": "u32"
},
{
"name": "quantity_reserved",
"docs": [
"Units held by pending orders. available = quantity - quantity_reserved."
],
"type": "u32"
},
{
"name": "metadata_uri",
"type": "string"
},
{
"name": "listing_id",
"type": "u64"
},
{
"name": "is_active",
"type": "bool"
},
{
"name": "bump",
"type": "u8"
}
]
}
},
{
"name": "solisting::state::OrderAccount",
"type": {
"kind": "struct",
"fields": [
{
"name": "listing",
"type": "pubkey"
},
{
"name": "buyer",
"type": "pubkey"
},
{
"name": "seller",
"type": "pubkey"
},
{
"name": "resolver",
"type": "pubkey"
},
{
"name": "payment_currency",
"docs": [
"The currency the buyer chose to pay in."
],
"type": {
"defined": {
"name": "solisting::state::Currency"
}
}
},
{
"name": "amount",
"docs": [
"Actual amount paid (may differ from price when oracle-converted)."
],
"type": "u64"
},
{
"name": "escrow_account",
"docs": [
"The descro EscrowAccount PDA for this order."
],
"type": "pubkey"
},
{
"name": "escrow_id",
"docs": [
"Derived from order_account PDA bytes[0..8]; used as descro escrow_id seed."
],
"type": "u64"
},
{
"name": "order_id",
"type": "u64"
},
{
"name": "created_at",
"type": "i64"
},
{
"name": "bump",
"type": "u8"
}
]
}
}
]
}