diff --git a/docs/changelog/v0.1.x/988_v0_1_11.md b/docs/changelog/v0.1.x/988_v0_1_11.md new file mode 100644 index 00000000..269c6196 --- /dev/null +++ b/docs/changelog/v0.1.x/988_v0_1_11.md @@ -0,0 +1,59 @@ +--- +title: v0.1.11 +--- + +### BREAKING CHANGES + +#### xrpl + +- Moved `Signers` type from `github.com/Peersyst/xrpl-go/xrpl/transaction` package to `github.com/Peersyst/xrpl-go/xrpl/transaction/types`. + +### Added + +#### binary-codec + +- Added `MPToken` definitions. +- Added `Hash192` type. +- Added functions to serialize and deserialize `MPTCurrencyAmount`. +- Added `GranularPermissions` and `DelegatablePermissions` entries to definitions. +- Added `PermissionValue` serialized type with custom serializer routing. +- Added`EncodeForSigningBatch` function. + +#### xrpl + +- Added `AMMClawback` transaction type. +- Added `MPTokenAuthorize`, `MPTokenIssuanceCreate`, `MPTokenIssuanceDestroy`, `MPTokenIssuanceSet` transactions. It also adds the `types.Holder`, `types.AssetScale`, `types.MPTokenMetadata` and `types.TransferFee` types to represent the holder of the token, the asset scale, the metadata and the transfer fee of the token respectively. +- Added `NFTokenMintOffer` support by adding `Amount`, `Expiration`, and `Destination` fields to `NFTokenMint` transaction. Also add `NFTokenMintMetadata` struct to handle transaction metadata with `nftoken_id` and `offer_id` fields. +- Added `MPTCurrencyAmount` for currency kinds. +- Added unit tests for `MPTCurrencyAmount`. +- Added `NFTokenModify` transaction type. + +##### Account Permission Delegation (XLS-74d, XLS-75d) + +- Added `DelegateSet` transaction type (XLS-74d) with validation and error support. +- Added `Delegate` ledger entry type (XLS-74d). +- Added `PermissionValue` and `Permission` types for delegated permissions. +- Added integration tests for `DelegateSet` submission and delegated `Payment` execution (XLS-75d). + +##### Batch (XLS-56d) + +- Added `Batch` transaction type. +- Added `CombineBatchSigners` function to combine the batch signers of a set of transactions into a single transaction. +- Added `SignMultiBatch` function to sign a multi-account Batch transaction. +- Added `TfInnerBatchTxn` flag. + +## Changed + +### binary-codec + +- Refactored `Issue` codec type to support `Currency` and `Issuer` fields. + +### Dependencies + +- Bumped Go version to 1.23.0. + +## Fixed + +### xrpl + +- Fixed some flatten fields with the `Flatten` function for `NFTokenMint`, `NFTokenCancel`, `NFTokenCreate`, `NFTokenBurn` diff --git a/docs/changelog/v0.1.x/989_v0_1_10.md b/docs/changelog/v0.1.x/989_v0_1_10.md new file mode 100644 index 00000000..46b4ef4d --- /dev/null +++ b/docs/changelog/v0.1.x/989_v0_1_10.md @@ -0,0 +1,37 @@ +--- +title: v0.1.10 +--- + +### BREAKING CHANGES + +#### xrpl + +- `Submit` client method is renamed to `SubmitTxBlob` in both clients. +- `SubmitAndWait` client method is renamed to `SubmitTxBlobAndWait` in both clients. + +### Added + +#### xrpl + +- Added `SubmitTx` and `SubmitTxAndWait` client methods to both clients. +- Added support for the Credential fields in the following transaction types: + - Payment + - DepositPreauth + - AccountDelete + - PaymentChannelClaim + - EscrowFinish +- Added the `credential` ledger entry for the `account_objects` request. +- Added tec/tef/tel/tem/ter TxResult codes. +- Added `XLS-80d` support with `PermissionedDomain` transaction types: + - `PermissionedDomainSet` + - `PermissionedDomainDelete` + +### Fixed + +#### binary-codec + +- Added native `uint8` type support for `Uint8` type. + +#### big-decimal + +- Fixed `BigDecimal` precision. diff --git a/docs/changelog/v0.1.x/990_v0_1_9.md b/docs/changelog/v0.1.x/990_v0_1_9.md new file mode 100644 index 00000000..6610e333 --- /dev/null +++ b/docs/changelog/v0.1.x/990_v0_1_9.md @@ -0,0 +1,18 @@ +--- +title: v0.1.9 +--- + +### Added + +#### xrpl + +- Added support for all the Credential transaction types: + - CredentialCreate + - CredentialAccept + - CredentialDelete + +### Fixed + +#### big-decimal + +- Amounts transcoding fix for large values. diff --git a/docs/changelog/v0.1.x/991_v0_1_8.md b/docs/changelog/v0.1.x/991_v0_1_8.md new file mode 100644 index 00000000..b2222602 --- /dev/null +++ b/docs/changelog/v0.1.x/991_v0_1_8.md @@ -0,0 +1,16 @@ +--- +title: v0.1.8 +--- + +### Added + +#### xrpl + +- Added `BalanceChanges` to the `Transaction` type. + +### Changed + +#### xrpl + +- Updated `AffectedNode` type fields to be a pointer to allow nil values. +- Fixed `BaseLedger` field in `ledger` response (v1 and v2). BaseLedger.Transactions is now an array of interfaces instead of a slice of `FlatTransaction` due to `Expand` field in the request. diff --git a/docs/changelog/v0.1.x/992_v0_1_7.md b/docs/changelog/v0.1.x/992_v0_1_7.md new file mode 100644 index 00000000..a8dbd87c --- /dev/null +++ b/docs/changelog/v0.1.x/992_v0_1_7.md @@ -0,0 +1,9 @@ +--- +title: v0.1.7 +--- + +### Added + +#### xrpl + +- Added support for websocket client subscriptions. Now you can subscribe to streams like `ledgerClosed`, `transaction`, `consensus`, `peerStatusChange`, `validationReceived`, etc. diff --git a/docs/changelog/v0.1.x/993_v0_1_6.md b/docs/changelog/v0.1.x/993_v0_1_6.md new file mode 100644 index 00000000..0b347e23 --- /dev/null +++ b/docs/changelog/v0.1.x/993_v0_1_6.md @@ -0,0 +1,26 @@ +--- +title: v0.1.6 +--- + +### Added + +#### xrpl + +- Configurable timeout for the RPC client. New default timeout of 5 seconds instead of 1 second. + +### Fixed + +#### xrpl + +- Updates some fields in AccountSet and Payment related transactions to a pointer to allow 0 or "" values. For example: + + - `DestinationTag` + - `TickSize` + - `Domain` + - `WalletLocator` + - `WalletSize` + - `TransferRate` + +- Adds more tests for setting some `asf` flags in `AccountSet`. +- Fixed `Transaction` field in `account_tx` response. +- Fixed `Ledger` field in `ledger` response. LedgerIndex is now an uint32 instead of a string. diff --git a/docs/changelog/v0.1.x/994_v0_1_5.md b/docs/changelog/v0.1.x/994_v0_1_5.md new file mode 100644 index 00000000..7a2d20b0 --- /dev/null +++ b/docs/changelog/v0.1.x/994_v0_1_5.md @@ -0,0 +1,9 @@ +--- +title: v0.1.5 +--- + +### Added + +#### xrpl + +Support for the XLS-77d (deep freeze) diff --git a/docs/changelog/v0.1.x/995_v0_1_4.md b/docs/changelog/v0.1.x/995_v0_1_4.md new file mode 100644 index 00000000..86b2f086 --- /dev/null +++ b/docs/changelog/v0.1.x/995_v0_1_4.md @@ -0,0 +1,18 @@ +--- +title: v0.1.4 +--- + +### Added + +#### xrpl + +- Added `GatewayBalances` and `GetAggregatePrice` queries. + +### Fixed + +#### xrpl + +- Updated SignerQuorum in SignerListSet to be an interface{} with uint32 type assertion instead of a value (uint32). + - This allows distinguishing between an unset (nil) and an explicitly set value, including 0 to delete a signer list. + - Ensures SignerQuorum is only included in the Flatten() output when explicitly defined. + - Updates the `Validate` method to make sure `SignerEntries` is not set when `SignerQuorum` is set to 0 diff --git a/docs/changelog/v0.1.x/996_v0_1_3.md b/docs/changelog/v0.1.x/996_v0_1_3.md new file mode 100644 index 00000000..09e6ccc2 --- /dev/null +++ b/docs/changelog/v0.1.x/996_v0_1_3.md @@ -0,0 +1,14 @@ +--- +title: v0.1.3 +--- + +### Added + +- Added `APIVersion` field to the `Client` struct. +- Added `RippledAPIV1` and `RippledAPIV2` constants. +- Added missing `ctid` field on `TxRequest` v1 query. +- Added missing `NoRippleCheck` query (v1 & v2 support). + +### Changed + +- RippledAPIV2 is set as default API version. Queries and transactions are now compatible with Rippled v2 by default. V1 is still supported. In order to use v1, you need to use the `v1` package of each query type. diff --git a/docs/changelog/v0.1.x/997_v0_1_2.md b/docs/changelog/v0.1.x/997_v0_1_2.md new file mode 100644 index 00000000..1e67385f --- /dev/null +++ b/docs/changelog/v0.1.x/997_v0_1_2.md @@ -0,0 +1,10 @@ +--- +title: v0.1.2 +--- + +### Fixed + +#### xrpl + +- The `InfoRequest` for the `account_info` method had an incorrect field `signer_list` (an `s` was missing). The correct field is now `signer_lists`. + Link to the documentation [here](https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/account-methods/account_info#request-format). diff --git a/docs/changelog/v0.1.x/998_v0_1_1.md b/docs/changelog/v0.1.x/998_v0_1_1.md new file mode 100644 index 00000000..5d16f8fe --- /dev/null +++ b/docs/changelog/v0.1.x/998_v0_1_1.md @@ -0,0 +1,42 @@ +--- +title: v0.1.1 +--- + +### Added + +#### address-codec + +- New `ErrInvalidAddressFormat` error. + +### Fixed + +#### binary-codec + +- Fixed `AccountID` X-Address decoding/encoding support. + +#### xrpl + +- Replace `IsValidClassicAddress` with `IsValidAddress` on transactions `Validate` methods: + - `AccountDelete` + - `AMMBid` + - `DepositPreauth` + - `EscrowCancel` + - `EscrowFinish` + - `EscrowCancel` + - `NFTokenBurn` + - `NFTokenCreateOffer` + - `NFTokenMint` + - `NFTokenOffer` + - `Payment` + - `PaymentChannelCreate` + - `SetRegularKey` + - `SignerListSet` + - `BaseTx` + - `XChainBridge` + - `XChainAccountCreateCommit` + - `XChainAddAccountCreateAttestation` + - `XChainAddClaimAttestation` + - `XChainClaim` + - `XChainCreateClaimID` +- Master address derivation on wallet `FromSeed` function. +- `NetworkID` field on `BaseTx` type. diff --git a/docs/changelog/v0.1.x/999_v0_1_0.md b/docs/changelog/v0.1.x/999_v0_1_0.md new file mode 100644 index 00000000..3c95a0da --- /dev/null +++ b/docs/changelog/v0.1.x/999_v0_1_0.md @@ -0,0 +1,80 @@ +--- +title: v0.1.0 +--- + +### Added + +#### binary-codec + +- Updated `definitions`. +- New `DecodeLedgerData` function. +- `Quality` encoding/decoding functions. +- New `XChainBridge` and `Issue` types. + +#### address-codec + +- Address validation with `IsValidAddress`, `IsValidClassicAddress` and `IsValidXAddress`. +- Address conversion with `XAddressToClassicAddress` and `ClassicAddressToXAddress`. +- X-Address encoding/decoding with `EncodeXAddress` and `DecodeXAddress`. + +#### keypairs + +- New `DeriveNodeAddress` function. + +#### xrpl + +- New `AccountRoot`, `Amendments`, `Bridge`, `DID`, `DirectoryNode`, `Oracle`, `RippleState`, `XChainOwnedClaimID`, `XChainOwnedCreateAccountClaimID` ledger entry types. +- New `Multisign` utility function. +- New `NftHistory`, `NftsByIssuer`, `LedgerData`, `Check`, `BookOffers`, `PathFind`, `FeatureOne`, `FeatureAll` queries. +- New `SubmitMultisigned` request. +- New `AMMBid`, `AMMCreate`, `AMMDelete`, `AMMDeposit`, `AMMVote`, `AMMWithdraw` amm transactions. +- New `CheckCancel`, `CheckCash`, `CheckCreate` check transactions. +- New `DepositPreauth` transaction. +- New `DIDSet` and `DIDDelete` transactions. +- New `EscrowCreate`, `EscrowFinish`, `EscrowCancel` escrow transactions. +- New `OracleSet` and `OracleDelete` oracle transactions. +- New `XChainAccountCreateCommitment`, `XChainAddAccountCreateAttestation`, `XChainAddClaimAttestation`, `XChainClaim`, `XChainCommit`, `XChainCreateBridge`, `XChainCreateClaimID` and `XChainModifyBridge` cross-chain transactions. +- New `Multisign` wallet method. +- Ripple time conversion utility functions. +- Added query methods for websocket and rpc clients. +- New `SubmitMultisigned`, `AutofillMultisigned` and `SubmitTxBlobAndWait` methods for both clients. +- Added `Autofill` method for rpc client. +- New `MaxRetries` and `RetryDelay` config options for both clients. + +#### Other + +- Implemented `secp256k1` algorithm. + +### Changed + +#### binary-codec + +- Exported `FieldInstance` type. +- Updated `NewBinaryParser` constructor to accept `definitions.Definitions` as a parameter. +- Updated `NewSerializer` to `NewBinarySerializer` constructor. +- Refactored `FieldIDCodec` to be a struct with `Encode` and `Decode` methods. +- `FromJson` methods to `FromJSON`. +- `ToJson` methods to `ToJSON`. + +#### address-codec + +No changes were made. + +#### keypairs + +- Decoupled `ed25519` and `secp256k1` algorithms from `keypairs` package. +- Decoupled `der` parsing from `keypairs` package. + +#### xrpl + +- Renamed `CurrencyStringToHex` to `ConvertStringToHex` and `CurrencyHexToString` to `ConvertHexToString`. +- Renamed `HashSignedTx` to `TxBlob`. +- Wallet API methods have been renamed for better usability. +- Renamed `SendRequest` to `Request` methods for websocket and rpc clients. + +### Fixed + +#### xrpl + +- Some queries did not have proper fields. All queries have been updated with the fields that are required by the XRP Ledger. +- Some transaction types did not have proper fields. All transaction types have been updated with the fields that are required by the XRP Ledger. diff --git a/docs/changelog/v0.1.x/changelog.md b/docs/changelog/v0.1.x/changelog.md new file mode 100644 index 00000000..69d42fa9 --- /dev/null +++ b/docs/changelog/v0.1.x/changelog.md @@ -0,0 +1,10 @@ +--- +sidebar_position: 0 +--- + +# Changelog + +This section provides a concise record of all notable changes made to the project, organized by release version. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 51b3eccf..8421caf4 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -1,52 +1,51 @@ -import {themes as prismThemes} from 'prism-react-renderer'; -import type {Config} from '@docusaurus/types'; -import type * as Preset from '@docusaurus/preset-classic'; +import { themes as prismThemes } from "prism-react-renderer"; +import type { Config } from "@docusaurus/types"; +import type * as Preset from "@docusaurus/preset-classic"; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) const config: Config = { - title: 'XRPL GO', - tagline: 'XRPL GO', - favicon: 'img/favicon.ico', + title: "XRPL GO", + tagline: "XRPL GO", + favicon: "img/favicon.ico", // Set the production url of your site here - url: 'https://peersyst.github.io', + url: "https://peersyst.github.io", // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/xrpl-go', + baseUrl: "/xrpl-go", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'Peersyst', // Usually your GitHub org/user name. - projectName: 'xrpl-go', // Usually your repo name. + organizationName: "Peersyst", // Usually your GitHub org/user name. + projectName: "xrpl-go", // Usually your repo name. - onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', + onBrokenLinks: "throw", + onBrokenMarkdownLinks: "warn", - deploymentBranch: 'gh-pages', + deploymentBranch: "gh-pages", trailingSlash: false, // Even if you don't use internationalization, you can use this field to set // useful metadata like html lang. For example, if your site is Chinese, you // may want to replace "en" with "zh-Hans". i18n: { - defaultLocale: 'en', - locales: ['en'], + defaultLocale: "en", + locales: ["en"], }, presets: [ [ - 'classic', + "classic", { docs: { - sidebarPath: './sidebars.ts', + sidebarPath: "./sidebars.ts", // Please change this to your repo. // Remove this to remove the "edit this page" links. - editUrl: - 'https://github.com/Peersyst/xrpl-go/tree/main/docs', + editUrl: "https://github.com/Peersyst/xrpl-go/tree/main/docs", }, theme: { - customCss: './src/css/custom.css', + customCss: "./src/css/custom.css", }, } satisfies Preset.Options, ], @@ -54,71 +53,106 @@ const config: Config = { plugins: [ [ - '@easyops-cn/docusaurus-search-local', + "@easyops-cn/docusaurus-search-local", { hashed: true, - docsRouteBasePath: '/docs', + docsRouteBasePath: "/docs", + }, + ], + [ + "@docusaurus/plugin-content-docs", + { + id: "changelogPlugin", + path: "changelog", + routeBasePath: "changelog", + sidebarPath: "./sidebarsChangelog.ts", }, ], ], themeConfig: { // Replace with your project's social card - image: 'img/logo.png', + image: "img/logo.png", navbar: { - title: 'XRPL GO', + title: "XRPL GO", logo: { - alt: 'XRPL GO Logo', - src: 'img/xrpl-go-logo.png', + alt: "XRPL GO Logo", + src: "img/xrpl-go-logo.png", }, items: [ { - type: 'docSidebar', - sidebarId: 'tutorialSidebar', - position: 'left', - label: 'Docs', + type: "docSidebar", + sidebarId: "docsSidebar", + position: "left", + label: "Docs", }, { - href: 'https://github.com/Peersyst/xrpl-go', - label: 'GitHub', - position: 'right', + label: "Changelog", + position: "left", + + // Uncomment the following lines to enable dropdown multiple changelog versions + items: [ + { + type: "docSidebar", + sidebarId: "changelogSidebar1", + docsPluginId: "changelogPlugin", + label: "v0.1.x", + }, + // Uncomment in sidebarsChangelog.ts changelog2 line to enable the second changelog version + // add the next major version files in ./changelog/v0.2.x + // { + // type: "docSidebar", + // sidebarId: "changelogSidebar2", + // docsPluginId: "changelogPlugin", + // label: "v0.2.x", + // }, + ], + }, + { + href: "https://github.com/Peersyst/xrpl-go", + label: "GitHub", + position: "right", }, ], }, footer: { - style: 'dark', + style: "dark", links: [ { - title: 'Docs', + title: "Docs", items: [ { - label: 'Getting Started', - to: '/docs/intro', + label: "Getting Started", + to: "/docs/intro", + }, + { + label: "Installation", + to: "/docs/installation", }, { - label: 'Installation', - to: '/docs/installation', + label: "keypairs", + to: "/docs/keypairs", }, { - label: 'keypairs', - to: '/docs/keypairs', + label: "xrpl", + to: "/docs/xrpl/currency", }, { - label: 'xrpl', - to: '/docs/xrpl/currency', + label: "Changelog", + to: "changelog/v0.1.x/changelog", }, ], }, { - title: 'More', + title: "More", items: [ { - label: 'GitHub', - href: 'https://github.com/Peersyst/xrpl-go', + label: "GitHub", + href: "https://github.com/Peersyst/xrpl-go", }, { - label: 'Reference', - href: 'https://pkg.go.dev/github.com/Peersyst/xrpl-go', + label: "Reference", + href: "https://pkg.go.dev/github.com/Peersyst/xrpl-go", }, ], }, @@ -126,7 +160,7 @@ const config: Config = { copyright: `Copyright © ${new Date().getFullYear()} XRPL Go.`, }, colorMode: { - defaultMode: 'dark', + defaultMode: "dark", disableSwitch: true, }, prism: { diff --git a/docs/sidebars.ts b/docs/sidebars.ts index 28971397..da11c4bb 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -1,4 +1,4 @@ -import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; +import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) @@ -14,7 +14,7 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; */ const sidebars: SidebarsConfig = { // By default, Docusaurus generates a sidebar from the docs folder structure - tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], + docsSidebar: [{ type: "autogenerated", dirName: "." }], // But you can create a sidebar manually /* diff --git a/docs/sidebarsChangelog.ts b/docs/sidebarsChangelog.ts new file mode 100644 index 00000000..2a7648a2 --- /dev/null +++ b/docs/sidebarsChangelog.ts @@ -0,0 +1,8 @@ +import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; + +const sidebars: SidebarsConfig = { + changelogSidebar1: [{ type: "autogenerated", dirName: "v0.1.x" }], + // changelogSidebar2: [{ type: "autogenerated", dirName: "v0.2.x" }], // Uncomment this line to enable the second changelog version +}; + +export default sidebars;