mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-27 23:55:49 +00:00
Compare commits
11 Commits
@transia/x
...
xahau-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04286221c2 | ||
|
|
e4e13302ad | ||
|
|
d98d2e5fdb | ||
|
|
da39e14d46 | ||
|
|
ae43c75504 | ||
|
|
4ae9839f68 | ||
|
|
f77d135bb8 | ||
|
|
720880a383 | ||
|
|
1dbf35dbcb | ||
|
|
d6411baf10 | ||
|
|
ab86bae582 |
@@ -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/*",
|
||||
|
||||
@@ -2649,6 +2649,7 @@
|
||||
"terNO_HOOK": -86,
|
||||
|
||||
"tesSUCCESS": 0,
|
||||
"tesPARTIAL": 1,
|
||||
|
||||
"tecCLAIM": 100,
|
||||
"tecPATH_PARTIAL": 101,
|
||||
|
||||
25
packages/xrpl-models/package.json
Normal file
25
packages/xrpl-models/package.json
Normal 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"
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -170,6 +170,10 @@ export interface BaseTransaction {
|
||||
* The network id of the transaction.
|
||||
*/
|
||||
NetworkID?: number
|
||||
/**
|
||||
*
|
||||
*/
|
||||
FirstLedgerSequence?: number
|
||||
/**
|
||||
* The hook parameters of the transaction.
|
||||
*/
|
||||
|
||||
@@ -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',
|
||||
)
|
||||
|
||||
8
packages/xrpl/tsconfig.models.json
Normal file
8
packages/xrpl/tsconfig.models.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "../xrpl-models/dist"
|
||||
},
|
||||
"include": ["./src/models/**/*.ts", "./src/errors.ts"],
|
||||
}
|
||||
Reference in New Issue
Block a user