├── .gitignore ├── .prettierrc ├── typedoc.json ├── rollup.config.ts ├── tsconfig.json ├── package.json ├── .github └── workflows │ └── master.yaml ├── .eslintrc ├── typedoc.css ├── README.md ├── src ├── adapters.ts ├── utils.ts ├── models.ts ├── stream.ts ├── index.ts └── contract.ts └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | node_modules/ 3 | dist/ 4 | vanilla/ 5 | docs/ 6 | package-lock.json 7 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | tabWidth: 2 2 | printWidth: 120 3 | useTabs: false 4 | semi: true 5 | singleQuote: true 6 | trailingComma: "all" 7 | bracketSpacing: true 8 | arrowParens: "avoid" 9 | -------------------------------------------------------------------------------- /typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "src/index.ts" 4 | ], 5 | "out": "docs", 6 | "readme": "none", 7 | "excludePrivate": true, 8 | "includeVersion": true, 9 | "categorizeByGroup": false, 10 | "categoryOrder": [ 11 | "Provider", 12 | "Contract", 13 | "Stream", 14 | "Models", 15 | "Provider Api", 16 | "Utils", 17 | "*" 18 | ], 19 | "sort": [ 20 | "source-order" 21 | ], 22 | "hideGenerator": true, 23 | "customCss": "typedoc.css" 24 | } 25 | -------------------------------------------------------------------------------- /rollup.config.ts: -------------------------------------------------------------------------------- 1 | import typescript from '@rollup/plugin-typescript'; 2 | import terser from '@rollup/plugin-terser'; 3 | import path from 'path'; 4 | 5 | const outDir = 'vanilla'; 6 | const libName = 'everscale'; 7 | 8 | export default { 9 | input: 'src/index.ts', 10 | output: [ 11 | { 12 | format: 'iife', 13 | name: libName, 14 | file: path.join(outDir, 'everscale.js'), 15 | }, 16 | { 17 | format: 'iife', 18 | name: libName, 19 | file: path.join(outDir, 'everscale.min.js'), 20 | plugins: [terser()], 21 | }, 22 | ], 23 | plugins: [ 24 | typescript({ 25 | compilerOptions: { 26 | module: 'esnext', 27 | }, 28 | outDir, 29 | }), 30 | ], 31 | }; 32 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "commonjs", 5 | "outDir": "./dist", 6 | "strict": true, 7 | "noUnusedParameters": true, 8 | "noImplicitReturns": true, 9 | "noFallthroughCasesInSwitch": true, 10 | "moduleResolution": "node", 11 | "typeRoots": [ 12 | "node_modules/@types", 13 | "node_modules/web-ext-types" 14 | ], 15 | "allowSyntheticDefaultImports": true, 16 | "esModuleInterop": true, 17 | "skipLibCheck": true, 18 | "forceConsistentCasingInFileNames": true, 19 | "declaration": true, 20 | "downlevelIteration": true, 21 | "lib": [ 22 | "dom", 23 | "es5", 24 | "es6", 25 | "es2017.object", 26 | "es2018", 27 | "scripthost", 28 | "ESNext" 29 | ], 30 | }, 31 | "include": [ 32 | "src/**/*" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "everscale-inpage-provider", 3 | "version": "0.6.3", 4 | "description": "Web3-like interface to the Everscale blockchain", 5 | "repository": "https://github.com/broxus/everscale-inpage-provider", 6 | "main": "dist/index.js", 7 | "types": "dist/index.d.ts", 8 | "scripts": { 9 | "build": "tsc", 10 | "build:vanilla": "rollup --config rollup.config.ts --configPlugin typescript", 11 | "build:docs": "typedoc", 12 | "lint": "npx eslint ." 13 | }, 14 | "author": "", 15 | "license": "GPL-3.0", 16 | "devDependencies": { 17 | "@rollup/plugin-terser": "^0.2.1", 18 | "@rollup/plugin-typescript": "^10.0.1", 19 | "@typescript-eslint/eslint-plugin": "^5.31.0", 20 | "@typescript-eslint/parser": "^5.31.0", 21 | "eslint": "^8.21.0", 22 | "eslint-config-prettier": "^8.5.0", 23 | "eslint-plugin-prettier": "^4.2.1", 24 | "rollup": "^3.9.0", 25 | "typedoc": "^0.23.10", 26 | "typedoc-plugin-missing-exports": "^0.23.0", 27 | "typescript": "^4.2.4" 28 | }, 29 | "files": [ 30 | "/dist" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /.github/workflows/master.yaml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - master 5 | 6 | name: master 7 | 8 | jobs: 9 | docs: 10 | name: Generate docs 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout sources 14 | uses: actions/checkout@v4 15 | 16 | - name: Use Node.js 22 17 | uses: actions/setup-node@v4 18 | with: 19 | node-version: 22 20 | 21 | - name: Install dependencies 22 | run: npm install 23 | 24 | - name: Generate documentation 25 | run: npm run build:docs 26 | 27 | - name: Deploy 28 | uses: peaceiris/actions-gh-pages@v4 29 | with: 30 | github_token: ${{ secrets.GITHUB_TOKEN }} 31 | publish_dir: ./docs 32 | 33 | vanilla: 34 | name: Build minified dist 35 | runs-on: ubuntu-latest 36 | steps: 37 | - name: Checkout sources 38 | uses: actions/checkout@v4 39 | 40 | - name: Use Node.js 22 41 | uses: actions/setup-node@v4 42 | with: 43 | node-version: 22 44 | 45 | - name: Install dependencies 46 | run: npm install 47 | 48 | - name: Build 49 | run: npm run build:vanilla 50 | 51 | - name: Upload artifacts 52 | uses: actions/upload-artifact@v4 53 | with: 54 | name: vanilla-dist 55 | path: | 56 | vanilla 57 | !vanilla/**/*.d.ts 58 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true, 5 | "webextensions": true, 6 | "worker": true, 7 | "serviceworker": true 8 | }, 9 | "extends": [ 10 | "eslint:recommended", 11 | "plugin:@typescript-eslint/recommended", 12 | "prettier" 13 | ], 14 | "parser": "@typescript-eslint/parser", 15 | "parserOptions": { 16 | "sourceType": "module" 17 | }, 18 | "plugins": [ 19 | "@typescript-eslint", 20 | "prettier" 21 | ], 22 | "ignorePatterns": [ 23 | "dist/*", 24 | "docs/*" 25 | ], 26 | "rules": { 27 | "no-constant-condition": "off", 28 | "no-var": "error", 29 | "semi": "error", 30 | "no-multi-spaces": "error", 31 | "space-in-parens": "error", 32 | "no-multiple-empty-lines": "error", 33 | "prefer-const": [ 34 | "error", 35 | { 36 | "destructuring": "all", 37 | "ignoreReadBeforeAssign": false 38 | } 39 | ], 40 | "camelcase": "error", 41 | "linebreak-style": [ 42 | "error", 43 | "unix" 44 | ], 45 | "quotes": [ 46 | "error", 47 | "single" 48 | ], 49 | "no-unused-vars": "off", 50 | "@typescript-eslint/no-unused-vars": [ 51 | "error", 52 | { 53 | "argsIgnorePattern": "^_", 54 | "varsIgnorePattern": "^_", 55 | "caughtErrorsIgnorePattern": "^_" 56 | } 57 | ], 58 | "@typescript-eslint/ban-ts-comment": "off", 59 | "@typescript-eslint/no-use-before-define": "off", 60 | "@typescript-eslint/no-explicit-any": "off", 61 | "@typescript-eslint/no-non-null-assertion": "off", 62 | "@typescript-eslint/ban-types": [ 63 | "error", 64 | { 65 | "types": { 66 | "{}": false 67 | } 68 | } 69 | ], 70 | "@typescript-eslint/no-this-alias": [ 71 | "error", 72 | { 73 | "allowedNames": [ 74 | "self" 75 | ] 76 | } 77 | ] 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /typedoc.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'JetBrains Mono'; 3 | src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2') format('woff2'), 4 | url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Regular.woff') format('woff'), 5 | url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf') format('truetype'); 6 | font-weight: 400; 7 | font-style: normal; 8 | } 9 | 10 | * { 11 | font-family: 'JetBrains Mono', 'Fira Code', monospace; 12 | } 13 | 14 | :root { 15 | --light-color-input-background: var(--light-color-accent); 16 | 17 | --dark-color-background: #282828; 18 | --dark-color-background-secondary: #1d2021; 19 | --dark-color-icon-background: var(--dark-color-background-secondary); 20 | --dark-color-input-background: #a89984; 21 | --dark-color-accent: #fbf1c7; 22 | --dark-color-text: #ebdbb2; 23 | --dark-color-text-aside: #d5c4a1; 24 | --dark-color-link: #83a598; 25 | } 26 | 27 | 28 | @media (prefers-color-scheme: light) { 29 | :root { 30 | --color-input-background: var(--light-color-input-background); 31 | } 32 | } 33 | 34 | @media (prefers-color-scheme: dark) { 35 | :root { 36 | --color-input-background: var(--dark-color-input-background); 37 | } 38 | } 39 | 40 | :root[data-theme="light"] { 41 | --color-input-background: var(--light-color-input-background); 42 | } 43 | 44 | :root[data-theme="dark"] { 45 | --color-input-background: var(--dark-color-input-background); 46 | } 47 | 48 | :root[data-theme="dark"] .tsd-checkbox-background { 49 | fill: var(--color-input-background); 50 | } 51 | 52 | :root[data-theme="dark"] #tsd-search.has-focus { 53 | background-color: var(--color-input-background); 54 | } 55 | 56 | :root[data-theme="dark"] #tsd-search .field input { 57 | color: var(--color-background); 58 | } 59 | 60 | :root[data-theme="dark"] #tsd-search .results li:hover a { 61 | color: var(--color-background); 62 | } 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |