Skip to content

Commit dec36b5

Browse files
Merge pull request #22 from no-witness-labs/feat/upgrade-modules-3
feat/upgrade modules 3
2 parents 7d9f021 + fefa6c7 commit dec36b5

File tree

197 files changed

+4457
-4572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+4457
-4572
lines changed

docs/pages/reference/modules/Anchor.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Create an Anchor from a URL string and hash string.
6060
6161
```ts
6262
export declare const make: (
63-
props: { readonly anchorUrl: string & Brand<"Url">; readonly anchorDataHash: any },
63+
props: { readonly anchorUrl: Url.Url; readonly anchorDataHash: any },
6464
options?: Schema.MakeOptions | undefined
6565
) => Anchor
6666
```
@@ -84,7 +84,7 @@ Convert an Anchor to CBOR bytes.
8484
**Signature**
8585
8686
```ts
87-
export declare const toCBORBytes: (value: Anchor, options?: CBOR.CodecOptions) => Uint8Array
87+
export declare const toCBORBytes: (input: Anchor, options?: CBOR.CodecOptions) => Uint8Array
8888
```
8989
9090
Added in v2.0.0
@@ -96,7 +96,7 @@ Convert an Anchor to CBOR hex string.
9696
**Signature**
9797
9898
```ts
99-
export declare const toCBORHex: (value: Anchor, options?: CBOR.CodecOptions) => string
99+
export declare const toCBORHex: (input: Anchor, options?: CBOR.CodecOptions) => string
100100
```
101101
102102
Added in v2.0.0

docs/pages/reference/modules/AuxiliaryData.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Encode AuxiliaryData to CBOR bytes.
9494
**Signature**
9595
9696
```ts
97-
export declare const toCBORBytes: (value: AuxiliaryData, options?: CBOR.CodecOptions) => Uint8Array
97+
export declare const toCBORBytes: (input: AuxiliaryData, options?: CBOR.CodecOptions) => Uint8Array
9898
```
9999
100100
Added in v2.0.0
@@ -106,7 +106,7 @@ Encode AuxiliaryData to CBOR hex string.
106106
**Signature**
107107
108108
```ts
109-
export declare const toCBORHex: (value: AuxiliaryData, options?: CBOR.CodecOptions) => string
109+
export declare const toCBORHex: (input: AuxiliaryData, options?: CBOR.CodecOptions) => string
110110
```
111111
112112
Added in v2.0.0
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: BytesNew.ts
3+
nav_order: 29
4+
parent: Modules
5+
---
6+
7+
## BytesNew overview
8+
9+
---
10+
11+
<h2 className="text-delta">Table of contents</h2>
12+
13+
- [utils](#utils)
14+
- [BytesError (class)](#byteserror-class)
15+
- [BytesFromHex](#bytesfromhex)
16+
- [decodeSync](#decodesync)
17+
- [fromHex](#fromhex)
18+
- [makeUint8ArrayTransformation](#makeuint8arraytransformation)
19+
- [makeUint8ArrayTransformationNotFail](#makeuint8arraytransformationnotfail)
20+
- [toHex](#tohex)
21+
22+
---
23+
24+
# utils
25+
26+
## BytesError (class)
27+
28+
Error class for Bytes related operations.
29+
30+
**Signature**
31+
32+
```ts
33+
export declare class BytesError
34+
```
35+
36+
## BytesFromHex
37+
38+
**Signature**
39+
40+
```ts
41+
export declare const BytesFromHex: Schema.transformOrFail<
42+
Schema.SchemaClass<string, string, never>,
43+
typeof Schema.Uint8ArrayFromSelf,
44+
never
45+
>
46+
```
47+
48+
## decodeSync
49+
50+
**Signature**
51+
52+
```ts
53+
export declare const decodeSync: (str: string) => Uint8Array
54+
```
55+
56+
## fromHex
57+
58+
**Signature**
59+
60+
```ts
61+
export declare const fromHex: (input: string) => any
62+
```
63+
64+
## makeUint8ArrayTransformation
65+
66+
**Signature**
67+
68+
```ts
69+
export declare const makeUint8ArrayTransformation: (
70+
id: string,
71+
decode: (s: string, ast: SchemaAST.AST) => Either.Either<Uint8Array, ParseResult.ParseIssue>,
72+
encode: (u: Uint8Array) => string
73+
) => Schema.transformOrFail<Schema.SchemaClass<string, string, never>, typeof Schema.Uint8ArrayFromSelf, never>
74+
```
75+
76+
## makeUint8ArrayTransformationNotFail
77+
78+
**Signature**
79+
80+
```ts
81+
export declare const makeUint8ArrayTransformationNotFail: (
82+
id: string,
83+
decode: (s: string) => Uint8Array,
84+
encode: (u: Uint8Array) => string
85+
) => Schema.transform<Schema.SchemaClass<string, string, never>, typeof Schema.Uint8ArrayFromSelf>
86+
```
87+
88+
## toHex
89+
90+
**Signature**
91+
92+
```ts
93+
export declare const toHex: (bytes: Uint8Array) => string
94+
```

docs/pages/reference/modules/CBOR.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: CBOR.ts
3-
nav_order: 29
3+
nav_order: 30
44
parent: Modules
55
---
66

@@ -38,7 +38,6 @@ parent: Modules
3838
- [utils](#utils)
3939
- [ArraySchema](#arrayschema)
4040
- [ByteArray](#bytearray)
41-
- [Effect (namespace)](#effect-namespace)
4241
- [Either (namespace)](#either-namespace)
4342
- [Float](#float)
4443
- [FromHex](#fromhex)
@@ -366,8 +365,6 @@ export declare const ArraySchema: Schema.Array$<Schema.suspend<CBOR, CBOR, never
366365
export declare const ByteArray: typeof Schema.Uint8ArrayFromSelf
367366
```
368367
369-
## Effect (namespace)
370-
371368
## Either (namespace)
372369
373370
## Float

docs/pages/reference/modules/Certificate.mdx

Lines changed: 87 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Certificate.ts
3-
nav_order: 30
3+
nav_order: 31
44
parent: Modules
55
---
66

@@ -11,7 +11,7 @@ parent: Modules
1111
<h2 className="text-delta">Table of contents</h2>
1212

1313
- [effect](#effect)
14-
- [Effect (namespace)](#effect-namespace)
14+
- [Either (namespace)](#either-namespace)
1515
- [encoding](#encoding)
1616
- [toCBORBytes](#tocborbytes)
1717
- [toCBORHex](#tocborhex)
@@ -57,7 +57,7 @@ parent: Modules
5757

5858
# effect
5959

60-
## Effect (namespace)
60+
## Either (namespace)
6161

6262
Effect-based error handling variants for functions that can fail.
6363

@@ -72,7 +72,27 @@ Convert a Certificate to CBOR bytes.
7272
**Signature**
7373

7474
```ts
75-
export declare const toCBORBytes: (certificate: Certificate, options?: CBOR.CodecOptions) => Uint8Array
75+
export declare const toCBORBytes: (
76+
input:
77+
| StakeRegistration
78+
| StakeDeregistration
79+
| StakeDelegation
80+
| PoolRegistration
81+
| PoolRetirement
82+
| RegCert
83+
| UnregCert
84+
| VoteDelegCert
85+
| StakeVoteDelegCert
86+
| StakeRegDelegCert
87+
| VoteRegDelegCert
88+
| StakeVoteRegDelegCert
89+
| AuthCommitteeHotCert
90+
| ResignCommitteeColdCert
91+
| RegDrepCert
92+
| UnregDrepCert
93+
| UpdateDrepCert,
94+
options?: CBOR.CodecOptions
95+
) => Uint8Array
7696
```
7797
7898
Added in v2.0.0
@@ -84,7 +104,27 @@ Convert a Certificate to CBOR hex string.
84104
**Signature**
85105
86106
```ts
87-
export declare const toCBORHex: (certificate: Certificate, options?: CBOR.CodecOptions) => string
107+
export declare const toCBORHex: (
108+
input:
109+
| StakeRegistration
110+
| StakeDeregistration
111+
| StakeDelegation
112+
| PoolRegistration
113+
| PoolRetirement
114+
| RegCert
115+
| UnregCert
116+
| VoteDelegCert
117+
| StakeVoteDelegCert
118+
| StakeRegDelegCert
119+
| VoteRegDelegCert
120+
| StakeVoteRegDelegCert
121+
| AuthCommitteeHotCert
122+
| ResignCommitteeColdCert
123+
| RegDrepCert
124+
| UnregDrepCert
125+
| UpdateDrepCert,
126+
options?: CBOR.CodecOptions
127+
) => string
88128
```
89129
90130
Added in v2.0.0
@@ -140,7 +180,27 @@ Parse a Certificate from CBOR bytes.
140180
**Signature**
141181

142182
```ts
143-
export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => Certificate
183+
export declare const fromCBORBytes: (
184+
bytes: Uint8Array,
185+
options?: CBOR.CodecOptions
186+
) =>
187+
| StakeRegistration
188+
| StakeDeregistration
189+
| StakeDelegation
190+
| PoolRegistration
191+
| PoolRetirement
192+
| RegCert
193+
| UnregCert
194+
| VoteDelegCert
195+
| StakeVoteDelegCert
196+
| StakeRegDelegCert
197+
| VoteRegDelegCert
198+
| StakeVoteRegDelegCert
199+
| AuthCommitteeHotCert
200+
| ResignCommitteeColdCert
201+
| RegDrepCert
202+
| UnregDrepCert
203+
| UpdateDrepCert
144204
```
145205

146206
Added in v2.0.0
@@ -152,7 +212,27 @@ Parse a Certificate from CBOR hex string.
152212
**Signature**
153213

154214
```ts
155-
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => Certificate
215+
export declare const fromCBORHex: (
216+
hex: string,
217+
options?: CBOR.CodecOptions
218+
) =>
219+
| StakeRegistration
220+
| StakeDeregistration
221+
| StakeDelegation
222+
| PoolRegistration
223+
| PoolRetirement
224+
| RegCert
225+
| UnregCert
226+
| VoteDelegCert
227+
| StakeVoteDelegCert
228+
| StakeRegDelegCert
229+
| VoteRegDelegCert
230+
| StakeVoteRegDelegCert
231+
| AuthCommitteeHotCert
232+
| ResignCommitteeColdCert
233+
| RegDrepCert
234+
| UnregDrepCert
235+
| UpdateDrepCert
156236
```
157237

158238
Added in v2.0.0

docs/pages/reference/modules/Codec.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Codec.ts
3-
nav_order: 31
3+
nav_order: 32
44
parent: Modules
55
---
66

docs/pages/reference/modules/Coin.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Coin.ts
3-
nav_order: 32
3+
nav_order: 33
44
parent: Modules
55
---
66

@@ -14,8 +14,8 @@ parent: Modules
1414
- [MAX_COIN_VALUE](#max_coin_value)
1515
- [constructors](#constructors)
1616
- [make](#make)
17-
- [effect](#effect)
18-
- [Effect (namespace)](#effect-namespace)
17+
- [either](#either)
18+
- [Either (namespace)](#either-namespace)
1919
- [equality](#equality)
2020
- [equals](#equals)
2121
- [errors](#errors)
@@ -64,11 +64,11 @@ export declare const make: (a: bigint, options?: Schema.MakeOptions) => bigint
6464
6565
Added in v2.0.0
6666
67-
# effect
67+
# either
6868
69-
## Effect (namespace)
69+
## Either (namespace)
7070
71-
Effect-based error handling variants for functions that can fail.
71+
Either-based error handling variants for functions that can fail.
7272
7373
Added in v2.0.0
7474

docs/pages/reference/modules/Combinator.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Combinator.ts
3-
nav_order: 33
3+
nav_order: 34
44
parent: Modules
55
---
66

docs/pages/reference/modules/CommitteeColdCredential.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: CommitteeColdCredential.ts
3-
nav_order: 34
3+
nav_order: 35
44
parent: Modules
55
---
66

docs/pages/reference/modules/CommitteeHotCredential.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: CommitteeHotCredential.ts
3-
nav_order: 35
3+
nav_order: 36
44
parent: Modules
55
---
66

0 commit comments

Comments
 (0)