@terminal3/t3n-sdk 3.8.1 → 3.10.0
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/README.md +2 -2
- package/dist/index.d.ts +16 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -103,10 +103,10 @@ const did = await client.authenticate(
|
|
|
103
103
|
|
|
104
104
|
The SDK targets the public T3n networks.
|
|
105
105
|
|
|
106
|
-
- `
|
|
106
|
+
- `sandbox` — the public test network, for integration and pre-production use.
|
|
107
107
|
- `production` — the public mainnet network.
|
|
108
108
|
|
|
109
|
-
Select the network with `setEnvironment("
|
|
109
|
+
Select the network with `setEnvironment("sandbox" | "production")` — this sets the
|
|
110
110
|
default node used by clients created afterwards. To target a specific node, pass an
|
|
111
111
|
explicit `baseUrl` to `new T3nClient({ baseUrl, … })`; `baseUrl` takes precedence over
|
|
112
112
|
the environment default.
|
package/dist/index.d.ts
CHANGED
|
@@ -2920,6 +2920,19 @@ declare function getScriptVersion(rpcUrl: string, scriptName: string): Promise<s
|
|
|
2920
2920
|
* Redact secrets from values before logging
|
|
2921
2921
|
*/
|
|
2922
2922
|
declare function redactSecrets(value: unknown): unknown;
|
|
2923
|
+
/**
|
|
2924
|
+
* Mask key material for safe display in error messages and logs.
|
|
2925
|
+
*
|
|
2926
|
+
* Keeps the `0x` prefix (if present) plus the first and last 4 characters of
|
|
2927
|
+
* the hex body, replacing the middle with a redaction marker. This leaves a
|
|
2928
|
+
* stable fingerprint a developer can use to tell *which* key was rejected
|
|
2929
|
+
* without exposing enough material to reconstruct it (8 of 64 hex chars shown
|
|
2930
|
+
* still leaves ~2^224 search space). Short or non-string inputs are fully
|
|
2931
|
+
* redacted.
|
|
2932
|
+
*
|
|
2933
|
+
* @example maskKeyMaterial("0x0123…cdef") => "0x0123…cdef [redacted]"
|
|
2934
|
+
*/
|
|
2935
|
+
declare function maskKeyMaterial(value: unknown): string;
|
|
2923
2936
|
/**
|
|
2924
2937
|
* Redact secrets from a JSON string
|
|
2925
2938
|
*/
|
|
@@ -2956,7 +2969,7 @@ declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
|
2956
2969
|
*/
|
|
2957
2970
|
declare function assertShape<T>(value: unknown, guard: (v: unknown) => v is T, where: string): T;
|
|
2958
2971
|
|
|
2959
|
-
type Environment = "testnet" | "production";
|
|
2972
|
+
type Environment = "sandbox" | "testnet" | "production";
|
|
2960
2973
|
declare const NODE_URLS: Record<Environment, string>;
|
|
2961
2974
|
|
|
2962
2975
|
/**
|
|
@@ -3124,7 +3137,7 @@ declare function clearKeyCache(): void;
|
|
|
3124
3137
|
*/
|
|
3125
3138
|
declare function loadConfig(baseUrl?: string): SdkConfig;
|
|
3126
3139
|
|
|
3127
|
-
type TenantSdkEnvironment = "testnet" | "production";
|
|
3140
|
+
type TenantSdkEnvironment = "sandbox" | "testnet" | "production";
|
|
3128
3141
|
|
|
3129
3142
|
/**
|
|
3130
3143
|
* Minimal structural seam for the authenticated base client a TenantClient
|
|
@@ -3329,5 +3342,5 @@ declare function tenantDidHex(tenantDid: string): string;
|
|
|
3329
3342
|
declare function validateTail(tail: string): string;
|
|
3330
3343
|
declare function canonicalTenantName(tenantDid: string, tail: string): string;
|
|
3331
3344
|
|
|
3332
|
-
export { AGENT_PUBKEY_LEN, AuthMethod, AuthenticationError, BASE_UNITS_PER_TOKEN, ContractResponseError, DEFAULT_INDIVIDUAL_THRESHOLD_CENTS, DEFAULT_KYC_POLL_CADENCE, DELEGATION_CREDENTIAL_DOMAIN, DELEGATION_INVOCATION_DOMAIN, DelegationCustodialClient, ETH_SIG_LEN, HandshakeError, HttpTransport, KycStatusTimeoutError, LogLevel, MAX_FUNCTIONS_PER_CREDENTIAL, MockTransport, NODE_URLS, NONCE_LEN, OrgDataClient, OtpRateLimitedError, PAYROLL_FUNCTIONS_V1, REQUEST_HASH_LEN, RpcError, SessionExpiredError, SessionOrgDataClient, SessionStateError, SessionStatus, T3nClient, T3nError, TERMINAL_KYC_STATUSES, TOKEN_DECIMALS, TenantClient, TenantContractsNamespace, TenantMapsNamespace, TenantNamespace, TenantSdkValidationError, TenantTokenNamespace, UnsupportedTenantSdkOperationError, UserUpsertError, VC_ID_LEN, WasmError, _b64uEncode, assertShape, b64uDecodeStrict, b64uEncodeBytes, buildDelegationCredential, buildInvocationPreimage, buildPayrollDirectInvocation, buildPayrollInvocation, bytesToString, canonicalTenantName, canonicaliseCredential, canonicaliseRequest, clearKeyCache, compactDidFromBytes, createDefaultHandlers, createEmailOtpAuthInput, createEthAuthInput, createLogger, createMlKemPublicKeyHandler, createOidcAuthInput, createOrgDataClientFromSession, createRandomHandler, decodeWasmErrorMessage, eip191Digest, ethRecoverEip191, eth_get_address, extractWasmError, fetchDkgAttestation, fetchMlKemPublicKey, formatTokens, generateRandomString, generateUUID, getEnvironment, getEnvironmentName, getGlobalLogLevel, getLogger, getNodeUrl, getScriptVersion, isDataGetResponse, isDataListResponse, isMutationResponse, isObject, isOrgContractGrants, isOrgPolicyMeta, isOrgWriters, loadConfig, loadWasmComponent, metamask_get_address, metamask_sign, parseContractResponse, redactSecrets, redactSecretsFromJson, requestHash, revokeDelegation, setEnvironment, setGlobalLogLevel, setNodeUrl, signAgentInvocation, signCredential, stringToBytes, tenantDidHex, toBaseUnits, validateConfig, validateCredentialBody, validateTail, verifyDkgAttestation, verifyTdxQuote };
|
|
3345
|
+
export { AGENT_PUBKEY_LEN, AuthMethod, AuthenticationError, BASE_UNITS_PER_TOKEN, ContractResponseError, DEFAULT_INDIVIDUAL_THRESHOLD_CENTS, DEFAULT_KYC_POLL_CADENCE, DELEGATION_CREDENTIAL_DOMAIN, DELEGATION_INVOCATION_DOMAIN, DelegationCustodialClient, ETH_SIG_LEN, HandshakeError, HttpTransport, KycStatusTimeoutError, LogLevel, MAX_FUNCTIONS_PER_CREDENTIAL, MockTransport, NODE_URLS, NONCE_LEN, OrgDataClient, OtpRateLimitedError, PAYROLL_FUNCTIONS_V1, REQUEST_HASH_LEN, RpcError, SessionExpiredError, SessionOrgDataClient, SessionStateError, SessionStatus, T3nClient, T3nError, TERMINAL_KYC_STATUSES, TOKEN_DECIMALS, TenantClient, TenantContractsNamespace, TenantMapsNamespace, TenantNamespace, TenantSdkValidationError, TenantTokenNamespace, UnsupportedTenantSdkOperationError, UserUpsertError, VC_ID_LEN, WasmError, _b64uEncode, assertShape, b64uDecodeStrict, b64uEncodeBytes, buildDelegationCredential, buildInvocationPreimage, buildPayrollDirectInvocation, buildPayrollInvocation, bytesToString, canonicalTenantName, canonicaliseCredential, canonicaliseRequest, clearKeyCache, compactDidFromBytes, createDefaultHandlers, createEmailOtpAuthInput, createEthAuthInput, createLogger, createMlKemPublicKeyHandler, createOidcAuthInput, createOrgDataClientFromSession, createRandomHandler, decodeWasmErrorMessage, eip191Digest, ethRecoverEip191, eth_get_address, extractWasmError, fetchDkgAttestation, fetchMlKemPublicKey, formatTokens, generateRandomString, generateUUID, getEnvironment, getEnvironmentName, getGlobalLogLevel, getLogger, getNodeUrl, getScriptVersion, isDataGetResponse, isDataListResponse, isMutationResponse, isObject, isOrgContractGrants, isOrgPolicyMeta, isOrgWriters, loadConfig, loadWasmComponent, maskKeyMaterial, metamask_get_address, metamask_sign, parseContractResponse, redactSecrets, redactSecretsFromJson, requestHash, revokeDelegation, setEnvironment, setGlobalLogLevel, setNodeUrl, signAgentInvocation, signCredential, stringToBytes, tenantDidHex, toBaseUnits, validateConfig, validateCredentialBody, validateTail, verifyDkgAttestation, verifyTdxQuote };
|
|
3333
3346
|
export type { AgeBand, AuthInput, BalanceRow, BuildDelegationCredentialOpts, BuildPayrollDirectInvocationOpts, BuildPayrollInvocationOpts, ChargeReason, ClientAuth, ClientHandshake, ConfigValidationResult, ContractExecuteInput, ContractPublishInput, ContractResponseSchema, CreatePolicyInput, DataGetInput, DataGetResponse, DataListInput, DataListResponse, DelegationCredential, DelegationCustodialClientOpts, DelegationEnvelope, DeleteDataInput, DeleteGrantsInput, DeleteScopeInput, Did, Direction, DkgAttestation, DkgVerifyResult, EmailOtpAuthInput, EmailOtpCredentials, EmployeeRecord, EmploymentStatus, Environment, EthAuthInput, ExecuteBusinessContractOptions, ExecuteOrgDataActionOptions, ExpenseClaim, GetUsageOptions, GrantsGetInput, GuestToHostHandler, GuestToHostHandlers, HandshakeResult, JsonRpcRequest, JsonRpcResponse, KycPollCadence, KycPollOptions, KycStatus, KycStatusKind, Logger, MapCreateInput, MapResponse, MapUpdateInput, MapVisibility, MutationResponse, OidcAuthInput, OidcCredentials, OrgContractGrants, OrgDataActionWire, OrgDataClientOptions, OrgPolicyMeta, OrgWriters, OtpChannel, OtpMergeSuggestion, OtpRequestInput, OtpRequestResult, OtpVerifyInput, OtpVerifyResult, PayrollInvocation, PayrollInvocationDelegated, PayrollInvocationDirect, PayrollRunRequest, PeerQuoteResult, PolicyGetInput, QuoteVerifyResult, ReaderSet, ResidencyCategory, RevokeDelegationOpts, RevokeDelegationResult, SdkConfig, SessionCrypto, SessionId, SetGrantsInput, SetWritersInput, SignCustodialResult, SignDelegationResponse, SubmitUserInputArgs, SubmitUserInputResult, T3nClientConfig, TenantAdmitProjection, TenantAdmitStatus, TenantBaseClient, TenantClientConfig, TenantContractExecuteInput, TenantContractPublishInput, TenantExecutionSession, TenantMapCreateInput, TenantMapUpdatePatch, TenantMeResponse, TenantSdkEnvironment, TenantSelfAdmitResult, TenantStatus, TokenTxKind, Transport, UpdateMetaInput, UsageEntry, UsagePage, UserGrant, UserInputProfile, UserUpsertErrorKind, WasmComponent, WasmNextResult, WriteDataInput, WriterSet, WritersGetInput };
|