@dfinity/utils 0.0.3-next-2022-09-22 → 0.0.3-next-2022-09-23

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.
Files changed (2) hide show
  1. package/README.md +35 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -33,6 +33,11 @@ npm i @dfinity/agent @dfinity/candid @dfinity/principal
33
33
 
34
34
  - [defaultAgent](#gear-defaultagent)
35
35
  - [createServices](#gear-createservices)
36
+ - [uint8ArrayToBigInt](#gear-uint8arraytobigint)
37
+ - [arrayBufferToUint8Array](#gear-arraybuffertouint8array)
38
+ - [uint8ArrayToArrayOfNumber](#gear-uint8arraytoarrayofnumber)
39
+ - [arrayOfNumberToUint8Array](#gear-arrayofnumbertouint8array)
40
+ - [asciiStringToByteArray](#gear-asciistringtobytearray)
36
41
  - [assertNonNullish](#gear-assertnonnullish)
37
42
  - [toNullable](#gear-tonullable)
38
43
  - [fromNullable](#gear-fromnullable)
@@ -50,6 +55,36 @@ npm i @dfinity/agent @dfinity/candid @dfinity/principal
50
55
  | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
51
56
  | `createServices` | `<T>({ options: { canisterId, serviceOverride, certifiedServiceOverride, agent: agentOption, }, idlFactory, certifiedIdlFactory, }: { options: RequiredCanisterOptions<T>; idlFactory: InterfaceFactory; certifiedIdlFactory: InterfaceFactory; }) => { ...; }` |
52
57
 
58
+ #### :gear: uint8ArrayToBigInt
59
+
60
+ | Function | Type |
61
+ | -------------------- | ------------------------------- |
62
+ | `uint8ArrayToBigInt` | `(array: Uint8Array) => bigint` |
63
+
64
+ #### :gear: arrayBufferToUint8Array
65
+
66
+ | Function | Type |
67
+ | ------------------------- | ------------------------------------- |
68
+ | `arrayBufferToUint8Array` | `(buffer: ArrayBuffer) => Uint8Array` |
69
+
70
+ #### :gear: uint8ArrayToArrayOfNumber
71
+
72
+ | Function | Type |
73
+ | --------------------------- | --------------------------------- |
74
+ | `uint8ArrayToArrayOfNumber` | `(array: Uint8Array) => number[]` |
75
+
76
+ #### :gear: arrayOfNumberToUint8Array
77
+
78
+ | Function | Type |
79
+ | --------------------------- | ----------------------------------- |
80
+ | `arrayOfNumberToUint8Array` | `(numbers: number[]) => Uint8Array` |
81
+
82
+ #### :gear: asciiStringToByteArray
83
+
84
+ | Function | Type |
85
+ | ------------------------ | ---------------------------- |
86
+ | `asciiStringToByteArray` | `(text: string) => number[]` |
87
+
53
88
  #### :gear: assertNonNullish
54
89
 
55
90
  | Function | Type |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/utils",
3
- "version": "0.0.3-next-2022-09-22",
3
+ "version": "0.0.3-next-2022-09-23",
4
4
  "description": "A collection of utilities and constants for NNS/SNS projects.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/cjs/index.cjs.js",