@sentio/sdk 2.13.3-rc.2 → 2.13.3-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/lib/aptos/builtin/0x1.d.ts +1 -2
  2. package/lib/aptos/builtin/0x1.js +1 -1
  3. package/lib/aptos/builtin/0x1.js.map +1 -1
  4. package/lib/aptos/builtin/0x3.d.ts +1 -2
  5. package/lib/aptos/builtin/0x3.js +1 -1
  6. package/lib/aptos/builtin/0x3.js.map +1 -1
  7. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts +1 -2
  8. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
  9. package/lib/eth/builtin/internal/erc1155-processor.d.ts +1 -2
  10. package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
  11. package/lib/eth/builtin/internal/erc20-processor.d.ts +1 -2
  12. package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
  13. package/lib/eth/builtin/internal/erc20bytes-processor.d.ts +1 -2
  14. package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
  15. package/lib/eth/builtin/internal/erc721-processor.d.ts +1 -2
  16. package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
  17. package/lib/eth/builtin/internal/weth9-processor.d.ts +1 -2
  18. package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
  19. package/lib/eth/codegen/file.js +2 -1
  20. package/lib/eth/codegen/file.js.map +1 -1
  21. package/lib/eth/index.d.ts +1 -0
  22. package/lib/eth/index.js +1 -0
  23. package/lib/eth/index.js.map +1 -1
  24. package/lib/move/abstract-codegen.js +1 -2
  25. package/lib/move/abstract-codegen.js.map +1 -1
  26. package/lib/move/index.d.ts +1 -0
  27. package/lib/move/index.js +1 -0
  28. package/lib/move/index.js.map +1 -1
  29. package/lib/solana/codegen/codegen.js +1 -1
  30. package/lib/solana/codegen/codegen.js.map +1 -1
  31. package/lib/solana/index.d.ts +1 -0
  32. package/lib/solana/index.js +1 -0
  33. package/lib/solana/index.js.map +1 -1
  34. package/lib/sui/builtin/0x1.d.ts +1 -2
  35. package/lib/sui/builtin/0x1.js +1 -1
  36. package/lib/sui/builtin/0x1.js.map +1 -1
  37. package/lib/sui/builtin/0x2.d.ts +1 -2
  38. package/lib/sui/builtin/0x2.js +1 -1
  39. package/lib/sui/builtin/0x2.js.map +1 -1
  40. package/lib/sui/builtin/0x3.d.ts +1 -2
  41. package/lib/sui/builtin/0x3.js +1 -1
  42. package/lib/sui/builtin/0x3.js.map +1 -1
  43. package/package.json +34 -22
  44. package/src/aptos/builtin/0x1.ts +6 -2
  45. package/src/aptos/builtin/0x3.ts +6 -2
  46. package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +1 -1
  47. package/src/eth/builtin/internal/erc1155-processor.ts +1 -1
  48. package/src/eth/builtin/internal/erc20-processor.ts +1 -1
  49. package/src/eth/builtin/internal/erc20bytes-processor.ts +1 -1
  50. package/src/eth/builtin/internal/erc721-processor.ts +1 -1
  51. package/src/eth/builtin/internal/weth9-processor.ts +1 -1
  52. package/src/eth/codegen/file.ts +2 -1
  53. package/src/eth/index.ts +2 -0
  54. package/src/move/abstract-codegen.ts +1 -2
  55. package/src/move/index.ts +2 -0
  56. package/src/solana/codegen/codegen.ts +1 -1
  57. package/src/solana/index.ts +2 -0
  58. package/src/sui/builtin/0x1.ts +6 -2
  59. package/src/sui/builtin/0x2.ts +6 -2
  60. package/src/sui/builtin/0x3.ts +6 -2
package/package.json CHANGED
@@ -1,30 +1,13 @@
1
1
  {
2
2
  "name": "@sentio/sdk",
3
3
  "license": "Apache-2.0",
4
- "version": "2.13.3-rc.2",
4
+ "version": "2.13.3-rc.4",
5
5
  "type": "module",
6
- "scripts": {
7
- "compile": "tsc && cp src/utils/*.csv lib/utils && cp src/tsup.config.ts lib",
8
- "build": "yarn gen && yarn compile",
9
- "build_all": "yarn lerna run --scope=@sentio/sdk build --include-dependencies",
10
- "test": "NODE_OPTIONS=--experimental-vm-modules yarn jest --runInBand --detectOpenHandles",
11
- "gen": "yarn gen:eth && yarn gen:aptos && yarn gen:sui && yarn gen:solana",
12
- "gen:eth": "ts-node-esm src/eth/codegen/run.ts src/eth/abis src/eth/builtin && yarn gen:eth_test",
13
- "gen:eth_test": "ts-node-esm src/eth/codegen/run.ts src/eth/tests/abis/eth ./src/eth/tests/types",
14
- "gen:aptos": "ts-node-esm src/aptos/codegen/run.ts src/aptos/abis src/aptos/builtin && yarn gen:aptos_test",
15
- "gen:aptos_test": "ts-node-esm src/aptos/codegen/run.ts src/aptos/tests/abis src/aptos/tests/types",
16
- "gen:sui": "ts-node-esm src/sui/codegen/run.ts src/sui/abis src/sui/builtin && yarn gen:sui_test",
17
- "gen:sui_test": "ts-node-esm src/sui/codegen/run.ts src/sui/tests/abis src/sui/tests/types",
18
- "gen:solana": "ts-node-esm src/solana/codegen/run.ts src/solana/tests/abis src/solana/tests/types",
19
- "docs": "typedoc --options typedoc.json"
20
- },
21
6
  "dependencies": {
22
7
  "@mysten/sui.js": "npm:@sentio/sui.js@^0.32.0-patch.1",
23
8
  "@project-serum/anchor": "^0.26.0",
24
9
  "@sentio/bigdecimal": "^9.1.1-patch.3",
25
10
  "@sentio/ethers-v6": "^1.0.28",
26
- "@sentio/protos": "^2.13.3-rc.2",
27
- "@sentio/runtime": "^2.13.3-rc.2",
28
11
  "@solana/web3.js": "^1.74.0",
29
12
  "@types/prettier": "^2.7.2",
30
13
  "aptos-sdk": "npm:aptos@^1.8.3",
@@ -39,13 +22,28 @@
39
22
  "prettier": "^2.8.7",
40
23
  "superstruct_solana": "npm:superstruct@^0.14.2",
41
24
  "typechain": "^8.0.0",
42
- "yaml": "^2.2.1"
25
+ "yaml": "^2.2.1",
26
+ "js-sha3": "^0.8.0",
27
+ "nice-grpc-client-middleware-retry": "^3.1.3",
28
+ "nice-grpc-prometheus": "^0.1.6",
29
+ "nice-grpc": "^2.1.4",
30
+ "nice-grpc-common": "^2.0.2",
31
+ "@coral-xyz/borsh": "^0.27.0",
32
+ "typedoc": "^0.24.1",
33
+ "@sentio/protos": "2.13.3-rc.4",
34
+ "@sentio/runtime": "2.13.3-rc.4"
43
35
  },
44
36
  "devDependencies": {
45
37
  "@certusone/wormhole-sdk": "^0.9.10",
46
38
  "@types/google-protobuf": "^3.15.6",
47
39
  "@types/lodash-es": "^4.17.6",
48
- "@types/mkdirp": "^1.0.2"
40
+ "@types/mkdirp": "^1.0.2",
41
+ "typescript": "^5.0.4",
42
+ "tslib": "^2.5.0",
43
+ "jest": "^29.5.0"
44
+ },
45
+ "peerDependencies": {
46
+ "tsup": "npm:@sentio/tsup@^6.7.0"
49
47
  },
50
48
  "resolutions": {
51
49
  "superstruct": "^1.0.3"
@@ -88,5 +86,19 @@
88
86
  "engines": {
89
87
  "node": ">=16"
90
88
  },
91
- "gitHead": "11bde5ffb7207bbdd8f9e0f655f766cd1880fad5"
92
- }
89
+ "scripts": {
90
+ "compile": "tsc && cp src/utils/*.csv lib/utils && cp src/tsup.config.ts lib",
91
+ "build": "pnpm gen && pnpm compile",
92
+ "build:all": "pnpm --filter=$(node -p \"require('./package.json').name\")... build",
93
+ "test": "NODE_OPTIONS=--experimental-vm-modules pnpm jest --runInBand --detectOpenHandles",
94
+ "gen": "pnpm gen:eth && pnpm gen:aptos && pnpm gen:sui && pnpm gen:solana",
95
+ "gen:eth": "ts-node-esm src/eth/codegen/run.ts src/eth/abis src/eth/builtin && pnpm gen:eth_test",
96
+ "gen:eth_test": "ts-node-esm src/eth/codegen/run.ts src/eth/tests/abis/eth ./src/eth/tests/types",
97
+ "gen:aptos": "ts-node-esm src/aptos/codegen/run.ts src/aptos/abis src/aptos/builtin && pnpm gen:aptos_test",
98
+ "gen:aptos_test": "ts-node-esm src/aptos/codegen/run.ts src/aptos/tests/abis src/aptos/tests/types",
99
+ "gen:sui": "ts-node-esm src/sui/codegen/run.ts src/sui/abis src/sui/builtin && pnpm gen:sui_test",
100
+ "gen:sui_test": "ts-node-esm src/sui/codegen/run.ts src/sui/tests/abis src/sui/tests/types",
101
+ "gen:solana": "ts-node-esm src/solana/codegen/run.ts src/solana/tests/abis src/solana/tests/types",
102
+ "docs": "typedoc --options typedoc.json"
103
+ }
104
+ }
@@ -4,7 +4,12 @@
4
4
 
5
5
  /* Generated modules for account 0x1 */
6
6
 
7
- import { CallFilter, TypeDescriptor, ANY_TYPE } from "@sentio/sdk/move";
7
+ import {
8
+ CallFilter,
9
+ TypeDescriptor,
10
+ ANY_TYPE,
11
+ MoveFetchConfig,
12
+ } from "@sentio/sdk/move";
8
13
  import {
9
14
  MoveCoder,
10
15
  defaultMoveCoder,
@@ -15,7 +20,6 @@ import {
15
20
  TypedFunctionPayload,
16
21
  AptosContext,
17
22
  } from "@sentio/sdk/aptos";
18
- import { MoveFetchConfig } from "@sentio/protos";
19
23
  import { Address, ModuleClient } from "@sentio/sdk/aptos";
20
24
 
21
25
  export namespace acl {
@@ -4,7 +4,12 @@
4
4
 
5
5
  /* Generated modules for account 0x3 */
6
6
 
7
- import { CallFilter, TypeDescriptor, ANY_TYPE } from "@sentio/sdk/move";
7
+ import {
8
+ CallFilter,
9
+ TypeDescriptor,
10
+ ANY_TYPE,
11
+ MoveFetchConfig,
12
+ } from "@sentio/sdk/move";
8
13
  import {
9
14
  MoveCoder,
10
15
  defaultMoveCoder,
@@ -15,7 +20,6 @@ import {
15
20
  TypedFunctionPayload,
16
21
  AptosContext,
17
22
  } from "@sentio/sdk/aptos";
18
- import { MoveFetchConfig } from "@sentio/protos";
19
23
  import { Address, ModuleClient } from "@sentio/sdk/aptos";
20
24
 
21
25
  import * as _0x1 from "./0x1.js";
@@ -19,9 +19,9 @@ import {
19
19
  DummyProvider,
20
20
  TypedCallTrace,
21
21
  getNetworkFromCtxOrNetworkish,
22
+ EthFetchConfig,
22
23
  } from "@sentio/sdk/eth";
23
24
  import { BaseContext } from "@sentio/sdk";
24
- import { EthFetchConfig } from "@sentio/protos";
25
25
 
26
26
  import { EACAggregatorProxy, EACAggregatorProxy__factory } from "./index.js";
27
27
  import {
@@ -19,9 +19,9 @@ import {
19
19
  DummyProvider,
20
20
  TypedCallTrace,
21
21
  getNetworkFromCtxOrNetworkish,
22
+ EthFetchConfig,
22
23
  } from "@sentio/sdk/eth";
23
24
  import { BaseContext } from "@sentio/sdk";
24
- import { EthFetchConfig } from "@sentio/protos";
25
25
 
26
26
  import { ERC1155, ERC1155__factory } from "./index.js";
27
27
  import {
@@ -19,9 +19,9 @@ import {
19
19
  DummyProvider,
20
20
  TypedCallTrace,
21
21
  getNetworkFromCtxOrNetworkish,
22
+ EthFetchConfig,
22
23
  } from "@sentio/sdk/eth";
23
24
  import { BaseContext } from "@sentio/sdk";
24
- import { EthFetchConfig } from "@sentio/protos";
25
25
 
26
26
  import { ERC20, ERC20__factory } from "./index.js";
27
27
  import {
@@ -19,9 +19,9 @@ import {
19
19
  DummyProvider,
20
20
  TypedCallTrace,
21
21
  getNetworkFromCtxOrNetworkish,
22
+ EthFetchConfig,
22
23
  } from "@sentio/sdk/eth";
23
24
  import { BaseContext } from "@sentio/sdk";
24
- import { EthFetchConfig } from "@sentio/protos";
25
25
 
26
26
  import { ERC20Bytes, ERC20Bytes__factory } from "./index.js";
27
27
  import {
@@ -19,9 +19,9 @@ import {
19
19
  DummyProvider,
20
20
  TypedCallTrace,
21
21
  getNetworkFromCtxOrNetworkish,
22
+ EthFetchConfig,
22
23
  } from "@sentio/sdk/eth";
23
24
  import { BaseContext } from "@sentio/sdk";
24
- import { EthFetchConfig } from "@sentio/protos";
25
25
 
26
26
  import { ERC721, ERC721__factory } from "./index.js";
27
27
  import {
@@ -19,9 +19,9 @@ import {
19
19
  DummyProvider,
20
20
  TypedCallTrace,
21
21
  getNetworkFromCtxOrNetworkish,
22
+ EthFetchConfig,
22
23
  } from "@sentio/sdk/eth";
23
24
  import { BaseContext } from "@sentio/sdk";
24
- import { EthFetchConfig } from "@sentio/protos";
25
25
 
26
26
  import { WETH9, WETH9__factory } from "./index.js";
27
27
  import {
@@ -166,9 +166,10 @@ export class ${contract.name}ProcessorTemplate extends BaseProcessorTemplate<${c
166
166
  'TypedCallTrace',
167
167
  'getNetworkFromCtxOrNetworkish',
168
168
  // 'toBlockTag',
169
+ 'EthFetchConfig',
169
170
  ],
170
171
  '@sentio/sdk': ['BaseContext'],
171
- '@sentio/protos': ['EthFetchConfig'],
172
+ // '@sentio/protos': ['EthFetchConfig'],
172
173
  './common.js': ['PromiseOrValue'],
173
174
  './index.js': [`${contract.name}`, `${contract.name}__factory`],
174
175
  [`./${contract.name}.js`]: eventsImports.concat(uniqueStructImports),
package/src/eth/index.ts CHANGED
@@ -9,3 +9,5 @@ export { getProcessor, addProcessor, getContractByABI, addContractByABI } from '
9
9
  export { ContractContext, GlobalContext, ContractView, BoundContractView } from './context.js'
10
10
 
11
11
  export { EthPlugin } from './eth-plugin.js'
12
+
13
+ export { EthFetchConfig } from '@sentio/protos'
@@ -514,12 +514,11 @@ export class AccountCodegen<NetworkType, ModuleType, StructType> {
514
514
  }
515
515
 
516
516
  const imports = `
517
- import { CallFilter, TypeDescriptor, ANY_TYPE } from "@sentio/sdk/move"
517
+ import { CallFilter, TypeDescriptor, ANY_TYPE, MoveFetchConfig } from "@sentio/sdk/move"
518
518
  import {
519
519
  MoveCoder, defaultMoveCoder, ${this.moduleGen.PREFIX}BindOptions, ${this.moduleGen.PREFIX}BaseProcessor,
520
520
  TypedEventInstance, ${this.moduleGen.PREFIX}Network, TypedFunctionPayload,
521
521
  ${this.moduleGen.PREFIX}Context } from "@sentio/sdk/${this.moduleGen.PREFIX.toLowerCase()}"
522
- import { MoveFetchConfig } from "@sentio/protos"
523
522
  import { ${this.moduleGen.ADDRESS_TYPE}, ModuleClient } from "@sentio/sdk/${this.moduleGen.PREFIX.toLowerCase()}"
524
523
  `
525
524
 
package/src/move/index.ts CHANGED
@@ -3,3 +3,5 @@ export * from './types.js'
3
3
  export * from './utils.js'
4
4
  export * from './account.js'
5
5
  export * from './chain-adapter.js'
6
+
7
+ export { MoveFetchConfig } from '@sentio/protos'
@@ -34,7 +34,7 @@ function codeGenSolanaIdlProcessor(idlObj: Idl): string {
34
34
  const idlName = idlObj.name
35
35
  const idlNamePascalCase = toPascalCase(idlName)
36
36
  const instructions: any[] = idlObj.instructions
37
- return `import { BorshInstructionCoder, Instruction, Idl } from '@project-serum/anchor'
37
+ return `import { BorshInstructionCoder, Instruction, Idl } from '@sentio/sdk/solana'
38
38
  import { SolanaBaseProcessor, SolanaContext, SolanaBindOptions } from "@sentio/sdk/solana"
39
39
  import { ${idlName}_idl } from "./${idlName}.js"
40
40
  import { PublicKey } from '@solana/web3.js'
@@ -2,3 +2,5 @@ export * from './solana-plugin.js'
2
2
  export * from './solana-context.js'
3
3
  export * from './solana-processor.js'
4
4
  export * from './solana-options.js'
5
+
6
+ export { BorshInstructionCoder, type Instruction, type Idl } from '@project-serum/anchor'
@@ -4,7 +4,12 @@
4
4
 
5
5
  /* Generated modules for account 0x1 */
6
6
 
7
- import { CallFilter, TypeDescriptor, ANY_TYPE } from "@sentio/sdk/move";
7
+ import {
8
+ CallFilter,
9
+ TypeDescriptor,
10
+ ANY_TYPE,
11
+ MoveFetchConfig,
12
+ } from "@sentio/sdk/move";
8
13
  import {
9
14
  MoveCoder,
10
15
  defaultMoveCoder,
@@ -15,7 +20,6 @@ import {
15
20
  TypedFunctionPayload,
16
21
  SuiContext,
17
22
  } from "@sentio/sdk/sui";
18
- import { MoveFetchConfig } from "@sentio/protos";
19
23
  import { SuiAddress, ModuleClient } from "@sentio/sdk/sui";
20
24
 
21
25
  export namespace address {}
@@ -4,7 +4,12 @@
4
4
 
5
5
  /* Generated modules for account 0x2 */
6
6
 
7
- import { CallFilter, TypeDescriptor, ANY_TYPE } from "@sentio/sdk/move";
7
+ import {
8
+ CallFilter,
9
+ TypeDescriptor,
10
+ ANY_TYPE,
11
+ MoveFetchConfig,
12
+ } from "@sentio/sdk/move";
8
13
  import {
9
14
  MoveCoder,
10
15
  defaultMoveCoder,
@@ -15,7 +20,6 @@ import {
15
20
  TypedFunctionPayload,
16
21
  SuiContext,
17
22
  } from "@sentio/sdk/sui";
18
- import { MoveFetchConfig } from "@sentio/protos";
19
23
  import { SuiAddress, ModuleClient } from "@sentio/sdk/sui";
20
24
 
21
25
  import * as _0x1 from "./0x1.js";
@@ -4,7 +4,12 @@
4
4
 
5
5
  /* Generated modules for account 0x3 */
6
6
 
7
- import { CallFilter, TypeDescriptor, ANY_TYPE } from "@sentio/sdk/move";
7
+ import {
8
+ CallFilter,
9
+ TypeDescriptor,
10
+ ANY_TYPE,
11
+ MoveFetchConfig,
12
+ } from "@sentio/sdk/move";
8
13
  import {
9
14
  MoveCoder,
10
15
  defaultMoveCoder,
@@ -15,7 +20,6 @@ import {
15
20
  TypedFunctionPayload,
16
21
  SuiContext,
17
22
  } from "@sentio/sdk/sui";
18
- import { MoveFetchConfig } from "@sentio/protos";
19
23
  import { SuiAddress, ModuleClient } from "@sentio/sdk/sui";
20
24
 
21
25
  import * as _0x1 from "./0x1.js";