@sentio/sdk 1.24.0 → 1.25.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. package/lib/aptos/aptos-processor.d.ts +0 -2
  2. package/lib/aptos/aptos-processor.js +6 -40
  3. package/lib/aptos/aptos-processor.js.map +1 -1
  4. package/lib/aptos/index.d.ts +3 -2
  5. package/lib/aptos/index.js +5 -1
  6. package/lib/aptos/index.js.map +1 -1
  7. package/lib/aptos/network.d.ts +3 -1
  8. package/lib/aptos/network.js +9 -4
  9. package/lib/aptos/network.js.map +1 -1
  10. package/lib/aptos/types.d.ts +13 -2
  11. package/lib/aptos/types.js +64 -2
  12. package/lib/aptos/types.js.map +1 -1
  13. package/lib/aptos-codegen/codegen.js +1 -2
  14. package/lib/aptos-codegen/codegen.js.map +1 -1
  15. package/lib/cli/cli.js +5 -5
  16. package/lib/cli/cli.js.map +1 -1
  17. package/lib/cli/commands/run-create.js +31 -11
  18. package/lib/cli/commands/run-create.js.map +1 -1
  19. package/lib/cli/commands/run-login.js +1 -1
  20. package/lib/cli/commands/run-login.js.map +1 -1
  21. package/lib/cli/config.d.ts +0 -1
  22. package/lib/cli/config.js.map +1 -1
  23. package/lib/core/event-tracker.js +1 -1
  24. package/lib/core/event-tracker.js.map +1 -1
  25. package/lib/service.js +1 -1
  26. package/lib/service.js.map +1 -1
  27. package/lib/tests/aptos.test.js +1 -0
  28. package/lib/tests/aptos.test.js.map +1 -1
  29. package/lib/tests/souffl3.js +8 -8
  30. package/lib/tests/souffl3.js.map +1 -1
  31. package/package.json +2 -2
  32. package/src/aptos/aptos-processor.ts +7 -50
  33. package/src/aptos/index.ts +3 -2
  34. package/src/aptos/network.ts +7 -2
  35. package/src/aptos/types.ts +84 -2
  36. package/src/aptos-codegen/codegen.ts +2 -3
  37. package/src/cli/cli.ts +5 -5
  38. package/src/cli/commands/run-create.ts +33 -11
  39. package/src/cli/commands/run-login.ts +1 -1
  40. package/src/cli/config.ts +1 -1
  41. package/src/core/event-tracker.ts +1 -1
  42. package/src/service.ts +1 -1
  43. package/src/tests/aptos.test.ts +1 -0
  44. package/src/tests/souffl3.ts +9 -8
  45. package/{template → templates/aptos}/.gitignore +0 -0
  46. package/templates/aptos/abis/aptos/souffle.json +389 -0
  47. package/{template → templates/aptos}/jest.config.js +0 -0
  48. package/templates/aptos/package.json +20 -0
  49. package/templates/aptos/sentio.yaml +1 -0
  50. package/templates/aptos/src/processor.test.ts +14 -0
  51. package/templates/aptos/src/processor.ts +13 -0
  52. package/{template → templates/aptos}/tsconfig.json +0 -0
  53. package/templates/evm/.gitignore +107 -0
  54. package/{template → templates/evm}/abis/evm/x2y2.json +0 -0
  55. package/templates/evm/jest.config.js +7 -0
  56. package/{template → templates/evm}/package.json +1 -1
  57. package/{template → templates/evm}/sentio.yaml +0 -0
  58. package/{template → templates/evm}/src/processor.test.ts +0 -0
  59. package/{template → templates/evm}/src/processor.ts +0 -0
  60. package/templates/evm/tsconfig.json +20 -0
  61. package/templates/raw/.gitignore +107 -0
  62. package/templates/raw/jest.config.js +7 -0
  63. package/templates/raw/package.json +20 -0
  64. package/templates/raw/sentio.yaml +3 -0
  65. package/templates/raw/src/processor.test.ts +14 -0
  66. package/templates/raw/src/processor.ts +0 -0
  67. package/templates/raw/tsconfig.json +20 -0
  68. package/templates/raw/yarn.lock +4095 -0
@@ -0,0 +1,107 @@
1
+ .idea
2
+ src/types
3
+
4
+ # Logs
5
+ logs
6
+ *.log
7
+ npm-debug.log*
8
+ yarn-debug.log*
9
+ yarn-error.log*
10
+ lerna-debug.log*
11
+
12
+ # Diagnostic reports (https://nodejs.org/api/report.html)
13
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14
+
15
+ # Runtime data
16
+ pids
17
+ *.pid
18
+ *.seed
19
+ *.pid.lock
20
+
21
+ # Directory for instrumented libs generated by jscoverage/JSCover
22
+ lib-cov
23
+
24
+ # Coverage directory used by tools like istanbul
25
+ coverage
26
+ *.lcov
27
+
28
+ # nyc test coverage
29
+ .nyc_output
30
+
31
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32
+ .grunt
33
+
34
+ # Bower dependency directory (https://bower.io/)
35
+ bower_components
36
+
37
+ # node-waf configuration
38
+ .lock-wscript
39
+
40
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
41
+ build/Release
42
+
43
+ # Dependency directories
44
+ node_modules/
45
+ jspm_packages/
46
+
47
+ # TypeScript v1 declaration files
48
+ typings/
49
+
50
+ # TypeScript cache
51
+ *.tsbuildinfo
52
+
53
+ # Optional npm cache directory
54
+ .npm
55
+
56
+ # Optional eslint cache
57
+ .eslintcache
58
+
59
+ # Microbundle cache
60
+ .rpt2_cache/
61
+ .rts2_cache_cjs/
62
+ .rts2_cache_es/
63
+ .rts2_cache_umd/
64
+
65
+ # Optional REPL history
66
+ .node_repl_history
67
+
68
+ # Output of 'npm pack'
69
+ *.tgz
70
+
71
+ # Yarn Integrity file
72
+ .yarn-integrity
73
+
74
+ # dotenv environment variables file
75
+ .env
76
+ .env.test
77
+
78
+ # parcel-bundler cache (https://parceljs.org/)
79
+ .cache
80
+
81
+ # Next.js build output
82
+ .next
83
+
84
+ # Nuxt.js build / generate output
85
+ .nuxt
86
+ dist
87
+
88
+ # Gatsby files
89
+ .cache/
90
+ # Comment in the public line in if your project uses Gatsby and *not* Next.js
91
+ # https://nextjs.org/blog/next-9-1#public-directory-support
92
+ # public
93
+
94
+ # vuepress build output
95
+ .vuepress/dist
96
+
97
+ # Serverless directories
98
+ .serverless/
99
+
100
+ # FuseBox cache
101
+ .fusebox/
102
+
103
+ # DynamoDB Local files
104
+ .dynamodb/
105
+
106
+ # TernJS port file
107
+ .tern-port
@@ -0,0 +1,7 @@
1
+ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
2
+
3
+ module.exports = {
4
+ preset: 'ts-jest',
5
+ testEnvironment: 'node',
6
+ modulePathIgnorePatterns: ["<rootDir>/dist/"]
7
+ };
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "template-raw",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "test": "jest",
7
+ "gen": "sentio gen",
8
+ "build": "sentio build",
9
+ "upload": "sentio upload"
10
+ },
11
+ "dependencies": {
12
+ "@sentio/sdk": "^1.0.0-development"
13
+ },
14
+ "devDependencies": {
15
+ "@types/jest": "^29.0.0",
16
+ "jest": "^29.0.0",
17
+ "ts-jest": "^29.0.0",
18
+ "typescript": "^4.7.2"
19
+ }
20
+ }
@@ -0,0 +1,3 @@
1
+ # Project name could be $org_or_user/$project_name or $project_name
2
+ # If latter, will be treated the owner as api key's owner
3
+ project: default
@@ -0,0 +1,14 @@
1
+ import { TestProcessorServer } from '@sentio/sdk/lib/testing'
2
+
3
+ describe('Test Processor', () => {
4
+ const service = new TestProcessorServer(() => require('./processor'))
5
+
6
+ beforeAll(async () => {
7
+ await service.start()
8
+ })
9
+
10
+ test('has valid config', async () => {
11
+ // const config = await service.getConfig({})
12
+ // expect(config.contractConfigs.length > 0).toBeTruthy()
13
+ })
14
+ })
File without changes
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "alwaysStrict": true,
4
+ "sourceMap": true,
5
+ "target": "esnext",
6
+ "esModuleInterop": true,
7
+ "noImplicitReturns": true,
8
+ "noImplicitAny": true,
9
+ "module": "commonjs",
10
+ "moduleResolution": "node",
11
+ "strictNullChecks": true,
12
+ "stripInternal": true,
13
+ "noFallthroughCasesInSwitch": true,
14
+ "noEmitOnError": true,
15
+ "outDir": "dist",
16
+ "rootDir": "./src",
17
+ "skipLibCheck": true
18
+ },
19
+ "exclude": ["dist"]
20
+ }