Compare commits

..

5 Commits

Author SHA1 Message Date
Denis Angell
be156c9091 Publish
- @transia/xrpl@2.7.3-alpha.7
2023-07-17 20:25:11 +02:00
Denis Angell
cb3e24a497 fix bad interface 2023-07-17 20:23:51 +02:00
Denis Angell
cfbc46ee25 Publish
- @transia/xrpl@2.7.3-alpha.6
2023-07-12 22:43:35 +02:00
Denis Angell
54681cf821 add Issuer field to Import 2023-07-12 22:43:18 +02:00
Denis Angell
701d1fb209 Update package-lock.json 2023-07-12 22:41:39 +02:00
4 changed files with 18 additions and 4 deletions

2
package-lock.json generated
View File

@@ -17188,7 +17188,7 @@
},
"packages/xrpl": {
"name": "@transia/xrpl",
"version": "2.7.3-alpha.3",
"version": "2.7.3-alpha.5",
"license": "ISC",
"dependencies": {
"@transia/ripple-address-codec": "^4.2.8-alpha.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@transia/xrpl",
"version": "2.7.3-alpha.5",
"version": "2.7.3-alpha.7",
"license": "ISC",
"description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",
"files": [

View File

@@ -3,11 +3,11 @@ import { Amount } from '../common'
import BaseLedgerEntry from './BaseLedgerEntry'
/**
* The HookState object type contains the
* The URIToken object type contains the
*
* @category Ledger Entries
*/
export default interface HookState extends BaseLedgerEntry {
export default interface URIToken extends BaseLedgerEntry {
LedgerEntryType: 'URIToken'
/**

View File

@@ -1,3 +1,5 @@
import { ValidationError } from '../../errors'
import { BaseTransaction, validateBaseTransaction } from './common'
/**
@@ -7,6 +9,10 @@ import { BaseTransaction, validateBaseTransaction } from './common'
*/
export interface Import extends BaseTransaction {
TransactionType: 'Import'
/**
*
*/
Issuer?: string
/**
* Hex value representing a VL Blob.
*/
@@ -21,4 +27,12 @@ export interface Import extends BaseTransaction {
*/
export function validateImport(tx: Record<string, unknown>): void {
validateBaseTransaction(tx)
if (tx.Issuer !== undefined && typeof tx.Issuer !== 'string') {
throw new ValidationError('Import: Issuer must be a string')
}
if (tx.Account === tx.Issuer) {
throw new ValidationError('Import: Issuer and Account must not be equal')
}
}