Skip to content

tasra-sdk/chain/node

Generated from public TypeScript exports.

SDK reference · Task guides · Errors

Operations you can import and call.

Browse 6 functions

Session secrets use this same guarded connection and can only travel to a session GET.

Source

Import: import {createNodeAgentTransport} from 'tasra-sdk/chain/node'

declare function createNodeAgentTransport(policy?: ServiceTransportPolicy): AgentTransport;
Parameter Type Description
policy? ServiceTransportPolicy Explicit private-host exceptions and additional trusted certificate roots.

Returns: AgentTransport.

Wallet protocol requests restricted to the selected session and approved DID, with socket checks.

Source

Import: import {createNodeAgentWalletFetch} from 'tasra-sdk/chain/node'

declare function createNodeAgentWalletFetch(session: Pick<RegisteredAgentSession, 'profile' | 'requestUri' | 'sessionId'>, policy?: ServiceTransportPolicy): typeof fetch;
Parameter Type Description
session Pick<RegisteredAgentSession, 'profile' | 'requestUri' | 'sessionId'> Authenticated session whose request, response and DID URLs are allowed.
policy? ServiceTransportPolicy Explicit private-host exceptions and additional trusted certificate roots.

Returns: typeof fetch.

Discovery and relay traffic use the same socket-bound destination and TLS policy.

Source

Import: import {createNodeRelayTransport} from 'tasra-sdk/chain/node'

declare function createNodeRelayTransport(policy?: ServiceTransportPolicy): RelayTransport;
Parameter Type Description
policy? ServiceTransportPolicy Explicit private-host exceptions and additional trusted certificate roots.

Returns: RelayTransport.

Create a bounded HTTPS transport that validates destinations at socket connection time.

Source

Import: import {createNodeServiceDiscoveryTransport} from 'tasra-sdk/chain/node'

declare function createNodeServiceDiscoveryTransport(policy?: ServiceTransportPolicy): ServiceDiscoveryTransport;
Parameter Type Description
policy? ServiceTransportPolicy Explicit private-host exceptions and additional trusted certificate roots.

Returns: ServiceDiscoveryTransport.

Public readiness and relay-policy observations, with the same socket/TLS policy.

Source

Import: import {createNodeServiceStatusTransport} from 'tasra-sdk/chain/node'

declare function createNodeServiceStatusTransport(policy?: ServiceTransportPolicy): ServiceDiscoveryTransport;
Parameter Type Description
policy? ServiceTransportPolicy Explicit private-host exceptions and additional trusted certificate roots.

Returns: ServiceDiscoveryTransport.

Conservative globally routable destinations; special-purpose exceptions require explicit policy.

Source

Import: import {isPublicServiceAddress} from 'tasra-sdk/chain/node'

declare function isPublicServiceAddress(address: string): boolean;
Parameter Type Description
address string IPv4 or IPv6 address resolved for the service destination.

Returns: boolean.

Options, data structures and return types.

Browse 1 types

Caller-approved destination and certificate policy for Node.js service transports.

Source

export interface ServiceTransportPolicy {
allowedPrivateHosts?: readonly string[];
ca?: string | Buffer | (string | Buffer)[];
}

Fields:

  • allowedPrivateHosts: Exact, canonical hostnames/IPs only. Application configuration, never downloaded metadata.
  • ca: Additional deployment CA roots. Certificate and hostname verification remain mandatory.