xrpl-go

module
v0.1.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2026 License: MIT

README

XRPL-GO

Go Reference Go Report Card Release Card

The xrpl-go library provides a Go implementation for interacting with the XRP Ledger. From serialization to signing transactions, the library allows users to work with the most complex elements of the XRP Ledger. A full library of models for all transactions and core server rippled API objects are provided.

Requirements

Requiring Go version 1.22.0 and later. Download latest Go version

Packages

Name Description
addresscodec Provides functions for encoding and decoding XRP Ledger addresses
binarycodec Implements binary serialization and deserialization of XRP Ledger objects
keypairs Handles generation and management of cryptographic key pairs for XRP Ledger accounts
xrpl Core package containing the main functionality for interacting with the XRP Ledger
examples Contains example code demonstrating usage of the xrpl-go library

Quickstart

This guide covers everything you need to start contributing to XRPL-GO.

Development Requirements

To work on this project, you'll need:

  • Go compiler version 1.22.0 or later (download or use gvm)
  • golangci-lint (see GOLANGCI_LINT_VERSION in Makefile)
  • make command-line tool
  • Docker (for running CI/CD workflows locally)
  • yarn (for running the documentation site)

A Go debugger is also recommended for improved debugging experience.

Getting Started
  1. Fork the repository

    Fork XRPLF/xrpl-go to your GitHub account to work on changes and open pull requests.

  2. Install dependencies

    Install dependencies globally:

    go mod tidy
    

    Or install them locally in a vendor directory:

    go mod vendor
    
  3. Run the linter

    make lint
    

    Note: If golangci-lint is not installed, this command will automatically install it with the same version used in CI/CD workflows.

  4. Run tests

    Run the full test suite as executed in CI/CD:

    make test-ci
    

    Verify that all tests pass. Check the Makefile for additional rules and feel free to propose new ones.

Report an issue

If you find any issues, please report them to the XRPL-GO GitHub repository.

License

The xrpl-go library is licensed under the MIT License.

Directories

Path Synopsis
Package addresscodec provides base58 encoding and decoding functionality for XRPL addresses and keys.
Package addresscodec provides base58 encoding and decoding functionality for XRPL addresses and keys.
Package binarycodec provides encoding and decoding functionality for XRPL binary format.
Package binarycodec provides encoding and decoding functionality for XRPL binary format.
definitions
Package definitions contains XRPL binary codec field and type definitions.
Package definitions contains XRPL binary codec field and type definitions.
serdes
Package serdes provides utilities to parse and serialize XRPL binary data fields.
Package serdes provides utilities to parse and serialize XRPL binary data fields.
serdes/interfaces
Package interfaces defines interfaces for binary serialization and deserialization of XRPL fields.
Package interfaces defines interfaces for binary serialization and deserialization of XRPL fields.
serdes/testutil
Package testutil is a generated GoMock package.
Package testutil is a generated GoMock package.
types
Package types contains data structures for binary codec operations.
Package types contains data structures for binary codec operations.
types/interfaces
Package interfaces defines the BinaryParser interface for binary codec parsing operations.
Package interfaces defines the BinaryParser interface for binary codec parsing operations.
types/testutil
Package testutil is a generated GoMock package.
Package testutil is a generated GoMock package.
examples
autofill/rpc command
autofill/ws command
batch/rpc command
batch/ws command
checks/rpc command
checks/ws command
clawback/rpc command
clawback/ws command
credential/rpc command
credential/ws command
deep-freeze/rpc command
deep-freeze/ws command
delegate-set/ws command
faucet/rpc command
faucet/ws command
ledger/rpc command
ledger/ws command
mptoken/rpc command
mptoken/ws command
multisigning/ws command
nft/nft-burn/ws command
oracle/rpc command
oracle/ws command
paths/rpc command
paths/ws command
send-payment/ws command
send-xrp/rpc command
send-xrp/ws command
subscription/ws command
token-escrow/ws command
use-tickets/rpc command
use-tickets/ws command
vault/rpc command
vault/ws command
wallet command
Package keypairs provides cryptographic key pair generation and management for XRPL.
Package keypairs provides cryptographic key pair generation and management for XRPL.
testutil
Package interfaces is a generated GoMock package.
Package interfaces is a generated GoMock package.
pkg
big-decimal
Package bigdecimal provides arbitrary-precision decimal arithmetic operations for financial calculations.
Package bigdecimal provides arbitrary-precision decimal arithmetic operations for financial calculations.
crypto
Package crypto provides cryptographic utilities for XRPL key management, including Ed25519 and secp256k1 key derivation, signing, and verification.
Package crypto provides cryptographic utilities for XRPL key management, including Ed25519 and secp256k1 key derivation, signing, and verification.
decodehook
Package decodehook provides shared decode hooks for mapstructure.
Package decodehook provides shared decode hooks for mapstructure.
hexutil
Package hexutil provides utility functions for hexadecimal encoding.
Package hexutil provides utility functions for hexadecimal encoding.
map_utils
Package maputils provides utility functions for working with maps.
Package maputils provides utility functions for working with maps.
random
Package random provides cryptographically secure random number generation utilities.
Package random provides cryptographically secure random number generation utilities.
typecheck
Package typecheck provides functions for runtime type assertions and numeric string validation.
Package typecheck provides functions for runtime type assertions and numeric string validation.
Package xrpl provides utilities for working with the XRP Ledger.
Package xrpl provides utilities for working with the XRP Ledger.
currency
Package currency provides utilities for working with XRP native currency conversions and calculations.
Package currency provides utilities for working with XRP native currency conversions and calculations.
faucet
Package faucet provides utilities to interact with an XRP testnet faucet.
Package faucet provides utilities to interact with an XRP testnet faucet.
flag
Package flag provides utility functions for working with bitwise flags.
Package flag provides utility functions for working with bitwise flags.
hash
Package hash provides constants for prefixes used in hashing XRPL objects.
Package hash provides constants for prefixes used in hashing XRPL objects.
ledger-entry-types
Package ledger defines types for ledger entries in the XRP Ledger.
Package ledger defines types for ledger entries in the XRP Ledger.
queries/account/types
Package types contains data structures for account query types.
Package types contains data structures for account query types.
queries/account/v1
Package v1 contains version 1 account queries for XRPL.
Package v1 contains version 1 account queries for XRPL.
queries/amm
Package amm contains amm-related queries for XRPL.
Package amm contains amm-related queries for XRPL.
queries/channel
Package channel provides commands to query XRPL payment channel methods.
Package channel provides commands to query XRPL payment channel methods.
queries/channel/v1
Package v1 contains version 1 payment channel queries for XRPL.
Package v1 contains version 1 payment channel queries for XRPL.
queries/clio
Package clio provides types and requests for CLIO-specific XRPL queries.
Package clio provides types and requests for CLIO-specific XRPL queries.
queries/clio/types
Package types contains data structures for CLIO server query types.
Package types contains data structures for CLIO server query types.
queries/clio/v1
Package v1 contains version 1 CLIO server queries for XRPL.
Package v1 contains version 1 CLIO server queries for XRPL.
queries/common
Package common provides shared types for XRPL ledger specifiers and parsing utilities.
Package common provides shared types for XRPL ledger specifiers and parsing utilities.
queries/ledger
Package ledger contains ledger-related queries for XRPL.
Package ledger contains ledger-related queries for XRPL.
queries/ledger/types
Package types contains types for ledger query responses.
Package types contains types for ledger query responses.
queries/ledger/v1
Package v1 contains version 1 ledger queries for XRPL.
Package v1 contains version 1 ledger queries for XRPL.
queries/nft
Package nft provides commands to query XRPL NFT-related methods.
Package nft provides commands to query XRPL NFT-related methods.
queries/nft/v1
Package v1 provides version 1 types and methods for NFT buy offers queries.
Package v1 provides version 1 types and methods for NFT buy offers queries.
queries/oracle
Package oracle contains oracle-related queries for XRPL.
Package oracle contains oracle-related queries for XRPL.
queries/oracle/types
Package types contains data structures for oracle query types.
Package types contains data structures for oracle query types.
queries/path
Package path contains path finding and order book queries for XRPL.
Package path contains path finding and order book queries for XRPL.
queries/path/types
Package types contains data structures for path finding query types.
Package types contains data structures for path finding query types.
queries/path/v1
Package v1 contains version 1 path finding queries for XRPL.
Package v1 contains version 1 path finding queries for XRPL.
queries/server
Package server contains server-related queries for XRPL.
Package server contains server-related queries for XRPL.
queries/server/types
Package types provides data structures for server query responses.
Package types provides data structures for server query responses.
queries/subscription
Package subscribe contains subscription functionality for XRPL streams.
Package subscribe contains subscription functionality for XRPL streams.
queries/subscription/types
Package types provides types for the subscription streams, including book changes events.
Package types provides types for the subscription streams, including book changes events.
queries/subscription/v1
Package v1 contains version 1 subscription functionality for XRPL streams.
Package v1 contains version 1 subscription functionality for XRPL streams.
queries/subscription/v1/types
Package types contains data structures for v1 subscription stream types.
Package types contains data structures for v1 subscription stream types.
queries/transactions
Package transactions contains transaction-related queries for XRPL.
Package transactions contains transaction-related queries for XRPL.
queries/transactions/v1
Package v1 contains version 1 transaction queries for XRPL.
Package v1 contains version 1 transaction queries for XRPL.
queries/utility
Package utility provides commands to query XRPL utility methods.
Package utility provides commands to query XRPL utility methods.
queries/utility/v1
Package v1 contains version 1 utility queries for XRPL.
Package v1 contains version 1 utility queries for XRPL.
queries/vault
Package vault contains vault-related queries for XRPL.
Package vault contains vault-related queries for XRPL.
queries/version
Package version defines API versions and version-related utilities for XRPL queries.
Package version defines API versions and version-related utilities for XRPL queries.
rpc
Package rpc provides RPC client functionality for interacting with XRPL servers.
Package rpc provides RPC client functionality for interacting with XRPL servers.
rpc/testutil
Package testutil provides utilities for mocking JSON-RPC HTTP clients in tests.
Package testutil provides utilities for mocking JSON-RPC HTTP clients in tests.
rpc/types
Package types contains data structures for RPC client configuration and options.
Package types contains data structures for RPC client configuration and options.
testutil
Package testutil provides utilities for testing JSON flattening and serialization.
Package testutil provides utilities for testing JSON flattening and serialization.
testutil/integration
Package integration provides configuration and utilities for running XRP Ledger integration tests.
Package integration provides configuration and utilities for running XRP Ledger integration tests.
time
Package time provides time conversion utilities for XRPL timestamps.
Package time provides time conversion utilities for XRPL timestamps.
transaction
Package transaction contains XRPL transaction types and related functionality.
Package transaction contains XRPL transaction types and related functionality.
transaction/integration
Package integration provides constants and utilities for transaction integration tests.
Package integration provides constants and utilities for transaction integration tests.
transaction/types
Package types provides core transaction types and helpers for the XRPL Go library.
Package types provides core transaction types and helpers for the XRPL Go library.
wallet
Package wallet provides utilities for deriving and managing XRPL wallets, including keypair generation, address derivation, and offline transaction signing.
Package wallet provides utilities for deriving and managing XRPL wallets, including keypair generation, address derivation, and offline transaction signing.
wallet/types
Package types contains data structures for wallet operations and batch signing.
Package types contains data structures for wallet operations and batch signing.
websocket
Package websocket provides a client for connecting to an XRPL WebSocket server.
Package websocket provides a client for connecting to an XRPL WebSocket server.
websocket/interfaces
Package interfaces defines common interfaces for XRPL WebSocket.
Package interfaces defines common interfaces for XRPL WebSocket.
websocket/testutil
Package testutil provides testing utilities for websocket functionality.
Package testutil provides testing utilities for websocket functionality.
websocket/types
Package types contains data structures for websocket message types.
Package types contains data structures for websocket message types.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL