@oobe-protocol-labs/synapse-sap-sdk 0.13.0 → 0.15.0
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.
- package/dist/cjs/accounts/index.js +286 -0
- package/dist/cjs/accounts/index.js.map +1 -0
- package/dist/cjs/client.js +125 -0
- package/dist/cjs/client.js.map +1 -0
- package/dist/cjs/constants/seeds.js +9 -9
- package/dist/cjs/constants/seeds.js.map +1 -1
- package/dist/cjs/constants.js +66 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/errors.js +260 -0
- package/dist/cjs/errors.js.map +1 -0
- package/dist/cjs/events/index.js +37 -123
- package/dist/cjs/events/index.js.map +1 -1
- package/dist/cjs/idlTypes.js +4 -0
- package/dist/cjs/idlTypes.js.map +1 -0
- package/dist/cjs/index.js +75 -241
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/instructions/agent.js +90 -0
- package/dist/cjs/instructions/agent.js.map +1 -0
- package/dist/cjs/instructions/attestation.js +113 -0
- package/dist/cjs/instructions/attestation.js.map +1 -0
- package/dist/cjs/instructions/digest.js +29 -0
- package/dist/cjs/instructions/digest.js.map +1 -0
- package/dist/cjs/instructions/dispute.js +117 -0
- package/dist/cjs/instructions/dispute.js.map +1 -0
- package/dist/cjs/instructions/escrow.js +102 -0
- package/dist/cjs/instructions/escrow.js.map +1 -0
- package/dist/cjs/instructions/global.js +29 -0
- package/dist/cjs/instructions/global.js.map +1 -0
- package/dist/cjs/instructions/index.js +31 -0
- package/dist/cjs/instructions/index.js.map +1 -0
- package/dist/cjs/instructions/indexing.js +222 -0
- package/dist/cjs/instructions/indexing.js.map +1 -0
- package/dist/cjs/instructions/misc.js +74 -0
- package/dist/cjs/instructions/misc.js.map +1 -0
- package/dist/cjs/instructions/session.js +90 -0
- package/dist/cjs/instructions/session.js.map +1 -0
- package/dist/cjs/instructions/staking.js +133 -0
- package/dist/cjs/instructions/staking.js.map +1 -0
- package/dist/cjs/instructions/subscription.js +81 -0
- package/dist/cjs/instructions/subscription.js.map +1 -0
- package/dist/cjs/instructions/tools.js +110 -0
- package/dist/cjs/instructions/tools.js.map +1 -0
- package/dist/cjs/instructions/vault.js +107 -0
- package/dist/cjs/instructions/vault.js.map +1 -0
- package/dist/cjs/pdas/index.js +120 -0
- package/dist/cjs/pdas/index.js.map +1 -0
- package/dist/cjs/registries/fairscale.js +1 -1
- package/dist/cjs/registries/fairscale.js.map +1 -1
- package/dist/cjs/registries/metaplex-bridge.js +1 -1
- package/dist/cjs/registries/metaplex-bridge.js.map +1 -1
- package/dist/cjs/types.js +45 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/utils/escrow-validation.js +1 -1
- package/dist/cjs/utils/escrow-validation.js.map +1 -1
- package/dist/cjs/utils/index.js +32 -83
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/merchant-validator.js +5 -5
- package/dist/cjs/utils/merchant-validator.js.map +1 -1
- package/dist/cjs/utils/validate.js +236 -0
- package/dist/cjs/utils/validate.js.map +1 -0
- package/dist/cjs/utils/volume-curve.js +1 -1
- package/dist/cjs/utils/volume-curve.js.map +1 -1
- package/dist/esm/accounts/index.d.ts +11 -0
- package/dist/esm/accounts/index.d.ts.map +1 -0
- package/dist/esm/accounts/index.js +273 -0
- package/dist/esm/accounts/index.js.map +1 -0
- package/dist/esm/client.d.ts +55 -0
- package/dist/esm/client.d.ts.map +1 -0
- package/dist/esm/client.js +87 -0
- package/dist/esm/client.js.map +1 -0
- package/dist/esm/constants/addresses.d.ts +117 -0
- package/dist/esm/constants/addresses.d.ts.map +1 -0
- package/dist/esm/constants/index.d.ts +31 -0
- package/dist/esm/constants/index.d.ts.map +1 -0
- package/dist/esm/constants/limits.d.ts +149 -0
- package/dist/esm/constants/limits.d.ts.map +1 -0
- package/{src/constants/network.ts → dist/esm/constants/network.d.ts} +23 -31
- package/dist/esm/constants/network.d.ts.map +1 -0
- package/{src/constants/payments.ts → dist/esm/constants/payments.d.ts} +11 -35
- package/dist/esm/constants/payments.d.ts.map +1 -0
- package/{src/constants/programs.ts → dist/esm/constants/programs.d.ts} +6 -20
- package/dist/esm/constants/programs.d.ts.map +1 -0
- package/dist/esm/constants/seeds.d.ts +80 -0
- package/dist/esm/constants/seeds.d.ts.map +1 -0
- package/dist/esm/constants/seeds.js +9 -9
- package/dist/esm/constants/seeds.js.map +1 -1
- package/dist/esm/constants.d.ts +39 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +41 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/core/client.d.ts +452 -0
- package/dist/esm/core/client.d.ts.map +1 -0
- package/dist/esm/core/connection.d.ts +305 -0
- package/dist/esm/core/connection.d.ts.map +1 -0
- package/{src/core/index.ts → dist/esm/core/index.d.ts} +1 -1
- package/dist/esm/core/index.d.ts.map +1 -0
- package/dist/esm/errors/index.d.ts +276 -0
- package/dist/esm/errors/index.d.ts.map +1 -0
- package/dist/esm/errors.d.ts +119 -0
- package/dist/esm/errors.d.ts.map +1 -0
- package/dist/esm/errors.js +252 -0
- package/dist/esm/errors.js.map +1 -0
- package/dist/esm/events/geyser.d.ts +150 -0
- package/dist/esm/events/geyser.d.ts.map +1 -0
- package/dist/esm/events/index.d.ts +17 -0
- package/dist/esm/events/index.d.ts.map +1 -0
- package/dist/esm/events/index.js +34 -122
- package/dist/esm/events/index.js.map +1 -1
- package/{src/idl/index.ts → dist/esm/idl/index.d.ts} +9 -15
- package/dist/esm/idl/index.d.ts.map +1 -0
- package/dist/esm/idlTypes.d.ts +925 -0
- package/dist/esm/idlTypes.d.ts.map +1 -0
- package/dist/esm/idlTypes.js +3 -0
- package/dist/esm/idlTypes.js.map +1 -0
- package/dist/esm/index.d.ts +12 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +15 -88
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/instructions/agent.d.ts +71 -0
- package/dist/esm/instructions/agent.d.ts.map +1 -0
- package/dist/esm/instructions/agent.js +86 -0
- package/dist/esm/instructions/agent.js.map +1 -0
- package/dist/esm/instructions/attestation.d.ts +76 -0
- package/dist/esm/instructions/attestation.d.ts.map +1 -0
- package/dist/esm/instructions/attestation.js +109 -0
- package/dist/esm/instructions/attestation.js.map +1 -0
- package/dist/esm/instructions/digest.d.ts +20 -0
- package/dist/esm/instructions/digest.d.ts.map +1 -0
- package/dist/esm/instructions/digest.js +25 -0
- package/dist/esm/instructions/digest.js.map +1 -0
- package/dist/esm/instructions/dispute.d.ts +81 -0
- package/dist/esm/instructions/dispute.d.ts.map +1 -0
- package/dist/esm/instructions/dispute.js +113 -0
- package/dist/esm/instructions/dispute.js.map +1 -0
- package/dist/esm/instructions/escrow.d.ts +79 -0
- package/dist/esm/instructions/escrow.d.ts.map +1 -0
- package/dist/esm/instructions/escrow.js +98 -0
- package/dist/esm/instructions/escrow.js.map +1 -0
- package/dist/esm/instructions/global.d.ts +14 -0
- package/dist/esm/instructions/global.d.ts.map +1 -0
- package/dist/esm/instructions/global.js +25 -0
- package/dist/esm/instructions/global.js.map +1 -0
- package/dist/esm/instructions/index.d.ts +14 -0
- package/dist/esm/instructions/index.d.ts.map +1 -0
- package/dist/esm/instructions/index.js +15 -0
- package/dist/esm/instructions/index.js.map +1 -0
- package/dist/esm/instructions/indexing.d.ts +150 -0
- package/dist/esm/instructions/indexing.d.ts.map +1 -0
- package/dist/esm/instructions/indexing.js +218 -0
- package/dist/esm/instructions/indexing.js.map +1 -0
- package/dist/esm/instructions/memory.d.ts +8 -0
- package/dist/esm/instructions/memory.d.ts.map +1 -0
- package/dist/esm/instructions/memory.js +234 -0
- package/dist/esm/instructions/memory.js.map +1 -0
- package/dist/esm/instructions/misc.d.ts +50 -0
- package/dist/esm/instructions/misc.d.ts.map +1 -0
- package/dist/esm/instructions/misc.js +70 -0
- package/dist/esm/instructions/misc.js.map +1 -0
- package/dist/esm/instructions/session.d.ts +57 -0
- package/dist/esm/instructions/session.d.ts.map +1 -0
- package/dist/esm/instructions/session.js +86 -0
- package/dist/esm/instructions/session.js.map +1 -0
- package/dist/esm/instructions/staking.d.ts +85 -0
- package/dist/esm/instructions/staking.d.ts.map +1 -0
- package/dist/esm/instructions/staking.js +129 -0
- package/dist/esm/instructions/staking.js.map +1 -0
- package/dist/esm/instructions/subscription.d.ts +50 -0
- package/dist/esm/instructions/subscription.d.ts.map +1 -0
- package/dist/esm/instructions/subscription.js +77 -0
- package/dist/esm/instructions/subscription.js.map +1 -0
- package/dist/esm/instructions/tools.d.ts +88 -0
- package/dist/esm/instructions/tools.d.ts.map +1 -0
- package/dist/esm/instructions/tools.js +106 -0
- package/dist/esm/instructions/tools.js.map +1 -0
- package/dist/esm/instructions/vault.d.ts +84 -0
- package/dist/esm/instructions/vault.d.ts.map +1 -0
- package/dist/esm/instructions/vault.js +103 -0
- package/dist/esm/instructions/vault.js.map +1 -0
- package/dist/esm/modules/agent.d.ts +166 -0
- package/dist/esm/modules/agent.d.ts.map +1 -0
- package/dist/esm/modules/attestation.d.ts +96 -0
- package/dist/esm/modules/attestation.d.ts.map +1 -0
- package/dist/esm/modules/base.d.ts +161 -0
- package/dist/esm/modules/base.d.ts.map +1 -0
- package/dist/esm/modules/escrow-v2.d.ts +169 -0
- package/dist/esm/modules/escrow-v2.d.ts.map +1 -0
- package/dist/esm/modules/feedback.d.ts +105 -0
- package/dist/esm/modules/feedback.d.ts.map +1 -0
- package/{src/modules/index.ts → dist/esm/modules/index.d.ts} +1 -1
- package/dist/esm/modules/index.d.ts.map +1 -0
- package/dist/esm/modules/indexing.d.ts +200 -0
- package/dist/esm/modules/indexing.d.ts.map +1 -0
- package/dist/esm/modules/ledger.d.ts +150 -0
- package/dist/esm/modules/ledger.d.ts.map +1 -0
- package/dist/esm/modules/receipt.d.ts +77 -0
- package/dist/esm/modules/receipt.d.ts.map +1 -0
- package/dist/esm/modules/staking.d.ts +51 -0
- package/dist/esm/modules/staking.d.ts.map +1 -0
- package/dist/esm/modules/subscription.d.ts +33 -0
- package/dist/esm/modules/subscription.d.ts.map +1 -0
- package/dist/esm/modules/tools.d.ts +182 -0
- package/dist/esm/modules/tools.d.ts.map +1 -0
- package/dist/esm/modules/vault.d.ts +240 -0
- package/dist/esm/modules/vault.d.ts.map +1 -0
- package/dist/esm/parser/client.d.ts +123 -0
- package/dist/esm/parser/client.d.ts.map +1 -0
- package/dist/esm/parser/complete.d.ts +90 -0
- package/dist/esm/parser/complete.d.ts.map +1 -0
- package/{src/parser/index.ts → dist/esm/parser/index.d.ts} +6 -37
- package/dist/esm/parser/index.d.ts.map +1 -0
- package/dist/esm/parser/inner.d.ts +114 -0
- package/dist/esm/parser/inner.d.ts.map +1 -0
- package/{src/parser/instructions.ts → dist/esm/parser/instructions.d.ts} +4 -63
- package/dist/esm/parser/instructions.d.ts.map +1 -0
- package/dist/esm/parser/transaction.d.ts +77 -0
- package/dist/esm/parser/transaction.d.ts.map +1 -0
- package/dist/esm/parser/types.d.ts +154 -0
- package/dist/esm/parser/types.d.ts.map +1 -0
- package/{src/pda/index.ts → dist/esm/pda/index.d.ts} +33 -442
- package/dist/esm/pda/index.d.ts.map +1 -0
- package/dist/esm/pdas/index.d.ts +37 -0
- package/dist/esm/pdas/index.d.ts.map +1 -0
- package/dist/esm/pdas/index.js +101 -0
- package/dist/esm/pdas/index.js.map +1 -0
- package/dist/esm/plugin/index.d.ts +171 -0
- package/dist/esm/plugin/index.d.ts.map +1 -0
- package/dist/esm/plugin/protocols.d.ts +152 -0
- package/dist/esm/plugin/protocols.d.ts.map +1 -0
- package/dist/esm/plugin/schemas.d.ts +829 -0
- package/dist/esm/plugin/schemas.d.ts.map +1 -0
- package/dist/esm/postgres/adapter.d.ts +355 -0
- package/dist/esm/postgres/adapter.d.ts.map +1 -0
- package/dist/esm/postgres/index.d.ts +24 -0
- package/dist/esm/postgres/index.d.ts.map +1 -0
- package/dist/esm/postgres/serializers.d.ts +30 -0
- package/dist/esm/postgres/serializers.d.ts.map +1 -0
- package/dist/esm/postgres/sync.d.ts +156 -0
- package/dist/esm/postgres/sync.d.ts.map +1 -0
- package/dist/esm/postgres/types.d.ts +167 -0
- package/dist/esm/postgres/types.d.ts.map +1 -0
- package/dist/esm/registries/builder.d.ts +340 -0
- package/dist/esm/registries/builder.d.ts.map +1 -0
- package/dist/esm/registries/discovery.d.ts +333 -0
- package/dist/esm/registries/discovery.d.ts.map +1 -0
- package/dist/esm/registries/fairscale.d.ts +680 -0
- package/dist/esm/registries/fairscale.d.ts.map +1 -0
- package/dist/esm/registries/fairscale.js +1 -1
- package/dist/esm/registries/fairscale.js.map +1 -1
- package/dist/esm/registries/index.d.ts +52 -0
- package/dist/esm/registries/index.d.ts.map +1 -0
- package/dist/esm/registries/metaplex-bridge.d.ts +489 -0
- package/dist/esm/registries/metaplex-bridge.d.ts.map +1 -0
- package/dist/esm/registries/metaplex-bridge.js +1 -1
- package/dist/esm/registries/metaplex-bridge.js.map +1 -1
- package/dist/esm/registries/session.d.ts +323 -0
- package/dist/esm/registries/session.d.ts.map +1 -0
- package/dist/esm/registries/x402.d.ts +530 -0
- package/dist/esm/registries/x402.d.ts.map +1 -0
- package/dist/esm/types/accounts.d.ts +765 -0
- package/dist/esm/types/accounts.d.ts.map +1 -0
- package/dist/esm/types/common.d.ts +166 -0
- package/dist/esm/types/common.d.ts.map +1 -0
- package/dist/esm/types/endpoint.d.ts +161 -0
- package/dist/esm/types/endpoint.d.ts.map +1 -0
- package/dist/esm/types/enums.d.ts +353 -0
- package/dist/esm/types/enums.d.ts.map +1 -0
- package/dist/esm/types/index.d.ts +29 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/instructions.d.ts +400 -0
- package/dist/esm/types/instructions.d.ts.map +1 -0
- package/dist/esm/types.d.ts +236 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +40 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils/anchor-errors.d.ts +61 -0
- package/dist/esm/utils/anchor-errors.d.ts.map +1 -0
- package/dist/esm/utils/endpoint-validator.d.ts +110 -0
- package/dist/esm/utils/endpoint-validator.d.ts.map +1 -0
- package/dist/esm/utils/escrow-validation.d.ts +145 -0
- package/dist/esm/utils/escrow-validation.d.ts.map +1 -0
- package/dist/esm/utils/escrow-validation.js +1 -1
- package/dist/esm/utils/escrow-validation.js.map +1 -1
- package/{src/utils/hash.ts → dist/esm/utils/hash.d.ts} +4 -42
- package/dist/esm/utils/hash.d.ts.map +1 -0
- package/dist/esm/utils/index.d.ts +6 -0
- package/dist/esm/utils/index.d.ts.map +1 -0
- package/dist/esm/utils/index.js +16 -33
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/merchant-validator.d.ts +176 -0
- package/dist/esm/utils/merchant-validator.d.ts.map +1 -0
- package/dist/esm/utils/merchant-validator.js +1 -1
- package/dist/esm/utils/merchant-validator.js.map +1 -1
- package/dist/esm/utils/network-normalizer.d.ts +120 -0
- package/dist/esm/utils/network-normalizer.d.ts.map +1 -0
- package/dist/esm/utils/priority-fee.d.ts +205 -0
- package/dist/esm/utils/priority-fee.d.ts.map +1 -0
- package/dist/esm/utils/rpc-strategy.d.ts +172 -0
- package/dist/esm/utils/rpc-strategy.d.ts.map +1 -0
- package/dist/esm/utils/schemas.d.ts +351 -0
- package/dist/esm/utils/schemas.d.ts.map +1 -0
- package/{src/utils/serialization.ts → dist/esm/utils/serialization.d.ts} +3 -32
- package/dist/esm/utils/serialization.d.ts.map +1 -0
- package/dist/esm/utils/validate.d.ts +66 -0
- package/dist/esm/utils/validate.d.ts.map +1 -0
- package/dist/esm/utils/validate.js +221 -0
- package/dist/esm/utils/validate.js.map +1 -0
- package/{src/utils/validation.ts → dist/esm/utils/validation.d.ts} +2 -9
- package/dist/esm/utils/validation.d.ts.map +1 -0
- package/{src/utils/volume-curve.ts → dist/esm/utils/volume-curve.d.ts} +2 -73
- package/dist/esm/utils/volume-curve.d.ts.map +1 -0
- package/dist/esm/utils/volume-curve.js +1 -1
- package/dist/esm/utils/volume-curve.js.map +1 -1
- package/dist/esm/utils/x402-direct.d.ts +114 -0
- package/dist/esm/utils/x402-direct.d.ts.map +1 -0
- package/dist/types/constants/seeds.d.ts +2 -0
- package/dist/types/constants/seeds.d.ts.map +1 -1
- package/dist/types/core/client.d.ts +21 -6
- package/dist/types/core/client.d.ts.map +1 -1
- package/dist/types/errors/index.d.ts +59 -0
- package/dist/types/errors/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/agent.d.ts +9 -19
- package/dist/types/modules/agent.d.ts.map +1 -1
- package/dist/types/modules/attestation.d.ts.map +1 -1
- package/dist/types/modules/base.d.ts +54 -0
- package/dist/types/modules/base.d.ts.map +1 -1
- package/dist/types/modules/escrow-v2.d.ts +117 -1
- package/dist/types/modules/escrow-v2.d.ts.map +1 -1
- package/dist/types/modules/index.d.ts +1 -2
- package/dist/types/modules/index.d.ts.map +1 -1
- package/dist/types/modules/receipt.d.ts +14 -0
- package/dist/types/modules/receipt.d.ts.map +1 -1
- package/dist/types/modules/subscription.d.ts.map +1 -1
- package/dist/types/modules/tools.d.ts +0 -10
- package/dist/types/modules/tools.d.ts.map +1 -1
- package/dist/types/modules/vault.d.ts.map +1 -1
- package/dist/types/pda/index.d.ts +17 -0
- package/dist/types/pda/index.d.ts.map +1 -1
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/registries/builder.d.ts +2 -9
- package/dist/types/registries/builder.d.ts.map +1 -1
- package/dist/types/registries/metaplex-bridge.d.ts.map +1 -1
- package/dist/types/registries/session.d.ts +3 -9
- package/dist/types/registries/session.d.ts.map +1 -1
- package/dist/types/registries/x402.d.ts +2 -9
- package/dist/types/registries/x402.d.ts.map +1 -1
- package/dist/types/types/accounts.d.ts +52 -0
- package/dist/types/types/accounts.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/utils/rpc-strategy.d.ts +7 -0
- package/dist/types/utils/rpc-strategy.d.ts.map +1 -1
- package/package.json +59 -183
- package/src/constants/addresses.ts +0 -162
- package/src/constants/index.ts +0 -69
- package/src/constants/limits.ts +0 -165
- package/src/constants/seeds.ts +0 -85
- package/src/core/client.ts +0 -583
- package/src/core/connection.ts +0 -461
- package/src/errors/index.ts +0 -346
- package/src/events/geyser.ts +0 -384
- package/src/events/index.ts +0 -335
- package/src/events/yellowstone.d.ts +0 -7
- package/src/idl/synapse_agent_sap.json +0 -14595
- package/src/index.ts +0 -421
- package/src/modules/agent.ts +0 -319
- package/src/modules/attestation.ts +0 -168
- package/src/modules/base.ts +0 -247
- package/src/modules/escrow-v2.ts +0 -871
- package/src/modules/escrow.ts +0 -439
- package/src/modules/feedback.ts +0 -186
- package/src/modules/indexing.ts +0 -444
- package/src/modules/ledger.ts +0 -262
- package/src/modules/receipt.ts +0 -212
- package/src/modules/staking.ts +0 -223
- package/src/modules/subscription.ts +0 -147
- package/src/modules/tools.ts +0 -454
- package/src/modules/vault.ts +0 -558
- package/src/parser/client.ts +0 -211
- package/src/parser/complete.ts +0 -232
- package/src/parser/inner.ts +0 -255
- package/src/parser/transaction.ts +0 -200
- package/src/parser/types.ts +0 -182
- package/src/plugin/index.ts +0 -1224
- package/src/plugin/protocols.ts +0 -404
- package/src/plugin/schemas.ts +0 -941
- package/src/postgres/adapter.ts +0 -904
- package/src/postgres/index.ts +0 -59
- package/src/postgres/schema.sql +0 -683
- package/src/postgres/serializers.ts +0 -485
- package/src/postgres/sync.ts +0 -340
- package/src/postgres/types.ts +0 -245
- package/src/registries/builder.ts +0 -607
- package/src/registries/discovery.ts +0 -572
- package/src/registries/fairscale.ts +0 -1278
- package/src/registries/index.ts +0 -143
- package/src/registries/metaplex-bridge.ts +0 -1199
- package/src/registries/session.ts +0 -613
- package/src/registries/x402.ts +0 -1048
- package/src/types/accounts.ts +0 -858
- package/src/types/common.ts +0 -187
- package/src/types/endpoint.ts +0 -181
- package/src/types/enums.ts +0 -333
- package/src/types/index.ts +0 -121
- package/src/types/instructions.ts +0 -453
- package/src/utils/anchor-errors.ts +0 -461
- package/src/utils/endpoint-validator.ts +0 -300
- package/src/utils/escrow-validation.ts +0 -301
- package/src/utils/index.ts +0 -118
- package/src/utils/merchant-validator.ts +0 -359
- package/src/utils/network-normalizer.ts +0 -240
- package/src/utils/priority-fee.ts +0 -325
- package/src/utils/rpc-strategy.ts +0 -322
- package/src/utils/schemas.ts +0 -359
- package/src/utils/x402-direct.ts +0 -370
- /package/dist/{types → esm}/modules/escrow.d.ts +0 -0
- /package/dist/{types → esm}/modules/escrow.d.ts.map +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
import BN from "bn.js";
|
|
3
|
+
/** Derive Agent PDA from wallet pubkey */
|
|
4
|
+
export declare function getAgentPDA(wallet: PublicKey): [PublicKey, number];
|
|
5
|
+
/** Derive AgentStats PDA from wallet pubkey */
|
|
6
|
+
export declare function getAgentStatsPDA(wallet: PublicKey): [PublicKey, number];
|
|
7
|
+
/** Derive AgentStake PDA from wallet pubkey */
|
|
8
|
+
export declare function getAgentStakePDA(wallet: PublicKey): [PublicKey, number];
|
|
9
|
+
/** Derive EscrowV2 PDA from agent wallet + nonce */
|
|
10
|
+
export declare function getEscrowV2PDA(agent: PublicKey, escrowNonce: number): [PublicKey, number];
|
|
11
|
+
/** Derive PendingSettlement PDA from escrow + settlement_index */
|
|
12
|
+
export declare function getPendingSettlementPDA(escrow: PublicKey, settlementIndex: BN | number): [PublicKey, number];
|
|
13
|
+
/** Derive Dispute PDA from escrow + settlement_index */
|
|
14
|
+
export declare function getDisputePDA(escrow: PublicKey, settlementIndex: BN | number): [PublicKey, number];
|
|
15
|
+
/** Derive Subscription PDA from agent + subscriber + nonce */
|
|
16
|
+
export declare function getSubscriptionPDA(agent: PublicKey, subscriber: PublicKey, nonce: number): [PublicKey, number];
|
|
17
|
+
/** Derive Vault PDA from agent pubkey */
|
|
18
|
+
export declare function getVaultPDA(agent: PublicKey): [PublicKey, number];
|
|
19
|
+
/** Derive SessionLedger PDA from vault + session number */
|
|
20
|
+
export declare function getSessionLedgerPDA(vault: PublicKey, session: BN | number): [PublicKey, number];
|
|
21
|
+
/** Derive EpochPage PDA from vault + epoch */
|
|
22
|
+
export declare function getEpochPagePDA(vault: PublicKey, epoch: BN | number): [PublicKey, number];
|
|
23
|
+
/** Derive VaultDelegate PDA from vault + delegate */
|
|
24
|
+
export declare function getVaultDelegatePDA(vault: PublicKey, delegate: PublicKey): [PublicKey, number];
|
|
25
|
+
/** Derive Tool PDA from agent + tool_name */
|
|
26
|
+
export declare function getToolPDA(agent: PublicKey, toolName: string): [PublicKey, number];
|
|
27
|
+
/** Derive ToolCategoryIndex PDA from category u8 */
|
|
28
|
+
export declare function getToolCategoryIndexPDA(category: number): [PublicKey, number];
|
|
29
|
+
/** Derive CapabilityIndex PDA from capability_hash (32 bytes) */
|
|
30
|
+
export declare function getCapabilityIndexPDA(capabilityHash: Uint8Array): [PublicKey, number];
|
|
31
|
+
/** Derive ProtocolIndex PDA from protocol_hash (32 bytes) */
|
|
32
|
+
export declare function getProtocolIndexPDA(protocolHash: Uint8Array): [PublicKey, number];
|
|
33
|
+
/** Derive GlobalConfig PDA (singleton) */
|
|
34
|
+
export declare function getGlobalPDA(): [PublicKey, number];
|
|
35
|
+
/** Convert a string to a 32-byte hash for capability/protocol indices */
|
|
36
|
+
export declare function hashString(s: string): Uint8Array;
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pdas/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,MAAM,OAAO,CAAC;AAIvB,0CAA0C;AAC1C,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,CAAC,SA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AAS,EAChB,QAAQ,EAAE,SAAS,GAClB,CAAC,SAAS,EAAE,MAAM,CAAC,CAKrB;AAED,6CAA6C;AAC7C,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAKlF;AAED,oDAAoD;AACpD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAK7E;AAED,iEAAiE;AACjE,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,UAAU,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAKrF;AAED,6DAA6D;AAC7D,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,UAAU,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAKjF;AAED,0CAA0C;AAC1C,wBAAgB,YAAY,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAKlD;AAKD,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAKhD"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// ================================================================
|
|
2
|
+
// synapse-sap-sdk / src/pdas/index.ts
|
|
3
|
+
// PDA derivation utilities — byte-perfect with on-chain seeds
|
|
4
|
+
// ================================================================
|
|
5
|
+
import { PublicKey } from "@solana/web3.js";
|
|
6
|
+
import { SEEDS, PROGRAM_ID } from "../constants";
|
|
7
|
+
const PROGRAM_PUBLIC_KEY = new PublicKey(PROGRAM_ID);
|
|
8
|
+
/** Derive Agent PDA from wallet pubkey */
|
|
9
|
+
export function getAgentPDA(wallet) {
|
|
10
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.AGENT), wallet.toBuffer()], PROGRAM_PUBLIC_KEY);
|
|
11
|
+
}
|
|
12
|
+
/** Derive AgentStats PDA from wallet pubkey */
|
|
13
|
+
export function getAgentStatsPDA(wallet) {
|
|
14
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.AGENT_STATS), wallet.toBuffer()], PROGRAM_PUBLIC_KEY);
|
|
15
|
+
}
|
|
16
|
+
/** Derive AgentStake PDA from wallet pubkey */
|
|
17
|
+
export function getAgentStakePDA(wallet) {
|
|
18
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.AGENT_STAKE), wallet.toBuffer()], PROGRAM_PUBLIC_KEY);
|
|
19
|
+
}
|
|
20
|
+
/** Derive EscrowV2 PDA from agent wallet + nonce */
|
|
21
|
+
export function getEscrowV2PDA(agent, escrowNonce) {
|
|
22
|
+
return PublicKey.findProgramAddressSync([
|
|
23
|
+
Buffer.from(SEEDS.ESCROW_V2),
|
|
24
|
+
agent.toBuffer(),
|
|
25
|
+
Buffer.from(new Uint32Array([escrowNonce]).buffer),
|
|
26
|
+
], PROGRAM_PUBLIC_KEY);
|
|
27
|
+
}
|
|
28
|
+
/** Derive PendingSettlement PDA from escrow + settlement_index */
|
|
29
|
+
export function getPendingSettlementPDA(escrow, settlementIndex) {
|
|
30
|
+
const idxBuf = typeof settlementIndex === "number"
|
|
31
|
+
? Buffer.from(new Uint32Array([settlementIndex]).buffer)
|
|
32
|
+
: settlementIndex.toArrayLike(Buffer, "le", 4);
|
|
33
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.PENDING_SETTLE), escrow.toBuffer(), idxBuf], PROGRAM_PUBLIC_KEY);
|
|
34
|
+
}
|
|
35
|
+
/** Derive Dispute PDA from escrow + settlement_index */
|
|
36
|
+
export function getDisputePDA(escrow, settlementIndex) {
|
|
37
|
+
const idxBuf = typeof settlementIndex === "number"
|
|
38
|
+
? Buffer.from(new Uint32Array([settlementIndex]).buffer)
|
|
39
|
+
: settlementIndex.toArrayLike(Buffer, "le", 4);
|
|
40
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.DISPUTE), escrow.toBuffer(), idxBuf], PROGRAM_PUBLIC_KEY);
|
|
41
|
+
}
|
|
42
|
+
/** Derive Subscription PDA from agent + subscriber + nonce */
|
|
43
|
+
export function getSubscriptionPDA(agent, subscriber, nonce) {
|
|
44
|
+
return PublicKey.findProgramAddressSync([
|
|
45
|
+
Buffer.from(SEEDS.SUBSCRIPTION),
|
|
46
|
+
agent.toBuffer(),
|
|
47
|
+
subscriber.toBuffer(),
|
|
48
|
+
Buffer.from(new Uint32Array([nonce]).buffer),
|
|
49
|
+
], PROGRAM_PUBLIC_KEY);
|
|
50
|
+
}
|
|
51
|
+
/** Derive Vault PDA from agent pubkey */
|
|
52
|
+
export function getVaultPDA(agent) {
|
|
53
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.VAULT), agent.toBuffer()], PROGRAM_PUBLIC_KEY);
|
|
54
|
+
}
|
|
55
|
+
/** Derive SessionLedger PDA from vault + session number */
|
|
56
|
+
export function getSessionLedgerPDA(vault, session) {
|
|
57
|
+
const sessionBuf = typeof session === "number"
|
|
58
|
+
? Buffer.from(new Uint32Array([session]).buffer)
|
|
59
|
+
: session.toArrayLike(Buffer, "le", 4);
|
|
60
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.SESSION), vault.toBuffer(), sessionBuf], PROGRAM_PUBLIC_KEY);
|
|
61
|
+
}
|
|
62
|
+
/** Derive EpochPage PDA from vault + epoch */
|
|
63
|
+
export function getEpochPagePDA(vault, epoch) {
|
|
64
|
+
const epochBuf = typeof epoch === "number"
|
|
65
|
+
? Buffer.from(new Uint32Array([epoch]).buffer)
|
|
66
|
+
: epoch.toArrayLike(Buffer, "le", 4);
|
|
67
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.EPOCH_PAGE), vault.toBuffer(), epochBuf], PROGRAM_PUBLIC_KEY);
|
|
68
|
+
}
|
|
69
|
+
/** Derive VaultDelegate PDA from vault + delegate */
|
|
70
|
+
export function getVaultDelegatePDA(vault, delegate) {
|
|
71
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.VAULT_DELEGATE), vault.toBuffer(), delegate.toBuffer()], PROGRAM_PUBLIC_KEY);
|
|
72
|
+
}
|
|
73
|
+
/** Derive Tool PDA from agent + tool_name */
|
|
74
|
+
export function getToolPDA(agent, toolName) {
|
|
75
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.TOOL), agent.toBuffer(), Buffer.from(toolName)], PROGRAM_PUBLIC_KEY);
|
|
76
|
+
}
|
|
77
|
+
/** Derive ToolCategoryIndex PDA from category u8 */
|
|
78
|
+
export function getToolCategoryIndexPDA(category) {
|
|
79
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.TOOL_CAT_IDX), Buffer.from([category])], PROGRAM_PUBLIC_KEY);
|
|
80
|
+
}
|
|
81
|
+
/** Derive CapabilityIndex PDA from capability_hash (32 bytes) */
|
|
82
|
+
export function getCapabilityIndexPDA(capabilityHash) {
|
|
83
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.CAPABILITY_IDX), Buffer.from(capabilityHash)], PROGRAM_PUBLIC_KEY);
|
|
84
|
+
}
|
|
85
|
+
/** Derive ProtocolIndex PDA from protocol_hash (32 bytes) */
|
|
86
|
+
export function getProtocolIndexPDA(protocolHash) {
|
|
87
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.PROTOCOL_IDX), Buffer.from(protocolHash)], PROGRAM_PUBLIC_KEY);
|
|
88
|
+
}
|
|
89
|
+
/** Derive GlobalConfig PDA (singleton) */
|
|
90
|
+
export function getGlobalPDA() {
|
|
91
|
+
return PublicKey.findProgramAddressSync([Buffer.from(SEEDS.GLOBAL)], PROGRAM_PUBLIC_KEY);
|
|
92
|
+
}
|
|
93
|
+
// ── Re-export convenience ──
|
|
94
|
+
/** Convert a string to a 32-byte hash for capability/protocol indices */
|
|
95
|
+
export function hashString(s) {
|
|
96
|
+
// On-chain uses SHA-256; SDK can compute with crypto or just use the same
|
|
97
|
+
// For now, we use sha256 import from solana-sha256-hasher or crypto
|
|
98
|
+
// We'll provide a fallback in utils
|
|
99
|
+
return new Uint8Array(32); // placeholder - filled by utils.hasher
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pdas/index.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,uCAAuC;AACvC,+DAA+D;AAC/D,mEAAmE;AAEnE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGjD,MAAM,kBAAkB,GAAG,IAAI,SAAS,CAAC,UAAU,CAAC,CAAC;AAErD,0CAA0C;AAC1C,MAAM,UAAU,WAAW,CAAC,MAAiB;IAC3C,OAAO,SAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,EAC7C,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,OAAO,SAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,EACnD,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,OAAO,SAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,EACnD,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,cAAc,CAAC,KAAgB,EAAE,WAAmB;IAClE,OAAO,SAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;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AAkB,CACnB,CAAC;AACJ,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,mBAAmB,CAAC,YAAwB;IAC1D,OAAO,SAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,EAC5D,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,YAAY;IAC1B,OAAO,SAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAC3B,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAED,8BAA8B;AAG9B,yEAAyE;AACzE,MAAM,UAAU,UAAU,CAAC,CAAS;IAClC,2EAA2E;IAC3E,oEAAoE;IACpE,oCAAoC;IACpC,OAAO,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,uCAAuC;AACpE,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module plugin
|
|
3
|
+
* @description SynapsePlugin adapter for SAP v2.
|
|
4
|
+
*
|
|
5
|
+
* Exposes 52 tools across 8 on-chain protocol domains as a drop-in
|
|
6
|
+
* `SynapsePlugin` for `SynapseAgentKit`:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { SynapseAgentKit } from '@oobe-protocol-labs/synapse-client-sdk/ai/plugins';
|
|
10
|
+
* import { createSAPPlugin } from '@synapse-sap/sdk/plugin';
|
|
11
|
+
*
|
|
12
|
+
* const sapPlugin = createSAPPlugin({ provider });
|
|
13
|
+
* const kit = new SynapseAgentKit({ rpcUrl })
|
|
14
|
+
* .use(sapPlugin);
|
|
15
|
+
*
|
|
16
|
+
* const tools = kit.getTools(); // → StructuredTool[] (LangChain)
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Architecture:
|
|
20
|
+
* 1. Schemas (Zod) → runtime validation + LLM-friendly descriptions
|
|
21
|
+
* 2. Protocols → 8 domain method registries (agent, feedback, …)
|
|
22
|
+
* 3. Executor → dispatches tool calls to SapClient module methods
|
|
23
|
+
* 4. Serialization → PublicKey↔string, BN↔string bridging
|
|
24
|
+
*
|
|
25
|
+
* @category Plugin
|
|
26
|
+
* @since v0.1.0
|
|
27
|
+
*/
|
|
28
|
+
import { type AnchorProvider } from "@coral-xyz/anchor";
|
|
29
|
+
import { PublicKey } from "@solana/web3.js";
|
|
30
|
+
import { type PluginProtocol, type ProtocolMethod } from "./protocols";
|
|
31
|
+
/**
|
|
32
|
+
* Plugin metadata exposed via {@link SynapsePlugin.meta}.
|
|
33
|
+
*
|
|
34
|
+
* @interface PluginMeta
|
|
35
|
+
* @name PluginMeta
|
|
36
|
+
* @description Describes a SynapsePlugin’s identity, version, and
|
|
37
|
+
* discovery tags for the SynapseAgentKit plugin registry.
|
|
38
|
+
* @category Plugin
|
|
39
|
+
* @since v0.1.0
|
|
40
|
+
*/
|
|
41
|
+
export interface PluginMeta {
|
|
42
|
+
readonly id: string;
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly version: string;
|
|
45
|
+
readonly description: string;
|
|
46
|
+
readonly tags: readonly string[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Context injected by SynapseAgentKit during `install()`.
|
|
50
|
+
*
|
|
51
|
+
* @interface PluginContext
|
|
52
|
+
* @name PluginContext
|
|
53
|
+
* @description Provides the RPC transport and original AgentKit configuration
|
|
54
|
+
* to the plugin at installation time.
|
|
55
|
+
* @category Plugin
|
|
56
|
+
* @since v0.1.0
|
|
57
|
+
*/
|
|
58
|
+
export interface PluginContext {
|
|
59
|
+
/** The SynapseClient providing RPC transport. */
|
|
60
|
+
readonly client: {
|
|
61
|
+
readonly transport: unknown;
|
|
62
|
+
};
|
|
63
|
+
/** Original AgentKitConfig. */
|
|
64
|
+
readonly config: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Result of `install()` containing the tool executor and optional teardown.
|
|
68
|
+
*
|
|
69
|
+
* @interface PluginInstallResult
|
|
70
|
+
* @name PluginInstallResult
|
|
71
|
+
* @description Returned by {@link SynapsePlugin.install}. The `executor`
|
|
72
|
+
* dispatches incoming tool calls to the correct SapClient module method.
|
|
73
|
+
* The optional `teardown` callback is invoked on `kit.destroy()`.
|
|
74
|
+
* @category Plugin
|
|
75
|
+
* @since v0.1.0
|
|
76
|
+
*/
|
|
77
|
+
export interface PluginInstallResult {
|
|
78
|
+
/** Main executor dispatching method calls. */
|
|
79
|
+
executor: (method: ProtocolMethod, input: unknown) => Promise<unknown>;
|
|
80
|
+
/** Optional teardown for cleanup on `kit.destroy()`. */
|
|
81
|
+
teardown?: () => Promise<void>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The SynapsePlugin interface (duck-typed for zero external deps).
|
|
85
|
+
*
|
|
86
|
+
* @interface SynapsePlugin
|
|
87
|
+
* @name SynapsePlugin
|
|
88
|
+
* @description Core contract for SynapseAgentKit plugins. Provides metadata,
|
|
89
|
+
* protocol definitions, and an `install()` entry point that yields
|
|
90
|
+
* a tool executor.
|
|
91
|
+
* @category Plugin
|
|
92
|
+
* @since v0.1.0
|
|
93
|
+
*/
|
|
94
|
+
export interface SynapsePlugin {
|
|
95
|
+
readonly meta: PluginMeta;
|
|
96
|
+
readonly protocols: readonly PluginProtocol[];
|
|
97
|
+
install(context: PluginContext): PluginInstallResult;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Configuration for the SAP plugin.
|
|
101
|
+
*
|
|
102
|
+
* @interface SAPPluginConfig
|
|
103
|
+
* @name SAPPluginConfig
|
|
104
|
+
* @description Options passed to {@link createSAPPlugin} to instantiate
|
|
105
|
+
* the SAP v2 plugin with an Anchor provider and optional program ID override.
|
|
106
|
+
* @category Plugin
|
|
107
|
+
* @since v0.1.0
|
|
108
|
+
*/
|
|
109
|
+
export interface SAPPluginConfig {
|
|
110
|
+
/**
|
|
111
|
+
* Anchor provider with wallet signer.
|
|
112
|
+
* Required for all write operations (transactions).
|
|
113
|
+
*/
|
|
114
|
+
readonly provider: AnchorProvider;
|
|
115
|
+
/**
|
|
116
|
+
* Override the SAP program ID.
|
|
117
|
+
* Defaults to the canonical program ID from constants.
|
|
118
|
+
*/
|
|
119
|
+
readonly programId?: PublicKey;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Create a SynapsePlugin for SAP v2.
|
|
123
|
+
*
|
|
124
|
+
* @name createSAPPlugin
|
|
125
|
+
* @description Factory function that returns a fully configured
|
|
126
|
+
* {@link SynapsePlugin} exposing 52 tools across 8 on-chain
|
|
127
|
+
* protocol domains. The plugin can be installed into a
|
|
128
|
+
* `SynapseAgentKit` instance or used standalone.
|
|
129
|
+
* @param config - Plugin configuration with Anchor provider and optional program ID
|
|
130
|
+
* @returns A configured {@link SynapsePlugin} instance
|
|
131
|
+
* @category Plugin
|
|
132
|
+
* @since v0.1.0
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```ts
|
|
136
|
+
* import { createSAPPlugin } from '@synapse-sap/sdk/plugin';
|
|
137
|
+
*
|
|
138
|
+
* const sapPlugin = createSAPPlugin({ provider });
|
|
139
|
+
*
|
|
140
|
+
* // Use with SynapseAgentKit:
|
|
141
|
+
* kit.use(sapPlugin);
|
|
142
|
+
*
|
|
143
|
+
* // Or standalone:
|
|
144
|
+
* const executor = sapPlugin.install({ client, config: {} }).executor;
|
|
145
|
+
* await executor(someMethod, someInput);
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
export declare function createSAPPlugin(config: SAPPluginConfig): SynapsePlugin;
|
|
149
|
+
/**
|
|
150
|
+
* Pre-built plugin object for static use patterns.
|
|
151
|
+
*
|
|
152
|
+
* @name SAPPlugin
|
|
153
|
+
* @description Convenience namespace exposing a `configure` method
|
|
154
|
+
* that delegates to {@link createSAPPlugin}. Useful for concise
|
|
155
|
+
* one-liner instantiation.
|
|
156
|
+
* @category Plugin
|
|
157
|
+
* @since v0.1.0
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```ts
|
|
161
|
+
* import { SAPPlugin } from '@synapse-sap/sdk/plugin';
|
|
162
|
+
*
|
|
163
|
+
* const plugin = SAPPlugin.configure({ provider });
|
|
164
|
+
* kit.use(plugin);
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
export declare const SAPPlugin: {
|
|
168
|
+
/** Create a configured SynapsePlugin from an AnchorProvider. */
|
|
169
|
+
readonly configure: typeof createSAPPlugin;
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugin/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAqBrB;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;KAC7B,CAAC;IACF,+BAA+B;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACvE,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IAC9C,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,mBAAmB,CAAC;CACtD;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAElC;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;CAChC;AA89BD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,aAAa,CAgCtE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS;IACpB,gEAAgE;;CAExD,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module plugin/protocols
|
|
3
|
+
* @description Protocol definitions + method registries for the SAP v2 plugin.
|
|
4
|
+
*
|
|
5
|
+
* Each protocol maps 1:1 to a SAP SDK domain module.
|
|
6
|
+
* Methods carry Zod-typed input/output + LLM-friendly descriptions.
|
|
7
|
+
*
|
|
8
|
+
* Follows the `SynapsePlugin.protocols` contract exactly.
|
|
9
|
+
*
|
|
10
|
+
* @category Plugin
|
|
11
|
+
* @since v0.1.0
|
|
12
|
+
*/
|
|
13
|
+
import type { z } from "zod";
|
|
14
|
+
/**
|
|
15
|
+
* A single tool method exposed by a protocol.
|
|
16
|
+
*
|
|
17
|
+
* @interface ProtocolMethod
|
|
18
|
+
* @name ProtocolMethod
|
|
19
|
+
* @description Defines a callable tool within a SAP protocol domain,
|
|
20
|
+
* including its name, LLM-friendly description, Zod input/output schemas,
|
|
21
|
+
* and parent protocol identifier.
|
|
22
|
+
* @category Plugin
|
|
23
|
+
* @since v0.1.0
|
|
24
|
+
*/
|
|
25
|
+
export interface ProtocolMethod {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly description: string;
|
|
28
|
+
readonly input: z.ZodTypeAny;
|
|
29
|
+
readonly output: z.ZodTypeAny;
|
|
30
|
+
readonly protocol: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A protocol group containing typed methods.
|
|
34
|
+
*
|
|
35
|
+
* @interface PluginProtocol
|
|
36
|
+
* @name PluginProtocol
|
|
37
|
+
* @description Groups related tool methods under a named protocol domain
|
|
38
|
+
* (e.g. `"sap-agent"`, `"sap-escrow"`). Each protocol maps 1:1 to a
|
|
39
|
+
* SapClient domain module.
|
|
40
|
+
* @category Plugin
|
|
41
|
+
* @since v0.1.0
|
|
42
|
+
*/
|
|
43
|
+
export interface PluginProtocol {
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly methods: ProtocolMethod[];
|
|
47
|
+
readonly requiresClient: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* SAP Agent Identity protocol — 8 tools for on-chain agent registration,
|
|
51
|
+
* updates, activation lifecycle, call reporting, and reputation metrics.
|
|
52
|
+
*
|
|
53
|
+
* @name sapAgentProtocol
|
|
54
|
+
* @description Covers `registerAgent`, `updateAgent`, `deactivateAgent`,
|
|
55
|
+
* `reactivateAgent`, `reportCalls`, `updateReputation`, `fetchAgent`,
|
|
56
|
+
* and `fetchGlobalRegistry`.
|
|
57
|
+
* @category Plugin
|
|
58
|
+
* @since v0.1.0
|
|
59
|
+
*/
|
|
60
|
+
export declare const sapAgentProtocol: PluginProtocol;
|
|
61
|
+
/**
|
|
62
|
+
* SAP Trustless Reputation protocol — 4 tools for on-chain feedback
|
|
63
|
+
* (give, update, revoke, fetch) tied to agent identity PDAs.
|
|
64
|
+
*
|
|
65
|
+
* @name sapFeedbackProtocol
|
|
66
|
+
* @description Covers `giveFeedback`, `updateFeedback`, `revokeFeedback`,
|
|
67
|
+
* and `fetchFeedback`.
|
|
68
|
+
* @category Plugin
|
|
69
|
+
* @since v0.1.0
|
|
70
|
+
*/
|
|
71
|
+
export declare const sapFeedbackProtocol: PluginProtocol;
|
|
72
|
+
/**
|
|
73
|
+
* SAP Web of Trust protocol — 3 tools for creating, revoking, and
|
|
74
|
+
* fetching on-chain attestations between agents.
|
|
75
|
+
*
|
|
76
|
+
* @name sapAttestationProtocol
|
|
77
|
+
* @description Covers `createAttestation`, `revokeAttestation`,
|
|
78
|
+
* and `fetchAttestation`.
|
|
79
|
+
* @category Plugin
|
|
80
|
+
* @since v0.1.0
|
|
81
|
+
*/
|
|
82
|
+
export declare const sapAttestationProtocol: PluginProtocol;
|
|
83
|
+
/**
|
|
84
|
+
* SAP x402 Escrow protocol — 6 tools for creating, depositing into,
|
|
85
|
+
* settling, withdrawing from, batch-settling, and fetching escrow accounts.
|
|
86
|
+
*
|
|
87
|
+
* @name sapEscrowProtocol
|
|
88
|
+
* @description Covers `createEscrow`, `depositEscrow`, `settleEscrow`,
|
|
89
|
+
* `withdrawEscrow`, `batchSettle`, and `fetchEscrow`.
|
|
90
|
+
* @category Plugin
|
|
91
|
+
* @since v0.1.0
|
|
92
|
+
*/
|
|
93
|
+
export declare const sapEscrowProtocol: PluginProtocol;
|
|
94
|
+
/**
|
|
95
|
+
* SAP Tool Registry protocol — 7 tools for publishing, updating,
|
|
96
|
+
* deactivating/reactivating tool descriptors and reporting invocations.
|
|
97
|
+
*
|
|
98
|
+
* @name sapToolsProtocol
|
|
99
|
+
* @description Covers `publishToolByName`, `inscribeToolSchema`, `updateTool`,
|
|
100
|
+
* `deactivateTool`, `reactivateTool`, `reportInvocations`, and `fetchTool`.
|
|
101
|
+
* @category Plugin
|
|
102
|
+
* @since v0.1.0
|
|
103
|
+
*/
|
|
104
|
+
export declare const sapToolsProtocol: PluginProtocol;
|
|
105
|
+
/**
|
|
106
|
+
* SAP Encrypted Memory Vault protocol — 10 tools for vault lifecycle,
|
|
107
|
+
* session management, encrypted memory inscription, nonce rotation,
|
|
108
|
+
* and delegate authorization.
|
|
109
|
+
*
|
|
110
|
+
* @name sapVaultProtocol
|
|
111
|
+
* @description Covers `initVault`, `openSession`, `inscribeMemory`,
|
|
112
|
+
* `closeSession`, `closeVault`, `rotateNonce`, `addDelegate`,
|
|
113
|
+
* `revokeDelegate`, `fetchVault`, and `fetchSession`.
|
|
114
|
+
* @category Plugin
|
|
115
|
+
* @since v0.1.0
|
|
116
|
+
*/
|
|
117
|
+
export declare const sapVaultProtocol: PluginProtocol;
|
|
118
|
+
/**
|
|
119
|
+
* SAP Discovery Indexes protocol — 8 tools for creating and managing
|
|
120
|
+
* capability and protocol indexes used for agent discovery.
|
|
121
|
+
*
|
|
122
|
+
* @name sapIndexingProtocol
|
|
123
|
+
* @description Covers `initCapabilityIndex`, `addToCapabilityIndex`,
|
|
124
|
+
* `removeFromCapabilityIndex`, `initProtocolIndex`, `addToProtocolIndex`,
|
|
125
|
+
* `removeFromProtocolIndex`, `fetchCapabilityIndex`, and `fetchProtocolIndex`.
|
|
126
|
+
* @category Plugin
|
|
127
|
+
* @since v0.1.0
|
|
128
|
+
*/
|
|
129
|
+
export declare const sapIndexingProtocol: PluginProtocol;
|
|
130
|
+
/**
|
|
131
|
+
* SAP Unified Memory Ledger protocol — 6 tools for initializing,
|
|
132
|
+
* writing to, sealing, closing, and fetching ring-buffer ledgers
|
|
133
|
+
* and their sealed archive pages.
|
|
134
|
+
*
|
|
135
|
+
* @name sapLedgerProtocol
|
|
136
|
+
* @description Covers `initLedger`, `writeLedger`, `sealLedger`,
|
|
137
|
+
* `closeLedger`, `fetchLedger`, and `fetchLedgerPage`.
|
|
138
|
+
* @category Plugin
|
|
139
|
+
* @since v0.1.0
|
|
140
|
+
*/
|
|
141
|
+
export declare const sapLedgerProtocol: PluginProtocol;
|
|
142
|
+
/**
|
|
143
|
+
* Ordered array of all 8 SAP v2 plugin protocols.
|
|
144
|
+
*
|
|
145
|
+
* @name SAP_PROTOCOLS
|
|
146
|
+
* @description Contains agent, feedback, attestation, escrow, tools,
|
|
147
|
+
* vault, indexing, and ledger protocols (52 tools total).
|
|
148
|
+
* @category Plugin
|
|
149
|
+
* @since v0.1.0
|
|
150
|
+
*/
|
|
151
|
+
export declare const SAP_PROTOCOLS: readonly PluginProtocol[];
|
|
152
|
+
//# sourceMappingURL=protocols.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocols.d.ts","sourceRoot":"","sources":["../../../src/plugin/protocols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAiBH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,UAAU,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC;IACnC,QAAQ,CAAC,cAAc,E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