Skip to content

Commit 83614a9

Browse files
committed
fix comments according to suggestion
1 parent 34853d2 commit 83614a9

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

rust/pkg/cardano_serialization_lib.js.flow

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,7 +1902,7 @@ declare export class HeaderBody {
19021902
/**
19031903
* !!! DEPRECATED !!!
19041904
* Returns a Slot32 (u32) value in case the underlying original BigNum (u64) value is within the limits.
1905-
* Otherwise will just return JsError.
1905+
* Otherwise will just raise an error.
19061906
* @returns {number}
19071907
*/
19081908
slot(): number;
@@ -2020,6 +2020,17 @@ declare export class HeaderBody {
20202020
declare export class Int {
20212021
free(): void;
20222022

2023+
/**
2024+
* @returns {Uint8Array}
2025+
*/
2026+
to_bytes(): Uint8Array;
2027+
2028+
/**
2029+
* @param {Uint8Array} bytes
2030+
* @returns {Int}
2031+
*/
2032+
static from_bytes(bytes: Uint8Array): Int;
2033+
20232034
/**
20242035
* @param {BigNum} x
20252036
* @returns {Int}
@@ -4871,7 +4882,8 @@ declare export class TimelockStart {
48714882
/**
48724883
* !!! DEPRECATED !!!
48734884
* Returns a Slot32 (u32) value in case the underlying original BigNum (u64) value is within the limits.
4874-
* Otherwise will just return JsError.
4885+
* Otherwise will just raise an error.
4886+
* Use `.slot_bignum` instead
48754887
* @returns {number}
48764888
*/
48774889
slot(): number;
@@ -4883,7 +4895,8 @@ declare export class TimelockStart {
48834895

48844896
/**
48854897
* !!! DEPRECATED !!!
4886-
* Returns a new TimelockStart from Slot32 (u32) value.
4898+
* This constructor uses outdated slot number format.
4899+
* Use `.new_timelockstart` instead.
48874900
* @param {number} slot
48884901
* @returns {TimelockStart}
48894902
*/
@@ -5019,7 +5032,7 @@ declare export class TransactionBody {
50195032
/**
50205033
* !!! DEPRECATED !!!
50215034
* Returns a Slot32 (u32) value in case the underlying original BigNum (u64) value is within the limits.
5022-
* Otherwise will just return JsError.
5035+
* Otherwise will just raise an error.
50235036
* @returns {number | void}
50245037
*/
50255038
ttl(): number | void;
@@ -5080,7 +5093,7 @@ declare export class TransactionBody {
50805093

50815094
/**
50825095
* !!! DEPRECATED !!!
5083-
* Set validity_start_interval value.
5096+
* Uses outdated slot number format.
50845097
* @param {number} validity_start_interval
50855098
*/
50865099
set_validity_start_interval(validity_start_interval: number): void;
@@ -5098,7 +5111,8 @@ declare export class TransactionBody {
50985111
/**
50995112
* !!! DEPRECATED !!!
51005113
* Returns a Option<Slot32> (u32) value in case the underlying original Option<BigNum> (u64) value is within the limits.
5101-
* Otherwise will just return JsError.
5114+
* Otherwise will just raise an error.
5115+
* Use `.validity_start_interval_bignum` instead.
51025116
* @returns {number | void}
51035117
*/
51045118
validity_start_interval(): number | void;
@@ -5162,7 +5176,8 @@ declare export class TransactionBody {
51625176

51635177
/**
51645178
* !!! DEPRECATED !!!
5165-
* Returns a new TransactionBody.
5179+
* This constructor uses outdated slot number format for the ttl value.
5180+
* Use `.new_tx_body` and then `.set_ttl` instead
51665181
* @param {TransactionInputs} inputs
51675182
* @param {TransactionOutputs} outputs
51685183
* @param {BigNum} fee
@@ -5297,7 +5312,7 @@ declare export class TransactionBuilder {
52975312

52985313
/**
52995314
* !!! DEPRECATED !!!
5300-
* Set validity_start_interval value.
5315+
* Uses outdated slot number format.
53015316
* @param {number} validity_start_interval
53025317
*/
53035318
set_validity_start_interval(validity_start_interval: number): void;

rust/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl TransactionBody {
266266

267267
/// !!! DEPRECATED !!!
268268
/// Returns a Slot32 (u32) value in case the underlying original BigNum (u64) value is within the limits.
269-
/// Otherwise will just return JsError.
269+
/// Otherwise will just raise an error.
270270
#[deprecated(
271271
since = "10.1.0",
272272
note = "Possible boundary error. Use ttl_bignum instead"
@@ -326,7 +326,7 @@ impl TransactionBody {
326326
}
327327

328328
/// !!! DEPRECATED !!!
329-
/// Set validity_start_interval value.
329+
/// Uses outdated slot number format.
330330
#[deprecated(
331331
since = "10.1.0",
332332
note = "Underlying value capacity of slot (BigNum u64) bigger then Slot32. Use set_validity_start_interval_bignum instead."
@@ -2551,7 +2551,7 @@ impl HeaderBody {
25512551

25522552
/// !!! DEPRECATED !!!
25532553
/// Returns a Slot32 (u32) value in case the underlying original BigNum (u64) value is within the limits.
2554-
/// Otherwise will just return JsError.
2554+
/// Otherwise will just raise an error.
25552555
#[deprecated(
25562556
since = "10.1.0",
25572557
note = "Possible boundary error. Use slot_bignum instead"

rust/src/tx_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ impl TransactionBuilder {
725725
}
726726

727727
/// !!! DEPRECATED !!!
728-
/// Set validity_start_interval value.
728+
/// Uses outdated slot number format.
729729
#[deprecated(
730730
since = "10.1.0",
731731
note = "Underlying value capacity of validity_start_interval (BigNum u64) bigger then Slot32. Use set_validity_start_interval_bignum instead."

0 commit comments

Comments
 (0)