Compare commits

..

11 Commits

Author SHA1 Message Date
Denis Angell
04286221c2 Update index.ts 2024-09-30 10:52:37 +02:00
Denis Angell
e4e13302ad Update packages/xrpl/src/models/common/index.ts
Co-authored-by: tequ <git@tequ.dev>
2024-09-30 10:50:48 +02:00
Denis Angell
d98d2e5fdb Publish
- @transia/ripple-binary-codec@1.4.6-alpha.10
 - @transia/xahau-models@2.7.3-alpha.29
 - @transia/xrpl@2.7.3-alpha.28
2024-06-19 10:45:51 +02:00
Denis Angell
da39e14d46 Update definitions.json 2024-06-19 10:44:29 +02:00
Denis Angell
ae43c75504 Update package.json 2024-06-19 10:43:19 +02:00
Denis Angell
4ae9839f68 update models package name 2024-05-31 10:33:05 +02:00
Denis Angell
f77d135bb8 add first ledger sequence 2024-05-31 10:32:56 +02:00
Denis Angell
720880a383 add xrpl-models package 2024-05-23 18:26:23 +02:00
Denis Angell
1dbf35dbcb Update remit.ts 2024-05-19 11:18:03 +02:00
Denis Angell
d6411baf10 Update claimReward.ts 2024-05-19 11:17:55 +02:00
Denis Angell
ab86bae582 add missing root flags 2024-05-19 11:17:51 +02:00
10 changed files with 71 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@transia/ripple-binary-codec",
"version": "1.4.6-alpha.9",
"version": "1.4.6-alpha.10",
"description": "XRP Ledger binary codec",
"files": [
"dist/*",

View File

@@ -2649,6 +2649,7 @@
"terNO_HOOK": -86,
"tesSUCCESS": 0,
"tesPARTIAL": 1,
"tecCLAIM": 100,
"tecPATH_PARTIAL": 101,

View File

@@ -0,0 +1,25 @@
{
"name": "@transia/xahau-models",
"version": "2.7.3-alpha.29",
"description": "",
"private": false,
"main": "dist/models/index.js",
"files": [
"dist/**/*"
],
"author": {
"name": "Denis Angell",
"url": "https://github.com/dangell7"
},
"license": "MIT",
"scripts": {},
"dependencies": {
"@types/node": "^20.4.2",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
},
"engines": {
"node": ">=12.0.0",
"npm": ">=7.0.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@transia/xrpl",
"version": "2.7.3-alpha.27",
"version": "2.7.3-alpha.28",
"license": "ISC",
"description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",
"files": [
@@ -23,7 +23,7 @@
},
"dependencies": {
"@transia/ripple-address-codec": "^4.2.8-alpha.0",
"@transia/ripple-binary-codec": "^1.4.6-alpha.9",
"@transia/ripple-binary-codec": "^1.4.6-alpha.10",
"@transia/ripple-keypairs": "^1.1.8-alpha.0",
"bignumber.js": "^9.0.0",
"bip32": "^2.0.6",
@@ -54,6 +54,7 @@
"build": "run-s build:lib build:snippets build:web",
"build:snippets": "tsc --build ./snippets/tsconfig.json",
"build:lib": "tsc --build tsconfig.build.json",
"build:models": "tsc --build tsconfig.models.json",
"build:web": "webpack",
"build:browserTests": "webpack --config ./test/webpack.config.js",
"analyze": "run-s build:web --analyze",

View File

@@ -17,7 +17,7 @@ export interface IssuedCurrencyAmount extends IssuedCurrency {
export type Amount = IssuedCurrencyAmount | string
export type AmountEntry = Amount
export type AmountEntry = { AmountEntry: { Amount: Amount } }
export interface Signer {
Signer: {
@@ -87,7 +87,7 @@ export interface HookParameter {
/**
* The value of the parameter.
*/
HookParameterValue: string
HookParameterValue?: string
}
}

View File

@@ -72,6 +72,16 @@ export default interface AccountRoot extends BaseLedgerEntry {
* account to each other.
*/
TransferRate?: number
NFTokenMinter?: string
MintedNFTokens?: number
BurnedNFTokens?: number
HookStateCount?: number
HookNamespaces?: string[]
RewardLgrFirst?: number
RewardLgrLast?: number
RewardTime?: number
RewardAccumulator?: number
FirstNFTokenSequence?: number
ImportSequence?: string
GovernanceFlags?: string
GovernanceMarks?: string

View File

@@ -1,6 +1,17 @@
import { ValidationError } from '../../errors'
import { BaseTransaction, validateBaseTransaction } from './common'
/**
* Transaction Flags for an ClaimReward Transaction.
*
* @category Transaction Flags
*/
export enum ClaimRewardFlags {
/**
* If set, indicates that the user would like to opt out of rewards.
*/
tfOptOut = 0x00000001,
}
/**
* ClaimReward is a transaction model that allows an account to claim rewards.
@@ -9,6 +20,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
*/
export interface ClaimReward extends BaseTransaction {
TransactionType: 'ClaimReward'
Flags?: number | ClaimRewardFlags
/** The unique address of the issuer where the reward.c hook is installed. */
Issuer?: string
}

View File

@@ -170,6 +170,10 @@ export interface BaseTransaction {
* The network id of the transaction.
*/
NetworkID?: number
/**
*
*/
FirstLedgerSequence?: number
/**
* The hook parameters of the transaction.
*/

View File

@@ -32,6 +32,10 @@ export interface Remit extends BaseTransaction {
*
*/
MintURIToken?: MintURIToken
/**
*
*/
URITokenIDs?: string[]
/**
* Arbitrary 256-bit hash representing a specific reason or identifier for
* this payment.
@@ -69,7 +73,7 @@ export function validateRemit(tx: Record<string, unknown>): void {
if (tx.DestinationTag != null && typeof tx.DestinationTag !== 'number') {
throw new ValidationError('Remit: DestinationTag must be a number')
}
if (tx.Inform === tx.Account || tx.inform === tx.Destination) {
if (tx.Inform === tx.Account || tx.Inform === tx.Destination) {
throw new ValidationError(
'Remit: Inform must not be equal to the account or destination',
)

View File

@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "../xrpl-models/dist"
},
"include": ["./src/models/**/*.ts", "./src/errors.ts"],
}