HiveXPH SDKhivexph-sdk
NPM
Developer toolkit for Hive Custom JSON and Hive Engine transactions.

Reference

Errors

Errors are classes with a code, so you can branch on the code instead of matching message strings. Messages name the environment variable, never its value.

Handling errors

TypeScript
import { HiveSdkError } from "hivexph-sdk";

try {
  await hive.issuer.token.transfer({ from: hive.accounts.treasury, symbol: "MYTOKEN", account: "bob", quantity: "1" });
} catch (error) {
  if (error instanceof HiveSdkError) {
    console.error(error.code, error.message);
  }
}

Security

A missing key reports the variable name only — private keys never appear in messages, stack traces or logs.

Error codes

Stable codes
ParameterTypeRequiredDescription
VALIDATION_ERRORHiveSdkErrorNoInvalid symbol, quantity, action name or instance count.
CONFIG_NOT_FOUNDHiveConfigurationErrorNoUnknown configuration name.
ACCOUNT_ALIAS_NOT_FOUNDHiveAccountNotFoundErrorNoThe account alias is not declared in the configuration.
ACCOUNT_RESOLUTION_ERRORHiveAccountResolutionErrorNoThe alias exists but its account name could not be resolved.
ENV_VAR_MISSINGHiveEnvironmentVariableMissingErrorNoAn accountEnv or keyEnv variable is not set.
SIGNING_KEY_MISSINGHiveSigningKeyMissingErrorNoNo signing key is available for the account.
SIGNING_ERRORHiveSigningErrorNoThe transaction could not be signed with the resolved key.
RPC_ERRORHiveSdkErrorNoEvery node failed or returned an error response.
BROADCAST_ERRORHiveSdkErrorNoThe node rejected the signed transaction.
KEYCHAIN_UNAVAILABLEHiveSdkErrorNoThe extension is not installed or not injected yet.
KEYCHAIN_REJECTEDHiveSdkErrorNoThe user dismissed or rejected the popup.

Protocol-invalid Custom JSON payloads are not errors: the reader collects them in invalid and the stream reports them through onInvalidPayload.