mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-29 08:35:49 +00:00
Compare commits
7 Commits
denis-urit
...
network-id
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5deee1274 | ||
|
|
294c1cb083 | ||
|
|
69c705874f | ||
|
|
e36912c60a | ||
|
|
3d06185867 | ||
|
|
b241779f10 | ||
|
|
c809bd87e4 |
@@ -321,6 +321,16 @@
|
|||||||
"type": "UInt16"
|
"type": "UInt16"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
"NetworkID",
|
||||||
|
{
|
||||||
|
"nth": 1,
|
||||||
|
"isVLEncoded": false,
|
||||||
|
"isSerialized": true,
|
||||||
|
"isSigningField": true,
|
||||||
|
"type": "UInt32"
|
||||||
|
}
|
||||||
|
],
|
||||||
[
|
[
|
||||||
"Flags",
|
"Flags",
|
||||||
{
|
{
|
||||||
@@ -2176,6 +2186,9 @@
|
|||||||
"telCAN_NOT_QUEUE_BLOCKED": -389,
|
"telCAN_NOT_QUEUE_BLOCKED": -389,
|
||||||
"telCAN_NOT_QUEUE_FEE": -388,
|
"telCAN_NOT_QUEUE_FEE": -388,
|
||||||
"telCAN_NOT_QUEUE_FULL": -387,
|
"telCAN_NOT_QUEUE_FULL": -387,
|
||||||
|
"telWRONG_NETWORK": -386,
|
||||||
|
"telREQUIRES_NETWORK_ID": -385,
|
||||||
|
"telNETWORK_ID_MAKES_TX_NON_CANONICAL": -384,
|
||||||
|
|
||||||
"temMALFORMED": -299,
|
"temMALFORMED": -299,
|
||||||
"temBAD_AMOUNT": -298,
|
"temBAD_AMOUNT": -298,
|
||||||
|
|||||||
@@ -136,6 +136,10 @@ export interface ServerInfoResponse extends BaseResponse {
|
|||||||
* overall network's load factor.
|
* overall network's load factor.
|
||||||
*/
|
*/
|
||||||
load_factor?: number
|
load_factor?: number
|
||||||
|
/**
|
||||||
|
* The network id of the server.
|
||||||
|
*/
|
||||||
|
network_id?: number
|
||||||
/**
|
/**
|
||||||
* Current multiplier to the transaction cost based on
|
* Current multiplier to the transaction cost based on
|
||||||
* load to this server.
|
* load to this server.
|
||||||
|
|||||||
@@ -159,6 +159,10 @@ export interface BaseTransaction {
|
|||||||
* account it says it is from.
|
* account it says it is from.
|
||||||
*/
|
*/
|
||||||
TxnSignature?: string
|
TxnSignature?: string
|
||||||
|
/**
|
||||||
|
* The network id of the transaction.
|
||||||
|
*/
|
||||||
|
NetworkID?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -252,6 +256,9 @@ export function validateBaseTransaction(common: Record<string, unknown>): void {
|
|||||||
) {
|
) {
|
||||||
throw new ValidationError('BaseTransaction: invalid TxnSignature')
|
throw new ValidationError('BaseTransaction: invalid TxnSignature')
|
||||||
}
|
}
|
||||||
|
if (common.NetworkID !== undefined && typeof common.NetworkID !== 'number') {
|
||||||
|
throw new ValidationError('BaseTransaction: invalid NetworkID')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { setTransactionFlagsToNumber } from '../models/utils/flags'
|
|||||||
import { xrpToDrops } from '../utils'
|
import { xrpToDrops } from '../utils'
|
||||||
|
|
||||||
import getFeeXrp from './getFeeXrp'
|
import getFeeXrp from './getFeeXrp'
|
||||||
|
import getNetworkID from './getNetworkID'
|
||||||
|
|
||||||
// Expire unconfirmed transactions after 20 ledger versions, approximately 1 minute, by default
|
// Expire unconfirmed transactions after 20 ledger versions, approximately 1 minute, by default
|
||||||
const LEDGER_OFFSET = 20
|
const LEDGER_OFFSET = 20
|
||||||
@@ -39,8 +40,10 @@ async function autofill<T extends Transaction>(
|
|||||||
setValidAddresses(tx)
|
setValidAddresses(tx)
|
||||||
|
|
||||||
setTransactionFlagsToNumber(tx)
|
setTransactionFlagsToNumber(tx)
|
||||||
|
|
||||||
const promises: Array<Promise<void>> = []
|
const promises: Array<Promise<void>> = []
|
||||||
|
if (tx.NetworkID == null) {
|
||||||
|
promises.push(setNetworkID(this, tx))
|
||||||
|
}
|
||||||
if (tx.Sequence == null) {
|
if (tx.Sequence == null) {
|
||||||
promises.push(setNextValidSequenceNumber(this, tx))
|
promises.push(setNextValidSequenceNumber(this, tx))
|
||||||
}
|
}
|
||||||
@@ -200,6 +203,12 @@ function scaleValue(value, multiplier): string {
|
|||||||
return new BigNumber(value).times(multiplier).toString()
|
return new BigNumber(value).times(multiplier).toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function setNetworkID(client: Client, tx: Transaction): Promise<void> {
|
||||||
|
const id = await getNetworkID(client)
|
||||||
|
// eslint-disable-next-line no-param-reassign -- param reassign is safe
|
||||||
|
tx.NetworkID = id
|
||||||
|
}
|
||||||
|
|
||||||
async function setLatestValidatedLedgerSequence(
|
async function setLatestValidatedLedgerSequence(
|
||||||
client: Client,
|
client: Client,
|
||||||
tx: Transaction,
|
tx: Transaction,
|
||||||
|
|||||||
22
packages/xrpl/src/sugar/getNetworkID.ts
Normal file
22
packages/xrpl/src/sugar/getNetworkID.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import type { Client } from '..'
|
||||||
|
import { XrplError } from '../errors'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the network ID of the rippled server.
|
||||||
|
*
|
||||||
|
* @param this - The Client used to connect to the ledger.
|
||||||
|
* @param client
|
||||||
|
* @returns The network id.
|
||||||
|
*/
|
||||||
|
export default async function getNetworkID(client: Client): Promise<number> {
|
||||||
|
const response = await client.request({
|
||||||
|
command: 'server_info',
|
||||||
|
})
|
||||||
|
const networkID = response.result.info.network_id
|
||||||
|
if (networkID == null) {
|
||||||
|
throw new XrplError(
|
||||||
|
'getNetworkID: Could not get network_id from server_info',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return networkID
|
||||||
|
}
|
||||||
@@ -18,6 +18,7 @@ import { assertRejects } from '../testUtils'
|
|||||||
const Fee = '10'
|
const Fee = '10'
|
||||||
const Sequence = 1432
|
const Sequence = 1432
|
||||||
const LastLedgerSequence = 2908734
|
const LastLedgerSequence = 2908734
|
||||||
|
const NetworkID = 21338
|
||||||
|
|
||||||
describe('client.autofill', function () {
|
describe('client.autofill', function () {
|
||||||
let testContext: XrplTestContext
|
let testContext: XrplTestContext
|
||||||
@@ -35,12 +36,14 @@ describe('client.autofill', function () {
|
|||||||
Fee,
|
Fee,
|
||||||
Sequence,
|
Sequence,
|
||||||
LastLedgerSequence,
|
LastLedgerSequence,
|
||||||
|
NetworkID,
|
||||||
}
|
}
|
||||||
const txResult = await testContext.client.autofill(tx)
|
const txResult = await testContext.client.autofill(tx)
|
||||||
|
|
||||||
assert.strictEqual(txResult.Fee, Fee)
|
assert.strictEqual(txResult.Fee, Fee)
|
||||||
assert.strictEqual(txResult.Sequence, Sequence)
|
assert.strictEqual(txResult.Sequence, Sequence)
|
||||||
assert.strictEqual(txResult.LastLedgerSequence, LastLedgerSequence)
|
assert.strictEqual(txResult.LastLedgerSequence, LastLedgerSequence)
|
||||||
|
assert.strictEqual(txResult.NetworkID, NetworkID)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('converts Account & Destination X-address to their classic address', async function () {
|
it('converts Account & Destination X-address to their classic address', async function () {
|
||||||
@@ -58,6 +61,10 @@ describe('client.autofill', function () {
|
|||||||
'server_info',
|
'server_info',
|
||||||
rippled.server_info.normal,
|
rippled.server_info.normal,
|
||||||
)
|
)
|
||||||
|
testContext.mockRippled!.addResponse(
|
||||||
|
'server_info',
|
||||||
|
rippled.server_info.normal,
|
||||||
|
)
|
||||||
testContext.mockRippled!.addResponse('ledger', rippled.ledger.normal)
|
testContext.mockRippled!.addResponse('ledger', rippled.ledger.normal)
|
||||||
|
|
||||||
const txResult = await testContext.client.autofill(tx)
|
const txResult = await testContext.client.autofill(tx)
|
||||||
@@ -76,6 +83,7 @@ describe('client.autofill', function () {
|
|||||||
Authorize: 'rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo',
|
Authorize: 'rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo',
|
||||||
Fee,
|
Fee,
|
||||||
LastLedgerSequence,
|
LastLedgerSequence,
|
||||||
|
NetworkID,
|
||||||
}
|
}
|
||||||
testContext.mockRippled!.addResponse('account_info', {
|
testContext.mockRippled!.addResponse('account_info', {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
@@ -101,6 +109,10 @@ describe('client.autofill', function () {
|
|||||||
'server_info',
|
'server_info',
|
||||||
rippled.server_info.normal,
|
rippled.server_info.normal,
|
||||||
)
|
)
|
||||||
|
testContext.mockRippled!.addResponse(
|
||||||
|
'server_info',
|
||||||
|
rippled.server_info.normal,
|
||||||
|
)
|
||||||
testContext.mockRippled!.addResponse(
|
testContext.mockRippled!.addResponse(
|
||||||
'account_objects',
|
'account_objects',
|
||||||
rippled.account_objects.normal,
|
rippled.account_objects.normal,
|
||||||
@@ -113,6 +125,7 @@ describe('client.autofill', function () {
|
|||||||
Fee,
|
Fee,
|
||||||
Sequence,
|
Sequence,
|
||||||
LastLedgerSequence,
|
LastLedgerSequence,
|
||||||
|
NetworkID,
|
||||||
}
|
}
|
||||||
|
|
||||||
await assertRejects(testContext.client.autofill(tx), XrplError)
|
await assertRejects(testContext.client.autofill(tx), XrplError)
|
||||||
@@ -126,6 +139,7 @@ describe('client.autofill', function () {
|
|||||||
Authorize: 'rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo',
|
Authorize: 'rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo',
|
||||||
Sequence,
|
Sequence,
|
||||||
LastLedgerSequence,
|
LastLedgerSequence,
|
||||||
|
NetworkID,
|
||||||
}
|
}
|
||||||
testContext.mockRippled!.addResponse(
|
testContext.mockRippled!.addResponse(
|
||||||
'server_info',
|
'server_info',
|
||||||
@@ -155,6 +169,10 @@ describe('client.autofill', function () {
|
|||||||
'server_info',
|
'server_info',
|
||||||
rippled.server_info.normal,
|
rippled.server_info.normal,
|
||||||
)
|
)
|
||||||
|
testContext.mockRippled!.addResponse(
|
||||||
|
'server_info',
|
||||||
|
rippled.server_info.normal,
|
||||||
|
)
|
||||||
|
|
||||||
const txResult = await testContext.client.autofill(tx)
|
const txResult = await testContext.client.autofill(tx)
|
||||||
assert.strictEqual(txResult.Fee, '399')
|
assert.strictEqual(txResult.Fee, '399')
|
||||||
@@ -171,6 +189,10 @@ describe('client.autofill', function () {
|
|||||||
rippled.account_info.normal,
|
rippled.account_info.normal,
|
||||||
)
|
)
|
||||||
testContext.mockRippled!.addResponse('ledger', rippled.ledger.normal)
|
testContext.mockRippled!.addResponse('ledger', rippled.ledger.normal)
|
||||||
|
testContext.mockRippled!.addResponse(
|
||||||
|
'server_info',
|
||||||
|
rippled.server_info.normal,
|
||||||
|
)
|
||||||
testContext.mockRippled!.addResponse('server_state', {
|
testContext.mockRippled!.addResponse('server_state', {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
type: 'response',
|
type: 'response',
|
||||||
@@ -214,6 +236,10 @@ describe('client.autofill', function () {
|
|||||||
'server_info',
|
'server_info',
|
||||||
rippled.server_info.normal,
|
rippled.server_info.normal,
|
||||||
)
|
)
|
||||||
|
testContext.mockRippled!.addResponse(
|
||||||
|
'server_info',
|
||||||
|
rippled.server_info.normal,
|
||||||
|
)
|
||||||
const txResult = await testContext.client.autofill(tx, 4)
|
const txResult = await testContext.client.autofill(tx, 4)
|
||||||
|
|
||||||
assert.strictEqual(txResult.Fee, '459')
|
assert.strictEqual(txResult.Fee, '459')
|
||||||
@@ -227,6 +253,7 @@ describe('client.autofill', function () {
|
|||||||
Authorize: 'rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo',
|
Authorize: 'rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo',
|
||||||
Fee,
|
Fee,
|
||||||
Sequence,
|
Sequence,
|
||||||
|
NetworkID,
|
||||||
}
|
}
|
||||||
testContext.mockRippled!.addResponse('ledger', {
|
testContext.mockRippled!.addResponse('ledger', {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
@@ -272,9 +299,37 @@ describe('client.autofill', function () {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
testContext.mockRippled!.addResponse(
|
||||||
|
'server_info',
|
||||||
|
rippled.server_info.normal,
|
||||||
|
)
|
||||||
const txResult = await testContext.client.autofill(tx)
|
const txResult = await testContext.client.autofill(tx)
|
||||||
assert.strictEqual(txResult.Fee, '12')
|
assert.strictEqual(txResult.Fee, '12')
|
||||||
assert.strictEqual(txResult.Sequence, 23)
|
assert.strictEqual(txResult.Sequence, 23)
|
||||||
assert.strictEqual(txResult.LastLedgerSequence, 9038234)
|
assert.strictEqual(txResult.LastLedgerSequence, 9038234)
|
||||||
|
assert.strictEqual(txResult.NetworkID, 21338)
|
||||||
|
})
|
||||||
|
|
||||||
|
it("should autofill NetworkID when it's missing", async function () {
|
||||||
|
const tx: Transaction = {
|
||||||
|
TransactionType: 'DepositPreauth',
|
||||||
|
Account: 'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
|
||||||
|
Authorize: 'rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo',
|
||||||
|
Fee,
|
||||||
|
LastLedgerSequence,
|
||||||
|
Sequence,
|
||||||
|
}
|
||||||
|
testContext.mockRippled!.addResponse('server_info', {
|
||||||
|
status: 'success',
|
||||||
|
type: 'response',
|
||||||
|
result: {
|
||||||
|
info: {
|
||||||
|
network_id: 21338,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const txResult = await testContext.client.autofill(tx)
|
||||||
|
|
||||||
|
assert.strictEqual(txResult.NetworkID, 21338)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ describe('client.submit', function () {
|
|||||||
Sequence: 1,
|
Sequence: 1,
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
LastLedgerSequence: 12312,
|
LastLedgerSequence: 12312,
|
||||||
|
NetworkID: 21338,
|
||||||
}
|
}
|
||||||
|
|
||||||
it('should submit an unsigned transaction', async function () {
|
it('should submit an unsigned transaction', async function () {
|
||||||
@@ -83,6 +84,7 @@ describe('client.submit', function () {
|
|||||||
LastLedgerSequence: 12312,
|
LastLedgerSequence: 12312,
|
||||||
Amount: '20000000',
|
Amount: '20000000',
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
|
NetworkID: 21338,
|
||||||
SigningPubKey:
|
SigningPubKey:
|
||||||
'030E58CDD076E798C84755590AAF6237CA8FAE821070A59F648B517A30DC6F589D',
|
'030E58CDD076E798C84755590AAF6237CA8FAE821070A59F648B517A30DC6F589D',
|
||||||
TxnSignature:
|
TxnSignature:
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"converge_time_s": 2.007,
|
"converge_time_s": 2.007,
|
||||||
"proposers": 4
|
"proposers": 4
|
||||||
},
|
},
|
||||||
|
"network_id": 21338,
|
||||||
"load_factor": 1,
|
"load_factor": 1,
|
||||||
"peers": 53,
|
"peers": 53,
|
||||||
"pubkey_node": "n94wWvFUmaKGYrKUGgpv1DyYgDeXRGdACkNQaSe7zJiy5Znio7UC",
|
"pubkey_node": "n94wWvFUmaKGYrKUGgpv1DyYgDeXRGdACkNQaSe7zJiy5Znio7UC",
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -32,6 +33,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
NFTokenSellOffer: NFTOKEN_SELL_OFFER,
|
NFTokenSellOffer: NFTOKEN_SELL_OFFER,
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -44,6 +46,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
TransactionType: 'NFTokenAcceptOffer',
|
TransactionType: 'NFTokenAcceptOffer',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -62,6 +65,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
||||||
NFTokenBrokerFee: '1',
|
NFTokenBrokerFee: '1',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -80,6 +84,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
NFTokenSellOffer: NFTOKEN_SELL_OFFER,
|
NFTokenSellOffer: NFTOKEN_SELL_OFFER,
|
||||||
NFTokenBrokerFee: '1',
|
NFTokenBrokerFee: '1',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -98,6 +103,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -113,6 +119,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
NFTokenBrokerFee: '1',
|
NFTokenBrokerFee: '1',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -128,6 +135,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
||||||
NFTokenBrokerFee: '0',
|
NFTokenBrokerFee: '0',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -147,6 +155,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
||||||
NFTokenBrokerFee: '-1',
|
NFTokenBrokerFee: '-1',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -166,6 +175,7 @@ describe('NFTokenAcceptOffer', function () {
|
|||||||
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
NFTokenBuyOffer: NFTOKEN_BUY_OFFER,
|
||||||
NFTokenBrokerFee: 1,
|
NFTokenBrokerFee: 1,
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ describe('NFTokenBurn', function () {
|
|||||||
NFTokenID: TOKEN_ID,
|
NFTokenID: TOKEN_ID,
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
@@ -29,6 +30,7 @@ describe('NFTokenBurn', function () {
|
|||||||
TransactionType: 'NFTokenBurn',
|
TransactionType: 'NFTokenBurn',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
} as any
|
} as any
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ describe('NFTokenCancelOffer', function () {
|
|||||||
it(`verifies valid NFTokenCancelOffer`, function () {
|
it(`verifies valid NFTokenCancelOffer`, function () {
|
||||||
const validNFTokenCancelOffer = {
|
const validNFTokenCancelOffer = {
|
||||||
TransactionType: 'NFTokenCancelOffer',
|
TransactionType: 'NFTokenCancelOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
NFTokenOffers: [BUY_OFFER],
|
NFTokenOffers: [BUY_OFFER],
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
@@ -28,6 +29,7 @@ describe('NFTokenCancelOffer', function () {
|
|||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCancelOffer',
|
TransactionType: 'NFTokenCancelOffer',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
|
NetworkID: 21338,
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
@@ -44,6 +46,7 @@ describe('NFTokenCancelOffer', function () {
|
|||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCancelOffer',
|
TransactionType: 'NFTokenCancelOffer',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
|
NetworkID: 21338,
|
||||||
NFTokenOffers: [],
|
NFTokenOffers: [],
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`verifies valid NFTokenCreateOffer buyside`, function () {
|
it(`verifies valid NFTokenCreateOffer buyside`, function () {
|
||||||
const validNFTokenCreateOffer = {
|
const validNFTokenCreateOffer = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
NFTokenID: NFTOKEN_ID,
|
NFTokenID: NFTOKEN_ID,
|
||||||
Amount: '1',
|
Amount: '1',
|
||||||
Owner: 'r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ',
|
Owner: 'r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ',
|
||||||
@@ -30,6 +31,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`verifies valid NFTokenCreateOffer sellside`, function () {
|
it(`verifies valid NFTokenCreateOffer sellside`, function () {
|
||||||
const validNFTokenCreateOffer = {
|
const validNFTokenCreateOffer = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
NFTokenID: NFTOKEN_ID,
|
NFTokenID: NFTOKEN_ID,
|
||||||
Amount: '1',
|
Amount: '1',
|
||||||
Flags: NFTokenCreateOfferFlags.tfSellNFToken,
|
Flags: NFTokenCreateOfferFlags.tfSellNFToken,
|
||||||
@@ -46,6 +48,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`verifies w/ 0 Amount NFTokenCreateOffer sellside`, function () {
|
it(`verifies w/ 0 Amount NFTokenCreateOffer sellside`, function () {
|
||||||
const validNFTokenCreateOffer = {
|
const validNFTokenCreateOffer = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
NFTokenID: NFTOKEN_ID,
|
NFTokenID: NFTOKEN_ID,
|
||||||
Amount: '0',
|
Amount: '0',
|
||||||
Flags: NFTokenCreateOfferFlags.tfSellNFToken,
|
Flags: NFTokenCreateOfferFlags.tfSellNFToken,
|
||||||
@@ -62,6 +65,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`throws w/ Account === Owner`, function () {
|
it(`throws w/ Account === Owner`, function () {
|
||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
NFTokenID: NFTOKEN_ID,
|
NFTokenID: NFTOKEN_ID,
|
||||||
Amount: '1',
|
Amount: '1',
|
||||||
Expiration: 1000,
|
Expiration: 1000,
|
||||||
@@ -81,6 +85,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`throws w/ Account === Destination`, function () {
|
it(`throws w/ Account === Destination`, function () {
|
||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
NFTokenID: NFTOKEN_ID,
|
NFTokenID: NFTOKEN_ID,
|
||||||
Amount: '1',
|
Amount: '1',
|
||||||
Flags: NFTokenCreateOfferFlags.tfSellNFToken,
|
Flags: NFTokenCreateOfferFlags.tfSellNFToken,
|
||||||
@@ -101,6 +106,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`throws w/out NFTokenID`, function () {
|
it(`throws w/out NFTokenID`, function () {
|
||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
Amount: '1',
|
Amount: '1',
|
||||||
Owner: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXe',
|
Owner: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXe',
|
||||||
Expiration: 1000,
|
Expiration: 1000,
|
||||||
@@ -120,6 +126,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`throws w/ invalid Amount`, function () {
|
it(`throws w/ invalid Amount`, function () {
|
||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
NFTokenID: NFTOKEN_ID,
|
NFTokenID: NFTOKEN_ID,
|
||||||
Amount: 1,
|
Amount: 1,
|
||||||
Owner: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXe',
|
Owner: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXe',
|
||||||
@@ -140,6 +147,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`throws w/ missing Amount`, function () {
|
it(`throws w/ missing Amount`, function () {
|
||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
Owner: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXe',
|
Owner: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXe',
|
||||||
Expiration: 1000,
|
Expiration: 1000,
|
||||||
NFTokenID: NFTOKEN_ID,
|
NFTokenID: NFTOKEN_ID,
|
||||||
@@ -159,6 +167,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`throws w/ Owner for sell offer`, function () {
|
it(`throws w/ Owner for sell offer`, function () {
|
||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
Expiration: 1000,
|
Expiration: 1000,
|
||||||
Owner: 'r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ',
|
Owner: 'r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
@@ -179,6 +188,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`throws w/out Owner for buy offer`, function () {
|
it(`throws w/out Owner for buy offer`, function () {
|
||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
Expiration: 1000,
|
Expiration: 1000,
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Amount: '1',
|
Amount: '1',
|
||||||
@@ -197,6 +207,7 @@ describe('NFTokenCreateOffer', function () {
|
|||||||
it(`throws w/ 0 Amount for buy offer`, function () {
|
it(`throws w/ 0 Amount for buy offer`, function () {
|
||||||
const invalid = {
|
const invalid = {
|
||||||
TransactionType: 'NFTokenCreateOffer',
|
TransactionType: 'NFTokenCreateOffer',
|
||||||
|
NetworkID: 21338,
|
||||||
Expiration: 1000,
|
Expiration: 1000,
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Owner: 'r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ',
|
Owner: 'r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ',
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ describe('NFTokenMint', function () {
|
|||||||
TransactionType: 'NFTokenMint',
|
TransactionType: 'NFTokenMint',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: NFTokenMintFlags.tfTransferable,
|
Flags: NFTokenMintFlags.tfTransferable,
|
||||||
NFTokenTaxon: 0,
|
NFTokenTaxon: 0,
|
||||||
@@ -34,6 +35,7 @@ describe('NFTokenMint', function () {
|
|||||||
TransactionType: 'NFTokenMint',
|
TransactionType: 'NFTokenMint',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: NFTokenMintFlags.tfTransferable,
|
Flags: NFTokenMintFlags.tfTransferable,
|
||||||
Issuer: 'r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ',
|
Issuer: 'r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ',
|
||||||
@@ -53,6 +55,7 @@ describe('NFTokenMint', function () {
|
|||||||
TransactionType: 'NFTokenMint',
|
TransactionType: 'NFTokenMint',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: NFTokenMintFlags.tfTransferable,
|
Flags: NFTokenMintFlags.tfTransferable,
|
||||||
Issuer: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Issuer: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
@@ -73,6 +76,7 @@ describe('NFTokenMint', function () {
|
|||||||
TransactionType: 'NFTokenMint',
|
TransactionType: 'NFTokenMint',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: NFTokenMintFlags.tfTransferable,
|
Flags: NFTokenMintFlags.tfTransferable,
|
||||||
NFTokenTaxon: 0,
|
NFTokenTaxon: 0,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ describe('AccountDelete', function () {
|
|||||||
const validAccountDelete = {
|
const validAccountDelete = {
|
||||||
TransactionType: 'AccountDelete',
|
TransactionType: 'AccountDelete',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
|
NetworkID: 21338,
|
||||||
Destination: 'rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe',
|
Destination: 'rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe',
|
||||||
DestinationTag: 13,
|
DestinationTag: 13,
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
@@ -27,6 +28,7 @@ describe('AccountDelete', function () {
|
|||||||
const invalidDestination = {
|
const invalidDestination = {
|
||||||
TransactionType: 'AccountDelete',
|
TransactionType: 'AccountDelete',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
|
NetworkID: 21338,
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
@@ -49,6 +51,7 @@ describe('AccountDelete', function () {
|
|||||||
const invalidDestination = {
|
const invalidDestination = {
|
||||||
TransactionType: 'AccountDelete',
|
TransactionType: 'AccountDelete',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
|
NetworkID: 21338,
|
||||||
Destination: 65478965,
|
Destination: 65478965,
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
Sequence: 2470665,
|
Sequence: 2470665,
|
||||||
@@ -71,6 +74,7 @@ describe('AccountDelete', function () {
|
|||||||
const invalidDestinationTag = {
|
const invalidDestinationTag = {
|
||||||
TransactionType: 'AccountDelete',
|
TransactionType: 'AccountDelete',
|
||||||
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
|
||||||
|
NetworkID: 21338,
|
||||||
Destination: 'rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe',
|
Destination: 'rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe',
|
||||||
DestinationTag: 'gvftyujnbv',
|
DestinationTag: 'gvftyujnbv',
|
||||||
Fee: '5000000',
|
Fee: '5000000',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('AccountSet', function () {
|
|||||||
account = {
|
account = {
|
||||||
TransactionType: 'AccountSet',
|
TransactionType: 'AccountSet',
|
||||||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
|
NetworkID: 21338,
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
Sequence: 5,
|
Sequence: 5,
|
||||||
Domain: '6578616D706C652E636F6D',
|
Domain: '6578616D706C652E636F6D',
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ describe('BaseTransaction', function () {
|
|||||||
const txJson = {
|
const txJson = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
Sequence: 100,
|
Sequence: 100,
|
||||||
AccountTxnID: 'DEADBEEF',
|
AccountTxnID: 'DEADBEEF',
|
||||||
@@ -63,6 +64,7 @@ describe('BaseTransaction', function () {
|
|||||||
const txJson = {
|
const txJson = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
}
|
}
|
||||||
|
|
||||||
assert.doesNotThrow(() => validateBaseTransaction(txJson))
|
assert.doesNotThrow(() => validateBaseTransaction(txJson))
|
||||||
@@ -72,6 +74,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidFee = {
|
const invalidFee = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
Fee: 1000,
|
Fee: 1000,
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
@@ -86,6 +89,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidSeq = {
|
const invalidSeq = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
Sequence: '145',
|
Sequence: '145',
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
@@ -100,6 +104,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidID = {
|
const invalidID = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
AccountTxnID: ['WRONG'],
|
AccountTxnID: ['WRONG'],
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
@@ -114,6 +119,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidLastLedgerSequence = {
|
const invalidLastLedgerSequence = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
LastLedgerSequence: '1000',
|
LastLedgerSequence: '1000',
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
@@ -128,6 +134,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidSourceTag = {
|
const invalidSourceTag = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
SourceTag: ['ARRAY'],
|
SourceTag: ['ARRAY'],
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
@@ -142,6 +149,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidSigningPubKey = {
|
const invalidSigningPubKey = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
SigningPubKey: 1000,
|
SigningPubKey: 1000,
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
@@ -156,6 +164,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidTicketSequence = {
|
const invalidTicketSequence = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
TicketSequence: '1000',
|
TicketSequence: '1000',
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
@@ -170,6 +179,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidTxnSignature = {
|
const invalidTxnSignature = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
TxnSignature: 1000,
|
TxnSignature: 1000,
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
@@ -180,10 +190,25 @@ describe('BaseTransaction', function () {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it(`Handles invalid NetworkID`, function () {
|
||||||
|
const invalidTxnSignature = {
|
||||||
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: '21338',
|
||||||
|
} as any
|
||||||
|
|
||||||
|
assert.throws(
|
||||||
|
() => validateBaseTransaction(invalidTxnSignature),
|
||||||
|
ValidationError,
|
||||||
|
'BaseTransaction: invalid NetworkID',
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
it(`Handles invalid Signers`, function () {
|
it(`Handles invalid Signers`, function () {
|
||||||
const invalidSigners = {
|
const invalidSigners = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
Signers: [],
|
Signers: [],
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
@@ -196,6 +221,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidSigners2 = {
|
const invalidSigners2 = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
Signers: [
|
Signers: [
|
||||||
{
|
{
|
||||||
Signer: {
|
Signer: {
|
||||||
@@ -216,6 +242,7 @@ describe('BaseTransaction', function () {
|
|||||||
const invalidMemo = {
|
const invalidMemo = {
|
||||||
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
Account: 'r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe',
|
||||||
TransactionType: 'Payment',
|
TransactionType: 'Payment',
|
||||||
|
NetworkID: 21338,
|
||||||
Memos: [
|
Memos: [
|
||||||
{
|
{
|
||||||
Memo: {
|
Memo: {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ describe('CheckCancel', function () {
|
|||||||
const validCheckCancel = {
|
const validCheckCancel = {
|
||||||
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
||||||
TransactionType: 'CheckCancel',
|
TransactionType: 'CheckCancel',
|
||||||
|
NetworkID: 21338,
|
||||||
CheckID:
|
CheckID:
|
||||||
'49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0',
|
'49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0',
|
||||||
} as any
|
} as any
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ describe('CheckCash', function () {
|
|||||||
const validCheckCash = {
|
const validCheckCash = {
|
||||||
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
||||||
TransactionType: 'CheckCash',
|
TransactionType: 'CheckCash',
|
||||||
|
NetworkID: 21338,
|
||||||
Amount: '100000000',
|
Amount: '100000000',
|
||||||
CheckID:
|
CheckID:
|
||||||
'838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334',
|
'838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334',
|
||||||
@@ -27,6 +28,7 @@ describe('CheckCash', function () {
|
|||||||
const invalidCheckID = {
|
const invalidCheckID = {
|
||||||
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
||||||
TransactionType: 'CheckCash',
|
TransactionType: 'CheckCash',
|
||||||
|
NetworkID: 21338,
|
||||||
Amount: '100000000',
|
Amount: '100000000',
|
||||||
CheckID: 83876645678567890,
|
CheckID: 83876645678567890,
|
||||||
} as any
|
} as any
|
||||||
@@ -47,6 +49,7 @@ describe('CheckCash', function () {
|
|||||||
const invalidAmount = {
|
const invalidAmount = {
|
||||||
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
||||||
TransactionType: 'CheckCash',
|
TransactionType: 'CheckCash',
|
||||||
|
NetworkID: 21338,
|
||||||
Amount: 100000000,
|
Amount: 100000000,
|
||||||
CheckID:
|
CheckID:
|
||||||
'838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334',
|
'838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334',
|
||||||
@@ -68,6 +71,7 @@ describe('CheckCash', function () {
|
|||||||
const invalidDeliverMin = {
|
const invalidDeliverMin = {
|
||||||
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
||||||
TransactionType: 'CheckCash',
|
TransactionType: 'CheckCash',
|
||||||
|
NetworkID: 21338,
|
||||||
Amount: '100000000',
|
Amount: '100000000',
|
||||||
DeliverMin: 852156963,
|
DeliverMin: 852156963,
|
||||||
CheckID:
|
CheckID:
|
||||||
@@ -90,6 +94,7 @@ describe('CheckCash', function () {
|
|||||||
const invalidDeliverMin = {
|
const invalidDeliverMin = {
|
||||||
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
Account: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
||||||
TransactionType: 'CheckCash',
|
TransactionType: 'CheckCash',
|
||||||
|
NetworkID: 21338,
|
||||||
DeliverMin: 852156963,
|
DeliverMin: 852156963,
|
||||||
CheckID:
|
CheckID:
|
||||||
'838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334',
|
'838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334',
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ describe('CheckCreate', function () {
|
|||||||
'6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B',
|
'6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B',
|
||||||
DestinationTag: 1,
|
DestinationTag: 1,
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
|
NetworkID: 21338,
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
assert.doesNotThrow(() => validateCheckCreate(validCheck))
|
assert.doesNotThrow(() => validateCheckCreate(validCheck))
|
||||||
@@ -37,6 +38,7 @@ describe('CheckCreate', function () {
|
|||||||
'6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B',
|
'6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B',
|
||||||
DestinationTag: 1,
|
DestinationTag: 1,
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
|
NetworkID: 21338,
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
assert.throws(
|
assert.throws(
|
||||||
@@ -62,6 +64,7 @@ describe('CheckCreate', function () {
|
|||||||
'6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B',
|
'6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B',
|
||||||
DestinationTag: 1,
|
DestinationTag: 1,
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
|
NetworkID: 21338,
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
assert.throws(
|
assert.throws(
|
||||||
@@ -80,6 +83,7 @@ describe('CheckCreate', function () {
|
|||||||
const invalidDestinationTag = {
|
const invalidDestinationTag = {
|
||||||
TransactionType: 'CheckCreate',
|
TransactionType: 'CheckCreate',
|
||||||
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
||||||
|
NetworkID: 21338,
|
||||||
Destination: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
Destination: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
||||||
SendMax: '100000000',
|
SendMax: '100000000',
|
||||||
Expiration: 570113521,
|
Expiration: 570113521,
|
||||||
@@ -112,6 +116,7 @@ describe('CheckCreate', function () {
|
|||||||
'6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B',
|
'6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B',
|
||||||
DestinationTag: 1,
|
DestinationTag: 1,
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
|
NetworkID: 21338,
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
assert.throws(
|
assert.throws(
|
||||||
@@ -136,6 +141,7 @@ describe('CheckCreate', function () {
|
|||||||
InvoiceID: 789656963258531,
|
InvoiceID: 789656963258531,
|
||||||
DestinationTag: 1,
|
DestinationTag: 1,
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
|
NetworkID: 21338,
|
||||||
} as any
|
} as any
|
||||||
|
|
||||||
assert.throws(
|
assert.throws(
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('DepositPreauth', function () {
|
|||||||
depositPreauth = {
|
depositPreauth = {
|
||||||
TransactionType: 'DepositPreauth',
|
TransactionType: 'DepositPreauth',
|
||||||
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
||||||
|
NetworkID: 21338,
|
||||||
} as any
|
} as any
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ describe('EscrowCancel', function () {
|
|||||||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
Owner: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Owner: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
OfferSequence: 7,
|
OfferSequence: 7,
|
||||||
|
NetworkID: 21338,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('EscrowCreate', function () {
|
|||||||
escrow = {
|
escrow = {
|
||||||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
TransactionType: 'EscrowCreate',
|
TransactionType: 'EscrowCreate',
|
||||||
|
NetworkID: 21338,
|
||||||
Amount: '10000',
|
Amount: '10000',
|
||||||
Destination: 'rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW',
|
Destination: 'rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW',
|
||||||
CancelAfter: 533257958,
|
CancelAfter: 533257958,
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('EscrowFinish', function () {
|
|||||||
escrow = {
|
escrow = {
|
||||||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
TransactionType: 'EscrowFinish',
|
TransactionType: 'EscrowFinish',
|
||||||
|
NetworkID: 21338,
|
||||||
Owner: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Owner: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
OfferSequence: 7,
|
OfferSequence: 7,
|
||||||
Condition:
|
Condition:
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('OfferCancel', function () {
|
|||||||
offer = {
|
offer = {
|
||||||
Account: 'rnKiczmiQkZFiDES8THYyLA2pQohC5C6EF',
|
Account: 'rnKiczmiQkZFiDES8THYyLA2pQohC5C6EF',
|
||||||
Fee: '10',
|
Fee: '10',
|
||||||
|
NetworkID: 21338,
|
||||||
LastLedgerSequence: 65477334,
|
LastLedgerSequence: 65477334,
|
||||||
OfferSequence: 60797528,
|
OfferSequence: 60797528,
|
||||||
Sequence: 60797535,
|
Sequence: 60797535,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ describe('OfferCreate', function () {
|
|||||||
const offer = {
|
const offer = {
|
||||||
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
||||||
Fee: '10',
|
Fee: '10',
|
||||||
|
NetworkID: 21338,
|
||||||
Flags: 0,
|
Flags: 0,
|
||||||
LastLedgerSequence: 65453019,
|
LastLedgerSequence: 65453019,
|
||||||
Sequence: 40949322,
|
Sequence: 40949322,
|
||||||
@@ -37,6 +38,7 @@ describe('OfferCreate', function () {
|
|||||||
const offer2 = {
|
const offer2 = {
|
||||||
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
||||||
Fee: '10',
|
Fee: '10',
|
||||||
|
NetworkID: 21338,
|
||||||
Flags: 0,
|
Flags: 0,
|
||||||
LastLedgerSequence: 65453019,
|
LastLedgerSequence: 65453019,
|
||||||
Sequence: 40949322,
|
Sequence: 40949322,
|
||||||
@@ -59,6 +61,7 @@ describe('OfferCreate', function () {
|
|||||||
const offer3 = {
|
const offer3 = {
|
||||||
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
||||||
Fee: '10',
|
Fee: '10',
|
||||||
|
NetworkID: 21338,
|
||||||
Flags: 0,
|
Flags: 0,
|
||||||
LastLedgerSequence: 65453019,
|
LastLedgerSequence: 65453019,
|
||||||
Sequence: 40949322,
|
Sequence: 40949322,
|
||||||
@@ -87,6 +90,7 @@ describe('OfferCreate', function () {
|
|||||||
const offer = {
|
const offer = {
|
||||||
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
||||||
Fee: '10',
|
Fee: '10',
|
||||||
|
NetworkID: 21338,
|
||||||
Flags: 0,
|
Flags: 0,
|
||||||
LastLedgerSequence: 65453019,
|
LastLedgerSequence: 65453019,
|
||||||
Sequence: 40949322,
|
Sequence: 40949322,
|
||||||
@@ -120,6 +124,7 @@ describe('OfferCreate', function () {
|
|||||||
const offer = {
|
const offer = {
|
||||||
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
||||||
Fee: '10',
|
Fee: '10',
|
||||||
|
NetworkID: 21338,
|
||||||
Flags: 0,
|
Flags: 0,
|
||||||
LastLedgerSequence: 65453019,
|
LastLedgerSequence: 65453019,
|
||||||
Sequence: 40949322,
|
Sequence: 40949322,
|
||||||
@@ -153,6 +158,7 @@ describe('OfferCreate', function () {
|
|||||||
const offer = {
|
const offer = {
|
||||||
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
||||||
Fee: '10',
|
Fee: '10',
|
||||||
|
NetworkID: 21338,
|
||||||
Flags: 0,
|
Flags: 0,
|
||||||
LastLedgerSequence: 65453019,
|
LastLedgerSequence: 65453019,
|
||||||
Sequence: 40949322,
|
Sequence: 40949322,
|
||||||
@@ -182,6 +188,7 @@ describe('OfferCreate', function () {
|
|||||||
const offer = {
|
const offer = {
|
||||||
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
||||||
Fee: '10',
|
Fee: '10',
|
||||||
|
NetworkID: 21338,
|
||||||
Flags: 0,
|
Flags: 0,
|
||||||
LastLedgerSequence: 65453019,
|
LastLedgerSequence: 65453019,
|
||||||
Sequence: 40949322,
|
Sequence: 40949322,
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ describe('Payment', function () {
|
|||||||
Destination: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
Destination: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy',
|
||||||
DestinationTag: 1,
|
DestinationTag: 1,
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
|
NetworkID: 21338,
|
||||||
Flags: 2147483648,
|
Flags: 2147483648,
|
||||||
LastLedgerSequence: 65953073,
|
LastLedgerSequence: 65953073,
|
||||||
Sequence: 65923914,
|
Sequence: 65923914,
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('PaymentChannelClaim', function () {
|
|||||||
channel = {
|
channel = {
|
||||||
Account: 'rB5Ux4Lv2nRx6eeoAAsZmtctnBQ2LiACnk',
|
Account: 'rB5Ux4Lv2nRx6eeoAAsZmtctnBQ2LiACnk',
|
||||||
TransactionType: 'PaymentChannelClaim',
|
TransactionType: 'PaymentChannelClaim',
|
||||||
|
NetworkID: 21338,
|
||||||
Channel:
|
Channel:
|
||||||
'C1AE6DDDEEC05CF2978C0BAD6FE302948E9533691DC749DCDD3B9E5992CA6198',
|
'C1AE6DDDEEC05CF2978C0BAD6FE302948E9533691DC749DCDD3B9E5992CA6198',
|
||||||
Balance: '1000000',
|
Balance: '1000000',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('PaymentChannelCreate', function () {
|
|||||||
channel = {
|
channel = {
|
||||||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
TransactionType: 'PaymentChannelCreate',
|
TransactionType: 'PaymentChannelCreate',
|
||||||
|
NetworkID: 21338,
|
||||||
Amount: '10000',
|
Amount: '10000',
|
||||||
Destination: 'rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW',
|
Destination: 'rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW',
|
||||||
SettleDelay: 86400,
|
SettleDelay: 86400,
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('PaymentChannelFund', function () {
|
|||||||
channel = {
|
channel = {
|
||||||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
TransactionType: 'PaymentChannelFund',
|
TransactionType: 'PaymentChannelFund',
|
||||||
|
NetworkID: 21338,
|
||||||
Channel:
|
Channel:
|
||||||
'C1AE6DDDEEC05CF2978C0BAD6FE302948E9533691DC749DCDD3B9E5992CA6198',
|
'C1AE6DDDEEC05CF2978C0BAD6FE302948E9533691DC749DCDD3B9E5992CA6198',
|
||||||
Amount: '200000',
|
Amount: '200000',
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ describe('SetRegularKey', function () {
|
|||||||
TransactionType: 'SetRegularKey',
|
TransactionType: 'SetRegularKey',
|
||||||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
|
NetworkID: 21338,
|
||||||
Flags: 0,
|
Flags: 0,
|
||||||
RegularKey: 'rAR8rR8sUkBoCZFawhkWzY4Y5YoyuznwD',
|
RegularKey: 'rAR8rR8sUkBoCZFawhkWzY4Y5YoyuznwD',
|
||||||
} as any
|
} as any
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ describe('SignerListSet', function () {
|
|||||||
TransactionType: 'SignerListSet',
|
TransactionType: 'SignerListSet',
|
||||||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn',
|
||||||
Fee: '12',
|
Fee: '12',
|
||||||
|
NetworkID: 21338,
|
||||||
SignerQuorum: 3,
|
SignerQuorum: 3,
|
||||||
SignerEntries: [
|
SignerEntries: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('TicketCreate', function () {
|
|||||||
ticketCreate = {
|
ticketCreate = {
|
||||||
TransactionType: 'TicketCreate',
|
TransactionType: 'TicketCreate',
|
||||||
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
||||||
|
NetworkID: 21338,
|
||||||
TicketCount: 150,
|
TicketCount: 150,
|
||||||
} as any
|
} as any
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('TrustSet', function () {
|
|||||||
trustSet = {
|
trustSet = {
|
||||||
TransactionType: 'TrustSet',
|
TransactionType: 'TrustSet',
|
||||||
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
Account: 'rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo',
|
||||||
|
NetworkID: 21338,
|
||||||
LimitAmount: {
|
LimitAmount: {
|
||||||
currency: 'XRP',
|
currency: 'XRP',
|
||||||
issuer: 'rcXY84C4g14iFp6taFXjjQGVeHqSCh9RX',
|
issuer: 'rcXY84C4g14iFp6taFXjjQGVeHqSCh9RX',
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ describe('Models Utils', function () {
|
|||||||
const tx: OfferCreate = {
|
const tx: OfferCreate = {
|
||||||
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
Account: 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W',
|
||||||
Fee: '10',
|
Fee: '10',
|
||||||
|
NetworkID: 21338,
|
||||||
TakerGets: {
|
TakerGets: {
|
||||||
currency: 'DSH',
|
currency: 'DSH',
|
||||||
issuer: 'rcXY84C4g14iFp6taFXjjQGVeHqSCh9RX',
|
issuer: 'rcXY84C4g14iFp6taFXjjQGVeHqSCh9RX',
|
||||||
|
|||||||
Reference in New Issue
Block a user