@nextera.one/axis-server-sdk 2.1.3 → 2.1.4
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.mts +985 -955
- package/dist/index.d.ts +985 -955
- package/dist/index.js +225 -112
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +225 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { A as AxisFrame$2 } from './index-DXHfWxLG.js';
|
|
2
2
|
export { a as AxisBinaryFrame, b as AxisError, c as AxisFrameZ, d as AxisMediaTypes, e as computeReceiptHash, f as computeSignaturePayload, i as core, g as decodeFrame, h as encodeFrame, j as generateEd25519KeyPair, k as getSignTarget, s as sha256, l as signFrame, v as verifyFrameSignature } from './index-DXHfWxLG.js';
|
|
3
3
|
import { ModuleRef, DiscoveryService, Reflector, MetadataScanner } from '@nestjs/core';
|
|
4
|
+
import * as z from 'zod';
|
|
4
5
|
import { PROOF_LOOM, TLV_LOOM_PRESENCE_ID, TLV_LOOM_THREAD_HASH, TLV_LOOM_WRIT } from '@nextera.one/axis-protocol';
|
|
5
6
|
export { AXIS_MAGIC, AXIS_VERSION, TLV as AxisTlvType, BodyProfile, 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, ProofType, 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, decodeObject, decodeTLVs, decodeTLVsList, decodeVarint, encodeTLVs, encodeVarint, varintLength } from '@nextera.one/axis-protocol';
|
|
6
7
|
import { OnApplicationBootstrap, OnModuleInit } from '@nestjs/common';
|
|
7
8
|
import { ConfigService } from '@nestjs/config';
|
|
8
|
-
import * as z from 'zod';
|
|
9
9
|
|
|
10
10
|
type AxisExecutionMode = 'strict' | 'parallel' | 'best_effort' | 'atomic';
|
|
11
11
|
type AxisObserverEvent = 'intent.received' | 'intent.completed' | 'intent.failed' | 'chain.received' | 'chain.admitted' | 'chain.completed' | 'chain.failed' | 'chain.partial' | 'step.started' | 'step.completed' | 'step.failed' | 'step.blocked' | 'step.skipped' | 'signature.verified' | 'decryption.succeeded' | 'sensor.passed' | 'sensor.failed' | 'handler.completed' | 'proof.recorded';
|
|
@@ -866,890 +866,16 @@ type CcePipelineResult = {
|
|
|
866
866
|
};
|
|
867
867
|
declare function executeCcePipeline(envelope: CceRequestEnvelope, config: CcePipelineConfig): Promise<CcePipelineResult>;
|
|
868
868
|
|
|
869
|
-
interface
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
kind: IntentTlvField["kind"];
|
|
877
|
-
required?: boolean;
|
|
878
|
-
maxLen?: number;
|
|
879
|
-
max?: string;
|
|
880
|
-
scope?: "header" | "body";
|
|
881
|
-
}>;
|
|
882
|
-
}
|
|
883
|
-
interface AxisEffect {
|
|
884
|
-
ok: boolean;
|
|
885
|
-
effect: string;
|
|
886
|
-
body?: Uint8Array;
|
|
887
|
-
headers?: Map<number, Uint8Array>;
|
|
888
|
-
metadata?: any;
|
|
889
|
-
}
|
|
890
|
-
declare class IntentRouter {
|
|
891
|
-
private readonly moduleRef?;
|
|
892
|
-
private readonly observerDispatcher?;
|
|
893
|
-
private readonly logger;
|
|
894
|
-
private readonly decoder;
|
|
895
|
-
private readonly encoder;
|
|
896
|
-
private static readonly BUILTIN_INTENTS;
|
|
897
|
-
private handlers;
|
|
898
|
-
private intentSensors;
|
|
899
|
-
private intentDecoders;
|
|
900
|
-
private intentSchemas;
|
|
901
|
-
private intentValidators;
|
|
902
|
-
private intentKinds;
|
|
903
|
-
private intentChains;
|
|
904
|
-
private intentObservers;
|
|
905
|
-
private intentCapsulePolicies;
|
|
906
|
-
private cceHandlers;
|
|
907
|
-
private ccePipelineConfig;
|
|
908
|
-
constructor(moduleRef?: ModuleRef | undefined, observerDispatcher?: ObserverDispatcherService | undefined);
|
|
909
|
-
getSchema(intent: string): IntentSchema$1 | undefined;
|
|
910
|
-
getValidators(intent: string): Map<number, TlvValidatorFn[]> | undefined;
|
|
911
|
-
has(intent: string): boolean;
|
|
912
|
-
getRegisteredIntents(): string[];
|
|
913
|
-
getIntentEntry(intent: string): {
|
|
914
|
-
schema?: IntentSchema$1;
|
|
915
|
-
validators?: Map<number, TlvValidatorFn[]>;
|
|
916
|
-
hasSensors: boolean;
|
|
917
|
-
builtin: boolean;
|
|
918
|
-
kind?: IntentKind;
|
|
919
|
-
chain?: RegisteredChainConfig;
|
|
920
|
-
capsulePolicy?: CapsulePolicyOptions;
|
|
921
|
-
observerCount: number;
|
|
922
|
-
} | null;
|
|
923
|
-
getChainConfig(intent: string): RegisteredChainConfig | undefined;
|
|
924
|
-
getObservers(intent: string): AxisObserverBinding[];
|
|
925
|
-
register(intent: string, handler: any): void;
|
|
926
|
-
registerHandler(instance: any): void;
|
|
927
|
-
route(frame: AxisFrame$2): Promise<AxisEffect>;
|
|
928
|
-
private logIntent;
|
|
929
|
-
registerIntentMeta(intent: string, proto: object, methodName: string, handlerSensors?: Function[], handlerObservers?: AxisObserverBinding[]): void;
|
|
930
|
-
private emitIntentObservers;
|
|
931
|
-
private runIntentSensors;
|
|
932
|
-
private getEffectiveCapsulePolicy;
|
|
933
|
-
private enforceCapsulePolicy;
|
|
934
|
-
private executeChainRequest;
|
|
935
|
-
private parseIntentExecBody;
|
|
936
|
-
private parseChainRequestBody;
|
|
937
|
-
private isChainRequestLike;
|
|
938
|
-
private isChainEnvelopeLike;
|
|
939
|
-
private encodeJson;
|
|
940
|
-
private getActorIdFromFrame;
|
|
941
|
-
private getProofRefFromFrame;
|
|
942
|
-
private hasCapsuleReference;
|
|
943
|
-
private getHeaderValue;
|
|
944
|
-
private identifiersMatch;
|
|
945
|
-
private extractInlineCapsuleId;
|
|
946
|
-
private toInlineCapsuleRecord;
|
|
947
|
-
private toScopeList;
|
|
948
|
-
configureCce(config: Omit<CcePipelineConfig, "handlers">): void;
|
|
949
|
-
registerCceHandler(intent: string, handler: CceHandler): void;
|
|
950
|
-
hasCceHandler(intent: string): boolean;
|
|
951
|
-
routeCce(envelope: CceRequestEnvelope): Promise<CcePipelineResult>;
|
|
952
|
-
private storeSchema;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
interface AxisObserverContext {
|
|
956
|
-
event: AxisObserverEvent;
|
|
957
|
-
timestamp: number;
|
|
958
|
-
intent?: string;
|
|
959
|
-
chainId?: string;
|
|
960
|
-
stepId?: string;
|
|
961
|
-
handler?: string;
|
|
962
|
-
frame?: AxisFrame$2;
|
|
963
|
-
envelope?: AxisChainEnvelope;
|
|
964
|
-
step?: AxisChainStep;
|
|
965
|
-
effect?: AxisEffect;
|
|
966
|
-
result?: AxisChainStepResult | AxisChainResult;
|
|
967
|
-
error?: string;
|
|
968
|
-
observerTags?: string[];
|
|
969
|
-
capsule?: AxisCapsuleRef;
|
|
970
|
-
keyExchange?: AxisKeyExchangeRef;
|
|
971
|
-
metadata?: Record<string, unknown>;
|
|
972
|
-
}
|
|
973
|
-
interface AxisIntentObserver {
|
|
974
|
-
readonly name: string;
|
|
975
|
-
supports?(context: AxisObserverContext): boolean;
|
|
976
|
-
observe(context: AxisObserverContext): Promise<void> | void;
|
|
977
|
-
}
|
|
978
|
-
interface AxisObserverRegistration {
|
|
979
|
-
name: string;
|
|
980
|
-
instance: AxisIntentObserver;
|
|
981
|
-
tags: string[];
|
|
982
|
-
events?: AxisObserverEvent[];
|
|
983
|
-
intents?: string[];
|
|
984
|
-
handlers?: string[];
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
declare class ObserverRegistry {
|
|
988
|
-
private readonly logger;
|
|
989
|
-
private readonly byName;
|
|
990
|
-
private readonly byType;
|
|
991
|
-
register(instance: AxisIntentObserver, meta?: AxisObserverDefinition): void;
|
|
992
|
-
resolve(ref: AxisObserverRef): AxisObserverRegistration | undefined;
|
|
993
|
-
list(): AxisObserverRegistration[];
|
|
994
|
-
clear(): void;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
declare class ObserverDispatcherService {
|
|
998
|
-
private readonly registry;
|
|
999
|
-
private readonly logger;
|
|
1000
|
-
constructor(registry: ObserverRegistry);
|
|
1001
|
-
dispatch(bindings: AxisObserverBinding[] | undefined, context: AxisObserverContext): Promise<void>;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
interface AxisChainExecutionOptions {
|
|
1005
|
-
actorId?: string;
|
|
1006
|
-
baseFrame?: Partial<AxisFrame$2>;
|
|
1007
|
-
}
|
|
1008
|
-
declare class AxisChainExecutor {
|
|
1009
|
-
private readonly router;
|
|
1010
|
-
private readonly observerDispatcher?;
|
|
1011
|
-
private readonly logger;
|
|
1012
|
-
private readonly encoder;
|
|
1013
|
-
private readonly decoder;
|
|
1014
|
-
constructor(router: IntentRouter, observerDispatcher?: ObserverDispatcherService | undefined);
|
|
1015
|
-
execute(envelope: AxisChainEnvelope, options?: AxisChainExecutionOptions): Promise<AxisChainResult>;
|
|
1016
|
-
private executeStep;
|
|
1017
|
-
private buildFrame;
|
|
1018
|
-
private validateEnvelope;
|
|
1019
|
-
private canRun;
|
|
1020
|
-
private blockStepsWithFailedDependencies;
|
|
1021
|
-
private markUnresolvedSteps;
|
|
1022
|
-
private buildSummary;
|
|
1023
|
-
private resolveStepInput;
|
|
1024
|
-
private lookupReference;
|
|
1025
|
-
private serializeInput;
|
|
1026
|
-
private decodeOutput;
|
|
1027
|
-
private computeProofHash;
|
|
1028
|
-
private collectChainBindings;
|
|
1029
|
-
private dispatch;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
declare const AXIS_EXECUTION_CONTEXT_KEY: unique symbol;
|
|
1033
|
-
interface AxisExecutionContext {
|
|
1034
|
-
metaIntent?: "INTENT.EXEC" | "CHAIN.EXEC";
|
|
1035
|
-
actorId?: string;
|
|
1036
|
-
inlineCapsule?: Record<string, unknown>;
|
|
1037
|
-
capsuleRef?: AxisCapsuleRef;
|
|
1038
|
-
chainEnvelope?: AxisChainEnvelope;
|
|
1039
|
-
chainStep?: AxisChainStep;
|
|
1040
|
-
}
|
|
1041
|
-
declare function getAxisExecutionContext(frame?: Partial<AxisFrame$2>): AxisExecutionContext | undefined;
|
|
1042
|
-
declare function withAxisExecutionContext<T extends object>(target: T, context: AxisExecutionContext): T;
|
|
1043
|
-
declare function mergeAxisExecutionContext(base?: AxisExecutionContext, override?: AxisExecutionContext): AxisExecutionContext | undefined;
|
|
1044
|
-
|
|
1045
|
-
declare const BAND: {
|
|
1046
|
-
readonly WIRE: 0;
|
|
1047
|
-
readonly IDENTITY: 40;
|
|
1048
|
-
readonly POLICY: 90;
|
|
1049
|
-
readonly CONTENT: 140;
|
|
1050
|
-
readonly BUSINESS: 200;
|
|
1051
|
-
readonly AUDIT: 900;
|
|
1052
|
-
};
|
|
1053
|
-
type SensorBand = keyof typeof BAND;
|
|
1054
|
-
declare const PRE_DECODE_BOUNDARY = 40;
|
|
1055
|
-
|
|
1056
|
-
declare function stableJsonStringify(value: unknown): string;
|
|
1057
|
-
|
|
1058
|
-
interface ObservationStage {
|
|
1059
|
-
name: string;
|
|
1060
|
-
status: 'ok' | 'fail' | 'skip';
|
|
1061
|
-
startMs: number;
|
|
1062
|
-
endMs?: number;
|
|
1063
|
-
durationMs?: number;
|
|
1064
|
-
reason?: string;
|
|
1065
|
-
code?: string;
|
|
1066
|
-
}
|
|
1067
|
-
interface ObservationSensor {
|
|
1068
|
-
name: string;
|
|
1069
|
-
allowed: boolean;
|
|
1070
|
-
riskScore: number;
|
|
1071
|
-
durationMs: number;
|
|
1072
|
-
reasons: string[];
|
|
1073
|
-
code?: string;
|
|
1074
|
-
}
|
|
1075
|
-
interface AxisObservation {
|
|
1076
|
-
id: string;
|
|
1077
|
-
startMs: number;
|
|
1078
|
-
transport: 'http' | 'ws';
|
|
1079
|
-
ip?: string;
|
|
1080
|
-
intent?: string;
|
|
1081
|
-
actorId?: string;
|
|
1082
|
-
capsuleId?: string;
|
|
1083
|
-
stages: ObservationStage[];
|
|
1084
|
-
sensors: ObservationSensor[];
|
|
1085
|
-
decision?: 'ALLOW' | 'DENY';
|
|
1086
|
-
resultCode?: string;
|
|
1087
|
-
statusCode?: number;
|
|
1088
|
-
endMs?: number;
|
|
1089
|
-
durationMs?: number;
|
|
1090
|
-
facts: Record<string, unknown>;
|
|
1091
|
-
}
|
|
1092
|
-
declare function createObservation(transport: 'http' | 'ws', ip?: string): AxisObservation;
|
|
1093
|
-
declare function startStage(obs: AxisObservation, name: string): ObservationStage;
|
|
1094
|
-
declare function endStage(stage: ObservationStage, status?: 'ok' | 'fail' | 'skip', reason?: string, code?: string): void;
|
|
1095
|
-
declare function recordSensor(obs: AxisObservation, name: string, allowed: boolean, riskScore: number, durationMs: number, reasons: string[], code?: string): void;
|
|
1096
|
-
declare function finalizeObservation(obs: AxisObservation, decision: 'ALLOW' | 'DENY', statusCode: number, resultCode?: string): void;
|
|
1097
|
-
|
|
1098
|
-
interface ObservationQueueMessage {
|
|
1099
|
-
v: 1;
|
|
1100
|
-
observation: AxisObservation;
|
|
1101
|
-
attempts: number;
|
|
1102
|
-
firstEnqueuedAt: number;
|
|
1103
|
-
lastEnqueuedAt: number;
|
|
1104
|
-
sourceNodeId: string;
|
|
1105
|
-
lastError?: string;
|
|
1106
|
-
}
|
|
1107
|
-
interface ObservationQueueConfig {
|
|
1108
|
-
enabled: boolean;
|
|
1109
|
-
workerEnabled: boolean;
|
|
1110
|
-
streamKey: string;
|
|
1111
|
-
deadLetterStreamKey: string;
|
|
1112
|
-
groupName: string;
|
|
1113
|
-
consumerName: string;
|
|
1114
|
-
readBlockMs: number;
|
|
1115
|
-
readBatchSize: number;
|
|
1116
|
-
reclaimIdleMs: number;
|
|
1117
|
-
reclaimBatchSize: number;
|
|
1118
|
-
maxRetries: number;
|
|
1119
|
-
maxStreamLength: number;
|
|
1120
|
-
workerConcurrency: number;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
interface ObservationStreamEntry {
|
|
1124
|
-
id: string;
|
|
1125
|
-
message: ObservationQueueMessage;
|
|
1126
|
-
}
|
|
1127
|
-
declare function buildQueueMessage(observation: AxisObservation, sourceNodeId: string, previous?: ObservationQueueMessage, lastError?: string): ObservationQueueMessage;
|
|
1128
|
-
declare function encodeQueueMessage(message: ObservationQueueMessage): string;
|
|
1129
|
-
declare function decodeQueueMessage(raw: string): ObservationQueueMessage | null;
|
|
1130
|
-
declare function parseStreamEntries(raw: any): ObservationStreamEntry[];
|
|
1131
|
-
declare function parseAutoClaimEntries(raw: any): ObservationStreamEntry[];
|
|
1132
|
-
|
|
1133
|
-
interface ObservationWitnessSummary {
|
|
1134
|
-
intent?: string;
|
|
1135
|
-
actorId?: string;
|
|
1136
|
-
decision?: string;
|
|
1137
|
-
statusCode?: number;
|
|
1138
|
-
durationMs?: number;
|
|
1139
|
-
sensorCount: number;
|
|
1140
|
-
stageCount: number;
|
|
1141
|
-
}
|
|
1142
|
-
interface UnsignedObservationWitness {
|
|
1143
|
-
v: 1;
|
|
1144
|
-
observationId: string;
|
|
1145
|
-
payloadHash: string;
|
|
1146
|
-
sealedAt: number;
|
|
1147
|
-
summary: ObservationWitnessSummary;
|
|
1148
|
-
}
|
|
1149
|
-
declare function canonicalizeObservation(obs: AxisObservation): string;
|
|
1150
|
-
declare function hashObservation(obs: AxisObservation): string;
|
|
1151
|
-
declare function buildUnsignedWitness(obs: AxisObservation): UnsignedObservationWitness | null;
|
|
1152
|
-
|
|
1153
|
-
interface ResponseObserverContext {
|
|
1154
|
-
actorId: string;
|
|
1155
|
-
intent: string;
|
|
1156
|
-
}
|
|
1157
|
-
interface ResponseContract {
|
|
1158
|
-
ok: boolean;
|
|
1159
|
-
effect: string;
|
|
1160
|
-
body?: Uint8Array;
|
|
1161
|
-
headers?: Map<number, Uint8Array>;
|
|
1162
|
-
}
|
|
1163
|
-
interface ObserverVerdict {
|
|
1164
|
-
passed: boolean;
|
|
1165
|
-
code?: string;
|
|
1166
|
-
reason?: string;
|
|
1167
|
-
}
|
|
1168
|
-
declare function verifyResponse(ctx: ResponseObserverContext, response: ResponseContract): ObserverVerdict;
|
|
1169
|
-
type ResponseObserver = (ctx: ResponseObserverContext, response: ResponseContract) => ObserverVerdict;
|
|
1170
|
-
declare const ResponseObserver: ResponseObserver;
|
|
1171
|
-
|
|
1172
|
-
declare const ATS1_HDR: {
|
|
1173
|
-
readonly INTENT_ID: 1;
|
|
1174
|
-
readonly ACTOR_KEY_ID: 2;
|
|
1175
|
-
readonly CAPSULE_ID: 3;
|
|
1176
|
-
readonly NONCE: 4;
|
|
1177
|
-
readonly TS_MS: 5;
|
|
1178
|
-
readonly SCHEMA_ID: 6;
|
|
1179
|
-
readonly BODY_HASH: 7;
|
|
1180
|
-
readonly TRACE_ID: 8;
|
|
1181
|
-
};
|
|
1182
|
-
declare const ATS1_SCHEMA: {
|
|
1183
|
-
readonly PASSKEY_LOGIN_OPTIONS_REQ: 2001;
|
|
1184
|
-
readonly PASSKEY_LOGIN_OPTIONS_RES: 2002;
|
|
1185
|
-
readonly PASSKEY_LOGIN_VERIFY_REQ: 2011;
|
|
1186
|
-
readonly PASSKEY_LOGIN_VERIFY_RES: 2012;
|
|
1187
|
-
readonly PASSKEY_REGISTER_OPTIONS_REQ: 2021;
|
|
1188
|
-
readonly PASSKEY_REGISTER_OPTIONS_RES: 2022;
|
|
1189
|
-
readonly PASSKEY_REGISTER_VERIFY_REQ: 2031;
|
|
1190
|
-
readonly PASSKEY_REGISTER_VERIFY_RES: 2032;
|
|
1191
|
-
};
|
|
1192
|
-
|
|
1193
|
-
type Ats1FieldType = 'bytes' | 'utf8' | 'uvarint' | 'u64be' | 'nested';
|
|
1194
|
-
type Ats1FieldDescriptor = {
|
|
1195
|
-
tag: number;
|
|
1196
|
-
name: string;
|
|
1197
|
-
type: Ats1FieldType;
|
|
1198
|
-
required?: boolean;
|
|
1199
|
-
repeated?: boolean;
|
|
1200
|
-
nestedSchema?: Ats1SchemaDescriptor;
|
|
1201
|
-
maxLen?: number;
|
|
1202
|
-
};
|
|
1203
|
-
type Ats1SchemaDescriptor = {
|
|
1204
|
-
schemaId: number;
|
|
1205
|
-
name: string;
|
|
1206
|
-
strict: boolean;
|
|
1207
|
-
maxNestingDepth: number;
|
|
1208
|
-
maxBodyBytes?: number;
|
|
1209
|
-
fields: Ats1FieldDescriptor[];
|
|
1210
|
-
};
|
|
1211
|
-
type DecodedTlv = {
|
|
1212
|
-
tag: number;
|
|
1213
|
-
value: Buffer;
|
|
1214
|
-
};
|
|
1215
|
-
type DecodedTlvMap = Map<number, Buffer[]>;
|
|
1216
|
-
type SensorInputLike = {
|
|
1217
|
-
hdrTLVs: DecodedTlvMap;
|
|
1218
|
-
bodyTLVs: DecodedTlvMap;
|
|
1219
|
-
schemaId: number;
|
|
1220
|
-
intentId: number;
|
|
1221
|
-
};
|
|
1222
|
-
type Ats1Limits = {
|
|
1223
|
-
maxVarintBytes: number;
|
|
1224
|
-
maxTlvCount: number;
|
|
1225
|
-
maxValueBytes: number;
|
|
1226
|
-
maxNestingDepth: number;
|
|
1227
|
-
};
|
|
1228
|
-
declare const DEFAULT_LIMITS: Ats1Limits;
|
|
1229
|
-
declare function encodeUVarint(n: number | bigint): Buffer;
|
|
1230
|
-
declare function decodeUVarint(buf: Buffer, offset: number, limits?: Ats1Limits): {
|
|
1231
|
-
value: bigint;
|
|
1232
|
-
offset: number;
|
|
1233
|
-
bytesRead: number;
|
|
1234
|
-
};
|
|
1235
|
-
declare function encodeU64BE(n: bigint): Buffer;
|
|
1236
|
-
declare function decodeU64BE(buf: Buffer): bigint;
|
|
1237
|
-
declare function sha256(data: Buffer): Buffer;
|
|
1238
|
-
declare function encodeTLV(tag: number, value: Buffer): Buffer;
|
|
1239
|
-
declare function encodeTLVStreamCanonical(entries: DecodedTlv[]): Buffer;
|
|
1240
|
-
declare function decodeTLVStream(stream: Buffer, limits?: Ats1Limits): DecodedTlv[];
|
|
1241
|
-
declare function tlvsToMap(entries: DecodedTlv[]): DecodedTlvMap;
|
|
1242
|
-
type LogicalBody = {
|
|
1243
|
-
schemaId: number;
|
|
1244
|
-
fields: Record<string, any>;
|
|
1245
|
-
};
|
|
1246
|
-
declare function validateTLVsAgainstSchema(schema: Ats1SchemaDescriptor, tlvs: DecodedTlv[], depth?: number, limits?: Ats1Limits): void;
|
|
1247
|
-
declare function logicalBodyToTLVs(schema: Ats1SchemaDescriptor, body: LogicalBody, limits?: Ats1Limits): DecodedTlv[];
|
|
1248
|
-
declare function tlvsToLogicalBody(schema: Ats1SchemaDescriptor, tlvs: DecodedTlv[], limits?: Ats1Limits): LogicalBody;
|
|
1249
|
-
declare const HDR_TAGS: {
|
|
1250
|
-
readonly intent_id: 1;
|
|
1251
|
-
readonly actor_key_id: 2;
|
|
1252
|
-
readonly capsule_id: 3;
|
|
1253
|
-
readonly nonce: 4;
|
|
1254
|
-
readonly ts_ms: 5;
|
|
1255
|
-
readonly schema_id: 6;
|
|
1256
|
-
readonly body_hash: 7;
|
|
1257
|
-
readonly trace_id: 8;
|
|
1258
|
-
};
|
|
1259
|
-
type AxisHeaderLogical = {
|
|
1260
|
-
intentId: number;
|
|
1261
|
-
actorKeyId: Uint8Array;
|
|
1262
|
-
capsuleId?: Uint8Array;
|
|
1263
|
-
nonce: Uint8Array;
|
|
1264
|
-
tsMs: bigint;
|
|
1265
|
-
schemaId: number;
|
|
1266
|
-
bodyHash: Uint8Array;
|
|
1267
|
-
traceId?: Uint8Array;
|
|
1268
|
-
version?: number;
|
|
1269
|
-
headerHash?: Uint8Array;
|
|
1270
|
-
headerTlvs?: DecodedTlv[];
|
|
1271
|
-
bodyTlvs?: DecodedTlv[];
|
|
1272
|
-
};
|
|
1273
|
-
type AxisLogicalRequest = {
|
|
1274
|
-
hdr: AxisHeaderLogical;
|
|
1275
|
-
body: LogicalBody;
|
|
1276
|
-
};
|
|
1277
|
-
declare function encodeAxisHeaderToTLVs(hdr: AxisHeaderLogical): DecodedTlv[];
|
|
1278
|
-
declare function decodeAxisHeaderFromTLVs(hdrTlvs: DecodedTlv[], limits?: Ats1Limits): AxisHeaderLogical;
|
|
1279
|
-
declare function encodeAxisRequestBinary(schema: Ats1SchemaDescriptor, req: Omit<AxisLogicalRequest, 'hdr'> & {
|
|
1280
|
-
hdr: Omit<AxisHeaderLogical, 'bodyHash'>;
|
|
1281
|
-
}, limits?: Ats1Limits): {
|
|
1282
|
-
hdrBytes: Buffer;
|
|
1283
|
-
bodyBytes: Buffer;
|
|
1284
|
-
bodyHash: Buffer;
|
|
1285
|
-
};
|
|
1286
|
-
declare function decodeAxisRequestBinary(schema: Ats1SchemaDescriptor, hdrBytes: Buffer, bodyBytes: Buffer, limits?: Ats1Limits): {
|
|
1287
|
-
hdr: AxisHeaderLogical;
|
|
1288
|
-
body: LogicalBody;
|
|
1289
|
-
sensorInput: SensorInputLike;
|
|
1290
|
-
};
|
|
1291
|
-
declare const Schema3100_DeviceContext: Ats1SchemaDescriptor;
|
|
1292
|
-
declare const Schema2001_PasskeyLoginOptionsReq: Ats1SchemaDescriptor;
|
|
1293
|
-
declare const Schema4001_LoginWithDeviceReq: Ats1SchemaDescriptor;
|
|
1294
|
-
|
|
1295
|
-
type ats1_Ats1FieldDescriptor = Ats1FieldDescriptor;
|
|
1296
|
-
type ats1_Ats1FieldType = Ats1FieldType;
|
|
1297
|
-
type ats1_Ats1Limits = Ats1Limits;
|
|
1298
|
-
type ats1_Ats1SchemaDescriptor = Ats1SchemaDescriptor;
|
|
1299
|
-
type ats1_AxisHeaderLogical = AxisHeaderLogical;
|
|
1300
|
-
type ats1_AxisLogicalRequest = AxisLogicalRequest;
|
|
1301
|
-
declare const ats1_DEFAULT_LIMITS: typeof DEFAULT_LIMITS;
|
|
1302
|
-
type ats1_DecodedTlv = DecodedTlv;
|
|
1303
|
-
type ats1_DecodedTlvMap = DecodedTlvMap;
|
|
1304
|
-
declare const ats1_HDR_TAGS: typeof HDR_TAGS;
|
|
1305
|
-
declare const ats1_Schema2001_PasskeyLoginOptionsReq: typeof Schema2001_PasskeyLoginOptionsReq;
|
|
1306
|
-
declare const ats1_Schema3100_DeviceContext: typeof Schema3100_DeviceContext;
|
|
1307
|
-
declare const ats1_Schema4001_LoginWithDeviceReq: typeof Schema4001_LoginWithDeviceReq;
|
|
1308
|
-
type ats1_SensorInputLike = SensorInputLike;
|
|
1309
|
-
declare const ats1_decodeAxisHeaderFromTLVs: typeof decodeAxisHeaderFromTLVs;
|
|
1310
|
-
declare const ats1_decodeAxisRequestBinary: typeof decodeAxisRequestBinary;
|
|
1311
|
-
declare const ats1_decodeTLVStream: typeof decodeTLVStream;
|
|
1312
|
-
declare const ats1_decodeU64BE: typeof decodeU64BE;
|
|
1313
|
-
declare const ats1_decodeUVarint: typeof decodeUVarint;
|
|
1314
|
-
declare const ats1_encodeAxisHeaderToTLVs: typeof encodeAxisHeaderToTLVs;
|
|
1315
|
-
declare const ats1_encodeAxisRequestBinary: typeof encodeAxisRequestBinary;
|
|
1316
|
-
declare const ats1_encodeTLV: typeof encodeTLV;
|
|
1317
|
-
declare const ats1_encodeTLVStreamCanonical: typeof encodeTLVStreamCanonical;
|
|
1318
|
-
declare const ats1_encodeU64BE: typeof encodeU64BE;
|
|
1319
|
-
declare const ats1_encodeUVarint: typeof encodeUVarint;
|
|
1320
|
-
declare const ats1_logicalBodyToTLVs: typeof logicalBodyToTLVs;
|
|
1321
|
-
declare const ats1_sha256: typeof sha256;
|
|
1322
|
-
declare const ats1_tlvsToLogicalBody: typeof tlvsToLogicalBody;
|
|
1323
|
-
declare const ats1_tlvsToMap: typeof tlvsToMap;
|
|
1324
|
-
declare const ats1_validateTLVsAgainstSchema: typeof validateTLVsAgainstSchema;
|
|
1325
|
-
declare namespace ats1 {
|
|
1326
|
-
export { type ats1_Ats1FieldDescriptor as Ats1FieldDescriptor, type ats1_Ats1FieldType as Ats1FieldType, type ats1_Ats1Limits as Ats1Limits, type ats1_Ats1SchemaDescriptor as Ats1SchemaDescriptor, type ats1_AxisHeaderLogical as AxisHeaderLogical, type ats1_AxisLogicalRequest as AxisLogicalRequest, ats1_DEFAULT_LIMITS as DEFAULT_LIMITS, type ats1_DecodedTlv as DecodedTlv, type ats1_DecodedTlvMap as DecodedTlvMap, ats1_HDR_TAGS as HDR_TAGS, ats1_Schema2001_PasskeyLoginOptionsReq as Schema2001_PasskeyLoginOptionsReq, ats1_Schema3100_DeviceContext as Schema3100_DeviceContext, ats1_Schema4001_LoginWithDeviceReq as Schema4001_LoginWithDeviceReq, type ats1_SensorInputLike as SensorInputLike, ats1_decodeAxisHeaderFromTLVs as decodeAxisHeaderFromTLVs, ats1_decodeAxisRequestBinary as decodeAxisRequestBinary, ats1_decodeTLVStream as decodeTLVStream, ats1_decodeU64BE as decodeU64BE, ats1_decodeUVarint as decodeUVarint, ats1_encodeAxisHeaderToTLVs as encodeAxisHeaderToTLVs, ats1_encodeAxisRequestBinary as encodeAxisRequestBinary, ats1_encodeTLV as encodeTLV, ats1_encodeTLVStreamCanonical as encodeTLVStreamCanonical, ats1_encodeU64BE as encodeU64BE, ats1_encodeUVarint as encodeUVarint, ats1_logicalBodyToTLVs as logicalBodyToTLVs, ats1_sha256 as sha256, ats1_tlvsToLogicalBody as tlvsToLogicalBody, ats1_tlvsToMap as tlvsToMap, ats1_validateTLVsAgainstSchema as validateTLVsAgainstSchema };
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
declare function buildAts1Hdr(params: {
|
|
1330
|
-
intentId: number;
|
|
1331
|
-
schemaId: number;
|
|
1332
|
-
actorKeyId?: Buffer;
|
|
1333
|
-
capsuleId?: Buffer;
|
|
1334
|
-
traceId?: Buffer;
|
|
1335
|
-
tsMs?: bigint;
|
|
1336
|
-
nonce?: Buffer;
|
|
1337
|
-
bodyHash?: Buffer;
|
|
1338
|
-
}): Buffer;
|
|
1339
|
-
declare function packPasskeyLoginOptionsReq(params: {
|
|
1340
|
-
intentId: number;
|
|
1341
|
-
username: string;
|
|
1342
|
-
actorKeyId?: Buffer;
|
|
1343
|
-
capsuleId?: Buffer;
|
|
1344
|
-
traceId?: Buffer;
|
|
1345
|
-
}): {
|
|
1346
|
-
hdr: Buffer<ArrayBufferLike>;
|
|
1347
|
-
body: Buffer<ArrayBufferLike>;
|
|
1348
|
-
};
|
|
1349
|
-
declare function unpackPasskeyLoginOptionsReq(body: Buffer): {
|
|
1350
|
-
username: string;
|
|
1351
|
-
};
|
|
1352
|
-
declare const Schema2021_PasskeyRegisterOptionsReq: Ats1SchemaDescriptor;
|
|
1353
|
-
declare const Schema2011_PasskeyLoginVerifyReq: Ats1SchemaDescriptor;
|
|
1354
|
-
declare function packPasskeyRegisterOptionsReq(params: {
|
|
1355
|
-
intentId: number;
|
|
1356
|
-
username: string;
|
|
1357
|
-
actorKeyId?: Buffer;
|
|
1358
|
-
traceId?: Buffer;
|
|
1359
|
-
}): {
|
|
1360
|
-
hdr: Buffer<ArrayBufferLike>;
|
|
1361
|
-
body: Buffer<ArrayBufferLike>;
|
|
1362
|
-
};
|
|
1363
|
-
declare function unpackPasskeyRegisterOptionsReq(body: Buffer): {
|
|
1364
|
-
username: string;
|
|
1365
|
-
};
|
|
1366
|
-
declare function packPasskeyLoginVerifyReq(params: {
|
|
1367
|
-
intentId: number;
|
|
1368
|
-
username: string;
|
|
1369
|
-
credentialId: Buffer;
|
|
1370
|
-
clientDataJSON: Buffer;
|
|
1371
|
-
authenticatorData: Buffer;
|
|
1372
|
-
signature: Buffer;
|
|
1373
|
-
userHandle?: Buffer;
|
|
1374
|
-
actorKeyId?: Buffer;
|
|
1375
|
-
traceId?: Buffer;
|
|
1376
|
-
}): {
|
|
1377
|
-
hdr: Buffer<ArrayBufferLike>;
|
|
1378
|
-
body: Buffer<ArrayBufferLike>;
|
|
1379
|
-
};
|
|
1380
|
-
declare function unpackPasskeyLoginVerifyReq(body: Buffer): {
|
|
1381
|
-
username: string;
|
|
1382
|
-
credentialId: Buffer;
|
|
1383
|
-
clientDataJSON: Buffer;
|
|
1384
|
-
authenticatorData: Buffer;
|
|
1385
|
-
signature: Buffer;
|
|
1386
|
-
userHandle: Buffer | undefined;
|
|
1387
|
-
};
|
|
1388
|
-
declare const Schema2002_PasskeyLoginOptionsRes: Ats1SchemaDescriptor;
|
|
1389
|
-
declare function packPasskeyLoginOptionsRes(params: {
|
|
1390
|
-
challenge: string;
|
|
1391
|
-
timeout?: number;
|
|
1392
|
-
rpId?: string;
|
|
1393
|
-
userVerification?: string;
|
|
1394
|
-
allowCredentials?: {
|
|
1395
|
-
id: string;
|
|
1396
|
-
type: string;
|
|
1397
|
-
transports?: string[];
|
|
1398
|
-
}[];
|
|
1399
|
-
}): Buffer;
|
|
1400
|
-
declare const Schema2012_PasskeyLoginVerifyRes: Ats1SchemaDescriptor;
|
|
1401
|
-
declare function packPasskeyLoginVerifyRes(params: {
|
|
1402
|
-
actorId: string;
|
|
1403
|
-
keyId: string;
|
|
1404
|
-
capsule: Buffer;
|
|
1405
|
-
expiresAt: bigint;
|
|
1406
|
-
}): Buffer;
|
|
1407
|
-
|
|
1408
|
-
type Axis1FrameToEncode = {
|
|
1409
|
-
ver: number;
|
|
1410
|
-
flags: number;
|
|
1411
|
-
hdr: Buffer;
|
|
1412
|
-
body: Buffer;
|
|
1413
|
-
sig: Buffer;
|
|
1414
|
-
};
|
|
1415
|
-
declare function encodeAxis1Frame(f: Axis1FrameToEncode): Buffer;
|
|
1416
|
-
|
|
1417
|
-
declare function axis1SigningBytes(params: {
|
|
1418
|
-
ver: number;
|
|
1419
|
-
flags: number;
|
|
1420
|
-
hdr: Buffer;
|
|
1421
|
-
body: Buffer;
|
|
1422
|
-
}): Buffer;
|
|
1423
|
-
|
|
1424
|
-
declare function encVarint(x: bigint): Buffer;
|
|
1425
|
-
declare function varintU(x: number | bigint): Buffer;
|
|
1426
|
-
declare function u64be(x: bigint): Buffer;
|
|
1427
|
-
declare function utf8(s: string): Buffer;
|
|
1428
|
-
declare function bytes(b: Uint8Array | Buffer): Buffer;
|
|
1429
|
-
declare function nonce16(): Buffer;
|
|
1430
|
-
declare function tlv(type: number, value: Buffer): Buffer;
|
|
1431
|
-
declare function buildTLVs(items: {
|
|
1432
|
-
type: number;
|
|
1433
|
-
value: Buffer;
|
|
1434
|
-
}[], opts?: {
|
|
1435
|
-
allowDupTypes?: Set<number>;
|
|
1436
|
-
}): Buffer;
|
|
1437
|
-
|
|
1438
|
-
declare function b64urlEncode(buf: Buffer): string;
|
|
1439
|
-
declare function b64urlDecode(str: string): Buffer;
|
|
1440
|
-
declare function b64urlEncodeString(str: string, encoding?: BufferEncoding): string;
|
|
1441
|
-
declare function b64urlDecodeString(str: string, encoding?: BufferEncoding): string;
|
|
1442
|
-
|
|
1443
|
-
declare function canonicalJson(value: any): string;
|
|
1444
|
-
declare function canonicalJsonExcluding(obj: Record<string, any>, exclude: string[]): string;
|
|
1445
|
-
|
|
1446
|
-
declare class ContractViolationError extends Error {
|
|
1447
|
-
code: string;
|
|
1448
|
-
constructor(code: string, message: string);
|
|
1449
|
-
}
|
|
1450
|
-
interface ExecutionMetrics {
|
|
1451
|
-
dbWrites: number;
|
|
1452
|
-
dbReads: number;
|
|
1453
|
-
externalCalls: number;
|
|
1454
|
-
elapsedMs: number;
|
|
1455
|
-
}
|
|
1456
|
-
declare class ExecutionMeter {
|
|
1457
|
-
private dbWrites;
|
|
1458
|
-
private dbReads;
|
|
1459
|
-
private externalCalls;
|
|
1460
|
-
private startTime;
|
|
1461
|
-
private contract;
|
|
1462
|
-
constructor(contract: any);
|
|
1463
|
-
recordDbWrite(): void;
|
|
1464
|
-
recordDbRead(): void;
|
|
1465
|
-
recordExternalCall(): void;
|
|
1466
|
-
checkTime(): void;
|
|
1467
|
-
validateEffect(effect: string): void;
|
|
1468
|
-
getMetrics(): ExecutionMetrics;
|
|
1469
|
-
getContract(): any;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
interface ExecutionContract {
|
|
1473
|
-
maxDbWrites: number;
|
|
1474
|
-
maxDbReads?: number;
|
|
1475
|
-
maxExternalCalls: number;
|
|
1476
|
-
maxTimeMs: number;
|
|
1477
|
-
allowedEffects: string[];
|
|
1478
|
-
maxMemoryMb?: number;
|
|
1479
|
-
}
|
|
1480
|
-
declare const DEFAULT_CONTRACTS: Record<string, ExecutionContract>;
|
|
1481
|
-
declare const FALLBACK_CONTRACT: ExecutionContract;
|
|
1482
|
-
|
|
1483
|
-
type Axis1DecodedFrame = {
|
|
1484
|
-
ver: number;
|
|
1485
|
-
flags: number;
|
|
1486
|
-
hdr: Buffer;
|
|
1487
|
-
body: Buffer;
|
|
1488
|
-
sig: Buffer;
|
|
1489
|
-
frameSize: number;
|
|
1490
|
-
};
|
|
1491
|
-
declare function decodeAxis1Frame(buf: Buffer): Axis1DecodedFrame;
|
|
1492
|
-
|
|
1493
|
-
declare const T: {
|
|
1494
|
-
INTENT: number;
|
|
1495
|
-
PID: number;
|
|
1496
|
-
INTENT_VERSION: number;
|
|
1497
|
-
ACTOR_ID: number;
|
|
1498
|
-
CAPSULE_ID: number;
|
|
1499
|
-
NONCE: number;
|
|
1500
|
-
TS_MS: number;
|
|
1501
|
-
PROOF_TYPE: number;
|
|
1502
|
-
BODY: number;
|
|
1503
|
-
JSON: number;
|
|
1504
|
-
};
|
|
1505
|
-
type AxisPacket = {
|
|
1506
|
-
intent: string;
|
|
1507
|
-
intentVersion: number;
|
|
1508
|
-
actorId: string;
|
|
1509
|
-
capsuleId?: Buffer;
|
|
1510
|
-
pid: Buffer;
|
|
1511
|
-
nonce: Buffer;
|
|
1512
|
-
tsMs: bigint;
|
|
1513
|
-
headersMap: Map<number, Buffer[]>;
|
|
1514
|
-
bodyMap: Map<number, Buffer[]>;
|
|
1515
|
-
hdrBytes: Buffer;
|
|
1516
|
-
bodyBytes: Buffer;
|
|
1517
|
-
sig: Buffer;
|
|
1518
|
-
};
|
|
1519
|
-
declare function buildPacket(hdr: Buffer, body: Buffer, sig: Buffer, flags?: number): AxisPacket;
|
|
1520
|
-
|
|
1521
|
-
interface AxisHandler {
|
|
1522
|
-
readonly name: string;
|
|
1523
|
-
readonly open?: boolean;
|
|
1524
|
-
readonly description?: string;
|
|
1525
|
-
readonly execute?: (body: Uint8Array, headers?: Map<number, Uint8Array>) => Promise<Uint8Array | any>;
|
|
1526
|
-
}
|
|
1527
|
-
interface AxisHandlerInit extends AxisHandler {
|
|
1528
|
-
onModuleInit?(): void | Promise<void>;
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
interface AxisCrudHandler extends AxisHandlerInit {
|
|
1532
|
-
create(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
1533
|
-
findAll(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
1534
|
-
findOne(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
1535
|
-
update(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
1536
|
-
remove(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
declare function hasScope(scopes: string[], required: string): boolean;
|
|
1540
|
-
declare function parseScope(scope: string): {
|
|
1541
|
-
resource: string;
|
|
1542
|
-
id: string;
|
|
1543
|
-
} | null;
|
|
1544
|
-
declare function canAccessResource(scopes: string[], resourceType: string, resourceId: string): boolean;
|
|
1545
|
-
|
|
1546
|
-
declare const CAPABILITIES: {
|
|
1547
|
-
readonly read: "read";
|
|
1548
|
-
readonly write: "write";
|
|
1549
|
-
readonly execute: "execute";
|
|
1550
|
-
readonly admin: "admin";
|
|
1551
|
-
readonly sign: "sign";
|
|
1552
|
-
readonly witness: "witness";
|
|
1553
|
-
};
|
|
1554
|
-
type Capability = keyof typeof CAPABILITIES;
|
|
1555
|
-
declare const PROOF_CAPABILITIES: Record<number, Capability[]>;
|
|
1556
|
-
declare const INTENT_REQUIREMENTS: Record<string, Capability[]>;
|
|
1557
|
-
|
|
1558
|
-
interface RiskSignal {
|
|
1559
|
-
type: string;
|
|
1560
|
-
severity: 'low' | 'medium' | 'high' | 'critical';
|
|
1561
|
-
value: any;
|
|
1562
|
-
message: string;
|
|
1563
|
-
}
|
|
1564
|
-
declare enum RiskDecision {
|
|
1565
|
-
ALLOW = "ALLOW",
|
|
1566
|
-
THROTTLE = "THROTTLE",
|
|
1567
|
-
STEP_UP = "STEP_UP",
|
|
1568
|
-
WITNESS = "WITNESS",
|
|
1569
|
-
DENY = "DENY"
|
|
1570
|
-
}
|
|
1571
|
-
interface RiskEvaluation {
|
|
1572
|
-
decision: RiskDecision;
|
|
1573
|
-
reason?: string;
|
|
1574
|
-
retryAfterMs?: number;
|
|
1575
|
-
confidence: number;
|
|
1576
|
-
signals: RiskSignal[];
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
declare const AXIS_OPCODES: Set<string>;
|
|
1580
|
-
declare function isKnownOpcode(op: string): boolean;
|
|
1581
|
-
declare function isAdminOpcode(op: string): boolean;
|
|
1582
|
-
|
|
1583
|
-
type ReceiptEffect = 'ALLOW' | 'DENY' | 'ERROR';
|
|
1584
|
-
declare function buildReceiptHash(prevHash: Buffer | null, pid: Buffer, actorId: string, intent: string, effect: ReceiptEffect, ts: bigint): Buffer;
|
|
1585
|
-
|
|
1586
|
-
declare enum IntentSensitivity {
|
|
1587
|
-
LOW = 1,
|
|
1588
|
-
MEDIUM = 2,
|
|
1589
|
-
HIGH = 3,
|
|
1590
|
-
CRITICAL = 4
|
|
1591
|
-
}
|
|
1592
|
-
declare const INTENT_SENSITIVITY_MAP: Record<string, IntentSensitivity>;
|
|
1593
|
-
declare function classifyIntent(intent: string): IntentSensitivity;
|
|
1594
|
-
declare function sensitivityName(level: IntentSensitivity): string;
|
|
1595
|
-
|
|
1596
|
-
declare const INTENT_TIMEOUTS: Record<string, number>;
|
|
1597
|
-
declare const DEFAULT_TIMEOUT = 10000;
|
|
1598
|
-
declare function resolveTimeout(intent: string): number;
|
|
1599
|
-
|
|
1600
|
-
interface IntentDefinition {
|
|
1601
|
-
intent: string;
|
|
1602
|
-
description: string;
|
|
1603
|
-
sensitivity: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
1604
|
-
requiredProof: string[];
|
|
1605
|
-
contract: {
|
|
1606
|
-
maxDbWrites: number;
|
|
1607
|
-
maxTimeMs: number;
|
|
1608
|
-
};
|
|
1609
|
-
examples?: string[];
|
|
1610
|
-
deprecated?: boolean;
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
declare function validateFrameShape(frame: any): boolean;
|
|
1614
|
-
declare function isTimestampValid(ts: number, skewSeconds?: number): boolean;
|
|
1615
|
-
|
|
1616
|
-
type UploadSessionStatus = 'ACTIVE' | 'FINALIZING' | 'COMPLETE' | 'ABORTED';
|
|
1617
|
-
interface UploadSessionRecord {
|
|
1618
|
-
id?: string;
|
|
1619
|
-
fileId: string;
|
|
1620
|
-
filename?: string;
|
|
1621
|
-
status: UploadSessionStatus | string;
|
|
1622
|
-
totalSize?: number;
|
|
1623
|
-
chunkSize?: number;
|
|
1624
|
-
totalChunks?: number;
|
|
1625
|
-
receivedBitmap?: Uint8Array | Buffer | null;
|
|
1626
|
-
hashState?: Uint8Array | Buffer | null;
|
|
1627
|
-
mimeType?: string | null;
|
|
1628
|
-
version?: number;
|
|
1629
|
-
}
|
|
1630
|
-
interface UploadSessionStore {
|
|
1631
|
-
findByFileId(fileId: string): Promise<UploadSessionRecord | null>;
|
|
1632
|
-
updateStatus(fileId: string, status: UploadSessionStatus, hashState?: Uint8Array | Buffer | null): Promise<void>;
|
|
1633
|
-
}
|
|
1634
|
-
interface UploadReceiptSigner {
|
|
1635
|
-
signActive(message: Uint8Array): {
|
|
1636
|
-
kid: string;
|
|
1637
|
-
sig: Uint8Array;
|
|
1638
|
-
};
|
|
1639
|
-
}
|
|
1640
|
-
interface UploadFileStat {
|
|
1641
|
-
path: string;
|
|
1642
|
-
size: number;
|
|
1643
|
-
}
|
|
1644
|
-
interface UploadFileStore {
|
|
1645
|
-
getFinalPath(fileId: string, filename?: string): string;
|
|
1646
|
-
getTempPath(fileId: string): string;
|
|
1647
|
-
statFinal(fileId: string, filename?: string): Promise<UploadFileStat>;
|
|
1648
|
-
readFinalRange(fileId: string, filename: string | undefined, start: number, length: number): Promise<Buffer>;
|
|
1649
|
-
hasTemp(fileId: string): Promise<boolean>;
|
|
1650
|
-
moveTempToFinal(fileId: string, filename?: string): Promise<string>;
|
|
1651
|
-
createTempReadStream(fileId: string): NodeJS.ReadableStream;
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
declare class AxisFilesDownloadHandler implements AxisHandler {
|
|
1655
|
-
private readonly sessions;
|
|
1656
|
-
private readonly files;
|
|
1657
|
-
private readonly logger;
|
|
1658
|
-
readonly name = "axis.files.download";
|
|
1659
|
-
readonly open = true;
|
|
1660
|
-
readonly description = "File download handler";
|
|
1661
|
-
constructor(sessions: UploadSessionStore, files: UploadFileStore);
|
|
1662
|
-
execute(body: Uint8Array, headers?: Map<number, Uint8Array>): Promise<any>;
|
|
1663
|
-
}
|
|
1664
|
-
declare class AxisFilesFinalizeHandler implements AxisHandler {
|
|
1665
|
-
private readonly sessions;
|
|
1666
|
-
private readonly files;
|
|
1667
|
-
private readonly keyring?;
|
|
1668
|
-
private readonly logger;
|
|
1669
|
-
readonly name = "axis.files.finalize";
|
|
1670
|
-
readonly open = false;
|
|
1671
|
-
readonly description = "File upload finalization handler";
|
|
1672
|
-
constructor(sessions: UploadSessionStore, files: UploadFileStore, keyring?: UploadReceiptSigner | undefined);
|
|
1673
|
-
execute(body: Uint8Array, headers?: Map<number, Uint8Array>): Promise<any>;
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
declare const AXIS_UPLOAD_SESSION_STORE = "AXIS_UPLOAD_SESSION_STORE";
|
|
1677
|
-
declare const AXIS_UPLOAD_FILE_STORE = "AXIS_UPLOAD_FILE_STORE";
|
|
1678
|
-
declare const AXIS_UPLOAD_RECEIPT_SIGNER = "AXIS_UPLOAD_RECEIPT_SIGNER";
|
|
1679
|
-
|
|
1680
|
-
interface DiskUploadFileStoreOptions {
|
|
1681
|
-
uploadDir: string;
|
|
1682
|
-
chunkDir: string;
|
|
1683
|
-
}
|
|
1684
|
-
declare class DiskUploadFileStore implements UploadFileStore {
|
|
1685
|
-
private readonly uploadDir;
|
|
1686
|
-
private readonly chunkDir;
|
|
1687
|
-
constructor(options: DiskUploadFileStoreOptions);
|
|
1688
|
-
getFinalPath(fileId: string, filename?: string): string;
|
|
1689
|
-
getTempPath(fileId: string): string;
|
|
1690
|
-
statFinal(fileId: string, filename?: string): Promise<UploadFileStat>;
|
|
1691
|
-
readFinalRange(fileId: string, filename: string | undefined, start: number, length: number): Promise<Buffer>;
|
|
1692
|
-
hasTemp(fileId: string): Promise<boolean>;
|
|
1693
|
-
moveTempToFinal(fileId: string, filename?: string): Promise<string>;
|
|
1694
|
-
createTempReadStream(fileId: string): NodeJS.ReadableStream;
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
interface AxisRequestData {
|
|
1698
|
-
raw: Buffer;
|
|
1699
|
-
ip: string | undefined;
|
|
1700
|
-
preDecodeInput: any;
|
|
1701
|
-
frameBytesCount: number;
|
|
1702
|
-
}
|
|
1703
|
-
declare const AxisRaw: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
1704
|
-
declare const AxisIp: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
1705
|
-
declare const AxisContext$1: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
1706
|
-
declare const AxisDemoPubkey: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
1707
|
-
declare const AxisFrame: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
1708
|
-
|
|
1709
|
-
declare class ObserverDiscoveryService implements OnApplicationBootstrap {
|
|
1710
|
-
private readonly discovery;
|
|
1711
|
-
private readonly reflector;
|
|
1712
|
-
private readonly registry;
|
|
1713
|
-
private readonly logger;
|
|
1714
|
-
constructor(discovery: DiscoveryService, reflector: Reflector, registry: ObserverRegistry);
|
|
1715
|
-
onApplicationBootstrap(): void;
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
declare class HandlerDiscoveryService implements OnModuleInit {
|
|
1719
|
-
private readonly discovery;
|
|
1720
|
-
private readonly scanner;
|
|
1721
|
-
private readonly router;
|
|
1722
|
-
private readonly logger;
|
|
1723
|
-
constructor(discovery: DiscoveryService, scanner: MetadataScanner, router: IntentRouter);
|
|
1724
|
-
onModuleInit(): void;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
declare class SensorRegistry {
|
|
1728
|
-
private readonly configService;
|
|
1729
|
-
private sensors;
|
|
1730
|
-
private readonly logger;
|
|
1731
|
-
constructor(configService: ConfigService);
|
|
1732
|
-
register(sensor: AxisSensor): void;
|
|
1733
|
-
list(): AxisSensor[];
|
|
1734
|
-
getPreDecodeSensors(): AxisPreSensor[];
|
|
1735
|
-
getPostDecodeSensors(): AxisPostSensor[];
|
|
1736
|
-
private isPreDecodeSensor;
|
|
1737
|
-
private isPostDecodeSensor;
|
|
1738
|
-
getSensorCountByPhase(): {
|
|
1739
|
-
preDecodeCount: number;
|
|
1740
|
-
postDecodeCount: number;
|
|
1741
|
-
};
|
|
1742
|
-
clear(): void;
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
declare class SensorDiscoveryService implements OnApplicationBootstrap {
|
|
1746
|
-
private readonly discovery;
|
|
1747
|
-
private readonly reflector;
|
|
1748
|
-
private readonly registry;
|
|
1749
|
-
private readonly logger;
|
|
1750
|
-
constructor(discovery: DiscoveryService, reflector: Reflector, registry: SensorRegistry);
|
|
1751
|
-
onApplicationBootstrap(): void;
|
|
869
|
+
interface ExecutionContract {
|
|
870
|
+
maxDbWrites: number;
|
|
871
|
+
maxDbReads?: number;
|
|
872
|
+
maxExternalCalls: number;
|
|
873
|
+
maxTimeMs: number;
|
|
874
|
+
allowedEffects: string[];
|
|
875
|
+
maxMemoryMb?: number;
|
|
1752
876
|
}
|
|
877
|
+
declare const DEFAULT_CONTRACTS: Record<string, ExecutionContract>;
|
|
878
|
+
declare const FALLBACK_CONTRACT: ExecutionContract;
|
|
1753
879
|
|
|
1754
880
|
declare const SensorDecisionZ: z.ZodUnion<readonly [z.ZodObject<{
|
|
1755
881
|
action: z.ZodLiteral<"ALLOW">;
|
|
@@ -2130,7 +1256,7 @@ declare const IntentSchemaZ: z.ZodObject<{
|
|
|
2130
1256
|
}>>;
|
|
2131
1257
|
}, z.z.core.$strip>>;
|
|
2132
1258
|
}, z.z.core.$strip>;
|
|
2133
|
-
type IntentSchema = z.infer<typeof IntentSchemaZ>;
|
|
1259
|
+
type IntentSchema$1 = z.infer<typeof IntentSchemaZ>;
|
|
2134
1260
|
declare const WsHandshakeInputZ: z.ZodObject<{
|
|
2135
1261
|
clientId: z.ZodString;
|
|
2136
1262
|
isWs: z.ZodBoolean;
|
|
@@ -2158,11 +1284,11 @@ declare const IPReputationZ: z.ZodObject<{
|
|
|
2158
1284
|
}, z.z.core.$strip>;
|
|
2159
1285
|
type IPReputation = z.infer<typeof IPReputationZ>;
|
|
2160
1286
|
declare const UploadStatusZ: z.ZodEnum<{
|
|
2161
|
-
FINALIZING: "FINALIZING";
|
|
2162
|
-
ABORTED: "ABORTED";
|
|
2163
1287
|
INIT: "INIT";
|
|
2164
1288
|
UPLOADING: "UPLOADING";
|
|
1289
|
+
FINALIZING: "FINALIZING";
|
|
2165
1290
|
DONE: "DONE";
|
|
1291
|
+
ABORTED: "ABORTED";
|
|
2166
1292
|
}>;
|
|
2167
1293
|
type UploadStatus = z.infer<typeof UploadStatusZ>;
|
|
2168
1294
|
declare const UploadSessionZ: z.ZodObject<{
|
|
@@ -2173,11 +1299,11 @@ declare const UploadSessionZ: z.ZodObject<{
|
|
|
2173
1299
|
totalChunks: z.ZodNumber;
|
|
2174
1300
|
receivedCount: z.ZodNumber;
|
|
2175
1301
|
status: z.ZodEnum<{
|
|
2176
|
-
FINALIZING: "FINALIZING";
|
|
2177
|
-
ABORTED: "ABORTED";
|
|
2178
1302
|
INIT: "INIT";
|
|
2179
1303
|
UPLOADING: "UPLOADING";
|
|
1304
|
+
FINALIZING: "FINALIZING";
|
|
2180
1305
|
DONE: "DONE";
|
|
1306
|
+
ABORTED: "ABORTED";
|
|
2181
1307
|
}>;
|
|
2182
1308
|
}, z.z.core.$strip>;
|
|
2183
1309
|
type UploadSession = z.infer<typeof UploadSessionZ>;
|
|
@@ -2205,60 +1331,967 @@ declare enum ProofType$1 {
|
|
|
2205
1331
|
DEVICE_SE = 4,
|
|
2206
1332
|
WITNESS_SIG = 5
|
|
2207
1333
|
}
|
|
2208
|
-
declare const AxisContextZ: z.ZodObject<{
|
|
2209
|
-
pid: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
2210
|
-
ts: z.ZodBigInt;
|
|
2211
|
-
intent: z.ZodString;
|
|
2212
|
-
actorId: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
2213
|
-
proofType: z.ZodEnum<typeof ProofType$1>;
|
|
2214
|
-
proofRef: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
2215
|
-
nonce: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
2216
|
-
ip: z.ZodString;
|
|
2217
|
-
nodeCertHash: z.ZodOptional<z.ZodString>;
|
|
2218
|
-
capsule: z.ZodOptional<z.ZodObject<{
|
|
2219
|
-
id: z.ZodString;
|
|
2220
|
-
claims: z.ZodObject<{
|
|
2221
|
-
capsuleId: z.ZodString;
|
|
2222
|
-
allowIntents: z.ZodArray<z.ZodString>;
|
|
2223
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
2224
|
-
maxBodyBytes: z.ZodOptional<z.ZodNumber>;
|
|
2225
|
-
}, z.z.core.$strip>>;
|
|
2226
|
-
scopes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2227
|
-
}, z.z.core.$strip>;
|
|
2228
|
-
issuedAt: z.ZodNumber;
|
|
2229
|
-
expiresAt: z.ZodNumber;
|
|
2230
|
-
tier: z.ZodEnum<{
|
|
2231
|
-
FREE: "FREE";
|
|
2232
|
-
STANDARD: "STANDARD";
|
|
2233
|
-
PREMIUM: "PREMIUM";
|
|
2234
|
-
}>;
|
|
2235
|
-
}, z.z.core.$strip>>;
|
|
2236
|
-
passport: z.ZodOptional<z.ZodObject<{
|
|
2237
|
-
id: z.ZodString;
|
|
2238
|
-
public_key: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
2239
|
-
status: z.ZodEnum<{
|
|
2240
|
-
ACTIVE: "ACTIVE";
|
|
2241
|
-
REVOKED: "REVOKED";
|
|
2242
|
-
EXPIRED: "EXPIRED";
|
|
2243
|
-
PENDING: "PENDING";
|
|
2244
|
-
}>;
|
|
2245
|
-
issuedAt: z.ZodNumber;
|
|
2246
|
-
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
2247
|
-
}, z.z.core.$strip>>;
|
|
2248
|
-
meter: z.ZodOptional<z.ZodAny>;
|
|
2249
|
-
}, z.z.core.$strip>;
|
|
2250
|
-
type AxisContext = z.infer<typeof AxisContextZ>;
|
|
2251
|
-
declare const AxisErrorZ: z.ZodObject<{
|
|
2252
|
-
code: z.ZodString;
|
|
2253
|
-
message: z.ZodString;
|
|
2254
|
-
httpStatus: z.ZodNumber;
|
|
2255
|
-
}, z.z.core.$strip>;
|
|
2256
|
-
type AxisError = z.infer<typeof AxisErrorZ>;
|
|
1334
|
+
declare const AxisContextZ: z.ZodObject<{
|
|
1335
|
+
pid: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
1336
|
+
ts: z.ZodBigInt;
|
|
1337
|
+
intent: z.ZodString;
|
|
1338
|
+
actorId: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
1339
|
+
proofType: z.ZodEnum<typeof ProofType$1>;
|
|
1340
|
+
proofRef: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
1341
|
+
nonce: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
1342
|
+
ip: z.ZodString;
|
|
1343
|
+
nodeCertHash: z.ZodOptional<z.ZodString>;
|
|
1344
|
+
capsule: z.ZodOptional<z.ZodObject<{
|
|
1345
|
+
id: z.ZodString;
|
|
1346
|
+
claims: z.ZodObject<{
|
|
1347
|
+
capsuleId: z.ZodString;
|
|
1348
|
+
allowIntents: z.ZodArray<z.ZodString>;
|
|
1349
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
1350
|
+
maxBodyBytes: z.ZodOptional<z.ZodNumber>;
|
|
1351
|
+
}, z.z.core.$strip>>;
|
|
1352
|
+
scopes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1353
|
+
}, z.z.core.$strip>;
|
|
1354
|
+
issuedAt: z.ZodNumber;
|
|
1355
|
+
expiresAt: z.ZodNumber;
|
|
1356
|
+
tier: z.ZodEnum<{
|
|
1357
|
+
FREE: "FREE";
|
|
1358
|
+
STANDARD: "STANDARD";
|
|
1359
|
+
PREMIUM: "PREMIUM";
|
|
1360
|
+
}>;
|
|
1361
|
+
}, z.z.core.$strip>>;
|
|
1362
|
+
passport: z.ZodOptional<z.ZodObject<{
|
|
1363
|
+
id: z.ZodString;
|
|
1364
|
+
public_key: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
|
|
1365
|
+
status: z.ZodEnum<{
|
|
1366
|
+
ACTIVE: "ACTIVE";
|
|
1367
|
+
REVOKED: "REVOKED";
|
|
1368
|
+
EXPIRED: "EXPIRED";
|
|
1369
|
+
PENDING: "PENDING";
|
|
1370
|
+
}>;
|
|
1371
|
+
issuedAt: z.ZodNumber;
|
|
1372
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
1373
|
+
}, z.z.core.$strip>>;
|
|
1374
|
+
meter: z.ZodOptional<z.ZodAny>;
|
|
1375
|
+
}, z.z.core.$strip>;
|
|
1376
|
+
type AxisContext$1 = z.infer<typeof AxisContextZ>;
|
|
1377
|
+
declare const AxisErrorZ: z.ZodObject<{
|
|
1378
|
+
code: z.ZodString;
|
|
1379
|
+
message: z.ZodString;
|
|
1380
|
+
httpStatus: z.ZodNumber;
|
|
1381
|
+
}, z.z.core.$strip>;
|
|
1382
|
+
type AxisError = z.infer<typeof AxisErrorZ>;
|
|
1383
|
+
|
|
1384
|
+
declare const SENSITIVITY_METADATA_KEY = "axis:sensitivity";
|
|
1385
|
+
declare const CONTRACT_METADATA_KEY = "axis:contract";
|
|
1386
|
+
declare const REQUIRED_PROOF_METADATA_KEY = "axis:required_proof";
|
|
1387
|
+
type RequiredProofKind = ProofKind | "WITNESS";
|
|
1388
|
+
declare function Sensitivity(level: SensitivityLevel): ClassDecorator & MethodDecorator;
|
|
1389
|
+
declare function Contract(options: Partial<ExecutionContract>): ClassDecorator & MethodDecorator;
|
|
1390
|
+
declare function RequiredProof(proofs: [RequiredProofKind, ...RequiredProofKind[]]): ClassDecorator & MethodDecorator;
|
|
1391
|
+
declare function Capsule(): ClassDecorator & MethodDecorator;
|
|
1392
|
+
declare function Witness(): ClassDecorator & MethodDecorator;
|
|
1393
|
+
declare const AXIS_PUBLIC_KEY = "axis:public";
|
|
1394
|
+
declare function AxisPublic(): ClassDecorator & MethodDecorator;
|
|
1395
|
+
declare const AXIS_ANONYMOUS_KEY = "axis:anonymous";
|
|
1396
|
+
declare function AxisAnonymous(): ClassDecorator & MethodDecorator;
|
|
1397
|
+
declare const AXIS_RATE_LIMIT_KEY = "axis:rateLimit";
|
|
1398
|
+
interface AxisRateLimitConfig {
|
|
1399
|
+
max: number;
|
|
1400
|
+
windowSec: number;
|
|
1401
|
+
key?: string;
|
|
1402
|
+
}
|
|
1403
|
+
declare function AxisRateLimit(config: AxisRateLimitConfig): MethodDecorator;
|
|
1404
|
+
|
|
1405
|
+
interface IntentSchema {
|
|
1406
|
+
intent: string;
|
|
1407
|
+
version: number;
|
|
1408
|
+
bodyProfile: "TLV_MAP" | "RAW" | "TLV_OBJ" | "TLV_ARR";
|
|
1409
|
+
fields: Array<{
|
|
1410
|
+
name: string;
|
|
1411
|
+
tlv: number;
|
|
1412
|
+
kind: IntentTlvField["kind"];
|
|
1413
|
+
required?: boolean;
|
|
1414
|
+
maxLen?: number;
|
|
1415
|
+
max?: string;
|
|
1416
|
+
scope?: "header" | "body";
|
|
1417
|
+
}>;
|
|
1418
|
+
}
|
|
1419
|
+
interface AxisEffect {
|
|
1420
|
+
ok: boolean;
|
|
1421
|
+
effect: string;
|
|
1422
|
+
body?: Uint8Array;
|
|
1423
|
+
headers?: Map<number, Uint8Array>;
|
|
1424
|
+
metadata?: any;
|
|
1425
|
+
}
|
|
1426
|
+
declare class IntentRouter {
|
|
1427
|
+
private readonly moduleRef?;
|
|
1428
|
+
private readonly observerDispatcher?;
|
|
1429
|
+
private readonly logger;
|
|
1430
|
+
private readonly decoder;
|
|
1431
|
+
private readonly encoder;
|
|
1432
|
+
private static readonly BUILTIN_INTENTS;
|
|
1433
|
+
private handlers;
|
|
1434
|
+
private intentSensors;
|
|
1435
|
+
private intentDecoders;
|
|
1436
|
+
private intentSchemas;
|
|
1437
|
+
private intentValidators;
|
|
1438
|
+
private intentKinds;
|
|
1439
|
+
private intentChains;
|
|
1440
|
+
private intentObservers;
|
|
1441
|
+
private intentCapsulePolicies;
|
|
1442
|
+
private intentSensitivity;
|
|
1443
|
+
private intentContracts;
|
|
1444
|
+
private intentRequiredProof;
|
|
1445
|
+
private publicIntents;
|
|
1446
|
+
private anonymousIntents;
|
|
1447
|
+
private intentRateLimits;
|
|
1448
|
+
private cceHandlers;
|
|
1449
|
+
private ccePipelineConfig;
|
|
1450
|
+
constructor(moduleRef?: ModuleRef | undefined, observerDispatcher?: ObserverDispatcherService | undefined);
|
|
1451
|
+
getSchema(intent: string): IntentSchema | undefined;
|
|
1452
|
+
getValidators(intent: string): Map<number, TlvValidatorFn[]> | undefined;
|
|
1453
|
+
has(intent: string): boolean;
|
|
1454
|
+
getRegisteredIntents(): string[];
|
|
1455
|
+
getIntentEntry(intent: string): {
|
|
1456
|
+
schema?: IntentSchema;
|
|
1457
|
+
validators?: Map<number, TlvValidatorFn[]>;
|
|
1458
|
+
hasSensors: boolean;
|
|
1459
|
+
builtin: boolean;
|
|
1460
|
+
kind?: IntentKind;
|
|
1461
|
+
chain?: RegisteredChainConfig;
|
|
1462
|
+
capsulePolicy?: CapsulePolicyOptions;
|
|
1463
|
+
observerCount: number;
|
|
1464
|
+
} | null;
|
|
1465
|
+
getChainConfig(intent: string): RegisteredChainConfig | undefined;
|
|
1466
|
+
getObservers(intent: string): AxisObserverBinding[];
|
|
1467
|
+
register(intent: string, handler: any): void;
|
|
1468
|
+
registerHandler(instance: any): void;
|
|
1469
|
+
route(frame: AxisFrame$2): Promise<AxisEffect>;
|
|
1470
|
+
private logIntent;
|
|
1471
|
+
registerIntentMeta(intent: string, proto: object, methodName: string, handlerSensors?: Function[], handlerObservers?: AxisObserverBinding[]): void;
|
|
1472
|
+
getSensitivity(intent: string): string | undefined;
|
|
1473
|
+
getContract(intent: string): Record<string, any> | undefined;
|
|
1474
|
+
getRequiredProof(intent: string): RequiredProofKind[] | undefined;
|
|
1475
|
+
isPublic(intent: string): boolean;
|
|
1476
|
+
isAnonymous(intent: string): boolean;
|
|
1477
|
+
getRateLimit(intent: string): AxisRateLimitConfig | undefined;
|
|
1478
|
+
private emitIntentObservers;
|
|
1479
|
+
private runIntentSensors;
|
|
1480
|
+
private getEffectiveCapsulePolicy;
|
|
1481
|
+
private enforceCapsulePolicy;
|
|
1482
|
+
private executeChainRequest;
|
|
1483
|
+
private parseIntentExecBody;
|
|
1484
|
+
private parseChainRequestBody;
|
|
1485
|
+
private isChainRequestLike;
|
|
1486
|
+
private isChainEnvelopeLike;
|
|
1487
|
+
private encodeJson;
|
|
1488
|
+
private getActorIdFromFrame;
|
|
1489
|
+
private getProofRefFromFrame;
|
|
1490
|
+
private hasCapsuleReference;
|
|
1491
|
+
private getHeaderValue;
|
|
1492
|
+
private identifiersMatch;
|
|
1493
|
+
private extractInlineCapsuleId;
|
|
1494
|
+
private toInlineCapsuleRecord;
|
|
1495
|
+
private toScopeList;
|
|
1496
|
+
configureCce(config: Omit<CcePipelineConfig, "handlers">): void;
|
|
1497
|
+
registerCceHandler(intent: string, handler: CceHandler): void;
|
|
1498
|
+
hasCceHandler(intent: string): boolean;
|
|
1499
|
+
routeCce(envelope: CceRequestEnvelope): Promise<CcePipelineResult>;
|
|
1500
|
+
private storeSchema;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
interface AxisObserverContext {
|
|
1504
|
+
event: AxisObserverEvent;
|
|
1505
|
+
timestamp: number;
|
|
1506
|
+
intent?: string;
|
|
1507
|
+
chainId?: string;
|
|
1508
|
+
stepId?: string;
|
|
1509
|
+
handler?: string;
|
|
1510
|
+
frame?: AxisFrame$2;
|
|
1511
|
+
envelope?: AxisChainEnvelope;
|
|
1512
|
+
step?: AxisChainStep;
|
|
1513
|
+
effect?: AxisEffect;
|
|
1514
|
+
result?: AxisChainStepResult | AxisChainResult;
|
|
1515
|
+
error?: string;
|
|
1516
|
+
observerTags?: string[];
|
|
1517
|
+
capsule?: AxisCapsuleRef;
|
|
1518
|
+
keyExchange?: AxisKeyExchangeRef;
|
|
1519
|
+
metadata?: Record<string, unknown>;
|
|
1520
|
+
}
|
|
1521
|
+
interface AxisIntentObserver {
|
|
1522
|
+
readonly name: string;
|
|
1523
|
+
supports?(context: AxisObserverContext): boolean;
|
|
1524
|
+
observe(context: AxisObserverContext): Promise<void> | void;
|
|
1525
|
+
}
|
|
1526
|
+
interface AxisObserverRegistration {
|
|
1527
|
+
name: string;
|
|
1528
|
+
instance: AxisIntentObserver;
|
|
1529
|
+
tags: string[];
|
|
1530
|
+
events?: AxisObserverEvent[];
|
|
1531
|
+
intents?: string[];
|
|
1532
|
+
handlers?: string[];
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
declare class ObserverRegistry {
|
|
1536
|
+
private readonly logger;
|
|
1537
|
+
private readonly byName;
|
|
1538
|
+
private readonly byType;
|
|
1539
|
+
register(instance: AxisIntentObserver, meta?: AxisObserverDefinition): void;
|
|
1540
|
+
resolve(ref: AxisObserverRef): AxisObserverRegistration | undefined;
|
|
1541
|
+
list(): AxisObserverRegistration[];
|
|
1542
|
+
clear(): void;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
declare class ObserverDispatcherService {
|
|
1546
|
+
private readonly registry;
|
|
1547
|
+
private readonly logger;
|
|
1548
|
+
constructor(registry: ObserverRegistry);
|
|
1549
|
+
dispatch(bindings: AxisObserverBinding[] | undefined, context: AxisObserverContext): Promise<void>;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
interface AxisChainExecutionOptions {
|
|
1553
|
+
actorId?: string;
|
|
1554
|
+
baseFrame?: Partial<AxisFrame$2>;
|
|
1555
|
+
}
|
|
1556
|
+
declare class AxisChainExecutor {
|
|
1557
|
+
private readonly router;
|
|
1558
|
+
private readonly observerDispatcher?;
|
|
1559
|
+
private readonly logger;
|
|
1560
|
+
private readonly encoder;
|
|
1561
|
+
private readonly decoder;
|
|
1562
|
+
constructor(router: IntentRouter, observerDispatcher?: ObserverDispatcherService | undefined);
|
|
1563
|
+
execute(envelope: AxisChainEnvelope, options?: AxisChainExecutionOptions): Promise<AxisChainResult>;
|
|
1564
|
+
private executeStep;
|
|
1565
|
+
private buildFrame;
|
|
1566
|
+
private validateEnvelope;
|
|
1567
|
+
private canRun;
|
|
1568
|
+
private blockStepsWithFailedDependencies;
|
|
1569
|
+
private markUnresolvedSteps;
|
|
1570
|
+
private buildSummary;
|
|
1571
|
+
private resolveStepInput;
|
|
1572
|
+
private lookupReference;
|
|
1573
|
+
private serializeInput;
|
|
1574
|
+
private decodeOutput;
|
|
1575
|
+
private computeProofHash;
|
|
1576
|
+
private collectChainBindings;
|
|
1577
|
+
private dispatch;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
declare const AXIS_EXECUTION_CONTEXT_KEY: unique symbol;
|
|
1581
|
+
interface AxisExecutionContext {
|
|
1582
|
+
metaIntent?: "INTENT.EXEC" | "CHAIN.EXEC";
|
|
1583
|
+
actorId?: string;
|
|
1584
|
+
inlineCapsule?: Record<string, unknown>;
|
|
1585
|
+
capsuleRef?: AxisCapsuleRef;
|
|
1586
|
+
chainEnvelope?: AxisChainEnvelope;
|
|
1587
|
+
chainStep?: AxisChainStep;
|
|
1588
|
+
}
|
|
1589
|
+
declare function getAxisExecutionContext(frame?: Partial<AxisFrame$2>): AxisExecutionContext | undefined;
|
|
1590
|
+
declare function withAxisExecutionContext<T extends object>(target: T, context: AxisExecutionContext): T;
|
|
1591
|
+
declare function mergeAxisExecutionContext(base?: AxisExecutionContext, override?: AxisExecutionContext): AxisExecutionContext | undefined;
|
|
1592
|
+
|
|
1593
|
+
declare const BAND: {
|
|
1594
|
+
readonly WIRE: 0;
|
|
1595
|
+
readonly IDENTITY: 40;
|
|
1596
|
+
readonly POLICY: 90;
|
|
1597
|
+
readonly CONTENT: 140;
|
|
1598
|
+
readonly BUSINESS: 200;
|
|
1599
|
+
readonly AUDIT: 900;
|
|
1600
|
+
};
|
|
1601
|
+
type SensorBand = keyof typeof BAND;
|
|
1602
|
+
declare const PRE_DECODE_BOUNDARY = 40;
|
|
1603
|
+
|
|
1604
|
+
declare function stableJsonStringify(value: unknown): string;
|
|
1605
|
+
|
|
1606
|
+
interface ObservationStage {
|
|
1607
|
+
name: string;
|
|
1608
|
+
status: 'ok' | 'fail' | 'skip';
|
|
1609
|
+
startMs: number;
|
|
1610
|
+
endMs?: number;
|
|
1611
|
+
durationMs?: number;
|
|
1612
|
+
reason?: string;
|
|
1613
|
+
code?: string;
|
|
1614
|
+
}
|
|
1615
|
+
interface ObservationSensor {
|
|
1616
|
+
name: string;
|
|
1617
|
+
allowed: boolean;
|
|
1618
|
+
riskScore: number;
|
|
1619
|
+
durationMs: number;
|
|
1620
|
+
reasons: string[];
|
|
1621
|
+
code?: string;
|
|
1622
|
+
}
|
|
1623
|
+
interface AxisObservation {
|
|
1624
|
+
id: string;
|
|
1625
|
+
startMs: number;
|
|
1626
|
+
transport: 'http' | 'ws';
|
|
1627
|
+
ip?: string;
|
|
1628
|
+
intent?: string;
|
|
1629
|
+
actorId?: string;
|
|
1630
|
+
capsuleId?: string;
|
|
1631
|
+
stages: ObservationStage[];
|
|
1632
|
+
sensors: ObservationSensor[];
|
|
1633
|
+
decision?: 'ALLOW' | 'DENY';
|
|
1634
|
+
resultCode?: string;
|
|
1635
|
+
statusCode?: number;
|
|
1636
|
+
endMs?: number;
|
|
1637
|
+
durationMs?: number;
|
|
1638
|
+
facts: Record<string, unknown>;
|
|
1639
|
+
}
|
|
1640
|
+
declare function createObservation(transport: 'http' | 'ws', ip?: string): AxisObservation;
|
|
1641
|
+
declare function startStage(obs: AxisObservation, name: string): ObservationStage;
|
|
1642
|
+
declare function endStage(stage: ObservationStage, status?: 'ok' | 'fail' | 'skip', reason?: string, code?: string): void;
|
|
1643
|
+
declare function recordSensor(obs: AxisObservation, name: string, allowed: boolean, riskScore: number, durationMs: number, reasons: string[], code?: string): void;
|
|
1644
|
+
declare function finalizeObservation(obs: AxisObservation, decision: 'ALLOW' | 'DENY', statusCode: number, resultCode?: string): void;
|
|
1645
|
+
|
|
1646
|
+
interface ObservationQueueMessage {
|
|
1647
|
+
v: 1;
|
|
1648
|
+
observation: AxisObservation;
|
|
1649
|
+
attempts: number;
|
|
1650
|
+
firstEnqueuedAt: number;
|
|
1651
|
+
lastEnqueuedAt: number;
|
|
1652
|
+
sourceNodeId: string;
|
|
1653
|
+
lastError?: string;
|
|
1654
|
+
}
|
|
1655
|
+
interface ObservationQueueConfig {
|
|
1656
|
+
enabled: boolean;
|
|
1657
|
+
workerEnabled: boolean;
|
|
1658
|
+
streamKey: string;
|
|
1659
|
+
deadLetterStreamKey: string;
|
|
1660
|
+
groupName: string;
|
|
1661
|
+
consumerName: string;
|
|
1662
|
+
readBlockMs: number;
|
|
1663
|
+
readBatchSize: number;
|
|
1664
|
+
reclaimIdleMs: number;
|
|
1665
|
+
reclaimBatchSize: number;
|
|
1666
|
+
maxRetries: number;
|
|
1667
|
+
maxStreamLength: number;
|
|
1668
|
+
workerConcurrency: number;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
interface ObservationStreamEntry {
|
|
1672
|
+
id: string;
|
|
1673
|
+
message: ObservationQueueMessage;
|
|
1674
|
+
}
|
|
1675
|
+
declare function buildQueueMessage(observation: AxisObservation, sourceNodeId: string, previous?: ObservationQueueMessage, lastError?: string): ObservationQueueMessage;
|
|
1676
|
+
declare function encodeQueueMessage(message: ObservationQueueMessage): string;
|
|
1677
|
+
declare function decodeQueueMessage(raw: string): ObservationQueueMessage | null;
|
|
1678
|
+
declare function parseStreamEntries(raw: any): ObservationStreamEntry[];
|
|
1679
|
+
declare function parseAutoClaimEntries(raw: any): ObservationStreamEntry[];
|
|
1680
|
+
|
|
1681
|
+
interface ObservationWitnessSummary {
|
|
1682
|
+
intent?: string;
|
|
1683
|
+
actorId?: string;
|
|
1684
|
+
decision?: string;
|
|
1685
|
+
statusCode?: number;
|
|
1686
|
+
durationMs?: number;
|
|
1687
|
+
sensorCount: number;
|
|
1688
|
+
stageCount: number;
|
|
1689
|
+
}
|
|
1690
|
+
interface UnsignedObservationWitness {
|
|
1691
|
+
v: 1;
|
|
1692
|
+
observationId: string;
|
|
1693
|
+
payloadHash: string;
|
|
1694
|
+
sealedAt: number;
|
|
1695
|
+
summary: ObservationWitnessSummary;
|
|
1696
|
+
}
|
|
1697
|
+
declare function canonicalizeObservation(obs: AxisObservation): string;
|
|
1698
|
+
declare function hashObservation(obs: AxisObservation): string;
|
|
1699
|
+
declare function buildUnsignedWitness(obs: AxisObservation): UnsignedObservationWitness | null;
|
|
1700
|
+
|
|
1701
|
+
interface ResponseObserverContext {
|
|
1702
|
+
actorId: string;
|
|
1703
|
+
intent: string;
|
|
1704
|
+
}
|
|
1705
|
+
interface ResponseContract {
|
|
1706
|
+
ok: boolean;
|
|
1707
|
+
effect: string;
|
|
1708
|
+
body?: Uint8Array;
|
|
1709
|
+
headers?: Map<number, Uint8Array>;
|
|
1710
|
+
}
|
|
1711
|
+
interface ObserverVerdict {
|
|
1712
|
+
passed: boolean;
|
|
1713
|
+
code?: string;
|
|
1714
|
+
reason?: string;
|
|
1715
|
+
}
|
|
1716
|
+
declare function verifyResponse(ctx: ResponseObserverContext, response: ResponseContract): ObserverVerdict;
|
|
1717
|
+
type ResponseObserver = (ctx: ResponseObserverContext, response: ResponseContract) => ObserverVerdict;
|
|
1718
|
+
declare const ResponseObserver: ResponseObserver;
|
|
1719
|
+
|
|
1720
|
+
declare const ATS1_HDR: {
|
|
1721
|
+
readonly INTENT_ID: 1;
|
|
1722
|
+
readonly ACTOR_KEY_ID: 2;
|
|
1723
|
+
readonly CAPSULE_ID: 3;
|
|
1724
|
+
readonly NONCE: 4;
|
|
1725
|
+
readonly TS_MS: 5;
|
|
1726
|
+
readonly SCHEMA_ID: 6;
|
|
1727
|
+
readonly BODY_HASH: 7;
|
|
1728
|
+
readonly TRACE_ID: 8;
|
|
1729
|
+
};
|
|
1730
|
+
declare const ATS1_SCHEMA: {
|
|
1731
|
+
readonly PASSKEY_LOGIN_OPTIONS_REQ: 2001;
|
|
1732
|
+
readonly PASSKEY_LOGIN_OPTIONS_RES: 2002;
|
|
1733
|
+
readonly PASSKEY_LOGIN_VERIFY_REQ: 2011;
|
|
1734
|
+
readonly PASSKEY_LOGIN_VERIFY_RES: 2012;
|
|
1735
|
+
readonly PASSKEY_REGISTER_OPTIONS_REQ: 2021;
|
|
1736
|
+
readonly PASSKEY_REGISTER_OPTIONS_RES: 2022;
|
|
1737
|
+
readonly PASSKEY_REGISTER_VERIFY_REQ: 2031;
|
|
1738
|
+
readonly PASSKEY_REGISTER_VERIFY_RES: 2032;
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
type Ats1FieldType = 'bytes' | 'utf8' | 'uvarint' | 'u64be' | 'nested';
|
|
1742
|
+
type Ats1FieldDescriptor = {
|
|
1743
|
+
tag: number;
|
|
1744
|
+
name: string;
|
|
1745
|
+
type: Ats1FieldType;
|
|
1746
|
+
required?: boolean;
|
|
1747
|
+
repeated?: boolean;
|
|
1748
|
+
nestedSchema?: Ats1SchemaDescriptor;
|
|
1749
|
+
maxLen?: number;
|
|
1750
|
+
};
|
|
1751
|
+
type Ats1SchemaDescriptor = {
|
|
1752
|
+
schemaId: number;
|
|
1753
|
+
name: string;
|
|
1754
|
+
strict: boolean;
|
|
1755
|
+
maxNestingDepth: number;
|
|
1756
|
+
maxBodyBytes?: number;
|
|
1757
|
+
fields: Ats1FieldDescriptor[];
|
|
1758
|
+
};
|
|
1759
|
+
type DecodedTlv = {
|
|
1760
|
+
tag: number;
|
|
1761
|
+
value: Buffer;
|
|
1762
|
+
};
|
|
1763
|
+
type DecodedTlvMap = Map<number, Buffer[]>;
|
|
1764
|
+
type SensorInputLike = {
|
|
1765
|
+
hdrTLVs: DecodedTlvMap;
|
|
1766
|
+
bodyTLVs: DecodedTlvMap;
|
|
1767
|
+
schemaId: number;
|
|
1768
|
+
intentId: number;
|
|
1769
|
+
};
|
|
1770
|
+
type Ats1Limits = {
|
|
1771
|
+
maxVarintBytes: number;
|
|
1772
|
+
maxTlvCount: number;
|
|
1773
|
+
maxValueBytes: number;
|
|
1774
|
+
maxNestingDepth: number;
|
|
1775
|
+
};
|
|
1776
|
+
declare const DEFAULT_LIMITS: Ats1Limits;
|
|
1777
|
+
declare function encodeUVarint(n: number | bigint): Buffer;
|
|
1778
|
+
declare function decodeUVarint(buf: Buffer, offset: number, limits?: Ats1Limits): {
|
|
1779
|
+
value: bigint;
|
|
1780
|
+
offset: number;
|
|
1781
|
+
bytesRead: number;
|
|
1782
|
+
};
|
|
1783
|
+
declare function encodeU64BE(n: bigint): Buffer;
|
|
1784
|
+
declare function decodeU64BE(buf: Buffer): bigint;
|
|
1785
|
+
declare function sha256(data: Buffer): Buffer;
|
|
1786
|
+
declare function encodeTLV(tag: number, value: Buffer): Buffer;
|
|
1787
|
+
declare function encodeTLVStreamCanonical(entries: DecodedTlv[]): Buffer;
|
|
1788
|
+
declare function decodeTLVStream(stream: Buffer, limits?: Ats1Limits): DecodedTlv[];
|
|
1789
|
+
declare function tlvsToMap(entries: DecodedTlv[]): DecodedTlvMap;
|
|
1790
|
+
type LogicalBody = {
|
|
1791
|
+
schemaId: number;
|
|
1792
|
+
fields: Record<string, any>;
|
|
1793
|
+
};
|
|
1794
|
+
declare function validateTLVsAgainstSchema(schema: Ats1SchemaDescriptor, tlvs: DecodedTlv[], depth?: number, limits?: Ats1Limits): void;
|
|
1795
|
+
declare function logicalBodyToTLVs(schema: Ats1SchemaDescriptor, body: LogicalBody, limits?: Ats1Limits): DecodedTlv[];
|
|
1796
|
+
declare function tlvsToLogicalBody(schema: Ats1SchemaDescriptor, tlvs: DecodedTlv[], limits?: Ats1Limits): LogicalBody;
|
|
1797
|
+
declare const HDR_TAGS: {
|
|
1798
|
+
readonly intent_id: 1;
|
|
1799
|
+
readonly actor_key_id: 2;
|
|
1800
|
+
readonly capsule_id: 3;
|
|
1801
|
+
readonly nonce: 4;
|
|
1802
|
+
readonly ts_ms: 5;
|
|
1803
|
+
readonly schema_id: 6;
|
|
1804
|
+
readonly body_hash: 7;
|
|
1805
|
+
readonly trace_id: 8;
|
|
1806
|
+
};
|
|
1807
|
+
type AxisHeaderLogical = {
|
|
1808
|
+
intentId: number;
|
|
1809
|
+
actorKeyId: Uint8Array;
|
|
1810
|
+
capsuleId?: Uint8Array;
|
|
1811
|
+
nonce: Uint8Array;
|
|
1812
|
+
tsMs: bigint;
|
|
1813
|
+
schemaId: number;
|
|
1814
|
+
bodyHash: Uint8Array;
|
|
1815
|
+
traceId?: Uint8Array;
|
|
1816
|
+
version?: number;
|
|
1817
|
+
headerHash?: Uint8Array;
|
|
1818
|
+
headerTlvs?: DecodedTlv[];
|
|
1819
|
+
bodyTlvs?: DecodedTlv[];
|
|
1820
|
+
};
|
|
1821
|
+
type AxisLogicalRequest = {
|
|
1822
|
+
hdr: AxisHeaderLogical;
|
|
1823
|
+
body: LogicalBody;
|
|
1824
|
+
};
|
|
1825
|
+
declare function encodeAxisHeaderToTLVs(hdr: AxisHeaderLogical): DecodedTlv[];
|
|
1826
|
+
declare function decodeAxisHeaderFromTLVs(hdrTlvs: DecodedTlv[], limits?: Ats1Limits): AxisHeaderLogical;
|
|
1827
|
+
declare function encodeAxisRequestBinary(schema: Ats1SchemaDescriptor, req: Omit<AxisLogicalRequest, 'hdr'> & {
|
|
1828
|
+
hdr: Omit<AxisHeaderLogical, 'bodyHash'>;
|
|
1829
|
+
}, limits?: Ats1Limits): {
|
|
1830
|
+
hdrBytes: Buffer;
|
|
1831
|
+
bodyBytes: Buffer;
|
|
1832
|
+
bodyHash: Buffer;
|
|
1833
|
+
};
|
|
1834
|
+
declare function decodeAxisRequestBinary(schema: Ats1SchemaDescriptor, hdrBytes: Buffer, bodyBytes: Buffer, limits?: Ats1Limits): {
|
|
1835
|
+
hdr: AxisHeaderLogical;
|
|
1836
|
+
body: LogicalBody;
|
|
1837
|
+
sensorInput: SensorInputLike;
|
|
1838
|
+
};
|
|
1839
|
+
declare const Schema3100_DeviceContext: Ats1SchemaDescriptor;
|
|
1840
|
+
declare const Schema2001_PasskeyLoginOptionsReq: Ats1SchemaDescriptor;
|
|
1841
|
+
declare const Schema4001_LoginWithDeviceReq: Ats1SchemaDescriptor;
|
|
1842
|
+
|
|
1843
|
+
type ats1_Ats1FieldDescriptor = Ats1FieldDescriptor;
|
|
1844
|
+
type ats1_Ats1FieldType = Ats1FieldType;
|
|
1845
|
+
type ats1_Ats1Limits = Ats1Limits;
|
|
1846
|
+
type ats1_Ats1SchemaDescriptor = Ats1SchemaDescriptor;
|
|
1847
|
+
type ats1_AxisHeaderLogical = AxisHeaderLogical;
|
|
1848
|
+
type ats1_AxisLogicalRequest = AxisLogicalRequest;
|
|
1849
|
+
declare const ats1_DEFAULT_LIMITS: typeof DEFAULT_LIMITS;
|
|
1850
|
+
type ats1_DecodedTlv = DecodedTlv;
|
|
1851
|
+
type ats1_DecodedTlvMap = DecodedTlvMap;
|
|
1852
|
+
declare const ats1_HDR_TAGS: typeof HDR_TAGS;
|
|
1853
|
+
declare const ats1_Schema2001_PasskeyLoginOptionsReq: typeof Schema2001_PasskeyLoginOptionsReq;
|
|
1854
|
+
declare const ats1_Schema3100_DeviceContext: typeof Schema3100_DeviceContext;
|
|
1855
|
+
declare const ats1_Schema4001_LoginWithDeviceReq: typeof Schema4001_LoginWithDeviceReq;
|
|
1856
|
+
type ats1_SensorInputLike = SensorInputLike;
|
|
1857
|
+
declare const ats1_decodeAxisHeaderFromTLVs: typeof decodeAxisHeaderFromTLVs;
|
|
1858
|
+
declare const ats1_decodeAxisRequestBinary: typeof decodeAxisRequestBinary;
|
|
1859
|
+
declare const ats1_decodeTLVStream: typeof decodeTLVStream;
|
|
1860
|
+
declare const ats1_decodeU64BE: typeof decodeU64BE;
|
|
1861
|
+
declare const ats1_decodeUVarint: typeof decodeUVarint;
|
|
1862
|
+
declare const ats1_encodeAxisHeaderToTLVs: typeof encodeAxisHeaderToTLVs;
|
|
1863
|
+
declare const ats1_encodeAxisRequestBinary: typeof encodeAxisRequestBinary;
|
|
1864
|
+
declare const ats1_encodeTLV: typeof encodeTLV;
|
|
1865
|
+
declare const ats1_encodeTLVStreamCanonical: typeof encodeTLVStreamCanonical;
|
|
1866
|
+
declare const ats1_encodeU64BE: typeof encodeU64BE;
|
|
1867
|
+
declare const ats1_encodeUVarint: typeof encodeUVarint;
|
|
1868
|
+
declare const ats1_logicalBodyToTLVs: typeof logicalBodyToTLVs;
|
|
1869
|
+
declare const ats1_sha256: typeof sha256;
|
|
1870
|
+
declare const ats1_tlvsToLogicalBody: typeof tlvsToLogicalBody;
|
|
1871
|
+
declare const ats1_tlvsToMap: typeof tlvsToMap;
|
|
1872
|
+
declare const ats1_validateTLVsAgainstSchema: typeof validateTLVsAgainstSchema;
|
|
1873
|
+
declare namespace ats1 {
|
|
1874
|
+
export { type ats1_Ats1FieldDescriptor as Ats1FieldDescriptor, type ats1_Ats1FieldType as Ats1FieldType, type ats1_Ats1Limits as Ats1Limits, type ats1_Ats1SchemaDescriptor as Ats1SchemaDescriptor, type ats1_AxisHeaderLogical as AxisHeaderLogical, type ats1_AxisLogicalRequest as AxisLogicalRequest, ats1_DEFAULT_LIMITS as DEFAULT_LIMITS, type ats1_DecodedTlv as DecodedTlv, type ats1_DecodedTlvMap as DecodedTlvMap, ats1_HDR_TAGS as HDR_TAGS, ats1_Schema2001_PasskeyLoginOptionsReq as Schema2001_PasskeyLoginOptionsReq, ats1_Schema3100_DeviceContext as Schema3100_DeviceContext, ats1_Schema4001_LoginWithDeviceReq as Schema4001_LoginWithDeviceReq, type ats1_SensorInputLike as SensorInputLike, ats1_decodeAxisHeaderFromTLVs as decodeAxisHeaderFromTLVs, ats1_decodeAxisRequestBinary as decodeAxisRequestBinary, ats1_decodeTLVStream as decodeTLVStream, ats1_decodeU64BE as decodeU64BE, ats1_decodeUVarint as decodeUVarint, ats1_encodeAxisHeaderToTLVs as encodeAxisHeaderToTLVs, ats1_encodeAxisRequestBinary as encodeAxisRequestBinary, ats1_encodeTLV as encodeTLV, ats1_encodeTLVStreamCanonical as encodeTLVStreamCanonical, ats1_encodeU64BE as encodeU64BE, ats1_encodeUVarint as encodeUVarint, ats1_logicalBodyToTLVs as logicalBodyToTLVs, ats1_sha256 as sha256, ats1_tlvsToLogicalBody as tlvsToLogicalBody, ats1_tlvsToMap as tlvsToMap, ats1_validateTLVsAgainstSchema as validateTLVsAgainstSchema };
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
declare function buildAts1Hdr(params: {
|
|
1878
|
+
intentId: number;
|
|
1879
|
+
schemaId: number;
|
|
1880
|
+
actorKeyId?: Buffer;
|
|
1881
|
+
capsuleId?: Buffer;
|
|
1882
|
+
traceId?: Buffer;
|
|
1883
|
+
tsMs?: bigint;
|
|
1884
|
+
nonce?: Buffer;
|
|
1885
|
+
bodyHash?: Buffer;
|
|
1886
|
+
}): Buffer;
|
|
1887
|
+
declare function packPasskeyLoginOptionsReq(params: {
|
|
1888
|
+
intentId: number;
|
|
1889
|
+
username: string;
|
|
1890
|
+
actorKeyId?: Buffer;
|
|
1891
|
+
capsuleId?: Buffer;
|
|
1892
|
+
traceId?: Buffer;
|
|
1893
|
+
}): {
|
|
1894
|
+
hdr: Buffer<ArrayBufferLike>;
|
|
1895
|
+
body: Buffer<ArrayBufferLike>;
|
|
1896
|
+
};
|
|
1897
|
+
declare function unpackPasskeyLoginOptionsReq(body: Buffer): {
|
|
1898
|
+
username: string;
|
|
1899
|
+
};
|
|
1900
|
+
declare const Schema2021_PasskeyRegisterOptionsReq: Ats1SchemaDescriptor;
|
|
1901
|
+
declare const Schema2011_PasskeyLoginVerifyReq: Ats1SchemaDescriptor;
|
|
1902
|
+
declare function packPasskeyRegisterOptionsReq(params: {
|
|
1903
|
+
intentId: number;
|
|
1904
|
+
username: string;
|
|
1905
|
+
actorKeyId?: Buffer;
|
|
1906
|
+
traceId?: Buffer;
|
|
1907
|
+
}): {
|
|
1908
|
+
hdr: Buffer<ArrayBufferLike>;
|
|
1909
|
+
body: Buffer<ArrayBufferLike>;
|
|
1910
|
+
};
|
|
1911
|
+
declare function unpackPasskeyRegisterOptionsReq(body: Buffer): {
|
|
1912
|
+
username: string;
|
|
1913
|
+
};
|
|
1914
|
+
declare function packPasskeyLoginVerifyReq(params: {
|
|
1915
|
+
intentId: number;
|
|
1916
|
+
username: string;
|
|
1917
|
+
credentialId: Buffer;
|
|
1918
|
+
clientDataJSON: Buffer;
|
|
1919
|
+
authenticatorData: Buffer;
|
|
1920
|
+
signature: Buffer;
|
|
1921
|
+
userHandle?: Buffer;
|
|
1922
|
+
actorKeyId?: Buffer;
|
|
1923
|
+
traceId?: Buffer;
|
|
1924
|
+
}): {
|
|
1925
|
+
hdr: Buffer<ArrayBufferLike>;
|
|
1926
|
+
body: Buffer<ArrayBufferLike>;
|
|
1927
|
+
};
|
|
1928
|
+
declare function unpackPasskeyLoginVerifyReq(body: Buffer): {
|
|
1929
|
+
username: string;
|
|
1930
|
+
credentialId: Buffer;
|
|
1931
|
+
clientDataJSON: Buffer;
|
|
1932
|
+
authenticatorData: Buffer;
|
|
1933
|
+
signature: Buffer;
|
|
1934
|
+
userHandle: Buffer | undefined;
|
|
1935
|
+
};
|
|
1936
|
+
declare const Schema2002_PasskeyLoginOptionsRes: Ats1SchemaDescriptor;
|
|
1937
|
+
declare function packPasskeyLoginOptionsRes(params: {
|
|
1938
|
+
challenge: string;
|
|
1939
|
+
timeout?: number;
|
|
1940
|
+
rpId?: string;
|
|
1941
|
+
userVerification?: string;
|
|
1942
|
+
allowCredentials?: {
|
|
1943
|
+
id: string;
|
|
1944
|
+
type: string;
|
|
1945
|
+
transports?: string[];
|
|
1946
|
+
}[];
|
|
1947
|
+
}): Buffer;
|
|
1948
|
+
declare const Schema2012_PasskeyLoginVerifyRes: Ats1SchemaDescriptor;
|
|
1949
|
+
declare function packPasskeyLoginVerifyRes(params: {
|
|
1950
|
+
actorId: string;
|
|
1951
|
+
keyId: string;
|
|
1952
|
+
capsule: Buffer;
|
|
1953
|
+
expiresAt: bigint;
|
|
1954
|
+
}): Buffer;
|
|
1955
|
+
|
|
1956
|
+
type Axis1FrameToEncode = {
|
|
1957
|
+
ver: number;
|
|
1958
|
+
flags: number;
|
|
1959
|
+
hdr: Buffer;
|
|
1960
|
+
body: Buffer;
|
|
1961
|
+
sig: Buffer;
|
|
1962
|
+
};
|
|
1963
|
+
declare function encodeAxis1Frame(f: Axis1FrameToEncode): Buffer;
|
|
1964
|
+
|
|
1965
|
+
declare function axis1SigningBytes(params: {
|
|
1966
|
+
ver: number;
|
|
1967
|
+
flags: number;
|
|
1968
|
+
hdr: Buffer;
|
|
1969
|
+
body: Buffer;
|
|
1970
|
+
}): Buffer;
|
|
1971
|
+
|
|
1972
|
+
declare function encVarint(x: bigint): Buffer;
|
|
1973
|
+
declare function varintU(x: number | bigint): Buffer;
|
|
1974
|
+
declare function u64be(x: bigint): Buffer;
|
|
1975
|
+
declare function utf8(s: string): Buffer;
|
|
1976
|
+
declare function bytes(b: Uint8Array | Buffer): Buffer;
|
|
1977
|
+
declare function nonce16(): Buffer;
|
|
1978
|
+
declare function tlv(type: number, value: Buffer): Buffer;
|
|
1979
|
+
declare function buildTLVs(items: {
|
|
1980
|
+
type: number;
|
|
1981
|
+
value: Buffer;
|
|
1982
|
+
}[], opts?: {
|
|
1983
|
+
allowDupTypes?: Set<number>;
|
|
1984
|
+
}): Buffer;
|
|
1985
|
+
|
|
1986
|
+
declare function b64urlEncode(buf: Buffer): string;
|
|
1987
|
+
declare function b64urlDecode(str: string): Buffer;
|
|
1988
|
+
declare function b64urlEncodeString(str: string, encoding?: BufferEncoding): string;
|
|
1989
|
+
declare function b64urlDecodeString(str: string, encoding?: BufferEncoding): string;
|
|
1990
|
+
|
|
1991
|
+
declare function canonicalJson(value: any): string;
|
|
1992
|
+
declare function canonicalJsonExcluding(obj: Record<string, any>, exclude: string[]): string;
|
|
1993
|
+
|
|
1994
|
+
declare class ContractViolationError extends Error {
|
|
1995
|
+
code: string;
|
|
1996
|
+
constructor(code: string, message: string);
|
|
1997
|
+
}
|
|
1998
|
+
interface ExecutionMetrics {
|
|
1999
|
+
dbWrites: number;
|
|
2000
|
+
dbReads: number;
|
|
2001
|
+
externalCalls: number;
|
|
2002
|
+
elapsedMs: number;
|
|
2003
|
+
}
|
|
2004
|
+
declare class ExecutionMeter {
|
|
2005
|
+
private dbWrites;
|
|
2006
|
+
private dbReads;
|
|
2007
|
+
private externalCalls;
|
|
2008
|
+
private startTime;
|
|
2009
|
+
private contract;
|
|
2010
|
+
constructor(contract: any);
|
|
2011
|
+
recordDbWrite(): void;
|
|
2012
|
+
recordDbRead(): void;
|
|
2013
|
+
recordExternalCall(): void;
|
|
2014
|
+
checkTime(): void;
|
|
2015
|
+
validateEffect(effect: string): void;
|
|
2016
|
+
getMetrics(): ExecutionMetrics;
|
|
2017
|
+
getContract(): any;
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
type Axis1DecodedFrame = {
|
|
2021
|
+
ver: number;
|
|
2022
|
+
flags: number;
|
|
2023
|
+
hdr: Buffer;
|
|
2024
|
+
body: Buffer;
|
|
2025
|
+
sig: Buffer;
|
|
2026
|
+
frameSize: number;
|
|
2027
|
+
};
|
|
2028
|
+
declare function decodeAxis1Frame(buf: Buffer): Axis1DecodedFrame;
|
|
2029
|
+
|
|
2030
|
+
declare const T: {
|
|
2031
|
+
INTENT: number;
|
|
2032
|
+
PID: number;
|
|
2033
|
+
INTENT_VERSION: number;
|
|
2034
|
+
ACTOR_ID: number;
|
|
2035
|
+
CAPSULE_ID: number;
|
|
2036
|
+
NONCE: number;
|
|
2037
|
+
TS_MS: number;
|
|
2038
|
+
PROOF_TYPE: number;
|
|
2039
|
+
BODY: number;
|
|
2040
|
+
JSON: number;
|
|
2041
|
+
};
|
|
2042
|
+
type AxisPacket = {
|
|
2043
|
+
intent: string;
|
|
2044
|
+
intentVersion: number;
|
|
2045
|
+
actorId: string;
|
|
2046
|
+
capsuleId?: Buffer;
|
|
2047
|
+
pid: Buffer;
|
|
2048
|
+
nonce: Buffer;
|
|
2049
|
+
tsMs: bigint;
|
|
2050
|
+
headersMap: Map<number, Buffer[]>;
|
|
2051
|
+
bodyMap: Map<number, Buffer[]>;
|
|
2052
|
+
hdrBytes: Buffer;
|
|
2053
|
+
bodyBytes: Buffer;
|
|
2054
|
+
sig: Buffer;
|
|
2055
|
+
};
|
|
2056
|
+
declare function buildPacket(hdr: Buffer, body: Buffer, sig: Buffer, flags?: number): AxisPacket;
|
|
2057
|
+
|
|
2058
|
+
interface AxisHandler {
|
|
2059
|
+
readonly name: string;
|
|
2060
|
+
readonly open?: boolean;
|
|
2061
|
+
readonly description?: string;
|
|
2062
|
+
readonly execute?: (body: Uint8Array, headers?: Map<number, Uint8Array>) => Promise<Uint8Array | any>;
|
|
2063
|
+
}
|
|
2064
|
+
interface AxisHandlerInit extends AxisHandler {
|
|
2065
|
+
onModuleInit?(): void | Promise<void>;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
interface AxisCrudHandler extends AxisHandlerInit {
|
|
2069
|
+
create(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
2070
|
+
findAll(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
2071
|
+
findOne(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
2072
|
+
update(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
2073
|
+
remove(body: Uint8Array | AxisTlvDto, headers?: Map<number, Uint8Array>): Promise<Uint8Array>;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
declare function hasScope(scopes: string[], required: string): boolean;
|
|
2077
|
+
declare function parseScope(scope: string): {
|
|
2078
|
+
resource: string;
|
|
2079
|
+
id: string;
|
|
2080
|
+
} | null;
|
|
2081
|
+
declare function canAccessResource(scopes: string[], resourceType: string, resourceId: string): boolean;
|
|
2082
|
+
|
|
2083
|
+
declare const CAPABILITIES: {
|
|
2084
|
+
readonly read: "read";
|
|
2085
|
+
readonly write: "write";
|
|
2086
|
+
readonly execute: "execute";
|
|
2087
|
+
readonly admin: "admin";
|
|
2088
|
+
readonly sign: "sign";
|
|
2089
|
+
readonly witness: "witness";
|
|
2090
|
+
};
|
|
2091
|
+
type Capability = keyof typeof CAPABILITIES;
|
|
2092
|
+
declare const PROOF_CAPABILITIES: Record<number, Capability[]>;
|
|
2093
|
+
declare const INTENT_REQUIREMENTS: Record<string, Capability[]>;
|
|
2094
|
+
|
|
2095
|
+
interface RiskSignal {
|
|
2096
|
+
type: string;
|
|
2097
|
+
severity: 'low' | 'medium' | 'high' | 'critical';
|
|
2098
|
+
value: any;
|
|
2099
|
+
message: string;
|
|
2100
|
+
}
|
|
2101
|
+
declare enum RiskDecision {
|
|
2102
|
+
ALLOW = "ALLOW",
|
|
2103
|
+
THROTTLE = "THROTTLE",
|
|
2104
|
+
STEP_UP = "STEP_UP",
|
|
2105
|
+
WITNESS = "WITNESS",
|
|
2106
|
+
DENY = "DENY"
|
|
2107
|
+
}
|
|
2108
|
+
interface RiskEvaluation {
|
|
2109
|
+
decision: RiskDecision;
|
|
2110
|
+
reason?: string;
|
|
2111
|
+
retryAfterMs?: number;
|
|
2112
|
+
confidence: number;
|
|
2113
|
+
signals: RiskSignal[];
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
declare const AXIS_OPCODES: Set<string>;
|
|
2117
|
+
declare function isKnownOpcode(op: string): boolean;
|
|
2118
|
+
declare function isAdminOpcode(op: string): boolean;
|
|
2119
|
+
|
|
2120
|
+
type ReceiptEffect = 'ALLOW' | 'DENY' | 'ERROR';
|
|
2121
|
+
declare function buildReceiptHash(prevHash: Buffer | null, pid: Buffer, actorId: string, intent: string, effect: ReceiptEffect, ts: bigint): Buffer;
|
|
2122
|
+
|
|
2123
|
+
declare enum IntentSensitivity {
|
|
2124
|
+
LOW = 1,
|
|
2125
|
+
MEDIUM = 2,
|
|
2126
|
+
HIGH = 3,
|
|
2127
|
+
CRITICAL = 4
|
|
2128
|
+
}
|
|
2129
|
+
declare const INTENT_SENSITIVITY_MAP: Record<string, IntentSensitivity>;
|
|
2130
|
+
declare function classifyIntent(intent: string): IntentSensitivity;
|
|
2131
|
+
declare function sensitivityName(level: IntentSensitivity): string;
|
|
2132
|
+
|
|
2133
|
+
declare const INTENT_TIMEOUTS: Record<string, number>;
|
|
2134
|
+
declare const DEFAULT_TIMEOUT = 10000;
|
|
2135
|
+
declare function resolveTimeout(intent: string): number;
|
|
2136
|
+
|
|
2137
|
+
interface IntentDefinition {
|
|
2138
|
+
intent: string;
|
|
2139
|
+
description: string;
|
|
2140
|
+
sensitivity: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
2141
|
+
requiredProof: string[];
|
|
2142
|
+
contract: {
|
|
2143
|
+
maxDbWrites: number;
|
|
2144
|
+
maxTimeMs: number;
|
|
2145
|
+
};
|
|
2146
|
+
examples?: string[];
|
|
2147
|
+
deprecated?: boolean;
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
declare function validateFrameShape(frame: any): boolean;
|
|
2151
|
+
declare function isTimestampValid(ts: number, skewSeconds?: number): boolean;
|
|
2152
|
+
|
|
2153
|
+
type UploadSessionStatus = 'ACTIVE' | 'FINALIZING' | 'COMPLETE' | 'ABORTED';
|
|
2154
|
+
interface UploadSessionRecord {
|
|
2155
|
+
id?: string;
|
|
2156
|
+
fileId: string;
|
|
2157
|
+
filename?: string;
|
|
2158
|
+
status: UploadSessionStatus | string;
|
|
2159
|
+
totalSize?: number;
|
|
2160
|
+
chunkSize?: number;
|
|
2161
|
+
totalChunks?: number;
|
|
2162
|
+
receivedBitmap?: Uint8Array | Buffer | null;
|
|
2163
|
+
hashState?: Uint8Array | Buffer | null;
|
|
2164
|
+
mimeType?: string | null;
|
|
2165
|
+
version?: number;
|
|
2166
|
+
}
|
|
2167
|
+
interface UploadSessionStore {
|
|
2168
|
+
findByFileId(fileId: string): Promise<UploadSessionRecord | null>;
|
|
2169
|
+
updateStatus(fileId: string, status: UploadSessionStatus, hashState?: Uint8Array | Buffer | null): Promise<void>;
|
|
2170
|
+
}
|
|
2171
|
+
interface UploadReceiptSigner {
|
|
2172
|
+
signActive(message: Uint8Array): {
|
|
2173
|
+
kid: string;
|
|
2174
|
+
sig: Uint8Array;
|
|
2175
|
+
};
|
|
2176
|
+
}
|
|
2177
|
+
interface UploadFileStat {
|
|
2178
|
+
path: string;
|
|
2179
|
+
size: number;
|
|
2180
|
+
}
|
|
2181
|
+
interface UploadFileStore {
|
|
2182
|
+
getFinalPath(fileId: string, filename?: string): string;
|
|
2183
|
+
getTempPath(fileId: string): string;
|
|
2184
|
+
statFinal(fileId: string, filename?: string): Promise<UploadFileStat>;
|
|
2185
|
+
readFinalRange(fileId: string, filename: string | undefined, start: number, length: number): Promise<Buffer>;
|
|
2186
|
+
hasTemp(fileId: string): Promise<boolean>;
|
|
2187
|
+
moveTempToFinal(fileId: string, filename?: string): Promise<string>;
|
|
2188
|
+
createTempReadStream(fileId: string): NodeJS.ReadableStream;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
declare class AxisFilesDownloadHandler implements AxisHandler {
|
|
2192
|
+
private readonly sessions;
|
|
2193
|
+
private readonly files;
|
|
2194
|
+
private readonly logger;
|
|
2195
|
+
readonly name = "axis.files.download";
|
|
2196
|
+
readonly open = true;
|
|
2197
|
+
readonly description = "File download handler";
|
|
2198
|
+
constructor(sessions: UploadSessionStore, files: UploadFileStore);
|
|
2199
|
+
execute(body: Uint8Array, headers?: Map<number, Uint8Array>): Promise<any>;
|
|
2200
|
+
}
|
|
2201
|
+
declare class AxisFilesFinalizeHandler implements AxisHandler {
|
|
2202
|
+
private readonly sessions;
|
|
2203
|
+
private readonly files;
|
|
2204
|
+
private readonly keyring?;
|
|
2205
|
+
private readonly logger;
|
|
2206
|
+
readonly name = "axis.files.finalize";
|
|
2207
|
+
readonly open = false;
|
|
2208
|
+
readonly description = "File upload finalization handler";
|
|
2209
|
+
constructor(sessions: UploadSessionStore, files: UploadFileStore, keyring?: UploadReceiptSigner | undefined);
|
|
2210
|
+
execute(body: Uint8Array, headers?: Map<number, Uint8Array>): Promise<any>;
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
declare const AXIS_UPLOAD_SESSION_STORE = "AXIS_UPLOAD_SESSION_STORE";
|
|
2214
|
+
declare const AXIS_UPLOAD_FILE_STORE = "AXIS_UPLOAD_FILE_STORE";
|
|
2215
|
+
declare const AXIS_UPLOAD_RECEIPT_SIGNER = "AXIS_UPLOAD_RECEIPT_SIGNER";
|
|
2216
|
+
|
|
2217
|
+
interface DiskUploadFileStoreOptions {
|
|
2218
|
+
uploadDir: string;
|
|
2219
|
+
chunkDir: string;
|
|
2220
|
+
}
|
|
2221
|
+
declare class DiskUploadFileStore implements UploadFileStore {
|
|
2222
|
+
private readonly uploadDir;
|
|
2223
|
+
private readonly chunkDir;
|
|
2224
|
+
constructor(options: DiskUploadFileStoreOptions);
|
|
2225
|
+
getFinalPath(fileId: string, filename?: string): string;
|
|
2226
|
+
getTempPath(fileId: string): string;
|
|
2227
|
+
statFinal(fileId: string, filename?: string): Promise<UploadFileStat>;
|
|
2228
|
+
readFinalRange(fileId: string, filename: string | undefined, start: number, length: number): Promise<Buffer>;
|
|
2229
|
+
hasTemp(fileId: string): Promise<boolean>;
|
|
2230
|
+
moveTempToFinal(fileId: string, filename?: string): Promise<string>;
|
|
2231
|
+
createTempReadStream(fileId: string): NodeJS.ReadableStream;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
interface AxisRequestData {
|
|
2235
|
+
raw: Buffer;
|
|
2236
|
+
ip: string | undefined;
|
|
2237
|
+
preDecodeInput: any;
|
|
2238
|
+
frameBytesCount: number;
|
|
2239
|
+
}
|
|
2240
|
+
declare const AxisRaw: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
2241
|
+
declare const AxisIp: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
2242
|
+
declare const AxisContext: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
2243
|
+
declare const AxisDemoPubkey: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
2244
|
+
declare const AxisFrame: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
2245
|
+
|
|
2246
|
+
declare class ObserverDiscoveryService implements OnApplicationBootstrap {
|
|
2247
|
+
private readonly discovery;
|
|
2248
|
+
private readonly reflector;
|
|
2249
|
+
private readonly registry;
|
|
2250
|
+
private readonly logger;
|
|
2251
|
+
constructor(discovery: DiscoveryService, reflector: Reflector, registry: ObserverRegistry);
|
|
2252
|
+
onApplicationBootstrap(): void;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
declare class HandlerDiscoveryService implements OnModuleInit {
|
|
2256
|
+
private readonly discovery;
|
|
2257
|
+
private readonly scanner;
|
|
2258
|
+
private readonly router;
|
|
2259
|
+
private readonly logger;
|
|
2260
|
+
constructor(discovery: DiscoveryService, scanner: MetadataScanner, router: IntentRouter);
|
|
2261
|
+
onModuleInit(): void;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
declare class SensorRegistry {
|
|
2265
|
+
private readonly configService;
|
|
2266
|
+
private sensors;
|
|
2267
|
+
private readonly logger;
|
|
2268
|
+
constructor(configService: ConfigService);
|
|
2269
|
+
register(sensor: AxisSensor): void;
|
|
2270
|
+
list(): AxisSensor[];
|
|
2271
|
+
getPreDecodeSensors(): AxisPreSensor[];
|
|
2272
|
+
getPostDecodeSensors(): AxisPostSensor[];
|
|
2273
|
+
private isPreDecodeSensor;
|
|
2274
|
+
private isPostDecodeSensor;
|
|
2275
|
+
getSensorCountByPhase(): {
|
|
2276
|
+
preDecodeCount: number;
|
|
2277
|
+
postDecodeCount: number;
|
|
2278
|
+
};
|
|
2279
|
+
clear(): void;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
declare class SensorDiscoveryService implements OnApplicationBootstrap {
|
|
2283
|
+
private readonly discovery;
|
|
2284
|
+
private readonly reflector;
|
|
2285
|
+
private readonly registry;
|
|
2286
|
+
private readonly logger;
|
|
2287
|
+
constructor(discovery: DiscoveryService, reflector: Reflector, registry: SensorRegistry);
|
|
2288
|
+
onApplicationBootstrap(): void;
|
|
2289
|
+
}
|
|
2257
2290
|
|
|
2258
2291
|
interface AxisDecoded {
|
|
2259
2292
|
frame: Axis1DecodedFrame;
|
|
2260
2293
|
packet: AxisPacket;
|
|
2261
|
-
axisCtx: AxisContext;
|
|
2294
|
+
axisCtx: AxisContext$1;
|
|
2262
2295
|
correlationId: Buffer;
|
|
2263
2296
|
correlationIdHex: string;
|
|
2264
2297
|
sensorInput: SensorInput;
|
|
@@ -2740,16 +2773,11 @@ declare namespace index$8 {
|
|
|
2740
2773
|
export { type index$8_ActorKeyRecord as ActorKeyRecord, type AxisAlg$1 as AxisAlg, type index$8_AxisCapsule as AxisCapsule, type index$8_AxisCapsuleConstraints as AxisCapsuleConstraints, type index$8_AxisCapsulePayload as AxisCapsulePayload, type AxisPacket$1 as AxisPacket, type AxisResponse$1 as AxisResponse, type AxisSig$1 as AxisSig, type index$8_CapsuleBatchBody as CapsuleBatchBody, type index$8_CapsuleBatchResult as CapsuleBatchResult, type index$8_CapsuleIssueBody as CapsuleIssueBody, type index$8_CapsuleIssueResult as CapsuleIssueResult, type index$8_CapsuleMode as CapsuleMode, type index$8_CapsuleRecord as CapsuleRecord, type index$8_CapsuleRevokeBody as CapsuleRevokeBody, type index$8_CapsuleStatus as CapsuleStatus, type index$8_DeviceSEContext as DeviceSEContext, type index$8_IntentExecBody as IntentExecBody, type index$8_IssuerKeyRecord as IssuerKeyRecord, type index$8_KeyStatus as KeyStatus, type index$8_MTLSContext as MTLSContext, type index$8_ProofType as ProofType, type index$8_ProofVerificationResult as ProofVerificationResult, index$8_ProofVerificationService as ProofVerificationService, type index$8_TickWindow as TickWindow, index$8_b64urlDecode as b64urlDecode, index$8_b64urlDecodeString as b64urlDecodeString, index$8_b64urlEncode as b64urlEncode, index$8_b64urlEncodeString as b64urlEncodeString, index$8_canonicalJson as canonicalJson, index$8_canonicalJsonExcluding as canonicalJsonExcluding };
|
|
2741
2774
|
}
|
|
2742
2775
|
|
|
2743
|
-
declare const
|
|
2744
|
-
declare const
|
|
2745
|
-
declare const
|
|
2746
|
-
|
|
2747
|
-
declare
|
|
2748
|
-
declare function Contract(options: Partial<ExecutionContract>): ClassDecorator & MethodDecorator;
|
|
2749
|
-
declare function RequiredProof(proofs: [RequiredProofKind, ...RequiredProofKind[]]): ClassDecorator & MethodDecorator;
|
|
2750
|
-
declare function Capsule(): ClassDecorator & MethodDecorator;
|
|
2751
|
-
declare function Witness(): ClassDecorator & MethodDecorator;
|
|
2752
|
-
|
|
2776
|
+
declare const index$7_AXIS_ANONYMOUS_KEY: typeof AXIS_ANONYMOUS_KEY;
|
|
2777
|
+
declare const index$7_AXIS_PUBLIC_KEY: typeof AXIS_PUBLIC_KEY;
|
|
2778
|
+
declare const index$7_AXIS_RATE_LIMIT_KEY: typeof AXIS_RATE_LIMIT_KEY;
|
|
2779
|
+
declare const index$7_AxisAnonymous: typeof AxisAnonymous;
|
|
2780
|
+
declare const index$7_AxisContext: typeof AxisContext;
|
|
2753
2781
|
declare const index$7_AxisDemoPubkey: typeof AxisDemoPubkey;
|
|
2754
2782
|
declare const index$7_AxisFrame: typeof AxisFrame;
|
|
2755
2783
|
declare const index$7_AxisIp: typeof AxisIp;
|
|
@@ -2757,6 +2785,9 @@ type index$7_AxisObserverBinding = AxisObserverBinding;
|
|
|
2757
2785
|
type index$7_AxisObserverBindingOptions = AxisObserverBindingOptions;
|
|
2758
2786
|
type index$7_AxisObserverDefinition = AxisObserverDefinition;
|
|
2759
2787
|
type index$7_AxisObserverRef = AxisObserverRef;
|
|
2788
|
+
declare const index$7_AxisPublic: typeof AxisPublic;
|
|
2789
|
+
declare const index$7_AxisRateLimit: typeof AxisRateLimit;
|
|
2790
|
+
type index$7_AxisRateLimitConfig = AxisRateLimitConfig;
|
|
2760
2791
|
declare const index$7_AxisRaw: typeof AxisRaw;
|
|
2761
2792
|
type index$7_AxisRequestData = AxisRequestData;
|
|
2762
2793
|
declare const index$7_CAPSULE_POLICY_METADATA_KEY: typeof CAPSULE_POLICY_METADATA_KEY;
|
|
@@ -2813,7 +2844,7 @@ declare const index$7_extractDtoSchema: typeof extractDtoSchema;
|
|
|
2813
2844
|
declare const index$7_mergeCapsulePolicyOptions: typeof mergeCapsulePolicyOptions;
|
|
2814
2845
|
declare const index$7_normalizeCapsulePolicyOptions: typeof normalizeCapsulePolicyOptions;
|
|
2815
2846
|
declare namespace index$7 {
|
|
2816
|
-
export {
|
|
2847
|
+
export { index$7_AXIS_ANONYMOUS_KEY as AXIS_ANONYMOUS_KEY, index$7_AXIS_PUBLIC_KEY as AXIS_PUBLIC_KEY, index$7_AXIS_RATE_LIMIT_KEY as AXIS_RATE_LIMIT_KEY, index$7_AxisAnonymous as AxisAnonymous, index$7_AxisContext as AxisContext, index$7_AxisDemoPubkey as AxisDemoPubkey, index$7_AxisFrame as AxisFrame, index$7_AxisIp as AxisIp, type index$7_AxisObserverBinding as AxisObserverBinding, type index$7_AxisObserverBindingOptions as AxisObserverBindingOptions, type index$7_AxisObserverDefinition as AxisObserverDefinition, type index$7_AxisObserverRef as AxisObserverRef, index$7_AxisPublic as AxisPublic, index$7_AxisRateLimit as AxisRateLimit, type index$7_AxisRateLimitConfig as AxisRateLimitConfig, index$7_AxisRaw as AxisRaw, type index$7_AxisRequestData as AxisRequestData, index$7_CAPSULE_POLICY_METADATA_KEY as CAPSULE_POLICY_METADATA_KEY, index$7_CHAIN_METADATA_KEY as CHAIN_METADATA_KEY, index$7_CONTRACT_METADATA_KEY as CONTRACT_METADATA_KEY, index$7_Capsule as Capsule, index$7_CapsulePolicy as CapsulePolicy, type index$7_CapsulePolicyOptions as CapsulePolicyOptions, type index$7_CapsuleScopeMode as CapsuleScopeMode, index$7_Chain as Chain, index$7_Contract as Contract, type index$7_DtoSchema as DtoSchema, index$7_HANDLER_METADATA_KEY as HANDLER_METADATA_KEY, index$7_Handler as Handler, index$7_INTENT_BODY_KEY as INTENT_BODY_KEY, index$7_INTENT_METADATA_KEY as INTENT_METADATA_KEY, index$7_INTENT_ROUTES_KEY as INTENT_ROUTES_KEY, index$7_INTENT_SENSORS_KEY as INTENT_SENSORS_KEY, index$7_Intent as Intent, index$7_IntentBody as IntentBody, type index$7_IntentKind as IntentKind, type index$7_IntentOptions as IntentOptions, type index$7_IntentRoute as IntentRoute, index$7_IntentSensors as IntentSensors, type index$7_IntentTlvField as IntentTlvField, index$7_OBSERVER_BINDINGS_KEY as OBSERVER_BINDINGS_KEY, index$7_OBSERVER_METADATA_KEY as OBSERVER_METADATA_KEY, index$7_Observer as Observer, index$7_REQUIRED_PROOF_METADATA_KEY as REQUIRED_PROOF_METADATA_KEY, index$7_RequiredProof as RequiredProof, type index$7_RequiredProofKind as RequiredProofKind, index$7_SENSITIVITY_METADATA_KEY as SENSITIVITY_METADATA_KEY, index$7_SENSOR_METADATA_KEY as SENSOR_METADATA_KEY, index$7_Sensitivity as Sensitivity, index$7_Sensor as Sensor, type index$7_SensorOptions as SensorOptions, type index$7_SensorPhase as SensorPhase, index$7_TLV_FIELDS_KEY as TLV_FIELDS_KEY, index$7_TLV_VALIDATORS_KEY as TLV_VALIDATORS_KEY, index$7_TlvEnum as TlvEnum, index$7_TlvField as TlvField, type index$7_TlvFieldKind as TlvFieldKind, type index$7_TlvFieldMeta as TlvFieldMeta, type index$7_TlvFieldOptions as TlvFieldOptions, index$7_TlvMinLen as TlvMinLen, index$7_TlvRange as TlvRange, index$7_TlvUtf8Pattern as TlvUtf8Pattern, index$7_TlvValidate as TlvValidate, type index$7_TlvValidatorFn as TlvValidatorFn, type index$7_TlvValidatorMeta as TlvValidatorMeta, index$7_Witness as Witness, index$7_buildDtoDecoder as buildDtoDecoder, index$7_extractDtoSchema as extractDtoSchema, index$7_mergeCapsulePolicyOptions as mergeCapsulePolicyOptions, index$7_normalizeCapsulePolicyOptions as normalizeCapsulePolicyOptions };
|
|
2817
2848
|
}
|
|
2818
2849
|
|
|
2819
2850
|
type index$6_ObservationQueueConfig = ObservationQueueConfig;
|
|
@@ -2869,6 +2900,7 @@ type index$5_HandlerDiscoveryService = HandlerDiscoveryService;
|
|
|
2869
2900
|
declare const index$5_HandlerDiscoveryService: typeof HandlerDiscoveryService;
|
|
2870
2901
|
type index$5_IntentRouter = IntentRouter;
|
|
2871
2902
|
declare const index$5_IntentRouter: typeof IntentRouter;
|
|
2903
|
+
type index$5_IntentSchema = IntentSchema;
|
|
2872
2904
|
type index$5_ObservationQueueConfig = ObservationQueueConfig;
|
|
2873
2905
|
type index$5_ObservationQueueMessage = ObservationQueueMessage;
|
|
2874
2906
|
type index$5_ObservationSensor = ObservationSensor;
|
|
@@ -2912,7 +2944,7 @@ declare const index$5_startStage: typeof startStage;
|
|
|
2912
2944
|
declare const index$5_verifyResponse: typeof verifyResponse;
|
|
2913
2945
|
declare const index$5_withAxisExecutionContext: typeof withAxisExecutionContext;
|
|
2914
2946
|
declare namespace index$5 {
|
|
2915
|
-
export { index$5_AXIS_EXECUTION_CONTEXT_KEY as AXIS_EXECUTION_CONTEXT_KEY, type index$5_AxisCapsuleRef as AxisCapsuleRef, type index$5_AxisChainEncryption as AxisChainEncryption, type index$5_AxisChainEnvelope as AxisChainEnvelope, type index$5_AxisChainExecutionOptions as AxisChainExecutionOptions, index$5_AxisChainExecutor as AxisChainExecutor, type index$5_AxisChainRequest as AxisChainRequest, type index$5_AxisChainResult as AxisChainResult, type index$5_AxisChainStatus as AxisChainStatus, type index$5_AxisChainStep as AxisChainStep, type index$5_AxisChainStepResult as AxisChainStepResult, type index$5_AxisChainStepStatus as AxisChainStepStatus, type index$5_AxisDecoded as AxisDecoded, type index$5_AxisEffect as AxisEffect, type index$5_AxisExecutionContext as AxisExecutionContext, type index$5_AxisExecutionMode as AxisExecutionMode, type index$5_AxisIntentEnvelope as AxisIntentEnvelope, type index$5_AxisIntentObserver as AxisIntentObserver, type index$5_AxisKeyExchangeRef as AxisKeyExchangeRef, type index$5_AxisObservation as AxisObservation, type index$5_AxisObserverContext as AxisObserverContext, type index$5_AxisObserverEvent as AxisObserverEvent, type index$5_AxisObserverRegistration as AxisObserverRegistration, index$5_BAND as BAND, type index$5_ChainOptions as ChainOptions, index$5_HandlerDiscoveryService as HandlerDiscoveryService, index$5_IntentRouter as IntentRouter, type
|
|
2947
|
+
export { index$5_AXIS_EXECUTION_CONTEXT_KEY as AXIS_EXECUTION_CONTEXT_KEY, type index$5_AxisCapsuleRef as AxisCapsuleRef, type index$5_AxisChainEncryption as AxisChainEncryption, type index$5_AxisChainEnvelope as AxisChainEnvelope, type index$5_AxisChainExecutionOptions as AxisChainExecutionOptions, index$5_AxisChainExecutor as AxisChainExecutor, type index$5_AxisChainRequest as AxisChainRequest, type index$5_AxisChainResult as AxisChainResult, type index$5_AxisChainStatus as AxisChainStatus, type index$5_AxisChainStep as AxisChainStep, type index$5_AxisChainStepResult as AxisChainStepResult, type index$5_AxisChainStepStatus as AxisChainStepStatus, type index$5_AxisDecoded as AxisDecoded, type index$5_AxisEffect as AxisEffect, type index$5_AxisExecutionContext as AxisExecutionContext, type index$5_AxisExecutionMode as AxisExecutionMode, type index$5_AxisIntentEnvelope as AxisIntentEnvelope, type index$5_AxisIntentObserver as AxisIntentObserver, type index$5_AxisKeyExchangeRef as AxisKeyExchangeRef, type index$5_AxisObservation as AxisObservation, type index$5_AxisObserverContext as AxisObserverContext, type index$5_AxisObserverEvent as AxisObserverEvent, type index$5_AxisObserverRegistration as AxisObserverRegistration, index$5_BAND as BAND, type index$5_ChainOptions as ChainOptions, index$5_HandlerDiscoveryService as HandlerDiscoveryService, index$5_IntentRouter as IntentRouter, type index$5_IntentSchema as IntentSchema, type index$5_ObservationQueueConfig as ObservationQueueConfig, type index$5_ObservationQueueMessage as ObservationQueueMessage, type index$5_ObservationSensor as ObservationSensor, type index$5_ObservationStage as ObservationStage, type index$5_ObservationStreamEntry as ObservationStreamEntry, type index$5_ObservationWitnessSummary as ObservationWitnessSummary, index$5_ObserverDiscoveryService as ObserverDiscoveryService, index$5_ObserverDispatcherService as ObserverDispatcherService, index$5_ObserverRegistry as ObserverRegistry, type index$5_ObserverVerdict as ObserverVerdict, index$5_PRE_DECODE_BOUNDARY as PRE_DECODE_BOUNDARY, type index$5_RegisteredChainConfig as RegisteredChainConfig, type index$5_ResponseContract as ResponseContract, index$5_ResponseObserver as ResponseObserver, type index$5_ResponseObserverContext as ResponseObserverContext, type index$5_SensorBand as SensorBand, index$5_SensorDiscoveryService as SensorDiscoveryService, index$5_SensorRegistry as SensorRegistry, type index$5_UnsignedObservationWitness as UnsignedObservationWitness, index$5_buildQueueMessage as buildQueueMessage, index$5_buildUnsignedWitness as buildUnsignedWitness, index$5_canonicalizeObservation as canonicalizeObservation, index$5_createObservation as createObservation, index$5_decodeQueueMessage as decodeQueueMessage, index$5_encodeQueueMessage as encodeQueueMessage, index$5_endStage as endStage, index$5_finalizeObservation as finalizeObservation, index$5_getAxisExecutionContext as getAxisExecutionContext, index$5_hashObservation as hashObservation, index$5_mergeAxisExecutionContext as mergeAxisExecutionContext, index$6 as observation, index$5_parseAutoClaimEntries as parseAutoClaimEntries, index$5_parseStreamEntries as parseStreamEntries, index$5_recordSensor as recordSensor, index$5_stableJsonStringify as stableJsonStringify, index$5_startStage as startStage, index$5_verifyResponse as verifyResponse, index$5_withAxisExecutionContext as withAxisExecutionContext };
|
|
2916
2948
|
}
|
|
2917
2949
|
|
|
2918
2950
|
type index$4_Grant = Grant;
|
|
@@ -2968,7 +3000,6 @@ declare class BodyProfileValidator {
|
|
|
2968
3000
|
|
|
2969
3001
|
type index$3_AccessProfile = AccessProfile;
|
|
2970
3002
|
declare const index$3_AccessProfileZ: typeof AccessProfileZ;
|
|
2971
|
-
type index$3_AxisContext = AxisContext;
|
|
2972
3003
|
declare const index$3_AxisContextZ: typeof AxisContextZ;
|
|
2973
3004
|
type index$3_AxisError = AxisError;
|
|
2974
3005
|
declare const index$3_AxisErrorZ: typeof AxisErrorZ;
|
|
@@ -3010,7 +3041,6 @@ declare const index$3_IntentPolicyDecisionZ: typeof IntentPolicyDecisionZ;
|
|
|
3010
3041
|
type index$3_IntentPolicySensorInput = IntentPolicySensorInput;
|
|
3011
3042
|
declare const index$3_IntentPolicySensorInputZ: typeof IntentPolicySensorInputZ;
|
|
3012
3043
|
declare const index$3_IntentPolicyZ: typeof IntentPolicyZ;
|
|
3013
|
-
type index$3_IntentSchema = IntentSchema;
|
|
3014
3044
|
declare const index$3_IntentSchemaZ: typeof IntentSchemaZ;
|
|
3015
3045
|
type index$3_Passport = Passport;
|
|
3016
3046
|
declare const index$3_PassportZ: typeof PassportZ;
|
|
@@ -3053,7 +3083,7 @@ declare const index$3_WsHandshakeDecisionZ: typeof WsHandshakeDecisionZ;
|
|
|
3053
3083
|
type index$3_WsHandshakeInput = WsHandshakeInput;
|
|
3054
3084
|
declare const index$3_WsHandshakeInputZ: typeof WsHandshakeInputZ;
|
|
3055
3085
|
declare namespace index$3 {
|
|
3056
|
-
export { type index$3_AccessProfile as AccessProfile, index$3_AccessProfileZ as AccessProfileZ, type
|
|
3086
|
+
export { type index$3_AccessProfile as AccessProfile, index$3_AccessProfileZ as AccessProfileZ, type AxisContext$1 as AxisContext, index$3_AxisContextZ as AxisContextZ, type index$3_AxisError as AxisError, index$3_AxisErrorZ as AxisErrorZ, type index$3_BodyBudgetInput as BodyBudgetInput, index$3_BodyBudgetInputZ as BodyBudgetInputZ, type index$3_BodyBudgetPolicy as BodyBudgetPolicy, index$3_BodyBudgetPolicyZ as BodyBudgetPolicyZ, index$3_BodyProfile as BodyProfile, type index$3_BodyProfileValidation as BodyProfileValidation, index$3_BodyProfileValidator as BodyProfileValidator, index$3_BodyProfileZ as BodyProfileZ, type Capsule$1 as Capsule, type index$3_CapsuleClaims as CapsuleClaims, index$3_CapsuleClaimsZ as CapsuleClaimsZ, type index$3_CapsuleValidationResult as CapsuleValidationResult, index$3_CapsuleValidationResultZ as CapsuleValidationResultZ, type index$3_CapsuleVerifyResult as CapsuleVerifyResult, index$3_CapsuleVerifyResultZ as CapsuleVerifyResultZ, type index$3_CapsuleVerifySensorInput as CapsuleVerifySensorInput, index$3_CapsuleVerifySensorInputZ as CapsuleVerifySensorInputZ, index$3_CapsuleZ as CapsuleZ, type index$3_ChunkHashInput as ChunkHashInput, index$3_ChunkHashInputZ as ChunkHashInputZ, type index$3_CountryBlockDecision as CountryBlockDecision, index$3_CountryBlockDecisionZ as CountryBlockDecisionZ, type index$3_CountryBlockSensorInput as CountryBlockSensorInput, index$3_CountryBlockSensorInputZ as CountryBlockSensorInputZ, type index$3_EntropySensorInput as EntropySensorInput, index$3_EntropySensorInputZ as EntropySensorInputZ, index$3_ExecutionMetricsZ as ExecutionMetricsZ, type index$3_IPReputation as IPReputation, type index$3_IPReputationInput as IPReputationInput, index$3_IPReputationInputZ as IPReputationInputZ, index$3_IPReputationZ as IPReputationZ, type index$3_IntentPolicy as IntentPolicy, type index$3_IntentPolicyDecision as IntentPolicyDecision, index$3_IntentPolicyDecisionZ as IntentPolicyDecisionZ, type index$3_IntentPolicySensorInput as IntentPolicySensorInput, index$3_IntentPolicySensorInputZ as IntentPolicySensorInputZ, index$3_IntentPolicyZ as IntentPolicyZ, type IntentSchema$1 as IntentSchema, index$3_IntentSchemaZ as IntentSchemaZ, type index$3_Passport as Passport, index$3_PassportZ as PassportZ, type index$3_ProofKind as ProofKind, index$3_ProofKindZ as ProofKindZ, type index$3_ProofPresenceInput as ProofPresenceInput, index$3_ProofPresenceInputZ as ProofPresenceInputZ, ProofType$1 as ProofType, type index$3_ProtocolStrictInput as ProtocolStrictInput, index$3_ProtocolStrictInputZ as ProtocolStrictInputZ, type index$3_RateLimitConfig as RateLimitConfig, index$3_RateLimitConfigZ as RateLimitConfigZ, type index$3_RateLimitInput as RateLimitInput, index$3_RateLimitInputZ as RateLimitInputZ, type index$3_RateLimitProfile as RateLimitProfile, index$3_RateLimitProfileZ as RateLimitProfileZ, type index$3_ScanBurstDecision as ScanBurstDecision, index$3_ScanBurstDecisionZ as ScanBurstDecisionZ, type index$3_ScanBurstSensorInput as ScanBurstSensorInput, index$3_ScanBurstSensorInputZ as ScanBurstSensorInputZ, type index$3_SchemaField as SchemaField, type index$3_SchemaFieldKind as SchemaFieldKind, index$3_SchemaFieldKindZ as SchemaFieldKindZ, index$3_SchemaFieldZ as SchemaFieldZ, type index$3_Scope as Scope, index$3_ScopeZ as ScopeZ, type index$3_SensitivityLevel as SensitivityLevel, index$3_SensitivityLevelZ as SensitivityLevelZ, type index$3_SensorChainInput as SensorChainInput, index$3_SensorChainInputZ as SensorChainInputZ, index$3_SensorDecisionWithMetadataZ as SensorDecisionWithMetadataZ, index$3_SensorDecisionZ as SensorDecisionZ, type index$3_SensorResult as SensorResult, index$3_SensorResultZ as SensorResultZ, type index$3_UploadSession as UploadSession, index$3_UploadSessionZ as UploadSessionZ, type index$3_UploadStatus as UploadStatus, index$3_UploadStatusZ as UploadStatusZ, type index$3_WsHandshakeDecision as WsHandshakeDecision, index$3_WsHandshakeDecisionZ as WsHandshakeDecisionZ, type index$3_WsHandshakeInput as WsHandshakeInput, index$3_WsHandshakeInputZ as WsHandshakeInputZ };
|
|
3057
3087
|
}
|
|
3058
3088
|
|
|
3059
3089
|
type index$2_AxisSensorChainService = AxisSensorChainService;
|
|
@@ -3287,4 +3317,4 @@ declare namespace index {
|
|
|
3287
3317
|
export { index_encodeAxisTlvDto as encodeAxisTlvDto };
|
|
3288
3318
|
}
|
|
3289
3319
|
|
|
3290
|
-
export { ATS1_HDR, ATS1_SCHEMA, AXIS_EXECUTION_CONTEXT_KEY, AXIS_OPCODES, AXIS_UPLOAD_FILE_STORE, AXIS_UPLOAD_RECEIPT_SIGNER, AXIS_UPLOAD_SESSION_STORE, ats1 as Ats1Codec, type Axis1DecodedFrame, type Axis1FrameToEncode, type AxisAlg$1 as AxisAlg, type AxisPacket as AxisBinaryPacket, type AxisCapsule, type AxisCapsuleConstraints, type AxisCapsulePayload, type AxisCapsuleRef, type AxisChainEncryption, type AxisChainEnvelope, AxisChainExecutor, type AxisChainRequest, type AxisChainResult, type AxisChainStatus, type AxisChainStep, type AxisChainStepResult, type AxisChainStepStatus, AxisContext
|
|
3320
|
+
export { ATS1_HDR, ATS1_SCHEMA, AXIS_EXECUTION_CONTEXT_KEY, AXIS_OPCODES, AXIS_UPLOAD_FILE_STORE, AXIS_UPLOAD_RECEIPT_SIGNER, AXIS_UPLOAD_SESSION_STORE, ats1 as Ats1Codec, type Axis1DecodedFrame, type Axis1FrameToEncode, type AxisAlg$1 as AxisAlg, type AxisPacket as AxisBinaryPacket, type AxisCapsule, type AxisCapsuleConstraints, type AxisCapsulePayload, type AxisCapsuleRef, type AxisChainEncryption, type AxisChainEnvelope, AxisChainExecutor, type AxisChainRequest, type AxisChainResult, type AxisChainStatus, type AxisChainStep, type AxisChainStepResult, type AxisChainStepStatus, AxisContext, type AxisCrudHandler, type AxisDecoded, AxisDemoPubkey, type AxisEffect, type AxisExecutionContext, type AxisExecutionMode, AxisFilesDownloadHandler, AxisFilesFinalizeHandler, AxisFrame$2 as AxisFrame, type AxisHandler, type AxisHandlerInit, AxisIdDto, type AxisIntentEnvelope, type AxisIntentObserver, AxisIp, type AxisAlg as AxisJsonAlg, type AxisFrame$1 as AxisJsonFrame, type AxisResponse as AxisJsonResponse, type AxisSig as AxisJsonSig, type AxisKeyExchangeRef, type AxisObservation, type AxisObservedContext, type AxisObserverBinding, type AxisObserverBindingOptions, type AxisObserverContext, type AxisObserverDefinition, type AxisObserverEvent, type AxisObserverRef, type AxisObserverRegistration, type AxisPacket$1 as AxisPacket, T as AxisPacketTags, AxisPartialType, type AxisPostSensor, type AxisPreSensor, AxisRaw, type AxisRequestContext, type AxisRequestData, AxisResponseDto, type AxisSensor, AxisSensorChainService, type AxisSensorInit, type AxisSig$1 as AxisSig, AxisTlvDto, BAND, CAPABILITIES, CAPSULE_POLICY_METADATA_KEY, CCE_ERROR, CCE_PROTOCOL_VERSION, CHAIN_METADATA_KEY, type Capability, type CapsuleMode, CapsulePolicy, type CapsulePolicyOptions, type CapsuleScopeMode, type CceCapsuleClaims as CceCapsuleClaimsType, CceError, type CceExecutionContext as CceExecutionContextType, type CceHandler, type CceHandlerContext, type CceHandlerResult, type CcePipelineConfig, type CcePipelineResult, type CcePolicyContext, type CcePolicyDecision, type CcePolicyEvaluator, type CceRequestEnvelope as CceRequestEnvelopeType, type CceResponseEnvelope as CceResponseEnvelopeType, type CceWitnessRecord as CceWitnessRecordType, Chain, type ChainOptions, type ChainResult, ContractViolationError, DEFAULT_CONTRACTS, DEFAULT_TIMEOUT, Decision, DiskUploadFileStore, type DtoSchema, type ExecutionContract, ExecutionMeter, type ExecutionMetrics, FALLBACK_CONTRACT, type Grant, type GrantCapability, type GrantMeta, type GrantStatus, type GrantType, type GrantValidationResult, HANDLER_METADATA_KEY, HANDLER_SENSORS_KEY, Handler, HandlerDiscoveryService, HandlerSensors, INTENT_BODY_KEY, INTENT_METADATA_KEY, INTENT_REQUIREMENTS, INTENT_ROUTES_KEY, INTENT_SENSITIVITY_MAP, INTENT_SENSORS_KEY, INTENT_TIMEOUTS, Intent, IntentBody, type IntentDefinition, type IntentKind, type IntentOptions, type IntentRoute, IntentRouter, IntentSensitivity, IntentSensors, type IntentTlvField, type KeyStatus, type LoomReceipt, type LoomValidationResult, OBSERVER_BINDINGS_KEY, OBSERVER_METADATA_KEY, type ObservationQueueConfig, type ObservationQueueMessage, type ObservationSensor, type ObservationStage, type ObservationStreamEntry, type ObservationWitnessSummary, Observer, ObserverDiscoveryService, ObserverDispatcherService, ObserverRegistry, type ObserverVerdict, PRE_DECODE_BOUNDARY, PROOF_CAPABILITIES, type PresenceChallenge, type PresenceDeclaration, type PresenceProof, type PresenceReceipt, type PresenceStatus, type PresenceVerifyResult, RESPONSE_TAG_CREATED_AT, RESPONSE_TAG_CREATED_BY, RESPONSE_TAG_ID, RESPONSE_TAG_UPDATED_AT, RESPONSE_TAG_UPDATED_BY, type ReceiptEffect, type RegisteredChainConfig, type ResponseContract, ResponseObserver, type ResponseObserverContext, type Revocation, type RevocationTargetType, RiskDecision, type RiskEvaluation, type RiskSignal, SENSOR_METADATA_KEY, Schema2002_PasskeyLoginOptionsRes, Schema2011_PasskeyLoginVerifyReq, Schema2012_PasskeyLoginVerifyRes, Schema2021_PasskeyRegisterOptionsReq, Sensor, type SensorBand, type SensorDecision, SensorDecisions, SensorDiscoveryService, type SensorInput, type SensorMinifiedDecision, type SensorOptions, type SensorPhase, type SensorPhaseMetadata, SensorRegistry, TLV_FIELDS_KEY, TLV_VALIDATORS_KEY, type ThreadState, TlvEnum, TlvField, type TlvFieldKind, type TlvFieldMeta, type TlvFieldOptions, TlvMinLen, TlvRange, TlvUtf8Pattern, TlvValidate, type TlvValidatorFn, type TlvValidatorMeta, type UnsignedObservationWitness, type UploadFileStat, type UploadFileStore, type UploadReceiptSigner, type UploadSessionRecord, type UploadSessionStatus, type UploadSessionStore, type Writ, type WritBody, type WritHead, type WritMeta, type WritSignature, type WritValidationResult, axis1SigningBytes, b64urlDecode, b64urlDecodeString, b64urlEncode, b64urlEncodeString, buildAts1Hdr, buildDtoDecoder, buildPacket, buildQueueMessage, buildReceiptHash, buildTLVs, buildUnsignedWitness, bytes, canAccessResource, canonicalJson, canonicalJsonExcluding, canonicalizeGrant, canonicalizeObservation, canonicalizeWrit, index$9 as cce, classifyIntent, createObservation, index$8 as crypto, decodeAxis1Frame, decodeQueueMessage, index$7 as decorators, deriveAnchorReflection, encVarint, encodeAxis1Frame, encodeAxisTlvDto, encodeQueueMessage, endStage, index$5 as engine, executeCcePipeline, extractDtoSchema, finalizeObservation, getAxisExecutionContext, hasScope, hashObservation, isAdminOpcode, isKnownOpcode, isTimestampValid, index$4 as loom, mergeAxisExecutionContext, nonce16, normalizeSensorDecision, packPasskeyLoginOptionsReq, packPasskeyLoginOptionsRes, packPasskeyLoginVerifyReq, packPasskeyLoginVerifyRes, packPasskeyRegisterOptionsReq, parseAutoClaimEntries, parseScope, parseStreamEntries, recordSensor, resolveTimeout, index$3 as schemas, index$2 as security, sensitivityName, index$1 as sensors, stableJsonStringify, startStage, tlv, u64be, unpackPasskeyLoginOptionsReq, unpackPasskeyLoginVerifyReq, unpackPasskeyRegisterOptionsReq, utf8, index as utils, validateFrameShape, varintU, verifyResponse, withAxisExecutionContext };
|