Anchor.ts
Anchor overview
Table of contents
arbitrary
arbitrary
FastCheck arbitrary for Anchor instances.
Signature
export declare const arbitrary: FastCheck.Arbitrary<Anchor>Added in v2.0.0
encoding
toCBORBytes
Convert an Anchor to CBOR bytes.
Signature
export declare const toCBORBytes: (anchor: Anchor, options?: CBOR.CodecOptions) => Uint8ArrayAdded in v2.0.0
toCBORHex
Convert an Anchor to CBOR hex string.
Signature
export declare const toCBORHex: (anchor: Anchor, options?: CBOR.CodecOptions) => stringAdded in v2.0.0
parsing
fromCBORBytes
Parse an Anchor from CBOR bytes.
Signature
export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => AnchorAdded in v2.0.0
fromCBORHex
Parse an Anchor from CBOR hex string.
Signature
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => AnchorAdded in v2.0.0
schemas
Anchor (class)
Schema for Anchor representing an anchor with URL and data hash.
anchor = [anchor_url: url, anchor_data_hash: Bytes32]Signature
export declare class AnchorAdded in v2.0.0
toJSON (method)
Signature
toJSON()toString (method)
Signature
toString(): string[Inspectable.NodeInspectSymbol] (method)
Signature
[Inspectable.NodeInspectSymbol](): unknown[Equal.symbol] (method)
Signature
[Equal.symbol](that: unknown): boolean[Hash.symbol] (method)
Signature
[Hash.symbol](): numberFromCBORBytes
CBOR bytes transformation schema for Anchor.
Signature
export declare const FromCBORBytes: (
options?: CBOR.CodecOptions
) => Schema.transform<
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
never
>,
Schema.transform<
Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
Schema.SchemaClass<Anchor, Anchor, never>
>
>Added in v2.0.0
FromCBORHex
CBOR hex transformation schema for Anchor.
Signature
export declare const FromCBORHex: (
options?: CBOR.CodecOptions
) => Schema.transform<
Schema.Schema<Uint8Array, string, never>,
Schema.transform<
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
never
>,
Schema.transform<
Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
Schema.SchemaClass<Anchor, Anchor, never>
>
>
>Added in v2.0.0
FromCDDL
CDDL schema for Anchor as tuple structure.
anchor = [anchor_url: url, anchor_data_hash: Bytes32]Signature
export declare const FromCDDL: Schema.transform<
Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
Schema.SchemaClass<Anchor, Anchor, never>
>Added in v2.0.0
utils
CDDLSchema
Signature
export declare const CDDLSchema: Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>