buckyos 0.7.140 → 0.7.142
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/cli/core/auth.ts +2 -3
- package/cli/dist/cli.mjs +3 -4
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/version.ts +1 -1
- package/dist/account.d.ts +0 -2
- package/dist/account.d.ts.map +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.mjs +14 -15
- package/dist/{executor_client-978a8e1b.js → executor_client-b3ff97ba.js} +8 -8
- package/dist/executor_client-b3ff97ba.js.map +1 -0
- package/dist/{executor_client-d2c9e854.mjs → executor_client-eb372968.mjs} +56 -152
- package/dist/executor_client-eb372968.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +14 -15
- package/dist/namelib.d.ts +1 -10
- package/dist/namelib.d.ts.map +1 -1
- package/dist/ndn_types-08dc9ef1.js +2 -0
- package/dist/ndn_types-08dc9ef1.js.map +1 -0
- package/dist/{ndn_types-dcb74613.mjs → ndn_types-bbb1f6a6.mjs} +54 -101
- package/dist/ndn_types-bbb1f6a6.mjs.map +1 -0
- package/dist/node.cjs +1 -1
- package/dist/node.mjs +14 -15
- package/dist/provision.cjs +2 -2
- package/dist/provision.cjs.map +1 -1
- package/dist/provision.mjs +18 -12
- package/dist/provision.mjs.map +1 -1
- package/dist/provision_activate.d.ts.map +1 -1
- package/dist/runtime.d.ts +1 -4
- package/dist/runtime.d.ts.map +1 -1
- package/dist/sdk_core.d.ts.map +1 -1
- package/dist/{tus_client-a2f73d53.js → tus_client-65c5fc5e.js} +2 -2
- package/dist/{tus_client-a2f73d53.js.map → tus_client-65c5fc5e.js.map} +1 -1
- package/dist/{tus_client-8fd4d937.mjs → tus_client-d313689e.mjs} +2 -2
- package/dist/{tus_client-8fd4d937.mjs.map → tus_client-d313689e.mjs.map} +1 -1
- package/dist/types.d.ts +0 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/verify-hub-client.d.ts +1 -9
- package/dist/verify-hub-client.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/executor_client-978a8e1b.js.map +0 -1
- package/dist/executor_client-d2c9e854.mjs.map +0 -1
- package/dist/ndn_types-324121ae.js +0 -2
- package/dist/ndn_types-324121ae.js.map +0 -1
- package/dist/ndn_types-dcb74613.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./executor_client-978a8e1b.js"),t=require("./ndn_types-324121ae.js"),o=e.createSDKModule("universal"),_=o.buckyos,s=o.initBuckyOS,r=o.getBuckyOSConfig,E=o.getRuntimeType,A=o.getAppId,S=o.getAppDid,T=o.getAppInstanceId,p=o.getAppDataDir,i=o.getKEventClient,n=o.createEventReader,C=o.create_event_reader,I=o.subscribeKEvent,a=o.attachEvent,x=o.removeEvent,O=o.getAccountInfo,R=o.getCurrentIdentity,D=o.loginByPassword,N=o.loginByBrowserSSO,c=o.loginByRuntimeSession,l=o.login,M=o.logout,u=o.getAppSetting,d=o.setAppSetting,P=o.getCurrentWalletUser,g=o.resolve_did,K=o.walletSignWithActiveDid,L=o.openExternalUrl,H=o.getZoneHostName,U=o.getZoneServiceURL,k=o.getServiceRpcClient,y=o.getVerifyHubClient,m=o.getSystemConfigClient,B=o.getTaskManagerClient,F=o.getWorkflowClient,W=o.getAiccClient,f=o.getAiWorkspaceClient,v=o.getMsgQueueClient,V=o.getMsgCenterClient,w=o.getRepoClient;exports.ACCESS_DENIED_ERROR_CODE=e.ACCESS_DENIED_ERROR_CODE,exports.AGENT_DELEGATE_TASK_SCHEMA_ID=e.AGENT_DELEGATE_TASK_SCHEMA_ID,exports.AICC_AI_METHODS=e.AICC_AI_METHODS,exports.AICC_COMPUTE_TASK_SCHEMA_ID=e.AICC_COMPUTE_TASK_SCHEMA_ID,exports.AICC_CORE_METHODS=e.AICC_CORE_METHODS,exports.AICC_EXECUTION_MODES=e.AICC_EXECUTION_MODES,exports.AICC_FEATURES=e.AICC_FEATURES,exports.AICC_MANAGEMENT_METHODS=e.AICC_MANAGEMENT_METHODS,exports.AICC_METHODS=e.AICC_METHODS,exports.AICC_POLICY_REFUSAL_CODES=e.AICC_POLICY_REFUSAL_CODES,exports.AICC_QUOTA_METHODS=e.AICC_QUOTA_METHODS,exports.AICC_SERVICE_SERVICE_NAME=e.AICC_SERVICE_SERVICE_NAME,exports.AICC_SERVICE_SERVICE_PORT=e.AICC_SERVICE_SERVICE_PORT,exports.AICC_SERVICE_UNIQUE_ID=e.AICC_SERVICE_UNIQUE_ID,exports.AIWORKSPACE_SERVICE_NAME=e.AIWORKSPACE_SERVICE_NAME,exports.ANONYMOUS_IDENTITY=e.ANONYMOUS_IDENTITY,exports.APP_INSTALL_TASK_SCHEMA_ID=e.APP_INSTALL_TASK_SCHEMA_ID,exports.APP_START_TASK_SCHEMA_ID=e.APP_START_TASK_SCHEMA_ID,exports.APP_UNINSTALL_TASK_SCHEMA_ID=e.APP_UNINSTALL_TASK_SCHEMA_ID,exports.APP_UPDATE_BATCH_TASK_SCHEMA_ID=e.APP_UPDATE_BATCH_TASK_SCHEMA_ID,exports.APP_UPDATE_TASK_SCHEMA_ID=e.APP_UPDATE_TASK_SCHEMA_ID,exports.AiWorkspaceClient=e.AiWorkspaceClient,exports.AiccClient=e.AiccClient,exports.AiwsFailure=e.AiwsFailure,exports.BNS_DNS_TXT_DEFAULT_TTL=e.BNS_DNS_TXT_DEFAULT_TTL,exports.BNS_DNS_TXT_DOC_TYPE=e.BNS_DNS_TXT_DOC_TYPE,exports.BNS_EVM_DEFAULT_GAS_LIMIT=e.BNS_EVM_DEFAULT_GAS_LIMIT,exports.BNS_EVM_DEFAULT_MAX_FEE_PER_GAS=e.BNS_EVM_DEFAULT_MAX_FEE_PER_GAS,exports.BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS=e.BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS,exports.BNS_MAX_INLINE_DOCUMENT_BYTES=e.BNS_MAX_INLINE_DOCUMENT_BYTES,exports.BNS_PUBLISH_DOCUMENT_ABI=e.BNS_PUBLISH_DOCUMENT_ABI,exports.BS_SERVICE_TASK_MANAGER=e.BS_SERVICE_TASK_MANAGER,exports.BS_SERVICE_VERIFY_HUB=e.BS_SERVICE_VERIFY_HUB,exports.BnsEvmTxBuilder=e.BnsEvmTxBuilder,exports.BnsEvmTxError=e.BnsEvmTxError,exports.BnsTxExecutor=e.BnsTxExecutor,exports.BnsTxExecutorError=e.BnsTxExecutorError,exports.BuckyOSSDK=e.BuckyOSSDK,exports.CONTACT_CHANGED_EVENT_BOX=e.CONTACT_CHANGED_EVENT_BOX,exports.CONTACT_TAG_HOMESTATION_FOLLOWING=e.CONTACT_TAG_HOMESTATION_FOLLOWING,exports.CONTACT_TAG_ZONE_AGENT=e.CONTACT_TAG_ZONE_AGENT,exports.CONTACT_TAG_ZONE_USER=e.CONTACT_TAG_ZONE_USER,exports.DEFAULT_CHILD_CONTROL_POLICY=e.DEFAULT_CHILD_CONTROL_POLICY,exports.DEFAULT_JUMP_BASE_URL=e.DEFAULT_JUMP_BASE_URL,exports.DENY_REASONS=e.DENY_REASONS,exports.DOWNLOAD_TASK_SCHEMA_ID=e.DOWNLOAD_TASK_SCHEMA_ID,exports.EXTERNAL_PRINCIPAL_CLAIM=e.EXTERNAL_PRINCIPAL_CLAIM,exports.ExecutorClient=e.ExecutorClient,exports.ExecutorCommandStream=e.ExecutorCommandStream,exports.ExecutorStreamError=e.ExecutorStreamError,exports.FRIEND_INTENT=e.FRIEND_INTENT,exports.HUMAN_APPROVAL_SCHEMA_ID=e.HUMAN_APPROVAL_SCHEMA_ID,exports.HUMAN_INPUT_TASK_SCHEMA_ID=e.HUMAN_INPUT_TASK_SCHEMA_ID,exports.JUMP_ACTION_PATHS=e.JUMP_ACTION_PATHS,exports.KEventClient=e.KEventClient,exports.KEventReader=e.KEventReader,exports.MsgCenterClient=e.MsgCenterClient,exports.MsgQueueClient=e.MsgQueueClient,exports.NOTIFY_ACTION_ANSWER=e.NOTIFY_ACTION_ANSWER,exports.NOTIFY_ACTION_DISMISS=e.NOTIFY_ACTION_DISMISS,exports.NOTIFY_CHOICE_CONTROL_ID=e.NOTIFY_CHOICE_CONTROL_ID,exports.NOTIFY_DATA_VERSION=e.NOTIFY_DATA_VERSION,exports.NOTIFY_DELIVERED_INTENT=e.NOTIFY_DELIVERED_INTENT,exports.NOTIFY_INTENT=e.NOTIFY_INTENT,exports.NOTIFY_LINK_PATH=e.NOTIFY_LINK_PATH,exports.NOTIFY_SESSION_PREFIX=e.NOTIFY_SESSION_PREFIX,exports.NOTIFY_TEXT_CONTROL_ID=e.NOTIFY_TEXT_CONTROL_ID,exports.OPENDAN_ASYNC_TOOL_TASK_SCHEMA_ID=e.OPENDAN_ASYNC_TOOL_TASK_SCHEMA_ID,exports.OPENDAN_COMMAND_TASK_SCHEMA_ID=e.OPENDAN_COMMAND_TASK_SCHEMA_ID,exports.RAW_TASK_SCHEMA_ID=e.RAW_TASK_SCHEMA_ID,exports.RPCError=e.RPCError,exports.RepoClient=e.RepoClient,exports.RuntimeType=e.RuntimeType,exports.SCHEDULER_DISPATCH_THUNK_TASK_SCHEMA_ID=e.SCHEDULER_DISPATCH_THUNK_TASK_SCHEMA_ID,exports.StorageDomain=e.StorageDomain,exports.SystemConfigClient=e.SystemConfigClient,exports.TASK_ERR_ALREADY_COMPLETED=e.TASK_ERR_ALREADY_COMPLETED,exports.TASK_ERR_CONTROL_ALREADY_PENDING=e.TASK_ERR_CONTROL_ALREADY_PENDING,exports.TASK_ERR_CONTROL_NOT_AVAILABLE=e.TASK_ERR_CONTROL_NOT_AVAILABLE,exports.TASK_ERR_IDEMPOTENCY_CONFLICT=e.TASK_ERR_IDEMPOTENCY_CONFLICT,exports.TASK_ERR_INPUT_SCHEMA_MISMATCH=e.TASK_ERR_INPUT_SCHEMA_MISMATCH,exports.TASK_ERR_INVALID_PHASE=e.TASK_ERR_INVALID_PHASE,exports.TASK_ERR_NOT_FOUND=e.TASK_ERR_NOT_FOUND,exports.TASK_ERR_PERMISSION_DENIED=e.TASK_ERR_PERMISSION_DENIED,exports.TASK_ERR_RESULT_SCHEMA_MISMATCH=e.TASK_ERR_RESULT_SCHEMA_MISMATCH,exports.TASK_ERR_REVISION_CONFLICT=e.TASK_ERR_REVISION_CONFLICT,exports.TASK_ERR_SCHEMA_NOT_FOUND=e.TASK_ERR_SCHEMA_NOT_FOUND,exports.TASK_ERR_STALE_RUNNER_EPOCH=e.TASK_ERR_STALE_RUNNER_EPOCH,exports.TASK_MANAGER_SERVICE_NAME=e.TASK_MANAGER_SERVICE_NAME,exports.TASK_MANAGER_SERVICE_PORT=e.TASK_MANAGER_SERVICE_PORT,exports.TASK_MANAGER_SERVICE_UNIQUE_ID=e.TASK_MANAGER_SERVICE_UNIQUE_ID,exports.TASK_MGR_ERROR_CODES=e.TASK_MGR_ERROR_CODES,exports.TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1=e.TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1,exports.TOOL_EXEC_BASH_TASK_SCHEMA_ID=e.TOOL_EXEC_BASH_TASK_SCHEMA_ID,exports.TaskAction=e.TaskAction,exports.TaskControlAction=e.TaskControlAction,exports.TaskDataScope=e.TaskDataScope,exports.TaskEventType=e.TaskEventType,exports.TaskExecutorKind=e.TaskExecutorKind,exports.TaskGrantScope=e.TaskGrantScope,exports.TaskManagerClient=e.TaskManagerClient,exports.TaskOutcome=e.TaskOutcome,exports.TaskPhase=e.TaskPhase,exports.TaskWaitReasonKind=e.TaskWaitReasonKind,exports.USER_GROUP_REF_PREFIX=e.USER_GROUP_REF_PREFIX,exports.USER_TYPE_GROUP_REF_PREFIX=e.USER_TYPE_GROUP_REF_PREFIX,exports.VerifyHubClient=e.VerifyHubClient,exports.WEB3_BRIDGE_HOST=e.WEB3_BRIDGE_HOST,exports.WELL_KNOWN_CONTACT_TAGS=e.WELL_KNOWN_CONTACT_TAGS,exports.WORKFLOW_EXECUTE_RPC_TASK_SCHEMA_ID=e.WORKFLOW_EXECUTE_RPC_TASK_SCHEMA_ID,exports.WORKFLOW_MAP_SHARD_TASK_SCHEMA_ID=e.WORKFLOW_MAP_SHARD_TASK_SCHEMA_ID,exports.WORKFLOW_RUN_TARGET_TASK_SCHEMA_ID=e.WORKFLOW_RUN_TARGET_TASK_SCHEMA_ID,exports.WORKFLOW_RUN_TREE_TASK_SCHEMA_ID=e.WORKFLOW_RUN_TREE_TASK_SCHEMA_ID,exports.WORKFLOW_SCHEDULE_TASK_SCHEMA_ID=e.WORKFLOW_SCHEDULE_TASK_SCHEMA_ID,exports.WORKFLOW_SEND_MESSAGE_TASK_SCHEMA_ID=e.WORKFLOW_SEND_MESSAGE_TASK_SCHEMA_ID,exports.WORKFLOW_SERVICE_NAME=e.WORKFLOW_SERVICE_NAME,exports.WORKFLOW_STEP_TASK_SCHEMA_ID=e.WORKFLOW_STEP_TASK_SCHEMA_ID,exports.WORKFLOW_THUNK_TASK_SCHEMA_ID=e.WORKFLOW_THUNK_TASK_SCHEMA_ID,exports.WorkflowClient=e.WorkflowClient,exports.WorkflowDefinitionStatus=e.WorkflowDefinitionStatus,exports.WorkflowHumanActionKind=e.WorkflowHumanActionKind,exports.WorkflowJoinMode=e.WorkflowJoinMode,exports.WorkflowNodeRunState=e.WorkflowNodeRunState,exports.WorkflowOutputMode=e.WorkflowOutputMode,exports.WorkflowRetryFallback=e.WorkflowRetryFallback,exports.WorkflowRunStatus=e.WorkflowRunStatus,exports.WorkflowScheduledTaskFireStatus=e.WorkflowScheduledTaskFireStatus,exports.WorkflowScheduledTaskMisfirePolicy=e.WorkflowScheduledTaskMisfirePolicy,exports.WorkflowScheduledTaskStatus=e.WorkflowScheduledTaskStatus,exports.WorkflowStepType=e.WorkflowStepType,exports.ZONE_USER_TYPES=e.ZONE_USER_TYPES,exports.accessDenialOf=e.accessDenialOf,exports.aiccMessageFirstText=e.aiccMessageFirstText,exports.aiccMessageTextContent=e.aiccMessageTextContent,exports.aiccRefusalOf=e.aiccRefusalOf,exports.aiccTextMessage=e.aiccTextMessage,exports.answerNotify=e.answerNotify,exports.appDidFromId=e.appDidFromId,exports.appIdFromDid=e.appIdFromDid,exports.baselineTaskControlProfile=e.baselineTaskControlProfile,exports.bns=e.bns_client,exports.buildJumpUrl=e.buildJumpUrl,exports.commitNotifyAnswer=e.commitNotifyAnswer,exports.contactTagApp=e.contactTagApp,exports.contactTagKind=e.contactTagKind,exports.createAppInstanceId=e.createAppInstanceId,exports.createSDKModule=e.createSDKModule,exports.decisionRequirements=e.decisionRequirements,exports.decodeBnsPublishDocumentCalldata=e.decodeBnsPublishDocumentCalldata,exports.encodeExecutorControl=e.encodeExecutorControl,exports.getActiveRuntimeType=e.getActiveRuntimeType,exports.getActiveSessionToken=e.getActiveSessionToken,exports.getActiveZoneGatewayOrigin=e.getActiveZoneGatewayOrigin,exports.getCurrentWalletUserFromHost=e.getCurrentWalletUserFromHost,exports.identityAllows=e.identityAllows,exports.identityKey=e.identityKey,exports.inputPrompt=e.inputPrompt,exports.isAiccAiMethod=e.isAiccAiMethod,exports.isExternalPrincipal=e.isExternalPrincipal,exports.isNotifyClosed=e.isNotifyClosed,exports.isTerminalTaskPhase=e.isTerminalTaskPhase,exports.isUserGroupRefTag=e.isUserGroupRefTag,exports.mailboxAddress=e.mailboxAddress,exports.mailboxResource=e.mailboxResource,exports.msgMachineData=e.msgMachineData,exports.ndm=e.ndm_client,exports.ndm_proxy=e.ndm_proxy,exports.normalizeZoneHostname=e.normalizeZoneHostname,exports.notifyAnswerToTaskResult=e.notifyAnswerToTaskResult,exports.notifyCategoryFromSessionId=e.notifyCategoryFromSessionId,exports.notifyCategorySessionId=e.notifyCategorySessionId,exports.notifyMessageData=e.notifyMessageData,exports.notifyUrl=e.notifyUrl,exports.parseAccessDenial=e.parseAccessDenial,exports.parseAppId=e.parseAppId,exports.parseAppInstanceId=e.parseAppInstanceId,exports.parseCurrentIdentity=e.parseCurrentIdentity,exports.parseSessionTokenClaims=e.parseSessionTokenClaims,exports.parseVideoPrompt=e.parseVideoPrompt,exports.parseZoneUserType=e.parseZoneUserType,exports.promptOptions=e.promptOptions,exports.resolveDidFromHost=e.resolveDidFromHost,exports.sn=e.sn_client,exports.taskMgrErrorCode=e.taskMgrErrorCode,exports.taskMgrTaskEventPath=e.taskMgrTaskEventPath,exports.taskMgrTreeEventPath=e.taskMgrTreeEventPath,exports.validateAiccMessage=e.validateAiccMessage,exports.validateDecisionAnswers=e.validateDecisionAnswers,exports.validateDecisionRequest=e.validateDecisionRequest,exports.validateNotifyAnswer=e.validateNotifyAnswer,exports.validateVideoEdit=e.validateVideoEdit,exports.validateVideoGeneration=e.validateVideoGeneration,exports.validateVideoOutput=e.validateVideoOutput,exports.videoGenerationRequirement=e.videoGenerationRequirement,exports.waitNotify=e.waitNotify,exports.walletUserHasSnAccount=e.walletUserHasSnAccount,exports.zoneActionUrl=e.zoneActionUrl,exports.DID_OBJECT_SERVICE_ID=t.DID_OBJECT_SERVICE_ID,exports.DID_OBJECT_SERVICE_TYPE=t.DID_OBJECT_SERVICE_TYPE,exports.NODE_IDENTITY_SCHEMA_V2=t.NODE_IDENTITY_SCHEMA_V2,exports.getDidIdentifier=t.getDidIdentifier,exports.getDidMethod=t.getDidMethod,exports.hashPassword=t.hashPassword,exports.isBuckyOSAgentDocument=t.isBuckyOSAgentDocument,exports.isBuckyOSDIDObjectCard=t.isBuckyOSDIDObjectCard,exports.isBuckyOSDeviceDocument=t.isBuckyOSDeviceDocument,exports.isBuckyOSDeviceMiniDocument=t.isBuckyOSDeviceMiniDocument,exports.isBuckyOSLocalNodeIdentityConfig=t.isBuckyOSLocalNodeIdentityConfig,exports.isBuckyOSNodeIdentityConfig=t.isBuckyOSNodeIdentityConfig,exports.isBuckyOSOwnerDocument=t.isBuckyOSOwnerDocument,exports.isBuckyOSZoneBootDocument=t.isBuckyOSZoneBootDocument,exports.isBuckyOSZoneConfig=t.isBuckyOSZoneConfig,exports.isBuckyOSZoneDocument=t.isBuckyOSZoneDocument,exports.isW3CDIDDocumentBase=t.isW3CDIDDocumentBase,exports.namelib=t.namelib,exports.ndn=t.ndn_types,exports.parseBuckyOSDIDDocument=t.parseBuckyOSDIDDocument,exports.parseBuckyOSDeviceMiniDocument=t.parseBuckyOSDeviceMiniDocument,exports.parseBuckyOSOwnerDocument=t.parseBuckyOSOwnerDocument,exports.parseW3CDIDDocumentBase=t.parseW3CDIDDocumentBase,exports.attachEvent=a,exports.buckyos=_,exports.createEventReader=n,exports.create_event_reader=C,exports.getAccountInfo=O,exports.getAiWorkspaceClient=f,exports.getAiccClient=W,exports.getAppDataDir=p,exports.getAppDid=S,exports.getAppId=A,exports.getAppInstanceId=T,exports.getAppSetting=u,exports.getBuckyOSConfig=r,exports.getCurrentIdentity=R,exports.getCurrentWalletUser=P,exports.getKEventClient=i,exports.getMsgCenterClient=V,exports.getMsgQueueClient=v,exports.getRepoClient=w,exports.getRuntimeType=E,exports.getServiceRpcClient=k,exports.getSystemConfigClient=m,exports.getTaskManagerClient=B,exports.getVerifyHubClient=y,exports.getWorkflowClient=F,exports.getZoneHostName=H,exports.getZoneServiceURL=U,exports.initBuckyOS=s,exports.login=l,exports.loginByBrowserSSO=N,exports.loginByPassword=D,exports.loginByRuntimeSession=c,exports.logout=M,exports.openExternalUrl=L,exports.removeEvent=x,exports.resolve_did=g,exports.setAppSetting=d,exports.subscribeKEvent=I,exports.walletSignWithActiveDid=K;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./executor_client-b3ff97ba.js"),t=require("./ndn_types-08dc9ef1.js"),o=e.createSDKModule("universal"),_=o.buckyos,s=o.initBuckyOS,r=o.getBuckyOSConfig,E=o.getRuntimeType,A=o.getAppId,T=o.getAppDid,S=o.getAppInstanceId,p=o.getAppDataDir,i=o.getKEventClient,n=o.createEventReader,C=o.create_event_reader,I=o.subscribeKEvent,a=o.attachEvent,x=o.removeEvent,O=o.getAccountInfo,R=o.getCurrentIdentity,D=o.loginByPassword,N=o.loginByBrowserSSO,c=o.loginByRuntimeSession,l=o.login,M=o.logout,u=o.getAppSetting,d=o.setAppSetting,P=o.getCurrentWalletUser,g=o.resolve_did,K=o.walletSignWithActiveDid,L=o.openExternalUrl,H=o.getZoneHostName,U=o.getZoneServiceURL,k=o.getServiceRpcClient,y=o.getVerifyHubClient,m=o.getSystemConfigClient,B=o.getTaskManagerClient,F=o.getWorkflowClient,W=o.getAiccClient,f=o.getAiWorkspaceClient,v=o.getMsgQueueClient,V=o.getMsgCenterClient,w=o.getRepoClient;exports.ACCESS_DENIED_ERROR_CODE=e.ACCESS_DENIED_ERROR_CODE,exports.AGENT_DELEGATE_TASK_SCHEMA_ID=e.AGENT_DELEGATE_TASK_SCHEMA_ID,exports.AICC_AI_METHODS=e.AICC_AI_METHODS,exports.AICC_COMPUTE_TASK_SCHEMA_ID=e.AICC_COMPUTE_TASK_SCHEMA_ID,exports.AICC_CORE_METHODS=e.AICC_CORE_METHODS,exports.AICC_EXECUTION_MODES=e.AICC_EXECUTION_MODES,exports.AICC_FEATURES=e.AICC_FEATURES,exports.AICC_MANAGEMENT_METHODS=e.AICC_MANAGEMENT_METHODS,exports.AICC_METHODS=e.AICC_METHODS,exports.AICC_POLICY_REFUSAL_CODES=e.AICC_POLICY_REFUSAL_CODES,exports.AICC_QUOTA_METHODS=e.AICC_QUOTA_METHODS,exports.AICC_SERVICE_SERVICE_NAME=e.AICC_SERVICE_SERVICE_NAME,exports.AICC_SERVICE_SERVICE_PORT=e.AICC_SERVICE_SERVICE_PORT,exports.AICC_SERVICE_UNIQUE_ID=e.AICC_SERVICE_UNIQUE_ID,exports.AIWORKSPACE_SERVICE_NAME=e.AIWORKSPACE_SERVICE_NAME,exports.ANONYMOUS_IDENTITY=e.ANONYMOUS_IDENTITY,exports.APP_INSTALL_TASK_SCHEMA_ID=e.APP_INSTALL_TASK_SCHEMA_ID,exports.APP_START_TASK_SCHEMA_ID=e.APP_START_TASK_SCHEMA_ID,exports.APP_UNINSTALL_TASK_SCHEMA_ID=e.APP_UNINSTALL_TASK_SCHEMA_ID,exports.APP_UPDATE_BATCH_TASK_SCHEMA_ID=e.APP_UPDATE_BATCH_TASK_SCHEMA_ID,exports.APP_UPDATE_TASK_SCHEMA_ID=e.APP_UPDATE_TASK_SCHEMA_ID,exports.AiWorkspaceClient=e.AiWorkspaceClient,exports.AiccClient=e.AiccClient,exports.AiwsFailure=e.AiwsFailure,exports.BNS_DNS_TXT_DEFAULT_TTL=e.BNS_DNS_TXT_DEFAULT_TTL,exports.BNS_DNS_TXT_DOC_TYPE=e.BNS_DNS_TXT_DOC_TYPE,exports.BNS_EVM_DEFAULT_GAS_LIMIT=e.BNS_EVM_DEFAULT_GAS_LIMIT,exports.BNS_EVM_DEFAULT_MAX_FEE_PER_GAS=e.BNS_EVM_DEFAULT_MAX_FEE_PER_GAS,exports.BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS=e.BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS,exports.BNS_MAX_INLINE_DOCUMENT_BYTES=e.BNS_MAX_INLINE_DOCUMENT_BYTES,exports.BNS_PUBLISH_DOCUMENT_ABI=e.BNS_PUBLISH_DOCUMENT_ABI,exports.BS_SERVICE_TASK_MANAGER=e.BS_SERVICE_TASK_MANAGER,exports.BS_SERVICE_VERIFY_HUB=e.BS_SERVICE_VERIFY_HUB,exports.BnsEvmTxBuilder=e.BnsEvmTxBuilder,exports.BnsEvmTxError=e.BnsEvmTxError,exports.BnsTxExecutor=e.BnsTxExecutor,exports.BnsTxExecutorError=e.BnsTxExecutorError,exports.BuckyOSSDK=e.BuckyOSSDK,exports.CONTACT_CHANGED_EVENT_BOX=e.CONTACT_CHANGED_EVENT_BOX,exports.CONTACT_TAG_HOMESTATION_FOLLOWING=e.CONTACT_TAG_HOMESTATION_FOLLOWING,exports.CONTACT_TAG_ZONE_AGENT=e.CONTACT_TAG_ZONE_AGENT,exports.CONTACT_TAG_ZONE_USER=e.CONTACT_TAG_ZONE_USER,exports.DEFAULT_CHILD_CONTROL_POLICY=e.DEFAULT_CHILD_CONTROL_POLICY,exports.DEFAULT_JUMP_BASE_URL=e.DEFAULT_JUMP_BASE_URL,exports.DENY_REASONS=e.DENY_REASONS,exports.DOWNLOAD_TASK_SCHEMA_ID=e.DOWNLOAD_TASK_SCHEMA_ID,exports.EXTERNAL_PRINCIPAL_CLAIM=e.EXTERNAL_PRINCIPAL_CLAIM,exports.ExecutorClient=e.ExecutorClient,exports.ExecutorCommandStream=e.ExecutorCommandStream,exports.ExecutorStreamError=e.ExecutorStreamError,exports.FRIEND_INTENT=e.FRIEND_INTENT,exports.HUMAN_APPROVAL_SCHEMA_ID=e.HUMAN_APPROVAL_SCHEMA_ID,exports.HUMAN_INPUT_TASK_SCHEMA_ID=e.HUMAN_INPUT_TASK_SCHEMA_ID,exports.JUMP_ACTION_PATHS=e.JUMP_ACTION_PATHS,exports.KEventClient=e.KEventClient,exports.KEventReader=e.KEventReader,exports.MsgCenterClient=e.MsgCenterClient,exports.MsgQueueClient=e.MsgQueueClient,exports.NOTIFY_ACTION_ANSWER=e.NOTIFY_ACTION_ANSWER,exports.NOTIFY_ACTION_DISMISS=e.NOTIFY_ACTION_DISMISS,exports.NOTIFY_CHOICE_CONTROL_ID=e.NOTIFY_CHOICE_CONTROL_ID,exports.NOTIFY_DATA_VERSION=e.NOTIFY_DATA_VERSION,exports.NOTIFY_DELIVERED_INTENT=e.NOTIFY_DELIVERED_INTENT,exports.NOTIFY_INTENT=e.NOTIFY_INTENT,exports.NOTIFY_LINK_PATH=e.NOTIFY_LINK_PATH,exports.NOTIFY_SESSION_PREFIX=e.NOTIFY_SESSION_PREFIX,exports.NOTIFY_TEXT_CONTROL_ID=e.NOTIFY_TEXT_CONTROL_ID,exports.OPENDAN_ASYNC_TOOL_TASK_SCHEMA_ID=e.OPENDAN_ASYNC_TOOL_TASK_SCHEMA_ID,exports.OPENDAN_COMMAND_TASK_SCHEMA_ID=e.OPENDAN_COMMAND_TASK_SCHEMA_ID,exports.RAW_TASK_SCHEMA_ID=e.RAW_TASK_SCHEMA_ID,exports.RPCError=e.RPCError,exports.RepoClient=e.RepoClient,exports.RuntimeType=e.RuntimeType,exports.SCHEDULER_DISPATCH_THUNK_TASK_SCHEMA_ID=e.SCHEDULER_DISPATCH_THUNK_TASK_SCHEMA_ID,exports.StorageDomain=e.StorageDomain,exports.SystemConfigClient=e.SystemConfigClient,exports.TASK_ERR_ALREADY_COMPLETED=e.TASK_ERR_ALREADY_COMPLETED,exports.TASK_ERR_CONTROL_ALREADY_PENDING=e.TASK_ERR_CONTROL_ALREADY_PENDING,exports.TASK_ERR_CONTROL_NOT_AVAILABLE=e.TASK_ERR_CONTROL_NOT_AVAILABLE,exports.TASK_ERR_IDEMPOTENCY_CONFLICT=e.TASK_ERR_IDEMPOTENCY_CONFLICT,exports.TASK_ERR_INPUT_SCHEMA_MISMATCH=e.TASK_ERR_INPUT_SCHEMA_MISMATCH,exports.TASK_ERR_INVALID_PHASE=e.TASK_ERR_INVALID_PHASE,exports.TASK_ERR_NOT_FOUND=e.TASK_ERR_NOT_FOUND,exports.TASK_ERR_PERMISSION_DENIED=e.TASK_ERR_PERMISSION_DENIED,exports.TASK_ERR_RESULT_SCHEMA_MISMATCH=e.TASK_ERR_RESULT_SCHEMA_MISMATCH,exports.TASK_ERR_REVISION_CONFLICT=e.TASK_ERR_REVISION_CONFLICT,exports.TASK_ERR_SCHEMA_NOT_FOUND=e.TASK_ERR_SCHEMA_NOT_FOUND,exports.TASK_ERR_STALE_RUNNER_EPOCH=e.TASK_ERR_STALE_RUNNER_EPOCH,exports.TASK_MANAGER_SERVICE_NAME=e.TASK_MANAGER_SERVICE_NAME,exports.TASK_MANAGER_SERVICE_PORT=e.TASK_MANAGER_SERVICE_PORT,exports.TASK_MANAGER_SERVICE_UNIQUE_ID=e.TASK_MANAGER_SERVICE_UNIQUE_ID,exports.TASK_MGR_ERROR_CODES=e.TASK_MGR_ERROR_CODES,exports.TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1=e.TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1,exports.TOOL_EXEC_BASH_TASK_SCHEMA_ID=e.TOOL_EXEC_BASH_TASK_SCHEMA_ID,exports.TaskAction=e.TaskAction,exports.TaskControlAction=e.TaskControlAction,exports.TaskDataScope=e.TaskDataScope,exports.TaskEventType=e.TaskEventType,exports.TaskExecutorKind=e.TaskExecutorKind,exports.TaskGrantScope=e.TaskGrantScope,exports.TaskManagerClient=e.TaskManagerClient,exports.TaskOutcome=e.TaskOutcome,exports.TaskPhase=e.TaskPhase,exports.TaskWaitReasonKind=e.TaskWaitReasonKind,exports.USER_GROUP_REF_PREFIX=e.USER_GROUP_REF_PREFIX,exports.USER_TYPE_GROUP_REF_PREFIX=e.USER_TYPE_GROUP_REF_PREFIX,exports.VerifyHubClient=e.VerifyHubClient,exports.WEB3_BRIDGE_HOST=e.WEB3_BRIDGE_HOST,exports.WELL_KNOWN_CONTACT_TAGS=e.WELL_KNOWN_CONTACT_TAGS,exports.WORKFLOW_EXECUTE_RPC_TASK_SCHEMA_ID=e.WORKFLOW_EXECUTE_RPC_TASK_SCHEMA_ID,exports.WORKFLOW_MAP_SHARD_TASK_SCHEMA_ID=e.WORKFLOW_MAP_SHARD_TASK_SCHEMA_ID,exports.WORKFLOW_RUN_TARGET_TASK_SCHEMA_ID=e.WORKFLOW_RUN_TARGET_TASK_SCHEMA_ID,exports.WORKFLOW_RUN_TREE_TASK_SCHEMA_ID=e.WORKFLOW_RUN_TREE_TASK_SCHEMA_ID,exports.WORKFLOW_SCHEDULE_TASK_SCHEMA_ID=e.WORKFLOW_SCHEDULE_TASK_SCHEMA_ID,exports.WORKFLOW_SEND_MESSAGE_TASK_SCHEMA_ID=e.WORKFLOW_SEND_MESSAGE_TASK_SCHEMA_ID,exports.WORKFLOW_SERVICE_NAME=e.WORKFLOW_SERVICE_NAME,exports.WORKFLOW_STEP_TASK_SCHEMA_ID=e.WORKFLOW_STEP_TASK_SCHEMA_ID,exports.WORKFLOW_THUNK_TASK_SCHEMA_ID=e.WORKFLOW_THUNK_TASK_SCHEMA_ID,exports.WorkflowClient=e.WorkflowClient,exports.WorkflowDefinitionStatus=e.WorkflowDefinitionStatus,exports.WorkflowHumanActionKind=e.WorkflowHumanActionKind,exports.WorkflowJoinMode=e.WorkflowJoinMode,exports.WorkflowNodeRunState=e.WorkflowNodeRunState,exports.WorkflowOutputMode=e.WorkflowOutputMode,exports.WorkflowRetryFallback=e.WorkflowRetryFallback,exports.WorkflowRunStatus=e.WorkflowRunStatus,exports.WorkflowScheduledTaskFireStatus=e.WorkflowScheduledTaskFireStatus,exports.WorkflowScheduledTaskMisfirePolicy=e.WorkflowScheduledTaskMisfirePolicy,exports.WorkflowScheduledTaskStatus=e.WorkflowScheduledTaskStatus,exports.WorkflowStepType=e.WorkflowStepType,exports.ZONE_USER_TYPES=e.ZONE_USER_TYPES,exports.accessDenialOf=e.accessDenialOf,exports.aiccMessageFirstText=e.aiccMessageFirstText,exports.aiccMessageTextContent=e.aiccMessageTextContent,exports.aiccRefusalOf=e.aiccRefusalOf,exports.aiccTextMessage=e.aiccTextMessage,exports.answerNotify=e.answerNotify,exports.appDidFromId=e.appDidFromId,exports.appIdFromDid=e.appIdFromDid,exports.baselineTaskControlProfile=e.baselineTaskControlProfile,exports.bns=e.bns_client,exports.buildJumpUrl=e.buildJumpUrl,exports.commitNotifyAnswer=e.commitNotifyAnswer,exports.contactTagApp=e.contactTagApp,exports.contactTagKind=e.contactTagKind,exports.createAppInstanceId=e.createAppInstanceId,exports.createSDKModule=e.createSDKModule,exports.decisionRequirements=e.decisionRequirements,exports.decodeBnsPublishDocumentCalldata=e.decodeBnsPublishDocumentCalldata,exports.encodeExecutorControl=e.encodeExecutorControl,exports.getActiveRuntimeType=e.getActiveRuntimeType,exports.getActiveSessionToken=e.getActiveSessionToken,exports.getActiveZoneGatewayOrigin=e.getActiveZoneGatewayOrigin,exports.getCurrentWalletUserFromHost=e.getCurrentWalletUserFromHost,exports.identityAllows=e.identityAllows,exports.identityKey=e.identityKey,exports.inputPrompt=e.inputPrompt,exports.isAiccAiMethod=e.isAiccAiMethod,exports.isExternalPrincipal=e.isExternalPrincipal,exports.isNotifyClosed=e.isNotifyClosed,exports.isTerminalTaskPhase=e.isTerminalTaskPhase,exports.isUserGroupRefTag=e.isUserGroupRefTag,exports.mailboxAddress=e.mailboxAddress,exports.mailboxResource=e.mailboxResource,exports.msgMachineData=e.msgMachineData,exports.ndm=e.ndm_client,exports.ndm_proxy=e.ndm_proxy,exports.normalizeZoneHostname=e.normalizeZoneHostname,exports.notifyAnswerToTaskResult=e.notifyAnswerToTaskResult,exports.notifyCategoryFromSessionId=e.notifyCategoryFromSessionId,exports.notifyCategorySessionId=e.notifyCategorySessionId,exports.notifyMessageData=e.notifyMessageData,exports.notifyUrl=e.notifyUrl,exports.parseAccessDenial=e.parseAccessDenial,exports.parseAppId=e.parseAppId,exports.parseAppInstanceId=e.parseAppInstanceId,exports.parseCurrentIdentity=e.parseCurrentIdentity,exports.parseSessionTokenClaims=e.parseSessionTokenClaims,exports.parseVideoPrompt=e.parseVideoPrompt,exports.parseZoneUserType=e.parseZoneUserType,exports.promptOptions=e.promptOptions,exports.resolveDidFromHost=e.resolveDidFromHost,exports.sn=e.sn_client,exports.taskMgrErrorCode=e.taskMgrErrorCode,exports.taskMgrTaskEventPath=e.taskMgrTaskEventPath,exports.taskMgrTreeEventPath=e.taskMgrTreeEventPath,exports.validateAiccMessage=e.validateAiccMessage,exports.validateDecisionAnswers=e.validateDecisionAnswers,exports.validateDecisionRequest=e.validateDecisionRequest,exports.validateNotifyAnswer=e.validateNotifyAnswer,exports.validateVideoEdit=e.validateVideoEdit,exports.validateVideoGeneration=e.validateVideoGeneration,exports.validateVideoOutput=e.validateVideoOutput,exports.videoGenerationRequirement=e.videoGenerationRequirement,exports.waitNotify=e.waitNotify,exports.walletUserHasSnAccount=e.walletUserHasSnAccount,exports.zoneActionUrl=e.zoneActionUrl,exports.DID_OBJECT_SERVICE_ID=t.DID_OBJECT_SERVICE_ID,exports.DID_OBJECT_SERVICE_TYPE=t.DID_OBJECT_SERVICE_TYPE,exports.NODE_IDENTITY_SCHEMA_V2=t.NODE_IDENTITY_SCHEMA_V2,exports.getDidIdentifier=t.getDidIdentifier,exports.getDidMethod=t.getDidMethod,exports.hashPassword=t.hashPassword,exports.isBuckyOSAgentDocument=t.isBuckyOSAgentDocument,exports.isBuckyOSDIDObjectCard=t.isBuckyOSDIDObjectCard,exports.isBuckyOSDeviceDocument=t.isBuckyOSDeviceDocument,exports.isBuckyOSDeviceMiniDocument=t.isBuckyOSDeviceMiniDocument,exports.isBuckyOSLocalNodeIdentityConfig=t.isBuckyOSLocalNodeIdentityConfig,exports.isBuckyOSOwnerDocument=t.isBuckyOSOwnerDocument,exports.isBuckyOSZoneBootDocument=t.isBuckyOSZoneBootDocument,exports.isBuckyOSZoneConfig=t.isBuckyOSZoneConfig,exports.isBuckyOSZoneDocument=t.isBuckyOSZoneDocument,exports.isW3CDIDDocumentBase=t.isW3CDIDDocumentBase,exports.namelib=t.namelib,exports.ndn=t.ndn_types,exports.parseBuckyOSDIDDocument=t.parseBuckyOSDIDDocument,exports.parseBuckyOSDeviceMiniDocument=t.parseBuckyOSDeviceMiniDocument,exports.parseBuckyOSOwnerDocument=t.parseBuckyOSOwnerDocument,exports.parseW3CDIDDocumentBase=t.parseW3CDIDDocumentBase,exports.attachEvent=a,exports.buckyos=_,exports.createEventReader=n,exports.create_event_reader=C,exports.getAccountInfo=O,exports.getAiWorkspaceClient=f,exports.getAiccClient=W,exports.getAppDataDir=p,exports.getAppDid=T,exports.getAppId=A,exports.getAppInstanceId=S,exports.getAppSetting=u,exports.getBuckyOSConfig=r,exports.getCurrentIdentity=R,exports.getCurrentWalletUser=P,exports.getKEventClient=i,exports.getMsgCenterClient=V,exports.getMsgQueueClient=v,exports.getRepoClient=w,exports.getRuntimeType=E,exports.getServiceRpcClient=k,exports.getSystemConfigClient=m,exports.getTaskManagerClient=B,exports.getVerifyHubClient=y,exports.getWorkflowClient=F,exports.getZoneHostName=H,exports.getZoneServiceURL=U,exports.initBuckyOS=s,exports.login=l,exports.loginByBrowserSSO=N,exports.loginByPassword=D,exports.loginByRuntimeSession=c,exports.logout=M,exports.openExternalUrl=L,exports.removeEvent=x,exports.resolve_did=g,exports.setAppSetting=d,exports.subscribeKEvent=I,exports.walletSignWithActiveDid=K;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createSDKModule } from "./executor_client-
|
|
2
|
-
import { a8, aA, bt, aF, bu, bz, by, bv, bx, bA, bw, br, bs, bq, cc, ab, aG, aI, aH, aK, aJ, ce, bH, cd, b$, c0, bX, bY, bZ, b_, c1, d, B, c3, c2, c7, c5, i, a0, $, _, Y, b6, af, a7, aq, E, c8, cb, c9, X, ap, aB, ag, bR, bQ, o, M, z, A, x, v, u, N, C, w, y, aC, aD, ao, m, j, R, ar, ba, S, aS, aR, aQ, aV, aT, aP, aL, aM, aU, aN, aW, aO, al, am, ak, aX, an, aE, b7, b4, b9, bb, a$, b8, bc, b3, b0, b2, a3, a2, V, W, a1, ay, au, az, as, aw, ax, bd, at, av, bp, bi, bl, bg, bk, bf, bh, bj, bo, bn, bm, be, Z, aa, bF, bE, bB, bD, T, bU, bS, b5, b, aj, Q, a4, a5, bV, bI, c4, ca, e, h, f, g, ae, ad, H, bC, l, D, b1, a6, q, t, O, n, a, ah, J, G, F, P, L, a9, bT, bW, ac, p, bL, k, I, r, s, a_, aY, aZ, bG, bK, bJ, K, bO, bN, bM, bP, U, c6, ai } from "./executor_client-
|
|
3
|
-
import { b as b10, D as D2, N as N2,
|
|
1
|
+
import { c as createSDKModule } from "./executor_client-eb372968.mjs";
|
|
2
|
+
import { a8, aA, bt, aF, bu, bz, by, bv, bx, bA, bw, br, bs, bq, cc, ab, aG, aI, aH, aK, aJ, ce, bH, cd, b$, c0, bX, bY, bZ, b_, c1, d, B, c3, c2, c7, c5, i, a0, $, _, Y, b6, af, a7, aq, E, c8, cb, c9, X, ap, aB, ag, bR, bQ, o, M, z, A, x, v, u, N, C, w, y, aC, aD, ao, m, j, R, ar, ba, S, aS, aR, aQ, aV, aT, aP, aL, aM, aU, aN, aW, aO, al, am, ak, aX, an, aE, b7, b4, b9, bb, a$, b8, bc, b3, b0, b2, a3, a2, V, W, a1, ay, au, az, as, aw, ax, bd, at, av, bp, bi, bl, bg, bk, bf, bh, bj, bo, bn, bm, be, Z, aa, bF, bE, bB, bD, T, bU, bS, b5, b, aj, Q, a4, a5, bV, bI, c4, ca, e, h, f, g, ae, ad, H, bC, l, D, b1, a6, q, t, O, n, a, ah, J, G, F, P, L, a9, bT, bW, ac, p, bL, k, I, r, s, a_, aY, aZ, bG, bK, bJ, K, bO, bN, bM, bP, U, c6, ai } from "./executor_client-eb372968.mjs";
|
|
3
|
+
import { b as b10, D as D2, N as N2, t as t2, s as s2, h as h2, j as j2, l as l2, g as g2, d as d2, f as f2, c, e as e2, m as m2, k as k2, i as i2, n as n2, a as a10, r as r2, q as q2, o as o2, p as p2 } from "./ndn_types-bbb1f6a6.mjs";
|
|
4
4
|
const sdkModule = createSDKModule("universal");
|
|
5
5
|
const buckyos = sdkModule.buckyos;
|
|
6
6
|
const initBuckyOS = sdkModule.initBuckyOS;
|
|
@@ -214,8 +214,8 @@ export {
|
|
|
214
214
|
getCurrentIdentity,
|
|
215
215
|
getCurrentWalletUser,
|
|
216
216
|
g as getCurrentWalletUserFromHost,
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
t2 as getDidIdentifier,
|
|
218
|
+
s2 as getDidMethod,
|
|
219
219
|
getKEventClient,
|
|
220
220
|
getMsgCenterClient,
|
|
221
221
|
getMsgQueueClient,
|
|
@@ -234,16 +234,15 @@ export {
|
|
|
234
234
|
initBuckyOS,
|
|
235
235
|
H as inputPrompt,
|
|
236
236
|
bC as isAiccAiMethod,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
j2 as isBuckyOSAgentDocument,
|
|
238
|
+
l2 as isBuckyOSDIDObjectCard,
|
|
239
|
+
g2 as isBuckyOSDeviceDocument,
|
|
240
240
|
d2 as isBuckyOSDeviceMiniDocument,
|
|
241
|
-
|
|
242
|
-
f2 as isBuckyOSNodeIdentityConfig,
|
|
241
|
+
f2 as isBuckyOSLocalNodeIdentityConfig,
|
|
243
242
|
c as isBuckyOSOwnerDocument,
|
|
244
243
|
e2 as isBuckyOSZoneBootDocument,
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
m2 as isBuckyOSZoneConfig,
|
|
245
|
+
k2 as isBuckyOSZoneDocument,
|
|
247
246
|
l as isExternalPrincipal,
|
|
248
247
|
D as isNotifyClosed,
|
|
249
248
|
b1 as isTerminalTaskPhase,
|
|
@@ -271,9 +270,9 @@ export {
|
|
|
271
270
|
a9 as parseAccessDenial,
|
|
272
271
|
bT as parseAppId,
|
|
273
272
|
bW as parseAppInstanceId,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
r2 as parseBuckyOSDIDDocument,
|
|
274
|
+
q2 as parseBuckyOSDeviceMiniDocument,
|
|
275
|
+
o2 as parseBuckyOSOwnerDocument,
|
|
277
276
|
ac as parseCurrentIdentity,
|
|
278
277
|
p as parseSessionTokenClaims,
|
|
279
278
|
bL as parseVideoPrompt,
|
package/dist/namelib.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuckyOSAgentDocument, BuckyOSDeviceDocument, BuckyOSDeviceMiniDocument, BuckyOSDIDDocument, BuckyOSDIDObjectCard,
|
|
1
|
+
import { BuckyOSAgentDocument, BuckyOSDeviceDocument, BuckyOSDeviceMiniDocument, BuckyOSDIDDocument, BuckyOSDIDObjectCard, BuckyOSOwnerDocument, BuckyOSZoneBootDocument, BuckyOSZoneDocument, DidDocType, DIDContext, Ed25519Jwk, W3CDIDDocumentBase, DID as DIDString } from './types';
|
|
2
2
|
export declare const DID_CORE_CONTEXT = "https://www.w3.org/ns/did/v1";
|
|
3
3
|
export declare const BUCKYOS_CONTEXT_BASE = "https://buckyos.org/ns";
|
|
4
4
|
export declare const DID_DOC_AUTHKEY = "#auth-key";
|
|
@@ -133,15 +133,6 @@ export declare function newDeviceMiniDocument(params: NewDeviceMiniDocumentParam
|
|
|
133
133
|
export declare function newDeviceMiniDocumentByDeviceDocument(deviceDoc: BuckyOSDeviceDocument): BuckyOSDeviceMiniDocument;
|
|
134
134
|
export declare function deviceMiniDocumentToJwt(miniDoc: BuckyOSDeviceMiniDocument, ownerPrivateKeyPem: string): Promise<string>;
|
|
135
135
|
export declare function deviceMiniDocumentFromJwt(jwt: string, publicKeyJwk?: Ed25519Jwk): Promise<BuckyOSDeviceMiniDocument>;
|
|
136
|
-
export interface NewNodeIdentityConfigParams {
|
|
137
|
-
zoneDid: DID | DIDString;
|
|
138
|
-
ownerPublicKey: Ed25519Jwk;
|
|
139
|
-
ownerDid: DID | DIDString;
|
|
140
|
-
deviceDocJwt: string;
|
|
141
|
-
deviceMiniDocJwt: string;
|
|
142
|
-
zoneIat: number;
|
|
143
|
-
}
|
|
144
|
-
export declare function newNodeIdentityConfig(params: NewNodeIdentityConfigParams): BuckyOSNodeIdentityConfig;
|
|
145
136
|
export declare function encodeOwnerDocument(ownerDoc: BuckyOSOwnerDocument, privateKeyPem: string): Promise<string>;
|
|
146
137
|
export declare function encodeZoneDocument(zoneDoc: BuckyOSZoneDocument, ownerPrivateKeyPem: string): Promise<string>;
|
|
147
138
|
export declare function ownerDocumentToOrderedJson(doc: BuckyOSOwnerDocument): Record<string, unknown>;
|
package/dist/namelib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namelib.d.ts","sourceRoot":"","sources":["../src/namelib.ts"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;IAAC,GAAG,EAAE,oBAAoB,CAAA;CAAE,GAC/C;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,oBAAoB,CAAA;CAAE,GAC/C;IAAE,OAAO,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,qBAAqB,CAAA;CAAE,GACjD;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,mBAAmB,CAAA;CAAE,GAC7C;IAAE,OAAO,EAAE,YAAY,CAAC;IAAC,GAAG,EAAE,oBAAoB,CAAA;CAAE,CAAA;AAMxD,wBAAgB,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,GAAG,iBAAiB,CAoC5E;AAGD,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,GAAG,UAAU,CAEnE;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,kBAAkB,EACxD,GAAG,EAAE,eAAe,GAAG,MAAM,EAC7B,OAAO,EAAE,iBAAiB,CAAC,SAAS,CAAC,GACpC,CAAC,CAMH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="ARRAYBUFFER not supported by this environment",n="UINT8ARRAY not supported by this environment";function i(e,t,n,i){let r,o,s;const c=t||[0],a=(n=n||0)>>>3,u=-1===i?3:0;for(r=0;r<e.length;r+=1)s=r+a,o=s>>>2,c.length<=o&&c.push(0),c[o]|=e[r]<<8*(u+i*(s%4));return{value:c,binLen:8*e.length+n}}function r(r,o,s){switch(o){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":return function(e,t,n){return function(e,t,n,i){let r,o,s,c;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");const a=t||[0],u=(n=n||0)>>>3,h=-1===i?3:0;for(r=0;r<e.length;r+=2){if(o=parseInt(e.substr(r,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(c=(r>>>1)+u,s=c>>>2;a.length<=s;)a.push(0);a[s]|=o<<8*(h+i*(c%4))}return{value:a,binLen:4*e.length+n}}(e,t,n,s)};case"TEXT":return function(e,t,n){return function(e,t,n,i,r){let o,s,c,a,u,h,l,d,f=0;const w=n||[0],p=(i=i||0)>>>3;if("UTF8"===t)for(l=-1===r?3:0,c=0;c<e.length;c+=1)for(o=e.charCodeAt(c),s=[],128>o?s.push(o):2048>o?(s.push(192|o>>>6),s.push(128|63&o)):55296>o||57344<=o?s.push(224|o>>>12,128|o>>>6&63,128|63&o):(c+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(c)),s.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),a=0;a<s.length;a+=1){for(h=f+p,u=h>>>2;w.length<=u;)w.push(0);w[u]|=s[a]<<8*(l+r*(h%4)),f+=1}else for(l=-1===r?2:0,d="UTF16LE"===t&&1!==r||"UTF16LE"!==t&&1===r,c=0;c<e.length;c+=1){for(o=e.charCodeAt(c),!0===d&&(a=255&o,o=a<<8|o>>>8),h=f+p,u=h>>>2;w.length<=u;)w.push(0);w[u]|=o<<8*(l+r*(h%4)),f+=2}return{value:w,binLen:8*f+i}}(e,o,t,n,s)};case"B64":return function(t,n,i){return function(t,n,i,r){let o,s,c,a,u,h,l,d=0;const f=n||[0],w=(i=i||0)>>>3,p=-1===r?3:0,m=t.indexOf("=");if(-1===t.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(t=t.replace(/=/g,""),-1!==m&&m<t.length)throw new Error("Invalid '=' found in base-64 string");for(s=0;s<t.length;s+=4){for(u=t.substr(s,4),a=0,c=0;c<u.length;c+=1)o=e.indexOf(u.charAt(c)),a|=o<<18-6*c;for(c=0;c<u.length-1;c+=1){for(l=d+w,h=l>>>2;f.length<=h;)f.push(0);f[h]|=(a>>>16-8*c&255)<<8*(p+r*(l%4)),d+=1}}return{value:f,binLen:8*d+i}}(t,n,i,s)};case"BYTES":return function(e,t,n){return function(e,t,n,i){let r,o,s,c;const a=t||[0],u=(n=n||0)>>>3,h=-1===i?3:0;for(o=0;o<e.length;o+=1)r=e.charCodeAt(o),c=o+u,s=c>>>2,a.length<=s&&a.push(0),a[s]|=r<<8*(h+i*(c%4));return{value:a,binLen:8*e.length+n}}(e,t,n,s)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(c){throw new Error(t)}return function(e,t,n){return r=t,o=n,c=s,i(new Uint8Array(e),r,o,c);var r,o,c};case"UINT8ARRAY":try{new Uint8Array(0)}catch(c){throw new Error(n)}return function(e,t,n){return i(e,t,n,s)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(i,r,o,s){switch(i){case"HEX":return function(e){return function(e,t,n,i){const r="0123456789abcdef";let o,s,c="";const a=t/8,u=-1===n?3:0;for(o=0;o<a;o+=1)s=e[o>>>2]>>>8*(u+n*(o%4)),c+=r.charAt(s>>>4&15)+r.charAt(15&s);return i.outputUpper?c.toUpperCase():c}(e,r,o,s)};case"B64":return function(t){return function(t,n,i,r){let o,s,c,a,u,h="";const l=n/8,d=-1===i?3:0;for(o=0;o<l;o+=3)for(a=o+1<l?t[o+1>>>2]:0,u=o+2<l?t[o+2>>>2]:0,c=(t[o>>>2]>>>8*(d+i*(o%4))&255)<<16|(a>>>8*(d+i*((o+1)%4))&255)<<8|u>>>8*(d+i*((o+2)%4))&255,s=0;s<4;s+=1)h+=8*o+6*s<=n?e.charAt(c>>>6*(3-s)&63):r.b64Pad;return h}(t,r,o,s)};case"BYTES":return function(e){return function(e,t,n){let i,r,o="";const s=t/8,c=-1===n?3:0;for(i=0;i<s;i+=1)r=e[i>>>2]>>>8*(c+n*(i%4))&255,o+=String.fromCharCode(r);return o}(e,r,o)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(c){throw new Error(t)}return function(e){return function(e,t,n){let i;const r=t/8,o=new ArrayBuffer(r),s=new Uint8Array(o),c=-1===n?3:0;for(i=0;i<r;i+=1)s[i]=e[i>>>2]>>>8*(c+n*(i%4))&255;return o}(e,r,o)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(c){throw new Error(n)}return function(e){return function(e,t,n){let i;const r=t/8,o=-1===n?3:0,s=new Uint8Array(r);for(i=0;i<r;i+=1)s[i]=e[i>>>2]>>>8*(o+n*(i%4))&255;return s}(e,r,o)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}const s=4294967296,c=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],u=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],h="Chosen SHA variant is not supported",l="Cannot set numRounds with MAC";function d(e,t){let n,i;const r=e.binLen>>>3,o=t.binLen>>>3,s=r<<3,c=4-r<<3;if(r%4!=0){for(n=0;n<o;n+=4)i=r+n>>>2,e.value[i]|=t.value[n>>>2]<<s,e.value.push(0),e.value[i+1]|=t.value[n>>>2]>>>c;return(e.value.length<<2)-4>=o+r&&e.value.pop(),{value:e.value,binLen:e.binLen+t.binLen}}return{value:e.value.concat(t.value),binLen:e.binLen+t.binLen}}function f(e){const t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},i="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(i);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(i);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function w(e,t,n,i){const o=e+" must include a value and format";if(!t){if(!i)throw new Error(o);return i}if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}class p{constructor(e,t,n){const i=n||{};if(this.t=t,this.i=i.encoding||"UTF8",this.numRounds=i.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.o=e,this.h=[],this.u=0,this.l=!1,this.A=0,this.H=!1,this.S=[],this.p=[]}update(e){let t,n=0;const i=this.m>>>5,r=this.C(e,this.h,this.u),o=r.binLen,s=r.value,c=o>>>5;for(t=0;t<c;t+=i)n+this.m<=o&&(this.U=this.v(s.slice(t,t+i),this.U),n+=this.m);return this.A+=n,this.h=s.slice(n>>>5),this.u=o%this.m,this.l=!0,this}getHash(e,t){let n,i,r=this.R;const s=f(t);if(this.K){if(-1===s.outputLen)throw new Error("Output length must be specified in options");r=s.outputLen}const c=o(e,r,this.T,s);if(this.H&&this.g)return c(this.g(s));for(i=this.F(this.h.slice(),this.u,this.A,this.L(this.U),r),n=1;n<this.numRounds;n+=1)this.K&&r%32!=0&&(i[i.length-1]&=16777215>>>24-r%32),i=this.F(i,r,0,this.B(this.o),r);return c(i)}setHMACKey(e,t,n){if(!this.M)throw new Error("Variant does not support HMAC");if(this.l)throw new Error("Cannot set MAC key after calling update");const i=r(t,(n||{}).encoding||"UTF8",this.T);this.k(i(e))}k(e){const t=this.m>>>3,n=t/4-1;let i;if(1!==this.numRounds)throw new Error(l);if(this.H)throw new Error("MAC key already set");for(t<e.binLen/8&&(e.value=this.F(e.value,e.binLen,0,this.B(this.o),this.R));e.value.length<=n;)e.value.push(0);for(i=0;i<=n;i+=1)this.S[i]=909522486^e.value[i],this.p[i]=1549556828^e.value[i];this.U=this.v(this.S,this.U),this.A=this.m,this.H=!0}getHMAC(e,t){const n=f(t);return o(e,this.R,this.T,n)(this.Y())}Y(){let e;if(!this.H)throw new Error("Cannot call getHMAC without first setting MAC key");const t=this.F(this.h.slice(),this.u,this.A,this.L(this.U),this.R);return e=this.v(this.p,this.B(this.o)),e=this.F(t,this.R,this.m,e,this.R),e}}function m(e,t){return e<<t|e>>>32-t}function y(e,t){return e>>>t|e<<32-t}function b(e,t){return e>>>t}function g(e,t,n){return e^t^n}function v(e,t,n){return e&t^~e&n}function _(e,t,n){return e&t^e&n^t&n}function I(e){return y(e,2)^y(e,13)^y(e,22)}function S(e,t){const n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function j(e,t,n,i){const r=(65535&e)+(65535&t)+(65535&n)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(i>>>16)+(r>>>16))<<16|65535&r}function k(e,t,n,i,r){const o=(65535&e)+(65535&t)+(65535&n)+(65535&i)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(i>>>16)+(r>>>16)+(o>>>16))<<16|65535&o}function O(e){return y(e,7)^y(e,18)^b(e,3)}function x(e){return y(e,6)^y(e,11)^y(e,25)}function E(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function N(e,t){let n,i,r,o,s,c,a;const u=[];for(n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=0;a<80;a+=1)u[a]=a<16?e[a]:m(u[a-3]^u[a-8]^u[a-14]^u[a-16],1),c=a<20?k(m(n,5),v(i,r,o),s,1518500249,u[a]):a<40?k(m(n,5),g(i,r,o),s,1859775393,u[a]):a<60?k(m(n,5),_(i,r,o),s,2400959708,u[a]):k(m(n,5),g(i,r,o),s,3395469782,u[a]),s=o,o=r,r=m(i,30),i=n,n=c;return t[0]=S(n,t[0]),t[1]=S(i,t[1]),t[2]=S(r,t[2]),t[3]=S(o,t[3]),t[4]=S(s,t[4]),t}function T(e,t,n,i){let r;const o=15+(t+65>>>9<<4),c=t+n;for(;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&c,e[o-1]=c/s|0,r=0;r<e.length;r+=16)i=N(e.slice(r,r+16),i);return i}let D=class extends p{constructor(e,t,n){if("SHA-1"!==e)throw new Error(h);super(e,t,n);const i=n||{};this.M=!0,this.g=this.Y,this.T=-1,this.C=r(this.t,this.i,this.T),this.v=N,this.L=function(e){return e.slice()},this.B=E,this.F=T,this.U=[1732584193,4023233417,2562383102,271733878,3285377520],this.m=512,this.R=160,this.K=!1,i.hmacKey&&this.k(w("hmacKey",i.hmacKey,this.T))}};function A(e){let t;return t="SHA-224"==e?a.slice():u.slice(),t}function J(e,t){let n,i,r,o,s,a,u,h,l,d,f;const w=[];for(n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],u=t[6],h=t[7],f=0;f<64;f+=1)w[f]=f<16?e[f]:j(y(p=w[f-2],17)^y(p,19)^b(p,10),w[f-7],O(w[f-15]),w[f-16]),l=k(h,x(s),v(s,a,u),c[f],w[f]),d=S(I(n),_(n,i,r)),h=u,u=a,a=s,s=S(o,l),o=r,r=i,i=n,n=S(l,d);var p;return t[0]=S(n,t[0]),t[1]=S(i,t[1]),t[2]=S(r,t[2]),t[3]=S(o,t[3]),t[4]=S(s,t[4]),t[5]=S(a,t[5]),t[6]=S(u,t[6]),t[7]=S(h,t[7]),t}let C=class extends p{constructor(e,t,n){if("SHA-224"!==e&&"SHA-256"!==e)throw new Error(h);super(e,t,n);const i=n||{};this.g=this.Y,this.M=!0,this.T=-1,this.C=r(this.t,this.i,this.T),this.v=J,this.L=function(e){return e.slice()},this.B=A,this.F=function(t,n,i,r){return function(e,t,n,i,r){let o,c;const a=15+(t+65>>>9<<4),u=t+n;for(;e.length<=a;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[a]=4294967295&u,e[a-1]=u/s|0,o=0;o<e.length;o+=16)i=J(e.slice(o,o+16),i);return c="SHA-224"===r?[i[0],i[1],i[2],i[3],i[4],i[5],i[6]]:i,c}(t,n,i,r,e)},this.U=A(e),this.m=512,this.R="SHA-224"===e?224:256,this.K=!1,i.hmacKey&&this.k(w("hmacKey",i.hmacKey,this.T))}};class B{constructor(e,t){this.N=e,this.I=t}}function K(e,t){let n;return t>32?(n=64-t,new B(e.I<<t|e.N>>>n,e.N<<t|e.I>>>n)):0!==t?(n=32-t,new B(e.N<<t|e.I>>>n,e.I<<t|e.N>>>n)):e}function H(e,t){let n;return t<32?(n=32-t,new B(e.N>>>t|e.I<<n,e.I>>>t|e.N<<n)):(n=64-t,new B(e.I>>>t|e.N<<n,e.N>>>t|e.I<<n))}function $(e,t){return new B(e.N>>>t,e.I>>>t|e.N<<32-t)}function R(e,t,n){return new B(e.N&t.N^e.N&n.N^t.N&n.N,e.I&t.I^e.I&n.I^t.I&n.I)}function P(e){const t=H(e,28),n=H(e,34),i=H(e,39);return new B(t.N^n.N^i.N,t.I^n.I^i.I)}function M(e,t){let n,i;n=(65535&e.I)+(65535&t.I),i=(e.I>>>16)+(t.I>>>16)+(n>>>16);const r=(65535&i)<<16|65535&n;return n=(65535&e.N)+(65535&t.N)+(i>>>16),i=(e.N>>>16)+(t.N>>>16)+(n>>>16),new B((65535&i)<<16|65535&n,r)}function U(e,t,n,i){let r,o;r=(65535&e.I)+(65535&t.I)+(65535&n.I)+(65535&i.I),o=(e.I>>>16)+(t.I>>>16)+(n.I>>>16)+(i.I>>>16)+(r>>>16);const s=(65535&o)<<16|65535&r;return r=(65535&e.N)+(65535&t.N)+(65535&n.N)+(65535&i.N)+(o>>>16),o=(e.N>>>16)+(t.N>>>16)+(n.N>>>16)+(i.N>>>16)+(r>>>16),new B((65535&o)<<16|65535&r,s)}function L(e,t,n,i,r){let o,s;o=(65535&e.I)+(65535&t.I)+(65535&n.I)+(65535&i.I)+(65535&r.I),s=(e.I>>>16)+(t.I>>>16)+(n.I>>>16)+(i.I>>>16)+(r.I>>>16)+(o>>>16);const c=(65535&s)<<16|65535&o;return o=(65535&e.N)+(65535&t.N)+(65535&n.N)+(65535&i.N)+(65535&r.N)+(s>>>16),s=(e.N>>>16)+(t.N>>>16)+(n.N>>>16)+(i.N>>>16)+(r.N>>>16)+(o>>>16),new B((65535&s)<<16|65535&o,c)}function z(e,t){return new B(e.N^t.N,e.I^t.I)}function F(e){const t=H(e,19),n=H(e,61),i=$(e,6);return new B(t.N^n.N^i.N,t.I^n.I^i.I)}function Y(e){const t=H(e,1),n=H(e,8),i=$(e,7);return new B(t.N^n.N^i.N,t.I^n.I^i.I)}function q(e){const t=H(e,14),n=H(e,18),i=H(e,41);return new B(t.N^n.N^i.N,t.I^n.I^i.I)}const W=[new B(c[0],3609767458),new B(c[1],602891725),new B(c[2],3964484399),new B(c[3],2173295548),new B(c[4],4081628472),new B(c[5],3053834265),new B(c[6],2937671579),new B(c[7],3664609560),new B(c[8],2734883394),new B(c[9],1164996542),new B(c[10],1323610764),new B(c[11],3590304994),new B(c[12],4068182383),new B(c[13],991336113),new B(c[14],633803317),new B(c[15],3479774868),new B(c[16],2666613458),new B(c[17],944711139),new B(c[18],2341262773),new B(c[19],2007800933),new B(c[20],1495990901),new B(c[21],1856431235),new B(c[22],3175218132),new B(c[23],2198950837),new B(c[24],3999719339),new B(c[25],766784016),new B(c[26],2566594879),new B(c[27],3203337956),new B(c[28],1034457026),new B(c[29],2466948901),new B(c[30],3758326383),new B(c[31],168717936),new B(c[32],1188179964),new B(c[33],1546045734),new B(c[34],1522805485),new B(c[35],2643833823),new B(c[36],2343527390),new B(c[37],1014477480),new B(c[38],1206759142),new B(c[39],344077627),new B(c[40],1290863460),new B(c[41],3158454273),new B(c[42],3505952657),new B(c[43],106217008),new B(c[44],3606008344),new B(c[45],1432725776),new B(c[46],1467031594),new B(c[47],851169720),new B(c[48],3100823752),new B(c[49],1363258195),new B(c[50],3750685593),new B(c[51],3785050280),new B(c[52],3318307427),new B(c[53],3812723403),new B(c[54],2003034995),new B(c[55],3602036899),new B(c[56],1575990012),new B(c[57],1125592928),new B(c[58],2716904306),new B(c[59],442776044),new B(c[60],593698344),new B(c[61],3733110249),new B(c[62],2999351573),new B(c[63],3815920427),new B(3391569614,3928383900),new B(3515267271,566280711),new B(3940187606,3454069534),new B(4118630271,4000239992),new B(116418474,1914138554),new B(174292421,2731055270),new B(289380356,3203993006),new B(460393269,320620315),new B(685471733,587496836),new B(852142971,1086792851),new B(1017036298,365543100),new B(1126000580,2618297676),new B(1288033470,3409855158),new B(1501505948,4234509866),new B(1607167915,987167468),new B(1816402316,1246189591)];function Z(e){return"SHA-384"===e?[new B(3418070365,a[0]),new B(1654270250,a[1]),new B(2438529370,a[2]),new B(355462360,a[3]),new B(1731405415,a[4]),new B(41048885895,a[5]),new B(3675008525,a[6]),new B(1203062813,a[7])]:[new B(u[0],4089235720),new B(u[1],2227873595),new B(u[2],4271175723),new B(u[3],1595750129),new B(u[4],2917565137),new B(u[5],725511199),new B(u[6],4215389547),new B(u[7],327033209)]}function X(e,t){let n,i,r,o,s,c,a,u,h,l,d,f;const w=[];for(n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],c=t[5],a=t[6],u=t[7],d=0;d<80;d+=1)d<16?(f=2*d,w[d]=new B(e[f],e[f+1])):w[d]=U(F(w[d-2]),w[d-7],Y(w[d-15]),w[d-16]),h=L(u,q(s),(m=c,y=a,new B((p=s).N&m.N^~p.N&y.N,p.I&m.I^~p.I&y.I)),W[d],w[d]),l=M(P(n),R(n,i,r)),u=a,a=c,c=s,s=M(o,h),o=r,r=i,i=n,n=M(h,l);var p,m,y;return t[0]=M(n,t[0]),t[1]=M(i,t[1]),t[2]=M(r,t[2]),t[3]=M(o,t[3]),t[4]=M(s,t[4]),t[5]=M(c,t[5]),t[6]=M(a,t[6]),t[7]=M(u,t[7]),t}let G=class extends p{constructor(e,t,n){if("SHA-384"!==e&&"SHA-512"!==e)throw new Error(h);super(e,t,n);const i=n||{};this.g=this.Y,this.M=!0,this.T=-1,this.C=r(this.t,this.i,this.T),this.v=X,this.L=function(e){return e.slice()},this.B=Z,this.F=function(t,n,i,r){return function(e,t,n,i,r){let o,c;const a=31+(t+129>>>10<<5),u=t+n;for(;e.length<=a;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[a]=4294967295&u,e[a-1]=u/s|0,o=0;o<e.length;o+=32)i=X(e.slice(o,o+32),i);return c="SHA-384"===r?[i[0].N,i[0].I,i[1].N,i[1].I,i[2].N,i[2].I,i[3].N,i[3].I,i[4].N,i[4].I,i[5].N,i[5].I]:[i[0].N,i[0].I,i[1].N,i[1].I,i[2].N,i[2].I,i[3].N,i[3].I,i[4].N,i[4].I,i[5].N,i[5].I,i[6].N,i[6].I,i[7].N,i[7].I],c}(t,n,i,r,e)},this.U=Z(e),this.m=1024,this.R="SHA-384"===e?384:512,this.K=!1,i.hmacKey&&this.k(w("hmacKey",i.hmacKey,this.T))}};const V=[new B(0,1),new B(0,32898),new B(2147483648,32906),new B(2147483648,2147516416),new B(0,32907),new B(0,2147483649),new B(2147483648,2147516545),new B(2147483648,32777),new B(0,138),new B(0,136),new B(0,2147516425),new B(0,2147483658),new B(0,2147516555),new B(2147483648,139),new B(2147483648,32905),new B(2147483648,32771),new B(2147483648,32770),new B(2147483648,128),new B(0,32778),new B(2147483648,2147483658),new B(2147483648,2147516545),new B(2147483648,32896),new B(0,2147483649),new B(2147483648,2147516424)],Q=[[0,36,3,41,18],[1,44,10,45,2],[62,6,43,15,61],[28,55,25,21,56],[27,20,39,8,14]];function ee(e){let t;const n=[];for(t=0;t<5;t+=1)n[t]=[new B(0,0),new B(0,0),new B(0,0),new B(0,0),new B(0,0)];return n}function te(e){let t;const n=[];for(t=0;t<5;t+=1)n[t]=e[t].slice();return n}function ne(e,t){let n,i,r,o;const s=[],c=[];if(null!==e)for(i=0;i<e.length;i+=2)t[(i>>>1)%5][(i>>>1)/5|0]=z(t[(i>>>1)%5][(i>>>1)/5|0],new B(e[i+1],e[i]));for(n=0;n<24;n+=1){for(o=ee(),i=0;i<5;i+=1)s[i]=(a=t[i][0],u=t[i][1],h=t[i][2],l=t[i][3],d=t[i][4],new B(a.N^u.N^h.N^l.N^d.N,a.I^u.I^h.I^l.I^d.I));for(i=0;i<5;i+=1)c[i]=z(s[(i+4)%5],K(s[(i+1)%5],1));for(i=0;i<5;i+=1)for(r=0;r<5;r+=1)t[i][r]=z(t[i][r],c[i]);for(i=0;i<5;i+=1)for(r=0;r<5;r+=1)o[r][(2*i+3*r)%5]=K(t[i][r],Q[i][r]);for(i=0;i<5;i+=1)for(r=0;r<5;r+=1)t[i][r]=z(o[i][r],new B(~o[(i+1)%5][r].N&o[(i+2)%5][r].N,~o[(i+1)%5][r].I&o[(i+2)%5][r].I));t[0][0]=z(t[0][0],V[n])}var a,u,h,l,d;return t}function ie(e){let t,n,i=0;const r=[0,0],o=[4294967295&e,e/s&2097151];for(t=6;t>=0;t--)n=o[t>>2]>>>8*t&255,0===n&&0===i||(r[i+1>>2]|=n<<8*(i+1),i+=1);return i=0!==i?i:1,r[0]|=i,{value:i+1>4?r:[r[0]],binLen:8+8*i}}function re(e){return d(ie(e.binLen),e)}function oe(e,t){let n,i=ie(t);i=d(i,e);const r=t>>>2,o=(r-i.value.length%r)%r;for(n=0;n<o;n++)i.value.push(0);return i.value}let se=class extends p{constructor(e,t,n){let i=6,o=0;super(e,t,n);const s=n||{};if(1!==this.numRounds){if(s.kmacKey||s.hmacKey)throw new Error(l);if("CSHAKE128"===this.o||"CSHAKE256"===this.o)throw new Error("Cannot set numRounds for CSHAKE variants")}switch(this.T=1,this.C=r(this.t,this.i,this.T),this.v=ne,this.L=te,this.B=ee,this.U=ee(),this.K=!1,e){case"SHA3-224":this.m=o=1152,this.R=224,this.M=!0,this.g=this.Y;break;case"SHA3-256":this.m=o=1088,this.R=256,this.M=!0,this.g=this.Y;break;case"SHA3-384":this.m=o=832,this.R=384,this.M=!0,this.g=this.Y;break;case"SHA3-512":this.m=o=576,this.R=512,this.M=!0,this.g=this.Y;break;case"SHAKE128":i=31,this.m=o=1344,this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"SHAKE256":i=31,this.m=o=1088,this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"KMAC128":i=4,this.m=o=1344,this.X(n),this.R=-1,this.K=!0,this.M=!1,this.g=this._;break;case"KMAC256":i=4,this.m=o=1088,this.X(n),this.R=-1,this.K=!0,this.M=!1,this.g=this._;break;case"CSHAKE128":this.m=o=1344,i=this.O(n),this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"CSHAKE256":this.m=o=1088,i=this.O(n),this.R=-1,this.K=!0,this.M=!1,this.g=null;break;default:throw new Error(h)}this.F=function(e,t,n,r,s){return function(e,t,n,i,r,o,s){let c,a,u=0;const h=[],l=r>>>5,d=t>>>5;for(c=0;c<d&&t>=r;c+=l)i=ne(e.slice(c,c+l),i),t-=r;for(e=e.slice(c),t%=r;e.length<l;)e.push(0);for(c=t>>>3,e[c>>2]^=o<<c%4*8,e[l-1]^=2147483648,i=ne(e,i);32*h.length<s&&(a=i[u%5][u/5|0],h.push(a.I),!(32*h.length>=s));)h.push(a.N),u+=1,0==64*u%r&&(ne(null,i),u=0);return h}(e,t,0,r,o,i,s)},s.hmacKey&&this.k(w("hmacKey",s.hmacKey,this.T))}O(e,t){const n=function(e){const t=e||{};return{funcName:w("funcName",t.funcName,1,{value:[],binLen:0}),customization:w("Customization",t.customization,1,{value:[],binLen:0})}}(e||{});t&&(n.funcName=t);const i=d(re(n.funcName),re(n.customization));if(0!==n.customization.binLen||0!==n.funcName.binLen){const e=oe(i,this.m>>>3);for(let t=0;t<e.length;t+=this.m>>>5)this.U=this.v(e.slice(t,t+(this.m>>>5)),this.U),this.A+=this.m;return 4}return 31}X(e){const t=function(e){const t=e||{};return{kmacKey:w("kmacKey",t.kmacKey,1),funcName:{value:[1128353099],binLen:32},customization:w("Customization",t.customization,1,{value:[],binLen:0})}}(e||{});this.O(e,t.funcName);const n=oe(re(t.kmacKey),this.m>>>3);for(let i=0;i<n.length;i+=this.m>>>5)this.U=this.v(n.slice(i,i+(this.m>>>5)),this.U),this.A+=this.m;this.H=!0}_(e){const t=d({value:this.h.slice(),binLen:this.u},function(e){let t,n,i=0;const r=[0,0],o=[4294967295&e,e/s&2097151];for(t=6;t>=0;t--)n=o[t>>2]>>>8*t&255,0===n&&0===i||(r[i>>2]|=n<<8*i,i+=1);return i=0!==i?i:1,r[i>>2]|=i<<8*i,{value:i+1>4?r:[r[0]],binLen:8+8*i}}(e.outputLen));return this.F(t.value,t.binLen,this.A,this.L(this.U),e.outputLen)}};class ce{constructor(e,t,n){if("SHA-1"==e)this.P=new D(e,t,n);else if("SHA-224"==e||"SHA-256"==e)this.P=new C(e,t,n);else if("SHA-384"==e||"SHA-512"==e)this.P=new G(e,t,n);else{if("SHA3-224"!=e&&"SHA3-256"!=e&&"SHA3-384"!=e&&"SHA3-512"!=e&&"SHAKE128"!=e&&"SHAKE256"!=e&&"CSHAKE128"!=e&&"CSHAKE256"!=e&&"KMAC128"!=e&&"KMAC256"!=e)throw new Error(h);this.P=new se(e,t,n)}}update(e){return this.P.update(e),this}getHash(e,t){return this.P.getHash(e,t)}setHMACKey(e,t,n){this.P.setHMACKey(e,t,n)}getHMAC(e,t){return this.P.getHMAC(e,t)}}const ae="user_info",ue="buckyos.identity";function he(e){return`buckyos.account_info.${e}`}const le="DIDObjectService",de="buckyos.node_identity.v2";function fe(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function we(e){return"string"==typeof e||Array.isArray(e)&&e.every((e=>"string"==typeof e))}function pe(e){return!!fe(e)&&(we(e["@context"])&&"string"==typeof e.id&&function(e){return Array.isArray(e)}(e.verificationMethod)&&Array.isArray(e.authentication)&&"number"==typeof e.exp&&"number"==typeof e.iat&&function(e){return void 0===e||Array.isArray(e)}(e.service))}function me(e){return pe(e)&&"string"==typeof e.name&&("string"==typeof e.display_name||"string"==typeof e.displayName||"string"==typeof e.full_name)}function ye(e){return fe(e)&&"string"==typeof e.n&&"string"==typeof e.x&&"number"==typeof e.exp}function be(e){return pe(e)&&"string"==typeof e.owner&&"string"==typeof e.device_type&&"string"==typeof e.name}function ge(e){return pe(e)&&"string"==typeof e.owner&&fe(e.httpServicePorts)}function ve(e){return pe(e)&&"string"==typeof e.hostname&&"string"==typeof e.owner&&Array.isArray(e.oods)&&"string"==typeof e.boot_jwt}function _e(e){if(!fe(e)||!we(e["@context"])||"string"!=typeof e.id)return!1;const t=e.service;return Array.isArray(t)&&t.some((e=>fe(e)&&e.type===le))}const Ie="https://www.w3.org/ns/did/v1",Se="https://buckyos.org/ns",je=15768e4,ke=31536e4;function Oe(e){return[Ie,`${Se}/${e}/v1`]}function xe(){return Math.floor(Date.now()/1e3)}const Ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ne(e){let t="";for(let n=0;n<e.length;n+=3){const i=e[n],r=n+1<e.length?e[n+1]:0,o=n+2<e.length?e[n+2]:0;t+=Ee[i>>2],t+=Ee[(3&i)<<4|r>>4],t+=n+1<e.length?Ee[(15&r)<<2|o>>6]:"=",t+=n+2<e.length?Ee[63&o]:"="}return t}function Te(e){const t=e.replace(/[^A-Za-z0-9+/]/g,""),n=Math.floor(3*t.length/4),i=new Uint8Array(n);let r=0;for(let o=0;o<t.length;o+=4){const e=Ee.indexOf(t[o]),n=Ee.indexOf(t[o+1]),s=o+2<t.length?Ee.indexOf(t[o+2]):-1,c=o+3<t.length?Ee.indexOf(t[o+3]):-1;i[r++]=e<<2|n>>4,s>=0&&(i[r++]=(15&n)<<4|s>>2),c>=0&&(i[r++]=(3&s)<<6|c)}return i.subarray(0,r)}function De(e){return Ne(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function Ae(e){return Te(e.replace(/-/g,"+").replace(/_/g,"/"))}function Je(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);const t=[];for(let n=0;n<e.length;n++){let i=e.codePointAt(n);i>65535&&n++,i<128?t.push(i):i<2048?t.push(192|i>>6,128|63&i):i<65536?t.push(224|i>>12,128|i>>6&63,128|63&i):t.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i)}return new Uint8Array(t)}function Ce(e){return De(Je(e))}function Be(e){return function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0;n<e.length;){const i=e[n];if(i<128)t+=String.fromCharCode(i),n+=1;else if(i<224)t+=String.fromCharCode((31&i)<<6|63&e[n+1]),n+=2;else if(i<240)t+=String.fromCharCode((15&i)<<12|(63&e[n+1])<<6|63&e[n+2]),n+=3;else{const r=(7&i)<<18|(63&e[n+1])<<12|(63&e[n+2])<<6|63&e[n+3];t+=String.fromCodePoint(r),n+=4}}return t}(Ae(e))}async function Ke(){if(!function(){var e;const t=globalThis.process;return Boolean(null==(e=null==t?void 0:t.versions)?void 0:e.node)}())return null;try{return await async function(e){return"function"==typeof require?require(e):Function("name","return import(name)")(e)}("node:crypto")}catch{return null}}function He(){var e;const t=null==(e=globalThis.crypto)?void 0:e.subtle;if(!t)throw new Error("namelib: no crypto backend available (need node:crypto or WebCrypto with Ed25519 support)");return t}const $e=new Uint8Array([48,42,48,5,6,3,43,101,112,3,33,0]);function Re(e){return Te(e.replace(/-----BEGIN [^-]+-----/g,"").replace(/-----END [^-]+-----/g,"").replace(/\s+/g,""))}function Pe(e){const t=Ne(e),n=[];for(let i=0;i<t.length;i+=64)n.push(t.slice(i,i+64));return`-----BEGIN PRIVATE KEY-----\n${n.join("\n")}\n-----END PRIVATE KEY-----\n`}function Me(e){const t=Ae(e.x);if(32!==t.length)throw new Error(`namelib: invalid Ed25519 jwk, x must be 32 bytes, got ${t.length}`);return function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n}($e,t)}async function Ue(e){const t=await Ke();if(t){const n=t.createPrivateKey({key:e,format:"pem"});return t.createPublicKey(n).export({format:"jwk"}).x}const n=He(),i=Re(e),r=await n.importKey("pkcs8",i,{name:"Ed25519"},!0,["sign"]),o=await n.exportKey("jwk",r);if(!o.x)throw new Error("namelib: cannot derive public key from private pem");return o.x}function Le(e){const t=e.x;if("string"!=typeof t||0===t.length)throw new Error("namelib: invalid jwk, missing x");return t}function ze(e){return{kty:"OKP",crv:"Ed25519",x:e}}async function Fe(e,t,n){const i=`${Ce(JSON.stringify(n??{alg:"EdDSA"}))}.${Ce(JSON.stringify(e))}`,r=await async function(e,t){const n=await Ke();if(n){const i=n.createPrivateKey({key:t,format:"pem"});return new Uint8Array(n.sign(null,e,i))}const i=He(),r=Re(t),o=await i.importKey("pkcs8",r,{name:"Ed25519"},!1,["sign"]),s=await i.sign({name:"Ed25519"},o,e);return new Uint8Array(s)}(Je(i),t);return`${i}.${De(r)}`}function Ye(e){const t=e.split(".");if(3!==t.length)throw new Error("namelib: invalid jwt, parts.len != 3");return JSON.parse(Be(t[1]))}async function qe(e,t){const n=e.split(".");if(3!==n.length)throw new Error("namelib: invalid jwt, parts.len != 3");const i=JSON.parse(Be(n[0]));if("EdDSA"!==i.alg)throw new Error(`namelib: unsupported jwt alg: ${i.alg}`);const r=`${n[0]}.${n[1]}`,o=await async function(e,t,n){const i=await Ke();if(i){const r=i.createPublicKey({key:{kty:n.kty,crv:n.crv,x:n.x},format:"jwk"});return i.verify(null,e,r,t)}const r=He(),o=Me(n),s=await r.importKey("spki",o,{name:"Ed25519"},!1,["verify"]);return r.verify({name:"Ed25519"},s,t,e)}(Je(r),Ae(n[2]),t);if(!o)throw new Error("namelib: jwt signature verify failed");return JSON.parse(Be(n[1]))}function We(e){return e.startsWith("{")||e.startsWith("[")?{type:"json",value:JSON.parse(e)}:{type:"jwt",jwt:e}}function Ze(e){return"jwt"===e.type?Ye(e.jwt):e.value}let Xe=null;class Ge{constructor(e,t){this.method=e,this.id=t}static undefined(){return new Ge("undefined","undefined")}isUndefined(){return"undefined"===this.method}isValid(){return"undefined"!==this.method}static isDid(e){return e.startsWith("did:")}static fromStr(e){const t=e.split(":");if("did"!==t[0]){const t=Ge.fromHostName(e);if(t)return t;throw new Error(`namelib: invalid did ${e}`)}return new Ge(t[1],t.slice(2).join(":"))}static fromHostName(e){if(e.endsWith(".did")){const t=e.slice(0,-4),n=t.lastIndexOf(".");if(n>0&&n<t.length-1)return new Ge(t.slice(n+1),t.slice(0,n))}if(Xe)for(const t of Object.keys(Xe)){const n=Xe[t];if(e.endsWith(n)){if(e===n)break;const i=e.slice(0,e.length-n.length-1);return new Ge(t,i)}}return new Ge("web",e)}static fromHostNameByBridge(e,t,n){if(e.endsWith(n)&&e!==n){const i=e.slice(0,e.length-n.length-1);return new Ge(t,i)}if(e.endsWith(".did")){const t=e.slice(0,-4),n=t.lastIndexOf(".");if(n>0&&n<t.length-1)return new Ge(t.slice(n+1),t.slice(0,n))}return new Ge("web",e)}toString(){return`did:${this.method}:${this.id}`}isNamedObjId(){return"dev"===this.method}getPathFromId(){const e=this.id.split(":");return e.length>1?e.slice(1).join("/"):null}upperDid(){const e=(this.id.split(":")[0]??"").split("%")[0]??"";switch(this.method){case"web":{if(tt(e))return null;const t=e.indexOf(".");if(t<0)return null;const n=e.slice(t+1);return n.includes(".")?new Ge("web",n):null}case"bns":{const t=e.indexOf(".");return t<0?null:new Ge("bns",e.slice(t+1))}default:return null}}toFilename(){const e="0123456789ABCDEF",t=Je(this.toRawHostUri());let n="";for(const i of t){const t=String.fromCharCode(i);/[A-Za-z0-9._-]/.test(t)?n+=t:n+=`%${e[i>>4]}${e[15&i]}`}return n}getEd25519AuthKey(){return"dev"===this.method?Ae(this.id):null}getAuthKeyJwk(){return"dev"===this.method?ze(this.id):null}toRawHostName(){const e=this.id.split(":")[0];return"web"===this.method?e:`${e}.${this.method}.did`}toRawHostUri(){const e=this.toRawHostName(),t=this.getPathFromId();return t?`${e}/${t}`:e}toHostNameByBridge(e){const t=this.id.split(":")[0];return"web"===this.method?t:`${t}.${e}`}toHostName(){const e=this.id.split(":")[0];if("web"===this.method)return e;if(Xe){const t=Xe[this.method];if(t)return`${e}.${t}`}return`${e}.${this.method}.did`}toHostUri(){const e=this.toHostName(),t=this.getPathFromId();return t?`${e}/${t}`:e}equals(e){return this.method===e.method&&this.id===e.id}}function Ve(e){let t,n="OOD",i=e;e.startsWith("#")?(n="Gateway",i=e.slice(1)):e.startsWith("$")&&(n="OODOnly",i=e.slice(1));const r=i.lastIndexOf("@");let o,s=i;r>=0&&(s=i.slice(0,r),t=i.slice(r+1));let c=s;const a=s.indexOf(":");if(a>=0&&(c=s.slice(0,a),o=s.slice(a+1),!tt(o)))throw new Error(`namelib: invalid ip addr: ${o}`);if(void 0!==o&&void 0===t&&(t="wan"),!c)throw new Error("namelib: name in OODDescriptionString is empty");return nt({name:c,nodeType:n,netId:t,ip:o})}function Qe(e){let t;switch(e.nodeType){case"OOD":t=e.name;break;case"Gateway":t=`#${e.name}`;break;case"OODOnly":t=`$${e.name}`;break;default:throw new Error("namelib: node type is not allow in oods")}return void 0!==e.ip?(t+=`:${e.ip}`,void 0!==e.netId&&"wan"!==e.netId&&(t+=`@${e.netId}`),t):(void 0!==e.netId&&(t+=`@${e.netId}`),t)}function et(e){return"Gateway"===e||"OOD"===e}function tt(e){const t=e.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);return t?t.slice(1).every((e=>Number(e)<=255)):/^[0-9a-fA-F:]+$/.test(e)&&e.includes(":")}function nt(e){for(const t of Object.keys(e))void 0===e[t]&&delete e[t];return e}function it(e){return e instanceof Ge?e:Ge.fromStr(e)}function rt(e){const t=it(e.did),n=e.now??xe(),i=t.toString();return{"@context":Oe("owner"),id:i,verificationMethod:[{type:"Ed25519VerificationKey2020",id:"#main_key",controller:i,publicKeyJwk:e.publicKeyJwk}],authentication:["#main_key"],assertion_method:["#main_key"],capabilityInvocation:["#main_key"],exp:n+ke,iat:n,version_seq:0,name:e.name,display_name:e.displayName,zone_binding_model_version:2}}function ot(e,t){const n=it(t).toString(),i=(e.binded_zone_list??[]).filter((e=>e!==n));i.unshift(n),e.binded_zone_list=i,e.zone_binding_model_version=2,st(e)}function st(e){var t;const n=null==(t=e.binded_zone_list)?void 0:t[0],i=`${e.id}#lastDoc`,r=(e.service??[]).filter((e=>e.id!==i));if(void 0!==n){const t=it(n);r.push({id:i,type:"DIDDoc",serviceEndpoint:`https://${t.toHostName()}/resolve/${e.id}`})}e.service=r}function ct(e,t){const n=it(t).toString();return(e.binded_zone_list??[]).includes(n)}function at(e){const t=it(e.id),n=it(e.ownerDid),i=e.now??xe(),r=t.toString();return{"@context":Oe("zone"),id:r,verificationMethod:[{type:"Ed25519VerificationKey2020",id:"#main_key",controller:n.toString(),publicKeyJwk:e.publicKeyJwk}],authentication:["#main_key"],assertionMethod:["#main_key"],capabilityInvocation:["#main_key"],service:[{id:`${r}#lastDoc`,type:"DIDDoc",serviceEndpoint:`https://${t.toHostName()}/resolve/this_zone`}],exp:i+ke,iat:i,version_seq:0,hostname:t.toHostName(),owner:n.toString(),oods:[],boot_jwt:""}}function ut(e){return nt({id:void 0!==e.id?it(e.id).toString():void 0,oods:[...e.oods],sn:e.sn,exp:e.exp,owner:void 0!==e.owner?it(e.owner).toString():void 0,owner_key:e.ownerKey})}async function ht(e,t){const{id:n,oods:i,sn:r,exp:o,owner:s,owner_key:c,...a}=e;return Fe(nt({id:n,oods:i,sn:r,exp:o,owner:s,...a,owner_key:c}),t)}function lt(e){const t=e.now??xe(),n=`did:dev:${e.pkx}`;return{"@context":Oe("device"),id:n,verificationMethod:[{type:"Ed25519VerificationKey2020",id:"#main_key",controller:n,publicKeyJwk:ze(e.pkx)}],authentication:["#main_key"],assertion_method:["#main_key"],capabilityInvocation:["#main_key"],exp:t+je,iat:t,version_seq:0,owner:Ge.undefined().toString(),device_type:"ood",name:e.name}}function dt(e,t,n){return lt({name:e,pkx:Le(t),now:n})}function ft(e,t,n,i){const r=`did:dev:${t.x}`,o={"@context":Oe("device"),id:r,verificationMethod:[{type:"Ed25519VerificationKey2020",id:"#main_key",controller:r,publicKeyJwk:ze(t.x)}],authentication:["#main_key"],assertion_method:["#main_key"],capabilityInvocation:["#main_key"],exp:t.exp,iat:t.exp-je,version_seq:0,zone_did:it(n).toString(),owner:it(i).toString(),device_type:"ood",device_mini_document_jwt:e,name:t.n};return void 0!==t.p&&(o.rtcp_port=t.p),o}async function wt(e,t){if(void 0===e.version_seq)throw new Error("namelib: DeviceDocument version_seq is required when encoding as JWT");return Fe(pt(e),t)}function pt(e){const{"@context":t,id:n,verificationMethod:i,authentication:r,assertion_method:o,capabilityInvocation:s,service:c,exp:a,iat:u,version_seq:h,keyScope:l,"buckyos:scopes":d,zone_did:f,owner:w,device_type:p,device_mini_document_jwt:m,name:y,rtcp_port:b,ips:g,net_id:v,ddns_sn_url:_,support_container:I,capbilities:S,...j}=e,k=l??d;return nt({"@context":t,id:n,verificationMethod:i,authentication:r,assertion_method:o&&o.length>0?o:void 0,capabilityInvocation:s&&s.length>0?s:void 0,service:c&&c.length>0?c:void 0,exp:a,iat:u,version_seq:h,...j,keyScope:k&&Object.keys(k).length>0?k:void 0,zone_did:f,owner:w,device_type:p,device_mini_document_jwt:m,name:y,rtcp_port:b,ips:g&&g.length>0?g:void 0,net_id:v,ddns_sn_url:_,support_container:!1!==I&&void 0,capbilities:S&&Object.keys(S).length>0?S:void 0})}function mt(e){return nt({n:e.name,x:e.x,p:e.rtcpPort,exp:e.exp})}function yt(e){const t=e.verificationMethod.find((e=>"#main_key"===e.id));if(!t)throw new Error("namelib: device document has no #main_key verification method");return mt({name:e.name,x:Le(t.publicKeyJwk),rtcpPort:e.rtcp_port,exp:e.exp})}async function bt(e,t){const{n:n,x:i,p:r,exp:o,...s}=e;return Fe(nt({n:n,x:i,p:r,exp:o,...s}),t)}function gt(e){const{"@context":t,id:n,verificationMethod:i,authentication:r,assertion_method:o,capabilityInvocation:s,service:c,exp:a,iat:u,version_seq:h,mini_version_seq:l,valid_iat:d,keyScope:f,"buckyos:scopes":w,name:p,display_name:m,avatar:y,meta:b,zone_binding_model_version:g,binded_zone_list:v,wallets:_,...I}=e,S=f??w;return nt({"@context":t,id:n,verificationMethod:i,authentication:r,assertion_method:o&&o.length>0?o:void 0,capabilityInvocation:s&&s.length>0?s:void 0,service:c&&c.length>0?c:void 0,exp:a,iat:u,version_seq:h,mini_version_seq:l,valid_iat:d,...I,keyScope:S&&Object.keys(S).length>0?S:void 0,name:p,display_name:m,avatar:y,meta:b,zone_binding_model_version:g,binded_zone_list:v&&v.length>0?v:void 0,wallets:_&&Object.keys(_).length>0?_:void 0})}async function vt(e,t){if(void 0===e.version_seq)throw new Error("namelib: ZoneDocument version_seq is required when encoding as JWT");return Fe(_t(e),t)}function _t(e){const{"@context":t,id:n,verificationMethod:i,authentication:r,assertionMethod:o,capabilityInvocation:s,service:c,exp:a,iat:u,version_seq:h,keyScope:l,"buckyos:scopes":d,hostname:f,owner:w,oods:p,boot_jwt:m,mini_device_jwts:y,devices:b,sn:g,...v}=e,_=l??d;return nt({"@context":t,id:n,verificationMethod:i,authentication:r,assertionMethod:o&&o.length>0?o:void 0,capabilityInvocation:s&&s.length>0?s:void 0,service:c&&c.length>0?c:void 0,exp:a,iat:u,version_seq:h,...v,keyScope:_&&Object.keys(_).length>0?_:void 0,hostname:f,owner:w,oods:p,boot_jwt:m,mini_device_jwts:y&&Object.keys(y).length>0?y:void 0,devices:b&&Object.keys(b).length>0?b:void 0,sn:g})}function It(e){return gt(e)}function St(e){return _t(e)}function jt(e){return pt(e)}function kt(e){return e.keyScope??e["buckyos:scopes"]??{}}function Ot(e,t){const n=e.verificationMethod??[];if(0===n.length)return null;if(void 0===t)return n[0].publicKeyJwk;const i=n.find((e=>e.id===t));return i?i.publicKeyJwk:null}function xt(e,t){return kt(e)[t]??null}function Et(e){return Object.keys(kt(e)).length>0}function Nt(e){const t=e.capabilityInvocation;if(Array.isArray(t)&&t.length>0)return t;const n=e.authentication;if(Array.isArray(n)&&n.length>0)return n;if(_e(e)){const t=e.assertionMethod;if(Array.isArray(t)&&t.length>0)return t}return null}function Tt(e,t){const n=e.id;if(t.startsWith(n)){const e=t.slice(n.length);if(e.startsWith("#"))return e}return t}function Dt(e,t){return t.startsWith("#")?`${e.id}${t}`:t}function At(e,t,n){return t===n||Tt(e,t)===Tt(e,n)||Dt(e,t)===Dt(e,n)}function Jt(e,t){for(const n of t){const t=Ot(e,Tt(e,n));if(t)return[n,t]}return null}function Ct(e){const t="string"==typeof e?We(e):e,n="jwt"===t.type,i=Ze(t);if("object"!=typeof i||null===i)throw new Error("namelib: unknown did document");const r=e=>{if(n&&"number"!=typeof i.version_seq)throw new Error(`namelib: ${e} version_seq is required when encoding as JWT`)};if(void 0!==i.verificationMethod&&void 0!==i.name&&(void 0!==i.display_name||void 0!==i.displayName||void 0!==i.full_name))return r("OwnerDocument"),{docType:"owner",doc:i};if(void 0!==i.httpServicePorts)return r("AgentDocument"),{docType:"agent",doc:i};if(void 0!==i.device_type)return r("DeviceDocument"),{docType:"device",doc:i};if(void 0!==i.oods)return r("ZoneDocument"),{docType:"zone",doc:i};if(Array.isArray(i.service)&&i.service.some((e=>(null==e?void 0:e.type)===le)))return r("DIDObjectCard"),{docType:"did-object",doc:i};throw new Error("namelib: unknown did document")}const Bt=Object.freeze(Object.defineProperty({__proto__:null,BUCKYOS_CONTEXT_BASE:Se,DEFAULT_EXPIRE_TIME:je,DID:Ge,DID_CORE_CONTEXT:Ie,DID_DOC_AUTHKEY:"#auth-key",KEY_SCOPE_AGENT_CREATE_CONTENT:"agent:create-content",KEY_SCOPE_AGENT_RECEIVE:"agent:receive",KEY_SCOPE_AGENT_SPEND:"agent:spend",KEY_SCOPE_CONTENT_CREATE:"content:create",KEY_SCOPE_MANUAL:"manual",KEY_SCOPE_MESSAGE_CREATE:"message:create",KEY_SCOPE_ZONE_PUBLISH:"zone:publish",ZONE_BINDING_MODEL_VERSION:2,base64UrlDecodeToBytes:Ae,base64UrlDecodeToString:Be,base64UrlEncodeBytes:De,base64UrlEncodeString:Ce,buckyosContext:Oe,buckyosGetUnixTimestamp:xe,createJwkByX:ze,decodeDeviceDocument:async function(e,t){const n=t?await qe(e,t):Ye(e);if(void 0===n.version_seq)throw new Error("namelib: DeviceDocument version_seq is required when decoding from JWT");return n},decodeJwtClaimWithoutVerify:Ye,decodeJwtHeaderWithoutVerify:function(e){const t=e.split(".");if(3!==t.length)throw new Error("namelib: invalid jwt, parts.len != 3");return JSON.parse(Be(t[0]))},decodeZoneBootDocument:async function(e,t){return t?await qe(e,t):Ye(e)},derToPkcs8Pem:Pe,deviceDocumentToOrderedJson:jt,deviceMiniDocumentFromJwt:async function(e,t){return t?await qe(e,t):Ye(e)},deviceMiniDocumentToJwt:bt,encodeDeviceDocument:wt,encodeOwnerDocument:async function(e,t){if(void 0===e.version_seq)throw new Error("namelib: OwnerDocument version_seq is required when encoding as JWT");return Fe(gt(e),t)},encodeZoneBootDocument:ht,encodeZoneDocument:vt,encodedDocumentFromStr:We,encodedDocumentToJsonValue:Ze,encodedDocumentToString:function(e){return"jwt"===e.type?e.jwt:JSON.stringify(e.value)},expandLocalKeyId:Dt,generateEd25519KeyPair:async function(){const e=await Ke();if(e){const{privateKey:t,publicKey:n}=e.generateKeyPairSync("ed25519");return{privateKeyPem:t.export({type:"pkcs8",format:"pem"}).toString(),publicKeyJwk:ze(n.export({format:"jwk"}).x)}}const t=He(),n=await t.generateKey({name:"Ed25519"},!0,["sign","verify"]),i=new Uint8Array(await t.exportKey("pkcs8",n.privateKey)),r=await t.exportKey("jwk",n.publicKey);if(!r.x)throw new Error("namelib: WebCrypto did not return Ed25519 public jwk");return{privateKeyPem:Pe(i),publicKeyJwk:ze(r.x)}},getDeviceDidFromJwk:function(e){return`did:dev:${Le(e)}`},getDidDocType:function(e){return e.docType},getDocumentAuthKey:Ot,getDocumentDefaultKey:function(e){const t=(e.verificationMethod??[]).find((e=>"#main_key"===e.id));return t?t.publicKeyJwk:null},getDocumentKeyScope:kt,getKeyByScope:function(e,t){const n=xt(e,t);if(n)return Jt(e,n);if(Et(e))return null;const i=Nt(e);if(i){const t=Jt(e,i);if(t)return t}const r=Ot(e);return r?["",r]:null},getKeyFromKeyIds:Jt,getKeyIdsByScope:xt,getKnownWeb3BridgeConfig:function(){return Xe},getPublicKeyXFromPrivatePem:Ue,getStandardScopeKeyIds:Nt,getXFromJwk:Le,hasKeyScope:Et,isKeyAllowedInScope:function(e,t,n){const i=xt(e,t);if(i)return i.some((t=>At(e,t,n)));if(Et(e))return!1;const r=Nt(e);return r?r.some((t=>At(e,t,n))):null!==Ot(e,Tt(e,n))},isSameDocumentKeyId:At,newDeviceDocument:lt,newDeviceDocumentByJwk:dt,newDeviceDocumentByMiniDocument:ft,newDeviceMiniDocument:mt,newDeviceMiniDocumentByDeviceDocument:yt,newOwnerDocument:rt,newOwnerDocumentByPkx:function(e,t){const n=e.split(":");if(0===n.length||!n[0])throw new Error("namelib: invalid pkx: empty x");const i=n[0];if(!/^[A-Za-z0-9_-]+$/.test(i))throw new Error("namelib: invalid pkx: x must be base64url");if(32!==Ae(i).length)throw new Error("namelib: invalid pkx: x length must be 32 bytes");const r=ze(i);if(1===n.length){const e=Ge.fromStr(t),n=e.id;return rt({did:e,name:n,displayName:`${n}@${t}`,publicKeyJwk:r})}if(n.length>=3){const e=n[2];return rt({did:new Ge(n[1],n[2]),name:e,displayName:`${e}@${t}`,publicKeyJwk:r})}throw new Error(`namelib: invalid pkx: ${e}`)},newZoneBootDocument:ut,newZoneDocument:at,normalizeKeyIdForLocalLookup:Tt,oodDescriptionToString:Qe,oodNodeTypeIsGateway:et,oodNodeTypeIsOod:function(e){return"OOD"===e||"OODOnly"===e},ownerDocumentGetDefaultZoneDid:function(e){var t;return(null==(t=e.binded_zone_list)?void 0:t[0])??null},ownerDocumentGetHistoricalKeys:function(e){return e.verificationMethod.filter((e=>"#main_key"!==e.id)).map((e=>[e.id,e.publicKeyJwk]))},ownerDocumentGetZoneBindingState:function(e,t){const n=e.zone_binding_model_version;return void 0===n?"legacy":2!==n?"unsupported_version":ct(e,t)?"bound_v2":"unbound_v2"},ownerDocumentIsBoundToZone:ct,ownerDocumentRemoveBoundZone:function(e,t){var n;const i=it(t).toString(),r=(null==(n=e.binded_zone_list)?void 0:n.length)??0;e.binded_zone_list=(e.binded_zone_list??[]).filter((e=>e!==i));const o=e.binded_zone_list.length!==r;return e.zone_binding_model_version=2,st(e),o},ownerDocumentSetDefaultZoneDid:ot,ownerDocumentToOrderedJson:It,ownerDocumentValidateJwtRevocation:function(e,t,n){if(void 0===e.mini_version_seq&&void 0===e.valid_iat)return;if("jwt"!==n.type)return;const i=Ze(n);if(void 0!==e.mini_version_seq){const n="number"==typeof(null==i?void 0:i.version_seq)?i.version_seq:void 0;if(void 0===n)throw new Error(`namelib: ${t} JWT missing version_seq required by owner revocation policy`);if(n<=e.mini_version_seq)throw new Error(`namelib: ${t} JWT version_seq ${n} is not greater than owner mini_version_seq ${e.mini_version_seq}`)}if(void 0!==e.valid_iat){const n="number"==typeof(null==i?void 0:i.iat)?i.iat:void 0;if(void 0===n)throw new Error(`namelib: ${t} JWT missing iat required by owner revocation policy`);if(n<=e.valid_iat)throw new Error(`namelib: ${t} JWT iat ${n} is not greater than owner valid_iat ${e.valid_iat}`)}},parseDidDoc:Ct,parseDidDocAs:function(e,t){const n=Ct(e);if(n.docType!==t)throw new Error(`namelib: expected ${t} document, got ${n.docType}`);return n.doc},parseOODDescription:Ve,pemToDer:Re,resetKnownWeb3BridgeConfigForTest:function(){Xe=null},setKnownWeb3BridgeConfig:function(e){return null===Xe&&(Xe={...e},!0)},signJwtEdDSA:Fe,verifyJwtEdDSA:qe,zoneBootDocumentGetGatewayName:function(e){for(const t of e.oods){const e=Ve(t);if(et(e.nodeType))return e.name}return""},zoneBootDocumentToZoneDocument:function(e,t){if(!e.id||!e.owner_key)throw new Error("namelib: zone boot document needs id and owner_key to build zone document");const n=e.owner?Ge.fromStr(e.owner):Ge.undefined(),i=at({id:e.id,ownerDid:n,publicKeyJwk:e.owner_key});return i.boot_jwt=t,i.oods=[...e.oods],void 0!==e.sn?i.sn=e.sn:delete i.sn,i.exp=e.exp,i.iat=e.exp-je,i.version_seq=0,i.owner=e.owner??Ge.undefined().toString(),i},zoneDocumentGetDefaultGateway:function(e){for(const t of e.oods){const e=Ve(t);if(et(e.nodeType))return e.name}return null},zoneDocumentGetSnApiUrl:function(e){return void 0!==e.sn?`https://${e.sn}/kapi/sn`:null},zoneDocumentToOrderedJson:St},Symbol.toStringTag,{value:"Module"}));var Kt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const $t=Ht((function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");if(null===t||"object"!=typeof t)return JSON.stringify(t);if(t.toJSON instanceof Function)return e(t.toJSON());if(Array.isArray(t)){return`[${t.reduce(((t,n,i)=>`${t}${0===i?"":","}${e(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`}return`{${Object.keys(t).sort().reduce(((n,i)=>{if(void 0===t[i]||"symbol"==typeof t[i])return n;return`${n}${0===n.length?"":","}${e(i)}:${e(t[i])}`}),"")}}`}));class Rt extends Error{constructor(e,t){super(`${e}: ${t}`),this.kind=e,this.name="NdnError"}}const Pt="cyfile",Mt="cydir",Ut="cypath",Lt="cyinc",zt="cyrel",Ft="cypack",Yt="cytrie",qt="cytrie-s",Wt="cymap-mtp",Zt="cymap",Xt="cylist-mtree",Gt="cylist",Vt="cl",Qt="clist",en="clist-fix",tn="cl-sf",nn="same",rn="part_of",on="0123456789abcdef";function sn(e){let t="";for(let n=0;n<e.length;n++){const i=e[n];t+=on[i>>>4&15],t+=on[15&i]}return t}function cn(e){if(e.length%2!=0)throw new Rt("InvalidId",`invalid hex length: ${e.length}`);const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const i=on.indexOf(e[2*n].toLowerCase()),r=on.indexOf(e[2*n+1].toLowerCase());if(i<0||r<0)throw new Rt("InvalidId","invalid hex char at offset "+2*n);t[n]=i<<4|r}return t}const an="abcdefghijklmnopqrstuvwxyz234567";function un(e){let t=0,n=0,i="";for(let r=0;r<e.length;r++)for(n=n<<8|e[r],t+=8;t>=5;)t-=5,i+=an[n>>>t&31];return t>0&&(i+=an[n<<5-t&31]),i}function hn(e){const t=e.toLowerCase();let n=0,i=0;const r=[];for(let o=0;o<t.length;o++){const e=t[o],s=an.indexOf(e);if(s<0)throw new Rt("InvalidId",`invalid base32 char '${e}' at ${o}`);i=i<<5|s,n+=5,n>=8&&(n-=8,r.push(i>>>n&255))}return new Uint8Array(r)}function ln(e){if(!Number.isFinite(e)||e<0)throw new Rt("InvalidParam",`varint must be non-negative finite: ${e}`);if(!Number.isSafeInteger(e))throw new Rt("InvalidParam",`varint exceeds safe integer range: ${e}`);const t=[];let n=e;for(;n>=128;)t.push(127&n|128),n=Math.floor(n/128);return t.push(127&n),new Uint8Array(t)}function dn(e,t=0){let n=0,i=1,r=t,o=0;for(;r<e.length;){const t=e[r++];o++;if(n+=(127&t)*i,!Number.isSafeInteger(n))throw new Rt("InvalidData","varint exceeds safe integer range");if(!(128&t))return[n,o];if(i*=128,o>10)throw new Rt("InvalidData","varint too long")}throw new Rt("InvalidData","varint truncated")}function fn(e){const t=new ce("SHA-256","UINT8ARRAY");return t.update(e),t.getHash("UINT8ARRAY")}function wn(e){const t=new ce("SHA-256","TEXT",{encoding:"UTF8"});return t.update(e),t.getHash("UINT8ARRAY")}function pn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(!(n<55296||n>57343)){if(n<=56319){const n=e.charCodeAt(t+1);if(t+1<e.length&&n>=56320&&n<=57343){t++;continue}}throw new Rt("InvalidData","JSON string contains lone surrogate")}}}function mn(e){if(function(e){switch(typeof e){case"string":return void pn(e);case"number":if(!Number.isFinite(e))throw new Rt("InvalidData","JSON number MUST be finite for JCS");if(Object.is(e,-0))throw new Rt("InvalidData","JSON number MUST NOT be negative zero for JCS");return;case"boolean":case"object":return;case"undefined":throw new Rt("InvalidData","undefined is not a valid JSON value");case"bigint":throw new Rt("InvalidData","bigint is not a valid JSON value");case"function":throw new Rt("InvalidData","function is not a valid JSON value");case"symbol":throw new Rt("InvalidData","symbol is not a valid JSON value")}}(e),null===e||"object"!=typeof e)return e;if(Array.isArray(e)){const t=new Array(e.length);for(let n=0;n<e.length;n++){if(!Object.prototype.hasOwnProperty.call(e,n))throw new Rt("InvalidData","sparse arrays are not valid JSON values");t[n]=mn(e[n])}return t}const t=Object.keys(e).sort(),n={};for(const i of t)pn(i),n[i]=mn(e[i]);return n}function yn(e){const t=mn(e),n=$t(t);if(void 0===n)throw new Rt("InvalidData","failed to canonicalize JSON value");return n}const bn={Sha256:"sha256",Sha512:"sha512",QCID:"qcid",Blake2s256:"blake2s256",Keccak256:"keccak256",hashResultSize(e){switch(e){case"sha256":case"qcid":case"blake2s256":case"keccak256":return 32;case"sha512":return 64}},parse(e){const t=e.startsWith("mix");return[bn.fromString(e),t]},fromString(e){switch(e){case"sha256":case"mix256":return"sha256";case"sha512":case"mix512":return"sha512";case"qcid":case"mixqcid":return"qcid";case"blake2s256":case"mixblake2s256":return"blake2s256";case"keccak256":case"mixkeccak256":return"keccak256";default:throw new Rt("InvalidData",`Invalid hash method: ${e}`)}}},gn={Sha256:"sha256",Mix256:"mix256",Sha512:"sha512",Mix512:"mix512",QCID:"qcid",Blake2s256:"blake2s256",MixBlake2s256:"mixblake2s256",Keccak256:"keccak256",MixKeccak256:"mixkeccak256",isChunkType(e){switch(e){case"sha256":case"mix256":case"sha512":case"mix512":case"qcid":case"blake2s256":case"mixblake2s256":case"keccak256":case"mixkeccak256":return!0;default:return!1}},isMix(e){switch(e){case"mix256":case"mix512":case"mixblake2s256":case"mixkeccak256":case"qcid":return!0;default:return!1}},fromHashType(e,t){switch(e){case"sha256":return t?"mix256":"sha256";case"sha512":return t?"mix512":"sha512";case"qcid":if(!t)throw new Rt("InvalidObjType","QCID must be mix hash");return"qcid";case"blake2s256":return t?"mixblake2s256":"blake2s256";case"keccak256":return t?"mixkeccak256":"keccak256"}},toHashMethod(e){switch(e){case"sha256":case"mix256":return"sha256";case"sha512":case"mix512":return"sha512";case"qcid":return"qcid";case"blake2s256":case"mixblake2s256":return"blake2s256";case"keccak256":case"mixkeccak256":return"keccak256";default:throw new Rt("InvalidObjType",`invalid chunk type: ${e}`)}}};class vn{constructor(e,t){this.objType=e,this.objHash=t}static fromString(e){const t=e.split(":");if(1===t.length){const e=hn(t[0]);let n=-1;for(let t=0;t<e.length;t++)if(58===e[t]){n=t;break}if(n<0)throw new Rt("InvalidId","separator ':' not found");const i=Mn(e.subarray(0,n)),r=e.slice(n+1);return new vn(i,r)}if(2===t.length)return new vn(t[0],cn(t[1]));throw new Rt("InvalidId",e)}static fromBytes(e){if(e.length<3)throw new Rt("InvalidId","objid bytes too short");let t=-1;for(let r=0;r<e.length;r++)if(58===e[r]){t=r;break}if(t<0)throw new Rt("InvalidId","separator ':' not found");const n=Mn(e.subarray(0,t)),i=e.slice(t+1);return new vn(n,i)}static fromValue(e){if("string"==typeof e)return vn.fromString(e);throw new Rt("InvalidData","ObjId MUST be string")}static fromHostname(e){const t=e.split(".")[0];return vn.fromString(t)}static fromPath(e){const t=e.split("/");for(let n=0;n<t.length;n++){const e=t[n];if(0!==e.length)try{const i=vn.fromString(e);return n<t.length-1?{objId:i,subPath:"/"+t.slice(n+1).join("/")}:{objId:i,subPath:null}}catch{}}throw new Rt("InvalidId",`no objid found in path: ${e}`)}static fromRaw(e,t){return new vn(e,t)}isChunk(){return gn.isChunkType(this.objType)}isChunkList(){return this.objType===Qt}isJson(){return!this.isChunk()&&!this.isContainer()&&this.objType!==Ft}isDirObject(){return this.objType===Mt}isFileObject(){return this.objType===Pt}isContainer(){switch(this.objType){case Mt:case Yt:case qt:case Wt:case Zt:case Xt:case Gt:case Vt:case Qt:case en:case tn:return!0;default:return!1}}isBigContainer(){switch(this.objType){case Yt:case Wt:case Xt:case Vt:case en:return!0;default:return!1}}toString(){return`${this.objType}:${sn(this.objHash)}`}toFilename(){return`${sn(this.objHash)}.${this.objType}`}toBase32(){return un(this.toBytes())}toBytes(){const e=Pn(this.objType),t=new Uint8Array(e.length+1+this.objHash.length);return t.set(e,0),t[e.length]=58,t.set(this.objHash,e.length+1),t}toJSON(){return this.toString()}equals(e){if(this.objType!==e.objType)return!1;if(this.objHash.length!==e.objHash.length)return!1;for(let t=0;t<this.objHash.length;t++)if(this.objHash[t]!==e.objHash[t])return!1;return!0}}class _n{constructor(e,t){this.chunkType=e,this.hashResult=t}static defaultChunkType(){return"mix256"}static fromString(e){const t=vn.fromString(e);if(!t.isChunk())throw new Rt("InvalidId",`invalid chunk id: ${e}`);return new _n(t.objType,t.objHash)}static fromObjId(e){return new _n(e.objType,new Uint8Array(e.objHash))}static fromBytes(e){const t=vn.fromBytes(e);return new _n(t.objType,t.objHash)}static fromHashResult(e,t){return new _n(t,new Uint8Array(e))}static fromMixHashResult(e,t,n){return new _n(n,_n.mixLengthAndHashResult(e,t))}static fromMixHashResultByHashMethod(e,t,n){const i=gn.fromHashType(n,!0);return new _n(i,_n.mixLengthAndHashResult(e,t))}static fromSha256Result(e){return new _n("sha256",new Uint8Array(e))}static fromMix256Result(e,t){return new _n("mix256",_n.mixLengthAndHashResult(e,t))}static mixLengthAndHashResult(e,t){const n=ln(e),i=new Uint8Array(n.length+t.length);return i.set(n,0),i.set(t,n.length),i}toObjId(){return new vn(this.chunkType,new Uint8Array(this.hashResult))}toString(){return`${this.chunkType}:${sn(this.hashResult)}`}toBase32(){const e=Pn(this.chunkType),t=new Uint8Array(e.length+1+this.hashResult.length);return t.set(e,0),t[e.length]=58,t.set(this.hashResult,e.length+1),un(t)}toDidString(){return`did:${this.chunkType}:${sn(this.hashResult)}`}toBytes(){return this.toObjId().toBytes()}toJSON(){return this.toString()}getLength(){if(0===this.hashResult.length)return null;if(!gn.isMix(this.chunkType))return null;try{const[e]=dn(this.hashResult,0);return e}catch{return null}}equalsHash(e){if(this.hashResult.length!==e.length)return!1;for(let t=0;t<this.hashResult.length;t++)if(this.hashResult[t]!==e[t])return!1;return!0}}class In{genObjId(){return jn(this.getObjType(),this.toJSON())}}function Sn(e,t){const n=wn(t);return vn.fromRaw(e,n)}function jn(e,t){const n=yn(t);return[Sn(e,n),n]}function kn(e,t){const[n]=jn(e.objType,t);return e.equals(n)}function On(e){if(e.indexOf("{")>=0)try{return JSON.parse(e)}catch(t){throw new Rt("InvalidId",`failed to parse obj_str: ${t.message}`)}throw new Rt("Unsupported","JWT-encoded named objects are not supported in this TypeScript port")}class xn{constructor(e={}){this.did=e.did??null,this.name=e.name??"",this.author=e.author??"",this.owner=e.owner??"",this.create_time=e.create_time??0,this.last_update_time=e.last_update_time??0,this.copyright=e.copyright??null,this.tags=e.tags??[],this.categories=e.categories??[],this.base_on=e.base_on??null,this.directory=e.directory??{},this.references=e.references??{},this.exp=e.exp??0}toJSON(){const e={};return null!=this.did&&(e.did=this.did),this.name.length>0&&(e.name=this.name),this.author.length>0&&(e.author=this.author),this.owner.length>0&&(e.owner=this.owner),e.create_time=this.create_time,e.last_update_time=this.last_update_time,null!=this.copyright&&(e.copyright=this.copyright),this.tags.length>0&&(e.tags=this.tags),this.categories.length>0&&(e.categories=this.categories),null!=this.base_on&&(e.base_on=this.base_on.toString()),Object.keys(this.directory).length>0&&(e.directory=this.directory),Object.keys(this.references).length>0&&(e.references=this.references),0!==this.exp&&(e.exp=this.exp),e}}function En(){return Math.floor(Date.now()/1e3)}class Nn extends In{constructor(e,t,n){super(),this.content_obj=new xn({name:e}),this.size=t,this.content=n,this.meta={}}static fromJSON(e){const t=new Nn("",0,""),n={},i={},r=new Set(["did","name","author","owner","create_time","last_update_time","copyright","tags","categories","base_on","directory","references","exp"]);for(const[o,s]of Object.entries(e))"size"===o?t.size=s??0:"content"===o?t.content=s??"":r.has(o)?"base_on"===o&&"string"==typeof s?n.base_on=vn.fromString(s):n[o]=s:i[o]=s;return t.content_obj=new xn(n),t.meta=i,t}getObjType(){return Pt}toJSON(){const e={...this.content_obj.toJSON()};0!==this.size&&(e.size=this.size),this.content.length>0&&(e.content=this.content);for(const[t,n]of Object.entries(this.meta))e[t]=n;return e}}class Tn extends In{constructor(e,t,n,i){super();const r=En();this.path=e,this.target=t,this.uptime=n??r,this.exp=i??r+94608e3}static fromJSON(e){const t=String(e.path??""),n=vn.fromString(String(e.target??"")),i=Number(e.uptime??0),r=Number(e.exp??0);return new Tn(t,n,i,r)}getObjType(){return Ut}toJSON(){return{path:this.path,uptime:this.uptime,target:this.target.toString(),exp:this.exp}}}class Dn extends In{constructor(e,t,n,i,r){super();const o=En();this.content_id=e.toString(),this.content_obj=t,this.curator=n,this.editor=[],this.meta=null,this.rank=i,this.collection=r,this.review_url=null,this.iat=o,this.exp=o+31104e3}static fromJSON(e){const t=new Dn(vn.fromString(String(e.content_id??"")),e.content_obj??null,String(e.curator??""),Number(e.rank??0),Array.isArray(e.collection)?e.collection.slice():[]);return t.content_id=String(e.content_id??""),t.editor=Array.isArray(e.editor)?e.editor.slice():[],t.meta=e.meta??null,t.review_url="string"==typeof e.review_url?e.review_url:null,t.iat=Number(e.iat??0),t.exp=Number(e.exp??0),t}getObjType(){return Lt}toJSON(){const e={content_id:this.content_id,content_obj:this.content_obj,curator:this.curator,editor:this.editor,meta:this.meta,rank:this.rank,iat:this.iat,exp:this.exp};return this.collection.length>0&&(e.collection=this.collection),null!=this.review_url&&(e.review_url=this.review_url),e}}const An={fromObjId:e=>({kind:"objId",objId:e}),fromObject:(e,t)=>({kind:"object",objType:e,obj:t}),fromObjectJwt:(e,t)=>({kind:"objectJwt",objType:e,jwt:t}),getObjType(e){switch(e.kind){case"objId":return e.objId.objType;case"object":case"objectJwt":return e.objType}},getObjId(e){switch(e.kind){case"objId":return[e.objId,""];case"object":return jn(e.objType,e.obj);case"objectJwt":throw new Rt("Unsupported","JWT-encoded SimpleMapItem requires JWT decoding (not implemented in TS port)")}},toJSON(e){switch(e.kind){case"objId":return e.objId.toString();case"object":return{obj_type:e.objType,body:e.obj};case"objectJwt":return{obj_type:e.objType,jwt:e.jwt}}},fromJSON(e){if("string"==typeof e)return{kind:"objId",objId:vn.fromString(e)};if(e&&"object"==typeof e&&!Array.isArray(e)){const t=e,n=t.obj_type;if("string"!=typeof n)throw new Rt("InvalidData","SimpleMapItem must have obj_type field");if("string"==typeof t.jwt)return{kind:"objectJwt",objType:n,jwt:t.jwt};if("body"in t)return{kind:"object",objType:n,obj:t.body};throw new Rt("InvalidData","SimpleMapItem must have body or jwt field")}throw new Rt("InvalidData","SimpleMapItem must be string or object")}};class Jn{constructor(){this.body=new Map}static fromJSON(e){const t=new Jn;if(!e||"object"!=typeof e)throw new Rt("InvalidData","SimpleObjectMap must be an object");const n=e.body;if(null==n)return t;if("object"!=typeof n||Array.isArray(n))throw new Rt("InvalidData","SimpleObjectMap.body must be an object");for(const[i,r]of Object.entries(n))t.body.set(i,An.fromJSON(r));return t}genObjIdWithRealObj(e,t){const n={};for(const[i,r]of this.body){const[e]=An.getObjId(r);n[i]=e.toString()}return t.body=n,jn(e,t)}get size(){return this.body.size}isEmpty(){return 0===this.body.size}get(e){return this.body.get(e)}set(e,t){this.body.set(e,t)}delete(e){return this.body.delete(e)}has(e){return this.body.has(e)}keys(){return this.body.keys()}values(){return this.body.values()}entries(){return this.body.entries()}toJSON(){const e={};for(const[t,n]of this.body)e[t]=An.toJSON(n);return{body:e}}}class Cn extends In{constructor(e){super(),this.content_obj=null!=e?new xn({name:e}):new xn,this.meta={},this.total_size=0,this.file_count=0,this.file_size=0,this.object_map=new Jn}static fromJSON(e){const t=new Cn,n=new Set(["did","name","author","owner","create_time","last_update_time","copyright","tags","categories","base_on","directory","references","exp"]),i={};for(const[r,o]of Object.entries(e))if("meta"===r)t.meta=o??{};else if("total_size"===r)t.total_size=Number(o??0);else if("file_count"===r)t.file_count=Number(o??0);else if("file_size"===r)t.file_size=Number(o??0);else if("body"===r){const e=o;if(e)for(const[n,i]of Object.entries(e))t.object_map.set(n,An.fromJSON(i))}else n.has(r)&&("base_on"===r&&"string"==typeof o?i.base_on=vn.fromString(o):i[r]=o);return t.content_obj=new xn(i),t}getObjType(){return Mt}toJSON(){const e={...this.content_obj.toJSON()};return Object.keys(this.meta).length>0&&(e.meta=this.meta),e.total_size=this.total_size,e.file_count=this.file_count,e.file_size=this.file_size,e.body=this.object_map.toJSON().body,e}genObjId(){const e={...this.content_obj.toJSON()};return e.total_size=this.total_size,e.file_count=this.file_count,e.file_size=this.file_size,this.object_map.genObjIdWithRealObj(Mt,e)}get size(){return this.object_map.size}isEmpty(){return this.object_map.isEmpty()}get(e){return this.object_map.get(e)}delete(e){return this.object_map.delete(e)}has(e){return this.object_map.has(e)}keys(){return this.object_map.keys()}values(){return this.object_map.values()}entries(){return this.object_map.entries()}addFile(e,t,n){this.file_size+=n,this.file_count+=1,this.total_size+=n,this.object_map.set(e,An.fromObject(Pt,t))}addDirectory(e,t,n){if(t.objType!==Mt)throw new Rt("InvalidParam","dir_obj_id is not a directory");this.total_size+=n,this.object_map.set(e,An.fromObjId(t))}listEntries(){return Array.from(this.object_map.keys())}isFile(e){const t=this.object_map.get(e);return!!t&&("object"===t.kind&&t.objType===Pt)}isDirectory(e){const t=this.object_map.get(e);if(!t)return!1;switch(t.kind){case"objId":return t.objId.objType===Mt;case"objectJwt":return t.objType===Mt;default:return!1}}}class Bn{constructor(){this.total_size=0,this.body=[]}static fromChunkList(e){const t=new Bn;for(const n of e){const e=n.getLength();if(null==e)throw new Rt("InvalidParam","get chunk length from chunkid failed");t.total_size+=e}return t.body=e.slice(),t}static fromJson(e){let t;try{t=JSON.parse(e)}catch(n){throw new Rt("InvalidParam",`parse chunk list from json failed: ${n.message}`)}return Bn.fromJsonValue(t)}static fromJsonValue(e){if(!Array.isArray(e))throw new Rt("InvalidParam","chunk list must be a JSON array");const t=e.map((e=>{if("string"!=typeof e)throw new Rt("InvalidParam","chunk list item must be a string");return _n.fromString(e)}));return Bn.fromChunkList(t)}appendChunk(e){const t=e.getLength();if(null==t)throw new Rt("InvalidParam","get chunk length from chunkid failed");this.body.push(e),this.total_size+=t}genObjId(){const e=this.body.map((e=>e.toString())),[t,n]=jn(Qt,e),i=_n.mixLengthAndHashResult(this.total_size,t.objHash);return[vn.fromRaw(Qt,i),n]}}class Kn extends In{constructor(e,t,n,i={}){super(),this.source=e,this.relation=t,this.target=n,this.body=i,this.iat=null,this.exp=null}static fromJSON(e){const t=new Set(["source","relation","target","iat","exp"]),n={};for(const[r,o]of Object.entries(e))t.has(r)||(n[r]=o);const i=new Kn(vn.fromString(String(e.source??"")),String(e.relation??""),vn.fromString(String(e.target??"")),n);return i.iat="number"==typeof e.iat?e.iat:null,i.exp="number"==typeof e.exp?e.exp:null,i}static createByLinkData(e,t){switch(t.kind){case"sameAs":return new Kn(e,nn,t.target);case"partOf":return new Kn(e,rn,t.target,{range:{start:t.range.start,end:t.range.end}})}}getLinkData(){switch(this.relation){case nn:return{kind:"sameAs",target:this.target};case rn:{const e=this.body.range;if(!e||"number"!=typeof e.start||"number"!=typeof e.end)throw new Rt("InvalidLink",`invalid range: ${JSON.stringify(this.body.range)}`);return{kind:"partOf",target:this.target,range:{start:e.start,end:e.end}}}default:throw new Rt("InvalidLink",`invalid relation: ${this.relation}`)}}getObjType(){return zt}toJSON(){const e={source:this.source.toString(),relation:this.relation,target:this.target.toString()};for(const[t,n]of Object.entries(this.body))e[t]=n;return null!=this.iat&&(e.iat=this.iat),null!=this.exp&&(e.exp=this.exp),e}}const Hn={fromObjData(e,t){switch(e.objType){case Mt:{let e;try{e=JSON.parse(t)}catch(n){throw new Rt("InvalidParam",`parse dir object from json failed: ${n.message}`)}return{kind:"dir",obj:Cn.fromJSON(e),objStr:t}}case Pt:{let e;try{e=JSON.parse(t)}catch(n){throw new Rt("InvalidParam",`parse file object from json failed: ${n.message}`)}return{kind:"file",obj:Nn.fromJSON(e),objStr:t}}case Qt:return{kind:"chunkList",obj:Bn.fromJson(t),objStr:t};default:throw new Rt("InvalidParam",`Unknown object type: ${e.objType}`)}},getChildObjs(e){switch(e.kind){case"dir":{const t=[];for(const[,n]of e.obj.entries()){const[e,i]=An.getObjId(n);t.push({objId:e,objStr:i.length>0?i:null})}return t}case"file":return 0===e.obj.content.length?[]:[{objId:vn.fromString(e.obj.content),objStr:null}];case"chunkList":return e.obj.body.map((e=>({objId:e.toObjId(),objStr:null})))}}},$n="undefined"!=typeof TextEncoder?new TextEncoder:null,Rn="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):null;function Pn(e){if($n)return $n.encode(e);const t=[];for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(192|i>>6,128|63&i);else if(i>=55296&&i<=56319&&n+1<e.length){const r=65536+((1023&i)<<10|1023&e.charCodeAt(++n));t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}else t.push(224|i>>12,128|i>>6&63,128|63&i)}return new Uint8Array(t)}function Mn(e){if(Rn)return Rn.decode(e);let t="",n=0;for(;n<e.length;){const i=e[n++];if(i<128)t+=String.fromCharCode(i);else if(i<224)t+=String.fromCharCode((31&i)<<6|63&e[n++]);else if(i<240)t+=String.fromCharCode((15&i)<<12|(63&e[n++])<<6|63&e[n++]);else{const r=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t+=String.fromCharCode(55296+(r>>10),56320+(1023&r))}}return t}const Un=Object.freeze(Object.defineProperty({__proto__:null,BaseContentObject:xn,ChunkId:_n,ChunkType:gn,DEFAULT_HASH_METHOD:"sha256",DirObject:Cn,FileObject:Nn,HashMethod:bn,InclusionProof:Dn,KnownStandardObject:Hn,NamedObjectBase:In,NdnError:Rt,OBJ_TYPE_ACTION:"cyact",OBJ_TYPE_CHUNK_LIST:Vt,OBJ_TYPE_CHUNK_LIST_FIX_SIZE:en,OBJ_TYPE_CHUNK_LIST_SIMPLE:Qt,OBJ_TYPE_CHUNK_LIST_SIMPLE_FIX_SIZE:tn,OBJ_TYPE_DIR:Mt,OBJ_TYPE_FILE:Pt,OBJ_TYPE_INCLUSION_PROOF:Lt,OBJ_TYPE_LIST:Xt,OBJ_TYPE_LIST_SIMPLE:Gt,OBJ_TYPE_MSG:"cymsg",OBJ_TYPE_MSG_RECE:"cymsgr",OBJ_TYPE_OBJMAP:Wt,OBJ_TYPE_OBJMAP_SIMPLE:Zt,OBJ_TYPE_PACK:Ft,OBJ_TYPE_PATH:Ut,OBJ_TYPE_PKG:"pkg",OBJ_TYPE_RELATION:zt,OBJ_TYPE_TRIE:Yt,OBJ_TYPE_TRIE_SIMPLE:qt,ObjId:vn,PathObject:Tn,RELATION_TYPE_PART_OF:rn,RELATION_TYPE_SAME:nn,RelationObject:Kn,SimpleChunkList:Bn,SimpleMapItem:An,SimpleObjectMap:Jn,base32Decode:hn,base32Encode:un,buildNamedObjectByJson:jn,buildObjId:Sn,bytesToHex:sn,canonicalizeJson:mn,extractObjIdByPath:function(e,t){const n=t.split("/").filter((e=>e.length>0));let i=e;for(const o of n){if(null==i)throw new Rt("InvalidParam",`objid path not found: ${t}`);if(Array.isArray(i)){const e=Number(o);if(!Number.isInteger(e)||e<0||e>=i.length)throw new Rt("InvalidParam",`objid path not found: ${t}`);i=i[e]}else{if("object"!=typeof i)throw new Rt("InvalidParam",`objid path not found: ${t}`);if(!(o in i))throw new Rt("InvalidParam",`objid path not found: ${t}`);i=i[o]}}try{return vn.fromValue(i)}catch(r){throw new Rt("InvalidData",`invalid objid at path ${t}: ${r.message}`)}},hexToBytes:cn,loadNamedObj:function(e){return On(e)},loadNamedObjAndVerify:function(e,t){const n=On(t);if(!kn(e,n))throw new Rt("InvalidId",`verify named object failed for obj_id: ${e.toString()}`);return n},loadNamedObjectFromObjStr:On,sha256Bytes:fn,sha256Utf8:wn,toCanonicalJsonString:yn,varintDecode:dn,varintEncode:ln,verifyNamedObject:kn,verifyNamedObjectFromStr:function(e,t){let n;try{n=JSON.parse(t)}catch(i){throw new Rt("InvalidId",`failed to parse obj_str: ${i.message}`)}if(!kn(e,n))throw new Rt("InvalidId",`verify named object failed: ${t}`);return n}},Symbol.toStringTag,{value:"Module"}));exports.ChunkId=_n,exports.DEFAULT_EXPIRE_TIME=je,exports.DID=Ge,exports.DID_OBJECT_SERVICE_ID="#did-object",exports.DID_OBJECT_SERVICE_TYPE=le,exports.DirObject=Cn,exports.FileObject=Nn,exports.NODE_IDENTITY_SCHEMA_V2=de,exports.ObjId=vn,exports.SimpleChunkList=Bn,exports.buckyosGetUnixTimestamp=xe,exports.buildNamedObjectByJson=jn,exports.canonicalize=$t,exports.cleanLocalAccountInfo=function(e){localStorage.removeItem(he(e)),localStorage.removeItem(ae),localStorage.removeItem(ue);let t={path:"/",expires:new Date(0),secure:!0,sameSite:"Lax"};document.cookie=`${e}_token=; ${Object.entries(t).map((([e,t])=>`${e}=${t}`)).join("; ")}`},exports.clearBrowserIdentity=function(){localStorage.removeItem(ue)},exports.clearBrowserUserInfo=function(){localStorage.removeItem(ae)},exports.commonjsGlobal=Kt,exports.createJwkByX=ze,exports.decodeJwtClaimWithoutVerify=Ye,exports.deviceDocumentToOrderedJson=jt,exports.deviceMiniDocumentToJwt=bt,exports.encodeDeviceDocument=wt,exports.encodeZoneBootDocument=ht,exports.encodeZoneDocument=vt,exports.getBrowserIdentityRaw=function(){const e=localStorage.getItem(ue);if(!e)return null;try{return JSON.parse(e)}catch{return null}},exports.getBrowserUserInfo=function(){return function(e){if(null==e)return null;try{const t=JSON.parse(e),n="string"==typeof t.user_id?t.user_id.trim():"",i="string"==typeof t.user_type?t.user_type.trim():"",r="string"==typeof t.user_name?t.user_name.trim():"string"==typeof t.show_name?t.show_name.trim():"";return n&&i?{user_name:r||n,user_id:n,user_type:i}:null}catch{return null}}(localStorage.getItem(ae))},exports.getDefaultExportFromCjs=Ht,exports.getDidIdentifier=function(e){if("string"!=typeof e||!e.startsWith("did:"))return null;const t=e.split(":");return t.length>=3?t.slice(2).join(":"):null},exports.getDidMethod=function(e){if("string"!=typeof e||!e.startsWith("did:"))return null;const t=e.split(":");return t.length>=3?t[1]:null},exports.getPublicKeyXFromPrivatePem=Ue,exports.getXFromJwk=Le,exports.hashPassword=function(e,t,n=null){const i=new ce("SHA-256","TEXT",{encoding:"UTF8"});i.update(t+e+".buckyos");let r=i.getHash("B64");if(null==n)return r;const o=new ce("SHA-256","TEXT",{encoding:"UTF8"});let s=r+n.toString();return o.update(s),o.getHash("B64")},exports.isBuckyOSAgentDocument=ge,exports.isBuckyOSDIDObjectCard=_e,exports.isBuckyOSDeviceDocument=be,exports.isBuckyOSDeviceMiniDocument=ye,exports.isBuckyOSLocalNodeIdentityConfig=function(e){return fe(e)&&e.schema===de&&"string"==typeof e.zone_did&&"string"==typeof e.owner_did&&fe(e.owner_public_key)&&"string"==typeof e.device_name&&"string"==typeof e.device_did&&"number"==typeof e.zone_iat},exports.isBuckyOSOwnerDocument=me,exports.isBuckyOSZoneBootDocument=function(e){return fe(e)&&Array.isArray(e.oods)&&e.oods.every((e=>"string"==typeof e))&&"number"==typeof e.exp},exports.isBuckyOSZoneConfig=function(e){return fe(e)&&"string"==typeof e.zone_document},exports.isBuckyOSZoneDocument=ve,exports.isW3CDIDDocumentBase=pe,exports.namelib=Bt,exports.ndn_types=Un,exports.newDeviceDocumentByJwk=dt,exports.newDeviceDocumentByMiniDocument=ft,exports.newDeviceMiniDocument=mt,exports.newDeviceMiniDocumentByDeviceDocument=yt,exports.newOwnerDocument=rt,exports.newZoneBootDocument=ut,exports.newZoneDocument=at,exports.oodDescriptionToString=Qe,exports.ownerDocumentSetDefaultZoneDid=ot,exports.ownerDocumentToOrderedJson=It,exports.parseBuckyOSDIDDocument=function(e){return me(e)||ge(e)||be(e)||ve(e)||_e(e)?e:null},exports.parseBuckyOSDeviceMiniDocument=function(e){return ye(e)?e:null},exports.parseBuckyOSOwnerDocument=function(e){return me(e)?e:null},exports.parseOODDescription=Ve,exports.parseW3CDIDDocumentBase=function(e){return pe(e)?e:null},exports.saveBrowserIdentity=function(e){localStorage.setItem(ue,JSON.stringify(e))},exports.saveBrowserUserInfo=function(e){localStorage.setItem(ae,JSON.stringify(e))},exports.saveLocalAccountInfo=function(e,t){if(null==t.session_token)return void console.error("session_token is null,can't save account info");localStorage.setItem(he(e),JSON.stringify(t));let n={path:"/",expires:new Date(Date.now()+2592e6),secure:!0,sameSite:"Lax"};document.cookie=`${e}_token=${t.session_token}; ${Object.entries(n).map((([e,t])=>`${e}=${t}`)).join("; ")}`},exports.sha256Bytes=fn,exports.signJwtEdDSA=Fe,exports.verifyJwtEdDSA=qe,exports.zoneDocumentToOrderedJson=St;
|
|
2
|
+
//# sourceMappingURL=ndn_types-08dc9ef1.js.map
|