|
| 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 | +``` |
0 commit comments