-
Notifications
You must be signed in to change notification settings - Fork 102
/
index.ts
159 lines (140 loc) · 4.92 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
export type { ProvablePure } from './lib/provable/types/provable-intf.js';
export { Ledger, initializeBindings } from './snarky.js';
export { Field, Bool, Group, Scalar } from './lib/provable/wrapped.js';
export {
createForeignField,
ForeignField,
AlmostForeignField,
CanonicalForeignField,
} from './lib/provable/foreign-field.js';
export {
createForeignCurve,
ForeignCurve,
} from './lib/provable/crypto/foreign-curve.js';
export {
createEcdsa,
EcdsaSignature,
} from './lib/provable/crypto/foreign-ecdsa.js';
export {
Poseidon,
TokenSymbol,
ProvableHashable,
} from './lib/provable/crypto/poseidon.js';
export { Keccak } from './lib/provable/crypto/keccak.js';
export { Hash } from './lib/provable/crypto/hash.js';
export { assert } from './lib/provable/gadgets/common.js';
export * from './lib/provable/crypto/signature.js';
export type {
ProvableExtended,
FlexibleProvable,
FlexibleProvablePure,
InferProvable,
} from './lib/provable/types/struct.js';
export {
provable,
provablePure,
} from './lib/provable/types/provable-derivers.js';
export { Struct } from './lib/provable/types/struct.js';
export { Unconstrained } from './lib/provable/types/unconstrained.js';
export { Provable } from './lib/provable/provable.js';
export {
Circuit,
Keypair,
public_,
circuitMain,
} from './lib/proof-system/circuit.js';
export { UInt32, UInt64, Int64, Sign, UInt8 } from './lib/provable/int.js';
export { Bytes } from './lib/provable/wrapped-classes.js';
export { Packed, Hashed } from './lib/provable/packed.js';
export { Gadgets } from './lib/provable/gadgets/gadgets.js';
export { Types } from './bindings/mina-transaction/types.js';
export { MerkleList, MerkleListIterator } from './lib/provable/merkle-list.js';
export { Option } from './lib/provable/option.js';
export * as Mina from './lib/mina/mina.js';
export {
Transaction,
type TransactionPromise,
type PendingTransaction,
type IncludedTransaction,
type RejectedTransaction,
type PendingTransactionPromise,
} from './lib/mina/transaction.js';
export type { DeployArgs } from './lib/mina/zkapp.js';
export { SmartContract, method, declareMethods } from './lib/mina/zkapp.js';
export { Reducer } from './lib/mina/actions/reducer.js';
export { state, State, declareState } from './lib/mina/state.js';
export type { JsonProof } from './lib/proof-system/zkprogram.js';
export {
type ProofBase,
Proof,
DynamicProof,
SelfProof,
verify,
Empty,
Undefined,
Void,
VerificationKey,
} from './lib/proof-system/zkprogram.js';
export { Cache, CacheHeader } from './lib/proof-system/cache.js';
export { Account } from './lib/mina/account.js';
export {
TokenId,
AccountUpdate,
Permissions,
ZkappPublicInput,
TransactionVersion,
AccountUpdateForest,
AccountUpdateTree,
} from './lib/mina/account-update.js';
export { TokenAccountUpdateIterator } from './lib/mina/token/forest-iterator.js';
export { TokenContract } from './lib/mina/token/token-contract.js';
export type { TransactionStatus } from './lib/mina/graphql.js';
export {
fetchAccount,
fetchLastBlock,
fetchTransactionStatus,
checkZkappTransaction,
fetchEvents,
addCachedAccount,
setGraphqlEndpoint,
setGraphqlEndpoints,
setArchiveGraphqlEndpoint,
sendZkapp,
Lightnet,
} from './lib/mina/fetch.js';
export * as Encryption from './lib/provable/crypto/encryption.js';
export * as Encoding from './bindings/lib/encoding.js';
export { Character, CircuitString } from './lib/provable/string.js';
export { MerkleTree, MerkleWitness } from './lib/provable/merkle-tree.js';
export { MerkleMap, MerkleMapWitness } from './lib/provable/merkle-map.js';
export { Nullifier } from './lib/provable/crypto/nullifier.js';
export { ZkProgram } from './lib/proof-system/zkprogram.js';
export { Crypto } from './lib/provable/crypto/crypto.js';
export type { NetworkId } from './mina-signer/mina-signer.js';
export { setNumberOfWorkers } from './lib/proof-system/workers.js';
// experimental APIs
import { memoizeWitness } from './lib/provable/provable.js';
import * as OffchainState_ from './lib/mina/actions/offchain-state.js';
export { Experimental };
const Experimental_ = {
memoizeWitness,
};
/**
* This module exposes APIs that are unstable, in the sense that the API surface is expected to change.
* (Not unstable in the sense that they are less functional or tested than other parts.)
*/
namespace Experimental {
export let memoizeWitness = Experimental_.memoizeWitness;
// offchain state
export let OffchainState = OffchainState_.OffchainState;
/**
* Commitments that keep track of the current state of an offchain Merkle tree constructed from actions.
* Intended to be stored on-chain.
*
* Fields:
* - `root`: The root of the current Merkle tree
* - `actionState`: The hash pointing to the list of actions that have been applied to form the current Merkle tree
*/
export class OffchainStateCommitments extends OffchainState_.OffchainStateCommitments {}
}
Error.stackTraceLimit = 100000;