Skip to content

Commit

Permalink
add number representations to the JSDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
lastmjs committed Jan 16, 2025
1 parent 65c6c09 commit 95e2939
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { idlDecode, idlEncode } from '../execute_with_candid_serde';
* @param options.paramIdlTypes - Candid types for the parameters (optional)
* @param options.returnIdlType - Candid type for the return value (optional)
* @param options.args - Arguments to pass to the method (optional)
* @param options.cycles - Number of cycles to attach to the call (optional)
* @param options.cycles - Number of cycles to attach to the call (optional). Represented as a u128 (max size 2^128 - 1)
* @param options.raw - Raw bytes to send instead of encoded args (optional)
* @returns Promise resolving to the method's return value
*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/canister_balance.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Returns the amount of cycles owned by and available to the canister.
*
* @returns The cycle balance
* @returns The cycle balance. Represented as a u128 (max size 2^128 - 1)
*
* @remarks
*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/canister_version.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Returns the canister's version number, which is incremented by ICP on certain operations.
*
* @returns The canister's version number
* @returns The canister's version number. Represented as a u64 (max size 2^64 - 1)
*
* @remarks
*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/clear_timer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Cancels a timer previously created with `setTimer` or `setTimerInterval`.
*
* @param timerId - The ID of the timer to cancel, as returned by `setTimer` or `setTimerInterval`
* @param timerId - The ID of the timer to cancel, as returned by `setTimer` or `setTimerInterval`. Represented as a u64 (max size 2^64 - 1)
*
* @returns void
*
Expand Down
4 changes: 2 additions & 2 deletions src/lib/stable/ic_apis/cycles_burn.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Attempts to irrevocably remove the specified amount of cycles from the canister's balance.
*
* @param amount - The number of cycles to burn. Maximum value is 2^128 - 1 (u128)
* @param amount - The number of cycles to burn. Represented as a u128 (max size 2^128 - 1)
*
* @returns The number of cycles actually burned
* @returns The number of cycles actually burned. Represented as a u128 (max size 2^128 - 1)
*
* @remarks
*
Expand Down
4 changes: 2 additions & 2 deletions src/lib/stable/ic_apis/msg_cycles_accept.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Moves up to `maxAmount` of the available cycles from the current call to the canister cycle balance.
*
* @param maxAmount - Maximum number of cycles to accept from the available cycles
* @param maxAmount - Maximum number of cycles to accept from the available cycles. Represented as a u128 (max size 2^128 - 1)
*
* @returns The actual amount of cycles accepted
* @returns The actual amount of cycles accepted. Represented as a u128 (max size 2^128 - 1)
*
* @remarks
*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/msg_cycles_available.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Returns the amount of cycles that were transferred with the current call and are still available.
*
* @returns The amount of cycles available
* @returns The amount of cycles available. Represented as a u128 (max size 2^128 - 1)
*
* @remarks
*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/msg_cycles_refunded.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Returns the amount of cycles that were refunded from the last inter-canister call.
*
* @returns The amount of cycles refunded
* @returns The amount of cycles refunded. Represented as a u128 (max size 2^128 - 1)
*
* @remarks
*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/notify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { idlEncode } from '../execute_with_candid_serde';
* @param options - Optional parameters:
* @param options.paramIdlTypes - Array of IDL types for the parameters
* @param options.args - Array of arguments to pass to the method
* @param options.cycles - Amount of cycles to attach to the call (defaults to 0n)
* @param options.cycles - Amount of cycles to attach to the call (defaults to 0n). Represented as a u128 (max size 2^128 - 1)
* @param options.raw - Raw bytes to pass as arguments instead of Candid-encoded args
*
* @returns void
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/performance_counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* - 0: current execution instruction counter. The number of WebAssembly instructions the canister has executed since the beginning of the current message execution
* - 1: call context instruction counter. The number of WebAssembly instructions the canister has executed within the call context of the current message execution since call context creation. The counter monotonically increases across all message executions in the call context until the corresponding call context is removed.
*
* @returns The performance counter value
* @returns The performance counter value. Represented as a u64 (max size 2^64 - 1)
*
* @remarks
*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/set_timer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { v4 } from 'uuid';
/**
* Sets a one-time callback to be executed after a specified delay.
*
* @param delay - The time to wait before execution, in seconds. Maximum value is 2^64 - 1 (u64) seconds
* @param delay - The time to wait before execution, in seconds. Represented as a u64 (max size 2^64 - 1)
* @param callback - The callback to execute. Can be async
*
* @returns The timer ID (used with `clearTimer` to cancel the timer before it executes)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/set_timer_interval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { v4 } from 'uuid';
/**
* Sets a callback to be executed periodically every specified interval.
*
* @param interval - The time between executions, in seconds. Maximum value is 2^64 - 1 (u64) seconds
* @param interval - The time between executions, in seconds. Represented as a u64 (max size 2^64 - 1)
* @param callback - The callback to execute. Can be async
*
* @returns The timer ID (used with `clearTimer` to cancel the timer)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/ic_apis/time.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Gets the current ICP system time.
*
* @returns The current ICP system time in nanoseconds since the epoch (1970-01-01)
* @returns The current ICP system time in nanoseconds since the epoch (1970-01-01). Represented as a u64 (max size 2^64 - 1)
*
* @remarks
*
Expand Down

0 comments on commit 95e2939

Please sign in to comment.