@steerprotocol/matador-strategy-sdk
v1.0.1
Published
Strategy bundle, policy pack, registry, and strategy-config helpers for Matador integrations.
Readme
Matador Strategy SDK
@metadore/matador-strategy-sdk contains Matador strategy-layer helpers:
- embedded versioned strategy bundles and compiled policy artifacts,
- policy-pack publication request builders and state reads,
- strategy-registry request builders and state reads,
- Atlas strategy-config payload and digest helpers,
- optional Pinata publishing through a subpath export.
Core Matador contract deployments, wallet bootstrap, Kernel helpers, and validator install helpers stay in @metadore/matador-sdk.
Install
npm install @metadore/matador-strategy-sdk viemUsage
import {
atlasYieldCircuitBundle,
buildAtlasStrategyConfigPayload,
encodeMissingOrStalePackCalls,
encodeStrategySetupCalls,
readPolicyPackState,
} from '@metadore/matador-strategy-sdk'
import { getDeployments } from '@metadore/matador-sdk/core'
const deployments = getDeployments(42161)
const policyPacks = await readPolicyPackState({
publicClient,
deployments,
bundle: atlasYieldCircuitBundle,
})
const packRequests = encodeMissingOrStalePackCalls({
deployments,
bundle: atlasYieldCircuitBundle,
state: policyPacks,
})
const registryRequests = encodeStrategySetupCalls({
deployments,
account,
bundle: atlasYieldCircuitBundle,
strategyAdmin,
strategyConfigUri,
strategyOperator,
})Use @metadore/matador-strategy-sdk/pinata for server-side Pinata publishing.
