Compare commits

..

3 Commits

Author SHA1 Message Date
Denis Angell
29b718b52e Publish
- @transia/ripple-binary-codec@1.4.6-alpha.1
 - @transia/xrpl@2.7.3-alpha.1
2023-05-29 23:20:48 +00:00
Denis Angell
b127b2e616 add import tx 2023-05-29 23:18:11 +00:00
Denis Angell
f85f35cb4d update definitions.json 2023-05-29 23:14:51 +00:00
7 changed files with 94 additions and 8 deletions

8
package-lock.json generated
View File

@@ -17148,7 +17148,7 @@
},
"packages/ripple-binary-codec": {
"name": "@transia/ripple-binary-codec",
"version": "1.4.6-alpha.0",
"version": "1.4.6-alpha.1",
"license": "ISC",
"dependencies": {
"@transia/ripple-address-codec": "^4.2.8-alpha.0",
@@ -17188,11 +17188,11 @@
},
"packages/xrpl": {
"name": "@transia/xrpl",
"version": "2.7.3-alpha.0",
"version": "2.7.3-alpha.1",
"license": "ISC",
"dependencies": {
"@transia/ripple-address-codec": "^4.2.8-alpha.0",
"@transia/ripple-binary-codec": "^1.4.6-alpha.0",
"@transia/ripple-binary-codec": "^1.4.6-alpha.1",
"@transia/ripple-keypairs": "^1.1.8-alpha.0",
"bignumber.js": "^9.0.0",
"bip32": "^2.0.6",
@@ -19388,7 +19388,7 @@
"requires": {
"@geut/browser-node-core": "^2.0.13",
"@transia/ripple-address-codec": "^4.2.8-alpha.0",
"@transia/ripple-binary-codec": "^1.4.6-alpha.0",
"@transia/ripple-binary-codec": "^1.4.6-alpha.1",
"@transia/ripple-keypairs": "^1.1.8-alpha.0",
"@types/node": "^14.18.36",
"assert-browserify": "^2.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@transia/ripple-binary-codec",
"version": "1.4.6-alpha.0",
"version": "1.4.6-alpha.1",
"description": "XRP Ledger binary codec",
"files": [
"dist/*",

View File

@@ -786,6 +786,26 @@
"type": "UInt32"
}
],
[
"FirstNFTokenSequence",
{
"nth": 50,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt32"
}
],
[
"ImportSequence",
{
"nth": 97,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt32"
}
],
[
"IndexNext",
{
@@ -1496,6 +1516,36 @@
"type": "Amount"
}
],
[
"BaseFeeDrops",
{
"nth": 22,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "Amount"
}
],
[
"ReserveBaseDrops",
{
"nth": 23,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "Amount"
}
],
[
"ReserveIncrementDrops",
{
"nth": 24,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "Amount"
}
],
[
"PublicKey",
{
@@ -2275,6 +2325,8 @@
"telREQUIRES_NETWORK_ID": -385,
"telNETWORK_ID_MAKES_TX_NON_CANONICAL": -384,
"telNON_LOCAL_EMITTED_TXN": -383,
"telIMPORT_VL_KEY_NOT_RECOGNISED": -382,
"telCAN_NOT_QUEUE_IMPORT": -381,
"temMALFORMED": -299,
"temBAD_AMOUNT": -298,
@@ -2346,6 +2398,7 @@
"tefTOO_BIG": -181,
"tefNO_TICKET": -180,
"tefNFTOKEN_IS_NOT_TRANSFERABLE": -179,
"tefPAST_IMPORT_SEQ": -178,
"terRETRY": -99,
"terFUNDS_SPENT": -98,
@@ -2435,7 +2488,8 @@
"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY": 183,
"tecXCHAIN_PAYMENT_FAILED": 184,
"tecXCHAIN_SELF_COMMIT": 185,
"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR": 186
"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR": 186,
"tecLAST_POSSIBLE_ENTRY": 255
},
"TRANSACTION_TYPES": {
"Invalid": -1,
@@ -2472,6 +2526,7 @@
"URITokenBuy": 47,
"URITokenCreateSellOffer": 48,
"URITokenCancelSellOffer": 49,
"Import": 97,
"Invoke": 99,
"EnableAmendment": 100,
"SetFee": 101,

View File

@@ -1,6 +1,6 @@
{
"name": "@transia/xrpl",
"version": "2.7.3-alpha.0",
"version": "2.7.3-alpha.1",
"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.0",
"@transia/ripple-binary-codec": "^1.4.6-alpha.1",
"@transia/ripple-keypairs": "^1.1.8-alpha.0",
"bignumber.js": "^9.0.0",
"bip32": "^2.0.6",

View File

@@ -0,0 +1,24 @@
import { BaseTransaction, validateBaseTransaction } from './common'
/**
*
*
* @category Transaction Models
*/
export interface Import extends BaseTransaction {
TransactionType: 'Import'
/**
* Hex value representing a VL Blob.
*/
Blob?: string
}
/**
* Verify the form and type of an Import at runtime.
*
* @param tx - An Import Transaction.
* @throws When the Import is Malformed.
*/
export function validateImport(tx: Record<string, unknown>): void {
validateBaseTransaction(tx)
}

View File

@@ -14,6 +14,7 @@ export { DepositPreauth } from './depositPreauth'
export { EscrowCancel } from './escrowCancel'
export { EscrowCreate } from './escrowCreate'
export { EscrowFinish } from './escrowFinish'
export { Import } from './import'
export { Invoke } from './invoke'
export { NFTokenAcceptOffer } from './NFTokenAcceptOffer'
export { NFTokenBurn } from './NFTokenBurn'

View File

@@ -13,6 +13,7 @@ import { DepositPreauth, validateDepositPreauth } from './depositPreauth'
import { EscrowCancel, validateEscrowCancel } from './escrowCancel'
import { EscrowCreate, validateEscrowCreate } from './escrowCreate'
import { EscrowFinish, validateEscrowFinish } from './escrowFinish'
import { Import, validateImport } from './import'
import { Invoke, validateInvoke } from './invoke'
import { TransactionMetadata } from './metadata'
import {
@@ -63,6 +64,7 @@ export type Transaction =
| EscrowCancel
| EscrowCreate
| EscrowFinish
| Import
| Invoke
| NFTokenAcceptOffer
| NFTokenBurn
@@ -144,6 +146,10 @@ export function validate(transaction: Record<string, unknown>): void {
validateEscrowFinish(tx)
break
case 'Import':
validateImport(tx)
break
case 'Invoke':
validateInvoke(tx)
break