package
0.0.0-20240313062720-e69715ac305e
Repository: https://github.com/uxuycom/indexer.git
Documentation: pkg.go.dev

# Functions

CmdMethod returns the method for the passed command.
No description provided by the author
IsValidIDType checks that the ID field (which can go in any of the JSON-RPC requests, responses, or notifications) is valid.
MarshalCmd marshals the passed command to a JSON-RPC request byte slice that is suitable for transmission to an RPC server.
MarshalResponse marshals the passed rpc version, id, result, and RPCError to a JSON-RPC response byte slice that is suitable for transmission to a JSON-RPC client.
MethodUsageFlags returns the usage flags for the passed command method.
MethodUsageText returns a one-line usage string for the provided method.
MustRegisterCmd performs the same function as RegisterCmd except it panics if there is an error.
NewCmd provides a generic mechanism to create a new command that can marshal to a JSON-RPC request while respecting the requirements of the provided method.
NewRequest returns a new JSON-RPC request object given the provided rpc version, id, method, and parameters.
NewResponse returns a new JSON-RPC response object given the provided rpc version, id, marshalled result, and RPC error.
NewRPCError constructs and returns a new JSON-RPC error that is suitable for use in a JSON-RPC Response object.
NewRPCServer returns a new instance of the RpcServer struct.
No description provided by the author
RegisterCmd registers a new command that will automatically marshal to and from JSON-RPC with full type checking and positional parameter support.
RegisteredCmdMethods returns a sorted list of methods for all registered commands.
UnmarshalCmd unmarshals a JSON-RPC request into a suitable concrete command so long as the method type contained within the marshalled request is registered.

# Constants

ErrDuplicateMethod indicates a command with the specified method already exists.
ErrEmbeddedType indicates the provided command struct contains an embedded type which is not not supported.
ErrInvalidType indicates a type was passed that is not the required type.
ErrInvalidUsageFlags indicates one or more unrecognized flag bits were specified.
ErrMismatchedDefault indicates a 'jsonrpcdefault' struct tag contains a value that doesn't match the type of the field.
ErrMissingDescription indicates a description required to generate help is missing.
ErrNonOptionalDefault indicates a 'jsonrpcdefault' struct tag was specified for a non-optional field.
ErrNonOptionalField indicates a non-optional field was specified after an optional field.
ErrNumParams inidcates the number of params supplied do not match the requirements of the associated command.
Specific Errors related to commands.
Specific Errors related to commands.
Specific Errors related to commands.
ErrRPCClientInInitialDownload indicates that client is still downloading initial blocks.
ErrRPCClientInvalidIPOrSubnet indicates an invalid IP/Subnet.
ErrRPCClientMempoolDisabled indicates that no mempool instance was found.
ErrRPCClientNodeAlreadyAdded indicates that node is already added.
ErrRPCClientNodeNotAdded indicates that node has not been added before.
ErrRPCClientNodeNotConnected indicates that node to disconnect was not found in connected nodes.
ErrRPCClientNotConnected indicates that Bitcoin is not connected.
ErrRPCClientP2PDisabled indicates that no valid connection manager instance was found.
ErrRPCDatabase indicates a database error.
Specific Errors related to commands.
ErrRPCDeserialization indicates an error parsing or validating structure in raw format.
Specific Errors related to commands.
ErrRPCForbiddenBySafeMode indicates that server is in safe mode, and command is not allowed in safe mode.
ErrRPCInvalidAddressOrKey indicates an invalid address or key.
ErrRPCInvalidParameter indicates an invalid, missing, or duplicate parameter.
Specific Errors related to commands.
ErrRPCInWarmup indicates that client is still warming up.
ErrRPCInWarmup indicates that the RPC error is deprecated.
ErrRPCMisc indicates an exception thrown during command handling.
Specific Errors related to commands.
Specific Errors related to commands.
Specific Errors related to commands.
Errors that are specific to btcd.
ErrRPCOutOfMemory indicates that the server ran out of memory during operation.
Specific Errors related to commands.
Specific Errors related to commands.
Specific Errors related to commands.
Specific Errors related to commands.
Specific Errors related to commands.
ErrRPCType indicates that an unexpected type was passed as parameter.
Errors that are specific to btcd.
ErrRPCVerify indicates a general error during transaction or block submission.
ErrRPCVerifyAlreadyInChain indicates that submitted transaction is already in chain.
ErrRPCVerifyRejected indicates that transaction or block was rejected by network rules.
ErrRPCWallet indicates an unspecified problem with wallet, for example, key not found, etc.
ErrRPCWalletAlreadyUnlocked indicates an attempt to unlock a wallet that was already unlocked.
ErrRPCWalletEncryptionFailed indicates a failure to encrypt the wallet.
ErrRPCWalletInsufficientFunds indicates that there are not enough funds in wallet or account.
ErrRPCWalletInvalidAccountName indicates an invalid label name.
ErrRPCWalletInvalidAddressType indicates an invalid address type.
ErrRPCWalletKeypoolRanOut indicates that the keypool ran out, and that keypoolrefill must be called first.
ErrRPCWalletNotFound indicates that an invalid wallet was specified, which does not exist.
ErrRPCWalletNotSpecified indicates that no wallet was specified, for example, when there are multiple wallets loaded.
ErrRPCWalletPassphraseIncorrect indicates that the wallet passphrase that was entered was incorrect.
ErrRPCWalletUnlockNeeded indicates that the wallet passphrase must be entered first with the walletpassphrase RPC.
ErrRPCWalletWrongEncState indicates that a command was given in wrong wallet encryption state, for example, encrypting an encrypted wallet.
ErrUnexportedField indiciates the provided command struct contains an unexported field which is not supported.
ErrUnregisteredMethod indicates a method was specified that has not been registered.
ErrUnsupportedFieldType indicates the type of a field in the provided command struct is not one of the supported types.
version 1 of rpc.
version 2 of rpc.
UFNotification indicates that the command is actually a notification.
UFWalletOnly indicates that the command can only be used with an RPC server that supports wallet commands.
UFWebsocketOnly indicates that the command can only be used when communicating with an RPC server over websockets.

# Variables

Standard JSON-RPC 2.0 xyerrors.
Standard JSON-RPC 2.0 xyerrors.
Standard JSON-RPC 2.0 xyerrors.
Standard JSON-RPC 2.0 xyerrors.
Standard JSON-RPC 2.0 xyerrors.
Standard JSON-RPC 2.0 xyerrors.
Standard JSON-RPC 2.0 xyerrors.
Standard JSON-RPC 2.0 xyerrors.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EmptyCmd defines the empty JSON-RPC command.
Error identifies a general error.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FindUserBalancesCmd defines the inscription JSON-RPC command.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IndsGetAllInscriptionsCmd defines the inscription JSON-RPC command.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IndsGetInscriptionTickCmd defines the inscription JSON-RPC command.
No description provided by the author
No description provided by the author
No description provided by the author
IndsGetUserTransactionsCmd defines the inscription JSON-RPC command.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Request is a type for raw JSON-RPC 1.0 requests.
Response is the general form of a JSON-RPC response.
RPCError represents an error that is used as a part of a JSON-RPC Response object.
RpcServer provides a concurrent safe RPC server to a chain server.
RpcServerConfig is a descriptor containing the RPC server configuration.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

ErrorCode identifies a kind of error.
RPCErrorCode represents an error code to be used as a part of an RPCError which is in turn used in a JSON-RPC Response object.
RPCVersion is a type to indicate RPC versions.
UsageFlag define flags that specify additional properties about the circumstances under which a command can be used.