diff --git a/docs/enums/unit.html b/docs/enums/unit.html index b992d47..a2d5937 100644 --- a/docs/enums/unit.html +++ b/docs/enums/unit.html @@ -1055,7 +1055,7 @@ img { max-width: 100%; }
KNano: = "KNano"
@@ -1070,7 +1070,7 @@ img { max-width: 100%; }
MNano: = "MNano"
@@ -1085,7 +1085,7 @@ img { max-width: 100%; }
NANO: = "NANO"
@@ -1100,7 +1100,7 @@ img { max-width: 100%; }
Nano: = "Nano"
@@ -1115,7 +1115,7 @@ img { max-width: 100%; }
hex: = "hex"
@@ -1130,7 +1130,7 @@ img { max-width: 100%; }
knano: = "knano"
@@ -1145,7 +1145,7 @@ img { max-width: 100%; }
nano: = "nano"
@@ -1160,7 +1160,7 @@ img { max-width: 100%; }
raw: = "raw"
diff --git a/docs/index.html b/docs/index.html index 1082fdc..f48a526 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1055,13 +1055,15 @@ img { max-width: 100%; }
  • Check if the given address is valid.

    +

    Note: it checks the format and the checksum of the address. + It does not check whether or not the address does exist on the network.

    Parameters

      @@ -1087,13 +1089,14 @@ img { max-width: 100%; }
    • Check if the given amount is valid.

      +

      Note: a valid amount means that it can be embedded into a block balance.

      Parameters

        @@ -1119,13 +1122,14 @@ img { max-width: 100%; }
      • Check if the given hash is valid.

        +

        Note: it only checks the format of the hash.

        Parameters

          @@ -1151,13 +1155,15 @@ img { max-width: 100%; }
        • Check if the given public or secret key is valid.

          +

          Note: it only checks the format of the key. + It does not check whether or not the key does exist on the network.

          Parameters

            @@ -1183,13 +1189,14 @@ img { max-width: 100%; }
          • Check if the given seed is valid.

            +

            Note: it only checks the format of the seed.

            Parameters

              @@ -1215,13 +1222,14 @@ img { max-width: 100%; }
            • Check if the given signature is valid.

              +

              Note: it only checks the format of the signature.

              Parameters

                @@ -1247,13 +1255,14 @@ img { max-width: 100%; }
              • Check if the given work is valid.

                +

                Note: it only checks the format of the work, not its difficulty.

                Parameters

                  @@ -1279,7 +1288,7 @@ img { max-width: 100%; }
                • @@ -1318,7 +1327,7 @@ img { max-width: 100%; }
                • @@ -1356,7 +1365,7 @@ img { max-width: 100%; }
                • @@ -1396,7 +1405,7 @@ img { max-width: 100%; }
                • @@ -1434,7 +1443,7 @@ img { max-width: 100%; }
                • @@ -1466,7 +1475,7 @@ img { max-width: 100%; }
                • @@ -1504,7 +1513,7 @@ img { max-width: 100%; }
                • @@ -1527,7 +1536,7 @@ img { max-width: 100%; }
                • @@ -1559,7 +1568,7 @@ img { max-width: 100%; }
                • @@ -1591,7 +1600,7 @@ img { max-width: 100%; }
                • @@ -1623,7 +1632,7 @@ img { max-width: 100%; }
                • diff --git a/docs/interfaces/blockdata.html b/docs/interfaces/blockdata.html index d604d36..17de4ff 100644 --- a/docs/interfaces/blockdata.html +++ b/docs/interfaces/blockdata.html @@ -1051,7 +1051,7 @@ img { max-width: 100%; }
                  balance: string
                  @@ -1066,7 +1066,7 @@ img { max-width: 100%; }
                  link: string
                  @@ -1081,7 +1081,7 @@ img { max-width: 100%; }
                  previous: string
                  @@ -1096,7 +1096,7 @@ img { max-width: 100%; }
                  representative: string
                  @@ -1111,7 +1111,7 @@ img { max-width: 100%; }
                  work: string | null
                  diff --git a/docs/interfaces/computeworkparams.html b/docs/interfaces/computeworkparams.html index 098abc8..bdd639f 100644 --- a/docs/interfaces/computeworkparams.html +++ b/docs/interfaces/computeworkparams.html @@ -1039,7 +1039,7 @@ img { max-width: 100%; }
                  workerCount: number
                  @@ -1054,7 +1054,7 @@ img { max-width: 100%; }
                  workerIndex: number
                  diff --git a/docs/interfaces/convertparams.html b/docs/interfaces/convertparams.html index 9530e41..0f9e265 100644 --- a/docs/interfaces/convertparams.html +++ b/docs/interfaces/convertparams.html @@ -1039,7 +1039,7 @@ img { max-width: 100%; }
                  from: Unit
                  @@ -1054,7 +1054,7 @@ img { max-width: 100%; }
                  to: Unit
                  diff --git a/docs/interfaces/deriveaddressparams.html b/docs/interfaces/deriveaddressparams.html index c575d8b..c438c49 100644 --- a/docs/interfaces/deriveaddressparams.html +++ b/docs/interfaces/deriveaddressparams.html @@ -1035,7 +1035,7 @@ img { max-width: 100%; }
                  useNanoPrefix: undefined | true | false
                  diff --git a/docs/interfaces/hashblockparams.html b/docs/interfaces/hashblockparams.html index 7a56ccb..baae981 100644 --- a/docs/interfaces/hashblockparams.html +++ b/docs/interfaces/hashblockparams.html @@ -1051,7 +1051,7 @@ img { max-width: 100%; }
                  account: string
                  @@ -1066,7 +1066,7 @@ img { max-width: 100%; }
                  balance: string
                  @@ -1081,7 +1081,7 @@ img { max-width: 100%; }
                  link: string
                  @@ -1096,7 +1096,7 @@ img { max-width: 100%; }
                  previous: string
                  @@ -1111,7 +1111,7 @@ img { max-width: 100%; }
                  representative: string
                  diff --git a/docs/interfaces/signblockparams.html b/docs/interfaces/signblockparams.html index 7f7b2cd..2f86733 100644 --- a/docs/interfaces/signblockparams.html +++ b/docs/interfaces/signblockparams.html @@ -1039,7 +1039,7 @@ img { max-width: 100%; }
                  hash: string
                  @@ -1054,7 +1054,7 @@ img { max-width: 100%; }
                  secretKey: string
                  diff --git a/docs/interfaces/validateworkparams.html b/docs/interfaces/validateworkparams.html index ae80475..bf3c514 100644 --- a/docs/interfaces/validateworkparams.html +++ b/docs/interfaces/validateworkparams.html @@ -1039,7 +1039,7 @@ img { max-width: 100%; }
                  blockHash: string
                  @@ -1054,7 +1054,7 @@ img { max-width: 100%; }
                  work: string
                  diff --git a/docs/interfaces/verifyblockparams.html b/docs/interfaces/verifyblockparams.html index c3486a4..5f4f768 100644 --- a/docs/interfaces/verifyblockparams.html +++ b/docs/interfaces/verifyblockparams.html @@ -1043,7 +1043,7 @@ img { max-width: 100%; }
                  hash: string
                  @@ -1058,7 +1058,7 @@ img { max-width: 100%; }
                  publicKey: string
                  @@ -1073,7 +1073,7 @@ img { max-width: 100%; }
                  signature: string
                  diff --git a/src/check.ts b/src/check.ts index 1787720..8012e42 100644 --- a/src/check.ts +++ b/src/check.ts @@ -32,6 +32,8 @@ export function checkNumber(candidate: any) { /** * Check if the given amount is valid. * + * **Note:** a valid amount means that it can be embedded into a block `balance`. + * * @param amount - The amount to check * @returns Valid */ @@ -46,6 +48,8 @@ export function checkAmount(amount: string) { /** * Check if the given seed is valid. * + * **Note:** it only checks the format of the seed. + * * @param seed - The seed to check * @returns Valid */ @@ -56,6 +60,8 @@ export function checkSeed(seed: string) { /** * Check if the given hash is valid. * + * **Note:** it only checks the format of the hash. + * * @param hash - The hash to check * @returns Valid */ @@ -66,6 +72,9 @@ export function checkHash(hash: string) { /** * Check if the given public or secret key is valid. * + * **Note:** it only checks the format of the key. + * It does not check whether or not the key does exist on the network. + * * @param key - The key to check * @returns Valid */ @@ -76,6 +85,9 @@ export function checkKey(key: string) { /** * Check if the given address is valid. * + * **Note:** it checks the format and the checksum of the address. + * It does not check whether or not the address does exist on the network. + * * @param address - The address to check * @returns Valid */ @@ -88,7 +100,7 @@ export function checkAddress(address: string) { /** * Check if the given work is valid. * - * **Note:** this only checks the format of the work, not its difficulty + * **Note:** it only checks the format of the work, not its difficulty. * * @param work - The work to check * @returns Valid @@ -100,6 +112,8 @@ export function checkWork(work: string) { /** * Check if the given signature is valid. * + * **Note:** it only checks the format of the signature. + * * @param signature - The signature to check * @returns Valid */