mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
rename Bridge -> XChainBridge in models
This commit is contained in:
@@ -125,9 +125,9 @@ export interface NFTOffer {
|
|||||||
expiration?: number
|
expiration?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Bridge {
|
export interface XChainBridge {
|
||||||
src_chain_door: string
|
LockingChainDoor: string
|
||||||
src_chain_issue: 'XRP' | IssuedCurrency
|
LockingChainIssue: 'XRP' | IssuedCurrency
|
||||||
dst_chain_door: string
|
IssuingChainDoor: string
|
||||||
dst_chain_issue: 'XRP' | IssuedCurrency
|
IssuingChainIssue: 'XRP' | IssuedCurrency
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ValidationError } from '../../errors'
|
import { ValidationError } from '../../errors'
|
||||||
import { Amount, Bridge } from '../common'
|
import { Amount, XChainBridge } from '../common'
|
||||||
|
|
||||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
|||||||
export interface XChainClaim extends BaseTransaction {
|
export interface XChainClaim extends BaseTransaction {
|
||||||
TransactionType: 'XChainClaim'
|
TransactionType: 'XChainClaim'
|
||||||
|
|
||||||
Bridge: Bridge
|
XChainBridge: XChainBridge
|
||||||
|
|
||||||
XChainClaimID: number | string
|
XChainClaimID: number | string
|
||||||
|
|
||||||
@@ -28,8 +28,8 @@ export interface XChainClaim extends BaseTransaction {
|
|||||||
export function validateXChainClaim(tx: Record<string, unknown>): void {
|
export function validateXChainClaim(tx: Record<string, unknown>): void {
|
||||||
validateBaseTransaction(tx)
|
validateBaseTransaction(tx)
|
||||||
|
|
||||||
if (tx.Bridge == null) {
|
if (tx.XChainBridge == null) {
|
||||||
throw new ValidationError('XChainClaim: missing field Bridge')
|
throw new ValidationError('XChainClaim: missing field XChainBridge')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx.XChainClaimID == null) {
|
if (tx.XChainClaimID == null) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ValidationError } from '../../errors'
|
import { ValidationError } from '../../errors'
|
||||||
import { Amount, Bridge } from '../common'
|
import { Amount, XChainBridge } from '../common'
|
||||||
|
|
||||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
|||||||
export interface XChainCommit extends BaseTransaction {
|
export interface XChainCommit extends BaseTransaction {
|
||||||
TransactionType: 'XChainCommit'
|
TransactionType: 'XChainCommit'
|
||||||
|
|
||||||
Bridge: Bridge
|
XChainBridge: XChainBridge
|
||||||
|
|
||||||
XChainClaimID: number | string
|
XChainClaimID: number | string
|
||||||
|
|
||||||
@@ -26,8 +26,8 @@ export interface XChainCommit extends BaseTransaction {
|
|||||||
export function validateXChainCommit(tx: Record<string, unknown>): void {
|
export function validateXChainCommit(tx: Record<string, unknown>): void {
|
||||||
validateBaseTransaction(tx)
|
validateBaseTransaction(tx)
|
||||||
|
|
||||||
if (tx.Bridge == null) {
|
if (tx.XChainBridge == null) {
|
||||||
throw new ValidationError('XChainCommit: missing field Bridge')
|
throw new ValidationError('XChainCommit: missing field XChainBridge')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx.XChainCommitID == null) {
|
if (tx.XChainCommitID == null) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ValidationError } from '../../errors'
|
import { ValidationError } from '../../errors'
|
||||||
import { Amount, Bridge } from '../common'
|
import { Amount, XChainBridge } from '../common'
|
||||||
|
|
||||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
|||||||
export interface XChainCreateBridge extends BaseTransaction {
|
export interface XChainCreateBridge extends BaseTransaction {
|
||||||
TransactionType: 'XChainCreateBridge'
|
TransactionType: 'XChainCreateBridge'
|
||||||
|
|
||||||
Bridge: Bridge
|
XChainBridge: XChainBridge
|
||||||
|
|
||||||
SignatureReward: Amount
|
SignatureReward: Amount
|
||||||
|
|
||||||
@@ -26,8 +26,8 @@ export interface XChainCreateBridge extends BaseTransaction {
|
|||||||
export function validateXChainCreateBridge(tx: Record<string, unknown>): void {
|
export function validateXChainCreateBridge(tx: Record<string, unknown>): void {
|
||||||
validateBaseTransaction(tx)
|
validateBaseTransaction(tx)
|
||||||
|
|
||||||
if (tx.Bridge == null) {
|
if (tx.XChainBridge == null) {
|
||||||
throw new ValidationError('XChainCreateBridge: missing field Bridge')
|
throw new ValidationError('XChainCreateBridge: missing field XChainBridge')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx.SignatureReward == null) {
|
if (tx.SignatureReward == null) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ValidationError } from '../../errors'
|
import { ValidationError } from '../../errors'
|
||||||
import { Amount, Bridge } from '../common'
|
import { Amount, XChainBridge } from '../common'
|
||||||
|
|
||||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
|||||||
export interface XChainCreateClaimID extends BaseTransaction {
|
export interface XChainCreateClaimID extends BaseTransaction {
|
||||||
TransactionType: 'XChainCreateClaimID'
|
TransactionType: 'XChainCreateClaimID'
|
||||||
|
|
||||||
Bridge: Bridge
|
XChainBridge: XChainBridge
|
||||||
|
|
||||||
SignatureReward: Amount
|
SignatureReward: Amount
|
||||||
|
|
||||||
@@ -26,8 +26,8 @@ export interface XChainCreateClaimID extends BaseTransaction {
|
|||||||
export function validateXChainCreateClaimID(tx: Record<string, unknown>): void {
|
export function validateXChainCreateClaimID(tx: Record<string, unknown>): void {
|
||||||
validateBaseTransaction(tx)
|
validateBaseTransaction(tx)
|
||||||
|
|
||||||
if (tx.Bridge == null) {
|
if (tx.XChainBridge == null) {
|
||||||
throw new ValidationError('XChainCreateClaimID: missing field Bridge')
|
throw new ValidationError('XChainCreateClaimID: missing field XChainBridge')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx.SignatureReward == null) {
|
if (tx.SignatureReward == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user