@elisym/sdk 0.12.0 → 0.12.1

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/index.d.cts CHANGED
@@ -205,10 +205,10 @@ type Signer = TransactionSigner;
205
205
  /**
206
206
  * Protocol fee + treasury inputs for building a payment request.
207
207
  *
208
- * In Phase 2 the SDK no longer reads PROTOCOL_FEE_BPS / PROTOCOL_TREASURY
209
- * from constants. Callers supply this config so they can either pass
210
- * the bundled fallbacks or, in Phase 3, values fetched from the on-chain
211
- * elisym-config program.
208
+ * Callers must supply this config explicitly - the SDK does not bundle a
209
+ * fallback. The canonical source is `getProtocolConfig(rpc, programId)`,
210
+ * which reads the on-chain elisym-config program; tests and offline tools
211
+ * may pass fixture values directly.
212
212
  */
213
213
  interface ProtocolConfigInput {
214
214
  /** Protocol fee in basis points (300 = 3%). Must be a non-negative integer. */
@@ -671,9 +671,8 @@ declare function assertLamports(value: number, field: string): void;
671
671
  * Calculate the protocol fee using basis-point math (no floats).
672
672
  * Returns ceil(amount * feeBps / 10000).
673
673
  *
674
- * The caller passes the current fee (in basis points). Phase 2 of the
675
- * Solana Kit migration removes the implicit dependency on PROTOCOL_FEE_BPS
676
- * so callers can supply on-chain or test values.
674
+ * The caller passes the current fee (in basis points), typically obtained
675
+ * from `getProtocolConfig` or supplied as a test fixture.
677
676
  */
678
677
  declare function calculateProtocolFee(amount: number, feeBps: number): number;
679
678
  /** Validate payment request timestamps. Returns error message or null if valid. */
@@ -1082,21 +1081,6 @@ declare function jobResultKind(offset: number): number;
1082
1081
  declare const KIND_PING = 20200;
1083
1082
  declare const KIND_PONG = 20201;
1084
1083
  declare const LAMPORTS_PER_SOL = 1000000000;
1085
- /**
1086
- * @deprecated Fallback only - use `getProtocolConfig(rpc, programId)` for live values.
1087
- *
1088
- * Protocol fee in basis points (300 = 3%). Bundled as a default for offline use
1089
- * and for first-call before the on-chain config has been fetched. The on-chain
1090
- * `elisym-config` program is the source of truth.
1091
- */
1092
- declare const PROTOCOL_FEE_BPS = 300;
1093
- /**
1094
- * @deprecated Fallback only - use `getProtocolConfig(rpc, programId)` for live values.
1095
- *
1096
- * Solana address of the protocol treasury. Bundled fallback; the on-chain
1097
- * `elisym-config` program is the source of truth and may rotate this address.
1098
- */
1099
- declare const PROTOCOL_TREASURY: Address;
1100
1084
  /**
1101
1085
  * Solana program ID for the elisym protocol config (devnet deployment).
1102
1086
  *
@@ -1151,4 +1135,4 @@ declare const LIMITS: {
1151
1135
  readonly MAX_CAPABILITY_LENGTH: 64;
1152
1136
  };
1153
1137
 
1154
- export { type Agent, type AggregateNetworkStatsOptions, Asset, BoundedSet, type BuildTransactionOptions, type CapabilityCard, DEFAULTS, DEFAULT_KIND_OFFSET, DEFAULT_REDACT_PATHS, DiscoveryService, ELISYM_PROTOCOL_TAG, ElisymClient, type ElisymClientConfig, type ElisymClientFullConfig, ElisymIdentity, type EstimatePriorityFeeOptions, type EstimateSolFeeOptions, type GetProtocolConfigOptions, INPUT_REDACT_PATHS, type Job, type JobStatus, type JobSubscriptionOptions, type JobUpdateCallbacks, KIND_APP_HANDLER, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_PING, KIND_PONG, LAMPORTS_PER_SOL, LIMITS, MarketplaceService, MediaService, type Network, type NetworkStats, type NetworkStatsResult, NostrPool, PROTOCOL_FEE_BPS, PROTOCOL_PROGRAM_ID_DEVNET, PROTOCOL_TREASURY, type ParseOptions, type ParseResult, type ParsedPaymentRequest, type PaymentAssetRef, type PaymentInfo, type PaymentRequestData, PaymentRequestSchema, type PaymentStrategy, type PaymentValidationCode, type PaymentValidationError, type PingResult, PingService, type ProtocolCluster, type ProtocolConfig, type ProtocolConfigInput, type QuickVerifyReason, type QuickVerifyResult, RELAYS, type RankKey, type RateLimitDecision, SECRET_REDACT_PATHS, type Signer, type SlidingWindowLimiter, type SlidingWindowLimiterOptions, type SolFeeEstimate, SolanaPaymentStrategy, type SubCloser, type SubmitJobOptions, type VerifyOptions, type VerifyResult, aggregateNetworkStats, assertExpiry, assertLamports, buildPaymentInstructions, calculateProtocolFee, clearPriorityFeeCache, clearProtocolConfigCache, clearQuickVerifyCache, compareAgentsByRank, computeRankKey, createPaymentRequestWithOnchainConfig, createSlidingWindowLimiter, estimatePriorityFeeMicroLamports, estimateSolFeeLamports, formatFeeBreakdown, formatSol, getProtocolConfig, getProtocolProgramId, jobRequestKind, jobResultKind, makeCensor, nip44Decrypt, nip44Encrypt, parsePaymentRequest, pickPercentileFee, timeAgo, toDTag, truncateKey, validateAgentName, validateExpiry, verifyJobPaymentQuick };
1138
+ export { type Agent, type AggregateNetworkStatsOptions, Asset, BoundedSet, type BuildTransactionOptions, type CapabilityCard, DEFAULTS, DEFAULT_KIND_OFFSET, DEFAULT_REDACT_PATHS, DiscoveryService, ELISYM_PROTOCOL_TAG, ElisymClient, type ElisymClientConfig, type ElisymClientFullConfig, ElisymIdentity, type EstimatePriorityFeeOptions, type EstimateSolFeeOptions, type GetProtocolConfigOptions, INPUT_REDACT_PATHS, type Job, type JobStatus, type JobSubscriptionOptions, type JobUpdateCallbacks, KIND_APP_HANDLER, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_PING, KIND_PONG, LAMPORTS_PER_SOL, LIMITS, MarketplaceService, MediaService, type Network, type NetworkStats, type NetworkStatsResult, NostrPool, PROTOCOL_PROGRAM_ID_DEVNET, type ParseOptions, type ParseResult, type ParsedPaymentRequest, type PaymentAssetRef, type PaymentInfo, type PaymentRequestData, PaymentRequestSchema, type PaymentStrategy, type PaymentValidationCode, type PaymentValidationError, type PingResult, PingService, type ProtocolCluster, type ProtocolConfig, type ProtocolConfigInput, type QuickVerifyReason, type QuickVerifyResult, RELAYS, type RankKey, type RateLimitDecision, SECRET_REDACT_PATHS, type Signer, type SlidingWindowLimiter, type SlidingWindowLimiterOptions, type SolFeeEstimate, SolanaPaymentStrategy, type SubCloser, type SubmitJobOptions, type VerifyOptions, type VerifyResult, aggregateNetworkStats, assertExpiry, assertLamports, buildPaymentInstructions, calculateProtocolFee, clearPriorityFeeCache, clearProtocolConfigCache, clearQuickVerifyCache, compareAgentsByRank, computeRankKey, createPaymentRequestWithOnchainConfig, createSlidingWindowLimiter, estimatePriorityFeeMicroLamports, estimateSolFeeLamports, formatFeeBreakdown, formatSol, getProtocolConfig, getProtocolProgramId, jobRequestKind, jobResultKind, makeCensor, nip44Decrypt, nip44Encrypt, parsePaymentRequest, pickPercentileFee, timeAgo, toDTag, truncateKey, validateAgentName, validateExpiry, verifyJobPaymentQuick };
package/dist/index.d.ts CHANGED
@@ -205,10 +205,10 @@ type Signer = TransactionSigner;
205
205
  /**
206
206
  * Protocol fee + treasury inputs for building a payment request.
207
207
  *
208
- * In Phase 2 the SDK no longer reads PROTOCOL_FEE_BPS / PROTOCOL_TREASURY
209
- * from constants. Callers supply this config so they can either pass
210
- * the bundled fallbacks or, in Phase 3, values fetched from the on-chain
211
- * elisym-config program.
208
+ * Callers must supply this config explicitly - the SDK does not bundle a
209
+ * fallback. The canonical source is `getProtocolConfig(rpc, programId)`,
210
+ * which reads the on-chain elisym-config program; tests and offline tools
211
+ * may pass fixture values directly.
212
212
  */
213
213
  interface ProtocolConfigInput {
214
214
  /** Protocol fee in basis points (300 = 3%). Must be a non-negative integer. */
@@ -671,9 +671,8 @@ declare function assertLamports(value: number, field: string): void;
671
671
  * Calculate the protocol fee using basis-point math (no floats).
672
672
  * Returns ceil(amount * feeBps / 10000).
673
673
  *
674
- * The caller passes the current fee (in basis points). Phase 2 of the
675
- * Solana Kit migration removes the implicit dependency on PROTOCOL_FEE_BPS
676
- * so callers can supply on-chain or test values.
674
+ * The caller passes the current fee (in basis points), typically obtained
675
+ * from `getProtocolConfig` or supplied as a test fixture.
677
676
  */
678
677
  declare function calculateProtocolFee(amount: number, feeBps: number): number;
679
678
  /** Validate payment request timestamps. Returns error message or null if valid. */
@@ -1082,21 +1081,6 @@ declare function jobResultKind(offset: number): number;
1082
1081
  declare const KIND_PING = 20200;
1083
1082
  declare const KIND_PONG = 20201;
1084
1083
  declare const LAMPORTS_PER_SOL = 1000000000;
1085
- /**
1086
- * @deprecated Fallback only - use `getProtocolConfig(rpc, programId)` for live values.
1087
- *
1088
- * Protocol fee in basis points (300 = 3%). Bundled as a default for offline use
1089
- * and for first-call before the on-chain config has been fetched. The on-chain
1090
- * `elisym-config` program is the source of truth.
1091
- */
1092
- declare const PROTOCOL_FEE_BPS = 300;
1093
- /**
1094
- * @deprecated Fallback only - use `getProtocolConfig(rpc, programId)` for live values.
1095
- *
1096
- * Solana address of the protocol treasury. Bundled fallback; the on-chain
1097
- * `elisym-config` program is the source of truth and may rotate this address.
1098
- */
1099
- declare const PROTOCOL_TREASURY: Address;
1100
1084
  /**
1101
1085
  * Solana program ID for the elisym protocol config (devnet deployment).
1102
1086
  *
@@ -1151,4 +1135,4 @@ declare const LIMITS: {
1151
1135
  readonly MAX_CAPABILITY_LENGTH: 64;
1152
1136
  };
1153
1137
 
1154
- export { type Agent, type AggregateNetworkStatsOptions, Asset, BoundedSet, type BuildTransactionOptions, type CapabilityCard, DEFAULTS, DEFAULT_KIND_OFFSET, DEFAULT_REDACT_PATHS, DiscoveryService, ELISYM_PROTOCOL_TAG, ElisymClient, type ElisymClientConfig, type ElisymClientFullConfig, ElisymIdentity, type EstimatePriorityFeeOptions, type EstimateSolFeeOptions, type GetProtocolConfigOptions, INPUT_REDACT_PATHS, type Job, type JobStatus, type JobSubscriptionOptions, type JobUpdateCallbacks, KIND_APP_HANDLER, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_PING, KIND_PONG, LAMPORTS_PER_SOL, LIMITS, MarketplaceService, MediaService, type Network, type NetworkStats, type NetworkStatsResult, NostrPool, PROTOCOL_FEE_BPS, PROTOCOL_PROGRAM_ID_DEVNET, PROTOCOL_TREASURY, type ParseOptions, type ParseResult, type ParsedPaymentRequest, type PaymentAssetRef, type PaymentInfo, type PaymentRequestData, PaymentRequestSchema, type PaymentStrategy, type PaymentValidationCode, type PaymentValidationError, type PingResult, PingService, type ProtocolCluster, type ProtocolConfig, type ProtocolConfigInput, type QuickVerifyReason, type QuickVerifyResult, RELAYS, type RankKey, type RateLimitDecision, SECRET_REDACT_PATHS, type Signer, type SlidingWindowLimiter, type SlidingWindowLimiterOptions, type SolFeeEstimate, SolanaPaymentStrategy, type SubCloser, type SubmitJobOptions, type VerifyOptions, type VerifyResult, aggregateNetworkStats, assertExpiry, assertLamports, buildPaymentInstructions, calculateProtocolFee, clearPriorityFeeCache, clearProtocolConfigCache, clearQuickVerifyCache, compareAgentsByRank, computeRankKey, createPaymentRequestWithOnchainConfig, createSlidingWindowLimiter, estimatePriorityFeeMicroLamports, estimateSolFeeLamports, formatFeeBreakdown, formatSol, getProtocolConfig, getProtocolProgramId, jobRequestKind, jobResultKind, makeCensor, nip44Decrypt, nip44Encrypt, parsePaymentRequest, pickPercentileFee, timeAgo, toDTag, truncateKey, validateAgentName, validateExpiry, verifyJobPaymentQuick };
1138
+ export { type Agent, type AggregateNetworkStatsOptions, Asset, BoundedSet, type BuildTransactionOptions, type CapabilityCard, DEFAULTS, DEFAULT_KIND_OFFSET, DEFAULT_REDACT_PATHS, DiscoveryService, ELISYM_PROTOCOL_TAG, ElisymClient, type ElisymClientConfig, type ElisymClientFullConfig, ElisymIdentity, type EstimatePriorityFeeOptions, type EstimateSolFeeOptions, type GetProtocolConfigOptions, INPUT_REDACT_PATHS, type Job, type JobStatus, type JobSubscriptionOptions, type JobUpdateCallbacks, KIND_APP_HANDLER, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_PING, KIND_PONG, LAMPORTS_PER_SOL, LIMITS, MarketplaceService, MediaService, type Network, type NetworkStats, type NetworkStatsResult, NostrPool, PROTOCOL_PROGRAM_ID_DEVNET, type ParseOptions, type ParseResult, type ParsedPaymentRequest, type PaymentAssetRef, type PaymentInfo, type PaymentRequestData, PaymentRequestSchema, type PaymentStrategy, type PaymentValidationCode, type PaymentValidationError, type PingResult, PingService, type ProtocolCluster, type ProtocolConfig, type ProtocolConfigInput, type QuickVerifyReason, type QuickVerifyResult, RELAYS, type RankKey, type RateLimitDecision, SECRET_REDACT_PATHS, type Signer, type SlidingWindowLimiter, type SlidingWindowLimiterOptions, type SolFeeEstimate, SolanaPaymentStrategy, type SubCloser, type SubmitJobOptions, type VerifyOptions, type VerifyResult, aggregateNetworkStats, assertExpiry, assertLamports, buildPaymentInstructions, calculateProtocolFee, clearPriorityFeeCache, clearProtocolConfigCache, clearQuickVerifyCache, compareAgentsByRank, computeRankKey, createPaymentRequestWithOnchainConfig, createSlidingWindowLimiter, estimatePriorityFeeMicroLamports, estimateSolFeeLamports, formatFeeBreakdown, formatSol, getProtocolConfig, getProtocolProgramId, jobRequestKind, jobResultKind, makeCensor, nip44Decrypt, nip44Encrypt, parsePaymentRequest, pickPercentileFee, timeAgo, toDTag, truncateKey, validateAgentName, validateExpiry, verifyJobPaymentQuick };
package/dist/index.js CHANGED
@@ -37,8 +37,6 @@ function jobResultKind(offset) {
37
37
  var KIND_PING = 20200;
38
38
  var KIND_PONG = 20201;
39
39
  var LAMPORTS_PER_SOL = 1e9;
40
- var PROTOCOL_FEE_BPS = 300;
41
- var PROTOCOL_TREASURY = "GY7vnWMkKpftU4nQ16C2ATkj1JwrQpHhknkaBUn67VTy";
42
40
  var PROTOCOL_PROGRAM_ID_DEVNET = "BrX1CRkSgvcjxBvc2bgc3QqgWjinusofDmeP7ZVxvwrE";
43
41
  var ELISYM_PROTOCOL_TAG = "ELiZksgwDt41LaeuPDLkUfWgFXhGgVayTMP7L5nTSEL8";
44
42
  function getProtocolProgramId(cluster) {
@@ -3341,6 +3339,6 @@ function makeCensor() {
3341
3339
  };
3342
3340
  }
3343
3341
 
3344
- export { BoundedSet, DEFAULTS, DEFAULT_KIND_OFFSET, DEFAULT_REDACT_PATHS, DiscoveryService, ELISYM_PROTOCOL_TAG, ElisymClient, ElisymIdentity, GlobalConfigSchema, INPUT_REDACT_PATHS, KIND_APP_HANDLER, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_PING, KIND_PONG, KNOWN_ASSETS, LAMPORTS_PER_SOL, LIMITS, MarketplaceService, MediaService, NATIVE_SOL, NostrPool, PROTOCOL_FEE_BPS, PROTOCOL_PROGRAM_ID_DEVNET, PROTOCOL_TREASURY, PaymentRequestSchema, PingService, RELAYS, SECRET_REDACT_PATHS, SessionSpendLimitEntrySchema, SolanaPaymentStrategy, USDC_SOLANA_DEVNET, aggregateNetworkStats, assertExpiry, assertLamports, assetByKey, assetKey, buildPaymentInstructions, calculateProtocolFee, clearPriorityFeeCache, clearProtocolConfigCache, clearQuickVerifyCache, compareAgentsByRank, computeRankKey, createPaymentRequestWithOnchainConfig, createSlidingWindowLimiter, estimatePriorityFeeMicroLamports, estimateSolFeeLamports, formatAssetAmount, formatFeeBreakdown, formatSol, getProtocolConfig, getProtocolProgramId, jobRequestKind, jobResultKind, makeCensor, nip44Decrypt, nip44Encrypt, parseAssetAmount, parsePaymentRequest, pickPercentileFee, resolveAssetFromPaymentRequest, resolveKnownAsset, timeAgo, toDTag, truncateKey, validateAgentName, validateExpiry, verifyJobPaymentQuick };
3342
+ export { BoundedSet, DEFAULTS, DEFAULT_KIND_OFFSET, DEFAULT_REDACT_PATHS, DiscoveryService, ELISYM_PROTOCOL_TAG, ElisymClient, ElisymIdentity, GlobalConfigSchema, INPUT_REDACT_PATHS, KIND_APP_HANDLER, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_PING, KIND_PONG, KNOWN_ASSETS, LAMPORTS_PER_SOL, LIMITS, MarketplaceService, MediaService, NATIVE_SOL, NostrPool, PROTOCOL_PROGRAM_ID_DEVNET, PaymentRequestSchema, PingService, RELAYS, SECRET_REDACT_PATHS, SessionSpendLimitEntrySchema, SolanaPaymentStrategy, USDC_SOLANA_DEVNET, aggregateNetworkStats, assertExpiry, assertLamports, assetByKey, assetKey, buildPaymentInstructions, calculateProtocolFee, clearPriorityFeeCache, clearProtocolConfigCache, clearQuickVerifyCache, compareAgentsByRank, computeRankKey, createPaymentRequestWithOnchainConfig, createSlidingWindowLimiter, estimatePriorityFeeMicroLamports, estimateSolFeeLamports, formatAssetAmount, formatFeeBreakdown, formatSol, getProtocolConfig, getProtocolProgramId, jobRequestKind, jobResultKind, makeCensor, nip44Decrypt, nip44Encrypt, parseAssetAmount, parsePaymentRequest, pickPercentileFee, resolveAssetFromPaymentRequest, resolveKnownAsset, timeAgo, toDTag, truncateKey, validateAgentName, validateExpiry, verifyJobPaymentQuick };
3345
3343
  //# sourceMappingURL=index.js.map
3346
3344
  //# sourceMappingURL=index.js.map