Skip to content

Commit

Permalink
Merge pull request o1-labs#1871 from o1-labs/2024-10-fix-offchain-sta…
Browse files Browse the repository at this point in the history
…te-typing

Include the type OffchainStateInstance in the internal API
  • Loading branch information
45930 authored Oct 17, 2024
2 parents f5a3f1d + b4847d2 commit fc16ce3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ExampleContract extends SmartContract {
offchainState.emptyCommitments();

// o1js memoizes the offchain state by contract address so that this pattern works
offchainState: any = offchainState.init(this);
offchainState = offchainState.init(this);

@method
async createAccount(address: PublicKey, amountToMint: UInt64) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/mina/actions/offchain-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { ProvableType } from '../../provable/types/provable-intf.js';
export { OffchainState, OffchainStateCommitments };

// internal API
export { OffchainField, OffchainMap };
export { OffchainField, OffchainMap, OffchainStateInstance };

type OffchainStateInstance<
Config extends { [key: string]: OffchainStateKind }
Expand Down

0 comments on commit fc16ce3

Please sign in to comment.