-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bring in library from old repo
- Loading branch information
Showing
26 changed files
with
7,019 additions
and
784 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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,42 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["**/*"], | ||
"plugins": ["@nx"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nx/enforce-module-boundaries": [ | ||
"error", | ||
{ | ||
"enforceBuildableLibDependency": true, | ||
"allow": [], | ||
"depConstraints": [ | ||
{ | ||
"sourceTag": "*", | ||
"onlyDependOnLibsWithTags": ["*"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nx/typescript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nx/javascript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], | ||
"env": { | ||
"jest": true | ||
}, | ||
"rules": {} | ||
} | ||
] | ||
} |
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 @@ | ||
# Add files here to ignore them from prettier formatting | ||
/dist | ||
/coverage | ||
/.nx/cache |
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,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
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,28 @@ | ||
# path to a directory with all packages | ||
storage: ../tmp/local-registry/storage | ||
|
||
# a list of other known repositories we can talk to | ||
uplinks: | ||
npmjs: | ||
url: https://registry.npmjs.org/ | ||
maxage: 60m | ||
|
||
packages: | ||
'**': | ||
# give all users (including non-authenticated users) full access | ||
# because it is a local registry | ||
access: $all | ||
publish: $all | ||
unpublish: $all | ||
|
||
# if package is not available locally, proxy requests to npm registry | ||
proxy: npmjs | ||
|
||
# log settings | ||
logs: | ||
type: stdout | ||
format: pretty | ||
level: warn | ||
|
||
publish: | ||
allow_offline: true # set offline to true to allow publish offline |
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,7 @@ | ||
{ | ||
"recommendations": [ | ||
|
||
"nrwl.angular-console", | ||
"esbenp.prettier-vscode" | ||
"esbenp.prettier-vscode", | ||
"firsttris.vscode-jest-runner" | ||
] | ||
} |
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 { getJestProjectsAsync } from '@nx/jest' | ||
|
||
export default async () => ({ | ||
projects: await getJestProjectsAsync(), | ||
}) |
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,3 @@ | ||
const nxPreset = require('@nx/jest/preset').default | ||
|
||
module.exports = { ...nxPreset } |
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,53 @@ | ||
{ | ||
"$schema": "./node_modules/nx/schemas/nx-schema.json", | ||
"namedInputs": { | ||
"default": [ | ||
"{projectRoot}/**/*", | ||
"sharedGlobals" | ||
], | ||
"default": ["{projectRoot}/**/*", "sharedGlobals"], | ||
"production": [ | ||
"default" | ||
"default", | ||
"!{projectRoot}/.eslintrc.json", | ||
"!{projectRoot}/eslint.config.js", | ||
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", | ||
"!{projectRoot}/tsconfig.spec.json", | ||
"!{projectRoot}/jest.config.[jt]s", | ||
"!{projectRoot}/src/test-setup.[jt]s", | ||
"!{projectRoot}/test-setup.[jt]s" | ||
], | ||
"sharedGlobals": [] | ||
}, | ||
"nxCloudAccessToken": "NzE5YjFkNTUtZTk1Ni00NjU2LWExOGMtODIxNmJkOWMxNDlifHJlYWQtd3JpdGU=" | ||
"nxCloudAccessToken": "NzE5YjFkNTUtZTk1Ni00NjU2LWExOGMtODIxNmJkOWMxNDlifHJlYWQtd3JpdGU=", | ||
"useInferencePlugins": false, | ||
"targetDefaults": { | ||
"@nx/rollup:rollup": { | ||
"cache": true, | ||
"dependsOn": ["^build"], | ||
"inputs": ["production", "^production"] | ||
}, | ||
"@nx/eslint:lint": { | ||
"cache": true, | ||
"inputs": [ | ||
"default", | ||
"{workspaceRoot}/.eslintrc.json", | ||
"{workspaceRoot}/.eslintignore", | ||
"{workspaceRoot}/eslint.config.js" | ||
] | ||
}, | ||
"@nx/jest:jest": { | ||
"cache": true, | ||
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"], | ||
"options": { | ||
"passWithNoTests": true | ||
}, | ||
"configurations": { | ||
"ci": { | ||
"ci": true, | ||
"codeCoverage": true | ||
} | ||
} | ||
} | ||
}, | ||
"release": { | ||
"version": { | ||
"preVersionCommand": "pnpm dlx nx run-many -t build" | ||
} | ||
} | ||
} |
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,30 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.json"], | ||
"parser": "jsonc-eslint-parser", | ||
"rules": { | ||
"@nx/dependency-checks": [ | ||
"error", | ||
{ | ||
"ignoredFiles": ["{projectRoot}/rollup.config.{js,ts,mjs,mts}"] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
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,29 @@ | ||
{ | ||
"jsc": { | ||
"target": "es2017", | ||
"parser": { | ||
"syntax": "typescript", | ||
"decorators": true, | ||
"dynamicImport": true | ||
}, | ||
"transform": { | ||
"decoratorMetadata": true, | ||
"legacyDecorator": true | ||
}, | ||
"keepClassNames": true, | ||
"externalHelpers": true, | ||
"loose": true | ||
}, | ||
"module": { | ||
"type": "es6" | ||
}, | ||
"sourceMaps": true, | ||
"exclude": [ | ||
"jest.config.ts", | ||
".*\\.spec.tsx?$", | ||
".*\\.test.tsx?$", | ||
"./src/jest-setup.ts$", | ||
"./**/jest-setup.ts$", | ||
".*.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,11 @@ | ||
# solana-verify-wallet | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
## Building | ||
|
||
Run `nx build solana-verify-wallet` to build the library. | ||
|
||
## Running unit tests | ||
|
||
Run `nx test solana-verify-wallet` to execute the unit tests via [Jest](https://jestjs.io). |
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,30 @@ | ||
/* eslint-disable */ | ||
import { readFileSync } from 'fs'; | ||
|
||
// Reading the SWC compilation config and remove the "exclude" | ||
// for the test files to be compiled by SWC | ||
const { exclude: _, ...swcJestConfig } = JSON.parse( | ||
readFileSync(`${__dirname}/.swcrc`, 'utf-8') | ||
); | ||
|
||
// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. | ||
// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" | ||
if (swcJestConfig.swcrc === undefined) { | ||
swcJestConfig.swcrc = false; | ||
} | ||
|
||
// Uncomment if using global setup/teardown files being transformed via swc | ||
// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries | ||
// jest needs EsModule Interop to find the default exported setup/teardown functions | ||
// swcJestConfig.module.noInterop = false; | ||
|
||
export default { | ||
displayName: 'solana-verify-wallet', | ||
preset: '../../jest.preset.js', | ||
transform: { | ||
'^.+\\.[tj]s$': ['@swc/jest', swcJestConfig], | ||
}, | ||
moduleFileExtensions: ['ts', 'js', 'html'], | ||
testEnvironment: 'node', | ||
coverageDirectory: '../../coverage/packages/solana-verify-wallet', | ||
}; |
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 @@ | ||
{ | ||
"name": "@pubkeyapp/solana-verify-wallet", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"@solana/web3.js": "^1.90.1", | ||
"bs58": "^5.0.0", | ||
"tweetnacl": "^1.0.3" | ||
}, | ||
"type": "commonjs", | ||
"main": "./index.cjs", | ||
"module": "./index.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,46 @@ | ||
{ | ||
"name": "solana-verify-wallet", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "packages/solana-verify-wallet/src", | ||
"projectType": "library", | ||
"targets": { | ||
"build": { | ||
"executor": "@nx/rollup:rollup", | ||
"outputs": ["{options.outputPath}"], | ||
"options": { | ||
"outputPath": "dist/packages/solana-verify-wallet", | ||
"main": "packages/solana-verify-wallet/src/index.ts", | ||
"tsConfig": "packages/solana-verify-wallet/tsconfig.lib.json", | ||
"assets": [], | ||
"project": "packages/solana-verify-wallet/package.json", | ||
"compiler": "swc", | ||
"format": ["cjs", "esm"], | ||
"external": "all" | ||
} | ||
}, | ||
"nx-release-publish": { | ||
"options": { | ||
"packageRoot": "dist/{projectRoot}" | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint" | ||
}, | ||
"test": { | ||
"executor": "@nx/jest:jest", | ||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
"options": { | ||
"jestConfig": "packages/solana-verify-wallet/jest.config.ts" | ||
} | ||
} | ||
}, | ||
"tags": [], | ||
"release": { | ||
"version": { | ||
"generatorOptions": { | ||
"packageRoot": "dist/{projectRoot}", | ||
"currentVersionResolver": "git-tag" | ||
} | ||
} | ||
} | ||
} |
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,2 @@ | ||
export * from './lib/create-signature' | ||
export * from './lib/verify-signature' |
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,3 @@ | ||
import { PublicKey } from '@solana/web3.js' | ||
|
||
export const MEMO_PROGRAM_ID = new PublicKey('MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr') |
Oops, something went wrong.