Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@ npm-client/**/*.d.ts
npm-admin-client/**/*.js
npm-admin-client/**/*.d.ts

# npm package
npm-client-account-types/dist

.eslintcache
4 changes: 2 additions & 2 deletions admin/create_order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createOrderUiStake } from "../npm-client/src/create_order";
import { PublicKey } from "@solana/web3.js";
import { getProtocolProgram } from "./util";
import { findMarketOutcomePda } from "../npm-admin-client";
import { MarketOutcomeAccount } from "../npm-client";
import { MarketOutcomeAccount } from "../npm-client-account-types";

// yarn run create_order <MARKET_ID> <OUTCOME_INDEX> <FOR (true|false)> <PRICE> <STAKE>
// or tsc; ANCHOR_WALLET=~/.config/solana/id.json yarn ts-node client.ts create_order <MARKET_ID> <OUTCOME_INDEX> <FOR (true|false)> <PRICE> <STAKE>
Expand All @@ -27,7 +27,7 @@ export async function create_order() {
(
await findMarketOutcomePda(protocolProgram, marketPk, marketOutcomeIndex)
).data.pda,
)) as MarketOutcomeAccount;
)) as unknown as MarketOutcomeAccount;

const result = await createOrderUiStake(
protocolProgram,
Expand Down
2 changes: 1 addition & 1 deletion npm-admin-client/docs/endpoints/market_helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const mintPk = new PublicKey('7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU')
const mintInfo = await getMintInfo(program, mintPk)
```

Returns **MintInfo** mint information including mint authority and decimals
Returns **Mint** mint information including mint authority and decimals

## findEscrowPda

Expand Down
44 changes: 12 additions & 32 deletions npm-admin-client/docs/types/market_outcomes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,47 @@

* [GetPublicKeys][1]
* [Properties][2]
* [MarketOutcomeAccount][3]
* [MarketOutcomeAccounts][3]
* [Properties][4]
* [MarketOutcomeAccounts][5]
* [MarketOutcomeTitlesResponse][5]
* [Properties][6]
* [MarketOutcomeTitlesResponse][7]
* [Properties][8]

## GetPublicKeys

Type: {publicKeys: [Array][9]\<PublicKey>}
Type: {publicKeys: [Array][7]\<PublicKey>}

### Properties

* `publicKeys` **[Array][9]\<PublicKey>**&#x20;

## MarketOutcomeAccount

Type: {index: [number][10], title: [string][11], market: PublicKey, prices: (PublicKey | null), priceLadder: [Array][9]<[number][10]>}

### Properties

* `index` **[number][10]**&#x20;
* `title` **[string][11]**&#x20;
* `market` **PublicKey**&#x20;
* `prices` **(PublicKey | null)**&#x20;
* `priceLadder` **[Array][9]<[number][10]>**&#x20;
* `publicKeys` **[Array][7]\<PublicKey>**&#x20;

## MarketOutcomeAccounts

Type: {marketOutcomeAccounts: [Array][9]\<GetAccount<[MarketOutcomeAccount][3]>>}
Type: {marketOutcomeAccounts: [Array][7]\<GetAccount\<MarketOutcomeAccount>>}

### Properties

* `marketOutcomeAccounts` **[Array][9]\<GetAccount<[MarketOutcomeAccount][3]>>**&#x20;
* `marketOutcomeAccounts` **[Array][7]\<GetAccount\<MarketOutcomeAccount>>**&#x20;

## MarketOutcomeTitlesResponse

Type: {marketOutcomeTitles: [Array][9]<[string][11]>}
Type: {marketOutcomeTitles: [Array][7]<[string][8]>}

### Properties

* `marketOutcomeTitles` **[Array][9]<[string][11]>**&#x20;
* `marketOutcomeTitles` **[Array][7]<[string][8]>**&#x20;

[1]: #getpublickeys

[2]: #properties

[3]: #marketoutcomeaccount
[3]: #marketoutcomeaccounts

[4]: #properties-1

[5]: #marketoutcomeaccounts
[5]: #marketoutcometitlesresponse

[6]: #properties-2

[7]: #marketoutcometitlesresponse

[8]: #properties-3

[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array

[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array

[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
17 changes: 0 additions & 17 deletions npm-admin-client/docs/types/market_type.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

* [MarketType][1]
* [Properties][2]

## MarketType

Type: {name: [string][3]}

### Properties

* `name` **[string][3]**&#x20;

[1]: #markettype

[2]: #properties

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
Loading