@mainsail/evm 0.0.1-evm.14 → 0.0.1-evm.16

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 (2) hide show
  1. package/index.d.ts +10 -3
  2. package/package.json +6 -6
package/index.d.ts CHANGED
@@ -3,6 +3,11 @@
3
3
 
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
+ export interface JsEvmOptions {
7
+ path: string
8
+ logger?: (...args: any[]) => any
9
+ historySize?: bigint
10
+ }
6
11
  export interface JsTransactionContext {
7
12
  caller: string
8
13
  legacyAddress?: string
@@ -49,6 +54,7 @@ export interface JsGenesisContext {
49
54
  deployerAccount: string
50
55
  validatorContract: string
51
56
  usernameContract: string
57
+ initialHeight: bigint
52
58
  initialSupply: bigint
53
59
  }
54
60
  export interface JsCalculateActiveValidatorsContext {
@@ -161,7 +167,7 @@ export interface JsGetReceipt {
161
167
  }
162
168
  export type JsEvmWrapper = Evm
163
169
  export declare class Evm {
164
- constructor(path: string, loggerCallback?: (...args: any[]) => any | undefined | null)
170
+ constructor(opts: JsEvmOptions)
165
171
  preverifyTransaction(txCtx: JsPreverifyTransactionContext): Promise<JsPreverifyTransactionResult>
166
172
  view(viewCtx: JsTransactionViewContext): Promise<JsViewResult>
167
173
  process(txCtx: JsTransactionContext): Promise<JsProcessResult>
@@ -169,7 +175,7 @@ export declare class Evm {
169
175
  prepareNextCommit(ctx: JsPrepareNextCommitContext): Promise<void>
170
176
  calculateActiveValidators(ctx: JsCalculateActiveValidatorsContext): Promise<void>
171
177
  updateRewardsAndVotes(ctx: JsUpdateRewardsAndVotesContext): Promise<void>
172
- getAccountInfo(address: string): Promise<JsAccountInfo>
178
+ getAccountInfo(address: string, height?: bigint | undefined | null): Promise<JsAccountInfo>
173
179
  getAccountInfoExtended(address: string, legacyAddress?: string | undefined | null): Promise<JsAccountInfoExtended>
174
180
  importAccountInfo(info: JsAccountInfoExtended): Promise<void>
175
181
  importLegacyColdWallet(info: JsLegacyColdWallet): Promise<void>
@@ -177,9 +183,10 @@ export declare class Evm {
177
183
  getLegacyColdWallets(offset: bigint, limit: bigint): Promise<JsGetLegacyColdWallets>
178
184
  getReceipts(offset: bigint, limit: bigint): Promise<JsGetReceipts>
179
185
  getReceipt(height: bigint, txHash: string): Promise<JsGetReceipt>
180
- codeAt(address: string): Promise<string>
186
+ codeAt(address: string, height?: bigint | undefined | null): Promise<string>
181
187
  storageAt(address: string, slot: bigint): Promise<string>
182
188
  commit(commitKey: JsCommitKey): Promise<JsCommitResult>
183
189
  stateHash(commitKey: JsCommitKey, currentHash: string): Promise<string>
190
+ logsBloom(commitKey: JsCommitKey): Promise<string>
184
191
  dispose(): Promise<void>
185
192
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@mainsail/evm",
3
- "version": "0.0.1-evm.14",
3
+ "version": "0.0.1-evm.16",
4
4
  "description": "EVM for the Mainsail blockchain",
5
5
  "license": "GPL-3.0-only",
6
6
  "contributors": [],
7
7
  "main": "index.js",
8
8
  "types": "index.d.ts",
9
9
  "devDependencies": {
10
- "@napi-rs/cli": "^2.18.4"
10
+ "@napi-rs/cli": "2.18.4"
11
11
  },
12
12
  "engines": {
13
13
  "node": ">=20.x"
@@ -25,10 +25,10 @@
25
25
  }
26
26
  },
27
27
  "optionalDependencies": {
28
- "@mainsail/evm-linux-arm64-gnu": "0.0.1-evm.14",
29
- "@mainsail/evm-linux-arm64-musl": "0.0.1-evm.14",
30
- "@mainsail/evm-linux-x64-gnu": "0.0.1-evm.14",
31
- "@mainsail/evm-linux-x64-musl": "0.0.1-evm.14"
28
+ "@mainsail/evm-linux-arm64-gnu": "0.0.1-evm.16",
29
+ "@mainsail/evm-linux-arm64-musl": "0.0.1-evm.16",
30
+ "@mainsail/evm-linux-x64-gnu": "0.0.1-evm.16",
31
+ "@mainsail/evm-linux-x64-musl": "0.0.1-evm.16"
32
32
  },
33
33
  "scripts": {
34
34
  "artifacts": "napi artifacts",