@nextera.one/axis-server-sdk 2.3.15 → 2.3.16
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-ogUOoBI-.d.mts → index-CQGfX-P_.d.mts} +2 -0
- package/dist/{index-Dd-WVBj9.d.ts → index-DBEYhMJc.d.ts} +2 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -3
- package/dist/index.mjs.map +1 -1
- package/dist/sensors/index.d.mts +1 -1
- package/dist/sensors/index.d.ts +1 -1
- package/dist/sensors/index.js +26 -3
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/index.mjs +26 -3
- package/dist/sensors/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -323,6 +323,7 @@ interface IntentRoute extends AxisIntentSensorOptions {
|
|
|
323
323
|
frame?: boolean;
|
|
324
324
|
kind?: IntentKind;
|
|
325
325
|
sensitivity?: SensitivityLevel;
|
|
326
|
+
requiredProof?: RequiredProofKind[];
|
|
326
327
|
chain?: boolean | ChainOptions;
|
|
327
328
|
bodyProfile?: "TLV_MAP" | "RAW" | "TLV_OBJ" | "TLV_ARR";
|
|
328
329
|
tlv?: IntentTlvField[];
|
|
@@ -331,6 +332,7 @@ interface IntentRoute extends AxisIntentSensorOptions {
|
|
|
331
332
|
interface IntentOptions extends AxisIntentSensorOptions {
|
|
332
333
|
kind?: IntentKind;
|
|
333
334
|
sensitivity?: SensitivityLevel;
|
|
335
|
+
requiredProof?: RequiredProofKind | RequiredProofKind[];
|
|
334
336
|
absolute?: boolean;
|
|
335
337
|
frame?: boolean;
|
|
336
338
|
chain?: boolean | ChainOptions;
|
|
@@ -323,6 +323,7 @@ interface IntentRoute extends AxisIntentSensorOptions {
|
|
|
323
323
|
frame?: boolean;
|
|
324
324
|
kind?: IntentKind;
|
|
325
325
|
sensitivity?: SensitivityLevel;
|
|
326
|
+
requiredProof?: RequiredProofKind[];
|
|
326
327
|
chain?: boolean | ChainOptions;
|
|
327
328
|
bodyProfile?: "TLV_MAP" | "RAW" | "TLV_OBJ" | "TLV_ARR";
|
|
328
329
|
tlv?: IntentTlvField[];
|
|
@@ -331,6 +332,7 @@ interface IntentRoute extends AxisIntentSensorOptions {
|
|
|
331
332
|
interface IntentOptions extends AxisIntentSensorOptions {
|
|
332
333
|
kind?: IntentKind;
|
|
333
334
|
sensitivity?: SensitivityLevel;
|
|
335
|
+
requiredProof?: RequiredProofKind | RequiredProofKind[];
|
|
334
336
|
absolute?: boolean;
|
|
335
337
|
frame?: boolean;
|
|
336
338
|
chain?: boolean | ChainOptions;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, I as IntentTlvField, T as TlvValidatorFn, c as IntentRouter, O as ObserverDispatcherService, d as AxisChainEnvelope, e as AxisChainResult, f as AxisCapsuleRef, g as AxisChainStep, h as AxisContext, S as SensorRegistry } from './index-
|
|
2
|
-
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, at as LawEvaluationSensorOptions, au as OBSERVER_BINDINGS_KEY, av as OBSERVER_METADATA_KEY, aw as Observer, ax as ObserverRegistry, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aA as REQUIRED_PROOF_METADATA_KEY, aB as ReceiptPolicySensor, aC as RegisteredChainConfig, aD as RequiredProof, aE as RiskDecision, aF as RiskEvaluation, aG as RiskGateSensor, aH as RiskGateSensorOptions, aI as RiskSignal, aJ as RiskSignalCollector, aK as SENSITIVITY_METADATA_KEY, aL as SchemaValidationSensor, aM as Sensitivity, aN as StreamScopeSensor, aO as TLVParseSensor, aP as TLV_FIELDS_KEY, aQ as TLV_VALIDATORS_KEY, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, aV as TlvEnum, aW as TlvField, aX as TlvFieldKind, aY as TlvFieldMeta, aZ as TlvFieldOptions, a_ as TlvMinLen, a$ as TlvRange, b0 as TlvUtf8Pattern, b1 as TlvValidate, b2 as TlvValidatorMeta, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor, b6 as Witness, b7 as buildAxisLawEvaluationContext, b8 as toIntentSensorBinding, b9 as toObserverBinding } from './index-
|
|
1
|
+
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, I as IntentTlvField, T as TlvValidatorFn, c as IntentRouter, O as ObserverDispatcherService, d as AxisChainEnvelope, e as AxisChainResult, f as AxisCapsuleRef, g as AxisChainStep, h as AxisContext, S as SensorRegistry } from './index-CQGfX-P_.mjs';
|
|
2
|
+
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, at as LawEvaluationSensorOptions, au as OBSERVER_BINDINGS_KEY, av as OBSERVER_METADATA_KEY, aw as Observer, ax as ObserverRegistry, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aA as REQUIRED_PROOF_METADATA_KEY, aB as ReceiptPolicySensor, aC as RegisteredChainConfig, aD as RequiredProof, aE as RiskDecision, aF as RiskEvaluation, aG as RiskGateSensor, aH as RiskGateSensorOptions, aI as RiskSignal, aJ as RiskSignalCollector, aK as SENSITIVITY_METADATA_KEY, aL as SchemaValidationSensor, aM as Sensitivity, aN as StreamScopeSensor, aO as TLVParseSensor, aP as TLV_FIELDS_KEY, aQ as TLV_VALIDATORS_KEY, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, aV as TlvEnum, aW as TlvField, aX as TlvFieldKind, aY as TlvFieldMeta, aZ as TlvFieldOptions, a_ as TlvMinLen, a$ as TlvRange, b0 as TlvUtf8Pattern, b1 as TlvValidate, b2 as TlvValidatorMeta, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor, b6 as Witness, b7 as buildAxisLawEvaluationContext, b8 as toIntentSensorBinding, b9 as toObserverBinding } from './index-CQGfX-P_.mjs';
|
|
3
3
|
import { AxisFrame } from '@nextera.one/axis-protocol';
|
|
4
4
|
export { AXIS_MAGIC, AXIS_VERSION, AxisBinaryFrame, AxisFrame, TLV as AxisTlvType, ERR_BAD_SIGNATURE, ERR_CONTRACT_VIOLATION, ERR_INVALID_PACKET, ERR_REPLAY_DETECTED, FLAG_BODY_TLV, FLAG_CHAIN_REQ, FLAG_HAS_WITNESS, MAX_BODY_LEN, MAX_FRAME_LEN, MAX_HDR_LEN, MAX_SIG_LEN, NCERT_ALG, NCERT_EXP, NCERT_ISSUER_KID, NCERT_KID, NCERT_NBF, NCERT_NODE_ID, NCERT_PAYLOAD, NCERT_PUB, NCERT_SCOPE, NCERT_SIG, PROOF_CAPSULE, PROOF_JWT, PROOF_LOOM, PROOF_MTLS, PROOF_NONE, PROOF_WITNESS, TLV, TLV_ACTOR_ID, TLV_AUD, TLV_BODY_ARR, TLV_BODY_OBJ, TLV_CAPSULE, TLV_EFFECT, TLV_ERROR_CODE, TLV_ERROR_MSG, TLV_INDEX, TLV_INTENT, TLV_KID, TLV_LOOM_PRESENCE_ID, TLV_LOOM_THREAD_HASH, TLV_LOOM_WRIT, TLV_NODE, TLV_NODE_CERT_HASH, TLV_NODE_KID, TLV_NONCE, TLV_OFFSET, TLV_OK, TLV_PID, TLV_LOOM_PRESENCE_ID as TLV_PRESENCE_ID, TLV_PREV_HASH, TLV_PROOF_REF, TLV_PROOF_TYPE, TLV_REALM, TLV_RECEIPT_HASH, TLV_RID, TLV_SHA256_CHUNK, TLV_LOOM_THREAD_HASH as TLV_THREAD_HASH, TLV_TRACE_ID, TLV_TS, TLV_UPLOAD_ID, TLV_LOOM_WRIT as TLV_WRIT, decodeArray, decodeFrame, decodeObject, decodeTLVs, decodeTLVsList, decodeVarint, encodeFrame, encodeTLVs, encodeVarint, getSignTarget, varintLength } from '@nextera.one/axis-protocol';
|
|
5
5
|
import { A as AxisObservation, L as LoomReceipt, T as ThreadState, W as WritValidationResult, G as Grant, a as GrantCapability, P as PresenceDeclaration, b as PresenceChallenge, c as Writ, R as Revocation, d as WritBody, e as WritMeta, f as PresenceReceipt, g as GrantStatus, h as PresenceStatus, i as PresenceProof, j as GrantValidationResult, k as PresenceVerifyResult } from './index-CXewlhg-.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, I as IntentTlvField, T as TlvValidatorFn, c as IntentRouter, O as ObserverDispatcherService, d as AxisChainEnvelope, e as AxisChainResult, f as AxisCapsuleRef, g as AxisChainStep, h as AxisContext, S as SensorRegistry } from './index-
|
|
2
|
-
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, at as LawEvaluationSensorOptions, au as OBSERVER_BINDINGS_KEY, av as OBSERVER_METADATA_KEY, aw as Observer, ax as ObserverRegistry, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aA as REQUIRED_PROOF_METADATA_KEY, aB as ReceiptPolicySensor, aC as RegisteredChainConfig, aD as RequiredProof, aE as RiskDecision, aF as RiskEvaluation, aG as RiskGateSensor, aH as RiskGateSensorOptions, aI as RiskSignal, aJ as RiskSignalCollector, aK as SENSITIVITY_METADATA_KEY, aL as SchemaValidationSensor, aM as Sensitivity, aN as StreamScopeSensor, aO as TLVParseSensor, aP as TLV_FIELDS_KEY, aQ as TLV_VALIDATORS_KEY, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, aV as TlvEnum, aW as TlvField, aX as TlvFieldKind, aY as TlvFieldMeta, aZ as TlvFieldOptions, a_ as TlvMinLen, a$ as TlvRange, b0 as TlvUtf8Pattern, b1 as TlvValidate, b2 as TlvValidatorMeta, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor, b6 as Witness, b7 as buildAxisLawEvaluationContext, b8 as toIntentSensorBinding, b9 as toObserverBinding } from './index-
|
|
1
|
+
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, I as IntentTlvField, T as TlvValidatorFn, c as IntentRouter, O as ObserverDispatcherService, d as AxisChainEnvelope, e as AxisChainResult, f as AxisCapsuleRef, g as AxisChainStep, h as AxisContext, S as SensorRegistry } from './index-DBEYhMJc.js';
|
|
2
|
+
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, at as LawEvaluationSensorOptions, au as OBSERVER_BINDINGS_KEY, av as OBSERVER_METADATA_KEY, aw as Observer, ax as ObserverRegistry, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aA as REQUIRED_PROOF_METADATA_KEY, aB as ReceiptPolicySensor, aC as RegisteredChainConfig, aD as RequiredProof, aE as RiskDecision, aF as RiskEvaluation, aG as RiskGateSensor, aH as RiskGateSensorOptions, aI as RiskSignal, aJ as RiskSignalCollector, aK as SENSITIVITY_METADATA_KEY, aL as SchemaValidationSensor, aM as Sensitivity, aN as StreamScopeSensor, aO as TLVParseSensor, aP as TLV_FIELDS_KEY, aQ as TLV_VALIDATORS_KEY, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, aV as TlvEnum, aW as TlvField, aX as TlvFieldKind, aY as TlvFieldMeta, aZ as TlvFieldOptions, a_ as TlvMinLen, a$ as TlvRange, b0 as TlvUtf8Pattern, b1 as TlvValidate, b2 as TlvValidatorMeta, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor, b6 as Witness, b7 as buildAxisLawEvaluationContext, b8 as toIntentSensorBinding, b9 as toObserverBinding } from './index-DBEYhMJc.js';
|
|
3
3
|
import { AxisFrame } from '@nextera.one/axis-protocol';
|
|
4
4
|
export { AXIS_MAGIC, AXIS_VERSION, AxisBinaryFrame, AxisFrame, TLV as AxisTlvType, ERR_BAD_SIGNATURE, ERR_CONTRACT_VIOLATION, ERR_INVALID_PACKET, ERR_REPLAY_DETECTED, FLAG_BODY_TLV, FLAG_CHAIN_REQ, FLAG_HAS_WITNESS, MAX_BODY_LEN, MAX_FRAME_LEN, MAX_HDR_LEN, MAX_SIG_LEN, NCERT_ALG, NCERT_EXP, NCERT_ISSUER_KID, NCERT_KID, NCERT_NBF, NCERT_NODE_ID, NCERT_PAYLOAD, NCERT_PUB, NCERT_SCOPE, NCERT_SIG, PROOF_CAPSULE, PROOF_JWT, PROOF_LOOM, PROOF_MTLS, PROOF_NONE, PROOF_WITNESS, TLV, TLV_ACTOR_ID, TLV_AUD, TLV_BODY_ARR, TLV_BODY_OBJ, TLV_CAPSULE, TLV_EFFECT, TLV_ERROR_CODE, TLV_ERROR_MSG, TLV_INDEX, TLV_INTENT, TLV_KID, TLV_LOOM_PRESENCE_ID, TLV_LOOM_THREAD_HASH, TLV_LOOM_WRIT, TLV_NODE, TLV_NODE_CERT_HASH, TLV_NODE_KID, TLV_NONCE, TLV_OFFSET, TLV_OK, TLV_PID, TLV_LOOM_PRESENCE_ID as TLV_PRESENCE_ID, TLV_PREV_HASH, TLV_PROOF_REF, TLV_PROOF_TYPE, TLV_REALM, TLV_RECEIPT_HASH, TLV_RID, TLV_SHA256_CHUNK, TLV_LOOM_THREAD_HASH as TLV_THREAD_HASH, TLV_TRACE_ID, TLV_TS, TLV_UPLOAD_ID, TLV_LOOM_WRIT as TLV_WRIT, decodeArray, decodeFrame, decodeObject, decodeTLVs, decodeTLVsList, decodeVarint, encodeFrame, encodeTLVs, encodeVarint, getSignTarget, varintLength } from '@nextera.one/axis-protocol';
|
|
5
5
|
import { A as AxisObservation, L as LoomReceipt, T as ThreadState, W as WritValidationResult, G as Grant, a as GrantCapability, P as PresenceDeclaration, b as PresenceChallenge, c as Writ, R as Revocation, d as WritBody, e as WritMeta, f as PresenceReceipt, g as GrantStatus, h as PresenceStatus, i as PresenceProof, j as GrantValidationResult, k as PresenceVerifyResult } from './index-ChuwP1RU.js';
|
package/dist/index.js
CHANGED
|
@@ -122,6 +122,13 @@ var init_capsule_policy_decorator = __esm({
|
|
|
122
122
|
});
|
|
123
123
|
|
|
124
124
|
// src/decorators/intent-policy.decorator.ts
|
|
125
|
+
function normalizeRequiredProof(proofs) {
|
|
126
|
+
if (proofs === void 0) return void 0;
|
|
127
|
+
const normalized = Array.from(
|
|
128
|
+
new Set(Array.isArray(proofs) ? proofs : [proofs])
|
|
129
|
+
);
|
|
130
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
131
|
+
}
|
|
125
132
|
function appendRequiredProof(target, propertyKey, proof) {
|
|
126
133
|
const existing = propertyKey !== void 0 ? Reflect.getMetadata(
|
|
127
134
|
REQUIRED_PROOF_METADATA_KEY,
|
|
@@ -370,7 +377,12 @@ function toIntentSensorBinding(input) {
|
|
|
370
377
|
}
|
|
371
378
|
function Intent(action, options) {
|
|
372
379
|
return (target, propertyKey) => {
|
|
373
|
-
const
|
|
380
|
+
const requiredProof = normalizeRequiredProof(options?.requiredProof);
|
|
381
|
+
const metadata = {
|
|
382
|
+
intent: action,
|
|
383
|
+
...options,
|
|
384
|
+
...requiredProof ? { requiredProof } : {}
|
|
385
|
+
};
|
|
374
386
|
Reflect.defineMetadata(INTENT_METADATA_KEY, metadata, target, propertyKey);
|
|
375
387
|
if (options?.decoder) {
|
|
376
388
|
Reflect.defineMetadata(
|
|
@@ -388,6 +400,14 @@ function Intent(action, options) {
|
|
|
388
400
|
propertyKey
|
|
389
401
|
);
|
|
390
402
|
}
|
|
403
|
+
if (requiredProof) {
|
|
404
|
+
Reflect.defineMetadata(
|
|
405
|
+
REQUIRED_PROOF_METADATA_KEY,
|
|
406
|
+
requiredProof,
|
|
407
|
+
target,
|
|
408
|
+
propertyKey
|
|
409
|
+
);
|
|
410
|
+
}
|
|
391
411
|
const routes = Reflect.getMetadata(INTENT_ROUTES_KEY, target.constructor) || [];
|
|
392
412
|
routes.push({
|
|
393
413
|
action,
|
|
@@ -396,6 +416,7 @@ function Intent(action, options) {
|
|
|
396
416
|
frame: options?.frame,
|
|
397
417
|
kind: options?.kind,
|
|
398
418
|
sensitivity: options?.sensitivity,
|
|
419
|
+
requiredProof,
|
|
399
420
|
chain: options?.chain,
|
|
400
421
|
bodyProfile: options?.bodyProfile,
|
|
401
422
|
tlv: options?.tlv,
|
|
@@ -2997,9 +3018,11 @@ var init_intent_router = __esm({
|
|
|
2997
3018
|
if (contract) {
|
|
2998
3019
|
this.intentContracts.set(intent, contract);
|
|
2999
3020
|
}
|
|
3021
|
+
const inlineRequiredProof = normalizeRequiredProof(meta?.requiredProof);
|
|
3000
3022
|
const proofPolicy = resolveIntentProofPolicy(proto, methodName);
|
|
3001
|
-
|
|
3002
|
-
|
|
3023
|
+
const requiredProof = inlineRequiredProof ?? proofPolicy.requiredProof;
|
|
3024
|
+
if (requiredProof.length > 0) {
|
|
3025
|
+
this.intentRequiredProof.set(intent, requiredProof);
|
|
3003
3026
|
}
|
|
3004
3027
|
const rateLimit = Reflect.getMetadata(
|
|
3005
3028
|
AXIS_RATE_LIMIT_KEY,
|