Core class and the types you pass to it. It is written from the SDK source at version 1.4.3. When this page and the source disagree, the source is right.
Packages
The packages are renamed from@veilnyx-sdk/* to @palliora.org/defi-*. See the Rename map.
ShieldedAccount
See Shielded accounts for how the keys relate.
Core
Options
Circuit names are
register, transact21, transact22, transact23, transact42, transact44 and treeUpdate. The name of a transact circuit is the number of input notes followed by the number of output notes, so transact42 has four in and two out. The prover builds the name from the transaction and throws Circuit path for <name> not found if you did not supply that circuit.
Core throws Explicit services are required for now unless you give it a contractSource, a notesSource, a commitmentTreeSource and an addressTreeSource.
Methods
TransactionRequest
TransactionType
TransactionOptions
A request is rejected before any work if
assetIds and values differ in length, a DEPOSIT has a fee, a bundler transaction has no fee asset, or a WITHDRAW or CALL_ADAPTER has a to that is not a public address.
createTransaction spends only notes that are already in the commitment tree. A note still in the queue is counted in pending and is not chosen.
Results
toSolidityInput() returns the struct in the shape the pool ABI expects. Pass it as the single argument.
Services you supply
Core reads the network through four interfaces from the shared-types package.
The Palliora DeFi app reads announcements, commitments and registrations from a subgraph and keeps its own tree sources and caches. The
SimpleTreeSource in the services package does not implement update, so it does not satisfy ITreeSource as Core uses it. Write your own source for now.
The address resolver is not injectable. Core always builds its own from RegisterAddress logs. This stops a replaced resolver from sending funds to an address an attacker chose.
Fee helpers
Exported from the core package.DEFAULT_USER_OP_FEE_HEADROOM_BPS is the default headroom in basis points.
Supported networks
The SDK keeps a list of chains.Core throws Unsupported chainId <id> for any other. In 1.4.3 the list covers Ethereum mainnet and Sepolia, with a few development networks. HyperEVM (chain ids 998 and 999) is not in the published list. A build with HyperEVM is [SDK_VERSION_WITH_HYPEREVM]. That build also adds relayed and relayFee to TransactionOptions, for relayers that submit pool.transact directly.