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
|
||||
}
|
||||
|
||||
export interface Bridge {
|
||||
src_chain_door: string
|
||||
src_chain_issue: 'XRP' | IssuedCurrency
|
||||
dst_chain_door: string
|
||||
dst_chain_issue: 'XRP' | IssuedCurrency
|
||||
export interface XChainBridge {
|
||||
LockingChainDoor: string
|
||||
LockingChainIssue: 'XRP' | IssuedCurrency
|
||||
IssuingChainDoor: string
|
||||
IssuingChainIssue: 'XRP' | IssuedCurrency
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ValidationError } from '../../errors'
|
||||
import { Amount, Bridge } from '../common'
|
||||
import { Amount, XChainBridge } from '../common'
|
||||
|
||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
|
||||
@@ -10,7 +10,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
export interface XChainClaim extends BaseTransaction {
|
||||
TransactionType: 'XChainClaim'
|
||||
|
||||
Bridge: Bridge
|
||||
XChainBridge: XChainBridge
|
||||
|
||||
XChainClaimID: number | string
|
||||
|
||||
@@ -28,8 +28,8 @@ export interface XChainClaim extends BaseTransaction {
|
||||
export function validateXChainClaim(tx: Record<string, unknown>): void {
|
||||
validateBaseTransaction(tx)
|
||||
|
||||
if (tx.Bridge == null) {
|
||||
throw new ValidationError('XChainClaim: missing field Bridge')
|
||||
if (tx.XChainBridge == null) {
|
||||
throw new ValidationError('XChainClaim: missing field XChainBridge')
|
||||
}
|
||||
|
||||
if (tx.XChainClaimID == null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ValidationError } from '../../errors'
|
||||
import { Amount, Bridge } from '../common'
|
||||
import { Amount, XChainBridge } from '../common'
|
||||
|
||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
|
||||
@@ -10,7 +10,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
export interface XChainCommit extends BaseTransaction {
|
||||
TransactionType: 'XChainCommit'
|
||||
|
||||
Bridge: Bridge
|
||||
XChainBridge: XChainBridge
|
||||
|
||||
XChainClaimID: number | string
|
||||
|
||||
@@ -26,8 +26,8 @@ export interface XChainCommit extends BaseTransaction {
|
||||
export function validateXChainCommit(tx: Record<string, unknown>): void {
|
||||
validateBaseTransaction(tx)
|
||||
|
||||
if (tx.Bridge == null) {
|
||||
throw new ValidationError('XChainCommit: missing field Bridge')
|
||||
if (tx.XChainBridge == null) {
|
||||
throw new ValidationError('XChainCommit: missing field XChainBridge')
|
||||
}
|
||||
|
||||
if (tx.XChainCommitID == null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ValidationError } from '../../errors'
|
||||
import { Amount, Bridge } from '../common'
|
||||
import { Amount, XChainBridge } from '../common'
|
||||
|
||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
|
||||
@@ -10,7 +10,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
export interface XChainCreateBridge extends BaseTransaction {
|
||||
TransactionType: 'XChainCreateBridge'
|
||||
|
||||
Bridge: Bridge
|
||||
XChainBridge: XChainBridge
|
||||
|
||||
SignatureReward: Amount
|
||||
|
||||
@@ -26,8 +26,8 @@ export interface XChainCreateBridge extends BaseTransaction {
|
||||
export function validateXChainCreateBridge(tx: Record<string, unknown>): void {
|
||||
validateBaseTransaction(tx)
|
||||
|
||||
if (tx.Bridge == null) {
|
||||
throw new ValidationError('XChainCreateBridge: missing field Bridge')
|
||||
if (tx.XChainBridge == null) {
|
||||
throw new ValidationError('XChainCreateBridge: missing field XChainBridge')
|
||||
}
|
||||
|
||||
if (tx.SignatureReward == null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ValidationError } from '../../errors'
|
||||
import { Amount, Bridge } from '../common'
|
||||
import { Amount, XChainBridge } from '../common'
|
||||
|
||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
|
||||
@@ -10,7 +10,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
export interface XChainCreateClaimID extends BaseTransaction {
|
||||
TransactionType: 'XChainCreateClaimID'
|
||||
|
||||
Bridge: Bridge
|
||||
XChainBridge: XChainBridge
|
||||
|
||||
SignatureReward: Amount
|
||||
|
||||
@@ -26,8 +26,8 @@ export interface XChainCreateClaimID extends BaseTransaction {
|
||||
export function validateXChainCreateClaimID(tx: Record<string, unknown>): void {
|
||||
validateBaseTransaction(tx)
|
||||
|
||||
if (tx.Bridge == null) {
|
||||
throw new ValidationError('XChainCreateClaimID: missing field Bridge')
|
||||
if (tx.XChainBridge == null) {
|
||||
throw new ValidationError('XChainCreateClaimID: missing field XChainBridge')
|
||||
}
|
||||
|
||||
if (tx.SignatureReward == null) {
|
||||
|
||||
Reference in New Issue
Block a user