ripple-binary-codec 2.7.0 → 2.8.0-smartcontract.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/enums/definitions.json +238 -260
- package/dist/enums/src/enums/definitions.json +238 -260
- package/dist/quality.js +15 -3
- package/dist/quality.js.map +1 -1
- package/dist/serdes/binary-parser.js +8 -2
- package/dist/serdes/binary-parser.js.map +1 -1
- package/dist/serdes/binary-serializer.d.ts +1 -1
- package/dist/serdes/binary-serializer.js +2 -2
- package/dist/serdes/binary-serializer.js.map +1 -1
- package/dist/src/enums/definitions.json +238 -260
- package/dist/src/quality.js +15 -3
- package/dist/src/quality.js.map +1 -1
- package/dist/src/serdes/binary-parser.js +8 -2
- package/dist/src/serdes/binary-parser.js.map +1 -1
- package/dist/src/serdes/binary-serializer.d.ts +1 -1
- package/dist/src/serdes/binary-serializer.js +2 -2
- package/dist/src/serdes/binary-serializer.js.map +1 -1
- package/dist/src/types/account-id.d.ts +2 -0
- package/dist/src/types/account-id.js +4 -0
- package/dist/src/types/account-id.js.map +1 -1
- package/dist/src/types/amount.d.ts +2 -1
- package/dist/src/types/amount.js +25 -4
- package/dist/src/types/amount.js.map +1 -1
- package/dist/src/types/blob.d.ts +2 -1
- package/dist/src/types/blob.js +3 -0
- package/dist/src/types/blob.js.map +1 -1
- package/dist/src/types/currency.d.ts +2 -0
- package/dist/src/types/currency.js +4 -0
- package/dist/src/types/currency.js.map +1 -1
- package/dist/src/types/data.d.ts +86 -0
- package/dist/src/types/data.js +252 -0
- package/dist/src/types/data.js.map +1 -0
- package/dist/src/types/dataType.d.ts +94 -0
- package/dist/src/types/dataType.js +145 -0
- package/dist/src/types/dataType.js.map +1 -0
- package/dist/src/types/hash-128.d.ts +2 -0
- package/dist/src/types/hash-128.js +4 -0
- package/dist/src/types/hash-128.js.map +1 -1
- package/dist/src/types/hash-160.d.ts +2 -0
- package/dist/src/types/hash-160.js +4 -0
- package/dist/src/types/hash-160.js.map +1 -1
- package/dist/src/types/hash-192.d.ts +2 -0
- package/dist/src/types/hash-192.js +4 -0
- package/dist/src/types/hash-192.js.map +1 -1
- package/dist/src/types/hash-256.d.ts +2 -0
- package/dist/src/types/hash-256.js +4 -0
- package/dist/src/types/hash-256.js.map +1 -1
- package/dist/src/types/index.d.ts +3 -1
- package/dist/src/types/index.js +7 -1
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/types/issue.d.ts +2 -1
- package/dist/src/types/issue.js +3 -0
- package/dist/src/types/issue.js.map +1 -1
- package/dist/src/types/json.d.ts +173 -0
- package/dist/src/types/json.js +531 -0
- package/dist/src/types/json.js.map +1 -0
- package/dist/src/types/path-set.d.ts +2 -1
- package/dist/src/types/path-set.js +3 -0
- package/dist/src/types/path-set.js.map +1 -1
- package/dist/src/types/serialized-type.d.ts +43 -0
- package/dist/src/types/serialized-type.js +63 -1
- package/dist/src/types/serialized-type.js.map +1 -1
- package/dist/src/types/st-array.d.ts +2 -1
- package/dist/src/types/st-array.js +3 -0
- package/dist/src/types/st-array.js.map +1 -1
- package/dist/src/types/st-number.d.ts +2 -1
- package/dist/src/types/st-number.js +3 -0
- package/dist/src/types/st-number.js.map +1 -1
- package/dist/src/types/st-object.d.ts +2 -1
- package/dist/src/types/st-object.js +9 -1
- package/dist/src/types/st-object.js.map +1 -1
- package/dist/src/types/uint-16.d.ts +2 -0
- package/dist/src/types/uint-16.js +4 -0
- package/dist/src/types/uint-16.js.map +1 -1
- package/dist/src/types/uint-32.d.ts +2 -0
- package/dist/src/types/uint-32.js +4 -0
- package/dist/src/types/uint-32.js.map +1 -1
- package/dist/src/types/uint-64.d.ts +2 -0
- package/dist/src/types/uint-64.js +4 -0
- package/dist/src/types/uint-64.js.map +1 -1
- package/dist/src/types/uint-8.d.ts +2 -0
- package/dist/src/types/uint-8.js +4 -0
- package/dist/src/types/uint-8.js.map +1 -1
- package/dist/src/types/vector-256.d.ts +2 -1
- package/dist/src/types/vector-256.js +3 -0
- package/dist/src/types/vector-256.js.map +1 -1
- package/dist/src/types/xchain-bridge.d.ts +2 -1
- package/dist/src/types/xchain-bridge.js +3 -0
- package/dist/src/types/xchain-bridge.js.map +1 -1
- package/dist/src/utils.js +1 -1
- package/dist/src/utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/account-id.d.ts +2 -0
- package/dist/types/account-id.js +4 -0
- package/dist/types/account-id.js.map +1 -1
- package/dist/types/amount.d.ts +2 -1
- package/dist/types/amount.js +25 -4
- package/dist/types/amount.js.map +1 -1
- package/dist/types/blob.d.ts +2 -1
- package/dist/types/blob.js +3 -0
- package/dist/types/blob.js.map +1 -1
- package/dist/types/currency.d.ts +2 -0
- package/dist/types/currency.js +4 -0
- package/dist/types/currency.js.map +1 -1
- package/dist/types/data.d.ts +86 -0
- package/dist/types/data.js +252 -0
- package/dist/types/data.js.map +1 -0
- package/dist/types/dataType.d.ts +94 -0
- package/dist/types/dataType.js +145 -0
- package/dist/types/dataType.js.map +1 -0
- package/dist/types/hash-128.d.ts +2 -0
- package/dist/types/hash-128.js +4 -0
- package/dist/types/hash-128.js.map +1 -1
- package/dist/types/hash-160.d.ts +2 -0
- package/dist/types/hash-160.js +4 -0
- package/dist/types/hash-160.js.map +1 -1
- package/dist/types/hash-192.d.ts +2 -0
- package/dist/types/hash-192.js +4 -0
- package/dist/types/hash-192.js.map +1 -1
- package/dist/types/hash-256.d.ts +2 -0
- package/dist/types/hash-256.js +4 -0
- package/dist/types/hash-256.js.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.js +7 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/issue.d.ts +2 -1
- package/dist/types/issue.js +3 -0
- package/dist/types/issue.js.map +1 -1
- package/dist/types/json.d.ts +173 -0
- package/dist/types/json.js +531 -0
- package/dist/types/json.js.map +1 -0
- package/dist/types/path-set.d.ts +2 -1
- package/dist/types/path-set.js +3 -0
- package/dist/types/path-set.js.map +1 -1
- package/dist/types/serialized-type.d.ts +43 -0
- package/dist/types/serialized-type.js +63 -1
- package/dist/types/serialized-type.js.map +1 -1
- package/dist/types/st-array.d.ts +2 -1
- package/dist/types/st-array.js +3 -0
- package/dist/types/st-array.js.map +1 -1
- package/dist/types/st-number.d.ts +2 -1
- package/dist/types/st-number.js +3 -0
- package/dist/types/st-number.js.map +1 -1
- package/dist/types/st-object.d.ts +2 -1
- package/dist/types/st-object.js +9 -1
- package/dist/types/st-object.js.map +1 -1
- package/dist/types/uint-16.d.ts +2 -0
- package/dist/types/uint-16.js +4 -0
- package/dist/types/uint-16.js.map +1 -1
- package/dist/types/uint-32.d.ts +2 -0
- package/dist/types/uint-32.js +4 -0
- package/dist/types/uint-32.js.map +1 -1
- package/dist/types/uint-64.d.ts +2 -0
- package/dist/types/uint-64.js +4 -0
- package/dist/types/uint-64.js.map +1 -1
- package/dist/types/uint-8.d.ts +2 -0
- package/dist/types/uint-8.js +4 -0
- package/dist/types/uint-8.js.map +1 -1
- package/dist/types/vector-256.d.ts +2 -1
- package/dist/types/vector-256.js +3 -0
- package/dist/types/vector-256.js.map +1 -1
- package/dist/types/xchain-bridge.d.ts +2 -1
- package/dist/types/xchain-bridge.js +3 -0
- package/dist/types/xchain-bridge.js.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/enums/definitions.json +238 -260
- package/src/quality.ts +13 -3
- package/src/serdes/binary-parser.ts +12 -2
- package/src/serdes/binary-serializer.ts +2 -2
- package/src/types/account-id.ts +5 -0
- package/src/types/amount.ts +25 -6
- package/src/types/blob.ts +5 -1
- package/src/types/currency.ts +5 -0
- package/src/types/data.ts +294 -0
- package/src/types/dataType.ts +178 -0
- package/src/types/hash-128.ts +5 -0
- package/src/types/hash-160.ts +5 -0
- package/src/types/hash-192.ts +5 -0
- package/src/types/hash-256.ts +5 -0
- package/src/types/index.ts +6 -0
- package/src/types/issue.ts +5 -1
- package/src/types/json.ts +650 -0
- package/src/types/path-set.ts +5 -1
- package/src/types/serialized-type.ts +67 -0
- package/src/types/st-array.ts +5 -1
- package/src/types/st-number.ts +5 -1
- package/src/types/st-object.ts +12 -2
- package/src/types/uint-16.ts +5 -0
- package/src/types/uint-32.ts +5 -0
- package/src/types/uint-64.ts +6 -1
- package/src/types/uint-8.ts +5 -0
- package/src/types/vector-256.ts +5 -1
- package/src/types/xchain-bridge.ts +5 -1
- package/src/utils.ts +1 -1
package/src/types/hash-160.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Hash } from './hash'
|
|
2
|
+
import { SerializedTypeID } from './serialized-type'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Hash with a width of 160 bits
|
|
@@ -14,6 +15,10 @@ class Hash160 extends Hash {
|
|
|
14
15
|
|
|
15
16
|
super(bytes ?? Hash160.ZERO_160.bytes)
|
|
16
17
|
}
|
|
18
|
+
|
|
19
|
+
getSType(): SerializedTypeID {
|
|
20
|
+
return SerializedTypeID.STI_UINT160
|
|
21
|
+
}
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
export { Hash160 }
|
package/src/types/hash-192.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Hash } from './hash'
|
|
2
|
+
import { SerializedTypeID } from './serialized-type'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Hash with a width of 192 bits
|
|
@@ -14,6 +15,10 @@ class Hash192 extends Hash {
|
|
|
14
15
|
|
|
15
16
|
super(bytes ?? Hash192.ZERO_192.bytes)
|
|
16
17
|
}
|
|
18
|
+
|
|
19
|
+
getSType(): SerializedTypeID {
|
|
20
|
+
return SerializedTypeID.STI_UINT192
|
|
21
|
+
}
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
export { Hash192 }
|
package/src/types/hash-256.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Hash } from './hash'
|
|
2
|
+
import { SerializedTypeID } from './serialized-type'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Hash with a width of 256 bits
|
|
@@ -10,6 +11,10 @@ class Hash256 extends Hash {
|
|
|
10
11
|
constructor(bytes: Uint8Array) {
|
|
11
12
|
super(bytes ?? Hash256.ZERO_256.bytes)
|
|
12
13
|
}
|
|
14
|
+
|
|
15
|
+
getSType(): SerializedTypeID {
|
|
16
|
+
return SerializedTypeID.STI_UINT256
|
|
17
|
+
}
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
export { Hash256 }
|
package/src/types/index.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { AccountID } from './account-id'
|
|
|
2
2
|
import { Amount } from './amount'
|
|
3
3
|
import { Blob } from './blob'
|
|
4
4
|
import { Currency } from './currency'
|
|
5
|
+
import { Data } from './data'
|
|
6
|
+
import { DataType } from './dataType'
|
|
5
7
|
import { Hash128 } from './hash-128'
|
|
6
8
|
import { Hash160 } from './hash-160'
|
|
7
9
|
import { Hash192 } from './hash-192'
|
|
@@ -26,6 +28,8 @@ const coreTypes: Record<string, typeof SerializedType> = {
|
|
|
26
28
|
Amount,
|
|
27
29
|
Blob,
|
|
28
30
|
Currency,
|
|
31
|
+
Data,
|
|
32
|
+
DataType,
|
|
29
33
|
Hash128,
|
|
30
34
|
Hash160,
|
|
31
35
|
Hash192,
|
|
@@ -55,6 +59,8 @@ export {
|
|
|
55
59
|
Amount,
|
|
56
60
|
Blob,
|
|
57
61
|
Currency,
|
|
62
|
+
Data,
|
|
63
|
+
DataType,
|
|
58
64
|
Hash128,
|
|
59
65
|
Hash160,
|
|
60
66
|
Hash192,
|
package/src/types/issue.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { BinaryParser } from '../serdes/binary-parser'
|
|
|
3
3
|
|
|
4
4
|
import { AccountID } from './account-id'
|
|
5
5
|
import { Currency } from './currency'
|
|
6
|
-
import { JsonObject, SerializedType } from './serialized-type'
|
|
6
|
+
import { JsonObject, SerializedType, SerializedTypeID } from './serialized-type'
|
|
7
7
|
import { Hash192 } from './hash-192'
|
|
8
8
|
import { readUInt32BE, writeUInt32BE } from '../utils'
|
|
9
9
|
|
|
@@ -158,6 +158,10 @@ class Issue extends SerializedType {
|
|
|
158
158
|
issuer: issuer.toJSON(),
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
+
|
|
162
|
+
getSType(): SerializedTypeID {
|
|
163
|
+
return SerializedTypeID.STI_ISSUE
|
|
164
|
+
}
|
|
161
165
|
}
|
|
162
166
|
|
|
163
167
|
export { Issue, IssueObject }
|