@mysten/docs 0.1.1

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 (108) hide show
  1. package/README.md +24 -0
  2. package/dist/bcs/index.md +358 -0
  3. package/dist/bcs/llms-index.md +4 -0
  4. package/dist/codegen/index.md +441 -0
  5. package/dist/codegen/llms-index.md +4 -0
  6. package/dist/dapp-kit/actions/connect-wallet.md +69 -0
  7. package/dist/dapp-kit/actions/disconnect-wallet.md +38 -0
  8. package/dist/dapp-kit/actions/sign-and-execute-transaction.md +96 -0
  9. package/dist/dapp-kit/actions/sign-personal-message.md +58 -0
  10. package/dist/dapp-kit/actions/sign-transaction.md +65 -0
  11. package/dist/dapp-kit/actions/switch-account.md +37 -0
  12. package/dist/dapp-kit/actions/switch-network.md +37 -0
  13. package/dist/dapp-kit/dapp-kit-instance.md +162 -0
  14. package/dist/dapp-kit/getting-started/create-dapp.md +151 -0
  15. package/dist/dapp-kit/getting-started/next-js.md +162 -0
  16. package/dist/dapp-kit/getting-started/react.md +172 -0
  17. package/dist/dapp-kit/getting-started/vue.md +193 -0
  18. package/dist/dapp-kit/index.md +70 -0
  19. package/dist/dapp-kit/llms-index.md +26 -0
  20. package/dist/dapp-kit/react/components/connect-button.md +42 -0
  21. package/dist/dapp-kit/react/components/connect-modal.md +51 -0
  22. package/dist/dapp-kit/react/components/index.md +13 -0
  23. package/dist/dapp-kit/react/dapp-kit-provider.md +86 -0
  24. package/dist/dapp-kit/react/hooks/index.md +25 -0
  25. package/dist/dapp-kit/react/hooks/use-current-account.md +33 -0
  26. package/dist/dapp-kit/react/hooks/use-current-client.md +36 -0
  27. package/dist/dapp-kit/react/hooks/use-current-network.md +28 -0
  28. package/dist/dapp-kit/react/hooks/use-current-wallet.md +36 -0
  29. package/dist/dapp-kit/react/hooks/use-dapp-kit.md +100 -0
  30. package/dist/dapp-kit/react/hooks/use-wallet-connection.md +48 -0
  31. package/dist/dapp-kit/react/hooks/use-wallets.md +33 -0
  32. package/dist/dapp-kit/state.md +169 -0
  33. package/dist/dapp-kit/theming.md +196 -0
  34. package/dist/dapp-kit/web-components/connect-button.md +89 -0
  35. package/dist/dapp-kit/web-components/connect-modal.md +177 -0
  36. package/dist/kiosk/advanced-examples.md +101 -0
  37. package/dist/kiosk/from-v1.md +320 -0
  38. package/dist/kiosk/index.md +22 -0
  39. package/dist/kiosk/kiosk-client/introduction.md +52 -0
  40. package/dist/kiosk/kiosk-client/kiosk-transaction/examples.md +119 -0
  41. package/dist/kiosk/kiosk-client/kiosk-transaction/kiosk-transaction.md +103 -0
  42. package/dist/kiosk/kiosk-client/kiosk-transaction/managing.md +235 -0
  43. package/dist/kiosk/kiosk-client/kiosk-transaction/purchasing.md +110 -0
  44. package/dist/kiosk/kiosk-client/querying.md +237 -0
  45. package/dist/kiosk/kiosk-client/transfer-policy-transaction/introduction.md +79 -0
  46. package/dist/kiosk/kiosk-client/transfer-policy-transaction/using-the-manager.md +115 -0
  47. package/dist/kiosk/llms-index.md +8 -0
  48. package/dist/llms-index.md +125 -0
  49. package/dist/payment-kit/getting-started.md +256 -0
  50. package/dist/payment-kit/index.md +132 -0
  51. package/dist/payment-kit/llms-index.md +8 -0
  52. package/dist/payment-kit/payment-kit-sdk.md +747 -0
  53. package/dist/payment-kit/payment-processing.md +372 -0
  54. package/dist/payment-kit/registry-management.md +529 -0
  55. package/dist/seal/index.md +85 -0
  56. package/dist/seal/llms-index.md +4 -0
  57. package/dist/slush-wallet/dapp.md +95 -0
  58. package/dist/slush-wallet/deep-linking.md +465 -0
  59. package/dist/slush-wallet/index.md +7 -0
  60. package/dist/slush-wallet/llms-index.md +6 -0
  61. package/dist/sui/bcs.md +134 -0
  62. package/dist/sui/clients/core.md +606 -0
  63. package/dist/sui/clients/graphql.md +101 -0
  64. package/dist/sui/clients/grpc.md +155 -0
  65. package/dist/sui/clients/index.md +95 -0
  66. package/dist/sui/clients/json-rpc.md +239 -0
  67. package/dist/sui/cryptography/keypairs.md +267 -0
  68. package/dist/sui/cryptography/multisig.md +194 -0
  69. package/dist/sui/cryptography/passkey.md +111 -0
  70. package/dist/sui/cryptography/webcrypto-signer.md +81 -0
  71. package/dist/sui/executors.md +148 -0
  72. package/dist/sui/faucet.md +26 -0
  73. package/dist/sui/hello-sui.md +115 -0
  74. package/dist/sui/index.md +53 -0
  75. package/dist/sui/install.md +61 -0
  76. package/dist/sui/llm-docs.md +32 -0
  77. package/dist/sui/llms-index.md +44 -0
  78. package/dist/sui/migrations/0.38.md +58 -0
  79. package/dist/sui/migrations/sui-1.0.md +455 -0
  80. package/dist/sui/migrations/sui-2.0/agent-prompt.md +42 -0
  81. package/dist/sui/migrations/sui-2.0/dapp-kit.md +350 -0
  82. package/dist/sui/migrations/sui-2.0/deepbook-v3.md +33 -0
  83. package/dist/sui/migrations/sui-2.0/index.md +158 -0
  84. package/dist/sui/migrations/sui-2.0/json-rpc-migration.md +386 -0
  85. package/dist/sui/migrations/sui-2.0/kiosk.md +120 -0
  86. package/dist/sui/migrations/sui-2.0/sdk-maintainers.md +90 -0
  87. package/dist/sui/migrations/sui-2.0/seal.md +14 -0
  88. package/dist/sui/migrations/sui-2.0/sui.md +341 -0
  89. package/dist/sui/migrations/sui-2.0/suins.md +43 -0
  90. package/dist/sui/migrations/sui-2.0/wallet-builders.md +66 -0
  91. package/dist/sui/migrations/sui-2.0/walrus.md +41 -0
  92. package/dist/sui/migrations/sui-2.0/zksend.md +95 -0
  93. package/dist/sui/plugins.md +258 -0
  94. package/dist/sui/sdk-building.md +344 -0
  95. package/dist/sui/transaction-building/basics.md +299 -0
  96. package/dist/sui/transaction-building/gas.md +62 -0
  97. package/dist/sui/transaction-building/intents.md +62 -0
  98. package/dist/sui/transaction-building/offline.md +73 -0
  99. package/dist/sui/transaction-building/sponsored-transactions.md +22 -0
  100. package/dist/sui/utils/derived_objects.md +59 -0
  101. package/dist/sui/utils/index.md +52 -0
  102. package/dist/sui/zklogin.md +83 -0
  103. package/dist/walrus/index.md +527 -0
  104. package/dist/walrus/llms-index.md +4 -0
  105. package/dist/zksend/index.md +27 -0
  106. package/dist/zksend/link-builder.md +192 -0
  107. package/dist/zksend/llms-index.md +5 -0
  108. package/package.json +66 -0
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # docs
2
+
3
+ This is a Next.js application generated with
4
+ [Create Fumadocs](https://github.com/fuma-nama/fumadocs).
5
+
6
+ Run development server:
7
+
8
+ ```bash
9
+ npm run dev
10
+ # or
11
+ pnpm dev
12
+ # or
13
+ yarn dev
14
+ ```
15
+
16
+ Open http://localhost:3000 with your browser to see the result.
17
+
18
+ ## Learn More
19
+
20
+ To learn more about Next.js and Fumadocs, take a look at the following resources:
21
+
22
+ - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
23
+ - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
24
+ - [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs
@@ -0,0 +1,358 @@
1
+ # BCS - Binary Canonical Serialization
2
+
3
+ > Encode and decode Sui Move types with Binary Canonical Serialization
4
+
5
+ This small and lightweight library implements
6
+ [Binary Canonical Serialization (BCS)](https://github.com/zefchain/bcs) in TypeScript, making BCS
7
+ available in both Browser and NodeJS environments in a type-safe way.`
8
+
9
+ ## Install
10
+
11
+ To install, add the [`@mysten/bcs`](https://www.npmjs.com/package/@mysten/bcs) package to your
12
+ project:
13
+
14
+ ```sh npm2yarn
15
+ npm i @mysten/bcs
16
+ ```
17
+
18
+ ## Quickstart
19
+
20
+ ```ts
21
+
22
+ // define UID as a 32-byte array, then add a transform to/from hex strings
23
+ const UID = bcs.fixedArray(32, bcs.u8()).transform({
24
+ input: (id: string) => fromHex(id),
25
+ output: (id) => toHex(Uint8Array.from(id)),
26
+ });
27
+
28
+ const Coin = bcs.struct('Coin', {
29
+ id: UID,
30
+ value: bcs.u64(),
31
+ });
32
+
33
+ // deserialization: BCS bytes into Coin
34
+ const bcsBytes = Coin.serialize({
35
+ id: '0000000000000000000000000000000000000000000000000000000000000001',
36
+ value: 1000000n,
37
+ }).toBytes();
38
+
39
+ const coin = Coin.parse(bcsBytes);
40
+
41
+ // serialization: Object into bytes - an Option with <T = Coin>
42
+ const hex = bcs.option(Coin).serialize(coin).toHex();
43
+
44
+ console.log(hex);
45
+ ```
46
+
47
+ ## Description
48
+
49
+ BCS defines the way the data is serialized, and the serialized results contains no type information.
50
+ To be able to serialize the data and later deserialize it, a schema has to be created (based on the
51
+ built-in primitives, such as `string` or `u64`). There are no type hints in the serialized bytes on
52
+ what they mean, so the schema used for decoding must match the schema used to encode the data.
53
+
54
+ The `@mysten/bcs` library can be used to define schemas that can serialize and deserialize BCS
55
+ encoded data, and can infer the correct TypeScript for the schema from the definitions themselves
56
+ rather than having to define them manually.
57
+
58
+ ## Basic types
59
+
60
+ bcs supports a number of built in base types that can be combined to create more complex types. The
61
+ following table lists the primitive types available:
62
+
63
+ | Method | TS Type | TS Input Type | Description |
64
+ | --------------------- | ------------ | ---------------------------- | --------------------------------------------------------------------------- |
65
+ | `bool` | `boolean` | `boolean` | Boolean type (converts to `true` / `false`) |
66
+ | `u8`, `u16`, `u32` | `number` | `number` | Unsigned Integer types |
67
+ | `u64`, `u128`, `u256` | `string` | `number \| string \| bigint` | Unsigned Integer types, decoded as `string` to allow for JSON serialization |
68
+ | `uleb128` | `number` | `number` | Unsigned LEB128 integer type |
69
+ | `string` | `string` | `string` | UTF-8 encoded string |
70
+ | `bytes(size)` | `Uint8Array` | `Iterable<number>` | Fixed length bytes |
71
+ | `byteVector` | `Uint8Array` | `Iterable<number>` | Variable length bytes |
72
+
73
+ ```ts
74
+
75
+ // Integers
76
+ const u8 = bcs.u8().serialize(100).toBytes();
77
+ const u64 = bcs.u64().serialize(1000000n).toBytes();
78
+ const u128 = bcs.u128().serialize('100000010000001000000').toBytes();
79
+
80
+ // Other types
81
+ const str = bcs.string().serialize('this is an ascii string').toBytes();
82
+ const hex = bcs.hex().serialize('C0FFEE').toBytes();
83
+ const bytes = bcs.bytes(4).serialize([1, 2, 3, 4]).toBytes();
84
+ const byteVector = bcs
85
+ .byteVector()
86
+ .serialize(new Uint8Array([1, 2, 3, 4]))
87
+ .toBytes();
88
+ // Parsing data back into original types
89
+ const parsedU8 = bcs.u8().parse(u8);
90
+ // u64-u256 will be represented as bigints regardless of how they were provided when serializing them
91
+ const parsedU64 = bcs.u64().parse(u64);
92
+ const parsedU128 = bcs.u128().parse(u128);
93
+
94
+ const parsedStr = bcs.string().parse(str);
95
+ const parsedHex = bcs.hex().parse(hex);
96
+ const parsedBytes = bcs.bytes(4).parse(bytes);
97
+ const parsedByteVector = bcs.byteVector().parse(byteVector);
98
+ ```
99
+
100
+ ## Compound types
101
+
102
+ For most use-cases you'll want to combine primitive types into more complex types like `vectors`,
103
+ `structs` and `enums`. The following table lists methods available for creating compound types:
104
+
105
+ | Method | Description |
106
+ | ---------------------- | ----------------------------------------------------- |
107
+ | `vector(type: T)` | A variable length list of values of type `T` |
108
+ | `fixedArray(size, T)` | A fixed length array of values of type `T` |
109
+ | `option(type: T)` | A value of type `T` or `null` |
110
+ | `enum(name, values)` | An enum value representing one of the provided values |
111
+ | `struct(name, fields)` | A struct with named fields of the provided types |
112
+ | `tuple(types)` | A tuple of the provided types |
113
+ | `map(K, V)` | A map of keys of type `K` to values of type `V` |
114
+
115
+ ```ts
116
+
117
+ // Vectors
118
+ const intList = bcs.vector(bcs.u8()).serialize([1, 2, 3, 4, 5]).toBytes();
119
+ const stringList = bcs.vector(bcs.string()).serialize(['a', 'b', 'c']).toBytes();
120
+
121
+ // Fixed length Arrays
122
+ const intArray = bcs.fixedArray(4, bcs.u8()).serialize([1, 2, 3, 4]).toBytes();
123
+ const stringArray = bcs.fixedArray(3, bcs.string()).serialize(['a', 'b', 'c']).toBytes();
124
+
125
+ // Option
126
+ const option = bcs.option(bcs.string()).serialize('some value').toBytes();
127
+ const nullOption = bcs.option(bcs.string()).serialize(null).toBytes();
128
+
129
+ // Enum
130
+ const MyEnum = bcs.enum('MyEnum', {
131
+ NoType: null,
132
+ Int: bcs.u8(),
133
+ String: bcs.string(),
134
+ Array: bcs.fixedArray(3, bcs.u8()),
135
+ });
136
+
137
+ const noTypeEnum = MyEnum.serialize({ NoType: null }).toBytes();
138
+ const intEnum = MyEnum.serialize({ Int: 100 }).toBytes();
139
+ const stringEnum = MyEnum.serialize({ String: 'string' }).toBytes();
140
+ const arrayEnum = MyEnum.serialize({ Array: [1, 2, 3] }).toBytes();
141
+
142
+ // Struct
143
+ const MyStruct = bcs.struct('MyStruct', {
144
+ id: bcs.u8(),
145
+ name: bcs.string(),
146
+ });
147
+
148
+ const struct = MyStruct.serialize({ id: 1, name: 'name' }).toBytes();
149
+
150
+ // Tuple
151
+ const tuple = bcs.tuple([bcs.u8(), bcs.string()]).serialize([1, 'name']).toBytes();
152
+
153
+ // Map
154
+ const map = bcs
155
+ .map(bcs.u8(), bcs.string())
156
+ .serialize(
157
+ new Map([
158
+ [1, 'one'],
159
+ [2, 'two'],
160
+ ]),
161
+ )
162
+ .toBytes();
163
+
164
+ // Parsing data back into original types
165
+
166
+ // Vectors
167
+ const parsedIntList = bcs.vector(bcs.u8()).parse(intList);
168
+ const parsedStringList = bcs.vector(bcs.string()).parse(stringList);
169
+
170
+ // Fixed length Arrays
171
+ const parsedIntArray = bcs.fixedArray(4, bcs.u8()).parse(intArray);
172
+
173
+ // Option
174
+ const parsedOption = bcs.option(bcs.string()).parse(option);
175
+ const parsedNullOption = bcs.option(bcs.string()).parse(nullOption);
176
+
177
+ // Enum
178
+ const parsedNoTypeEnum = MyEnum.parse(noTypeEnum);
179
+ const parsedIntEnum = MyEnum.parse(intEnum);
180
+ const parsedStringEnum = MyEnum.parse(stringEnum);
181
+ const parsedArrayEnum = MyEnum.parse(arrayEnum);
182
+
183
+ // Struct
184
+ const parsedStruct = MyStruct.parse(struct);
185
+
186
+ // Tuple
187
+ const parsedTuple = bcs.tuple([bcs.u8(), bcs.string()]).parse(tuple);
188
+
189
+ // Map
190
+ const parsedMap = bcs.map(bcs.u8(), bcs.string()).parse(map);
191
+ ```
192
+
193
+ ## Generics
194
+
195
+ To define a generic struct or an enum, you can define a generic typescript function helper
196
+
197
+ ```ts
198
+ // Example: Generics
199
+
200
+ // The T typescript generic is a placeholder for the typescript type of the generic value
201
+ // The T argument will be the bcs type passed in when creating a concrete instance of the Container type
202
+ function Container<T extends BcsType<any>>(T: T) {
203
+ return bcs.struct('Container<T>', {
204
+ contents: T,
205
+ }),
206
+ }
207
+
208
+ // When serializing, we have to pass the type to use for `T`
209
+ const bytes = Container(bcs.u8()).serialize({ contents: 100 }).toBytes();
210
+
211
+ // Alternatively we can save the concrete type as a variable
212
+ const U8Container = Container(bcs.u8());
213
+ const bytes = U8Container.serialize({ contents: 100 }).toBytes();
214
+
215
+ // Using multiple generics
216
+ function VecMap<K extends BcsType<any>, V extends BcsType<any>>(K: K, V: V) {
217
+ // You can use the names of the generic params in the type name to
218
+ return bcs.struct(
219
+ // You can use the names of the generic params to give your type a more useful name
220
+ `VecMap<${K.name}, ${V.name}>`,
221
+ {
222
+ keys: bcs.vector(K),
223
+ values: bcs.vector(V),
224
+ }
225
+ )
226
+ }
227
+
228
+ // To serialize VecMap, we can use:
229
+ VecMap(bcs.string(), bcs.string())
230
+ .serialize({
231
+ keys: ['key1', 'key2', 'key3'],
232
+ values: ['value1', 'value2', 'value3'],
233
+ })
234
+ .toBytes();
235
+ ```
236
+
237
+ ## Transforms
238
+
239
+ If you the format you use in your code is different from the format expected for BCS serialization,
240
+ you can use the `transform` API to map between the types you use in your application, and the types
241
+ needed for serialization.
242
+
243
+ The `address` type used by Move code is a good example of this. In many cases, you'll want to
244
+ represent an address as a hex string, but the BCS serialization format for addresses is a 32 byte
245
+ array. To handle this, you can use the `transform` API to map between the two formats:
246
+
247
+ ```ts
248
+
249
+ const Address = bcs.bytes(32).transform({
250
+ // To change the input type, you need to provide a type definition for the input
251
+ input: (val: string) => fromHex(val),
252
+ output: (val) => toHex(val),
253
+ });
254
+
255
+ const serialized = Address.serialize('0x000000...').toBytes();
256
+ const parsed = Address.parse(serialized); // will return a hex string
257
+ ```
258
+
259
+ When using a transform, a new type is created that uses the inferred return value of `output` as the
260
+ return type of the `parse` method, and the type of the `input` argument as the allowed input type
261
+ when calling `serialize`. The `output` type can generally be inferred from the definition, but the
262
+ input type will need to be provided explicitly. In some cases, for complex transforms, you'll need
263
+ to manually type the return
264
+
265
+ transforms can also handle more complex types. For instance, `@mysten/sui` uses the following
266
+ definition to transform enums into a more TypeScript friends format:
267
+
268
+ ```ts
269
+ type Merge<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;
270
+ type EnumKindTransform<T> = T extends infer U
271
+ ? Merge<(U[keyof U] extends null | boolean ? object : U[keyof U]) & { kind: keyof U }>
272
+ : never;
273
+
274
+ function enumKind<T extends object, Input extends object>(type: BcsType<T, Input>) {
275
+ return type.transform({
276
+ input: ({ kind, ...val }: EnumKindTransform<Input>) =>
277
+ ({
278
+ [kind]: val,
279
+ }) as Input,
280
+ output: (val) => {
281
+ const key = Object.keys(val)[0] as keyof T;
282
+
283
+ return { kind: key, ...val[key] } as EnumKindTransform<T>;
284
+ },
285
+ });
286
+ }
287
+
288
+ const MyEnum = enumKind(
289
+ bcs.enum('MyEnum', {
290
+ A: bcs.struct('A', {
291
+ id: bcs.u8(),
292
+ }),
293
+ B: bcs.struct('B', {
294
+ val: bcs.string(),
295
+ }),
296
+ }),
297
+ );
298
+
299
+ // Enums wrapped with enumKind flatten the enum variants and add a `kind` field to differentiate them
300
+ const A = MyEnum.serialize({ kind: 'A', id: 1 }).toBytes();
301
+ const B = MyEnum.serialize({ kind: 'B', val: 'xyz' }).toBytes();
302
+
303
+ const parsedA = MyEnum.parse(A); // returns { kind: 'A', id: 1 }
304
+ ```
305
+
306
+ ## Formats for serialized bytes
307
+
308
+ When you call `serialize` on a `BcsType`, you will receive a `SerializedBcs` instance. This wrapper
309
+ preserves type information for the serialized bytes, and can be used to get raw data in various
310
+ formats.
311
+
312
+ ```ts
313
+
314
+ const serializedString = bcs.string().serialize('this is a string');
315
+
316
+ // SerializedBcs.toBytes() returns a Uint8Array
317
+ const bytes: Uint8Array = serializedString.toBytes();
318
+
319
+ // You can get the serialized bytes encoded as hex, base64 or base58
320
+ const hex: string = serializedString.toHex();
321
+ const base64: string = bcsWriter.toBase64();
322
+ const base58: string = bcsWriter.toBase58();
323
+
324
+ // To parse a BCS value from bytes, the bytes need to be a Uint8Array
325
+ const str1 = bcs.string().parse(bytes);
326
+
327
+ // If your data is encoded as string, you need to convert it to Uint8Array first
328
+ const str2 = bcs.string().parse(fromHex(hex));
329
+ const str3 = bcs.string().parse(fromBase64(base64));
330
+ const str4 = bcs.string().parse(fromBase58(base58));
331
+
332
+ console.assert((str1 == str2) == (str3 == str4), 'Result is the same');
333
+ ```
334
+
335
+ ## Inferring types
336
+
337
+ BCS types have both a `type` and an `inputType`. For some types these are the same, but for others
338
+ (like `u64`) the types diverge slightly to make inputs more flexible. For instance, `u64` will
339
+ always be `string` for it's type, but can be a `number`, `string` or `bigint` for it's input type.
340
+
341
+ You can infer these types in one of 2 ways, either using the `$inferType` and `$inferInput`
342
+ properties on a `BcsType`, or using the `InferBcsType` and `InferBcsInput` type helpers.
343
+
344
+ ```ts
345
+
346
+ const MyStruct = bcs.struct('MyStruct', {
347
+ id: bcs.u64(),
348
+ name: bcs.string(),
349
+ });
350
+
351
+ // using the $inferType and $inferInput properties
352
+ type MyStructType = typeof MyStruct.$inferType; // { id: string; name: string; }
353
+ type MyStructInput = typeof MyStruct.$inferInput; // { id: number | string | bigint; name: string; }
354
+
355
+ // using the InferBcsType and InferBcsInput type helpers
356
+ type MyStructType = InferBcsType<typeof MyStruct>; // { id: string; name: string; }
357
+ type MyStructInput = InferBcsInput<typeof MyStruct>; // { id: number | string | bigint; name: string; }
358
+ ```
@@ -0,0 +1,4 @@
1
+ # BCS
2
+ > Encoding and decoding Sui objects
3
+
4
+ - [BCS - Binary Canonical Serialization](./index.md): Encode and decode Sui Move types with Binary Canonical Serialization