precog-markets 1.2.3 → 1.2.4

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/constants.js +55 -48
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "precog-markets",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "JavaScript SDK for Precog Markets — a Solana prediction market program — pari-mutuel markets with SOL, SPL Token, and Token-2022 support",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/constants.js CHANGED
@@ -119,56 +119,63 @@ export const ErrorCode = /** @type {const} */ ({
119
119
  6: "MarketNotOpen",
120
120
  7: "MarketNotResolved",
121
121
  8: "MarketAlreadyResolved",
122
- 9: "DeadlineNotReached",
123
- 10: "DeadlinePassed",
124
- 11: "MarketInDispute",
125
- 12: "ZeroBetAmount",
126
- 13: "BetBelowMinimum",
127
- 14: "InvalidOutcomeIndex",
128
- 15: "NoWinningPosition",
129
- 16: "AlreadyClaimedWinnings",
130
- 17: "RefundNotAvailable",
131
- 18: "UnauthorizedAuthority",
132
- 19: "UnauthorizedAdmin",
133
- 20: "UnauthorizedPositionOwner",
134
- 21: "MissingSignature",
135
- 22: "InvalidPDA",
136
- 23: "AccountAlreadyInitialized",
137
- 24: "AccountNotInitialized",
138
- 25: "InvalidVault",
139
- 26: "InvalidSystemProgram",
140
- 27: "ArithmeticOverflow",
141
- 28: "DivisionByZero",
142
- 29: "FeeTooHigh",
143
- 30: "DisputePeriodExpired",
144
- 31: "DisputePeriodNotExpired",
145
- 32: "InvalidTokenProgram",
146
- 33: "TokenMintMismatch",
147
- 34: "InvalidTokenVaultOwner",
148
- 35: "InvalidTokenAccount",
149
- 36: "TokenTransferFailed",
150
- 37: "DenominationMismatch",
151
- 38: "InvalidMint",
152
- 39: "DecimalsMismatch",
153
- 40: "InvalidMultisigThreshold",
154
- 41: "TooManyMultisigSigners",
155
- 42: "DuplicateMultisigSigner",
156
- 43: "InsufficientMultisigSignatures",
157
- 44: "SignerNotMultisigMember",
158
- 45: "ProposalAlreadyExecuted",
159
- 46: "ProposalExpired",
160
- 47: "TransferHookNotAllowed",
161
- 48: "HarvestNotAuthorized",
162
- 49: "UnsupportedTokenExtension",
163
- 50: "NewDeadlineInPast",
164
- 51: "MarketNotOpenForUpdate",
165
- 52: "MultisigSignersFull",
166
- 53: "CannotRemoveSigner",
167
- 54: "SignerNotFound",
168
- 55: "MarketNotRequired",
122
+ 9: "WinningPoolEmpty",
123
+ 10: "InsufficientDistinctPositions",
124
+ 11: "DeadlineNotReached",
125
+ 12: "DeadlinePassed",
126
+ 13: "MarketInDispute",
127
+ 14: "ZeroBetAmount",
128
+ 15: "BetBelowMinimum",
129
+ 16: "InvalidOutcomeIndex",
130
+ 17: "NoWinningPosition",
131
+ 18: "AlreadyClaimedWinnings",
132
+ 19: "RefundNotAvailable",
133
+ 20: "UnauthorizedAuthority",
134
+ 21: "UnauthorizedAdmin",
135
+ 22: "UnauthorizedPositionOwner",
136
+ 23: "MissingSignature",
137
+ 24: "InvalidPDA",
138
+ 25: "AccountAlreadyInitialized",
139
+ 26: "AccountNotInitialized",
140
+ 27: "InvalidVault",
141
+ 28: "InvalidSystemProgram",
142
+ 29: "ArithmeticOverflow",
143
+ 30: "DivisionByZero",
144
+ 31: "FeeTooHigh",
145
+ 32: "DisputePeriodExpired",
146
+ 33: "DisputePeriodNotExpired",
147
+ 34: "InvalidTokenProgram",
148
+ 35: "TokenMintMismatch",
149
+ 36: "InvalidTokenVaultOwner",
150
+ 37: "InvalidTokenAccount",
151
+ 38: "TokenTransferFailed",
152
+ 39: "DenominationMismatch",
153
+ 40: "InvalidMint",
154
+ 41: "DecimalsMismatch",
155
+ 42: "TransferFeeExceedsLimit",
156
+ 43: "InsufficientPostFeeAmount",
157
+ 44: "TransferHookNotAllowed",
158
+ 45: "UnsupportedTokenExtension",
159
+ 46: "HarvestNotAuthorized",
160
+ 47: "NewDeadlineInPast",
161
+ 48: "MarketNotOpenForUpdate",
162
+ 49: "MultisigSignersFull",
163
+ 50: "CannotRemoveSigner",
164
+ 51: "SignerNotFound",
165
+ 52: "MarketNotRequired",
166
+ 53: "InvalidMultisigThreshold",
167
+ 54: "TooManyMultisigSigners",
168
+ 55: "DuplicateMultisigSigner",
169
+ 56: "InsufficientMultisigSignatures",
170
+ 57: "SignerNotMultisigMember",
171
+ 58: "ProposalAlreadyExecuted",
172
+ 59: "ProposalExpired",
173
+ 60: "AlreadyApprovedProposal",
174
+ 61: "SignerSetChanged",
175
+ 62: "FeeBelowProtocolMinimum",
169
176
  });
170
177
 
171
178
  /** Map error name → code */
172
179
  export const ErrorName = Object.fromEntries(
173
180
  Object.entries(ErrorCode).map(([k, v]) => [v, Number(k)])
174
- );
181
+ );