UNPKG

@ghostspeak/sdk

Version:

TypeScript SDK for GhostSpeak AI Agent Commerce Protocol - Production Ready Beta

70 lines (69 loc) 2.69 kB
// src/core/types.ts var AgentType = /* @__PURE__ */ ((AgentType2) => { AgentType2[AgentType2["General"] = 0] = "General"; AgentType2[AgentType2["Specialized"] = 1] = "Specialized"; AgentType2[AgentType2["Oracle"] = 2] = "Oracle"; AgentType2[AgentType2["Validator"] = 3] = "Validator"; return AgentType2; })(AgentType || {}); var EscrowStatus = /* @__PURE__ */ ((EscrowStatus2) => { EscrowStatus2["Active"] = "active"; EscrowStatus2["Completed"] = "completed"; EscrowStatus2["Cancelled"] = "cancelled"; EscrowStatus2["Disputed"] = "disputed"; EscrowStatus2["Refunded"] = "refunded"; return EscrowStatus2; })(EscrowStatus || {}); var ChannelType = /* @__PURE__ */ ((ChannelType2) => { ChannelType2["Public"] = "public"; ChannelType2["Private"] = "private"; ChannelType2["Direct"] = "direct"; ChannelType2["Group"] = "group"; return ChannelType2; })(ChannelType || {}); var MessageType = /* @__PURE__ */ ((MessageType2) => { MessageType2["Text"] = "text"; MessageType2["Image"] = "image"; MessageType2["File"] = "file"; MessageType2["Code"] = "code"; MessageType2["System"] = "system"; return MessageType2; })(MessageType || {}); var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => { ErrorCode2["NETWORK_ERROR"] = "NETWORK_ERROR"; ErrorCode2["RPC_ERROR"] = "RPC_ERROR"; ErrorCode2["TIMEOUT"] = "TIMEOUT"; ErrorCode2["INSUFFICIENT_BALANCE"] = "INSUFFICIENT_BALANCE"; ErrorCode2["TRANSACTION_FAILED"] = "TRANSACTION_FAILED"; ErrorCode2["SIMULATION_FAILED"] = "SIMULATION_FAILED"; ErrorCode2["ACCOUNT_NOT_FOUND"] = "ACCOUNT_NOT_FOUND"; ErrorCode2["INVALID_ACCOUNT"] = "INVALID_ACCOUNT"; ErrorCode2["UNAUTHORIZED"] = "UNAUTHORIZED"; ErrorCode2["INVALID_INPUT"] = "INVALID_INPUT"; ErrorCode2["INVALID_ADDRESS"] = "INVALID_ADDRESS"; ErrorCode2["INVALID_AMOUNT"] = "INVALID_AMOUNT"; ErrorCode2["PROGRAM_ERROR"] = "PROGRAM_ERROR"; ErrorCode2["INSTRUCTION_ERROR"] = "INSTRUCTION_ERROR"; ErrorCode2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR"; return ErrorCode2; })(ErrorCode || {}); var ParticipantType = /* @__PURE__ */ ((ParticipantType2) => { ParticipantType2["Human"] = "Human"; ParticipantType2["Agent"] = "Agent"; return ParticipantType2; })(ParticipantType || {}); function isSuccess(result) { return result.success === true; } function isError(result) { return result.success === false; } function unwrap(result) { if (isError(result)) { throw new Error(result.error.message); } return result.data; } export { AgentType, ChannelType, ErrorCode, EscrowStatus, MessageType, ParticipantType, isError, isSuccess, unwrap }; //# sourceMappingURL=chunk-SRS2SKFS.js.map //# sourceMappingURL=chunk-SRS2SKFS.js.map