@mutinylabs/slip 0.2.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 (200) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +99 -0
  3. package/dist/ai.d.ts +70 -0
  4. package/dist/ai.d.ts.map +1 -0
  5. package/dist/ai.js +448 -0
  6. package/dist/ai.js.map +1 -0
  7. package/dist/anchor.d.ts +15 -0
  8. package/dist/anchor.d.ts.map +1 -0
  9. package/dist/anchor.js +15 -0
  10. package/dist/anchor.js.map +1 -0
  11. package/dist/client.d.ts +90 -0
  12. package/dist/client.d.ts.map +1 -0
  13. package/dist/client.js +161 -0
  14. package/dist/client.js.map +1 -0
  15. package/dist/evidence.d.ts +13 -0
  16. package/dist/evidence.d.ts.map +1 -0
  17. package/dist/evidence.js +34 -0
  18. package/dist/evidence.js.map +1 -0
  19. package/dist/generated/accounts/index.d.ts +10 -0
  20. package/dist/generated/accounts/index.d.ts.map +1 -0
  21. package/dist/generated/accounts/index.js +10 -0
  22. package/dist/generated/accounts/index.js.map +1 -0
  23. package/dist/generated/accounts/market.d.ts +73 -0
  24. package/dist/generated/accounts/market.d.ts.map +1 -0
  25. package/dist/generated/accounts/market.js +105 -0
  26. package/dist/generated/accounts/market.js.map +1 -0
  27. package/dist/generated/accounts/marketTicket.d.ts +43 -0
  28. package/dist/generated/accounts/marketTicket.d.ts.map +1 -0
  29. package/dist/generated/accounts/marketTicket.js +69 -0
  30. package/dist/generated/accounts/marketTicket.js.map +1 -0
  31. package/dist/generated/errors/index.d.ts +9 -0
  32. package/dist/generated/errors/index.d.ts.map +1 -0
  33. package/dist/generated/errors/index.js +9 -0
  34. package/dist/generated/errors/index.js.map +1 -0
  35. package/dist/generated/errors/slip.d.ts +68 -0
  36. package/dist/generated/errors/slip.d.ts.map +1 -0
  37. package/dist/generated/errors/slip.js +96 -0
  38. package/dist/generated/errors/slip.js.map +1 -0
  39. package/dist/generated/index.d.ts +14 -0
  40. package/dist/generated/index.d.ts.map +1 -0
  41. package/dist/generated/index.js +14 -0
  42. package/dist/generated/index.js.map +1 -0
  43. package/dist/generated/instructions/buyTicket.d.ts +80 -0
  44. package/dist/generated/instructions/buyTicket.d.ts.map +1 -0
  45. package/dist/generated/instructions/buyTicket.js +149 -0
  46. package/dist/generated/instructions/buyTicket.js.map +1 -0
  47. package/dist/generated/instructions/claimTicket.d.ts +55 -0
  48. package/dist/generated/instructions/claimTicket.d.ts.map +1 -0
  49. package/dist/generated/instructions/claimTicket.js +87 -0
  50. package/dist/generated/instructions/claimTicket.js.map +1 -0
  51. package/dist/generated/instructions/createMarket.d.ts +105 -0
  52. package/dist/generated/instructions/createMarket.d.ts.map +1 -0
  53. package/dist/generated/instructions/createMarket.js +195 -0
  54. package/dist/generated/instructions/createMarket.js.map +1 -0
  55. package/dist/generated/instructions/index.d.ts +14 -0
  56. package/dist/generated/instructions/index.d.ts.map +1 -0
  57. package/dist/generated/instructions/index.js +14 -0
  58. package/dist/generated/instructions/index.js.map +1 -0
  59. package/dist/generated/instructions/resolveMarket.d.ts +75 -0
  60. package/dist/generated/instructions/resolveMarket.d.ts.map +1 -0
  61. package/dist/generated/instructions/resolveMarket.js +107 -0
  62. package/dist/generated/instructions/resolveMarket.js.map +1 -0
  63. package/dist/generated/instructions/resolveMarketV3.d.ts +78 -0
  64. package/dist/generated/instructions/resolveMarketV3.d.ts.map +1 -0
  65. package/dist/generated/instructions/resolveMarketV3.js +109 -0
  66. package/dist/generated/instructions/resolveMarketV3.js.map +1 -0
  67. package/dist/generated/instructions/voidMarket.d.ts +40 -0
  68. package/dist/generated/instructions/voidMarket.d.ts.map +1 -0
  69. package/dist/generated/instructions/voidMarket.js +64 -0
  70. package/dist/generated/instructions/voidMarket.js.map +1 -0
  71. package/dist/generated/pdas/index.d.ts +10 -0
  72. package/dist/generated/pdas/index.d.ts.map +1 -0
  73. package/dist/generated/pdas/index.js +10 -0
  74. package/dist/generated/pdas/index.js.map +1 -0
  75. package/dist/generated/pdas/market.d.ts +16 -0
  76. package/dist/generated/pdas/market.d.ts.map +1 -0
  77. package/dist/generated/pdas/market.js +20 -0
  78. package/dist/generated/pdas/market.js.map +1 -0
  79. package/dist/generated/pdas/ticket.d.ts +17 -0
  80. package/dist/generated/pdas/ticket.d.ts.map +1 -0
  81. package/dist/generated/pdas/ticket.js +21 -0
  82. package/dist/generated/pdas/ticket.js.map +1 -0
  83. package/dist/generated/programs/index.d.ts +9 -0
  84. package/dist/generated/programs/index.d.ts.map +1 -0
  85. package/dist/generated/programs/index.js +9 -0
  86. package/dist/generated/programs/index.js.map +1 -0
  87. package/dist/generated/programs/slip.d.ts +43 -0
  88. package/dist/generated/programs/slip.d.ts.map +1 -0
  89. package/dist/generated/programs/slip.js +106 -0
  90. package/dist/generated/programs/slip.js.map +1 -0
  91. package/dist/generated/shared/index.d.ts +50 -0
  92. package/dist/generated/shared/index.d.ts.map +1 -0
  93. package/dist/generated/shared/index.js +87 -0
  94. package/dist/generated/shared/index.js.map +1 -0
  95. package/dist/generated/types/binaryOp.d.ts +18 -0
  96. package/dist/generated/types/binaryOp.d.ts.map +1 -0
  97. package/dist/generated/types/binaryOp.js +24 -0
  98. package/dist/generated/types/binaryOp.js.map +1 -0
  99. package/dist/generated/types/index.d.ts +19 -0
  100. package/dist/generated/types/index.d.ts.map +1 -0
  101. package/dist/generated/types/index.js +19 -0
  102. package/dist/generated/types/index.js.map +1 -0
  103. package/dist/generated/types/marketExpression.d.ts +34 -0
  104. package/dist/generated/types/marketExpression.d.ts.map +1 -0
  105. package/dist/generated/types/marketExpression.js +37 -0
  106. package/dist/generated/types/marketExpression.js.map +1 -0
  107. package/dist/generated/types/marketState.d.ts +18 -0
  108. package/dist/generated/types/marketState.d.ts.map +1 -0
  109. package/dist/generated/types/marketState.js +24 -0
  110. package/dist/generated/types/marketState.js.map +1 -0
  111. package/dist/generated/types/multiProof.d.ts +28 -0
  112. package/dist/generated/types/multiProof.d.ts.map +1 -0
  113. package/dist/generated/types/multiProof.js +25 -0
  114. package/dist/generated/types/multiProof.js.map +1 -0
  115. package/dist/generated/types/outcomeBand.d.ts +26 -0
  116. package/dist/generated/types/outcomeBand.d.ts.map +1 -0
  117. package/dist/generated/types/outcomeBand.js +26 -0
  118. package/dist/generated/types/outcomeBand.js.map +1 -0
  119. package/dist/generated/types/proofNode.d.ts +17 -0
  120. package/dist/generated/types/proofNode.d.ts.map +1 -0
  121. package/dist/generated/types/proofNode.js +24 -0
  122. package/dist/generated/types/proofNode.js.map +1 -0
  123. package/dist/generated/types/provenStat.d.ts +21 -0
  124. package/dist/generated/types/provenStat.d.ts.map +1 -0
  125. package/dist/generated/types/provenStat.js +25 -0
  126. package/dist/generated/types/provenStat.js.map +1 -0
  127. package/dist/generated/types/scoreStatInput.d.ts +18 -0
  128. package/dist/generated/types/scoreStatInput.d.ts.map +1 -0
  129. package/dist/generated/types/scoreStatInput.js +26 -0
  130. package/dist/generated/types/scoreStatInput.js.map +1 -0
  131. package/dist/generated/types/settlementMode.d.ts +16 -0
  132. package/dist/generated/types/settlementMode.d.ts.map +1 -0
  133. package/dist/generated/types/settlementMode.js +22 -0
  134. package/dist/generated/types/settlementMode.js.map +1 -0
  135. package/dist/generated/types/sideSelector.d.ts +18 -0
  136. package/dist/generated/types/sideSelector.d.ts.map +1 -0
  137. package/dist/generated/types/sideSelector.js +24 -0
  138. package/dist/generated/types/sideSelector.js.map +1 -0
  139. package/dist/generated/types/summaryInput.d.ts +26 -0
  140. package/dist/generated/types/summaryInput.d.ts.map +1 -0
  141. package/dist/generated/types/summaryInput.js +30 -0
  142. package/dist/generated/types/summaryInput.js.map +1 -0
  143. package/dist/idl/slip.json +2418 -0
  144. package/dist/index.d.ts +9 -0
  145. package/dist/index.d.ts.map +1 -0
  146. package/dist/index.js +9 -0
  147. package/dist/index.js.map +1 -0
  148. package/dist/market-reference.d.ts +9 -0
  149. package/dist/market-reference.d.ts.map +1 -0
  150. package/dist/market-reference.js +38 -0
  151. package/dist/market-reference.js.map +1 -0
  152. package/dist/market.d.ts +42 -0
  153. package/dist/market.d.ts.map +1 -0
  154. package/dist/market.js +267 -0
  155. package/dist/market.js.map +1 -0
  156. package/dist/merkle.d.ts +48 -0
  157. package/dist/merkle.d.ts.map +1 -0
  158. package/dist/merkle.js +67 -0
  159. package/dist/merkle.js.map +1 -0
  160. package/dist/pda.d.ts +12 -0
  161. package/dist/pda.d.ts.map +1 -0
  162. package/dist/pda.js +30 -0
  163. package/dist/pda.js.map +1 -0
  164. package/dist/proof.d.ts +40 -0
  165. package/dist/proof.d.ts.map +1 -0
  166. package/dist/proof.js +106 -0
  167. package/dist/proof.js.map +1 -0
  168. package/dist/public-client.d.ts +60 -0
  169. package/dist/public-client.d.ts.map +1 -0
  170. package/dist/public-client.js +487 -0
  171. package/dist/public-client.js.map +1 -0
  172. package/dist/public-math.d.ts +17 -0
  173. package/dist/public-math.d.ts.map +1 -0
  174. package/dist/public-math.js +57 -0
  175. package/dist/public-math.js.map +1 -0
  176. package/dist/public-types.d.ts +151 -0
  177. package/dist/public-types.d.ts.map +1 -0
  178. package/dist/public-types.js +2 -0
  179. package/dist/public-types.js.map +1 -0
  180. package/dist/rulebook-skills.d.ts +15 -0
  181. package/dist/rulebook-skills.d.ts.map +1 -0
  182. package/dist/rulebook-skills.js +155 -0
  183. package/dist/rulebook-skills.js.map +1 -0
  184. package/dist/rulebook.d.ts +17 -0
  185. package/dist/rulebook.d.ts.map +1 -0
  186. package/dist/rulebook.js +42 -0
  187. package/dist/rulebook.js.map +1 -0
  188. package/dist/transaction.d.ts +23 -0
  189. package/dist/transaction.d.ts.map +1 -0
  190. package/dist/transaction.js +51 -0
  191. package/dist/transaction.js.map +1 -0
  192. package/dist/txline.d.ts +55 -0
  193. package/dist/txline.d.ts.map +1 -0
  194. package/dist/txline.js +238 -0
  195. package/dist/txline.js.map +1 -0
  196. package/dist/types.d.ts +149 -0
  197. package/dist/types.d.ts.map +1 -0
  198. package/dist/types.js +10 -0
  199. package/dist/types.js.map +1 -0
  200. package/package.json +123 -0
@@ -0,0 +1,105 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { addDecoderSizePrefix, addEncoderSizePrefix, assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, getUtf8Decoder, getUtf8Encoder, transformEncoder, } from "@solana/kit";
9
+ import { getMarketExpressionDecoder, getMarketExpressionEncoder, getMarketStateDecoder, getMarketStateEncoder, getOutcomeBandDecoder, getOutcomeBandEncoder, } from "../types/index.js";
10
+ export const MARKET_DISCRIMINATOR = new Uint8Array([
11
+ 219, 190, 213, 55, 0, 227, 198, 154,
12
+ ]);
13
+ export function getMarketDiscriminatorBytes() {
14
+ return fixEncoderSize(getBytesEncoder(), 8).encode(MARKET_DISCRIMINATOR);
15
+ }
16
+ /** Gets the encoder for {@link MarketArgs} account data. */
17
+ export function getMarketEncoder() {
18
+ return transformEncoder(getStructEncoder([
19
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
20
+ ["id", getU64Encoder()],
21
+ ["creator", getAddressEncoder()],
22
+ ["mint", getAddressEncoder()],
23
+ ["expression", getMarketExpressionEncoder()],
24
+ [
25
+ "outcomeLabels",
26
+ getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())),
27
+ ],
28
+ ["bands", getArrayEncoder(getOutcomeBandEncoder())],
29
+ ["pools", getArrayEncoder(getU64Encoder(), { size: 5 })],
30
+ ["entryDeadline", getI64Encoder()],
31
+ ["resolveAt", getI64Encoder()],
32
+ ["voidAt", getI64Encoder()],
33
+ ["feeBps", getU16Encoder()],
34
+ ["tipBps", getU16Encoder()],
35
+ ["state", getMarketStateEncoder()],
36
+ ["winningOutcome", getOptionEncoder(getU8Encoder())],
37
+ [
38
+ "resolutionEvidenceHash",
39
+ getOptionEncoder(fixEncoderSize(getBytesEncoder(), 32)),
40
+ ],
41
+ ["createdAt", getI64Encoder()],
42
+ ["resolvedTs", getI64Encoder()],
43
+ ["ticketCount", getU32Encoder()],
44
+ ["claimedStake", getU64Encoder()],
45
+ ["bump", getU8Encoder()],
46
+ ]), (value) => ({ ...value, discriminator: MARKET_DISCRIMINATOR }));
47
+ }
48
+ /** Gets the decoder for {@link Market} account data. */
49
+ export function getMarketDecoder() {
50
+ return getStructDecoder([
51
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
52
+ ["id", getU64Decoder()],
53
+ ["creator", getAddressDecoder()],
54
+ ["mint", getAddressDecoder()],
55
+ ["expression", getMarketExpressionDecoder()],
56
+ [
57
+ "outcomeLabels",
58
+ getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),
59
+ ],
60
+ ["bands", getArrayDecoder(getOutcomeBandDecoder())],
61
+ ["pools", getArrayDecoder(getU64Decoder(), { size: 5 })],
62
+ ["entryDeadline", getI64Decoder()],
63
+ ["resolveAt", getI64Decoder()],
64
+ ["voidAt", getI64Decoder()],
65
+ ["feeBps", getU16Decoder()],
66
+ ["tipBps", getU16Decoder()],
67
+ ["state", getMarketStateDecoder()],
68
+ ["winningOutcome", getOptionDecoder(getU8Decoder())],
69
+ [
70
+ "resolutionEvidenceHash",
71
+ getOptionDecoder(fixDecoderSize(getBytesDecoder(), 32)),
72
+ ],
73
+ ["createdAt", getI64Decoder()],
74
+ ["resolvedTs", getI64Decoder()],
75
+ ["ticketCount", getU32Decoder()],
76
+ ["claimedStake", getU64Decoder()],
77
+ ["bump", getU8Decoder()],
78
+ ]);
79
+ }
80
+ /** Gets the codec for {@link Market} account data. */
81
+ export function getMarketCodec() {
82
+ return combineCodec(getMarketEncoder(), getMarketDecoder());
83
+ }
84
+ export function decodeMarket(encodedAccount) {
85
+ return decodeAccount(encodedAccount, getMarketDecoder());
86
+ }
87
+ export async function fetchMarket(rpc, address, config) {
88
+ const maybeAccount = await fetchMaybeMarket(rpc, address, config);
89
+ assertAccountExists(maybeAccount);
90
+ return maybeAccount;
91
+ }
92
+ export async function fetchMaybeMarket(rpc, address, config) {
93
+ const maybeAccount = await fetchEncodedAccount(rpc, address, config);
94
+ return decodeMarket(maybeAccount);
95
+ }
96
+ export async function fetchAllMarket(rpc, addresses, config) {
97
+ const maybeAccounts = await fetchAllMaybeMarket(rpc, addresses, config);
98
+ assertAccountsExist(maybeAccounts);
99
+ return maybeAccounts;
100
+ }
101
+ export async function fetchAllMaybeMarket(rpc, addresses, config) {
102
+ const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
103
+ return maybeAccounts.map((maybeAccount) => decodeMarket(maybeAccount));
104
+ }
105
+ //# sourceMappingURL=market.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"market.js","sourceRoot":"","sources":["../../../src/generated/accounts/market.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,cAAc,EACd,gBAAg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ACrE,OAAO,YAAY,CAAC,YAAY,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,GAA+C,EAC/C,SAAyB,EACzB,MAA4B;IAE5B,MAAM,aAAa,GAAG,MAAM,mBAAmB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACxE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACnC,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,GAA+C,EAC/C,SAAyB,EACzB,MAA4B;IAE5B,MAAM,aAAa,GAAG,MAAM,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACzE,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from "@solana/kit";
9
+ export declare const MARKET_TICKET_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
10
+ export declare function getMarketTicketDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
11
+ export type MarketTicket = {
12
+ discriminator: ReadonlyUint8Array;
13
+ market: Address;
14
+ owner: Address;
15
+ nonce: bigint;
16
+ outcomeIndex: number;
17
+ stake: bigint;
18
+ claimed: boolean;
19
+ bump: number;
20
+ };
21
+ export type MarketTicketArgs = {
22
+ market: Address;
23
+ owner: Address;
24
+ nonce: number | bigint;
25
+ outcomeIndex: number;
26
+ stake: number | bigint;
27
+ claimed: boolean;
28
+ bump: number;
29
+ };
30
+ /** Gets the encoder for {@link MarketTicketArgs} account data. */
31
+ export declare function getMarketTicketEncoder(): FixedSizeEncoder<MarketTicketArgs>;
32
+ /** Gets the decoder for {@link MarketTicket} account data. */
33
+ export declare function getMarketTicketDecoder(): FixedSizeDecoder<MarketTicket>;
34
+ /** Gets the codec for {@link MarketTicket} account data. */
35
+ export declare function getMarketTicketCodec(): FixedSizeCodec<MarketTicketArgs, MarketTicket>;
36
+ export declare function decodeMarketTicket<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<MarketTicket, TAddress>;
37
+ export declare function decodeMarketTicket<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<MarketTicket, TAddress>;
38
+ export declare function fetchMarketTicket<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<MarketTicket, TAddress>>;
39
+ export declare function fetchMaybeMarketTicket<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<MarketTicket, TAddress>>;
40
+ export declare function fetchAllMarketTicket(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<MarketTicket>[]>;
41
+ export declare function fetchAllMaybeMarketTicket(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<MarketTicket>[]>;
42
+ export declare function getMarketTicketSize(): number;
43
+ //# sourceMappingURL=marketTicket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketTicket.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/marketTicket.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,mBAAmB,EACnB,oBAAoB,E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,CAE5C"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBooleanDecoder, getBooleanEncoder, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from "@solana/kit";
9
+ export const MARKET_TICKET_DISCRIMINATOR = new Uint8Array([
10
+ 25, 219, 31, 178, 135, 115, 83, 72,
11
+ ]);
12
+ export function getMarketTicketDiscriminatorBytes() {
13
+ return fixEncoderSize(getBytesEncoder(), 8).encode(MARKET_TICKET_DISCRIMINATOR);
14
+ }
15
+ /** Gets the encoder for {@link MarketTicketArgs} account data. */
16
+ export function getMarketTicketEncoder() {
17
+ return transformEncoder(getStructEncoder([
18
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
19
+ ["market", getAddressEncoder()],
20
+ ["owner", getAddressEncoder()],
21
+ ["nonce", getU64Encoder()],
22
+ ["outcomeIndex", getU8Encoder()],
23
+ ["stake", getU64Encoder()],
24
+ ["claimed", getBooleanEncoder()],
25
+ ["bump", getU8Encoder()],
26
+ ]), (value) => ({ ...value, discriminator: MARKET_TICKET_DISCRIMINATOR }));
27
+ }
28
+ /** Gets the decoder for {@link MarketTicket} account data. */
29
+ export function getMarketTicketDecoder() {
30
+ return getStructDecoder([
31
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
32
+ ["market", getAddressDecoder()],
33
+ ["owner", getAddressDecoder()],
34
+ ["nonce", getU64Decoder()],
35
+ ["outcomeIndex", getU8Decoder()],
36
+ ["stake", getU64Decoder()],
37
+ ["claimed", getBooleanDecoder()],
38
+ ["bump", getU8Decoder()],
39
+ ]);
40
+ }
41
+ /** Gets the codec for {@link MarketTicket} account data. */
42
+ export function getMarketTicketCodec() {
43
+ return combineCodec(getMarketTicketEncoder(), getMarketTicketDecoder());
44
+ }
45
+ export function decodeMarketTicket(encodedAccount) {
46
+ return decodeAccount(encodedAccount, getMarketTicketDecoder());
47
+ }
48
+ export async function fetchMarketTicket(rpc, address, config) {
49
+ const maybeAccount = await fetchMaybeMarketTicket(rpc, address, config);
50
+ assertAccountExists(maybeAccount);
51
+ return maybeAccount;
52
+ }
53
+ export async function fetchMaybeMarketTicket(rpc, address, config) {
54
+ const maybeAccount = await fetchEncodedAccount(rpc, address, config);
55
+ return decodeMarketTicket(maybeAccount);
56
+ }
57
+ export async function fetchAllMarketTicket(rpc, addresses, config) {
58
+ const maybeAccounts = await fetchAllMaybeMarketTicket(rpc, addresses, config);
59
+ assertAccountsExist(maybeAccounts);
60
+ return maybeAccounts;
61
+ }
62
+ export async function fetchAllMaybeMarketTicket(rpc, addresses, config) {
63
+ const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
64
+ return maybeAccounts.map((maybeAccount) => decodeMarketTicket(maybeAccount));
65
+ }
66
+ export function getMarketTicketSize() {
67
+ return 91;
68
+ }
69
+ //# sourceMappingURL=marketTicket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketTicket.js","sourceRoot":"","sources":["../../../src/generated/accounts/marketTicket.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,GAYjB,MAAM,aAAa,CAAC;A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,SAAS,EAAE,MAAM,CAAC,CAAC;IACzE,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ export * from "./slip.js";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,WAAW,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ export * from "./slip.js";
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,WAAW,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from "@solana/kit";
9
+ /** BadState: Market is not in the required state */
10
+ export declare const SLIP_ERROR__BAD_STATE = 6000;
11
+ /** ClaimNotOpen: Proof timestamp is before the market resolution boundary */
12
+ export declare const SLIP_ERROR__CLAIM_NOT_OPEN = 6001;
13
+ /** ProofBeforeEntryDeadline: TxLINE proof predates the market entry deadline */
14
+ export declare const SLIP_ERROR__PROOF_BEFORE_ENTRY_DEADLINE = 6002;
15
+ /** SettlementWindowClosed: The proof-settlement window has closed */
16
+ export declare const SLIP_ERROR__SETTLEMENT_WINDOW_CLOSED = 6003;
17
+ /** VoidNotReached: Market is not yet eligible to void */
18
+ export declare const SLIP_ERROR__VOID_NOT_REACHED = 6004;
19
+ /** BpsTooHigh: Fee or tip exceeds the configured ceiling */
20
+ export declare const SLIP_ERROR__BPS_TOO_HIGH = 6005;
21
+ /** WrongRootsAccount: TxLINE roots account owner or PDA is wrong */
22
+ export declare const SLIP_ERROR__WRONG_ROOTS_ACCOUNT = 6006;
23
+ /** ProofInvalid: Merkle proof does not fold to the anchored TxLINE root */
24
+ export declare const SLIP_ERROR__PROOF_INVALID = 6007;
25
+ /** FixtureMismatch: Proof fixture does not match the market expression */
26
+ export declare const SLIP_ERROR__FIXTURE_MISMATCH = 6008;
27
+ /** EpochDayMismatch: Proof epoch day does not match the roots account */
28
+ export declare const SLIP_ERROR__EPOCH_DAY_MISMATCH = 6009;
29
+ /** MissingSecondStat: Expression and proof disagree about the second stat */
30
+ export declare const SLIP_ERROR__MISSING_SECOND_STAT = 6010;
31
+ /** StatKeyMismatch: Proof stat key does not match the market expression */
32
+ export declare const SLIP_ERROR__STAT_KEY_MISMATCH = 6011;
33
+ /** Overflow: Arithmetic overflow */
34
+ export declare const SLIP_ERROR__OVERFLOW = 6012;
35
+ /** EntryClosed: Entry deadline has passed */
36
+ export declare const SLIP_ERROR__ENTRY_CLOSED = 6013;
37
+ /** BadNumeric: Numeric value is outside the supported range */
38
+ export declare const SLIP_ERROR__BAD_NUMERIC = 6014;
39
+ /** InvalidTerms: Expression does not map to canonical TxLINE stat metadata */
40
+ export declare const SLIP_ERROR__INVALID_TERMS = 6015;
41
+ /** FixtureNotFinal: TxLINE proof is not from a terminal match update */
42
+ export declare const SLIP_ERROR__FIXTURE_NOT_FINAL = 6016;
43
+ /** StakeBelowMinimum: Ticket stake is below the one-token minimum */
44
+ export declare const SLIP_ERROR__STAKE_BELOW_MINIMUM = 6017;
45
+ /** WrongMintDecimals: Settlement mint must use six decimals */
46
+ export declare const SLIP_ERROR__WRONG_MINT_DECIMALS = 6018;
47
+ /** LosingTicket: Only a ticket on the winning outcome may claim */
48
+ export declare const SLIP_ERROR__LOSING_TICKET = 6019;
49
+ /** TicketAlreadyClaimed: Ticket was already claimed */
50
+ export declare const SLIP_ERROR__TICKET_ALREADY_CLAIMED = 6020;
51
+ /** InvalidOutcomes: Market needs 2–5 named outcomes and a complete contiguous band partition */
52
+ export declare const SLIP_ERROR__INVALID_OUTCOMES = 6021;
53
+ /** InvalidOutcomeIndex: Outcome index is outside this market */
54
+ export declare const SLIP_ERROR__INVALID_OUTCOME_INDEX = 6022;
55
+ /** WrongSettlementMode: This instruction does not match the market settlement mode */
56
+ export declare const SLIP_ERROR__WRONG_SETTLEMENT_MODE = 6023;
57
+ export type SlipError = typeof SLIP_ERROR__BAD_NUMERIC | typeof SLIP_ERROR__BAD_STATE | typeof SLIP_ERROR__BPS_TOO_HIGH | typeof SLIP_ERROR__CLAIM_NOT_OPEN | typeof SLIP_ERROR__ENTRY_CLOSED | typeof SLIP_ERROR__EPOCH_DAY_MISMATCH | typeof SLIP_ERROR__FIXTURE_MISMATCH | typeof SLIP_ERROR__FIXTURE_NOT_FINAL | typeof SLIP_ERROR__INVALID_OUTCOME_INDEX | typeof SLIP_ERROR__INVALID_OUTCOMES | typeof SLIP_ERROR__INVALID_TERMS | typeof SLIP_ERROR__LOSING_TICKET | typeof SLIP_ERROR__MISSING_SECOND_STAT | typeof SLIP_ERROR__OVERFLOW | typeof SLIP_ERROR__PROOF_BEFORE_ENTRY_DEADLINE | typeof SLIP_ERROR__PROOF_INVALID | typeof SLIP_ERROR__SETTLEMENT_WINDOW_CLOSED | typeof SLIP_ERROR__STAKE_BELOW_MINIMUM | typeof SLIP_ERROR__STAT_KEY_MISMATCH | typeof SLIP_ERROR__TICKET_ALREADY_CLAIMED | typeof SLIP_ERROR__VOID_NOT_REACHED | typeof SLIP_ERROR__WRONG_MINT_DECIMALS | typeof SLIP_ERROR__WRONG_ROOTS_ACCOUNT | typeof SLIP_ERROR__WRONG_SETTLEMENT_MODE;
58
+ export declare function getSlipErrorMessage(code: SlipError): string;
59
+ export declare function isSlipError<TProgramErrorCode extends SlipError>(error: unknown, transactionMessage: {
60
+ instructions: Record<number, {
61
+ programAddress: Address;
62
+ }>;
63
+ }, code?: TProgramErrorCode): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{
64
+ context: Readonly<{
65
+ code: TProgramErrorCode;
66
+ }>;
67
+ }>;
68
+ //# sourceMappingURL=slip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slip.d.ts","sourceRoot":"","sources":["../../../src/generated/errors/slip.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,uCAAuC,EAC5C,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAGrB,oDAAoD;AACpD,eAAO,MAAM,qBAAqB,OAAS,CAAC;AAC5C,6EAA6E;AAC7E,eAAO,MAAM,0BAA0B,OAAS,CAAC;AACjD,gFAAgF;AAChF,eAAO,MAAM,uCAAuC,OAAS,CAAC;AAC9D,qEAAqE;AACrE,eAAO,MAAM,oCAAoC,OAAS,CAAC;AAC3D,yDAAyD;AACzD,eAAO,MAAM,4BAA4B,OAAS,CAAC;AACnD,4DAA4D;AAC5D,eAAO,MAAM,wBAAwB,OAAS,CAAC;AAC/C,oEAAoE;AACpE,eAAO,MAAM,+BAA+B,OAAS,CAAC;AACtD,2EAA2E;AAC3E,eAAO,MAAM,yBAAyB,OAAS,CAAC;AAChD,0EAA0E;AAC1E,eAAO,MAAM,4BAA4B,OAAS,CAAC;AACnD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,kCAAkC,GACzC,OAAO,4BAA4B,GACnC,OAAO,+BAA+B,GACtC,OAAO,+BAA+B,GACtC,OAAO,iCAAiC,CAAC;AAgC7C,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAM3D;AAED,wBAAgB,WAAW,CAAC,iBAAiB,SAAS,SAAS,EAC7D,KAAK,EAAE,OAAO,EACd,kBAAkB,EAAE;IAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC3D,EACD,IAAI,CAAC,EAAE,iBAAiB,GACvB,KAAK,IAAI,WAAW,CAAC,OAAO,uCAAuC,CAAC,GACrE,QAAQ,CAAC;IAAE,OAAO,EAAE,QAAQ,CAAC;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAO7D"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { isProgramError, } from "@solana/kit";
9
+ import { SLIP_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ /** BadState: Market is not in the required state */
11
+ export const SLIP_ERROR__BAD_STATE = 0x1770; // 6000
12
+ /** ClaimNotOpen: Proof timestamp is before the market resolution boundary */
13
+ export const SLIP_ERROR__CLAIM_NOT_OPEN = 0x1771; // 6001
14
+ /** ProofBeforeEntryDeadline: TxLINE proof predates the market entry deadline */
15
+ export const SLIP_ERROR__PROOF_BEFORE_ENTRY_DEADLINE = 0x1772; // 6002
16
+ /** SettlementWindowClosed: The proof-settlement window has closed */
17
+ export const SLIP_ERROR__SETTLEMENT_WINDOW_CLOSED = 0x1773; // 6003
18
+ /** VoidNotReached: Market is not yet eligible to void */
19
+ export const SLIP_ERROR__VOID_NOT_REACHED = 0x1774; // 6004
20
+ /** BpsTooHigh: Fee or tip exceeds the configured ceiling */
21
+ export const SLIP_ERROR__BPS_TOO_HIGH = 0x1775; // 6005
22
+ /** WrongRootsAccount: TxLINE roots account owner or PDA is wrong */
23
+ export const SLIP_ERROR__WRONG_ROOTS_ACCOUNT = 0x1776; // 6006
24
+ /** ProofInvalid: Merkle proof does not fold to the anchored TxLINE root */
25
+ export const SLIP_ERROR__PROOF_INVALID = 0x1777; // 6007
26
+ /** FixtureMismatch: Proof fixture does not match the market expression */
27
+ export const SLIP_ERROR__FIXTURE_MISMATCH = 0x1778; // 6008
28
+ /** EpochDayMismatch: Proof epoch day does not match the roots account */
29
+ export const SLIP_ERROR__EPOCH_DAY_MISMATCH = 0x1779; // 6009
30
+ /** MissingSecondStat: Expression and proof disagree about the second stat */
31
+ export const SLIP_ERROR__MISSING_SECOND_STAT = 0x177a; // 6010
32
+ /** StatKeyMismatch: Proof stat key does not match the market expression */
33
+ export const SLIP_ERROR__STAT_KEY_MISMATCH = 0x177b; // 6011
34
+ /** Overflow: Arithmetic overflow */
35
+ export const SLIP_ERROR__OVERFLOW = 0x177c; // 6012
36
+ /** EntryClosed: Entry deadline has passed */
37
+ export const SLIP_ERROR__ENTRY_CLOSED = 0x177d; // 6013
38
+ /** BadNumeric: Numeric value is outside the supported range */
39
+ export const SLIP_ERROR__BAD_NUMERIC = 0x177e; // 6014
40
+ /** InvalidTerms: Expression does not map to canonical TxLINE stat metadata */
41
+ export const SLIP_ERROR__INVALID_TERMS = 0x177f; // 6015
42
+ /** FixtureNotFinal: TxLINE proof is not from a terminal match update */
43
+ export const SLIP_ERROR__FIXTURE_NOT_FINAL = 0x1780; // 6016
44
+ /** StakeBelowMinimum: Ticket stake is below the one-token minimum */
45
+ export const SLIP_ERROR__STAKE_BELOW_MINIMUM = 0x1781; // 6017
46
+ /** WrongMintDecimals: Settlement mint must use six decimals */
47
+ export const SLIP_ERROR__WRONG_MINT_DECIMALS = 0x1782; // 6018
48
+ /** LosingTicket: Only a ticket on the winning outcome may claim */
49
+ export const SLIP_ERROR__LOSING_TICKET = 0x1783; // 6019
50
+ /** TicketAlreadyClaimed: Ticket was already claimed */
51
+ export const SLIP_ERROR__TICKET_ALREADY_CLAIMED = 0x1784; // 6020
52
+ /** InvalidOutcomes: Market needs 2–5 named outcomes and a complete contiguous band partition */
53
+ export const SLIP_ERROR__INVALID_OUTCOMES = 0x1785; // 6021
54
+ /** InvalidOutcomeIndex: Outcome index is outside this market */
55
+ export const SLIP_ERROR__INVALID_OUTCOME_INDEX = 0x1786; // 6022
56
+ /** WrongSettlementMode: This instruction does not match the market settlement mode */
57
+ export const SLIP_ERROR__WRONG_SETTLEMENT_MODE = 0x1787; // 6023
58
+ let slipErrorMessages;
59
+ if (process.env.NODE_ENV !== "production") {
60
+ slipErrorMessages = {
61
+ [SLIP_ERROR__BAD_NUMERIC]: `Numeric value is outside the supported range`,
62
+ [SLIP_ERROR__BAD_STATE]: `Market is not in the required state`,
63
+ [SLIP_ERROR__BPS_TOO_HIGH]: `Fee or tip exceeds the configured ceiling`,
64
+ [SLIP_ERROR__CLAIM_NOT_OPEN]: `Proof timestamp is before the market resolution boundary`,
65
+ [SLIP_ERROR__ENTRY_CLOSED]: `Entry deadline has passed`,
66
+ [SLIP_ERROR__EPOCH_DAY_MISMATCH]: `Proof epoch day does not match the roots account`,
67
+ [SLIP_ERROR__FIXTURE_MISMATCH]: `Proof fixture does not match the market expression`,
68
+ [SLIP_ERROR__FIXTURE_NOT_FINAL]: `TxLINE proof is not from a terminal match update`,
69
+ [SLIP_ERROR__INVALID_OUTCOME_INDEX]: `Outcome index is outside this market`,
70
+ [SLIP_ERROR__INVALID_OUTCOMES]: `Market needs 2–5 named outcomes and a complete contiguous band partition`,
71
+ [SLIP_ERROR__INVALID_TERMS]: `Expression does not map to canonical TxLINE stat metadata`,
72
+ [SLIP_ERROR__LOSING_TICKET]: `Only a ticket on the winning outcome may claim`,
73
+ [SLIP_ERROR__MISSING_SECOND_STAT]: `Expression and proof disagree about the second stat`,
74
+ [SLIP_ERROR__OVERFLOW]: `Arithmetic overflow`,
75
+ [SLIP_ERROR__PROOF_BEFORE_ENTRY_DEADLINE]: `TxLINE proof predates the market entry deadline`,
76
+ [SLIP_ERROR__PROOF_INVALID]: `Merkle proof does not fold to the anchored TxLINE root`,
77
+ [SLIP_ERROR__SETTLEMENT_WINDOW_CLOSED]: `The proof-settlement window has closed`,
78
+ [SLIP_ERROR__STAKE_BELOW_MINIMUM]: `Ticket stake is below the one-token minimum`,
79
+ [SLIP_ERROR__STAT_KEY_MISMATCH]: `Proof stat key does not match the market expression`,
80
+ [SLIP_ERROR__TICKET_ALREADY_CLAIMED]: `Ticket was already claimed`,
81
+ [SLIP_ERROR__VOID_NOT_REACHED]: `Market is not yet eligible to void`,
82
+ [SLIP_ERROR__WRONG_MINT_DECIMALS]: `Settlement mint must use six decimals`,
83
+ [SLIP_ERROR__WRONG_ROOTS_ACCOUNT]: `TxLINE roots account owner or PDA is wrong`,
84
+ [SLIP_ERROR__WRONG_SETTLEMENT_MODE]: `This instruction does not match the market settlement mode`,
85
+ };
86
+ }
87
+ export function getSlipErrorMessage(code) {
88
+ if (process.env.NODE_ENV !== "production") {
89
+ return slipErrorMessages[code];
90
+ }
91
+ return "Error message not available in production bundles.";
92
+ }
93
+ export function isSlipError(error, transactionMessage, code) {
94
+ return isProgramError(error, transactionMessage, SLIP_PROGRAM_ADDRESS, code);
95
+ }
96
+ //# sourceMappingURL=slip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slip.js","sourceRoot":"","sources":["../../../src/generated/errors/slip.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,GAIf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,oDAAoD;AACpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,CAAC,OAAO;AACpD,6EAA6E;AAC7E,MAAM,CAA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7C,CAAC,uCAAuC,CAAC,EAAE,iDAAiD;QAC5F,CAAC,yBAAyB,CAAC,EAAE,wDAAwD;QACrF,CAAC,oCAAoC,CAAC,EAAE,wCAAwC;QAChF,CAAC,+BAA+B,CAAC,EAAE,6CAA6C;QAChF,CAAC,6BAA6B,CAAC,EAAE,qDAAqD;QACtF,CAAC,kCAAkC,CAAC,EAAE,4BAA4B;QAClE,CAAC,4BAA4B,CAAC,EAAE,oCAAoC;QACpE,CAAC,+BAA+B,CAAC,EAAE,uCAAuC;QAC1E,CAAC,+BAA+B,CAAC,EAAE,4CAA4C;QAC/E,CAAC,iCAAiC,CAAC,EAAE,4DAA4D;KAClG,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAe;IACjD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,OAAQ,iBAA+C,CAAC,IAAI,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,oDAAoD,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,KAAc,EACd,kBAEC,EACD,IAAwB;IAGxB,OAAO,cAAc,CACnB,KAAK,EACL,kBAAkB,EAClB,oBAAoB,EACpB,IAAI,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ export * from "./accounts/index.js";
9
+ export * from "./errors/index.js";
10
+ export * from "./instructions/index.js";
11
+ export * from "./pdas/index.js";
12
+ export * from "./programs/index.js";
13
+ export * from "./types/index.js";
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ export * from "./accounts/index.js";
9
+ export * from "./errors/index.js";
10
+ export * from "./instructions/index.js";
11
+ export * from "./pdas/index.js";
12
+ export * from "./programs/index.js";
13
+ export * from "./types/index.js";
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
9
+ import { SLIP_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const BUY_TICKET_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
+ export declare function getBuyTicketDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
12
+ export type BuyTicketInstruction<TProgram extends string = typeof SLIP_PROGRAM_ADDRESS, TAccountBuyer extends string | AccountMeta<string> = string, TAccountMarket extends string | AccountMeta<string> = string, TAccountTicket extends string | AccountMeta<string> = string, TAccountBuyerToken extends string | AccountMeta<string> = string, TAccountMarketVault extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
+ TAccountBuyer extends string ? WritableSignerAccount<TAccountBuyer> & AccountSignerMeta<TAccountBuyer> : TAccountBuyer,
14
+ TAccountMarket extends string ? WritableAccount<TAccountMarket> : TAccountMarket,
15
+ TAccountTicket extends string ? WritableAccount<TAccountTicket> : TAccountTicket,
16
+ TAccountBuyerToken extends string ? WritableAccount<TAccountBuyerToken> : TAccountBuyerToken,
17
+ TAccountMarketVault extends string ? WritableAccount<TAccountMarketVault> : TAccountMarketVault,
18
+ TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
19
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
20
+ ...TRemainingAccounts
21
+ ]>;
22
+ export type BuyTicketInstructionData = {
23
+ discriminator: ReadonlyUint8Array;
24
+ outcomeIndex: number;
25
+ amount: bigint;
26
+ nonce: bigint;
27
+ };
28
+ export type BuyTicketInstructionDataArgs = {
29
+ outcomeIndex: number;
30
+ amount: number | bigint;
31
+ nonce: number | bigint;
32
+ };
33
+ export declare function getBuyTicketInstructionDataEncoder(): FixedSizeEncoder<BuyTicketInstructionDataArgs>;
34
+ export declare function getBuyTicketInstructionDataDecoder(): FixedSizeDecoder<BuyTicketInstructionData>;
35
+ export declare function getBuyTicketInstructionDataCodec(): FixedSizeCodec<BuyTicketInstructionDataArgs, BuyTicketInstructionData>;
36
+ export type BuyTicketAsyncInput<TAccountBuyer extends string = string, TAccountMarket extends string = string, TAccountTicket extends string = string, TAccountBuyerToken extends string = string, TAccountMarketVault extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
37
+ buyer: TransactionSigner<TAccountBuyer>;
38
+ market: Address<TAccountMarket>;
39
+ ticket?: Address<TAccountTicket>;
40
+ buyerToken: Address<TAccountBuyerToken>;
41
+ marketVault: Address<TAccountMarketVault>;
42
+ tokenProgram?: Address<TAccountTokenProgram>;
43
+ systemProgram?: Address<TAccountSystemProgram>;
44
+ outcomeIndex: BuyTicketInstructionDataArgs["outcomeIndex"];
45
+ amount: BuyTicketInstructionDataArgs["amount"];
46
+ nonce: BuyTicketInstructionDataArgs["nonce"];
47
+ };
48
+ export declare function getBuyTicketInstructionAsync<TAccountBuyer extends string, TAccountMarket extends string, TAccountTicket extends string, TAccountBuyerToken extends string, TAccountMarketVault extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof SLIP_PROGRAM_ADDRESS>(input: BuyTicketAsyncInput<TAccountBuyer, TAccountMarket, TAccountTicket, TAccountBuyerToken, TAccountMarketVault, TAccountTokenProgram, TAccountSystemProgram>, config?: {
49
+ programAddress?: TProgramAddress;
50
+ }): Promise<BuyTicketInstruction<TProgramAddress, TAccountBuyer, TAccountMarket, TAccountTicket, TAccountBuyerToken, TAccountMarketVault, TAccountTokenProgram, TAccountSystemProgram>>;
51
+ export type BuyTicketInput<TAccountBuyer extends string = string, TAccountMarket extends string = string, TAccountTicket extends string = string, TAccountBuyerToken extends string = string, TAccountMarketVault extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
52
+ buyer: TransactionSigner<TAccountBuyer>;
53
+ market: Address<TAccountMarket>;
54
+ ticket: Address<TAccountTicket>;
55
+ buyerToken: Address<TAccountBuyerToken>;
56
+ marketVault: Address<TAccountMarketVault>;
57
+ tokenProgram?: Address<TAccountTokenProgram>;
58
+ systemProgram?: Address<TAccountSystemProgram>;
59
+ outcomeIndex: BuyTicketInstructionDataArgs["outcomeIndex"];
60
+ amount: BuyTicketInstructionDataArgs["amount"];
61
+ nonce: BuyTicketInstructionDataArgs["nonce"];
62
+ };
63
+ export declare function getBuyTicketInstruction<TAccountBuyer extends string, TAccountMarket extends string, TAccountTicket extends string, TAccountBuyerToken extends string, TAccountMarketVault extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof SLIP_PROGRAM_ADDRESS>(input: BuyTicketInput<TAccountBuyer, TAccountMarket, TAccountTicket, TAccountBuyerToken, TAccountMarketVault, TAccountTokenProgram, TAccountSystemProgram>, config?: {
64
+ programAddress?: TProgramAddress;
65
+ }): BuyTicketInstruction<TProgramAddress, TAccountBuyer, TAccountMarket, TAccountTicket, TAccountBuyerToken, TAccountMarketVault, TAccountTokenProgram, TAccountSystemProgram>;
66
+ export type ParsedBuyTicketInstruction<TProgram extends string = typeof SLIP_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
67
+ programAddress: Address<TProgram>;
68
+ accounts: {
69
+ buyer: TAccountMetas[0];
70
+ market: TAccountMetas[1];
71
+ ticket: TAccountMetas[2];
72
+ buyerToken: TAccountMetas[3];
73
+ marketVault: TAccountMetas[4];
74
+ tokenProgram: TAccountMetas[5];
75
+ systemProgram: TAccountMetas[6];
76
+ };
77
+ data: BuyTicketInstructionData;
78
+ };
79
+ export declare function parseBuyTicketInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedBuyTicketInstruction<TProgram, TAccountMetas>;
80
+ //# sourceMappingURL=buyTicket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buyTicket.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/buyTicket.ts"],"names":[],"mappings":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