One named VM: everything Sandbox.adopt needs, under a name.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new NameRecord( name: string, microvmId: string, endpoint: string, agentToken: string, region: Region): NameRecord;A record for a VM this process can already address. Refuses an illegal name or an empty id, endpoint, or token.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
microvmId |
string |
endpoint |
string |
agentToken |
string |
region |
Region |
Returns
Section titled “Returns”NameRecord
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get at(): number;Seconds since the epoch when the name was registered.
Returns
Section titled “Returns”number
egressPosture
Section titled “egressPosture”Get Signature
Section titled “Get Signature”get egressPosture(): string | null;Returns
Section titled “Returns”string | null
endpoint
Section titled “endpoint”Get Signature
Section titled “Get Signature”get endpoint(): string;Returns
Section titled “Returns”string
microvmId
Section titled “microvmId”Get Signature
Section titled “Get Signature”get microvmId(): string;Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get name(): string;Returns
Section titled “Returns”string
region
Section titled “region”Get Signature
Section titled “Get Signature”get region(): string;Returns
Section titled “Returns”string
Methods
Section titled “Methods”agentToken()
Section titled “agentToken()”agentToken(): string;The VM’s bearer credential. A method rather than a getter, so it is never read by accident; store it only privately.
Returns
Section titled “Returns”string
toObject()
Section titled “toObject()”toObject(): NameRecordObject;The record as a plain object, agent token included — the form to store privately
and read back with fromObject.
Returns
Section titled “Returns”toString()
Section titled “toString()”toString(): string;The record without its secrets.
Returns
Section titled “Returns”string
tunnelIdentity()
Section titled “tunnelIdentity()”tunnelIdentity(): TunnelIdentity | null;The VM’s tunnel identity, when it was launched with identity: true; null otherwise.
Throws when the record carries one half of the pair, or a half that doesn’t decode: the
record claims a verifiable VM, and reading it as unverifiable would hide that it’s
broken. A method, like agentToken(), because it holds the host’s secret half.
Returns
Section titled “Returns”TunnelIdentity | null
forSandbox()
Section titled “forSandbox()”static forSandbox(name: string, sandbox: Sandbox): Promise<NameRecord>;A record naming the VM sandbox addresses — launched or adopted.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
sandbox |
Sandbox |
Returns
Section titled “Returns”Promise<NameRecord>
fromObject()
Section titled “fromObject()”static fromObject(object: NameRecordObject): NameRecord;A record from toObject() output (or a CLI registry file’s JSON), checked.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
object |
NameRecordObject |
Returns
Section titled “Returns”NameRecord
Provenance
Section titled “Provenance”This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.
To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run dts. mise run dts:check fails when the committed file no longer matches the source.