cleaned up package json
This commit is contained in:
parent
f728a4f64f
commit
f5b63351e0
|
@ -31,7 +31,7 @@
|
|||
"typescript": "^4.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mango/client": "git+ssh://git@github.com:blockworks-foundation/mango-client-ts.git#srm_account",
|
||||
"@blockworks-foundation/mango-client": "^0.1.4",
|
||||
"@project-serum/serum": "^0.13.20",
|
||||
"@solana/spl-token": "0.0.13",
|
||||
"@solana/web3.js": "^0.90.0",
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import { IDS, MangoClient, MarginAccount, NUM_TOKENS } from '@mango/client';
|
||||
import { IDS, MangoClient, MarginAccount, NUM_MARKETS } from '@blockworks-foundation/mango-client';
|
||||
|
||||
import { Account, Connection, PublicKey, TransactionSignature } from '@solana/web3.js';
|
||||
import { Account, Connection, PublicKey } from '@solana/web3.js';
|
||||
import * as fs from 'fs';
|
||||
import { Market } from '@project-serum/serum';
|
||||
import { NUM_MARKETS } from '@mango/client/lib/layout';
|
||||
import { sleep } from './utils';
|
||||
|
||||
async function setupMarginAccounts() {
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
// TODO make sure funds in liquidatable account can actually be withdrawn
|
||||
// -- can't be withdrawn if total deposits == total_borrows
|
||||
|
||||
import {
|
||||
findLargestTokenAccountForOwner,
|
||||
getMultipleAccounts,
|
||||
IDS,
|
||||
MangoClient,
|
||||
MangoGroup,
|
||||
MarginAccount,
|
||||
MarginAccountLayout, nativeToUi,
|
||||
NUM_TOKENS, parseTokenAccountData,
|
||||
findLargestTokenAccountForOwner,
|
||||
} from '@mango/client';
|
||||
import { Account, Connection, LAMPORTS_PER_SOL, PublicKey, TransactionSignature } from '@solana/web3.js';
|
||||
nativeToUi,
|
||||
NUM_MARKETS,
|
||||
NUM_TOKENS,
|
||||
parseTokenAccountData,
|
||||
} from '@blockworks-foundation/mango-client';
|
||||
import { Account, Connection, PublicKey, TransactionSignature } from '@solana/web3.js';
|
||||
import fs from 'fs';
|
||||
import { Market, OpenOrders } from '@project-serum/serum';
|
||||
import { NUM_MARKETS } from '@mango/client/lib/layout';
|
||||
import { getUnixTs, sleep } from './utils';
|
||||
import { homedir } from 'os'
|
||||
import { TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
||||
import { Market } from '@project-serum/serum';
|
||||
import { sleep } from './utils';
|
||||
import { homedir } from 'os';
|
||||
|
||||
|
||||
async function drainAccount(
|
||||
|
|
19
src/test.ts
19
src/test.ts
|
@ -1,25 +1,28 @@
|
|||
import {
|
||||
findLargestTokenAccountForOwner,
|
||||
createAccountInstruction,
|
||||
encodeMangoInstruction,
|
||||
findLargestTokenAccountForOwner, getFilteredProgramAccounts,
|
||||
IDS,
|
||||
MangoClient,
|
||||
MangoGroup,
|
||||
MarginAccount,
|
||||
MarginAccountLayout, nativeToUi,
|
||||
MarginAccountLayout,
|
||||
nativeToUi, NUM_MARKETS,
|
||||
NUM_TOKENS,
|
||||
} from '@mango/client';
|
||||
} from '@blockworks-foundation/mango-client';
|
||||
import {
|
||||
Account,
|
||||
Connection, LAMPORTS_PER_SOL,
|
||||
Connection,
|
||||
LAMPORTS_PER_SOL,
|
||||
PublicKey,
|
||||
SYSVAR_RENT_PUBKEY,
|
||||
Transaction,
|
||||
TransactionInstruction, TransactionSignature,
|
||||
TransactionInstruction,
|
||||
TransactionSignature,
|
||||
} from '@solana/web3.js';
|
||||
import fs from 'fs';
|
||||
import { getUnixTs, sleep } from './utils';
|
||||
import { createAccountInstruction, getFilteredProgramAccounts } from '@mango/client/lib/utils';
|
||||
import { encodeMangoInstruction, NUM_MARKETS } from '@mango/client/lib/layout';
|
||||
import { Token, MintLayout, AccountLayout, TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
||||
import { AccountLayout, TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
||||
import { homedir } from 'os';
|
||||
import { Market } from '@project-serum/serum';
|
||||
|
||||
|
|
25
yarn.lock
25
yarn.lock
|
@ -314,6 +314,19 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@blockworks-foundation/mango-client@^0.1.4":
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-0.1.4.tgz#76e2905696249626a79f67e4c6b81dc3513dc03e"
|
||||
integrity sha512-vpXNWVQtJheezyWNqUXTSUwtcXnSlW4iPhbMJxWHl0Njz9bZFKEtEItWEiaNpxxA8FUDEwL5wKPiIioMvorg1w==
|
||||
dependencies:
|
||||
"@project-serum/serum" "^0.13.20"
|
||||
"@project-serum/sol-wallet-adapter" "^0.1.4"
|
||||
"@solana/spl-token" "0.0.13"
|
||||
"@solana/web3.js" "^0.90.0"
|
||||
bn.js "^5.1.2"
|
||||
borsh "https://github.com/defactojob/borsh-js#field-mapper"
|
||||
buffer-layout "^1.2.0"
|
||||
|
||||
"@cnakazawa/watch@^1.0.3":
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"
|
||||
|
@ -524,18 +537,6 @@
|
|||
"@types/yargs" "^15.0.0"
|
||||
chalk "^4.0.0"
|
||||
|
||||
"@mango/client@git+ssh://git@github.com:blockworks-foundation/mango-client-ts.git#srm_account":
|
||||
version "0.1.2"
|
||||
resolved "git+ssh://git@github.com:blockworks-foundation/mango-client-ts.git#ed8ef6c0f6740667f1f457107512f3c4ae505ff2"
|
||||
dependencies:
|
||||
"@project-serum/serum" "^0.13.20"
|
||||
"@project-serum/sol-wallet-adapter" "^0.1.4"
|
||||
"@solana/spl-token" "0.0.13"
|
||||
"@solana/web3.js" "^0.90.0"
|
||||
bn.js "^5.1.2"
|
||||
borsh "https://github.com/defactojob/borsh-js#field-mapper"
|
||||
buffer-layout "^1.2.0"
|
||||
|
||||
"@nodelib/fs.scandir@2.1.4":
|
||||
version "2.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69"
|
||||
|
|
Loading…
Reference in New Issue