capdata

package
v0.0.0-...-2ca7ea6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeSerializedCapdata

func DecodeSerializedCapdata(
	serializedCapdata string,
	transformations CapdataValueTransformations,
) (interface{}, error)

DecodeSerializedCapdata accepts JSON text representing encoded CapData and decodes it, applying specified transformations for values that otherwise hinder interchange.

func JsonMarshal

func JsonMarshal(val any) ([]byte, error)

JsonMarshal returns JSON text representing its input, without special replacement of "<", ">", "&", U+2028, or U+2029.

Types

type Capdata

type Capdata struct {
	Body  string        `json:"body"`
	Slots []interface{} `json:"slots"`
}

type CapdataBigint

type CapdataBigint struct {
	Normalized string
}

func NewCapdataBigint

func NewCapdataBigint(str string) *CapdataBigint

type CapdataRemotable

type CapdataRemotable struct {
	Id             interface{}
	Iface          *string
	Representation interface{}
}

func (*CapdataRemotable) MarshalJSON

func (r *CapdataRemotable) MarshalJSON() ([]byte, error)

type CapdataValueTransformations

type CapdataValueTransformations struct {
	Bigint    func(*CapdataBigint) interface{}
	Remotable func(*CapdataRemotable) interface{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL