Skip to content

Commit 37b728b

Browse files
Merge pull request #30 from no-witness-labs/feat/upgrade-modules-5
feat: update modules
2 parents 1a89f20 + f9907ad commit 37b728b

File tree

234 files changed

+777
-355
lines changed

Some content is hidden

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

234 files changed

+777
-355
lines changed

docs/examples/data/basic-construction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// @title: Basic Data Construction
22
// @description: Learn how to create fundamental Data types using constructors.
3+
// #region main
34
import assert from "node:assert/strict"
45
import { Data } from "@evolution-sdk/evolution"
56

6-
// #region main
77
// Create a simple constructor with no fields
88
const unit = new Data.Constr({ index: 0n, fields: [] })
99
console.log("Unit constructor:", unit)

docs/next.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import nextra from 'nextra'
22

3+
// Configure Nextra v2.13 with top-level options
34
const withNextra = nextra({
45
theme: 'nextra-theme-docs',
5-
themeConfig: './theme.config.tsx',
6+
themeConfig: './theme.config.tsx'
67
})
78

89
const isCI = !!process.env.GITHUB_ACTIONS
@@ -14,5 +15,5 @@ export default withNextra({
1415
output: 'export',
1516
distDir: 'out',
1617
images: { unoptimized: true },
17-
basePath: isCI && isProd ? '/evolution-sdk' : '',
18+
basePath: isCI && isProd ? '/evolution-sdk' : ''
1819
})

docs/pages/getting-started/data/basic-construction.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
Learn how to create fundamental Data types using constructors.
44

55
```typescript
6-
// #region main
6+
import assert from "node:assert/strict"
7+
import { Data } from "@evolution-sdk/evolution"
8+
79
// Create a simple constructor with no fields
810
const unit = new Data.Constr({ index: 0n, fields: [] })
911
console.log("Unit constructor:", unit)
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: BootstrapWitness.ts
3+
nav_order: 16
4+
parent: Modules
5+
---
6+
7+
## BootstrapWitness overview
8+
9+
---
10+
11+
<h2 className="text-delta">Table of contents</h2>
12+
13+
- [utils](#utils)
14+
- [BootstrapWitness (class)](#bootstrapwitness-class)
15+
- [CDDLSchema](#cddlschema)
16+
- [FromCDDL](#fromcddl)
17+
- [arbitrary](#arbitrary)
18+
- [fromCBORBytes](#fromcborbytes)
19+
- [fromCBORHex](#fromcborhex)
20+
- [toCBORBytes](#tocborbytes)
21+
- [toCBORHex](#tocborhex)
22+
23+
---
24+
25+
# utils
26+
27+
## BootstrapWitness (class)
28+
29+
Bootstrap witness for Byron-era addresses.
30+
31+
CDDL:
32+
33+
```
34+
bootstrap_witness = [
35+
public_key : vkey,
36+
signature : ed25519_signature,
37+
chain_code : bytes .size 32,
38+
attributes : bytes
39+
]
40+
```
41+
42+
**Signature**
43+
44+
```ts
45+
export declare class BootstrapWitness
46+
```
47+
48+
## CDDLSchema
49+
50+
**Signature**
51+
52+
```ts
53+
export declare const CDDLSchema: Schema.Tuple<
54+
[
55+
typeof Schema.Uint8ArrayFromSelf,
56+
typeof Schema.Uint8ArrayFromSelf,
57+
typeof Schema.Uint8ArrayFromSelf,
58+
typeof Schema.Uint8ArrayFromSelf
59+
]
60+
>
61+
```
62+
63+
## FromCDDL
64+
65+
Transform between tuple CDDL shape and class.
66+
67+
**Signature**
68+
69+
```ts
70+
export declare const FromCDDL: Schema.transformOrFail<
71+
Schema.Tuple<
72+
[
73+
typeof Schema.Uint8ArrayFromSelf,
74+
typeof Schema.Uint8ArrayFromSelf,
75+
typeof Schema.Uint8ArrayFromSelf,
76+
typeof Schema.Uint8ArrayFromSelf
77+
]
78+
>,
79+
Schema.SchemaClass<BootstrapWitness, BootstrapWitness, never>,
80+
never
81+
>
82+
```
83+
84+
## arbitrary
85+
86+
Arbitrary generator for BootstrapWitness instances.
87+
88+
**Signature**
89+
90+
```ts
91+
export declare const arbitrary: FastCheck.Arbitrary<BootstrapWitness>
92+
```
93+
94+
## fromCBORBytes
95+
96+
**Signature**
97+
98+
```ts
99+
export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => BootstrapWitness
100+
```
101+
102+
## fromCBORHex
103+
104+
**Signature**
105+
106+
```ts
107+
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => BootstrapWitness
108+
```
109+
110+
## toCBORBytes
111+
112+
**Signature**
113+
114+
```ts
115+
export declare const toCBORBytes: (input: BootstrapWitness, options?: CBOR.CodecOptions) => Uint8Array
116+
```
117+
118+
## toCBORHex
119+
120+
**Signature**
121+
122+
```ts
123+
export declare const toCBORHex: (input: BootstrapWitness, options?: CBOR.CodecOptions) => string
124+
```

docs/pages/reference/modules/BoundedBytes.mdx

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

docs/pages/reference/modules/ByronAddress.mdx

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

docs/pages/reference/modules/Bytes.mdx

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

docs/pages/reference/modules/Bytes128.mdx

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

docs/pages/reference/modules/Bytes16.mdx

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

docs/pages/reference/modules/Bytes29.mdx

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

0 commit comments

Comments
 (0)