-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from streamflow-finance/v7
V7 Release - staking - CJS/ESM builds
- Loading branch information
Showing
108 changed files
with
11,934 additions
and
5,913 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/env sh | ||
#!/bin/sh | ||
|
||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run lint | ||
pnpm lint --parallel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"printWidth": 120, | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,4 @@ | ||
{ | ||
"version": "1.0.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Jest: current file", | ||
//"env": { "NODE_ENV": "test" }, | ||
"program": "${workspaceFolder}/node_modules/.bin/jest", | ||
"args": ["${fileBasenameNoExtension}", "--config", "jest.config.js"], | ||
"console": "integratedTerminal", | ||
"disableOptimisticBPs": true, | ||
"windows": { | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | ||
} | ||
} | ||
] | ||
"configurations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
{ | ||
"prettier.requireConfig": true, | ||
"eslint.enable": true, | ||
"eslint.debug": false, | ||
"eslint.workingDirectories": [ | ||
// Monorepo directories | ||
{ | ||
"pattern": "./packages/*/" | ||
} | ||
], | ||
"cSpell.words": [ | ||
"Streamflow" | ||
] | ||
} | ||
"prettier.requireConfig": false, | ||
"eslint.enable": true, | ||
"eslint.debug": false, | ||
"eslint.workingDirectories": [ | ||
// Monorepo directories | ||
{ | ||
"pattern": "./packages/*/" | ||
} | ||
], | ||
"cSpell.words": ["permissionless", "Solana", "Streamflow", "Unstake"], | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"typescript.preferences.importModuleSpecifierEnding": "js", | ||
"javascript.preferences.importModuleSpecifierEnding": "js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{ | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"version": "6.5.1", | ||
"packages": ["packages/*"], | ||
"version": "7.0.0-alpha.12", | ||
"$schema": "node_modules/lerna/schemas/lerna-schema.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from "./types"; | ||
export * from "./utils"; | ||
export * from "./types.js"; | ||
export * from "./lib/assertions.js"; | ||
export * from "./lib/utils.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const prefix = "Assertion failed"; | ||
export const invariant: (condition: any, message?: string | (() => string)) => asserts condition = ( | ||
condition, | ||
message, | ||
) => { | ||
if (condition) { | ||
return; | ||
} | ||
const provided: string | undefined = typeof message === "function" ? message() : message; | ||
const value: string = provided ? `${prefix}: ${provided}` : prefix; | ||
throw new Error(value); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { MemcmpFilter, PublicKey } from "@solana/web3.js"; | ||
|
||
export const getFilters = <T extends Record<string, number | PublicKey>>( | ||
criteria: T, | ||
byteOffsets: Record<keyof T, number>, | ||
): MemcmpFilter[] => { | ||
return Object.entries(criteria).reduce((acc, [key, value]) => { | ||
const criteriaKey = key as keyof typeof criteria; | ||
const effectiveByteOffset = byteOffsets[criteriaKey]; | ||
if (criteria[criteriaKey] && effectiveByteOffset) { | ||
acc.push({ | ||
memcmp: { | ||
offset: effectiveByteOffset, | ||
bytes: value.toString(), | ||
}, | ||
}); | ||
} | ||
return acc; | ||
}, [] as MemcmpFilter[]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from "./instructions"; | ||
export * from "./types"; | ||
export * from "./utils"; | ||
export * from "./account-filters.js"; | ||
export * from "./instructions.js"; | ||
export * from "./public-key.js"; | ||
export * from "./types.js"; | ||
export * from "./utils.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { PublicKey } from "@solana/web3.js"; | ||
|
||
export const pk = (address: string | PublicKey): PublicKey => { | ||
return typeof address === "string" ? new PublicKey(address) : address; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "../../tsconfig.cjs.json", | ||
"compilerOptions": { | ||
"outDir": "./dist/cjs" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "../../tsconfig.esm.json", | ||
"compilerOptions": { | ||
"outDir": "./dist/esm" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
{ | ||
"extends": [ | ||
"../../typedoc.base.json" | ||
], | ||
"entryPoints": [ | ||
"./index.ts", | ||
"./solana/index.ts", | ||
] | ||
} | ||
"extends": ["../../typedoc.base.json"], | ||
"entryPoints": ["./index.ts", "./solana/index.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.