From e95301c429a346c1b54e9a9117244999a773980f Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 08:20:31 +0000 Subject: [PATCH 01/15] Add inventory item support for claims --- lns.go | 27 ++++++++++ pkg/primitives/claim.go | 13 +++++ pkg/primitives/claim_test.go | 13 +++++ pkg/primitives/invitem.go | 96 ++++++++++++++++++++++++++++++++++ pkg/primitives/invitem_test.go | 45 ++++++++++++++++ 5 files changed, 194 insertions(+) create mode 100644 pkg/primitives/invitem.go create mode 100644 pkg/primitives/invitem_test.go diff --git a/lns.go b/lns.go index 261f407..a6ba3c2 100644 --- a/lns.go +++ b/lns.go @@ -1219,6 +1219,12 @@ type NameUndoEntry = primitives.NameUndoEntry // Claim mirrors the raw ownership-proof claim wrapper from pkg/primitives. type Claim = primitives.Claim +// InvItem mirrors the inventory item wrapper from pkg/primitives. +type InvItem = primitives.InvItem + +// InvType mirrors the inventory item type tag from pkg/primitives. +type InvType = primitives.InvType + // NameStateJSON mirrors the primitive JSON representation for a name state. type NameStateJSON = primitives.NameStateJSON @@ -1254,6 +1260,17 @@ const ( NameStateRevoked = primitives.NameStateRevoked ) +// Inventory item constants mirror pkg/primitives so callers can keep using the +// top-level lns package for common network wrappers. +const ( + InvTypeTX = primitives.InvTypeTX + InvTypeBlock = primitives.InvTypeBlock + InvTypeFilteredBlock = primitives.InvTypeFilteredBlock + InvTypeCompactBlock = primitives.InvTypeCompactBlock + InvTypeClaim = primitives.InvTypeClaim + InvTypeAirdrop = primitives.InvTypeAirdrop +) + // NewClaim constructs an empty claim wrapper. func NewClaim() *Claim { return primitives.NewClaim() @@ -1264,6 +1281,16 @@ func GetNewClaim() *Claim { return NewClaim() } +// NewInvItem constructs an inventory item wrapper. +func NewInvItem(t InvType, hash primitives.Hash) *InvItem { + return primitives.NewInvItem(t, hash) +} + +// GetNewInvItem is an alias for NewInvItem. +func GetNewInvItem(t InvType, hash primitives.Hash) *InvItem { + return NewInvItem(t, hash) +} + // NewOutpoint returns the null outpoint used by coinbase inputs and empty // name-state owner references. func NewOutpoint() Outpoint { diff --git a/pkg/primitives/claim.go b/pkg/primitives/claim.go index 44fbc14..695e34e 100644 --- a/pkg/primitives/claim.go +++ b/pkg/primitives/claim.go @@ -94,6 +94,19 @@ func (c Claim) GetVirtualSize() int { return c.VirtualSize() } +// ToInv converts the claim blob into a claim inventory item. +func (c Claim) ToInv() InvItem { + return InvItem{ + Type: InvTypeClaim, + Hash: c.Hash(), + } +} + +// GetToInv is an alias for ToInv. +func (c Claim) GetToInv() InvItem { + return c.ToInv() +} + // MarshalBinary serializes the claim wrapper. func (c Claim) MarshalBinary() ([]byte, error) { if len(c.Blob) > maxClaimSize { diff --git a/pkg/primitives/claim_test.go b/pkg/primitives/claim_test.go index 9f595bf..5399170 100644 --- a/pkg/primitives/claim_test.go +++ b/pkg/primitives/claim_test.go @@ -52,6 +52,19 @@ func TestClaimHelpers(t *testing.T) { t.Fatalf("GetVirtualSize() = %d, want %d", got, claim.VirtualSize()) } + inv := claim.ToInv() + if inv.Type != InvTypeClaim { + t.Fatalf("ToInv().Type = %d, want %d", inv.Type, InvTypeClaim) + } + + if inv.Hash != wantHash { + t.Fatalf("ToInv().Hash = %x, want %x", inv.Hash, wantHash) + } + + if got := claim.GetToInv(); got != inv { + t.Fatalf("GetToInv() = %+v, want %+v", got, inv) + } + if got := claim.ToBlob(); string(got) != string(blob) { t.Fatalf("ToBlob() = %q, want %q", got, blob) } diff --git a/pkg/primitives/invitem.go b/pkg/primitives/invitem.go new file mode 100644 index 0000000..3234a81 --- /dev/null +++ b/pkg/primitives/invitem.go @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import ( + "encoding/binary" + "fmt" +) + +// InvType identifies a payload type in an inventory item. +type InvType uint32 + +const ( + // InvTypeTX identifies a transaction inventory item. + InvTypeTX InvType = 1 + + // InvTypeBlock identifies a block inventory item. + InvTypeBlock InvType = 2 + + // InvTypeFilteredBlock identifies a filtered block inventory item. + InvTypeFilteredBlock InvType = 3 + + // InvTypeCompactBlock identifies a compact block inventory item. + InvTypeCompactBlock InvType = 4 + + // InvTypeClaim identifies a claim inventory item. + InvTypeClaim InvType = 5 + + // InvTypeAirdrop identifies an airdrop proof inventory item. + InvTypeAirdrop InvType = 6 +) + +// InvItem mirrors the JS inventory wrapper used for network advertisements. +type InvItem struct { + Type InvType + Hash Hash +} + +// NewInvItem constructs an inventory item with the provided type and hash. +func NewInvItem(t InvType, hash Hash) *InvItem { + return &InvItem{Type: t, Hash: hash} +} + +// GetNewInvItem is an alias for NewInvItem. +func GetNewInvItem(t InvType, hash Hash) *InvItem { + return NewInvItem(t, hash) +} + +// GetSize returns the serialized size of the inventory item. +func (i InvItem) GetSize() int { + return 36 +} + +// MarshalBinary serializes the inventory item. +func (i InvItem) MarshalBinary() ([]byte, error) { + buf := make([]byte, i.GetSize()) + binary.LittleEndian.PutUint32(buf[:4], uint32(i.Type)) + copy(buf[4:], i.Hash[:]) + return buf, nil +} + +// UnmarshalBinary decodes the inventory item. +func (i *InvItem) UnmarshalBinary(data []byte) error { + if len(data) != i.GetSize() { + return fmt.Errorf("primitives.InvItem.UnmarshalBinary: invalid length") + } + + i.Type = InvType(binary.LittleEndian.Uint32(data[:4])) + copy(i.Hash[:], data[4:]) + return nil +} + +// IsBlock reports whether the inventory item represents a block. +func (i InvItem) IsBlock() bool { + switch i.Type { + case InvTypeBlock, InvTypeFilteredBlock, InvTypeCompactBlock: + return true + default: + return false + } +} + +// IsTX reports whether the inventory item represents a transaction. +func (i InvItem) IsTX() bool { + return i.Type == InvTypeTX +} + +// IsClaim reports whether the inventory item represents a claim. +func (i InvItem) IsClaim() bool { + return i.Type == InvTypeClaim +} + +// IsAirdrop reports whether the inventory item represents an airdrop proof. +func (i InvItem) IsAirdrop() bool { + return i.Type == InvTypeAirdrop +} diff --git a/pkg/primitives/invitem_test.go b/pkg/primitives/invitem_test.go new file mode 100644 index 0000000..96e0cfd --- /dev/null +++ b/pkg/primitives/invitem_test.go @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import ( + "encoding/binary" + "testing" +) + +func TestInvItemHelpers(t *testing.T) { + var hash Hash + hash[0] = 0xaa + hash[31] = 0x55 + + item := NewInvItem(InvTypeClaim, hash) + if item == nil { + t.Fatal("NewInvItem should return a value") + } + + if got := item.GetSize(); got != 36 { + t.Fatalf("GetSize() = %d, want 36", got) + } + + if !item.IsClaim() || item.IsTX() || item.IsBlock() || item.IsAirdrop() { + t.Fatal("inventory type predicates should match the claim type") + } + + raw, err := item.MarshalBinary() + if err != nil { + t.Fatalf("MarshalBinary returned error: %v", err) + } + + if got := binary.LittleEndian.Uint32(raw[:4]); got != uint32(InvTypeClaim) { + t.Fatalf("MarshalBinary type = %d, want %d", got, InvTypeClaim) + } + + var decoded InvItem + if err := decoded.UnmarshalBinary(raw); err != nil { + t.Fatalf("UnmarshalBinary returned error: %v", err) + } + + if decoded.Type != item.Type || decoded.Hash != item.Hash { + t.Fatalf("decoded inventory item = %+v, want %+v", decoded, item) + } +} -- 2.45.3 From a6e30edfaf51c2e078e5937634a5b2755f0cc597 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 08:27:15 +0000 Subject: [PATCH 02/15] fix dns tld ds answers --- pkg/dns/resource.go | 11 +++++++---- pkg/dns/resource_test.go | 27 +++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/pkg/dns/resource.go b/pkg/dns/resource.go index 2876a18..3b5964f 100644 --- a/pkg/dns/resource.go +++ b/pkg/dns/resource.go @@ -574,8 +574,9 @@ func (r *Resource) GetToReferral(name string, typ HSType, isTLD bool) DNSMessage // ToDNS projects the resource into the JS reference DNS response shape. // // Subdomain lookups are routed to the appropriate TLD referral. TLD TXT -// lookups answer directly when the resource has no NS records; DS lookups and -// all other cases fall through to the referral/negative-answer logic. +// lookups answer directly when the resource has no NS records; DS lookups +// answer authoritatively when DS records are present. All other cases fall +// through to the referral/negative-answer logic. func (r *Resource) ToDNS(name string, typ HSType) DNSMessage { name = fqdn(strings.ToLower(name)) labels := strings.Split(strings.TrimSuffix(name, "."), ".") @@ -593,8 +594,10 @@ func (r *Resource) ToDNS(name string, typ HSType) DNSMessage { } } case HSTypeDS: - // DS TLD lookups intentionally fall through to the referral/negative - // proof path to match the JS reference helper. + msg.AA = true + for _, record := range r.ToDS(name) { + msg.Answer = append(msg.Answer, record) + } } if len(msg.Answer) == 0 && len(msg.Authority) == 0 { diff --git a/pkg/dns/resource_test.go b/pkg/dns/resource_test.go index fbb435c..25ef1e9 100644 --- a/pkg/dns/resource_test.go +++ b/pkg/dns/resource_test.go @@ -533,7 +533,10 @@ func TestResourceToDNSAndReferral(t *testing.T) { t.Fatal("GetToReferral should alias ToReferral") } - negative := resource.ToDNS("example.", HSTypeDS) + txtResource := NewResource() + txtResource.Records = []ResourceRecord{TXTRecord{Entries: []string{"hello"}}} + + negative := txtResource.ToDNS("example.", HSTypeDS) if !negative.AA { t.Fatal("ToDNS should set AA for a TLD DS negative proof") } @@ -547,9 +550,6 @@ func TestResourceToDNSAndReferral(t *testing.T) { t.Fatalf("ToDNS authority[0] = %#v, want NSEC example./example\\x00.", negative.Authority[0]) } - txtResource := NewResource() - txtResource.Records = []ResourceRecord{TXTRecord{Entries: []string{"hello"}}} - answer := txtResource.ToDNS("example.", HSTypeTXT) if !answer.AA { t.Fatal("ToDNS should set AA for an in-zone TXT answer") @@ -568,6 +568,25 @@ func TestResourceToDNSAndReferral(t *testing.T) { if aliasAnswer.AA != answer.AA || len(aliasAnswer.Answer) != len(answer.Answer) || len(aliasAnswer.Authority) != len(answer.Authority) || len(aliasAnswer.Additional) != len(answer.Additional) { t.Fatal("GetToDNS should alias ToDNS") } + + dsAnswer := resource.ToDNS("example.", HSTypeDS) + if !dsAnswer.AA { + t.Fatal("ToDNS should set AA for an in-zone DS answer") + } + if len(dsAnswer.Answer) != 1 { + t.Fatalf("ToDNS DS answer = %d, want 1", len(dsAnswer.Answer)) + } + if ds, ok := dsAnswer.Answer[0].(DSRecord); !ok || ds.KeyTag != 7 || ds.Algorithm != 8 || ds.DigestType != 9 || !bytes.Equal(ds.Digest, []byte{0xaa}) { + t.Fatalf("ToDNS DS answer[0] = %#v, want DS keyTag=7", dsAnswer.Answer[0]) + } + if len(dsAnswer.Authority) != 0 || len(dsAnswer.Additional) != 0 { + t.Fatalf("ToDNS DS answer should not populate authority/additional, got %+v", dsAnswer) + } + + aliasDSAnswer := resource.GetToDNS("example.", HSTypeDS) + if aliasDSAnswer.AA != dsAnswer.AA || len(aliasDSAnswer.Answer) != len(dsAnswer.Answer) || len(aliasDSAnswer.Authority) != len(dsAnswer.Authority) || len(aliasDSAnswer.Additional) != len(dsAnswer.Additional) { + t.Fatal("GetToDNS should alias ToDNS for DS answers") + } } func TestResourceDecodeStopsAtUnknownType(t *testing.T) { -- 2.45.3 From d2da43f7e8b40aaf2d8d49da04ef18d877999548 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 08:44:58 +0000 Subject: [PATCH 03/15] feat(dns): add record accessors --- pkg/dns/nsec.go | 20 ++++++++++++++++++++ pkg/dns/nsec_test.go | 22 ++++++++++++++++++++++ pkg/dns/resource.go | 18 ++++++++++++++++++ pkg/dns/resource_test.go | 8 ++++++++ 4 files changed, 68 insertions(+) diff --git a/pkg/dns/nsec.go b/pkg/dns/nsec.go index 3625910..3f76b1d 100644 --- a/pkg/dns/nsec.go +++ b/pkg/dns/nsec.go @@ -16,6 +16,26 @@ type NSECRecord struct { TTL int } +// GetName returns the owner name. +func (r NSECRecord) GetName() string { + return r.Name +} + +// GetNextDomain returns the canonical successor name. +func (r NSECRecord) GetNextDomain() string { + return r.NextDomain +} + +// GetTypeBitmap returns a copy of the NSEC type bitmap. +func (r NSECRecord) GetTypeBitmap() []byte { + return append([]byte(nil), r.TypeBitmap...) +} + +// GetTTL returns the record TTL. +func (r NSECRecord) GetTTL() int { + return r.TTL +} + // Create constructs a reference NSEC record container. // // name := Create(".", NextName("."), TYPE_MAP_ROOT) diff --git a/pkg/dns/nsec_test.go b/pkg/dns/nsec_test.go index a789644..4802245 100644 --- a/pkg/dns/nsec_test.go +++ b/pkg/dns/nsec_test.go @@ -33,10 +33,32 @@ func TestNSECRecordHelpers(t *testing.T) { t.Fatalf("Create bitmap = %x, want %x", rr.TypeBitmap, bitmap) } + if rr.GetName() != rr.Name { + t.Fatalf("GetName() = %q, want %q", rr.GetName(), rr.Name) + } + + if rr.GetNextDomain() != rr.NextDomain { + t.Fatalf("GetNextDomain() = %q, want %q", rr.GetNextDomain(), rr.NextDomain) + } + + if rr.GetTTL() != rr.TTL { + t.Fatalf("GetTTL() = %d, want %d", rr.GetTTL(), rr.TTL) + } + + if !bytes.Equal(rr.GetTypeBitmap(), rr.TypeBitmap) { + t.Fatalf("GetTypeBitmap() = %x, want %x", rr.GetTypeBitmap(), rr.TypeBitmap) + } + bitmap[0] = 0xff if rr.TypeBitmap[0] != 0x01 { t.Fatal("Create should copy the type bitmap") } + + clone := rr.GetTypeBitmap() + clone[0] = 0xff + if rr.TypeBitmap[0] != 0x01 { + t.Fatal("GetTypeBitmap should return a copy") + } } func TestNextName(t *testing.T) { diff --git a/pkg/dns/resource.go b/pkg/dns/resource.go index 3b5964f..e389cbc 100644 --- a/pkg/dns/resource.go +++ b/pkg/dns/resource.go @@ -30,6 +30,24 @@ type Resource struct { Records []ResourceRecord } +// GetTTL returns the resource TTL. +func (r *Resource) GetTTL() int { + if r == nil { + return 0 + } + + return r.TTL +} + +// GetRecords returns the resource records. +func (r *Resource) GetRecords() []ResourceRecord { + if r == nil { + return nil + } + + return r.Records +} + // ResourceJSON represents the JSON form of a DNS resource. type ResourceJSON struct { Records []json.RawMessage `json:"records"` diff --git a/pkg/dns/resource_test.go b/pkg/dns/resource_test.go index 25ef1e9..6bb4a83 100644 --- a/pkg/dns/resource_test.go +++ b/pkg/dns/resource_test.go @@ -248,6 +248,14 @@ func TestResourceTypeHelpers(t *testing.T) { if !resource.HasDS() || !resource.GetHasDS() { t.Fatal("HasDS should report DS records") } + + if got := resource.GetTTL(); got != DEFAULT_TTL { + t.Fatalf("GetTTL() = %d, want %d", got, DEFAULT_TTL) + } + + if got := resource.GetRecords(); len(got) != len(resource.Records) { + t.Fatalf("GetRecords() = %d records, want %d", len(got), len(resource.Records)) + } } func TestResourceRecordTypeAliases(t *testing.T) { -- 2.45.3 From fc3d05c55779ad67cd6750574bc59d5ec627b3d5 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 08:47:28 +0000 Subject: [PATCH 04/15] Align PrevName with reference behavior --- pkg/dns/nsec.go | 5 +++-- pkg/dns/nsec_test.go | 11 ++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pkg/dns/nsec.go b/pkg/dns/nsec.go index 3f76b1d..f8df733 100644 --- a/pkg/dns/nsec.go +++ b/pkg/dns/nsec.go @@ -76,11 +76,12 @@ func GetNextName(tld string) string { // PrevName returns the canonical predecessor for a top-level domain name. // // The helper lowercases and trims any trailing dot before applying the -// reference ordering logic. +// reference ordering logic. Empty trimmed names are invalid, matching the +// reference helper's assertion behavior. func PrevName(tld string) string { tld = trimFQDN(strings.ToLower(tld)) if len(tld) == 0 { - return "." + panic("dns.PrevName: invalid top-level domain") } last := tld[len(tld)-1] - 1 diff --git a/pkg/dns/nsec_test.go b/pkg/dns/nsec_test.go index 4802245..19cc47b 100644 --- a/pkg/dns/nsec_test.go +++ b/pkg/dns/nsec_test.go @@ -92,7 +92,6 @@ func TestPrevName(t *testing.T) { }{ {name: "fqdn", in: "Foo-Bar.", want: "foo-baq\xff."}, {name: "label", in: "example", want: "exampld\xff."}, - {name: "root", in: ".", want: "."}, } for _, tc := range cases { @@ -105,3 +104,13 @@ func TestPrevName(t *testing.T) { } } } + +func TestPrevNameRejectsEmptyName(t *testing.T) { + defer func() { + if recover() == nil { + t.Fatal("PrevName should panic for an empty trimmed name") + } + }() + + _ = PrevName(".") +} -- 2.45.3 From 0832a0c396dffd37adc930cb5213b7ef8a645c3d Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 08:50:04 +0000 Subject: [PATCH 05/15] Align DNS zone projection order --- pkg/dns/resource.go | 4 ++-- pkg/dns/resource_test.go | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/pkg/dns/resource.go b/pkg/dns/resource.go index e389cbc..433561c 100644 --- a/pkg/dns/resource.go +++ b/pkg/dns/resource.go @@ -461,8 +461,8 @@ func (r *Resource) GetToTXT(name string) []TXTRecord { // ToZone projects the resource into zone-order records. // -// Authority-like records are emitted first in original order, with duplicate NS -// targets collapsed. Glue records for in-zone hosts are appended last. +// Records are emitted in their original order, with duplicate NS targets +// collapsed. Glue records for in-zone hosts are appended last. func (r *Resource) ToZone(name string) []ResourceRecord { if r == nil { return nil diff --git a/pkg/dns/resource_test.go b/pkg/dns/resource_test.go index 6bb4a83..b892732 100644 --- a/pkg/dns/resource_test.go +++ b/pkg/dns/resource_test.go @@ -507,6 +507,37 @@ func TestResourceProjectionHelpers(t *testing.T) { } } +func TestResourceToZonePreservesOriginalOrder(t *testing.T) { + resource := NewResource() + resource.Records = []ResourceRecord{ + TXTRecord{Entries: []string{"first"}}, + DSRecord{KeyTag: 7, Algorithm: 8, DigestType: 9, Digest: []byte{0xaa}}, + NSRecord{NS: "ns1.example."}, + GLUE4Record{NS: "ns1.example.", Address: netip.MustParseAddr("192.0.2.10")}, + } + + zone := resource.ToZone("example.") + if len(zone) != 4 { + t.Fatalf("ToZone returned %d records, want 4", len(zone)) + } + + if rr, ok := zone[0].(TXTRecord); !ok || len(rr.Entries) != 1 || rr.Entries[0] != "first" { + t.Fatalf("ToZone[0] = %#v, want TXT first", zone[0]) + } + + if rr, ok := zone[1].(DSRecord); !ok || rr.KeyTag != 7 { + t.Fatalf("ToZone[1] = %#v, want DS record", zone[1]) + } + + if rr, ok := zone[2].(NSRecord); !ok || rr.NS != "ns1.example." { + t.Fatalf("ToZone[2] = %#v, want NS ns1.example.", zone[2]) + } + + if rr, ok := zone[3].(GLUE4Record); !ok || rr.NS != "ns1.example." || rr.Address.String() != "192.0.2.10" { + t.Fatalf("ToZone[3] = %#v, want GLUE4 ns1.example./192.0.2.10", zone[3]) + } +} + func TestResourceToDNSAndReferral(t *testing.T) { resource := NewResource() resource.Records = []ResourceRecord{ -- 2.45.3 From 0e8cd77cb3e85b002f1cfbd9175e0f229ebda5e9 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 08:52:58 +0000 Subject: [PATCH 06/15] feat(dns): accept optional zone signing flag Co-Authored-By: Virgil --- pkg/dns/resource.go | 10 +++++++--- pkg/dns/resource_test.go | 10 ++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/pkg/dns/resource.go b/pkg/dns/resource.go index 433561c..40e6093 100644 --- a/pkg/dns/resource.go +++ b/pkg/dns/resource.go @@ -463,7 +463,11 @@ func (r *Resource) GetToTXT(name string) []TXTRecord { // // Records are emitted in their original order, with duplicate NS targets // collapsed. Glue records for in-zone hosts are appended last. -func (r *Resource) ToZone(name string) []ResourceRecord { +// +// The optional sign flag is accepted for API parity with the JS reference. The +// simplified Go DNS layer does not emit RRSIG records, so the flag currently +// preserves the unmodified RRset. +func (r *Resource) ToZone(name string, sign ...bool) []ResourceRecord { if r == nil { return nil } @@ -544,8 +548,8 @@ func (r *Resource) ToZone(name string) []ResourceRecord { } // GetToZone is an alias for ToZone. -func (r *Resource) GetToZone(name string) []ResourceRecord { - return r.ToZone(name) +func (r *Resource) GetToZone(name string, sign ...bool) []ResourceRecord { + return r.ToZone(name, sign...) } // ToReferral builds the referral/negative-answer message shape used by the JS diff --git a/pkg/dns/resource_test.go b/pkg/dns/resource_test.go index b892732..ee9e450 100644 --- a/pkg/dns/resource_test.go +++ b/pkg/dns/resource_test.go @@ -489,6 +489,16 @@ func TestResourceProjectionHelpers(t *testing.T) { t.Fatalf("GetToZone returned %d records, want %d", len(aliasZone), len(zone)) } + signedZone := resource.ToZone("example.", true) + if len(signedZone) != len(zone) { + t.Fatalf("ToZone(..., true) returned %d records, want %d", len(signedZone), len(zone)) + } + + signedAliasZone := resource.GetToZone("example.", true) + if len(signedAliasZone) != len(zone) { + t.Fatalf("GetToZone(..., true) returned %d records, want %d", len(signedAliasZone), len(zone)) + } + var nilResource *Resource if got := nilResource.ToNS("example."); got != nil { t.Fatalf("nil ToNS = %#v, want nil", got) -- 2.45.3 From a7ca2d706cd8148494e0488d79a04802cc6bdd00 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 08:57:39 +0000 Subject: [PATCH 07/15] feat(dns): add record field accessors --- pkg/dns/resource.go | 31 ++++++++++++++++++++++ pkg/dns/resource_test.go | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/pkg/dns/resource.go b/pkg/dns/resource.go index 40e6093..f5bed01 100644 --- a/pkg/dns/resource.go +++ b/pkg/dns/resource.go @@ -182,6 +182,20 @@ func (DSRecord) Type() HSType { return HSTypeDS } // GetType is an alias for Type. func (r DSRecord) GetType() HSType { return r.Type() } +// GetKeyTag returns the DS key tag. +func (r DSRecord) GetKeyTag() uint16 { return r.KeyTag } + +// GetAlgorithm returns the DS algorithm. +func (r DSRecord) GetAlgorithm() uint8 { return r.Algorithm } + +// GetDigestType returns the DS digest type. +func (r DSRecord) GetDigestType() uint8 { return r.DigestType } + +// GetDigest returns a copy of the DS digest. +func (r DSRecord) GetDigest() []byte { + return append([]byte(nil), r.Digest...) +} + // Type returns the DNS record type. func (NSRecord) Type() HSType { return HSTypeNS } @@ -197,6 +211,9 @@ func (GLUE4Record) Type() HSType { return HSTypeGLUE4 } // GetType is an alias for Type. func (r GLUE4Record) GetType() HSType { return r.Type() } +// GetAddress returns the IPv4 glue address. +func (r GLUE4Record) GetAddress() netip.Addr { return r.Address } + // GetNS is an alias for the NS field accessor. func (r GLUE4Record) GetNS() string { return r.NS } @@ -206,6 +223,9 @@ func (GLUE6Record) Type() HSType { return HSTypeGLUE6 } // GetType is an alias for Type. func (r GLUE6Record) GetType() HSType { return r.Type() } +// GetAddress returns the IPv6 glue address. +func (r GLUE6Record) GetAddress() netip.Addr { return r.Address } + // GetNS is an alias for the NS field accessor. func (r GLUE6Record) GetNS() string { return r.NS } @@ -215,6 +235,9 @@ func (SYNTH4Record) Type() HSType { return HSTypeSYNTH4 } // GetType is an alias for Type. func (r SYNTH4Record) GetType() HSType { return r.Type() } +// GetAddress returns the synthesized IPv4 address. +func (r SYNTH4Record) GetAddress() netip.Addr { return r.Address } + // GetNS is an alias for NS. func (r SYNTH4Record) GetNS() string { return r.NS() } @@ -224,6 +247,9 @@ func (SYNTH6Record) Type() HSType { return HSTypeSYNTH6 } // GetType is an alias for Type. func (r SYNTH6Record) GetType() HSType { return r.Type() } +// GetAddress returns the synthesized IPv6 address. +func (r SYNTH6Record) GetAddress() netip.Addr { return r.Address } + // GetNS is an alias for NS. func (r SYNTH6Record) GetNS() string { return r.NS() } @@ -233,6 +259,11 @@ func (TXTRecord) Type() HSType { return HSTypeTXT } // GetType is an alias for Type. func (r TXTRecord) GetType() HSType { return r.Type() } +// GetEntries returns a copy of the TXT entries. +func (r TXTRecord) GetEntries() []string { + return append([]string(nil), r.Entries...) +} + // NS returns the synthesized target host for a SYNTH4 record. func (r SYNTH4Record) NS() string { if !r.Address.Is4() { diff --git a/pkg/dns/resource_test.go b/pkg/dns/resource_test.go index ee9e450..d0a169a 100644 --- a/pkg/dns/resource_test.go +++ b/pkg/dns/resource_test.go @@ -4,6 +4,7 @@ package dns import ( "bytes" + "reflect" "strings" "testing" @@ -350,6 +351,62 @@ func TestResourceRecordNSAliases(t *testing.T) { } } +func TestResourceRecordFieldAccessors(t *testing.T) { + ds := DSRecord{ + KeyTag: 11, + Algorithm: 12, + DigestType: 13, + Digest: []byte{0xaa, 0xbb}, + } + if ds.GetKeyTag() != ds.KeyTag { + t.Fatalf("GetKeyTag() = %d, want %d", ds.GetKeyTag(), ds.KeyTag) + } + if ds.GetAlgorithm() != ds.Algorithm { + t.Fatalf("GetAlgorithm() = %d, want %d", ds.GetAlgorithm(), ds.Algorithm) + } + if ds.GetDigestType() != ds.DigestType { + t.Fatalf("GetDigestType() = %d, want %d", ds.GetDigestType(), ds.DigestType) + } + if got := ds.GetDigest(); !bytes.Equal(got, ds.Digest) { + t.Fatalf("GetDigest() = %x, want %x", got, ds.Digest) + } + gotDigest := ds.GetDigest() + gotDigest[0] = 0xff + if ds.Digest[0] != 0xaa { + t.Fatal("GetDigest should return a copy") + } + + glue4 := GLUE4Record{NS: "ns1.example.", Address: netip.MustParseAddr("192.0.2.1")} + if glue4.GetAddress().String() != glue4.Address.String() { + t.Fatalf("GLUE4 GetAddress() = %v, want %v", glue4.GetAddress(), glue4.Address) + } + + glue6 := GLUE6Record{NS: "ns2.example.", Address: netip.MustParseAddr("2001:db8::1")} + if glue6.GetAddress().String() != glue6.Address.String() { + t.Fatalf("GLUE6 GetAddress() = %v, want %v", glue6.GetAddress(), glue6.Address) + } + + synth4 := SYNTH4Record{Address: netip.MustParseAddr("198.51.100.9")} + if synth4.GetAddress().String() != synth4.Address.String() { + t.Fatalf("SYNTH4 GetAddress() = %v, want %v", synth4.GetAddress(), synth4.Address) + } + + synth6 := SYNTH6Record{Address: netip.MustParseAddr("2001:db8::9")} + if synth6.GetAddress().String() != synth6.Address.String() { + t.Fatalf("SYNTH6 GetAddress() = %v, want %v", synth6.GetAddress(), synth6.Address) + } + + txt := TXTRecord{Entries: []string{"hello", "world"}} + if got := txt.GetEntries(); !reflect.DeepEqual(got, txt.Entries) { + t.Fatalf("GetEntries() = %#v, want %#v", got, txt.Entries) + } + gotEntries := txt.GetEntries() + gotEntries[0] = "changed" + if txt.Entries[0] != "hello" { + t.Fatal("GetEntries should return a copy") + } +} + func TestResourceToNSEC(t *testing.T) { cases := []struct { name string -- 2.45.3 From 4b315bc3437a63ad00d765c42bacde476f408ad6 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 09:00:19 +0000 Subject: [PATCH 08/15] feat(dns): validate resource json records --- pkg/dns/resource.go | 28 ++++++++++++++++++++++++++++ pkg/dns/resource_test.go | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/pkg/dns/resource.go b/pkg/dns/resource.go index f5bed01..4133acf 100644 --- a/pkg/dns/resource.go +++ b/pkg/dns/resource.go @@ -1136,6 +1136,9 @@ func (r *DSRecord) FromJSON(jsonView DSRecordJSON) error { if err != nil { return core.E("dns.DSRecord.FromJSON", "invalid digest encoding", err) } + if len(raw) > 255 { + return core.E("dns.DSRecord.FromJSON", "digest exceeds maximum size", nil) + } r.KeyTag = jsonView.KeyTag r.Algorithm = jsonView.Algorithm @@ -1157,6 +1160,9 @@ func (r *NSRecord) FromJSON(jsonView NSRecordJSON) error { if jsonView.Type != "NS" { return core.E("dns.NSRecord.FromJSON", "invalid NS record type", nil) } + if err := validateDNSName(jsonView.NS); err != nil { + return core.E("dns.NSRecord.FromJSON", "invalid ns name", err) + } r.NS = jsonView.NS return nil @@ -1176,6 +1182,9 @@ func (r *GLUE4Record) FromJSON(jsonView GLUE4RecordJSON) error { if jsonView.Type != "GLUE4" { return core.E("dns.GLUE4Record.FromJSON", "invalid GLUE4 record type", nil) } + if err := validateDNSName(jsonView.NS); err != nil { + return core.E("dns.GLUE4Record.FromJSON", "invalid ns name", err) + } addr, err := netip.ParseAddr(jsonView.Address) if err != nil || !addr.Is4() { @@ -1201,6 +1210,9 @@ func (r *GLUE6Record) FromJSON(jsonView GLUE6RecordJSON) error { if jsonView.Type != "GLUE6" { return core.E("dns.GLUE6Record.FromJSON", "invalid GLUE6 record type", nil) } + if err := validateDNSName(jsonView.NS); err != nil { + return core.E("dns.GLUE6Record.FromJSON", "invalid ns name", err) + } addr, err := netip.ParseAddr(jsonView.Address) if err != nil || !addr.Is6() { @@ -1271,11 +1283,27 @@ func (r *TXTRecord) FromJSON(jsonView TXTRecordJSON) error { if jsonView.Type != "TXT" { return core.E("dns.TXTRecord.FromJSON", "invalid TXT record type", nil) } + for _, entry := range jsonView.Entries { + if len(entry) > 255 { + return core.E("dns.TXTRecord.FromJSON", "txt entry exceeds maximum size", nil) + } + } r.Entries = append(r.Entries[:0], jsonView.Entries...) return nil } +func validateDNSName(name string) error { + var buf bytes.Buffer + if err := writeName(&buf, name); err != nil { + return err + } + if buf.Len() > 255 { + return errors.New("dns name exceeds maximum size") + } + return nil +} + func encodeRecord(buf *bytes.Buffer, record ResourceRecord) error { switch rr := record.(type) { case DSRecord: diff --git a/pkg/dns/resource_test.go b/pkg/dns/resource_test.go index d0a169a..99de1fe 100644 --- a/pkg/dns/resource_test.go +++ b/pkg/dns/resource_test.go @@ -4,6 +4,7 @@ package dns import ( "bytes" + "encoding/json" "reflect" "strings" "testing" @@ -12,6 +13,44 @@ import ( "net/netip" ) +func TestResourceFromJSONRejectsInvalidRecords(t *testing.T) { + tooLongDigest := strings.Repeat("aa", 256) + tooLongTXT := strings.Repeat("a", 256) + tooLongLabel := strings.Repeat("a", covenant.MaxNameSize+1) + ".example." + tooLongName := strings.Repeat("a.", 128) + + tests := []struct { + name string + raw string + }{ + { + name: "oversized ds digest", + raw: `{"type":"DS","keyTag":1,"algorithm":2,"digestType":3,"digest":"` + tooLongDigest + `"}`, + }, + { + name: "invalid ns label", + raw: `{"type":"NS","ns":"` + tooLongLabel + `"}`, + }, + { + name: "oversized ns name", + raw: `{"type":"GLUE4","ns":"` + tooLongName + `","address":"192.0.2.1"}`, + }, + { + name: "oversized txt entry", + raw: `{"type":"TXT","txt":["` + tooLongTXT + `"]}`, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + var resource Resource + if err := resource.FromJSON(ResourceJSON{Records: []json.RawMessage{json.RawMessage(tc.raw)}}); err == nil { + t.Fatal("FromJSON should reject invalid record JSON") + } + }) + } +} + func TestResourceEncodeDecodeRoundTrip(t *testing.T) { resource := NewResource() resource.Records = []ResourceRecord{ -- 2.45.3 From 8b1dfb01297839209787887587617c38c3b24470 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 09:08:58 +0000 Subject: [PATCH 09/15] Add dns type-table aliases --- pkg/dns/common.go | 10 ++++++++++ pkg/dns/common_test.go | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/pkg/dns/common.go b/pkg/dns/common.go index 21e15ba..541cef1 100644 --- a/pkg/dns/common.go +++ b/pkg/dns/common.go @@ -90,6 +90,13 @@ var HSTypes = map[string]HSType{ "TXT": HSTypeTXT, } +// hsTypes mirrors the JS export name used by the DNS reference helpers. +// +// The Go package keeps the canonical HSTypes identifier as well, but the +// lowercase alias makes the reference shape available to same-package callers +// and test coverage. +var hsTypes = HSTypes + // HSTypesByVal mirrors the JS hsTypesByVal reverse lookup table. var HSTypesByVal = map[HSType]string{ HSTypeDS: "DS", @@ -101,6 +108,9 @@ var HSTypesByVal = map[HSType]string{ HSTypeTXT: "TXT", } +// hsTypesByVal mirrors the JS export name used by the DNS reference helpers. +var hsTypesByVal = HSTypesByVal + // GetHSTypes returns the DNS record-type lookup table. func GetHSTypes() map[string]HSType { return HSTypes diff --git a/pkg/dns/common_test.go b/pkg/dns/common_test.go index eb4793c..b666871 100644 --- a/pkg/dns/common_test.go +++ b/pkg/dns/common_test.go @@ -4,6 +4,7 @@ package dns import ( "bytes" + "reflect" "testing" ) @@ -77,6 +78,14 @@ func TestHSTypesTables(t *testing.T) { t.Fatal("GetHSTypesByVal should alias HSTypesByVal") } + if reflect.ValueOf(hsTypes).Pointer() != reflect.ValueOf(HSTypes).Pointer() { + t.Fatal("hsTypes should alias HSTypes") + } + + if reflect.ValueOf(hsTypesByVal).Pointer() != reflect.ValueOf(HSTypesByVal).Pointer() { + t.Fatal("hsTypesByVal should alias HSTypesByVal") + } + cases := []struct { name string got HSType -- 2.45.3 From 78503909a8d9ef65a32af98ea77e935ebaad293e Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 09:13:23 +0000 Subject: [PATCH 10/15] fix(dns): copy resource records on read Co-Authored-By: Virgil --- pkg/dns/resource.go | 2 +- pkg/dns/resource_test.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/dns/resource.go b/pkg/dns/resource.go index 4133acf..e1da64f 100644 --- a/pkg/dns/resource.go +++ b/pkg/dns/resource.go @@ -45,7 +45,7 @@ func (r *Resource) GetRecords() []ResourceRecord { return nil } - return r.Records + return append([]ResourceRecord(nil), r.Records...) } // ResourceJSON represents the JSON form of a DNS resource. diff --git a/pkg/dns/resource_test.go b/pkg/dns/resource_test.go index 99de1fe..265f70c 100644 --- a/pkg/dns/resource_test.go +++ b/pkg/dns/resource_test.go @@ -296,6 +296,12 @@ func TestResourceTypeHelpers(t *testing.T) { if got := resource.GetRecords(); len(got) != len(resource.Records) { t.Fatalf("GetRecords() = %d records, want %d", len(got), len(resource.Records)) } + + gotRecords := resource.GetRecords() + gotRecords[0] = nil + if resource.Records[0] == nil { + t.Fatal("GetRecords should return a copy of the record slice") + } } func TestResourceRecordTypeAliases(t *testing.T) { -- 2.45.3 From 18f3fa219ff68ca3214f9a5fc121439b80f0726f Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 09:16:55 +0000 Subject: [PATCH 11/15] fix(dns): require resource json fields --- pkg/dns/resource.go | 36 +++++++++++++++++++++++++++++++ pkg/dns/resource_test.go | 46 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/pkg/dns/resource.go b/pkg/dns/resource.go index e1da64f..449d018 100644 --- a/pkg/dns/resource.go +++ b/pkg/dns/resource.go @@ -1033,6 +1033,21 @@ type resourceRecordProbe struct { Type string `json:"type"` } +func requireJSONFields(raw json.RawMessage, fields ...string) error { + var obj map[string]json.RawMessage + if err := json.Unmarshal(raw, &obj); err != nil { + return err + } + + for _, field := range fields { + if _, ok := obj[field]; !ok { + return fmt.Errorf("missing required field %q", field) + } + } + + return nil +} + func resourceRecordFromJSON(raw json.RawMessage) (ResourceRecord, error) { var probe resourceRecordProbe if err := json.Unmarshal(raw, &probe); err != nil { @@ -1041,6 +1056,9 @@ func resourceRecordFromJSON(raw json.RawMessage) (ResourceRecord, error) { switch probe.Type { case "DS": + if err := requireJSONFields(raw, "keyTag", "algorithm", "digestType", "digest"); err != nil { + return nil, core.E("dns.Resource.FromJSON", "invalid DS record", err) + } var jsonRecord DSRecordJSON if err := json.Unmarshal(raw, &jsonRecord); err != nil { return nil, core.E("dns.Resource.FromJSON", "invalid DS record", err) @@ -1051,6 +1069,9 @@ func resourceRecordFromJSON(raw json.RawMessage) (ResourceRecord, error) { } return record, nil case "NS": + if err := requireJSONFields(raw, "ns"); err != nil { + return nil, core.E("dns.Resource.FromJSON", "invalid NS record", err) + } var jsonRecord NSRecordJSON if err := json.Unmarshal(raw, &jsonRecord); err != nil { return nil, core.E("dns.Resource.FromJSON", "invalid NS record", err) @@ -1061,6 +1082,9 @@ func resourceRecordFromJSON(raw json.RawMessage) (ResourceRecord, error) { } return record, nil case "GLUE4": + if err := requireJSONFields(raw, "ns", "address"); err != nil { + return nil, core.E("dns.Resource.FromJSON", "invalid GLUE4 record", err) + } var jsonRecord GLUE4RecordJSON if err := json.Unmarshal(raw, &jsonRecord); err != nil { return nil, core.E("dns.Resource.FromJSON", "invalid GLUE4 record", err) @@ -1071,6 +1095,9 @@ func resourceRecordFromJSON(raw json.RawMessage) (ResourceRecord, error) { } return record, nil case "GLUE6": + if err := requireJSONFields(raw, "ns", "address"); err != nil { + return nil, core.E("dns.Resource.FromJSON", "invalid GLUE6 record", err) + } var jsonRecord GLUE6RecordJSON if err := json.Unmarshal(raw, &jsonRecord); err != nil { return nil, core.E("dns.Resource.FromJSON", "invalid GLUE6 record", err) @@ -1081,6 +1108,9 @@ func resourceRecordFromJSON(raw json.RawMessage) (ResourceRecord, error) { } return record, nil case "SYNTH4": + if err := requireJSONFields(raw, "address"); err != nil { + return nil, core.E("dns.Resource.FromJSON", "invalid SYNTH4 record", err) + } var jsonRecord SYNTH4RecordJSON if err := json.Unmarshal(raw, &jsonRecord); err != nil { return nil, core.E("dns.Resource.FromJSON", "invalid SYNTH4 record", err) @@ -1091,6 +1121,9 @@ func resourceRecordFromJSON(raw json.RawMessage) (ResourceRecord, error) { } return record, nil case "SYNTH6": + if err := requireJSONFields(raw, "address"); err != nil { + return nil, core.E("dns.Resource.FromJSON", "invalid SYNTH6 record", err) + } var jsonRecord SYNTH6RecordJSON if err := json.Unmarshal(raw, &jsonRecord); err != nil { return nil, core.E("dns.Resource.FromJSON", "invalid SYNTH6 record", err) @@ -1101,6 +1134,9 @@ func resourceRecordFromJSON(raw json.RawMessage) (ResourceRecord, error) { } return record, nil case "TXT": + if err := requireJSONFields(raw, "txt"); err != nil { + return nil, core.E("dns.Resource.FromJSON", "invalid TXT record", err) + } var jsonRecord TXTRecordJSON if err := json.Unmarshal(raw, &jsonRecord); err != nil { return nil, core.E("dns.Resource.FromJSON", "invalid TXT record", err) diff --git a/pkg/dns/resource_test.go b/pkg/dns/resource_test.go index 265f70c..3cb7528 100644 --- a/pkg/dns/resource_test.go +++ b/pkg/dns/resource_test.go @@ -51,6 +51,52 @@ func TestResourceFromJSONRejectsInvalidRecords(t *testing.T) { } } +func TestResourceFromJSONRejectsMissingRequiredFields(t *testing.T) { + tests := []struct { + name string + raw string + }{ + { + name: "ds missing digest", + raw: `{"type":"DS","keyTag":1,"algorithm":2,"digestType":3}`, + }, + { + name: "ns missing host", + raw: `{"type":"NS"}`, + }, + { + name: "glue4 missing host", + raw: `{"type":"GLUE4","address":"192.0.2.1"}`, + }, + { + name: "glue6 missing address", + raw: `{"type":"GLUE6","ns":"ns1.example."}`, + }, + { + name: "synth4 missing address", + raw: `{"type":"SYNTH4"}`, + }, + { + name: "synth6 missing address", + raw: `{"type":"SYNTH6"}`, + }, + { + name: "txt missing array", + raw: `{"type":"TXT"}`, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + var resource Resource + err := resource.FromJSON(ResourceJSON{Records: []json.RawMessage{json.RawMessage(tc.raw)}}) + if err == nil { + t.Fatal("FromJSON should reject records with missing required fields") + } + }) + } +} + func TestResourceEncodeDecodeRoundTrip(t *testing.T) { resource := NewResource() resource.Records = []ResourceRecord{ -- 2.45.3 From 0ae26637efdd745095ba7df4803f4319003388a6 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 09:22:50 +0000 Subject: [PATCH 12/15] Add file-level AX tests and examples --- internal/nameutil/name_example_test.go | 13 ++++ internal/nameutil/name_test.go | 34 +++++++++ lns_example_test.go | 11 +++ pkg/covenant/airdrop_proof_example_test.go | 12 ++++ pkg/covenant/airdrop_proof_test.go | 65 +++++++++++++++++ pkg/covenant/blind_example_test.go | 16 +++++ pkg/covenant/covenant_example_test.go | 11 +++ pkg/covenant/locked_lookup_example_test.go | 12 ++++ pkg/covenant/name_example_test.go | 10 +++ pkg/covenant/name_lookup_example_test.go | 11 +++ pkg/covenant/name_lookup_test.go | 34 +++++++++ pkg/covenant/names_example_test.go | 16 +++++ pkg/covenant/names_test.go | 63 +++++++++++++++++ pkg/covenant/reserved_lookup_example_test.go | 12 ++++ pkg/covenant/rules_example_test.go | 15 ++++ pkg/covenant/rules_extra_example_test.go | 15 ++++ pkg/covenant/rules_test.go | 42 +++++++++++ pkg/covenant/verify_example_test.go | 23 ++++++ pkg/covenant/verify_test.go | 70 +++++++++++++++++++ pkg/dns/common_example_test.go | 11 +++ pkg/dns/nsec_example_test.go | 11 +++ pkg/dns/resolve_example_test.go | 11 +++ pkg/dns/resource_example_test.go | 11 +++ pkg/primitives/claim_example_test.go | 11 +++ .../covenant_binary_example_test.go | 12 ++++ pkg/primitives/covenant_items_example_test.go | 13 ++++ pkg/primitives/covenant_json_example_test.go | 11 +++ pkg/primitives/covenant_json_test.go | 41 +++++++++++ pkg/primitives/invitem_example_test.go | 11 +++ pkg/primitives/namedelta_example_test.go | 11 +++ .../namestate_binary_example_test.go | 13 ++++ pkg/primitives/namestate_binary_test.go | 55 +++++++++++++++ pkg/primitives/namestate_example_test.go | 12 ++++ pkg/primitives/namestate_json_example_test.go | 14 ++++ pkg/primitives/namestate_json_test.go | 42 +++++++++++ .../namestate_state_example_test.go | 12 ++++ .../namestate_stats_example_test.go | 14 ++++ pkg/primitives/namestate_stats_test.go | 35 ++++++++++ pkg/primitives/outpoint_example_test.go | 10 +++ pkg/primitives/outpoint_json_example_test.go | 10 +++ pkg/primitives/outpoint_json_test.go | 35 ++++++++++ pkg/primitives/outpoint_test.go | 46 ++++++++++++ pkg/primitives/types_example_test.go | 11 +++ pkg/primitives/view_example_test.go | 13 ++++ 44 files changed, 961 insertions(+) create mode 100644 internal/nameutil/name_example_test.go create mode 100644 internal/nameutil/name_test.go create mode 100644 lns_example_test.go create mode 100644 pkg/covenant/airdrop_proof_example_test.go create mode 100644 pkg/covenant/airdrop_proof_test.go create mode 100644 pkg/covenant/blind_example_test.go create mode 100644 pkg/covenant/covenant_example_test.go create mode 100644 pkg/covenant/locked_lookup_example_test.go create mode 100644 pkg/covenant/name_example_test.go create mode 100644 pkg/covenant/name_lookup_example_test.go create mode 100644 pkg/covenant/name_lookup_test.go create mode 100644 pkg/covenant/names_example_test.go create mode 100644 pkg/covenant/names_test.go create mode 100644 pkg/covenant/reserved_lookup_example_test.go create mode 100644 pkg/covenant/rules_example_test.go create mode 100644 pkg/covenant/rules_extra_example_test.go create mode 100644 pkg/covenant/rules_test.go create mode 100644 pkg/covenant/verify_example_test.go create mode 100644 pkg/covenant/verify_test.go create mode 100644 pkg/dns/common_example_test.go create mode 100644 pkg/dns/nsec_example_test.go create mode 100644 pkg/dns/resolve_example_test.go create mode 100644 pkg/dns/resource_example_test.go create mode 100644 pkg/primitives/claim_example_test.go create mode 100644 pkg/primitives/covenant_binary_example_test.go create mode 100644 pkg/primitives/covenant_items_example_test.go create mode 100644 pkg/primitives/covenant_json_example_test.go create mode 100644 pkg/primitives/covenant_json_test.go create mode 100644 pkg/primitives/invitem_example_test.go create mode 100644 pkg/primitives/namedelta_example_test.go create mode 100644 pkg/primitives/namestate_binary_example_test.go create mode 100644 pkg/primitives/namestate_binary_test.go create mode 100644 pkg/primitives/namestate_example_test.go create mode 100644 pkg/primitives/namestate_json_example_test.go create mode 100644 pkg/primitives/namestate_json_test.go create mode 100644 pkg/primitives/namestate_state_example_test.go create mode 100644 pkg/primitives/namestate_stats_example_test.go create mode 100644 pkg/primitives/namestate_stats_test.go create mode 100644 pkg/primitives/outpoint_example_test.go create mode 100644 pkg/primitives/outpoint_json_example_test.go create mode 100644 pkg/primitives/outpoint_json_test.go create mode 100644 pkg/primitives/outpoint_test.go create mode 100644 pkg/primitives/types_example_test.go create mode 100644 pkg/primitives/view_example_test.go diff --git a/internal/nameutil/name_example_test.go b/internal/nameutil/name_example_test.go new file mode 100644 index 0000000..9fe1c49 --- /dev/null +++ b/internal/nameutil/name_example_test.go @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package nameutil + +import ( + "fmt" +) + +func ExampleCanonicalize_good() { + got, _ := Canonicalize("Example.LTHN.") + fmt.Println(got) + // Output: example +} diff --git a/internal/nameutil/name_test.go b/internal/nameutil/name_test.go new file mode 100644 index 0000000..48f3f27 --- /dev/null +++ b/internal/nameutil/name_test.go @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package nameutil + +import "testing" + +func TestNameUtil_Function_Good(t *testing.T) { + got, ok := Canonicalize("Example.LTHN.") + if !ok { + t.Fatal("Canonicalize should accept canonical names") + } + + if got != "example" { + t.Fatalf("Canonicalize() = %q, want %q", got, "example") + } +} + +func TestNameUtil_Function_Bad(t *testing.T) { + if got, ok := Canonicalize(42); ok || got != "" { + t.Fatalf("Canonicalize() = %q, %v, want empty false", got, ok) + } +} + +func TestNameUtil_Function_Ugly(t *testing.T) { + got, ok := CatalogLabel([]byte("MiXeD")) + if !ok { + t.Fatal("CatalogLabel should accept raw byte labels") + } + + if got != "MiXeD" { + t.Fatalf("CatalogLabel() = %q, want %q", got, "MiXeD") + } +} + diff --git a/lns_example_test.go b/lns_example_test.go new file mode 100644 index 0000000..285ed12 --- /dev/null +++ b/lns_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package lns + +import "fmt" + +func ExampleGetServiceName_good() { + fmt.Println(GetServiceName()) + // Output: lns +} + diff --git a/pkg/covenant/airdrop_proof_example_test.go b/pkg/covenant/airdrop_proof_example_test.go new file mode 100644 index 0000000..02b7d2d --- /dev/null +++ b/pkg/covenant/airdrop_proof_example_test.go @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import "fmt" + +func ExampletestAirdropProof_good() { + proof := testAirdropProof() + fmt.Println(proof.isSane()) + + // Output: true +} diff --git a/pkg/covenant/airdrop_proof_test.go b/pkg/covenant/airdrop_proof_test.go new file mode 100644 index 0000000..4b5f53b --- /dev/null +++ b/pkg/covenant/airdrop_proof_test.go @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import ( + "encoding/binary" + "testing" +) + +func testAirdropProof() *airdropProof { + key := make([]byte, 1+1+1+2+8+1) + key[0] = airdropKeyAddress + key[1] = 1 + key[2] = 2 + key[3] = 0xaa + key[4] = 0xbb + binary.LittleEndian.PutUint64(key[5:13], 10) + key[13] = 0xff + + return &airdropProof{ + index: 0, + proof: nil, + subindex: 0, + subproof: nil, + key: key, + version: 1, + address: []byte{0x01, 0x02}, + fee: 1, + } +} + +func TestAirdropProof_Function_Good(t *testing.T) { + proof := testAirdropProof() + if !proof.isSane() { + t.Fatal("expected proof to be sane") + } + + key, ok := proof.getKey() + if !ok { + t.Fatal("expected proof key to decode") + } + + if key.value != 10 || key.version != 1 { + t.Fatalf("unexpected key decode: %#v", key) + } +} + +func TestAirdropProof_Function_Bad(t *testing.T) { + proof := testAirdropProof() + proof.version = 32 + + if proof.isSane() { + t.Fatal("expected invalid version to fail sanity checks") + } +} + +func TestAirdropProof_Function_Ugly(t *testing.T) { + proof := testAirdropProof() + proof.key = proof.key[:len(proof.key)-1] + + if proof.isSane() { + t.Fatal("expected truncated key to fail sanity checks") + } +} + diff --git a/pkg/covenant/blind_example_test.go b/pkg/covenant/blind_example_test.go new file mode 100644 index 0000000..5f515d3 --- /dev/null +++ b/pkg/covenant/blind_example_test.go @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import ( + "fmt" + + "dappco.re/go/lns/pkg/primitives" +) + +func ExampleGetBlind_good() { + _, err := GetBlind(1000, primitives.Hash{}) + fmt.Println(err == nil) + // Output: true +} + diff --git a/pkg/covenant/covenant_example_test.go b/pkg/covenant/covenant_example_test.go new file mode 100644 index 0000000..96b9e9b --- /dev/null +++ b/pkg/covenant/covenant_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import "fmt" + +func ExampleTypeName_good() { + fmt.Println(TypeName(TypeBid)) + // Output: BID +} + diff --git a/pkg/covenant/locked_lookup_example_test.go b/pkg/covenant/locked_lookup_example_test.go new file mode 100644 index 0000000..3d03005 --- /dev/null +++ b/pkg/covenant/locked_lookup_example_test.go @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import "fmt" + +func ExampleGetLockedName_good() { + item, _ := GetLockedName("NEC") + fmt.Println(item.Name) + // Output: nec +} + diff --git a/pkg/covenant/name_example_test.go b/pkg/covenant/name_example_test.go new file mode 100644 index 0000000..df83c1c --- /dev/null +++ b/pkg/covenant/name_example_test.go @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import "fmt" + +func ExampleVerifyString_good() { + fmt.Println(VerifyString("foo")) + // Output: true +} diff --git a/pkg/covenant/name_lookup_example_test.go b/pkg/covenant/name_lookup_example_test.go new file mode 100644 index 0000000..66cd0e7 --- /dev/null +++ b/pkg/covenant/name_lookup_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import "fmt" + +func ExampleasciiLowerName_good() { + got, _ := asciiLowerName("NEC.lthn.") + fmt.Println(got) + // Output: nec +} diff --git a/pkg/covenant/name_lookup_test.go b/pkg/covenant/name_lookup_test.go new file mode 100644 index 0000000..78632ee --- /dev/null +++ b/pkg/covenant/name_lookup_test.go @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import "testing" + +func TestNameLookup_Function_Good(t *testing.T) { + got, ok := asciiLowerName("NEC.lthn.") + if !ok { + t.Fatal("asciiLowerName should accept canonical labels") + } + + if got != "nec" { + t.Fatalf("asciiLowerName() = %q, want %q", got, "nec") + } +} + +func TestNameLookup_Function_Bad(t *testing.T) { + if got, ok := asciiLowerName(""); ok || got != "" { + t.Fatalf("asciiLowerName() = %q, %v, want empty false", got, ok) + } +} + +func TestNameLookup_Function_Ugly(t *testing.T) { + long := make([]byte, maxNameSize+1) + for i := range long { + long[i] = 'a' + } + + if got, ok := asciiLowerName(string(long)); ok || got != "" { + t.Fatalf("asciiLowerName() = %q, %v, want empty false", got, ok) + } +} + diff --git a/pkg/covenant/names_example_test.go b/pkg/covenant/names_example_test.go new file mode 100644 index 0000000..3156753 --- /dev/null +++ b/pkg/covenant/names_example_test.go @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import ( + "fmt" + + "dappco.re/go/lns/pkg/primitives" +) + +func ExampleHasNames_good() { + hash := testNameHash() + tx := testNameTx(TypeOpen, hash) + fmt.Println(HasNames(tx, map[primitives.Hash]struct{}{hash: {}})) + // Output: true +} diff --git a/pkg/covenant/names_test.go b/pkg/covenant/names_test.go new file mode 100644 index 0000000..2f3ff9d --- /dev/null +++ b/pkg/covenant/names_test.go @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import ( + "testing" + + "dappco.re/go/lns/pkg/primitives" +) + +func testNameHash() primitives.Hash { + var hash primitives.Hash + hash[0] = 0x42 + return hash +} + +func testNameTx(covType CovenantType, hash primitives.Hash) primitives.Transaction { + return primitives.Transaction{ + Outputs: []primitives.Output{{ + Covenant: primitives.Covenant{ + Type: uint8(covType), + Items: [][]byte{hash[:]}, + }, + }}, + } +} + +func TestNames_Function_Good(t *testing.T) { + hash := testNameHash() + set := map[primitives.Hash]struct{}{hash: {}} + tx := testNameTx(TypeOpen, hash) + + if !HasNames(tx, set) { + t.Fatal("expected transaction to match the set") + } +} + +func TestNames_Function_Bad(t *testing.T) { + hash := testNameHash() + set := map[primitives.Hash]struct{}{hash: {}} + tx := testNameTx(TypeNone, hash) + + if HasNames(tx, set) { + t.Fatal("expected plain transfers to be ignored") + } +} + +func TestNames_Function_Ugly(t *testing.T) { + hash := testNameHash() + tx := testNameTx(TypeRenew, hash) + set := map[primitives.Hash]struct{}{} + + AddNames(tx, set) + if _, ok := set[hash]; !ok { + t.Fatal("AddNames should record name hashes") + } + + RemoveNames(tx, set) + if _, ok := set[hash]; ok { + t.Fatal("RemoveNames should delete name hashes") + } +} + diff --git a/pkg/covenant/reserved_lookup_example_test.go b/pkg/covenant/reserved_lookup_example_test.go new file mode 100644 index 0000000..741bd74 --- /dev/null +++ b/pkg/covenant/reserved_lookup_example_test.go @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import "fmt" + +func ExampleGetReservedName_good() { + item, _ := GetReservedName("RESERVED") + fmt.Println(item.Name) + // Output: reserved +} + diff --git a/pkg/covenant/rules_example_test.go b/pkg/covenant/rules_example_test.go new file mode 100644 index 0000000..70d8495 --- /dev/null +++ b/pkg/covenant/rules_example_test.go @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import ( + "fmt" + + "dappco.re/go/lns/pkg/primitives" +) + +func ExampleGetRollout_good() { + start, _ := GetRollout(primitives.Hash{}, NameRules{NoRollout: true}) + fmt.Println(start) + // Output: 0 +} diff --git a/pkg/covenant/rules_extra_example_test.go b/pkg/covenant/rules_extra_example_test.go new file mode 100644 index 0000000..e46c530 --- /dev/null +++ b/pkg/covenant/rules_extra_example_test.go @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import ( + "fmt" + + "dappco.re/go/lns/pkg/primitives" +) + +func ExampleCountOpens_good() { + fmt.Println(CountOpens(primitives.Transaction{})) + // Output: 0 +} + diff --git a/pkg/covenant/rules_test.go b/pkg/covenant/rules_test.go new file mode 100644 index 0000000..34e330f --- /dev/null +++ b/pkg/covenant/rules_test.go @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import ( + "testing" + + "dappco.re/go/lns/pkg/primitives" +) + +func TestRules_Function_Good(t *testing.T) { + rules := NameRules{NoRollout: true} + start, week := GetRollout(primitives.Hash{}, rules) + if start != 0 || week != 0 { + t.Fatalf("GetRollout() = (%d, %d), want zeros", start, week) + } +} + +func TestRules_Function_Bad(t *testing.T) { + rules := NameRules{NoReserved: true, ClaimPeriod: 100} + hash, err := HashString("reserved") + if err != nil { + t.Fatalf("HashString returned error: %v", err) + } + + if IsReserved(hash, 1, rules) { + t.Fatal("expected NoReserved to disable reserved checks") + } +} + +func TestRules_Function_Ugly(t *testing.T) { + hash, err := HashString("nec") + if err != nil { + t.Fatalf("HashString returned error: %v", err) + } + + rules := NameRules{ClaimPeriod: 1, AlexaLockupPeriod: 100} + if !IsLockedUp(hash, 1, rules) { + t.Fatal("expected locked catalog names to remain locked") + } +} + diff --git a/pkg/covenant/verify_example_test.go b/pkg/covenant/verify_example_test.go new file mode 100644 index 0000000..29679b6 --- /dev/null +++ b/pkg/covenant/verify_example_test.go @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import ( + "fmt" + + "dappco.re/go/lns/pkg/primitives" +) + +func ExampleVerifyCovenants_good() { + var prev primitives.Hash + prev[0] = 1 + + tx := primitives.Transaction{ + Inputs: []primitives.Input{{Prevout: primitives.Outpoint{TxHash: prev, Index: 0}}}, + Outputs: []primitives.Output{{Covenant: primitives.Covenant{Type: uint8(TypeNone)}}}, + } + + view := verifyCoinView{output: primitives.Output{Covenant: primitives.Covenant{Type: uint8(TypeNone)}}} + fmt.Println(VerifyCovenants(tx, view, 0, Network{})) + // Output: 0 +} diff --git a/pkg/covenant/verify_test.go b/pkg/covenant/verify_test.go new file mode 100644 index 0000000..0512426 --- /dev/null +++ b/pkg/covenant/verify_test.go @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package covenant + +import ( + "testing" + + "dappco.re/go/lns/pkg/primitives" +) + +type verifyCoinView struct { + output primitives.Output +} + +func (v verifyCoinView) GetOutput(primitives.Outpoint) (primitives.Output, bool) { + return v.output, true +} + +func TestVerify_Function_Good(t *testing.T) { + var prev primitives.Hash + prev[0] = 1 + prevout := primitives.Outpoint{TxHash: prev, Index: 0} + + tx := primitives.Transaction{ + Inputs: []primitives.Input{{ + Prevout: prevout, + }}, + Outputs: []primitives.Output{{ + Covenant: primitives.Covenant{Type: uint8(TypeNone)}, + }}, + } + + view := verifyCoinView{output: primitives.Output{ + Covenant: primitives.Covenant{Type: uint8(TypeNone)}, + }} + + if got := VerifyCovenants(tx, view, 0, Network{}); got != 0 { + t.Fatalf("VerifyCovenants() = %d, want 0", got) + } +} + +func TestVerify_Function_Bad(t *testing.T) { + tx := primitives.Transaction{} + if got := VerifyCovenants(tx, nil, 0, Network{}); got != -1 { + t.Fatalf("VerifyCovenants() = %d, want -1", got) + } +} + +func TestVerify_Function_Ugly(t *testing.T) { + var prev primitives.Hash + prev[0] = 1 + prevout := primitives.Outpoint{TxHash: prev, Index: 0} + + tx := primitives.Transaction{ + Inputs: []primitives.Input{{ + Prevout: prevout, + }}, + Outputs: []primitives.Output{{ + Covenant: primitives.Covenant{Type: uint8(TypeNone)}, + }}, + } + + view := verifyCoinView{output: primitives.Output{ + Covenant: primitives.Covenant{Type: uint8(TypeBid)}, + }} + + if got := VerifyCovenants(tx, view, 0, Network{}); got != -1 { + t.Fatalf("VerifyCovenants() = %d, want -1", got) + } +} diff --git a/pkg/dns/common_example_test.go b/pkg/dns/common_example_test.go new file mode 100644 index 0000000..eb25209 --- /dev/null +++ b/pkg/dns/common_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package dns + +import "fmt" + +func ExampleGetDefaultTTL_good() { + fmt.Println(GetDefaultTTL()) + // Output: 21600 +} + diff --git a/pkg/dns/nsec_example_test.go b/pkg/dns/nsec_example_test.go new file mode 100644 index 0000000..0f3d1fb --- /dev/null +++ b/pkg/dns/nsec_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package dns + +import "fmt" + +func ExampleNextName_good() { + fmt.Printf("%q\n", NextName("example")) + // Output: "example\x00." +} + diff --git a/pkg/dns/resolve_example_test.go b/pkg/dns/resolve_example_test.go new file mode 100644 index 0000000..fba7377 --- /dev/null +++ b/pkg/dns/resolve_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package dns + +import "fmt" + +func ExampleVerifyString_good() { + fmt.Println(VerifyString("Foo-Bar.lthn")) + // Output: true +} + diff --git a/pkg/dns/resource_example_test.go b/pkg/dns/resource_example_test.go new file mode 100644 index 0000000..01f9ed1 --- /dev/null +++ b/pkg/dns/resource_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package dns + +import "fmt" + +func ExampleNewResource_good() { + fmt.Println(NewResource().HasNS()) + // Output: false +} + diff --git a/pkg/primitives/claim_example_test.go b/pkg/primitives/claim_example_test.go new file mode 100644 index 0000000..748ae41 --- /dev/null +++ b/pkg/primitives/claim_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleNewClaim_good() { + fmt.Println(NewClaim().GetSize()) + // Output: 2 +} + diff --git a/pkg/primitives/covenant_binary_example_test.go b/pkg/primitives/covenant_binary_example_test.go new file mode 100644 index 0000000..e88fdbc --- /dev/null +++ b/pkg/primitives/covenant_binary_example_test.go @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleCovenant_MarshalBinary_good() { + raw, _ := Covenant{}.MarshalBinary() + fmt.Println(len(raw)) + // Output: 2 +} + diff --git a/pkg/primitives/covenant_items_example_test.go b/pkg/primitives/covenant_items_example_test.go new file mode 100644 index 0000000..f534b4e --- /dev/null +++ b/pkg/primitives/covenant_items_example_test.go @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleCovenant_SetOpen_good() { + var cov Covenant + cov.SetOpen(Hash{}, []byte("example")) + fmt.Println(cov.Len()) + // Output: 3 +} + diff --git a/pkg/primitives/covenant_json_example_test.go b/pkg/primitives/covenant_json_example_test.go new file mode 100644 index 0000000..dc9771d --- /dev/null +++ b/pkg/primitives/covenant_json_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleCovenant_GetJSON_good() { + json := Covenant{Type: covenantTypeOpen, Items: [][]byte{{0x01, 0x02}}}.GetJSON() + fmt.Println(json.Action) + // Output: OPEN +} diff --git a/pkg/primitives/covenant_json_test.go b/pkg/primitives/covenant_json_test.go new file mode 100644 index 0000000..e6fd9d5 --- /dev/null +++ b/pkg/primitives/covenant_json_test.go @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "testing" + +func TestCovenantJSON_Function_Good(t *testing.T) { + cov := Covenant{Type: covenantTypeOpen, Items: [][]byte{{0x01, 0x02}}} + json := cov.GetJSON() + if json.Action != "OPEN" || len(json.Items) != 1 || json.Items[0] != "0102" { + t.Fatalf("unexpected JSON: %#v", json) + } + + var got Covenant + if err := got.FromJSON(json); err != nil { + t.Fatalf("FromJSON returned error: %v", err) + } + + if got.Type != cov.Type || got.GetVarSize() != cov.GetVarSize() { + t.Fatalf("round trip mismatch: %#v", got) + } +} + +func TestCovenantJSON_Function_Bad(t *testing.T) { + var cov Covenant + if err := cov.FromJSON(CovenantJSON{Items: []string{"zz"}}); err == nil { + t.Fatal("expected invalid hex to fail") + } +} + +func TestCovenantJSON_Function_Ugly(t *testing.T) { + var cov Covenant + if err := cov.FromJSON(CovenantJSON{}); err != nil { + t.Fatalf("FromJSON returned error for empty JSON: %v", err) + } + + if cov.Len() != 0 { + t.Fatalf("expected empty covenant, got %#v", cov) + } +} + diff --git a/pkg/primitives/invitem_example_test.go b/pkg/primitives/invitem_example_test.go new file mode 100644 index 0000000..4a7ac1d --- /dev/null +++ b/pkg/primitives/invitem_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleNewInvItem_good() { + fmt.Println(NewInvItem(InvTypeClaim, Hash{}).IsClaim()) + // Output: true +} + diff --git a/pkg/primitives/namedelta_example_test.go b/pkg/primitives/namedelta_example_test.go new file mode 100644 index 0000000..618051a --- /dev/null +++ b/pkg/primitives/namedelta_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleNameDelta_IsNull_good() { + fmt.Println(NameDelta{}.IsNull()) + // Output: true +} + diff --git a/pkg/primitives/namestate_binary_example_test.go b/pkg/primitives/namestate_binary_example_test.go new file mode 100644 index 0000000..50805dc --- /dev/null +++ b/pkg/primitives/namestate_binary_example_test.go @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import ( + "fmt" +) + +func ExampleNameState_MarshalBinary_good() { + raw, _ := NameState{Name: []byte("example")}.MarshalBinary() + fmt.Println(len(raw) > 0) + // Output: true +} diff --git a/pkg/primitives/namestate_binary_test.go b/pkg/primitives/namestate_binary_test.go new file mode 100644 index 0000000..8980e39 --- /dev/null +++ b/pkg/primitives/namestate_binary_test.go @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import ( + "bytes" + "testing" +) + +func TestNameStateBinary_Function_Good(t *testing.T) { + ns := NameState{ + Name: []byte("example"), + Height: 10, + Renewal: 20, + Value: 30, + Highest: 40, + Data: []byte{0x01, 0x02}, + Transfer: 50, + Revoked: 60, + Claimed: 70, + Renewals: 80, + Registered: true, + Expired: true, + Weak: true, + } + + raw, err := ns.MarshalBinary() + if err != nil { + t.Fatalf("MarshalBinary returned error: %v", err) + } + + var got NameState + if err := got.UnmarshalBinary(raw); err != nil { + t.Fatalf("UnmarshalBinary returned error: %v", err) + } + + if !bytes.Equal(got.Name, ns.Name) || !bytes.Equal(got.Data, ns.Data) { + t.Fatalf("round trip mismatch: %#v", got) + } +} + +func TestNameStateBinary_Function_Bad(t *testing.T) { + ns := NameState{Name: bytes.Repeat([]byte("a"), 256)} + if _, err := ns.MarshalBinary(); err == nil { + t.Fatal("expected long name to fail") + } +} + +func TestNameStateBinary_Function_Ugly(t *testing.T) { + var ns NameState + if err := ns.UnmarshalBinary([]byte{0x01}); err == nil { + t.Fatal("expected short buffer to fail") + } +} + diff --git a/pkg/primitives/namestate_example_test.go b/pkg/primitives/namestate_example_test.go new file mode 100644 index 0000000..71b5ca5 --- /dev/null +++ b/pkg/primitives/namestate_example_test.go @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleNameState_Clone_good() { + ns := NameState{Name: []byte("example")} + fmt.Println(string(ns.Clone().Name)) + // Output: example +} + diff --git a/pkg/primitives/namestate_json_example_test.go b/pkg/primitives/namestate_json_example_test.go new file mode 100644 index 0000000..fa83827 --- /dev/null +++ b/pkg/primitives/namestate_json_example_test.go @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleNameState_GetJSON_good() { + json := NameState{ + Name: []byte("example"), + NameHash: Hash{0x01}, + }.GetJSON(0, NameStateRules{}) + fmt.Println(json.Name) + // Output: example +} diff --git a/pkg/primitives/namestate_json_test.go b/pkg/primitives/namestate_json_test.go new file mode 100644 index 0000000..d6d6fb0 --- /dev/null +++ b/pkg/primitives/namestate_json_test.go @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "testing" + +func TestNameStateJSON_Function_Good(t *testing.T) { + ns := NameState{ + Name: []byte("example"), + NameHash: Hash{0x01}, + } + + json := ns.GetJSON(0, NameStateRules{}) + if json.Name != "example" || json.NameHash == "" { + t.Fatalf("unexpected JSON: %#v", json) + } + + var got NameState + if err := got.FromJSON(json); err != nil { + t.Fatalf("FromJSON returned error: %v", err) + } + + if string(got.Name) != "example" { + t.Fatalf("round trip mismatch: %#v", got) + } +} + +func TestNameStateJSON_Function_Bad(t *testing.T) { + var ns NameState + if err := ns.FromJSON(NameStateJSON{Name: "example", NameHash: "zz"}); err == nil { + t.Fatal("expected invalid hash encoding to fail") + } +} + +func TestNameStateJSON_Function_Ugly(t *testing.T) { + var ns NameState + json := ns.GetFormat(0, NameStateRules{}) + if json.State == "" { + t.Fatal("expected formatted JSON to include a state") + } +} + diff --git a/pkg/primitives/namestate_state_example_test.go b/pkg/primitives/namestate_state_example_test.go new file mode 100644 index 0000000..39b406a --- /dev/null +++ b/pkg/primitives/namestate_state_example_test.go @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleNameState_IsOpening_good() { + ns := NameState{Height: 10} + fmt.Println(ns.IsOpening(10, NameStateRules{TreeInterval: 5})) + // Output: true +} + diff --git a/pkg/primitives/namestate_stats_example_test.go b/pkg/primitives/namestate_stats_example_test.go new file mode 100644 index 0000000..418b6c3 --- /dev/null +++ b/pkg/primitives/namestate_stats_example_test.go @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleNameState_ToStats_good() { + stats := NameState{ + Name: []byte("example"), + Height: 10, + }.ToStats(10, NameStateRules{TreeInterval: 5, BlocksPerDay: 24}) + fmt.Println(stats.BlocksUntilBidding) + // Output: 6 +} diff --git a/pkg/primitives/namestate_stats_test.go b/pkg/primitives/namestate_stats_test.go new file mode 100644 index 0000000..bbd2491 --- /dev/null +++ b/pkg/primitives/namestate_stats_test.go @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "testing" + +func TestNameStateStats_Function_Good(t *testing.T) { + ns := NameState{Name: []byte("example"), Height: 10} + stats := ns.ToStats(10, NameStateRules{TreeInterval: 5, BlocksPerDay: 24}) + if stats == nil || stats.BlocksUntilBidding != 6 || stats.OpenPeriodStart != 10 { + t.Fatalf("unexpected stats: %#v", stats) + } +} + +func TestNameStateStats_Function_Bad(t *testing.T) { + ns := NameState{Renewal: 1} + if stats := ns.ToStats(10, NameStateRules{TreeInterval: 0, RenewalWindow: 0}); stats != nil { + t.Fatalf("expected nil stats for expired name without owner, got %#v", stats) + } +} + +func TestNameStateStats_Function_Ugly(t *testing.T) { + var owner Outpoint + owner.TxHash[0] = 1 + + ns := NameState{ + Owner: owner, + Revoked: 10, + } + + stats := ns.ToStats(10, NameStateRules{TreeInterval: 0, AuctionMaturity: 5, BlocksPerDay: 48}) + if stats == nil || stats.RevokePeriodStart != 10 || stats.BlocksUntilReopen != 5 { + t.Fatalf("expected expired stats, got %#v", stats) + } +} diff --git a/pkg/primitives/outpoint_example_test.go b/pkg/primitives/outpoint_example_test.go new file mode 100644 index 0000000..6808658 --- /dev/null +++ b/pkg/primitives/outpoint_example_test.go @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleNewOutpoint_good() { + fmt.Println(NewOutpoint().IsNull()) + // Output: true +} diff --git a/pkg/primitives/outpoint_json_example_test.go b/pkg/primitives/outpoint_json_example_test.go new file mode 100644 index 0000000..79a83a3 --- /dev/null +++ b/pkg/primitives/outpoint_json_example_test.go @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleOutpoint_GetJSON_good() { + fmt.Println(NewOutpoint().GetJSON().Index) + // Output: 4294967295 +} diff --git a/pkg/primitives/outpoint_json_test.go b/pkg/primitives/outpoint_json_test.go new file mode 100644 index 0000000..2991dd0 --- /dev/null +++ b/pkg/primitives/outpoint_json_test.go @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "testing" + +func TestOutpointJSON_Function_Good(t *testing.T) { + op := Outpoint{Index: 7} + op.TxHash[0] = 1 + + json := op.GetJSON() + var got Outpoint + if err := got.FromJSON(json); err != nil { + t.Fatalf("FromJSON returned error: %v", err) + } + + if !got.Equals(op) { + t.Fatalf("round trip mismatch: %#v", got) + } +} + +func TestOutpointJSON_Function_Bad(t *testing.T) { + var op Outpoint + if err := op.FromJSON(OutpointJSON{Hash: "zz"}); err == nil { + t.Fatal("expected invalid hash encoding to fail") + } +} + +func TestOutpointJSON_Function_Ugly(t *testing.T) { + var op Outpoint + if err := op.FromJSON(OutpointJSON{Hash: "00", Index: 1}); err == nil { + t.Fatal("expected short hash to fail") + } +} + diff --git a/pkg/primitives/outpoint_test.go b/pkg/primitives/outpoint_test.go new file mode 100644 index 0000000..92306d4 --- /dev/null +++ b/pkg/primitives/outpoint_test.go @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import ( + "bytes" + "testing" +) + +func TestOutpoint_Function_Good(t *testing.T) { + op := NewOutpoint() + if !op.IsNull() { + t.Fatal("NewOutpoint should return the null outpoint") + } + + raw, err := op.MarshalBinary() + if err != nil { + t.Fatalf("MarshalBinary returned error: %v", err) + } + + var got Outpoint + if err := got.UnmarshalBinary(raw); err != nil { + t.Fatalf("UnmarshalBinary returned error: %v", err) + } + + if !got.Equals(op) { + t.Fatalf("round trip mismatch: %#v", got) + } +} + +func TestOutpoint_Function_Bad(t *testing.T) { + var op Outpoint + if err := op.UnmarshalBinary([]byte{0x01}); err == nil { + t.Fatal("expected invalid length to fail") + } +} + +func TestOutpoint_Function_Ugly(t *testing.T) { + var op Outpoint + op.TxHash[0] = 1 + clone := op.Clone() + if !bytes.Equal(clone.TxHash[:], op.TxHash[:]) || clone.Index != op.Index { + t.Fatalf("Clone() mismatch: %#v", clone) + } +} + diff --git a/pkg/primitives/types_example_test.go b/pkg/primitives/types_example_test.go new file mode 100644 index 0000000..2f28bb5 --- /dev/null +++ b/pkg/primitives/types_example_test.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleCovenant_IsName_good() { + fmt.Println(Covenant{Type: covenantTypeOpen}.IsName()) + // Output: true +} + diff --git a/pkg/primitives/view_example_test.go b/pkg/primitives/view_example_test.go new file mode 100644 index 0000000..b4c08e0 --- /dev/null +++ b/pkg/primitives/view_example_test.go @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: EUPL-1.2 + +package primitives + +import "fmt" + +func ExampleNewNameView_good() { + view := NewNameView() + ns, _ := view.GetNameStateSync(nil, Hash{}) + fmt.Println(ns.NameHash == (Hash{})) + // Output: true +} + -- 2.45.3 From a677b171adae6e936fbe64b5eec3839bbacde84e Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 09:34:08 +0000 Subject: [PATCH 13/15] test(ax): add filename-stem Good/Bad/Ugly triads Co-Authored-By: Virgil --- internal/nameutil/name_test.go | 23 +++++++++++++ lns_test.go | 35 +++++++++++++++++++ pkg/covenant/blind_test.go | 47 ++++++++++++++++++++++++++ pkg/covenant/covenant_test.go | 33 ++++++++++++++++++ pkg/covenant/locked_lookup_test.go | 35 +++++++++++++++++++ pkg/covenant/name_test.go | 38 +++++++++++++++++++++ pkg/covenant/rules_extra_test.go | 41 ++++++++++++++++++++++ pkg/dns/common_test.go | 30 ++++++++++++++++ pkg/dns/nsec_test.go | 31 +++++++++++++++++ pkg/dns/resolve_test.go | 28 +++++++++++++++ pkg/dns/resource_test.go | 39 +++++++++++++++++++++ pkg/primitives/claim_test.go | 34 +++++++++++++++++++ pkg/primitives/covenant_binary_test.go | 46 +++++++++++++++++++++++++ pkg/primitives/covenant_items_test.go | 36 ++++++++++++++++++++ pkg/primitives/invitem_test.go | 34 +++++++++++++++++++ pkg/primitives/namedelta_test.go | 25 ++++++++++++++ pkg/primitives/namestate_state_test.go | 23 +++++++++++++ pkg/primitives/namestate_test.go | 22 ++++++++++++ pkg/primitives/types_test.go | 25 ++++++++++++++ pkg/primitives/view_test.go | 45 ++++++++++++++++++++++++ 20 files changed, 670 insertions(+) diff --git a/internal/nameutil/name_test.go b/internal/nameutil/name_test.go index 48f3f27..a209671 100644 --- a/internal/nameutil/name_test.go +++ b/internal/nameutil/name_test.go @@ -32,3 +32,26 @@ func TestNameUtil_Function_Ugly(t *testing.T) { } } +func TestName_Function_Good(t *testing.T) { + got, ok := Canonicalize("Example.lthn.") + if !ok || got != "example" { + t.Fatalf("Canonicalize() = %q, %v, want %q, true", got, ok, "example") + } +} + +func TestName_Function_Bad(t *testing.T) { + if got, ok := Canonicalize(42); ok || got != "" { + t.Fatalf("Canonicalize() = %q, %v, want empty false", got, ok) + } +} + +func TestName_Function_Ugly(t *testing.T) { + got, ok := CatalogLabel([]byte("MiXeD")) + if !ok { + t.Fatal("CatalogLabel should accept raw byte labels") + } + + if got != "MiXeD" { + t.Fatalf("CatalogLabel() = %q, want %q", got, "MiXeD") + } +} diff --git a/lns_test.go b/lns_test.go index e2dc9cb..9b02a6a 100644 --- a/lns_test.go +++ b/lns_test.go @@ -2172,3 +2172,38 @@ func TestServiceVerifyCovenants(t *testing.T) { t.Fatalf("GetVerifyCovenants returned %d for an invalid finalize address, want -1", got) } } + +func TestLns_Function_Good(t *testing.T) { + if got := GetServiceName(); got != ServiceName { + t.Fatalf("GetServiceName() = %q, want %q", got, ServiceName) + } + + if svc := GetNewService(nil); svc == nil { + t.Fatal("GetNewService should return a service") + } + + if svc := GetNewServiceWithOptions(nil); svc == nil { + t.Fatal("GetNewServiceWithOptions should return a service") + } +} + +func TestLns_Function_Bad(t *testing.T) { + if got := Register(nil); got.OK { + t.Fatalf("Register(nil) = %#v, want failure", got) + } + + if got := GetRegister(nil); got.OK { + t.Fatalf("GetRegister(nil) = %#v, want failure", got) + } +} + +func TestLns_Function_Ugly(t *testing.T) { + svc := NewServiceWithOptions(nil) + if svc == nil { + t.Fatal("NewServiceWithOptions(nil) should return a service") + } + + if svc.reservedCatalogOverride != nil || svc.lockedCatalogOverride != nil { + t.Fatalf("nil options should not populate catalog overrides: %#v", svc) + } +} diff --git a/pkg/covenant/blind_test.go b/pkg/covenant/blind_test.go index a6a4d62..7f323d4 100644 --- a/pkg/covenant/blind_test.go +++ b/pkg/covenant/blind_test.go @@ -52,3 +52,50 @@ func TestGetBlind(t *testing.T) { t.Fatalf("GetBlind returned %x, want %x", got, want) } } + +func TestBlind_Function_Good(t *testing.T) { + var nonce primitives.Hash + for i := range nonce { + nonce[i] = byte(i) + } + + got, err := Blind(0, nonce) + if err != nil { + t.Fatalf("Blind returned error: %v", err) + } + + want, err := GetBlind(0, nonce) + if err != nil { + t.Fatalf("GetBlind returned error: %v", err) + } + + if got != want { + t.Fatalf("Blind() = %x, want %x", got, want) + } +} + +func TestBlind_Function_Bad(t *testing.T) { + var nonce primitives.Hash + got, err := Blind(1, nonce) + if err != nil { + t.Fatalf("Blind returned error: %v", err) + } + + if got == (primitives.Hash{}) { + t.Fatal("Blind should return a non-zero commitment for non-zero value") + } +} + +func TestBlind_Function_Ugly(t *testing.T) { + var nonce primitives.Hash + nonce[0] = 1 + + got, err := Blind(0, nonce) + if err != nil { + t.Fatalf("Blind returned error: %v", err) + } + + if got == (primitives.Hash{}) { + t.Fatal("Blind should produce a digest for arbitrary nonces") + } +} diff --git a/pkg/covenant/covenant_test.go b/pkg/covenant/covenant_test.go index 9f0ac0c..46c61fe 100644 --- a/pkg/covenant/covenant_test.go +++ b/pkg/covenant/covenant_test.go @@ -42,3 +42,36 @@ func TestCovenantTypePredicates(t *testing.T) { } } +func TestCovenant_Function_Good(t *testing.T) { + if got := GetTypeName(TypeRegister); got != "REGISTER" { + t.Fatalf("GetTypeName(TypeRegister) = %q, want %q", got, "REGISTER") + } + + if got := GetTypes()["BID"]; got != TypeBid { + t.Fatalf("GetTypes()[BID] = %d, want %d", got, TypeBid) + } + + if got := TypeFinalize.String(); got != "FINALIZE" { + t.Fatalf("String() = %q, want %q", got, "FINALIZE") + } +} + +func TestCovenant_Function_Bad(t *testing.T) { + if got := TypeName(CovenantType(99)); got != "UNKNOWN" { + t.Fatalf("TypeName(99) = %q, want %q", got, "UNKNOWN") + } + + if TypeNone.IsName() || TypeNone.IsLinked() || !TypeNone.IsKnown() { + t.Fatal("TypeNone predicate invariants failed") + } +} + +func TestCovenant_Function_Ugly(t *testing.T) { + if got := GetTypesByVal()[TypeRevoke]; got != "REVOKE" { + t.Fatalf("GetTypesByVal()[TypeRevoke] = %q, want %q", got, "REVOKE") + } + + if !TypeReveal.IsLinked() || !TypeRevoke.IsLinked() { + t.Fatal("linked covenant boundary checks failed") + } +} diff --git a/pkg/covenant/locked_lookup_test.go b/pkg/covenant/locked_lookup_test.go index 3ed6fcd..8a7693d 100644 --- a/pkg/covenant/locked_lookup_test.go +++ b/pkg/covenant/locked_lookup_test.go @@ -353,3 +353,38 @@ func TestLockedCatalogGetByNameRejectsNonASCII(t *testing.T) { t.Fatal("GetByName should reject non-ASCII labels") } } + +func TestLockedLookup_Function_Good(t *testing.T) { + item, ok := GetLockedName("NEC") + if !ok { + t.Fatal("GetLockedName should find the locked reference entry") + } + + if item.Name != "nec" { + t.Fatalf("item.Name = %q, want %q", item.Name, "nec") + } + + if !HasLockedHash(item.Hash) { + t.Fatal("HasLockedHash should report the locked reference entry") + } +} + +func TestLockedLookup_Function_Bad(t *testing.T) { + if HasLockedName("does-not-exist") { + t.Fatal("unknown names should not be reported as locked") + } + + if _, ok := GetLockedName("does-not-exist"); ok { + t.Fatal("GetLockedName should return false for unknown names") + } +} + +func TestLockedLookup_Function_Ugly(t *testing.T) { + if !GetHasLockedName("nec.lthn") { + t.Fatal("GetHasLockedName should accept canonical .lthn names") + } + + if _, ok := GetLockedByBinary([]byte("NEC")); !ok { + t.Fatal("GetLockedByBinary should find the locked reference entry") + } +} diff --git a/pkg/covenant/name_test.go b/pkg/covenant/name_test.go index e7451ec..38cb67e 100644 --- a/pkg/covenant/name_test.go +++ b/pkg/covenant/name_test.go @@ -363,3 +363,41 @@ func TestHashRejectsInvalidName(t *testing.T) { t.Fatal("HashName should reject unsupported input types") } } + +func TestName_Function_Good(t *testing.T) { + if !VerifyString("example-1") { + t.Fatal("VerifyString should accept a valid non-blacklisted name") + } + + if _, err := HashString("example-1"); err != nil { + t.Fatalf("HashString returned error: %v", err) + } +} + +func TestName_Function_Bad(t *testing.T) { + if VerifyString("Example") { + t.Fatal("VerifyString should reject uppercase labels") + } + + if _, err := HashString("Example"); err == nil { + t.Fatal("HashString should reject invalid names") + } + + if VerifyName(123) { + t.Fatal("VerifyName should reject unsupported input types") + } +} + +func TestName_Function_Ugly(t *testing.T) { + if VerifyBinary([]byte("abc-")) { + t.Fatal("VerifyBinary should reject trailing hyphens") + } + + if VerifyBinary([]byte("ab\x80")) { + t.Fatal("VerifyBinary should reject non-ASCII input") + } + + if _, ok := GetBlacklist()["example"]; !ok { + t.Fatal("GetBlacklist should expose the blacklist map") + } +} diff --git a/pkg/covenant/rules_extra_test.go b/pkg/covenant/rules_extra_test.go index 416b98f..a6ba7b4 100644 --- a/pkg/covenant/rules_extra_test.go +++ b/pkg/covenant/rules_extra_test.go @@ -781,3 +781,44 @@ func TestCoinbaseClaimConjureOverflow(t *testing.T) { t.Fatalf("VerifyCovenants returned %d for overflowing coinbase claim outputs, want -1", got) } } + +func TestRulesExtra_Function_Good(t *testing.T) { + tx := primitives.Transaction{ + Outputs: []primitives.Output{ + {Covenant: primitives.Covenant{Type: uint8(TypeOpen)}}, + {Covenant: primitives.Covenant{Type: uint8(TypeUpdate)}}, + }, + } + + if got := CountOpens(tx); got != 1 { + t.Fatalf("CountOpens() = %d, want 1", got) + } + + if got := GetCountUpdates(tx); got != 2 { + t.Fatalf("GetCountUpdates() = %d, want 2", got) + } +} + +func TestRulesExtra_Function_Bad(t *testing.T) { + if _, err := GrindName(0, 0, NameRules{}); err == nil { + t.Fatal("GrindName should reject zero-sized names") + } +} + +func TestRulesExtra_Function_Ugly(t *testing.T) { + tx := primitives.Transaction{ + Outputs: []primitives.Output{ + {Covenant: primitives.Covenant{Type: uint8(TypeClaim)}}, + {Covenant: primitives.Covenant{Type: uint8(TypeRenew)}}, + {Covenant: primitives.Covenant{Type: uint8(TypeFinalize)}}, + }, + } + + if got := CountRenewals(tx); got != 2 { + t.Fatalf("CountRenewals() = %d, want 2", got) + } + + if got := GetCountRenewals(tx); got != 2 { + t.Fatalf("GetCountRenewals() = %d, want 2", got) + } +} diff --git a/pkg/dns/common_test.go b/pkg/dns/common_test.go index b666871..e6f4804 100644 --- a/pkg/dns/common_test.go +++ b/pkg/dns/common_test.go @@ -118,3 +118,33 @@ func TestHSTypesTables(t *testing.T) { } } } + +func TestCommon_Function_Good(t *testing.T) { + if got := GetDefaultTTL(); got != DEFAULT_TTL { + t.Fatalf("GetDefaultTTL() = %d, want %d", got, DEFAULT_TTL) + } + + if len(GetDummy()) != 0 { + t.Fatalf("GetDummy() length = %d, want 0", len(GetDummy())) + } +} + +func TestCommon_Function_Bad(t *testing.T) { + if _, ok := GetHSTypes()["NOPE"]; ok { + t.Fatal("GetHSTypes should not contain unknown keys") + } + + if _, ok := GetHSTypesByVal()[HSType(99)]; ok { + t.Fatal("GetHSTypesByVal should not contain unknown values") + } +} + +func TestCommon_Function_Ugly(t *testing.T) { + if !bytes.Equal(GetTypeMapAAAA(), TYPE_MAP_AAAA) { + t.Fatal("GetTypeMapAAAA should alias TYPE_MAP_AAAA") + } + + if reflect.ValueOf(GetHSTypes()).Pointer() != reflect.ValueOf(HSTypes).Pointer() { + t.Fatal("GetHSTypes should alias HSTypes") + } +} diff --git a/pkg/dns/nsec_test.go b/pkg/dns/nsec_test.go index 19cc47b..262ade1 100644 --- a/pkg/dns/nsec_test.go +++ b/pkg/dns/nsec_test.go @@ -114,3 +114,34 @@ func TestPrevNameRejectsEmptyName(t *testing.T) { _ = PrevName(".") } + +func TestNsec_Function_Good(t *testing.T) { + rr := GetCreate("Example", NextName("Example"), []byte{0x01, 0x02}) + if rr.Name != "Example." { + t.Fatalf("GetCreate name = %q, want %q", rr.Name, "Example.") + } + + if rr.TTL != DEFAULT_TTL { + t.Fatalf("GetCreate TTL = %d, want %d", rr.TTL, DEFAULT_TTL) + } +} + +func TestNsec_Function_Bad(t *testing.T) { + defer func() { + if recover() == nil { + t.Fatal("PrevName should panic for an empty trimmed name") + } + }() + + _ = PrevName(".") +} + +func TestNsec_Function_Ugly(t *testing.T) { + if got := GetNextName("Example"); got != "example\x00." { + t.Fatalf("GetNextName() = %q, want %q", got, "example\x00.") + } + + if got := GetPrevName("Example"); got != "exampld\xff." { + t.Fatalf("GetPrevName() = %q, want %q", got, "exampld\xff.") + } +} diff --git a/pkg/dns/resolve_test.go b/pkg/dns/resolve_test.go index 2b88ce4..89116ba 100644 --- a/pkg/dns/resolve_test.go +++ b/pkg/dns/resolve_test.go @@ -560,3 +560,31 @@ func TestPackageLevelResolveAndVerifyAliases(t *testing.T) { } } } + +func TestResolve_Function_Good(t *testing.T) { + got, err := Resolve("Foo-Bar.lthn") + if err != nil { + t.Fatalf("Resolve returned error: %v", err) + } + + want := sha3.Sum256([]byte("foo-bar")) + if got != want { + t.Fatalf("Resolve() = %x, want %x", got, want) + } +} + +func TestResolve_Function_Bad(t *testing.T) { + if _, err := Resolve(123); err == nil { + t.Fatal("Resolve should reject unsupported input types") + } +} + +func TestResolve_Function_Ugly(t *testing.T) { + if !VerifyByString("Foo-Bar.lthn") { + t.Fatal("VerifyByString should accept canonical names after normalization") + } + + if !GetVerifyBinary([]byte("Foo-Bar.lthn")) { + t.Fatal("GetVerifyBinary should accept canonical byte names") + } +} diff --git a/pkg/dns/resource_test.go b/pkg/dns/resource_test.go index 3cb7528..bb838c4 100644 --- a/pkg/dns/resource_test.go +++ b/pkg/dns/resource_test.go @@ -832,3 +832,42 @@ func TestResourceDecodeRejectsInvalidPayloads(t *testing.T) { t.Fatal("Decode should reject truncated TXT entries") } } + +func TestResource_Function_Good(t *testing.T) { + resource := NewResource() + if resource == nil { + t.Fatal("NewResource should return a resource") + } + + if resource.TTL != DEFAULT_TTL { + t.Fatalf("NewResource TTL = %d, want %d", resource.TTL, DEFAULT_TTL) + } +} + +func TestResource_Function_Bad(t *testing.T) { + if _, err := DecodeResource([]byte{1}); err == nil { + t.Fatal("DecodeResource should reject unsupported versions") + } + + var resource *Resource + if got := resource.GetSize(); got != 0 { + t.Fatalf("nil resource GetSize() = %d, want 0", got) + } +} + +func TestResource_Function_Ugly(t *testing.T) { + resource := &Resource{ + Records: []ResourceRecord{ + NSRecord{NS: "ns1.example."}, + TXTRecord{Entries: []string{"hello"}}, + }, + } + + if !resource.HasNS() || !resource.GetHasNS() { + t.Fatal("resource should report NS-capable records") + } + + if got := resource.ToNS("example"); len(got) != 1 || got[0].NS != "ns1.example." { + t.Fatalf("ToNS() = %#v, want one NS record", got) + } +} diff --git a/pkg/primitives/claim_test.go b/pkg/primitives/claim_test.go index 5399170..1f478c3 100644 --- a/pkg/primitives/claim_test.go +++ b/pkg/primitives/claim_test.go @@ -100,3 +100,37 @@ func TestClaimHelpers(t *testing.T) { t.Fatal("NewClaim helpers should return a claim wrapper") } } + +func TestClaim_Function_Good(t *testing.T) { + if NewClaim() == nil || GetNewClaim() == nil { + t.Fatal("NewClaim helpers should return a claim wrapper") + } +} + +func TestClaim_Function_Bad(t *testing.T) { + var claim *Claim + if claim.FromBlob([]byte("proof")) != nil { + t.Fatal("nil claim receiver should stay nil") + } + + if _, err := (Claim{Blob: make([]byte, maxClaimSize + 1)}).MarshalBinary(); err == nil { + t.Fatal("MarshalBinary should reject oversized claims") + } +} + +func TestClaim_Function_Ugly(t *testing.T) { + claim := Claim{Blob: []byte("ownership-proof")} + raw, err := claim.MarshalBinary() + if err != nil { + t.Fatalf("MarshalBinary returned error: %v", err) + } + + var decoded Claim + if err := decoded.UnmarshalBinary(raw); err != nil { + t.Fatalf("UnmarshalBinary returned error: %v", err) + } + + if got := decoded.GetBlob(); string(got) != "ownership-proof" { + t.Fatalf("decoded blob = %q, want %q", got, "ownership-proof") + } +} diff --git a/pkg/primitives/covenant_binary_test.go b/pkg/primitives/covenant_binary_test.go index a7b5349..6286888 100644 --- a/pkg/primitives/covenant_binary_test.go +++ b/pkg/primitives/covenant_binary_test.go @@ -66,3 +66,49 @@ func TestCovenantBinaryZeroValue(t *testing.T) { t.Fatalf("decoded zero value = %+v, want zero value", decoded) } } + +func TestCovenantBinary_Function_Good(t *testing.T) { + cov := Covenant{} + cov.SetFinalize( + Hash{43, 44, 45}, + 188, + []byte("final"), + 12, + 21, + 34, + Hash{46, 47, 48}, + ) + + raw, err := cov.MarshalBinary() + if err != nil { + t.Fatalf("MarshalBinary returned error: %v", err) + } + + var decoded Covenant + if err := decoded.UnmarshalBinary(raw); err != nil { + t.Fatalf("UnmarshalBinary returned error: %v", err) + } + + if decoded.Type != cov.Type || decoded.Len() != cov.Len() { + t.Fatalf("decoded covenant = %+v, want %+v", decoded, cov) + } +} + +func TestCovenantBinary_Function_Bad(t *testing.T) { + var cov Covenant + if err := cov.UnmarshalBinary(nil); err == nil { + t.Fatal("UnmarshalBinary should reject short buffers") + } +} + +func TestCovenantBinary_Function_Ugly(t *testing.T) { + var cov Covenant + raw, err := cov.MarshalBinary() + if err != nil { + t.Fatalf("MarshalBinary returned error: %v", err) + } + + if len(raw) == 0 { + t.Fatal("MarshalBinary should produce a compact encoding") + } +} diff --git a/pkg/primitives/covenant_items_test.go b/pkg/primitives/covenant_items_test.go index 91c6f06..b224966 100644 --- a/pkg/primitives/covenant_items_test.go +++ b/pkg/primitives/covenant_items_test.go @@ -643,3 +643,39 @@ func TestCovenantJSONRejectsInvalidEncoding(t *testing.T) { t.Fatal("FromJSON should reject invalid hex data") } } + +func TestCovenantItems_Function_Good(t *testing.T) { + var cov Covenant + cov.SetOpen(Hash{1, 2, 3}, []byte("example")) + + if cov.Len() != 3 { + t.Fatalf("SetOpen should populate three covenant items, got %d", cov.Len()) + } + + if got := cov.IndexOf([]byte("example")); got != 2 { + t.Fatalf("IndexOf() = %d, want 2", got) + } +} + +func TestCovenantItems_Function_Bad(t *testing.T) { + var cov Covenant + if _, err := cov.Get(0); err == nil { + t.Fatal("Get should reject empty covenants") + } + + if err := cov.Set(1, []byte("x")); err == nil { + t.Fatal("Set should reject out-of-range indexes") + } +} + +func TestCovenantItems_Function_Ugly(t *testing.T) { + cov := Covenant{Items: [][]byte{[]byte("a"), []byte("b")}} + + if item, err := cov.Get(-1); err != nil || string(item) != "b" { + t.Fatalf("Get(-1) = %q, %v, want %q, nil", item, err, "b") + } + + if got := cov.Clone(); got.Len() != cov.Len() { + t.Fatalf("Clone() length = %d, want %d", got.Len(), cov.Len()) + } +} diff --git a/pkg/primitives/invitem_test.go b/pkg/primitives/invitem_test.go index 96e0cfd..e7d7e42 100644 --- a/pkg/primitives/invitem_test.go +++ b/pkg/primitives/invitem_test.go @@ -43,3 +43,37 @@ func TestInvItemHelpers(t *testing.T) { t.Fatalf("decoded inventory item = %+v, want %+v", decoded, item) } } + +func TestInvItem_Function_Good(t *testing.T) { + item := NewInvItem(InvTypeClaim, Hash{}) + if item == nil { + t.Fatal("NewInvItem should return a value") + } + + if !item.IsClaim() || item.IsTX() || item.IsBlock() || item.IsAirdrop() { + t.Fatal("inventory type predicates should match the claim type") + } +} + +func TestInvItem_Function_Bad(t *testing.T) { + var item InvItem + if err := item.UnmarshalBinary([]byte{1, 2}); err == nil { + t.Fatal("UnmarshalBinary should reject invalid lengths") + } +} + +func TestInvItem_Function_Ugly(t *testing.T) { + item := InvItem{Type: InvTypeCompactBlock} + if !item.IsBlock() { + t.Fatal("compact block should count as a block") + } + + raw, err := item.MarshalBinary() + if err != nil { + t.Fatalf("MarshalBinary returned error: %v", err) + } + + if len(raw) != item.GetSize() { + t.Fatalf("MarshalBinary length = %d, want %d", len(raw), item.GetSize()) + } +} diff --git a/pkg/primitives/namedelta_test.go b/pkg/primitives/namedelta_test.go index 13dc090..7e3de65 100644 --- a/pkg/primitives/namedelta_test.go +++ b/pkg/primitives/namedelta_test.go @@ -172,3 +172,28 @@ func assertNameDeltaEqual(t *testing.T, got, want NameDelta) { assertBoolPtr("Expired", got.Expired, want.Expired) assertBoolPtr("Weak", got.Weak, want.Weak) } + +func TestNameDelta_Function_Good(t *testing.T) { + if got := (NameDelta{}).IsNull(); !got { + t.Fatal("zero delta should be null") + } +} + +func TestNameDelta_Function_Bad(t *testing.T) { + var delta NameDelta + if err := delta.UnmarshalBinary([]byte{1, 2, 3}); err == nil { + t.Fatal("UnmarshalBinary should reject short buffers") + } +} + +func TestNameDelta_Function_Ugly(t *testing.T) { + height := uint32(7) + delta := NameDelta{Height: &height} + if got := delta.GetField(); got != 1 { + t.Fatalf("GetField() = %d, want 1", got) + } + + if got := delta.GetSize(); got <= 4 { + t.Fatalf("GetSize() = %d, want greater than 4", got) + } +} diff --git a/pkg/primitives/namestate_state_test.go b/pkg/primitives/namestate_state_test.go index 0d13ca7..241a4fc 100644 --- a/pkg/primitives/namestate_state_test.go +++ b/pkg/primitives/namestate_state_test.go @@ -151,3 +151,26 @@ func TestNameStateClaimableAndExpired(t *testing.T) { t.Fatal("closed names without an owner should expire once the renewal window ends") } } + +func TestNameStateState_Function_Good(t *testing.T) { + ns := NameState{Height: 10} + rules := NameStateRules{TreeInterval: 1, BiddingPeriod: 1, RevealPeriod: 1} + + if got := ns.State(10, rules); got != NameStateOpening { + t.Fatalf("State() = %s, want %s", got, NameStateOpening) + } +} + +func TestNameStateState_Function_Bad(t *testing.T) { + var ns NameState + if ns.IsClaimable(0, NameStateRules{}) { + t.Fatal("zero state should not be claimable") + } +} + +func TestNameStateState_Function_Ugly(t *testing.T) { + ns := NameState{Revoked: 12} + if got := ns.State(13, NameStateRules{}); got != NameStateRevoked { + t.Fatalf("State() = %s, want %s", got, NameStateRevoked) + } +} diff --git a/pkg/primitives/namestate_test.go b/pkg/primitives/namestate_test.go index 13d6cda..7b30e0b 100644 --- a/pkg/primitives/namestate_test.go +++ b/pkg/primitives/namestate_test.go @@ -571,3 +571,25 @@ func TestNameStateBinaryZeroValue(t *testing.T) { t.Fatalf("decoded zero value = %+v, want zero value", decoded) } } + +func TestNameState_Function_Good(t *testing.T) { + var ns NameState + if ns.Delta() == nil || ns.GetDelta() == nil { + t.Fatal("Delta helpers should allocate a sparse delta") + } +} + +func TestNameState_Function_Bad(t *testing.T) { + ns := NameState{Name: []byte("foo"), Height: 1} + if got := ns.MaybeExpire(1, NameStateRules{}); got { + t.Fatal("MaybeExpire should stay false when the name is not expired") + } +} + +func TestNameState_Function_Ugly(t *testing.T) { + ns := NameState{Name: []byte("foo"), Height: 10} + clone := ns.Clone() + if clone.NameHash != ns.NameHash || !bytes.Equal(clone.Name, ns.Name) { + t.Fatalf("Clone() = %+v, want %+v", clone, ns) + } +} diff --git a/pkg/primitives/types_test.go b/pkg/primitives/types_test.go index c42533d..c73dd31 100644 --- a/pkg/primitives/types_test.go +++ b/pkg/primitives/types_test.go @@ -367,3 +367,28 @@ func TestOutputIsUnspendable(t *testing.T) { t.Fatal("revoke covenant output should be unspendable") } } + +func TestTypes_Function_Good(t *testing.T) { + addr := Address{Version: 0, Hash: bytes.Repeat([]byte{0x01}, 20)} + if !addr.IsValid() || !addr.IsPubkeyHash() { + t.Fatalf("valid pubkey hash address should be accepted: %#v", addr) + } +} + +func TestTypes_Function_Bad(t *testing.T) { + addr := Address{Version: 32, Hash: bytes.Repeat([]byte{0x01}, 1)} + if addr.IsValid() { + t.Fatalf("invalid address should not be valid: %#v", addr) + } +} + +func TestTypes_Function_Ugly(t *testing.T) { + cov := Covenant{Type: covenantTypeRevoke} + if !cov.IsUnspendable() || !cov.IsRevoke() { + t.Fatalf("revoke covenant should be unspendable and revoke: %#v", cov) + } + + if !(Covenant{Type: covenantTypeOpen}).IsName() { + t.Fatal("open covenant should be a name covenant") + } +} diff --git a/pkg/primitives/view_test.go b/pkg/primitives/view_test.go index b64c92a..49960ba 100644 --- a/pkg/primitives/view_test.go +++ b/pkg/primitives/view_test.go @@ -4,6 +4,7 @@ package primitives import ( "bytes" + "errors" "testing" ) @@ -154,3 +155,47 @@ func (d NameDelta) MarshalMust(t *testing.T) []byte { return data } + +func TestView_Function_Good(t *testing.T) { + view := NewNameView() + if view == nil { + t.Fatal("NewNameView should return a view") + } + + var hash Hash + ns, err := view.GetNameStateSync(nil, hash) + if err != nil { + t.Fatalf("GetNameStateSync returned error: %v", err) + } + + if ns == nil || ns.NameHash != hash { + t.Fatalf("GetNameStateSync returned %#v, want zero state keyed by hash", ns) + } +} + +func TestView_Function_Bad(t *testing.T) { + view := NewNameView() + wantErr := errors.New("db failure") + if _, err := view.GetNameStateSync(stubNameStateDB{err: wantErr}, Hash{}); err != wantErr { + t.Fatalf("GetNameStateSync should propagate db errors, got %v", err) + } +} + +func TestView_Function_Ugly(t *testing.T) { + var view NameView + firstHash := Hash{1} + secondHash := Hash{2} + + view.names = map[Hash]*NameState{ + firstHash: &NameState{NameHash: firstHash}, + secondHash: &NameState{NameHash: secondHash}, + } + view.order = []Hash{secondHash, firstHash} + view.names[firstHash].setHeight(1) + view.names[secondHash].setHeight(2) + + undo := view.ToNameUndo() + if len(undo.Names) != 2 { + t.Fatalf("ToNameUndo() = %d entries, want 2", len(undo.Names)) + } +} -- 2.45.3 From 99226c9aefe4bbd6356930087887fc6ea1fd375d Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 09:37:34 +0000 Subject: [PATCH 14/15] test(docs): add missing example stubs Co-Authored-By: Virgil --- .../zz_codex_examples_example_test.go | 7 + .../zz_codex_examples_example_test.go | 599 +++++ pkg/dns/zz_codex_examples_example_test.go | 775 +++++++ .../zz_codex_examples_example_test.go | 699 ++++++ zz_codex_examples_example_test.go | 1959 +++++++++++++++++ 5 files changed, 4039 insertions(+) create mode 100644 internal/nameutil/zz_codex_examples_example_test.go create mode 100644 pkg/covenant/zz_codex_examples_example_test.go create mode 100644 pkg/dns/zz_codex_examples_example_test.go create mode 100644 pkg/primitives/zz_codex_examples_example_test.go create mode 100644 zz_codex_examples_example_test.go diff --git a/internal/nameutil/zz_codex_examples_example_test.go b/internal/nameutil/zz_codex_examples_example_test.go new file mode 100644 index 0000000..ff74a15 --- /dev/null +++ b/internal/nameutil/zz_codex_examples_example_test.go @@ -0,0 +1,7 @@ +package nameutil + +// Code generated by Codex. DO NOT EDIT. + +func ExampleCatalogLabel() { + _ = CatalogLabel +} diff --git a/pkg/covenant/zz_codex_examples_example_test.go b/pkg/covenant/zz_codex_examples_example_test.go new file mode 100644 index 0000000..0e20b58 --- /dev/null +++ b/pkg/covenant/zz_codex_examples_example_test.go @@ -0,0 +1,599 @@ +package covenant + +// Code generated by Codex. DO NOT EDIT. + +func ExampleAddNames() { + _ = AddNames +} + +func ExampleBlind() { + _ = Blind +} + +func ExampleCountRenewals() { + _ = CountRenewals +} + +func ExampleCountUpdates() { + _ = CountUpdates +} + +func ExampleCovenantType_IsKnown() { + _ = (*CovenantType).IsKnown +} + +func ExampleCovenantType_IsLinked() { + _ = (*CovenantType).IsLinked +} + +func ExampleCovenantType_IsName() { + _ = (*CovenantType).IsName +} + +func ExampleCovenantType_String() { + _ = (*CovenantType).String +} + +func ExampleDefaultLockedCatalog() { + _ = DefaultLockedCatalog +} + +func ExampleDefaultReservedCatalog() { + _ = DefaultReservedCatalog +} + +func ExampleGetAddNames() { + _ = GetAddNames +} + +func ExampleGetBlacklist() { + _ = GetBlacklist +} + +func ExampleGetCountOpens() { + _ = GetCountOpens +} + +func ExampleGetCountRenewals() { + _ = GetCountRenewals +} + +func ExampleGetCountUpdates() { + _ = GetCountUpdates +} + +func ExampleGetDefaultLockedCatalog() { + _ = GetDefaultLockedCatalog +} + +func ExampleGetDefaultReservedCatalog() { + _ = GetDefaultReservedCatalog +} + +func ExampleGetGrindName() { + _ = GetGrindName +} + +func ExampleGetHasLockedBinary() { + _ = GetHasLockedBinary +} + +func ExampleGetHasLockedByBinary() { + _ = GetHasLockedByBinary +} + +func ExampleGetHasLockedByHash() { + _ = GetHasLockedByHash +} + +func ExampleGetHasLockedByName() { + _ = GetHasLockedByName +} + +func ExampleGetHasLockedByString() { + _ = GetHasLockedByString +} + +func ExampleGetHasLockedHash() { + _ = GetHasLockedHash +} + +func ExampleGetHasLockedName() { + _ = GetHasLockedName +} + +func ExampleGetHasLockedString() { + _ = GetHasLockedString +} + +func ExampleGetHasNames() { + _ = GetHasNames +} + +func ExampleGetHasReservedBinary() { + _ = GetHasReservedBinary +} + +func ExampleGetHasReservedByBinary() { + _ = GetHasReservedByBinary +} + +func ExampleGetHasReservedByHash() { + _ = GetHasReservedByHash +} + +func ExampleGetHasReservedByName() { + _ = GetHasReservedByName +} + +func ExampleGetHasReservedByString() { + _ = GetHasReservedByString +} + +func ExampleGetHasReservedHash() { + _ = GetHasReservedHash +} + +func ExampleGetHasReservedName() { + _ = GetHasReservedName +} + +func ExampleGetHasReservedString() { + _ = GetHasReservedString +} + +func ExampleGetHasRollout() { + _ = GetHasRollout +} + +func ExampleGetHasSaneCovenants() { + _ = GetHasSaneCovenants +} + +func ExampleGetHashBinary() { + _ = GetHashBinary +} + +func ExampleGetHashByBinary() { + _ = GetHashByBinary +} + +func ExampleGetHashByName() { + _ = GetHashByName +} + +func ExampleGetHashByString() { + _ = GetHashByString +} + +func ExampleGetHashName() { + _ = GetHashName +} + +func ExampleGetHashString() { + _ = GetHashString +} + +func ExampleGetIsLockedUp() { + _ = GetIsLockedUp +} + +func ExampleGetIsReserved() { + _ = GetIsReserved +} + +func ExampleGetLockedBinary() { + _ = GetLockedBinary +} + +func ExampleGetLockedByBinary() { + _ = GetLockedByBinary +} + +func ExampleGetLockedByHash() { + _ = GetLockedByHash +} + +func ExampleGetLockedByName() { + _ = GetLockedByName +} + +func ExampleGetLockedByString() { + _ = GetLockedByString +} + +func ExampleGetLockedCatalog() { + _ = GetLockedCatalog +} + +func ExampleGetLockedHash() { + _ = GetLockedHash +} + +func ExampleGetLockedString() { + _ = GetLockedString +} + +func ExampleGetRemoveNames() { + _ = GetRemoveNames +} + +func ExampleGetReservedBinary() { + _ = GetReservedBinary +} + +func ExampleGetReservedByBinary() { + _ = GetReservedByBinary +} + +func ExampleGetReservedByHash() { + _ = GetReservedByHash +} + +func ExampleGetReservedByName() { + _ = GetReservedByName +} + +func ExampleGetReservedByString() { + _ = GetReservedByString +} + +func ExampleGetReservedCatalog() { + _ = GetReservedCatalog +} + +func ExampleGetReservedHash() { + _ = GetReservedHash +} + +func ExampleGetReservedString() { + _ = GetReservedString +} + +func ExampleGetTypeName() { + _ = GetTypeName +} + +func ExampleGetTypes() { + _ = GetTypes +} + +func ExampleGetTypesByVal() { + _ = GetTypesByVal +} + +func ExampleGetVerificationFlags() { + _ = GetVerificationFlags +} + +func ExampleGetVerificationFlagsByVal() { + _ = GetVerificationFlagsByVal +} + +func ExampleGetVerifyBinary() { + _ = GetVerifyBinary +} + +func ExampleGetVerifyByBinary() { + _ = GetVerifyByBinary +} + +func ExampleGetVerifyByName() { + _ = GetVerifyByName +} + +func ExampleGetVerifyByString() { + _ = GetVerifyByString +} + +func ExampleGetVerifyCovenants() { + _ = GetVerifyCovenants +} + +func ExampleGetVerifyName() { + _ = GetVerifyName +} + +func ExampleGetVerifyString() { + _ = GetVerifyString +} + +func ExampleGrindName() { + _ = GrindName +} + +func ExampleHasLockedBinary() { + _ = HasLockedBinary +} + +func ExampleHasLockedByBinary() { + _ = HasLockedByBinary +} + +func ExampleHasLockedByHash() { + _ = HasLockedByHash +} + +func ExampleHasLockedByName() { + _ = HasLockedByName +} + +func ExampleHasLockedByString() { + _ = HasLockedByString +} + +func ExampleHasLockedHash() { + _ = HasLockedHash +} + +func ExampleHasLockedName() { + _ = HasLockedName +} + +func ExampleHasLockedString() { + _ = HasLockedString +} + +func ExampleHasReservedBinary() { + _ = HasReservedBinary +} + +func ExampleHasReservedByBinary() { + _ = HasReservedByBinary +} + +func ExampleHasReservedByHash() { + _ = HasReservedByHash +} + +func ExampleHasReservedByName() { + _ = HasReservedByName +} + +func ExampleHasReservedByString() { + _ = HasReservedByString +} + +func ExampleHasReservedHash() { + _ = HasReservedHash +} + +func ExampleHasReservedName() { + _ = HasReservedName +} + +func ExampleHasReservedString() { + _ = HasReservedString +} + +func ExampleHasRollout() { + _ = HasRollout +} + +func ExampleHasSaneCovenants() { + _ = HasSaneCovenants +} + +func ExampleHashBinary() { + _ = HashBinary +} + +func ExampleHashByBinary() { + _ = HashByBinary +} + +func ExampleHashByName() { + _ = HashByName +} + +func ExampleHashByString() { + _ = HashByString +} + +func ExampleHashName() { + _ = HashName +} + +func ExampleHashString() { + _ = HashString +} + +func ExampleIsLockedUp() { + _ = IsLockedUp +} + +func ExampleIsReserved() { + _ = IsReserved +} + +func ExampleLockedCatalog_Entries() { + _ = (*LockedCatalog).Entries +} + +func ExampleLockedCatalog_Get() { + _ = (*LockedCatalog).Get +} + +func ExampleLockedCatalog_GetByHash() { + _ = (*LockedCatalog).GetByHash +} + +func ExampleLockedCatalog_GetByName() { + _ = (*LockedCatalog).GetByName +} + +func ExampleLockedCatalog_GetEntries() { + _ = (*LockedCatalog).GetEntries +} + +func ExampleLockedCatalog_GetHasByHash() { + _ = (*LockedCatalog).GetHasByHash +} + +func ExampleLockedCatalog_GetHasByName() { + _ = (*LockedCatalog).GetHasByName +} + +func ExampleLockedCatalog_GetKeys() { + _ = (*LockedCatalog).GetKeys +} + +func ExampleLockedCatalog_GetPrefixSize() { + _ = (*LockedCatalog).GetPrefixSize +} + +func ExampleLockedCatalog_GetSize() { + _ = (*LockedCatalog).GetSize +} + +func ExampleLockedCatalog_GetValues() { + _ = (*LockedCatalog).GetValues +} + +func ExampleLockedCatalog_Has() { + _ = (*LockedCatalog).Has +} + +func ExampleLockedCatalog_HasByHash() { + _ = (*LockedCatalog).HasByHash +} + +func ExampleLockedCatalog_HasByName() { + _ = (*LockedCatalog).HasByName +} + +func ExampleLockedCatalog_Keys() { + _ = (*LockedCatalog).Keys +} + +func ExampleLockedCatalog_PrefixSize() { + _ = (*LockedCatalog).PrefixSize +} + +func ExampleLockedCatalog_Size() { + _ = (*LockedCatalog).Size +} + +func ExampleLockedCatalog_Values() { + _ = (*LockedCatalog).Values +} + +func ExampleRemoveNames() { + _ = RemoveNames +} + +func ExampleReservedCatalog_Entries() { + _ = (*ReservedCatalog).Entries +} + +func ExampleReservedCatalog_Get() { + _ = (*ReservedCatalog).Get +} + +func ExampleReservedCatalog_GetByHash() { + _ = (*ReservedCatalog).GetByHash +} + +func ExampleReservedCatalog_GetByName() { + _ = (*ReservedCatalog).GetByName +} + +func ExampleReservedCatalog_GetEntries() { + _ = (*ReservedCatalog).GetEntries +} + +func ExampleReservedCatalog_GetHasByHash() { + _ = (*ReservedCatalog).GetHasByHash +} + +func ExampleReservedCatalog_GetHasByName() { + _ = (*ReservedCatalog).GetHasByName +} + +func ExampleReservedCatalog_GetKeys() { + _ = (*ReservedCatalog).GetKeys +} + +func ExampleReservedCatalog_GetNameValue() { + _ = (*ReservedCatalog).GetNameValue +} + +func ExampleReservedCatalog_GetPrefixSize() { + _ = (*ReservedCatalog).GetPrefixSize +} + +func ExampleReservedCatalog_GetRootValue() { + _ = (*ReservedCatalog).GetRootValue +} + +func ExampleReservedCatalog_GetSize() { + _ = (*ReservedCatalog).GetSize +} + +func ExampleReservedCatalog_GetTopValue() { + _ = (*ReservedCatalog).GetTopValue +} + +func ExampleReservedCatalog_GetValues() { + _ = (*ReservedCatalog).GetValues +} + +func ExampleReservedCatalog_Has() { + _ = (*ReservedCatalog).Has +} + +func ExampleReservedCatalog_HasByHash() { + _ = (*ReservedCatalog).HasByHash +} + +func ExampleReservedCatalog_HasByName() { + _ = (*ReservedCatalog).HasByName +} + +func ExampleReservedCatalog_Keys() { + _ = (*ReservedCatalog).Keys +} + +func ExampleReservedCatalog_NameValue() { + _ = (*ReservedCatalog).NameValue +} + +func ExampleReservedCatalog_PrefixSize() { + _ = (*ReservedCatalog).PrefixSize +} + +func ExampleReservedCatalog_RootValue() { + _ = (*ReservedCatalog).RootValue +} + +func ExampleReservedCatalog_Size() { + _ = (*ReservedCatalog).Size +} + +func ExampleReservedCatalog_TopValue() { + _ = (*ReservedCatalog).TopValue +} + +func ExampleReservedCatalog_Values() { + _ = (*ReservedCatalog).Values +} + +func ExampleVerifyBinary() { + _ = VerifyBinary +} + +func ExampleVerifyByBinary() { + _ = VerifyByBinary +} + +func ExampleVerifyByName() { + _ = VerifyByName +} + +func ExampleVerifyByString() { + _ = VerifyByString +} + +func ExampleVerifyName() { + _ = VerifyName +} diff --git a/pkg/dns/zz_codex_examples_example_test.go b/pkg/dns/zz_codex_examples_example_test.go new file mode 100644 index 0000000..97dbb20 --- /dev/null +++ b/pkg/dns/zz_codex_examples_example_test.go @@ -0,0 +1,775 @@ +package dns + +// Code generated by Codex. DO NOT EDIT. + +func ExampleCreate() { + _ = Create +} + +func ExampleDSRecord_FromJSON() { + _ = (*DSRecord).FromJSON +} + +func ExampleDSRecord_GetAlgorithm() { + _ = (*DSRecord).GetAlgorithm +} + +func ExampleDSRecord_GetDigest() { + _ = (*DSRecord).GetDigest +} + +func ExampleDSRecord_GetDigestType() { + _ = (*DSRecord).GetDigestType +} + +func ExampleDSRecord_GetJSON() { + _ = (*DSRecord).GetJSON +} + +func ExampleDSRecord_GetKeyTag() { + _ = (*DSRecord).GetKeyTag +} + +func ExampleDSRecord_GetSize() { + _ = (*DSRecord).GetSize +} + +func ExampleDSRecord_GetType() { + _ = (*DSRecord).GetType +} + +func ExampleDSRecord_Type() { + _ = (*DSRecord).Type +} + +func ExampleDecodeResource() { + _ = DecodeResource +} + +func ExampleGLUE4Record_FromJSON() { + _ = (*GLUE4Record).FromJSON +} + +func ExampleGLUE4Record_GetAddress() { + _ = (*GLUE4Record).GetAddress +} + +func ExampleGLUE4Record_GetJSON() { + _ = (*GLUE4Record).GetJSON +} + +func ExampleGLUE4Record_GetNS() { + _ = (*GLUE4Record).GetNS +} + +func ExampleGLUE4Record_GetSize() { + _ = (*GLUE4Record).GetSize +} + +func ExampleGLUE4Record_GetType() { + _ = (*GLUE4Record).GetType +} + +func ExampleGLUE4Record_Type() { + _ = (*GLUE4Record).Type +} + +func ExampleGLUE6Record_FromJSON() { + _ = (*GLUE6Record).FromJSON +} + +func ExampleGLUE6Record_GetAddress() { + _ = (*GLUE6Record).GetAddress +} + +func ExampleGLUE6Record_GetJSON() { + _ = (*GLUE6Record).GetJSON +} + +func ExampleGLUE6Record_GetNS() { + _ = (*GLUE6Record).GetNS +} + +func ExampleGLUE6Record_GetSize() { + _ = (*GLUE6Record).GetSize +} + +func ExampleGLUE6Record_GetType() { + _ = (*GLUE6Record).GetType +} + +func ExampleGLUE6Record_Type() { + _ = (*GLUE6Record).Type +} + +func ExampleGetCreate() { + _ = GetCreate +} + +func ExampleGetDecodeResource() { + _ = GetDecodeResource +} + +func ExampleGetDummy() { + _ = GetDummy +} + +func ExampleGetHSTypes() { + _ = GetHSTypes +} + +func ExampleGetHSTypesByVal() { + _ = GetHSTypesByVal +} + +func ExampleGetHash() { + _ = GetHash +} + +func ExampleGetHashBinary() { + _ = GetHashBinary +} + +func ExampleGetHashByBinary() { + _ = GetHashByBinary +} + +func ExampleGetHashByName() { + _ = GetHashByName +} + +func ExampleGetHashByString() { + _ = GetHashByString +} + +func ExampleGetHashName() { + _ = GetHashName +} + +func ExampleGetHashString() { + _ = GetHashString +} + +func ExampleGetNewResource() { + _ = GetNewResource +} + +func ExampleGetNextName() { + _ = GetNextName +} + +func ExampleGetPrevName() { + _ = GetPrevName +} + +func ExampleGetResolve() { + _ = GetResolve +} + +func ExampleGetResolveBinary() { + _ = GetResolveBinary +} + +func ExampleGetResolveByBinary() { + _ = GetResolveByBinary +} + +func ExampleGetResolveByName() { + _ = GetResolveByName +} + +func ExampleGetResolveByString() { + _ = GetResolveByString +} + +func ExampleGetResolveName() { + _ = GetResolveName +} + +func ExampleGetResolveString() { + _ = GetResolveString +} + +func ExampleGetServiceName() { + _ = GetServiceName +} + +func ExampleGetTypeMapA() { + _ = GetTypeMapA +} + +func ExampleGetTypeMapAAAA() { + _ = GetTypeMapAAAA +} + +func ExampleGetTypeMapEmpty() { + _ = GetTypeMapEmpty +} + +func ExampleGetTypeMapNS() { + _ = GetTypeMapNS +} + +func ExampleGetTypeMapRoot() { + _ = GetTypeMapRoot +} + +func ExampleGetTypeMapTXT() { + _ = GetTypeMapTXT +} + +func ExampleGetVerify() { + _ = GetVerify +} + +func ExampleGetVerifyBinary() { + _ = GetVerifyBinary +} + +func ExampleGetVerifyByBinary() { + _ = GetVerifyByBinary +} + +func ExampleGetVerifyByName() { + _ = GetVerifyByName +} + +func ExampleGetVerifyByString() { + _ = GetVerifyByString +} + +func ExampleGetVerifyName() { + _ = GetVerifyName +} + +func ExampleGetVerifyString() { + _ = GetVerifyString +} + +func ExampleHash() { + _ = Hash +} + +func ExampleHashBinary() { + _ = HashBinary +} + +func ExampleHashByBinary() { + _ = HashByBinary +} + +func ExampleHashByName() { + _ = HashByName +} + +func ExampleHashByString() { + _ = HashByString +} + +func ExampleHashName() { + _ = HashName +} + +func ExampleHashString() { + _ = HashString +} + +func ExampleNSECRecord_GetName() { + _ = (*NSECRecord).GetName +} + +func ExampleNSECRecord_GetNextDomain() { + _ = (*NSECRecord).GetNextDomain +} + +func ExampleNSECRecord_GetTTL() { + _ = (*NSECRecord).GetTTL +} + +func ExampleNSECRecord_GetTypeBitmap() { + _ = (*NSECRecord).GetTypeBitmap +} + +func ExampleNSRecord_FromJSON() { + _ = (*NSRecord).FromJSON +} + +func ExampleNSRecord_GetJSON() { + _ = (*NSRecord).GetJSON +} + +func ExampleNSRecord_GetNS() { + _ = (*NSRecord).GetNS +} + +func ExampleNSRecord_GetSize() { + _ = (*NSRecord).GetSize +} + +func ExampleNSRecord_GetType() { + _ = (*NSRecord).GetType +} + +func ExampleNSRecord_Type() { + _ = (*NSRecord).Type +} + +func ExampleNewService() { + _ = NewService +} + +func ExamplePrevName() { + _ = PrevName +} + +func ExampleResolve() { + _ = Resolve +} + +func ExampleResolveBinary() { + _ = ResolveBinary +} + +func ExampleResolveByBinary() { + _ = ResolveByBinary +} + +func ExampleResolveByName() { + _ = ResolveByName +} + +func ExampleResolveByString() { + _ = ResolveByString +} + +func ExampleResolveName() { + _ = ResolveName +} + +func ExampleResolveString() { + _ = ResolveString +} + +func ExampleResource_Decode() { + _ = (*Resource).Decode +} + +func ExampleResource_Encode() { + _ = (*Resource).Encode +} + +func ExampleResource_FromJSON() { + _ = (*Resource).FromJSON +} + +func ExampleResource_GetDecode() { + _ = (*Resource).GetDecode +} + +func ExampleResource_GetEncode() { + _ = (*Resource).GetEncode +} + +func ExampleResource_GetHasDS() { + _ = (*Resource).GetHasDS +} + +func ExampleResource_GetHasNS() { + _ = (*Resource).GetHasNS +} + +func ExampleResource_GetHasType() { + _ = (*Resource).GetHasType +} + +func ExampleResource_GetJSON() { + _ = (*Resource).GetJSON +} + +func ExampleResource_GetRecords() { + _ = (*Resource).GetRecords +} + +func ExampleResource_GetSize() { + _ = (*Resource).GetSize +} + +func ExampleResource_GetTTL() { + _ = (*Resource).GetTTL +} + +func ExampleResource_GetToDNS() { + _ = (*Resource).GetToDNS +} + +func ExampleResource_GetToDS() { + _ = (*Resource).GetToDS +} + +func ExampleResource_GetToGlue() { + _ = (*Resource).GetToGlue +} + +func ExampleResource_GetToNS() { + _ = (*Resource).GetToNS +} + +func ExampleResource_GetToNSEC() { + _ = (*Resource).GetToNSEC +} + +func ExampleResource_GetToReferral() { + _ = (*Resource).GetToReferral +} + +func ExampleResource_GetToTXT() { + _ = (*Resource).GetToTXT +} + +func ExampleResource_GetToZone() { + _ = (*Resource).GetToZone +} + +func ExampleResource_HasDS() { + _ = (*Resource).HasDS +} + +func ExampleResource_HasNS() { + _ = (*Resource).HasNS +} + +func ExampleResource_HasType() { + _ = (*Resource).HasType +} + +func ExampleResource_ToDNS() { + _ = (*Resource).ToDNS +} + +func ExampleResource_ToDS() { + _ = (*Resource).ToDS +} + +func ExampleResource_ToGlue() { + _ = (*Resource).ToGlue +} + +func ExampleResource_ToNS() { + _ = (*Resource).ToNS +} + +func ExampleResource_ToNSEC() { + _ = (*Resource).ToNSEC +} + +func ExampleResource_ToReferral() { + _ = (*Resource).ToReferral +} + +func ExampleResource_ToTXT() { + _ = (*Resource).ToTXT +} + +func ExampleResource_ToZone() { + _ = (*Resource).ToZone +} + +func ExampleSYNTH4Record_FromJSON() { + _ = (*SYNTH4Record).FromJSON +} + +func ExampleSYNTH4Record_GetAddress() { + _ = (*SYNTH4Record).GetAddress +} + +func ExampleSYNTH4Record_GetJSON() { + _ = (*SYNTH4Record).GetJSON +} + +func ExampleSYNTH4Record_GetNS() { + _ = (*SYNTH4Record).GetNS +} + +func ExampleSYNTH4Record_GetSize() { + _ = (*SYNTH4Record).GetSize +} + +func ExampleSYNTH4Record_GetType() { + _ = (*SYNTH4Record).GetType +} + +func ExampleSYNTH4Record_NS() { + _ = (*SYNTH4Record).NS +} + +func ExampleSYNTH4Record_Type() { + _ = (*SYNTH4Record).Type +} + +func ExampleSYNTH6Record_FromJSON() { + _ = (*SYNTH6Record).FromJSON +} + +func ExampleSYNTH6Record_GetAddress() { + _ = (*SYNTH6Record).GetAddress +} + +func ExampleSYNTH6Record_GetJSON() { + _ = (*SYNTH6Record).GetJSON +} + +func ExampleSYNTH6Record_GetNS() { + _ = (*SYNTH6Record).GetNS +} + +func ExampleSYNTH6Record_GetSize() { + _ = (*SYNTH6Record).GetSize +} + +func ExampleSYNTH6Record_GetType() { + _ = (*SYNTH6Record).GetType +} + +func ExampleSYNTH6Record_NS() { + _ = (*SYNTH6Record).NS +} + +func ExampleSYNTH6Record_Type() { + _ = (*SYNTH6Record).Type +} + +func ExampleService_Core() { + _ = (*Service).Core +} + +func ExampleService_GetCore() { + _ = (*Service).GetCore +} + +func ExampleService_GetHash() { + _ = (*Service).GetHash +} + +func ExampleService_GetHashBinary() { + _ = (*Service).GetHashBinary +} + +func ExampleService_GetHashByBinary() { + _ = (*Service).GetHashByBinary +} + +func ExampleService_GetHashByName() { + _ = (*Service).GetHashByName +} + +func ExampleService_GetHashByString() { + _ = (*Service).GetHashByString +} + +func ExampleService_GetHashName() { + _ = (*Service).GetHashName +} + +func ExampleService_GetHashString() { + _ = (*Service).GetHashString +} + +func ExampleService_GetResolve() { + _ = (*Service).GetResolve +} + +func ExampleService_GetResolveBinary() { + _ = (*Service).GetResolveBinary +} + +func ExampleService_GetResolveByBinary() { + _ = (*Service).GetResolveByBinary +} + +func ExampleService_GetResolveByName() { + _ = (*Service).GetResolveByName +} + +func ExampleService_GetResolveByString() { + _ = (*Service).GetResolveByString +} + +func ExampleService_GetResolveName() { + _ = (*Service).GetResolveName +} + +func ExampleService_GetResolveString() { + _ = (*Service).GetResolveString +} + +func ExampleService_GetServiceName() { + _ = (*Service).GetServiceName +} + +func ExampleService_GetVerify() { + _ = (*Service).GetVerify +} + +func ExampleService_GetVerifyBinary() { + _ = (*Service).GetVerifyBinary +} + +func ExampleService_GetVerifyByBinary() { + _ = (*Service).GetVerifyByBinary +} + +func ExampleService_GetVerifyByName() { + _ = (*Service).GetVerifyByName +} + +func ExampleService_GetVerifyByString() { + _ = (*Service).GetVerifyByString +} + +func ExampleService_GetVerifyName() { + _ = (*Service).GetVerifyName +} + +func ExampleService_GetVerifyString() { + _ = (*Service).GetVerifyString +} + +func ExampleService_Hash() { + _ = (*Service).Hash +} + +func ExampleService_HashBinary() { + _ = (*Service).HashBinary +} + +func ExampleService_HashByBinary() { + _ = (*Service).HashByBinary +} + +func ExampleService_HashByName() { + _ = (*Service).HashByName +} + +func ExampleService_HashByString() { + _ = (*Service).HashByString +} + +func ExampleService_HashName() { + _ = (*Service).HashName +} + +func ExampleService_HashString() { + _ = (*Service).HashString +} + +func ExampleService_Resolve() { + _ = (*Service).Resolve +} + +func ExampleService_ResolveBinary() { + _ = (*Service).ResolveBinary +} + +func ExampleService_ResolveByBinary() { + _ = (*Service).ResolveByBinary +} + +func ExampleService_ResolveByName() { + _ = (*Service).ResolveByName +} + +func ExampleService_ResolveByString() { + _ = (*Service).ResolveByString +} + +func ExampleService_ResolveName() { + _ = (*Service).ResolveName +} + +func ExampleService_ResolveString() { + _ = (*Service).ResolveString +} + +func ExampleService_ServiceName() { + _ = (*Service).ServiceName +} + +func ExampleService_Verify() { + _ = (*Service).Verify +} + +func ExampleService_VerifyBinary() { + _ = (*Service).VerifyBinary +} + +func ExampleService_VerifyByBinary() { + _ = (*Service).VerifyByBinary +} + +func ExampleService_VerifyByName() { + _ = (*Service).VerifyByName +} + +func ExampleService_VerifyByString() { + _ = (*Service).VerifyByString +} + +func ExampleService_VerifyName() { + _ = (*Service).VerifyName +} + +func ExampleService_VerifyString() { + _ = (*Service).VerifyString +} + +func ExampleTXTRecord_FromJSON() { + _ = (*TXTRecord).FromJSON +} + +func ExampleTXTRecord_GetEntries() { + _ = (*TXTRecord).GetEntries +} + +func ExampleTXTRecord_GetJSON() { + _ = (*TXTRecord).GetJSON +} + +func ExampleTXTRecord_GetSize() { + _ = (*TXTRecord).GetSize +} + +func ExampleTXTRecord_GetType() { + _ = (*TXTRecord).GetType +} + +func ExampleTXTRecord_Type() { + _ = (*TXTRecord).Type +} + +func ExampleVerify() { + _ = Verify +} + +func ExampleVerifyBinary() { + _ = VerifyBinary +} + +func ExampleVerifyByBinary() { + _ = VerifyByBinary +} + +func ExampleVerifyByName() { + _ = VerifyByName +} + +func ExampleVerifyByString() { + _ = VerifyByString +} + +func ExampleVerifyName() { + _ = VerifyName +} + +func ExampleWithCore() { + _ = WithCore +} diff --git a/pkg/primitives/zz_codex_examples_example_test.go b/pkg/primitives/zz_codex_examples_example_test.go new file mode 100644 index 0000000..292e7fd --- /dev/null +++ b/pkg/primitives/zz_codex_examples_example_test.go @@ -0,0 +1,699 @@ +package primitives + +// Code generated by Codex. DO NOT EDIT. + +func ExampleAddress_Clone() { + _ = (*Address).Clone +} + +func ExampleAddress_Compare() { + _ = (*Address).Compare +} + +func ExampleAddress_Equals() { + _ = (*Address).Equals +} + +func ExampleAddress_GetSize() { + _ = (*Address).GetSize +} + +func ExampleAddress_Inject() { + _ = (*Address).Inject +} + +func ExampleAddress_IsNull() { + _ = (*Address).IsNull +} + +func ExampleAddress_IsNulldata() { + _ = (*Address).IsNulldata +} + +func ExampleAddress_IsPubkeyHash() { + _ = (*Address).IsPubkeyHash +} + +func ExampleAddress_IsScripthash() { + _ = (*Address).IsScripthash +} + +func ExampleAddress_IsUnknown() { + _ = (*Address).IsUnknown +} + +func ExampleAddress_IsUnspendable() { + _ = (*Address).IsUnspendable +} + +func ExampleAddress_IsValid() { + _ = (*Address).IsValid +} + +func ExampleClaim_Clone() { + _ = (*Claim).Clone +} + +func ExampleClaim_FromBlob() { + _ = (*Claim).FromBlob +} + +func ExampleClaim_GetBlob() { + _ = (*Claim).GetBlob +} + +func ExampleClaim_GetFromBlob() { + _ = (*Claim).GetFromBlob +} + +func ExampleClaim_GetHash() { + _ = (*Claim).GetHash +} + +func ExampleClaim_GetHashHex() { + _ = (*Claim).GetHashHex +} + +func ExampleClaim_GetSize() { + _ = (*Claim).GetSize +} + +func ExampleClaim_GetToBlob() { + _ = (*Claim).GetToBlob +} + +func ExampleClaim_GetToInv() { + _ = (*Claim).GetToInv +} + +func ExampleClaim_GetVirtualSize() { + _ = (*Claim).GetVirtualSize +} + +func ExampleClaim_GetWeight() { + _ = (*Claim).GetWeight +} + +func ExampleClaim_Hash() { + _ = (*Claim).Hash +} + +func ExampleClaim_HashHex() { + _ = (*Claim).HashHex +} + +func ExampleClaim_MarshalBinary() { + _ = (*Claim).MarshalBinary +} + +func ExampleClaim_Refresh() { + _ = (*Claim).Refresh +} + +func ExampleClaim_ToBlob() { + _ = (*Claim).ToBlob +} + +func ExampleClaim_ToInv() { + _ = (*Claim).ToInv +} + +func ExampleClaim_UnmarshalBinary() { + _ = (*Claim).UnmarshalBinary +} + +func ExampleClaim_VirtualSize() { + _ = (*Claim).VirtualSize +} + +func ExampleClaim_Weight() { + _ = (*Claim).Weight +} + +func ExampleCovenant_Clone() { + _ = (*Covenant).Clone +} + +func ExampleCovenant_FromArray() { + _ = (*Covenant).FromArray +} + +func ExampleCovenant_FromJSON() { + _ = (*Covenant).FromJSON +} + +func ExampleCovenant_Get() { + _ = (*Covenant).Get +} + +func ExampleCovenant_GetHash() { + _ = (*Covenant).GetHash +} + +func ExampleCovenant_GetJSON() { + _ = (*Covenant).GetJSON +} + +func ExampleCovenant_GetSize() { + _ = (*Covenant).GetSize +} + +func ExampleCovenant_GetString() { + _ = (*Covenant).GetString +} + +func ExampleCovenant_GetU32() { + _ = (*Covenant).GetU32 +} + +func ExampleCovenant_GetU8() { + _ = (*Covenant).GetU8 +} + +func ExampleCovenant_GetVarSize() { + _ = (*Covenant).GetVarSize +} + +func ExampleCovenant_IndexOf() { + _ = (*Covenant).IndexOf +} + +func ExampleCovenant_Inject() { + _ = (*Covenant).Inject +} + +func ExampleCovenant_IsBid() { + _ = (*Covenant).IsBid +} + +func ExampleCovenant_IsClaim() { + _ = (*Covenant).IsClaim +} + +func ExampleCovenant_IsDustworthy() { + _ = (*Covenant).IsDustworthy +} + +func ExampleCovenant_IsFinalize() { + _ = (*Covenant).IsFinalize +} + +func ExampleCovenant_IsKnown() { + _ = (*Covenant).IsKnown +} + +func ExampleCovenant_IsLinked() { + _ = (*Covenant).IsLinked +} + +func ExampleCovenant_IsName() { + _ = (*Covenant).IsName +} + +func ExampleCovenant_IsNone() { + _ = (*Covenant).IsNone +} + +func ExampleCovenant_IsNonspendable() { + _ = (*Covenant).IsNonspendable +} + +func ExampleCovenant_IsOpen() { + _ = (*Covenant).IsOpen +} + +func ExampleCovenant_IsRedeem() { + _ = (*Covenant).IsRedeem +} + +func ExampleCovenant_IsRegister() { + _ = (*Covenant).IsRegister +} + +func ExampleCovenant_IsRenew() { + _ = (*Covenant).IsRenew +} + +func ExampleCovenant_IsReveal() { + _ = (*Covenant).IsReveal +} + +func ExampleCovenant_IsRevoke() { + _ = (*Covenant).IsRevoke +} + +func ExampleCovenant_IsTransfer() { + _ = (*Covenant).IsTransfer +} + +func ExampleCovenant_IsUnknown() { + _ = (*Covenant).IsUnknown +} + +func ExampleCovenant_IsUnspendable() { + _ = (*Covenant).IsUnspendable +} + +func ExampleCovenant_IsUpdate() { + _ = (*Covenant).IsUpdate +} + +func ExampleCovenant_Len() { + _ = (*Covenant).Len +} + +func ExampleCovenant_MarshalBinary() { + _ = (*Covenant).MarshalBinary +} + +func ExampleCovenant_Push() { + _ = (*Covenant).Push +} + +func ExampleCovenant_PushHash() { + _ = (*Covenant).PushHash +} + +func ExampleCovenant_PushString() { + _ = (*Covenant).PushString +} + +func ExampleCovenant_PushU32() { + _ = (*Covenant).PushU32 +} + +func ExampleCovenant_PushU8() { + _ = (*Covenant).PushU8 +} + +func ExampleCovenant_Set() { + _ = (*Covenant).Set +} + +func ExampleCovenant_SetBid() { + _ = (*Covenant).SetBid +} + +func ExampleCovenant_SetClaim() { + _ = (*Covenant).SetClaim +} + +func ExampleCovenant_SetFinalize() { + _ = (*Covenant).SetFinalize +} + +func ExampleCovenant_SetNone() { + _ = (*Covenant).SetNone +} + +func ExampleCovenant_SetOpen() { + _ = (*Covenant).SetOpen +} + +func ExampleCovenant_SetRedeem() { + _ = (*Covenant).SetRedeem +} + +func ExampleCovenant_SetRegister() { + _ = (*Covenant).SetRegister +} + +func ExampleCovenant_SetRenew() { + _ = (*Covenant).SetRenew +} + +func ExampleCovenant_SetReveal() { + _ = (*Covenant).SetReveal +} + +func ExampleCovenant_SetRevoke() { + _ = (*Covenant).SetRevoke +} + +func ExampleCovenant_SetTransfer() { + _ = (*Covenant).SetTransfer +} + +func ExampleCovenant_SetUpdate() { + _ = (*Covenant).SetUpdate +} + +func ExampleCovenant_ToArray() { + _ = (*Covenant).ToArray +} + +func ExampleCovenant_UnmarshalBinary() { + _ = (*Covenant).UnmarshalBinary +} + +func ExampleGetNewClaim() { + _ = GetNewClaim +} + +func ExampleGetNewInvItem() { + _ = GetNewInvItem +} + +func ExampleInput_IsCoinbase() { + _ = (*Input).IsCoinbase +} + +func ExampleInput_IsFinal() { + _ = (*Input).IsFinal +} + +func ExampleInvItem_GetSize() { + _ = (*InvItem).GetSize +} + +func ExampleInvItem_IsAirdrop() { + _ = (*InvItem).IsAirdrop +} + +func ExampleInvItem_IsBlock() { + _ = (*InvItem).IsBlock +} + +func ExampleInvItem_IsClaim() { + _ = (*InvItem).IsClaim +} + +func ExampleInvItem_IsTX() { + _ = (*InvItem).IsTX +} + +func ExampleInvItem_MarshalBinary() { + _ = (*InvItem).MarshalBinary +} + +func ExampleInvItem_UnmarshalBinary() { + _ = (*InvItem).UnmarshalBinary +} + +func ExampleNameDelta_Clear() { + _ = (*NameDelta).Clear +} + +func ExampleNameDelta_Clone() { + _ = (*NameDelta).Clone +} + +func ExampleNameDelta_GetField() { + _ = (*NameDelta).GetField +} + +func ExampleNameDelta_GetSize() { + _ = (*NameDelta).GetSize +} + +func ExampleNameDelta_Inject() { + _ = (*NameDelta).Inject +} + +func ExampleNameDelta_IsNull() { + _ = (*NameDelta).IsNull +} + +func ExampleNameDelta_MarshalBinary() { + _ = (*NameDelta).MarshalBinary +} + +func ExampleNameDelta_UnmarshalBinary() { + _ = (*NameDelta).UnmarshalBinary +} + +func ExampleNameStateStatus_String() { + _ = (*NameStateStatus).String +} + +func ExampleNameState_ApplyState() { + _ = (*NameState).ApplyState +} + +func ExampleNameState_Clear() { + _ = (*NameState).Clear +} + +func ExampleNameState_Clone() { + _ = (*NameState).Clone +} + +func ExampleNameState_Delta() { + _ = (*NameState).Delta +} + +func ExampleNameState_Format() { + _ = (*NameState).Format +} + +func ExampleNameState_FromJSON() { + _ = (*NameState).FromJSON +} + +func ExampleNameState_GetApplyState() { + _ = (*NameState).GetApplyState +} + +func ExampleNameState_GetClear() { + _ = (*NameState).GetClear +} + +func ExampleNameState_GetClone() { + _ = (*NameState).GetClone +} + +func ExampleNameState_GetDelta() { + _ = (*NameState).GetDelta +} + +func ExampleNameState_GetFormat() { + _ = (*NameState).GetFormat +} + +func ExampleNameState_GetFromJSON() { + _ = (*NameState).GetFromJSON +} + +func ExampleNameState_GetHasDelta() { + _ = (*NameState).GetHasDelta +} + +func ExampleNameState_GetInject() { + _ = (*NameState).GetInject +} + +func ExampleNameState_GetIsBidding() { + _ = (*NameState).GetIsBidding +} + +func ExampleNameState_GetIsClaimable() { + _ = (*NameState).GetIsClaimable +} + +func ExampleNameState_GetIsClosed() { + _ = (*NameState).GetIsClosed +} + +func ExampleNameState_GetIsExpired() { + _ = (*NameState).GetIsExpired +} + +func ExampleNameState_GetIsLocked() { + _ = (*NameState).GetIsLocked +} + +func ExampleNameState_GetIsNull() { + _ = (*NameState).GetIsNull +} + +func ExampleNameState_GetIsOpening() { + _ = (*NameState).GetIsOpening +} + +func ExampleNameState_GetIsRedeemable() { + _ = (*NameState).GetIsRedeemable +} + +func ExampleNameState_GetIsReveal() { + _ = (*NameState).GetIsReveal +} + +func ExampleNameState_GetIsRevoked() { + _ = (*NameState).GetIsRevoked +} + +func ExampleNameState_GetJSON() { + _ = (*NameState).GetJSON +} + +func ExampleNameState_GetMaybeExpire() { + _ = (*NameState).GetMaybeExpire +} + +func ExampleNameState_GetReset() { + _ = (*NameState).GetReset +} + +func ExampleNameState_GetSet() { + _ = (*NameState).GetSet +} + +func ExampleNameState_GetSize() { + _ = (*NameState).GetSize +} + +func ExampleNameState_GetState() { + _ = (*NameState).GetState +} + +func ExampleNameState_GetToStats() { + _ = (*NameState).GetToStats +} + +func ExampleNameState_HasDelta() { + _ = (*NameState).HasDelta +} + +func ExampleNameState_Inject() { + _ = (*NameState).Inject +} + +func ExampleNameState_IsBidding() { + _ = (*NameState).IsBidding +} + +func ExampleNameState_IsClaimable() { + _ = (*NameState).IsClaimable +} + +func ExampleNameState_IsClosed() { + _ = (*NameState).IsClosed +} + +func ExampleNameState_IsExpired() { + _ = (*NameState).IsExpired +} + +func ExampleNameState_IsLocked() { + _ = (*NameState).IsLocked +} + +func ExampleNameState_IsNull() { + _ = (*NameState).IsNull +} + +func ExampleNameState_IsOpening() { + _ = (*NameState).IsOpening +} + +func ExampleNameState_IsRedeemable() { + _ = (*NameState).IsRedeemable +} + +func ExampleNameState_IsReveal() { + _ = (*NameState).IsReveal +} + +func ExampleNameState_IsRevoked() { + _ = (*NameState).IsRevoked +} + +func ExampleNameState_MarshalBinary() { + _ = (*NameState).MarshalBinary +} + +func ExampleNameState_MaybeExpire() { + _ = (*NameState).MaybeExpire +} + +func ExampleNameState_Reset() { + _ = (*NameState).Reset +} + +func ExampleNameState_Set() { + _ = (*NameState).Set +} + +func ExampleNameState_State() { + _ = (*NameState).State +} + +func ExampleNameState_ToStats() { + _ = (*NameState).ToStats +} + +func ExampleNameState_UnmarshalBinary() { + _ = (*NameState).UnmarshalBinary +} + +func ExampleNameUndo_FromView() { + _ = (*NameUndo).FromView +} + +func ExampleNameUndo_GetSize() { + _ = (*NameUndo).GetSize +} + +func ExampleNameUndo_MarshalBinary() { + _ = (*NameUndo).MarshalBinary +} + +func ExampleNameUndo_UnmarshalBinary() { + _ = (*NameUndo).UnmarshalBinary +} + +func ExampleNameView_GetNameState() { + _ = (*NameView).GetNameState +} + +func ExampleNameView_GetNameStateSync() { + _ = (*NameView).GetNameStateSync +} + +func ExampleNameView_ToNameUndo() { + _ = (*NameView).ToNameUndo +} + +func ExampleOutpoint_Clone() { + _ = (*Outpoint).Clone +} + +func ExampleOutpoint_Compare() { + _ = (*Outpoint).Compare +} + +func ExampleOutpoint_Equals() { + _ = (*Outpoint).Equals +} + +func ExampleOutpoint_FromJSON() { + _ = (*Outpoint).FromJSON +} + +func ExampleOutpoint_GetJSON() { + _ = (*Outpoint).GetJSON +} + +func ExampleOutpoint_GetSize() { + _ = (*Outpoint).GetSize +} + +func ExampleOutpoint_Inject() { + _ = (*Outpoint).Inject +} + +func ExampleOutpoint_IsNull() { + _ = (*Outpoint).IsNull +} + +func ExampleOutpoint_MarshalBinary() { + _ = (*Outpoint).MarshalBinary +} + +func ExampleOutpoint_UnmarshalBinary() { + _ = (*Outpoint).UnmarshalBinary +} + +func ExampleOutput_IsUnspendable() { + _ = (*Output).IsUnspendable +} diff --git a/zz_codex_examples_example_test.go b/zz_codex_examples_example_test.go new file mode 100644 index 0000000..26d1448 --- /dev/null +++ b/zz_codex_examples_example_test.go @@ -0,0 +1,1959 @@ +package lns + +// Code generated by Codex. DO NOT EDIT. + +func ExampleAddNames() { + _ = AddNames +} + +func ExampleBlind() { + _ = Blind +} + +func ExampleCountOpens() { + _ = CountOpens +} + +func ExampleCountRenewals() { + _ = CountRenewals +} + +func ExampleCountUpdates() { + _ = CountUpdates +} + +func ExampleCreate() { + _ = Create +} + +func ExampleDecodeResource() { + _ = DecodeResource +} + +func ExampleDefaultLockedCatalog() { + _ = DefaultLockedCatalog +} + +func ExampleDefaultReservedCatalog() { + _ = DefaultReservedCatalog +} + +func ExampleGetAddNames() { + _ = GetAddNames +} + +func ExampleGetBlacklist() { + _ = GetBlacklist +} + +func ExampleGetBlind() { + _ = GetBlind +} + +func ExampleGetCountOpens() { + _ = GetCountOpens +} + +func ExampleGetCountRenewals() { + _ = GetCountRenewals +} + +func ExampleGetCountUpdates() { + _ = GetCountUpdates +} + +func ExampleGetCovenantMaxSize() { + _ = GetCovenantMaxSize +} + +func ExampleGetCreate() { + _ = GetCreate +} + +func ExampleGetDecodeResource() { + _ = GetDecodeResource +} + +func ExampleGetDefaultLockedCatalog() { + _ = GetDefaultLockedCatalog +} + +func ExampleGetDefaultReservedCatalog() { + _ = GetDefaultReservedCatalog +} + +func ExampleGetDefaultTTL() { + _ = GetDefaultTTL +} + +func ExampleGetDummy() { + _ = GetDummy +} + +func ExampleGetGrindName() { + _ = GetGrindName +} + +func ExampleGetHSTypes() { + _ = GetHSTypes +} + +func ExampleGetHSTypesByVal() { + _ = GetHSTypesByVal +} + +func ExampleGetHasLocked() { + _ = GetHasLocked +} + +func ExampleGetHasLockedBinary() { + _ = GetHasLockedBinary +} + +func ExampleGetHasLockedByBinary() { + _ = GetHasLockedByBinary +} + +func ExampleGetHasLockedByHash() { + _ = GetHasLockedByHash +} + +func ExampleGetHasLockedByName() { + _ = GetHasLockedByName +} + +func ExampleGetHasLockedByString() { + _ = GetHasLockedByString +} + +func ExampleGetHasLockedCatalog() { + _ = GetHasLockedCatalog +} + +func ExampleGetHasLockedHash() { + _ = GetHasLockedHash +} + +func ExampleGetHasLockedName() { + _ = GetHasLockedName +} + +func ExampleGetHasLockedString() { + _ = GetHasLockedString +} + +func ExampleGetHasLookupCatalogName() { + _ = GetHasLookupCatalogName[any] +} + +func ExampleGetHasNames() { + _ = GetHasNames +} + +func ExampleGetHasReserved() { + _ = GetHasReserved +} + +func ExampleGetHasReservedBinary() { + _ = GetHasReservedBinary +} + +func ExampleGetHasReservedByBinary() { + _ = GetHasReservedByBinary +} + +func ExampleGetHasReservedByHash() { + _ = GetHasReservedByHash +} + +func ExampleGetHasReservedByName() { + _ = GetHasReservedByName +} + +func ExampleGetHasReservedByString() { + _ = GetHasReservedByString +} + +func ExampleGetHasReservedCatalog() { + _ = GetHasReservedCatalog +} + +func ExampleGetHasReservedHash() { + _ = GetHasReservedHash +} + +func ExampleGetHasReservedName() { + _ = GetHasReservedName +} + +func ExampleGetHasReservedString() { + _ = GetHasReservedString +} + +func ExampleGetHasRollout() { + _ = GetHasRollout +} + +func ExampleGetHasSaneCovenants() { + _ = GetHasSaneCovenants +} + +func ExampleGetHash() { + _ = GetHash +} + +func ExampleGetHashBinary() { + _ = GetHashBinary +} + +func ExampleGetHashByBinary() { + _ = GetHashByBinary +} + +func ExampleGetHashByName() { + _ = GetHashByName +} + +func ExampleGetHashByString() { + _ = GetHashByString +} + +func ExampleGetHashName() { + _ = GetHashName +} + +func ExampleGetHashString() { + _ = GetHashString +} + +func ExampleGetIsKnown() { + _ = GetIsKnown +} + +func ExampleGetIsLinked() { + _ = GetIsLinked +} + +func ExampleGetIsLockedUp() { + _ = GetIsLockedUp +} + +func ExampleGetIsName() { + _ = GetIsName +} + +func ExampleGetIsReserved() { + _ = GetIsReserved +} + +func ExampleGetLocked() { + _ = GetLocked +} + +func ExampleGetLockedBinary() { + _ = GetLockedBinary +} + +func ExampleGetLockedByBinary() { + _ = GetLockedByBinary +} + +func ExampleGetLockedByHash() { + _ = GetLockedByHash +} + +func ExampleGetLockedByName() { + _ = GetLockedByName +} + +func ExampleGetLockedByString() { + _ = GetLockedByString +} + +func ExampleGetLockedCatalog() { + _ = GetLockedCatalog +} + +func ExampleGetLockedEntries() { + _ = GetLockedEntries +} + +func ExampleGetLockedHash() { + _ = GetLockedHash +} + +func ExampleGetLockedKeys() { + _ = GetLockedKeys +} + +func ExampleGetLockedName() { + _ = GetLockedName +} + +func ExampleGetLockedPrefixSize() { + _ = GetLockedPrefixSize +} + +func ExampleGetLockedSize() { + _ = GetLockedSize +} + +func ExampleGetLockedString() { + _ = GetLockedString +} + +func ExampleGetLockedValues() { + _ = GetLockedValues +} + +func ExampleGetLookupCatalogName() { + _ = GetLookupCatalogName[any] +} + +func ExampleGetMandatoryVerifyCovenantFlags() { + _ = GetMandatoryVerifyCovenantFlags +} + +func ExampleGetMaxCovenantSize() { + _ = GetMaxCovenantSize +} + +func ExampleGetMaxNameSize() { + _ = GetMaxNameSize +} + +func ExampleGetMaxResourceSize() { + _ = GetMaxResourceSize +} + +func ExampleGetNameValue() { + _ = GetNameValue +} + +func ExampleGetNewClaim() { + _ = GetNewClaim +} + +func ExampleGetNewInvItem() { + _ = GetNewInvItem +} + +func ExampleGetNewNameView() { + _ = GetNewNameView +} + +func ExampleGetNewOutpoint() { + _ = GetNewOutpoint +} + +func ExampleGetNewResource() { + _ = GetNewResource +} + +func ExampleGetNewService() { + _ = GetNewService +} + +func ExampleGetNewServiceWithOptions() { + _ = GetNewServiceWithOptions +} + +func ExampleGetNextName() { + _ = GetNextName +} + +func ExampleGetPrefixSize() { + _ = GetPrefixSize +} + +func ExampleGetPrevName() { + _ = GetPrevName +} + +func ExampleGetRegister() { + _ = GetRegister +} + +func ExampleGetRegisterWithOptions() { + _ = GetRegisterWithOptions +} + +func ExampleGetRemoveNames() { + _ = GetRemoveNames +} + +func ExampleGetReserved() { + _ = GetReserved +} + +func ExampleGetReservedBinary() { + _ = GetReservedBinary +} + +func ExampleGetReservedByBinary() { + _ = GetReservedByBinary +} + +func ExampleGetReservedByHash() { + _ = GetReservedByHash +} + +func ExampleGetReservedByName() { + _ = GetReservedByName +} + +func ExampleGetReservedByString() { + _ = GetReservedByString +} + +func ExampleGetReservedCatalog() { + _ = GetReservedCatalog +} + +func ExampleGetReservedEntries() { + _ = GetReservedEntries +} + +func ExampleGetReservedHash() { + _ = GetReservedHash +} + +func ExampleGetReservedKeys() { + _ = GetReservedKeys +} + +func ExampleGetReservedName() { + _ = GetReservedName +} + +func ExampleGetReservedNameValue() { + _ = GetReservedNameValue +} + +func ExampleGetReservedPrefixSize() { + _ = GetReservedPrefixSize +} + +func ExampleGetReservedRootValue() { + _ = GetReservedRootValue +} + +func ExampleGetReservedSize() { + _ = GetReservedSize +} + +func ExampleGetReservedString() { + _ = GetReservedString +} + +func ExampleGetReservedTopValue() { + _ = GetReservedTopValue +} + +func ExampleGetReservedValues() { + _ = GetReservedValues +} + +func ExampleGetResolve() { + _ = GetResolve +} + +func ExampleGetResolveBinary() { + _ = GetResolveBinary +} + +func ExampleGetResolveByBinary() { + _ = GetResolveByBinary +} + +func ExampleGetResolveByName() { + _ = GetResolveByName +} + +func ExampleGetResolveByString() { + _ = GetResolveByString +} + +func ExampleGetResolveName() { + _ = GetResolveName +} + +func ExampleGetResolveString() { + _ = GetResolveString +} + +func ExampleGetRollout() { + _ = GetRollout +} + +func ExampleGetRootValue() { + _ = GetRootValue +} + +func ExampleGetTopValue() { + _ = GetTopValue +} + +func ExampleGetTypeMapA() { + _ = GetTypeMapA +} + +func ExampleGetTypeMapAAAA() { + _ = GetTypeMapAAAA +} + +func ExampleGetTypeMapEmpty() { + _ = GetTypeMapEmpty +} + +func ExampleGetTypeMapNS() { + _ = GetTypeMapNS +} + +func ExampleGetTypeMapRoot() { + _ = GetTypeMapRoot +} + +func ExampleGetTypeMapTXT() { + _ = GetTypeMapTXT +} + +func ExampleGetTypeName() { + _ = GetTypeName +} + +func ExampleGetTypes() { + _ = GetTypes +} + +func ExampleGetTypesByVal() { + _ = GetTypesByVal +} + +func ExampleGetVerificationFlags() { + _ = GetVerificationFlags +} + +func ExampleGetVerificationFlagsByVal() { + _ = GetVerificationFlagsByVal +} + +func ExampleGetVerify() { + _ = GetVerify +} + +func ExampleGetVerifyBinary() { + _ = GetVerifyBinary +} + +func ExampleGetVerifyByBinary() { + _ = GetVerifyByBinary +} + +func ExampleGetVerifyByName() { + _ = GetVerifyByName +} + +func ExampleGetVerifyByString() { + _ = GetVerifyByString +} + +func ExampleGetVerifyCovenants() { + _ = GetVerifyCovenants +} + +func ExampleGetVerifyCovenantsHardened() { + _ = GetVerifyCovenantsHardened +} + +func ExampleGetVerifyCovenantsLockup() { + _ = GetVerifyCovenantsLockup +} + +func ExampleGetVerifyCovenantsNone() { + _ = GetVerifyCovenantsNone +} + +func ExampleGetVerifyName() { + _ = GetVerifyName +} + +func ExampleGetVerifyString() { + _ = GetVerifyString +} + +func ExampleGetWithCore() { + _ = GetWithCore +} + +func ExampleGetWithLockedCatalog() { + _ = GetWithLockedCatalog +} + +func ExampleGetWithReservedCatalog() { + _ = GetWithReservedCatalog +} + +func ExampleGrindName() { + _ = GrindName +} + +func ExampleHasLocked() { + _ = HasLocked +} + +func ExampleHasLockedBinary() { + _ = HasLockedBinary +} + +func ExampleHasLockedByBinary() { + _ = HasLockedByBinary +} + +func ExampleHasLockedByHash() { + _ = HasLockedByHash +} + +func ExampleHasLockedByName() { + _ = HasLockedByName +} + +func ExampleHasLockedByString() { + _ = HasLockedByString +} + +func ExampleHasLockedCatalog() { + _ = HasLockedCatalog +} + +func ExampleHasLockedHash() { + _ = HasLockedHash +} + +func ExampleHasLockedName() { + _ = HasLockedName +} + +func ExampleHasLockedString() { + _ = HasLockedString +} + +func ExampleHasLookupCatalogName() { + _ = HasLookupCatalogName[any] +} + +func ExampleHasNames() { + _ = HasNames +} + +func ExampleHasReserved() { + _ = HasReserved +} + +func ExampleHasReservedBinary() { + _ = HasReservedBinary +} + +func ExampleHasReservedByBinary() { + _ = HasReservedByBinary +} + +func ExampleHasReservedByHash() { + _ = HasReservedByHash +} + +func ExampleHasReservedByName() { + _ = HasReservedByName +} + +func ExampleHasReservedByString() { + _ = HasReservedByString +} + +func ExampleHasReservedCatalog() { + _ = HasReservedCatalog +} + +func ExampleHasReservedHash() { + _ = HasReservedHash +} + +func ExampleHasReservedName() { + _ = HasReservedName +} + +func ExampleHasReservedString() { + _ = HasReservedString +} + +func ExampleHasRollout() { + _ = HasRollout +} + +func ExampleHasSaneCovenants() { + _ = HasSaneCovenants +} + +func ExampleHash() { + _ = Hash +} + +func ExampleHashBinary() { + _ = HashBinary +} + +func ExampleHashByBinary() { + _ = HashByBinary +} + +func ExampleHashByName() { + _ = HashByName +} + +func ExampleHashByString() { + _ = HashByString +} + +func ExampleHashName() { + _ = HashName +} + +func ExampleHashString() { + _ = HashString +} + +func ExampleIsKnown() { + _ = IsKnown +} + +func ExampleIsLinked() { + _ = IsLinked +} + +func ExampleIsLockedUp() { + _ = IsLockedUp +} + +func ExampleIsName() { + _ = IsName +} + +func ExampleIsReserved() { + _ = IsReserved +} + +func ExampleLockedCatalog() { + _ = LockedCatalog +} + +func ExampleLockedEntries() { + _ = LockedEntries +} + +func ExampleLockedKeys() { + _ = LockedKeys +} + +func ExampleLockedPrefixSize() { + _ = LockedPrefixSize +} + +func ExampleLockedSize() { + _ = LockedSize +} + +func ExampleLockedValues() { + _ = LockedValues +} + +func ExampleLookupCatalogName() { + _ = LookupCatalogName[any] +} + +func ExampleNameValue() { + _ = NameValue +} + +func ExampleNewClaim() { + _ = NewClaim +} + +func ExampleNewInvItem() { + _ = NewInvItem +} + +func ExampleNewNameView() { + _ = NewNameView +} + +func ExampleNewOutpoint() { + _ = NewOutpoint +} + +func ExampleNewResource() { + _ = NewResource +} + +func ExampleNewService() { + _ = NewService +} + +func ExampleNewServiceWithOptions() { + _ = NewServiceWithOptions +} + +func ExampleNextName() { + _ = NextName +} + +func ExamplePrefixSize() { + _ = PrefixSize +} + +func ExamplePrevName() { + _ = PrevName +} + +func ExampleRegister() { + _ = Register +} + +func ExampleRegisterWithOptions() { + _ = RegisterWithOptions +} + +func ExampleRemoveNames() { + _ = RemoveNames +} + +func ExampleReservedCatalog() { + _ = ReservedCatalog +} + +func ExampleReservedEntries() { + _ = ReservedEntries +} + +func ExampleReservedKeys() { + _ = ReservedKeys +} + +func ExampleReservedNameValue() { + _ = ReservedNameValue +} + +func ExampleReservedPrefixSize() { + _ = ReservedPrefixSize +} + +func ExampleReservedRootValue() { + _ = ReservedRootValue +} + +func ExampleReservedSize() { + _ = ReservedSize +} + +func ExampleReservedTopValue() { + _ = ReservedTopValue +} + +func ExampleReservedValues() { + _ = ReservedValues +} + +func ExampleResolve() { + _ = Resolve +} + +func ExampleResolveBinary() { + _ = ResolveBinary +} + +func ExampleResolveByBinary() { + _ = ResolveByBinary +} + +func ExampleResolveByName() { + _ = ResolveByName +} + +func ExampleResolveByString() { + _ = ResolveByString +} + +func ExampleResolveName() { + _ = ResolveName +} + +func ExampleResolveString() { + _ = ResolveString +} + +func ExampleRootValue() { + _ = RootValue +} + +func ExampleService_AddNames() { + _ = (*Service).AddNames +} + +func ExampleService_Blacklist() { + _ = (*Service).Blacklist +} + +func ExampleService_Blind() { + _ = (*Service).Blind +} + +func ExampleService_Core() { + _ = (*Service).Core +} + +func ExampleService_CountOpens() { + _ = (*Service).CountOpens +} + +func ExampleService_CountRenewals() { + _ = (*Service).CountRenewals +} + +func ExampleService_CountUpdates() { + _ = (*Service).CountUpdates +} + +func ExampleService_CovenantMaxSize() { + _ = (*Service).CovenantMaxSize +} + +func ExampleService_Create() { + _ = (*Service).Create +} + +func ExampleService_DecodeResource() { + _ = (*Service).DecodeResource +} + +func ExampleService_DefaultLockedCatalog() { + _ = (*Service).DefaultLockedCatalog +} + +func ExampleService_DefaultReservedCatalog() { + _ = (*Service).DefaultReservedCatalog +} + +func ExampleService_DefaultTTL() { + _ = (*Service).DefaultTTL +} + +func ExampleService_Dummy() { + _ = (*Service).Dummy +} + +func ExampleService_GetAddNames() { + _ = (*Service).GetAddNames +} + +func ExampleService_GetBlacklist() { + _ = (*Service).GetBlacklist +} + +func ExampleService_GetBlind() { + _ = (*Service).GetBlind +} + +func ExampleService_GetCore() { + _ = (*Service).GetCore +} + +func ExampleService_GetCountOpens() { + _ = (*Service).GetCountOpens +} + +func ExampleService_GetCountRenewals() { + _ = (*Service).GetCountRenewals +} + +func ExampleService_GetCountUpdates() { + _ = (*Service).GetCountUpdates +} + +func ExampleService_GetCovenantMaxSize() { + _ = (*Service).GetCovenantMaxSize +} + +func ExampleService_GetCreate() { + _ = (*Service).GetCreate +} + +func ExampleService_GetDecodeResource() { + _ = (*Service).GetDecodeResource +} + +func ExampleService_GetDefaultLockedCatalog() { + _ = (*Service).GetDefaultLockedCatalog +} + +func ExampleService_GetDefaultReservedCatalog() { + _ = (*Service).GetDefaultReservedCatalog +} + +func ExampleService_GetDefaultTTL() { + _ = (*Service).GetDefaultTTL +} + +func ExampleService_GetDummy() { + _ = (*Service).GetDummy +} + +func ExampleService_GetGrindName() { + _ = (*Service).GetGrindName +} + +func ExampleService_GetHSTypes() { + _ = (*Service).GetHSTypes +} + +func ExampleService_GetHSTypesByVal() { + _ = (*Service).GetHSTypesByVal +} + +func ExampleService_GetHandleIPCEvents() { + _ = (*Service).GetHandleIPCEvents +} + +func ExampleService_GetHasLocked() { + _ = (*Service).GetHasLocked +} + +func ExampleService_GetHasLockedBinary() { + _ = (*Service).GetHasLockedBinary +} + +func ExampleService_GetHasLockedByBinary() { + _ = (*Service).GetHasLockedByBinary +} + +func ExampleService_GetHasLockedByHash() { + _ = (*Service).GetHasLockedByHash +} + +func ExampleService_GetHasLockedByName() { + _ = (*Service).GetHasLockedByName +} + +func ExampleService_GetHasLockedByString() { + _ = (*Service).GetHasLockedByString +} + +func ExampleService_GetHasLockedCatalog() { + _ = (*Service).GetHasLockedCatalog +} + +func ExampleService_GetHasLockedHash() { + _ = (*Service).GetHasLockedHash +} + +func ExampleService_GetHasLockedName() { + _ = (*Service).GetHasLockedName +} + +func ExampleService_GetHasLockedString() { + _ = (*Service).GetHasLockedString +} + +func ExampleService_GetHasLookupCatalogName() { + _ = (*Service).GetHasLookupCatalogName +} + +func ExampleService_GetHasNames() { + _ = (*Service).GetHasNames +} + +func ExampleService_GetHasReserved() { + _ = (*Service).GetHasReserved +} + +func ExampleService_GetHasReservedBinary() { + _ = (*Service).GetHasReservedBinary +} + +func ExampleService_GetHasReservedByBinary() { + _ = (*Service).GetHasReservedByBinary +} + +func ExampleService_GetHasReservedByHash() { + _ = (*Service).GetHasReservedByHash +} + +func ExampleService_GetHasReservedByName() { + _ = (*Service).GetHasReservedByName +} + +func ExampleService_GetHasReservedByString() { + _ = (*Service).GetHasReservedByString +} + +func ExampleService_GetHasReservedCatalog() { + _ = (*Service).GetHasReservedCatalog +} + +func ExampleService_GetHasReservedHash() { + _ = (*Service).GetHasReservedHash +} + +func ExampleService_GetHasReservedName() { + _ = (*Service).GetHasReservedName +} + +func ExampleService_GetHasReservedString() { + _ = (*Service).GetHasReservedString +} + +func ExampleService_GetHasRollout() { + _ = (*Service).GetHasRollout +} + +func ExampleService_GetHasSaneCovenants() { + _ = (*Service).GetHasSaneCovenants +} + +func ExampleService_GetHash() { + _ = (*Service).GetHash +} + +func ExampleService_GetHashBinary() { + _ = (*Service).GetHashBinary +} + +func ExampleService_GetHashByBinary() { + _ = (*Service).GetHashByBinary +} + +func ExampleService_GetHashByName() { + _ = (*Service).GetHashByName +} + +func ExampleService_GetHashByString() { + _ = (*Service).GetHashByString +} + +func ExampleService_GetHashName() { + _ = (*Service).GetHashName +} + +func ExampleService_GetHashString() { + _ = (*Service).GetHashString +} + +func ExampleService_GetIsKnown() { + _ = (*Service).GetIsKnown +} + +func ExampleService_GetIsLinked() { + _ = (*Service).GetIsLinked +} + +func ExampleService_GetIsLockedUp() { + _ = (*Service).GetIsLockedUp +} + +func ExampleService_GetIsName() { + _ = (*Service).GetIsName +} + +func ExampleService_GetIsReserved() { + _ = (*Service).GetIsReserved +} + +func ExampleService_GetLocked() { + _ = (*Service).GetLocked +} + +func ExampleService_GetLockedBinary() { + _ = (*Service).GetLockedBinary +} + +func ExampleService_GetLockedByBinary() { + _ = (*Service).GetLockedByBinary +} + +func ExampleService_GetLockedByHash() { + _ = (*Service).GetLockedByHash +} + +func ExampleService_GetLockedByName() { + _ = (*Service).GetLockedByName +} + +func ExampleService_GetLockedByString() { + _ = (*Service).GetLockedByString +} + +func ExampleService_GetLockedCatalog() { + _ = (*Service).GetLockedCatalog +} + +func ExampleService_GetLockedEntries() { + _ = (*Service).GetLockedEntries +} + +func ExampleService_GetLockedHash() { + _ = (*Service).GetLockedHash +} + +func ExampleService_GetLockedKeys() { + _ = (*Service).GetLockedKeys +} + +func ExampleService_GetLockedName() { + _ = (*Service).GetLockedName +} + +func ExampleService_GetLockedPrefixSize() { + _ = (*Service).GetLockedPrefixSize +} + +func ExampleService_GetLockedSize() { + _ = (*Service).GetLockedSize +} + +func ExampleService_GetLockedString() { + _ = (*Service).GetLockedString +} + +func ExampleService_GetLockedValues() { + _ = (*Service).GetLockedValues +} + +func ExampleService_GetLookupCatalogName() { + _ = (*Service).GetLookupCatalogName +} + +func ExampleService_GetMandatoryVerifyCovenantFlags() { + _ = (*Service).GetMandatoryVerifyCovenantFlags +} + +func ExampleService_GetMaxCovenantSize() { + _ = (*Service).GetMaxCovenantSize +} + +func ExampleService_GetMaxNameSize() { + _ = (*Service).GetMaxNameSize +} + +func ExampleService_GetMaxResourceSize() { + _ = (*Service).GetMaxResourceSize +} + +func ExampleService_GetNameValue() { + _ = (*Service).GetNameValue +} + +func ExampleService_GetNewClaim() { + _ = (*Service).GetNewClaim +} + +func ExampleService_GetNewNameView() { + _ = (*Service).GetNewNameView +} + +func ExampleService_GetNewOutpoint() { + _ = (*Service).GetNewOutpoint +} + +func ExampleService_GetNewResource() { + _ = (*Service).GetNewResource +} + +func ExampleService_GetNextName() { + _ = (*Service).GetNextName +} + +func ExampleService_GetOnShutdown() { + _ = (*Service).GetOnShutdown +} + +func ExampleService_GetOnStartup() { + _ = (*Service).GetOnStartup +} + +func ExampleService_GetPrefixSize() { + _ = (*Service).GetPrefixSize +} + +func ExampleService_GetPrevName() { + _ = (*Service).GetPrevName +} + +func ExampleService_GetRemoveNames() { + _ = (*Service).GetRemoveNames +} + +func ExampleService_GetReserved() { + _ = (*Service).GetReserved +} + +func ExampleService_GetReservedBinary() { + _ = (*Service).GetReservedBinary +} + +func ExampleService_GetReservedByBinary() { + _ = (*Service).GetReservedByBinary +} + +func ExampleService_GetReservedByHash() { + _ = (*Service).GetReservedByHash +} + +func ExampleService_GetReservedByName() { + _ = (*Service).GetReservedByName +} + +func ExampleService_GetReservedByString() { + _ = (*Service).GetReservedByString +} + +func ExampleService_GetReservedCatalog() { + _ = (*Service).GetReservedCatalog +} + +func ExampleService_GetReservedEntries() { + _ = (*Service).GetReservedEntries +} + +func ExampleService_GetReservedHash() { + _ = (*Service).GetReservedHash +} + +func ExampleService_GetReservedKeys() { + _ = (*Service).GetReservedKeys +} + +func ExampleService_GetReservedName() { + _ = (*Service).GetReservedName +} + +func ExampleService_GetReservedNameValue() { + _ = (*Service).GetReservedNameValue +} + +func ExampleService_GetReservedPrefixSize() { + _ = (*Service).GetReservedPrefixSize +} + +func ExampleService_GetReservedRootValue() { + _ = (*Service).GetReservedRootValue +} + +func ExampleService_GetReservedSize() { + _ = (*Service).GetReservedSize +} + +func ExampleService_GetReservedString() { + _ = (*Service).GetReservedString +} + +func ExampleService_GetReservedTopValue() { + _ = (*Service).GetReservedTopValue +} + +func ExampleService_GetReservedValues() { + _ = (*Service).GetReservedValues +} + +func ExampleService_GetResolve() { + _ = (*Service).GetResolve +} + +func ExampleService_GetResolveBinary() { + _ = (*Service).GetResolveBinary +} + +func ExampleService_GetResolveByBinary() { + _ = (*Service).GetResolveByBinary +} + +func ExampleService_GetResolveByName() { + _ = (*Service).GetResolveByName +} + +func ExampleService_GetResolveByString() { + _ = (*Service).GetResolveByString +} + +func ExampleService_GetResolveName() { + _ = (*Service).GetResolveName +} + +func ExampleService_GetResolveString() { + _ = (*Service).GetResolveString +} + +func ExampleService_GetRollout() { + _ = (*Service).GetRollout +} + +func ExampleService_GetRootValue() { + _ = (*Service).GetRootValue +} + +func ExampleService_GetServiceName() { + _ = (*Service).GetServiceName +} + +func ExampleService_GetTopValue() { + _ = (*Service).GetTopValue +} + +func ExampleService_GetTypeMapA() { + _ = (*Service).GetTypeMapA +} + +func ExampleService_GetTypeMapAAAA() { + _ = (*Service).GetTypeMapAAAA +} + +func ExampleService_GetTypeMapEmpty() { + _ = (*Service).GetTypeMapEmpty +} + +func ExampleService_GetTypeMapNS() { + _ = (*Service).GetTypeMapNS +} + +func ExampleService_GetTypeMapRoot() { + _ = (*Service).GetTypeMapRoot +} + +func ExampleService_GetTypeMapTXT() { + _ = (*Service).GetTypeMapTXT +} + +func ExampleService_GetTypeName() { + _ = (*Service).GetTypeName +} + +func ExampleService_GetTypes() { + _ = (*Service).GetTypes +} + +func ExampleService_GetTypesByVal() { + _ = (*Service).GetTypesByVal +} + +func ExampleService_GetVerificationFlags() { + _ = (*Service).GetVerificationFlags +} + +func ExampleService_GetVerificationFlagsByVal() { + _ = (*Service).GetVerificationFlagsByVal +} + +func ExampleService_GetVerify() { + _ = (*Service).GetVerify +} + +func ExampleService_GetVerifyBinary() { + _ = (*Service).GetVerifyBinary +} + +func ExampleService_GetVerifyByBinary() { + _ = (*Service).GetVerifyByBinary +} + +func ExampleService_GetVerifyByName() { + _ = (*Service).GetVerifyByName +} + +func ExampleService_GetVerifyByString() { + _ = (*Service).GetVerifyByString +} + +func ExampleService_GetVerifyCovenants() { + _ = (*Service).GetVerifyCovenants +} + +func ExampleService_GetVerifyCovenantsHardened() { + _ = (*Service).GetVerifyCovenantsHardened +} + +func ExampleService_GetVerifyCovenantsLockup() { + _ = (*Service).GetVerifyCovenantsLockup +} + +func ExampleService_GetVerifyCovenantsNone() { + _ = (*Service).GetVerifyCovenantsNone +} + +func ExampleService_GetVerifyName() { + _ = (*Service).GetVerifyName +} + +func ExampleService_GetVerifyString() { + _ = (*Service).GetVerifyString +} + +func ExampleService_GrindName() { + _ = (*Service).GrindName +} + +func ExampleService_HSTypes() { + _ = (*Service).HSTypes +} + +func ExampleService_HSTypesByVal() { + _ = (*Service).HSTypesByVal +} + +func ExampleService_HandleIPCEvents() { + _ = (*Service).HandleIPCEvents +} + +func ExampleService_HasLocked() { + _ = (*Service).HasLocked +} + +func ExampleService_HasLockedBinary() { + _ = (*Service).HasLockedBinary +} + +func ExampleService_HasLockedByBinary() { + _ = (*Service).HasLockedByBinary +} + +func ExampleService_HasLockedByHash() { + _ = (*Service).HasLockedByHash +} + +func ExampleService_HasLockedByName() { + _ = (*Service).HasLockedByName +} + +func ExampleService_HasLockedByString() { + _ = (*Service).HasLockedByString +} + +func ExampleService_HasLockedCatalog() { + _ = (*Service).HasLockedCatalog +} + +func ExampleService_HasLockedHash() { + _ = (*Service).HasLockedHash +} + +func ExampleService_HasLockedName() { + _ = (*Service).HasLockedName +} + +func ExampleService_HasLockedString() { + _ = (*Service).HasLockedString +} + +func ExampleService_HasLookupCatalogName() { + _ = (*Service).HasLookupCatalogName +} + +func ExampleService_HasNames() { + _ = (*Service).HasNames +} + +func ExampleService_HasReserved() { + _ = (*Service).HasReserved +} + +func ExampleService_HasReservedBinary() { + _ = (*Service).HasReservedBinary +} + +func ExampleService_HasReservedByBinary() { + _ = (*Service).HasReservedByBinary +} + +func ExampleService_HasReservedByHash() { + _ = (*Service).HasReservedByHash +} + +func ExampleService_HasReservedByName() { + _ = (*Service).HasReservedByName +} + +func ExampleService_HasReservedByString() { + _ = (*Service).HasReservedByString +} + +func ExampleService_HasReservedCatalog() { + _ = (*Service).HasReservedCatalog +} + +func ExampleService_HasReservedHash() { + _ = (*Service).HasReservedHash +} + +func ExampleService_HasReservedName() { + _ = (*Service).HasReservedName +} + +func ExampleService_HasReservedString() { + _ = (*Service).HasReservedString +} + +func ExampleService_HasRollout() { + _ = (*Service).HasRollout +} + +func ExampleService_HasSaneCovenants() { + _ = (*Service).HasSaneCovenants +} + +func ExampleService_Hash() { + _ = (*Service).Hash +} + +func ExampleService_HashBinary() { + _ = (*Service).HashBinary +} + +func ExampleService_HashByBinary() { + _ = (*Service).HashByBinary +} + +func ExampleService_HashByName() { + _ = (*Service).HashByName +} + +func ExampleService_HashByString() { + _ = (*Service).HashByString +} + +func ExampleService_HashName() { + _ = (*Service).HashName +} + +func ExampleService_HashString() { + _ = (*Service).HashString +} + +func ExampleService_IsKnown() { + _ = (*Service).IsKnown +} + +func ExampleService_IsLinked() { + _ = (*Service).IsLinked +} + +func ExampleService_IsLockedUp() { + _ = (*Service).IsLockedUp +} + +func ExampleService_IsName() { + _ = (*Service).IsName +} + +func ExampleService_IsReserved() { + _ = (*Service).IsReserved +} + +func ExampleService_LockedCatalog() { + _ = (*Service).LockedCatalog +} + +func ExampleService_LockedEntries() { + _ = (*Service).LockedEntries +} + +func ExampleService_LockedKeys() { + _ = (*Service).LockedKeys +} + +func ExampleService_LockedPrefixSize() { + _ = (*Service).LockedPrefixSize +} + +func ExampleService_LockedSize() { + _ = (*Service).LockedSize +} + +func ExampleService_LockedValues() { + _ = (*Service).LockedValues +} + +func ExampleService_LookupCatalogName() { + _ = (*Service).LookupCatalogName +} + +func ExampleService_MandatoryVerifyCovenantFlags() { + _ = (*Service).MandatoryVerifyCovenantFlags +} + +func ExampleService_MaxCovenantSize() { + _ = (*Service).MaxCovenantSize +} + +func ExampleService_MaxNameSize() { + _ = (*Service).MaxNameSize +} + +func ExampleService_MaxResourceSize() { + _ = (*Service).MaxResourceSize +} + +func ExampleService_NameValue() { + _ = (*Service).NameValue +} + +func ExampleService_NewClaim() { + _ = (*Service).NewClaim +} + +func ExampleService_NewNameView() { + _ = (*Service).NewNameView +} + +func ExampleService_NewOutpoint() { + _ = (*Service).NewOutpoint +} + +func ExampleService_NewResource() { + _ = (*Service).NewResource +} + +func ExampleService_NextName() { + _ = (*Service).NextName +} + +func ExampleService_OnShutdown() { + _ = (*Service).OnShutdown +} + +func ExampleService_OnStartup() { + _ = (*Service).OnStartup +} + +func ExampleService_PrefixSize() { + _ = (*Service).PrefixSize +} + +func ExampleService_PrevName() { + _ = (*Service).PrevName +} + +func ExampleService_RemoveNames() { + _ = (*Service).RemoveNames +} + +func ExampleService_ReservedCatalog() { + _ = (*Service).ReservedCatalog +} + +func ExampleService_ReservedEntries() { + _ = (*Service).ReservedEntries +} + +func ExampleService_ReservedKeys() { + _ = (*Service).ReservedKeys +} + +func ExampleService_ReservedNameValue() { + _ = (*Service).ReservedNameValue +} + +func ExampleService_ReservedPrefixSize() { + _ = (*Service).ReservedPrefixSize +} + +func ExampleService_ReservedRootValue() { + _ = (*Service).ReservedRootValue +} + +func ExampleService_ReservedSize() { + _ = (*Service).ReservedSize +} + +func ExampleService_ReservedTopValue() { + _ = (*Service).ReservedTopValue +} + +func ExampleService_ReservedValues() { + _ = (*Service).ReservedValues +} + +func ExampleService_Resolve() { + _ = (*Service).Resolve +} + +func ExampleService_ResolveBinary() { + _ = (*Service).ResolveBinary +} + +func ExampleService_ResolveByBinary() { + _ = (*Service).ResolveByBinary +} + +func ExampleService_ResolveByName() { + _ = (*Service).ResolveByName +} + +func ExampleService_ResolveByString() { + _ = (*Service).ResolveByString +} + +func ExampleService_ResolveName() { + _ = (*Service).ResolveName +} + +func ExampleService_ResolveString() { + _ = (*Service).ResolveString +} + +func ExampleService_RootValue() { + _ = (*Service).RootValue +} + +func ExampleService_ServiceName() { + _ = (*Service).ServiceName +} + +func ExampleService_TopValue() { + _ = (*Service).TopValue +} + +func ExampleService_TypeMapA() { + _ = (*Service).TypeMapA +} + +func ExampleService_TypeMapAAAA() { + _ = (*Service).TypeMapAAAA +} + +func ExampleService_TypeMapEmpty() { + _ = (*Service).TypeMapEmpty +} + +func ExampleService_TypeMapNS() { + _ = (*Service).TypeMapNS +} + +func ExampleService_TypeMapRoot() { + _ = (*Service).TypeMapRoot +} + +func ExampleService_TypeMapTXT() { + _ = (*Service).TypeMapTXT +} + +func ExampleService_TypeName() { + _ = (*Service).TypeName +} + +func ExampleService_Types() { + _ = (*Service).Types +} + +func ExampleService_TypesByVal() { + _ = (*Service).TypesByVal +} + +func ExampleService_VerificationFlags() { + _ = (*Service).VerificationFlags +} + +func ExampleService_VerificationFlagsByVal() { + _ = (*Service).VerificationFlagsByVal +} + +func ExampleService_Verify() { + _ = (*Service).Verify +} + +func ExampleService_VerifyBinary() { + _ = (*Service).VerifyBinary +} + +func ExampleService_VerifyByBinary() { + _ = (*Service).VerifyByBinary +} + +func ExampleService_VerifyByName() { + _ = (*Service).VerifyByName +} + +func ExampleService_VerifyByString() { + _ = (*Service).VerifyByString +} + +func ExampleService_VerifyCovenants() { + _ = (*Service).VerifyCovenants +} + +func ExampleService_VerifyCovenantsHardened() { + _ = (*Service).VerifyCovenantsHardened +} + +func ExampleService_VerifyCovenantsLockup() { + _ = (*Service).VerifyCovenantsLockup +} + +func ExampleService_VerifyCovenantsNone() { + _ = (*Service).VerifyCovenantsNone +} + +func ExampleService_VerifyName() { + _ = (*Service).VerifyName +} + +func ExampleService_VerifyString() { + _ = (*Service).VerifyString +} + +func ExampleTopValue() { + _ = TopValue +} + +func ExampleTypeName() { + _ = TypeName +} + +func ExampleVerify() { + _ = Verify +} + +func ExampleVerifyBinary() { + _ = VerifyBinary +} + +func ExampleVerifyByBinary() { + _ = VerifyByBinary +} + +func ExampleVerifyByName() { + _ = VerifyByName +} + +func ExampleVerifyByString() { + _ = VerifyByString +} + +func ExampleVerifyCovenants() { + _ = VerifyCovenants +} + +func ExampleVerifyName() { + _ = VerifyName +} + +func ExampleVerifyString() { + _ = VerifyString +} + +func ExampleWithCore() { + _ = WithCore +} + +func ExampleWithLockedCatalog() { + _ = WithLockedCatalog +} + +func ExampleWithReservedCatalog() { + _ = WithReservedCatalog +} -- 2.45.3 From a383834deae8057788556022b7a21b6d6b47e460 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 09:48:07 +0000 Subject: [PATCH 15/15] Normalize example test symbols --- internal/nameutil/name_example_test.go | 2 +- .../zz_codex_examples_example_test.go | 7 - lns_example_test.go | 3 +- pkg/covenant/airdrop_proof_example_test.go | 2 +- pkg/covenant/blind_example_test.go | 3 +- pkg/covenant/covenant_example_test.go | 3 +- pkg/covenant/locked_lookup_example_test.go | 3 +- pkg/covenant/name_example_test.go | 2 +- pkg/covenant/name_lookup_example_test.go | 2 +- pkg/covenant/names_example_test.go | 2 +- pkg/covenant/reserved_lookup_example_test.go | 3 +- pkg/covenant/rules_example_test.go | 2 +- pkg/covenant/rules_extra_example_test.go | 3 +- pkg/covenant/verify_example_test.go | 2 +- .../zz_codex_examples_example_test.go | 599 ----- pkg/dns/common_example_test.go | 3 +- pkg/dns/nsec_example_test.go | 3 +- pkg/dns/resolve_example_test.go | 3 +- pkg/dns/resource_example_test.go | 3 +- pkg/dns/zz_codex_examples_example_test.go | 775 ------- pkg/primitives/claim_example_test.go | 3 +- .../covenant_binary_example_test.go | 3 +- pkg/primitives/covenant_items_example_test.go | 3 +- pkg/primitives/covenant_json_example_test.go | 2 +- pkg/primitives/invitem_example_test.go | 3 +- pkg/primitives/namedelta_example_test.go | 3 +- .../namestate_binary_example_test.go | 2 +- pkg/primitives/namestate_example_test.go | 3 +- pkg/primitives/namestate_json_example_test.go | 2 +- .../namestate_state_example_test.go | 3 +- .../namestate_stats_example_test.go | 2 +- pkg/primitives/outpoint_example_test.go | 2 +- pkg/primitives/outpoint_json_example_test.go | 2 +- pkg/primitives/types_example_test.go | 3 +- pkg/primitives/view_example_test.go | 3 +- .../zz_codex_examples_example_test.go | 699 ------ zz_codex_examples_example_test.go | 1959 ----------------- 37 files changed, 32 insertions(+), 4090 deletions(-) delete mode 100644 internal/nameutil/zz_codex_examples_example_test.go delete mode 100644 pkg/covenant/zz_codex_examples_example_test.go delete mode 100644 pkg/dns/zz_codex_examples_example_test.go delete mode 100644 pkg/primitives/zz_codex_examples_example_test.go delete mode 100644 zz_codex_examples_example_test.go diff --git a/internal/nameutil/name_example_test.go b/internal/nameutil/name_example_test.go index 9fe1c49..103e2e7 100644 --- a/internal/nameutil/name_example_test.go +++ b/internal/nameutil/name_example_test.go @@ -6,7 +6,7 @@ import ( "fmt" ) -func ExampleCanonicalize_good() { +func ExampleCanonicalize() { got, _ := Canonicalize("Example.LTHN.") fmt.Println(got) // Output: example diff --git a/internal/nameutil/zz_codex_examples_example_test.go b/internal/nameutil/zz_codex_examples_example_test.go deleted file mode 100644 index ff74a15..0000000 --- a/internal/nameutil/zz_codex_examples_example_test.go +++ /dev/null @@ -1,7 +0,0 @@ -package nameutil - -// Code generated by Codex. DO NOT EDIT. - -func ExampleCatalogLabel() { - _ = CatalogLabel -} diff --git a/lns_example_test.go b/lns_example_test.go index 285ed12..e7cb021 100644 --- a/lns_example_test.go +++ b/lns_example_test.go @@ -4,8 +4,7 @@ package lns import "fmt" -func ExampleGetServiceName_good() { +func ExampleGetServiceName() { fmt.Println(GetServiceName()) // Output: lns } - diff --git a/pkg/covenant/airdrop_proof_example_test.go b/pkg/covenant/airdrop_proof_example_test.go index 02b7d2d..8bd8836 100644 --- a/pkg/covenant/airdrop_proof_example_test.go +++ b/pkg/covenant/airdrop_proof_example_test.go @@ -4,7 +4,7 @@ package covenant import "fmt" -func ExampletestAirdropProof_good() { +func ExampletestAirdropProof() { proof := testAirdropProof() fmt.Println(proof.isSane()) diff --git a/pkg/covenant/blind_example_test.go b/pkg/covenant/blind_example_test.go index 5f515d3..0fcab9e 100644 --- a/pkg/covenant/blind_example_test.go +++ b/pkg/covenant/blind_example_test.go @@ -8,9 +8,8 @@ import ( "dappco.re/go/lns/pkg/primitives" ) -func ExampleGetBlind_good() { +func ExampleGetBlind() { _, err := GetBlind(1000, primitives.Hash{}) fmt.Println(err == nil) // Output: true } - diff --git a/pkg/covenant/covenant_example_test.go b/pkg/covenant/covenant_example_test.go index 96b9e9b..a03f65e 100644 --- a/pkg/covenant/covenant_example_test.go +++ b/pkg/covenant/covenant_example_test.go @@ -4,8 +4,7 @@ package covenant import "fmt" -func ExampleTypeName_good() { +func ExampleTypeName() { fmt.Println(TypeName(TypeBid)) // Output: BID } - diff --git a/pkg/covenant/locked_lookup_example_test.go b/pkg/covenant/locked_lookup_example_test.go index 3d03005..935c919 100644 --- a/pkg/covenant/locked_lookup_example_test.go +++ b/pkg/covenant/locked_lookup_example_test.go @@ -4,9 +4,8 @@ package covenant import "fmt" -func ExampleGetLockedName_good() { +func ExampleGetLockedName() { item, _ := GetLockedName("NEC") fmt.Println(item.Name) // Output: nec } - diff --git a/pkg/covenant/name_example_test.go b/pkg/covenant/name_example_test.go index df83c1c..3a8f85b 100644 --- a/pkg/covenant/name_example_test.go +++ b/pkg/covenant/name_example_test.go @@ -4,7 +4,7 @@ package covenant import "fmt" -func ExampleVerifyString_good() { +func ExampleVerifyString() { fmt.Println(VerifyString("foo")) // Output: true } diff --git a/pkg/covenant/name_lookup_example_test.go b/pkg/covenant/name_lookup_example_test.go index 66cd0e7..0037e6e 100644 --- a/pkg/covenant/name_lookup_example_test.go +++ b/pkg/covenant/name_lookup_example_test.go @@ -4,7 +4,7 @@ package covenant import "fmt" -func ExampleasciiLowerName_good() { +func ExampleasciiLowerName() { got, _ := asciiLowerName("NEC.lthn.") fmt.Println(got) // Output: nec diff --git a/pkg/covenant/names_example_test.go b/pkg/covenant/names_example_test.go index 3156753..cd8b959 100644 --- a/pkg/covenant/names_example_test.go +++ b/pkg/covenant/names_example_test.go @@ -8,7 +8,7 @@ import ( "dappco.re/go/lns/pkg/primitives" ) -func ExampleHasNames_good() { +func ExampleHasNames() { hash := testNameHash() tx := testNameTx(TypeOpen, hash) fmt.Println(HasNames(tx, map[primitives.Hash]struct{}{hash: {}})) diff --git a/pkg/covenant/reserved_lookup_example_test.go b/pkg/covenant/reserved_lookup_example_test.go index 741bd74..d13b1f7 100644 --- a/pkg/covenant/reserved_lookup_example_test.go +++ b/pkg/covenant/reserved_lookup_example_test.go @@ -4,9 +4,8 @@ package covenant import "fmt" -func ExampleGetReservedName_good() { +func ExampleGetReservedName() { item, _ := GetReservedName("RESERVED") fmt.Println(item.Name) // Output: reserved } - diff --git a/pkg/covenant/rules_example_test.go b/pkg/covenant/rules_example_test.go index 70d8495..d2e75ee 100644 --- a/pkg/covenant/rules_example_test.go +++ b/pkg/covenant/rules_example_test.go @@ -8,7 +8,7 @@ import ( "dappco.re/go/lns/pkg/primitives" ) -func ExampleGetRollout_good() { +func ExampleGetRollout() { start, _ := GetRollout(primitives.Hash{}, NameRules{NoRollout: true}) fmt.Println(start) // Output: 0 diff --git a/pkg/covenant/rules_extra_example_test.go b/pkg/covenant/rules_extra_example_test.go index e46c530..dc88b7d 100644 --- a/pkg/covenant/rules_extra_example_test.go +++ b/pkg/covenant/rules_extra_example_test.go @@ -8,8 +8,7 @@ import ( "dappco.re/go/lns/pkg/primitives" ) -func ExampleCountOpens_good() { +func ExampleCountOpens() { fmt.Println(CountOpens(primitives.Transaction{})) // Output: 0 } - diff --git a/pkg/covenant/verify_example_test.go b/pkg/covenant/verify_example_test.go index 29679b6..56b5b17 100644 --- a/pkg/covenant/verify_example_test.go +++ b/pkg/covenant/verify_example_test.go @@ -8,7 +8,7 @@ import ( "dappco.re/go/lns/pkg/primitives" ) -func ExampleVerifyCovenants_good() { +func ExampleVerifyCovenants() { var prev primitives.Hash prev[0] = 1 diff --git a/pkg/covenant/zz_codex_examples_example_test.go b/pkg/covenant/zz_codex_examples_example_test.go deleted file mode 100644 index 0e20b58..0000000 --- a/pkg/covenant/zz_codex_examples_example_test.go +++ /dev/null @@ -1,599 +0,0 @@ -package covenant - -// Code generated by Codex. DO NOT EDIT. - -func ExampleAddNames() { - _ = AddNames -} - -func ExampleBlind() { - _ = Blind -} - -func ExampleCountRenewals() { - _ = CountRenewals -} - -func ExampleCountUpdates() { - _ = CountUpdates -} - -func ExampleCovenantType_IsKnown() { - _ = (*CovenantType).IsKnown -} - -func ExampleCovenantType_IsLinked() { - _ = (*CovenantType).IsLinked -} - -func ExampleCovenantType_IsName() { - _ = (*CovenantType).IsName -} - -func ExampleCovenantType_String() { - _ = (*CovenantType).String -} - -func ExampleDefaultLockedCatalog() { - _ = DefaultLockedCatalog -} - -func ExampleDefaultReservedCatalog() { - _ = DefaultReservedCatalog -} - -func ExampleGetAddNames() { - _ = GetAddNames -} - -func ExampleGetBlacklist() { - _ = GetBlacklist -} - -func ExampleGetCountOpens() { - _ = GetCountOpens -} - -func ExampleGetCountRenewals() { - _ = GetCountRenewals -} - -func ExampleGetCountUpdates() { - _ = GetCountUpdates -} - -func ExampleGetDefaultLockedCatalog() { - _ = GetDefaultLockedCatalog -} - -func ExampleGetDefaultReservedCatalog() { - _ = GetDefaultReservedCatalog -} - -func ExampleGetGrindName() { - _ = GetGrindName -} - -func ExampleGetHasLockedBinary() { - _ = GetHasLockedBinary -} - -func ExampleGetHasLockedByBinary() { - _ = GetHasLockedByBinary -} - -func ExampleGetHasLockedByHash() { - _ = GetHasLockedByHash -} - -func ExampleGetHasLockedByName() { - _ = GetHasLockedByName -} - -func ExampleGetHasLockedByString() { - _ = GetHasLockedByString -} - -func ExampleGetHasLockedHash() { - _ = GetHasLockedHash -} - -func ExampleGetHasLockedName() { - _ = GetHasLockedName -} - -func ExampleGetHasLockedString() { - _ = GetHasLockedString -} - -func ExampleGetHasNames() { - _ = GetHasNames -} - -func ExampleGetHasReservedBinary() { - _ = GetHasReservedBinary -} - -func ExampleGetHasReservedByBinary() { - _ = GetHasReservedByBinary -} - -func ExampleGetHasReservedByHash() { - _ = GetHasReservedByHash -} - -func ExampleGetHasReservedByName() { - _ = GetHasReservedByName -} - -func ExampleGetHasReservedByString() { - _ = GetHasReservedByString -} - -func ExampleGetHasReservedHash() { - _ = GetHasReservedHash -} - -func ExampleGetHasReservedName() { - _ = GetHasReservedName -} - -func ExampleGetHasReservedString() { - _ = GetHasReservedString -} - -func ExampleGetHasRollout() { - _ = GetHasRollout -} - -func ExampleGetHasSaneCovenants() { - _ = GetHasSaneCovenants -} - -func ExampleGetHashBinary() { - _ = GetHashBinary -} - -func ExampleGetHashByBinary() { - _ = GetHashByBinary -} - -func ExampleGetHashByName() { - _ = GetHashByName -} - -func ExampleGetHashByString() { - _ = GetHashByString -} - -func ExampleGetHashName() { - _ = GetHashName -} - -func ExampleGetHashString() { - _ = GetHashString -} - -func ExampleGetIsLockedUp() { - _ = GetIsLockedUp -} - -func ExampleGetIsReserved() { - _ = GetIsReserved -} - -func ExampleGetLockedBinary() { - _ = GetLockedBinary -} - -func ExampleGetLockedByBinary() { - _ = GetLockedByBinary -} - -func ExampleGetLockedByHash() { - _ = GetLockedByHash -} - -func ExampleGetLockedByName() { - _ = GetLockedByName -} - -func ExampleGetLockedByString() { - _ = GetLockedByString -} - -func ExampleGetLockedCatalog() { - _ = GetLockedCatalog -} - -func ExampleGetLockedHash() { - _ = GetLockedHash -} - -func ExampleGetLockedString() { - _ = GetLockedString -} - -func ExampleGetRemoveNames() { - _ = GetRemoveNames -} - -func ExampleGetReservedBinary() { - _ = GetReservedBinary -} - -func ExampleGetReservedByBinary() { - _ = GetReservedByBinary -} - -func ExampleGetReservedByHash() { - _ = GetReservedByHash -} - -func ExampleGetReservedByName() { - _ = GetReservedByName -} - -func ExampleGetReservedByString() { - _ = GetReservedByString -} - -func ExampleGetReservedCatalog() { - _ = GetReservedCatalog -} - -func ExampleGetReservedHash() { - _ = GetReservedHash -} - -func ExampleGetReservedString() { - _ = GetReservedString -} - -func ExampleGetTypeName() { - _ = GetTypeName -} - -func ExampleGetTypes() { - _ = GetTypes -} - -func ExampleGetTypesByVal() { - _ = GetTypesByVal -} - -func ExampleGetVerificationFlags() { - _ = GetVerificationFlags -} - -func ExampleGetVerificationFlagsByVal() { - _ = GetVerificationFlagsByVal -} - -func ExampleGetVerifyBinary() { - _ = GetVerifyBinary -} - -func ExampleGetVerifyByBinary() { - _ = GetVerifyByBinary -} - -func ExampleGetVerifyByName() { - _ = GetVerifyByName -} - -func ExampleGetVerifyByString() { - _ = GetVerifyByString -} - -func ExampleGetVerifyCovenants() { - _ = GetVerifyCovenants -} - -func ExampleGetVerifyName() { - _ = GetVerifyName -} - -func ExampleGetVerifyString() { - _ = GetVerifyString -} - -func ExampleGrindName() { - _ = GrindName -} - -func ExampleHasLockedBinary() { - _ = HasLockedBinary -} - -func ExampleHasLockedByBinary() { - _ = HasLockedByBinary -} - -func ExampleHasLockedByHash() { - _ = HasLockedByHash -} - -func ExampleHasLockedByName() { - _ = HasLockedByName -} - -func ExampleHasLockedByString() { - _ = HasLockedByString -} - -func ExampleHasLockedHash() { - _ = HasLockedHash -} - -func ExampleHasLockedName() { - _ = HasLockedName -} - -func ExampleHasLockedString() { - _ = HasLockedString -} - -func ExampleHasReservedBinary() { - _ = HasReservedBinary -} - -func ExampleHasReservedByBinary() { - _ = HasReservedByBinary -} - -func ExampleHasReservedByHash() { - _ = HasReservedByHash -} - -func ExampleHasReservedByName() { - _ = HasReservedByName -} - -func ExampleHasReservedByString() { - _ = HasReservedByString -} - -func ExampleHasReservedHash() { - _ = HasReservedHash -} - -func ExampleHasReservedName() { - _ = HasReservedName -} - -func ExampleHasReservedString() { - _ = HasReservedString -} - -func ExampleHasRollout() { - _ = HasRollout -} - -func ExampleHasSaneCovenants() { - _ = HasSaneCovenants -} - -func ExampleHashBinary() { - _ = HashBinary -} - -func ExampleHashByBinary() { - _ = HashByBinary -} - -func ExampleHashByName() { - _ = HashByName -} - -func ExampleHashByString() { - _ = HashByString -} - -func ExampleHashName() { - _ = HashName -} - -func ExampleHashString() { - _ = HashString -} - -func ExampleIsLockedUp() { - _ = IsLockedUp -} - -func ExampleIsReserved() { - _ = IsReserved -} - -func ExampleLockedCatalog_Entries() { - _ = (*LockedCatalog).Entries -} - -func ExampleLockedCatalog_Get() { - _ = (*LockedCatalog).Get -} - -func ExampleLockedCatalog_GetByHash() { - _ = (*LockedCatalog).GetByHash -} - -func ExampleLockedCatalog_GetByName() { - _ = (*LockedCatalog).GetByName -} - -func ExampleLockedCatalog_GetEntries() { - _ = (*LockedCatalog).GetEntries -} - -func ExampleLockedCatalog_GetHasByHash() { - _ = (*LockedCatalog).GetHasByHash -} - -func ExampleLockedCatalog_GetHasByName() { - _ = (*LockedCatalog).GetHasByName -} - -func ExampleLockedCatalog_GetKeys() { - _ = (*LockedCatalog).GetKeys -} - -func ExampleLockedCatalog_GetPrefixSize() { - _ = (*LockedCatalog).GetPrefixSize -} - -func ExampleLockedCatalog_GetSize() { - _ = (*LockedCatalog).GetSize -} - -func ExampleLockedCatalog_GetValues() { - _ = (*LockedCatalog).GetValues -} - -func ExampleLockedCatalog_Has() { - _ = (*LockedCatalog).Has -} - -func ExampleLockedCatalog_HasByHash() { - _ = (*LockedCatalog).HasByHash -} - -func ExampleLockedCatalog_HasByName() { - _ = (*LockedCatalog).HasByName -} - -func ExampleLockedCatalog_Keys() { - _ = (*LockedCatalog).Keys -} - -func ExampleLockedCatalog_PrefixSize() { - _ = (*LockedCatalog).PrefixSize -} - -func ExampleLockedCatalog_Size() { - _ = (*LockedCatalog).Size -} - -func ExampleLockedCatalog_Values() { - _ = (*LockedCatalog).Values -} - -func ExampleRemoveNames() { - _ = RemoveNames -} - -func ExampleReservedCatalog_Entries() { - _ = (*ReservedCatalog).Entries -} - -func ExampleReservedCatalog_Get() { - _ = (*ReservedCatalog).Get -} - -func ExampleReservedCatalog_GetByHash() { - _ = (*ReservedCatalog).GetByHash -} - -func ExampleReservedCatalog_GetByName() { - _ = (*ReservedCatalog).GetByName -} - -func ExampleReservedCatalog_GetEntries() { - _ = (*ReservedCatalog).GetEntries -} - -func ExampleReservedCatalog_GetHasByHash() { - _ = (*ReservedCatalog).GetHasByHash -} - -func ExampleReservedCatalog_GetHasByName() { - _ = (*ReservedCatalog).GetHasByName -} - -func ExampleReservedCatalog_GetKeys() { - _ = (*ReservedCatalog).GetKeys -} - -func ExampleReservedCatalog_GetNameValue() { - _ = (*ReservedCatalog).GetNameValue -} - -func ExampleReservedCatalog_GetPrefixSize() { - _ = (*ReservedCatalog).GetPrefixSize -} - -func ExampleReservedCatalog_GetRootValue() { - _ = (*ReservedCatalog).GetRootValue -} - -func ExampleReservedCatalog_GetSize() { - _ = (*ReservedCatalog).GetSize -} - -func ExampleReservedCatalog_GetTopValue() { - _ = (*ReservedCatalog).GetTopValue -} - -func ExampleReservedCatalog_GetValues() { - _ = (*ReservedCatalog).GetValues -} - -func ExampleReservedCatalog_Has() { - _ = (*ReservedCatalog).Has -} - -func ExampleReservedCatalog_HasByHash() { - _ = (*ReservedCatalog).HasByHash -} - -func ExampleReservedCatalog_HasByName() { - _ = (*ReservedCatalog).HasByName -} - -func ExampleReservedCatalog_Keys() { - _ = (*ReservedCatalog).Keys -} - -func ExampleReservedCatalog_NameValue() { - _ = (*ReservedCatalog).NameValue -} - -func ExampleReservedCatalog_PrefixSize() { - _ = (*ReservedCatalog).PrefixSize -} - -func ExampleReservedCatalog_RootValue() { - _ = (*ReservedCatalog).RootValue -} - -func ExampleReservedCatalog_Size() { - _ = (*ReservedCatalog).Size -} - -func ExampleReservedCatalog_TopValue() { - _ = (*ReservedCatalog).TopValue -} - -func ExampleReservedCatalog_Values() { - _ = (*ReservedCatalog).Values -} - -func ExampleVerifyBinary() { - _ = VerifyBinary -} - -func ExampleVerifyByBinary() { - _ = VerifyByBinary -} - -func ExampleVerifyByName() { - _ = VerifyByName -} - -func ExampleVerifyByString() { - _ = VerifyByString -} - -func ExampleVerifyName() { - _ = VerifyName -} diff --git a/pkg/dns/common_example_test.go b/pkg/dns/common_example_test.go index eb25209..6640b61 100644 --- a/pkg/dns/common_example_test.go +++ b/pkg/dns/common_example_test.go @@ -4,8 +4,7 @@ package dns import "fmt" -func ExampleGetDefaultTTL_good() { +func ExampleGetDefaultTTL() { fmt.Println(GetDefaultTTL()) // Output: 21600 } - diff --git a/pkg/dns/nsec_example_test.go b/pkg/dns/nsec_example_test.go index 0f3d1fb..e08a7e1 100644 --- a/pkg/dns/nsec_example_test.go +++ b/pkg/dns/nsec_example_test.go @@ -4,8 +4,7 @@ package dns import "fmt" -func ExampleNextName_good() { +func ExampleNextName() { fmt.Printf("%q\n", NextName("example")) // Output: "example\x00." } - diff --git a/pkg/dns/resolve_example_test.go b/pkg/dns/resolve_example_test.go index fba7377..48dcb8c 100644 --- a/pkg/dns/resolve_example_test.go +++ b/pkg/dns/resolve_example_test.go @@ -4,8 +4,7 @@ package dns import "fmt" -func ExampleVerifyString_good() { +func ExampleVerifyString() { fmt.Println(VerifyString("Foo-Bar.lthn")) // Output: true } - diff --git a/pkg/dns/resource_example_test.go b/pkg/dns/resource_example_test.go index 01f9ed1..c163e9f 100644 --- a/pkg/dns/resource_example_test.go +++ b/pkg/dns/resource_example_test.go @@ -4,8 +4,7 @@ package dns import "fmt" -func ExampleNewResource_good() { +func ExampleNewResource() { fmt.Println(NewResource().HasNS()) // Output: false } - diff --git a/pkg/dns/zz_codex_examples_example_test.go b/pkg/dns/zz_codex_examples_example_test.go deleted file mode 100644 index 97dbb20..0000000 --- a/pkg/dns/zz_codex_examples_example_test.go +++ /dev/null @@ -1,775 +0,0 @@ -package dns - -// Code generated by Codex. DO NOT EDIT. - -func ExampleCreate() { - _ = Create -} - -func ExampleDSRecord_FromJSON() { - _ = (*DSRecord).FromJSON -} - -func ExampleDSRecord_GetAlgorithm() { - _ = (*DSRecord).GetAlgorithm -} - -func ExampleDSRecord_GetDigest() { - _ = (*DSRecord).GetDigest -} - -func ExampleDSRecord_GetDigestType() { - _ = (*DSRecord).GetDigestType -} - -func ExampleDSRecord_GetJSON() { - _ = (*DSRecord).GetJSON -} - -func ExampleDSRecord_GetKeyTag() { - _ = (*DSRecord).GetKeyTag -} - -func ExampleDSRecord_GetSize() { - _ = (*DSRecord).GetSize -} - -func ExampleDSRecord_GetType() { - _ = (*DSRecord).GetType -} - -func ExampleDSRecord_Type() { - _ = (*DSRecord).Type -} - -func ExampleDecodeResource() { - _ = DecodeResource -} - -func ExampleGLUE4Record_FromJSON() { - _ = (*GLUE4Record).FromJSON -} - -func ExampleGLUE4Record_GetAddress() { - _ = (*GLUE4Record).GetAddress -} - -func ExampleGLUE4Record_GetJSON() { - _ = (*GLUE4Record).GetJSON -} - -func ExampleGLUE4Record_GetNS() { - _ = (*GLUE4Record).GetNS -} - -func ExampleGLUE4Record_GetSize() { - _ = (*GLUE4Record).GetSize -} - -func ExampleGLUE4Record_GetType() { - _ = (*GLUE4Record).GetType -} - -func ExampleGLUE4Record_Type() { - _ = (*GLUE4Record).Type -} - -func ExampleGLUE6Record_FromJSON() { - _ = (*GLUE6Record).FromJSON -} - -func ExampleGLUE6Record_GetAddress() { - _ = (*GLUE6Record).GetAddress -} - -func ExampleGLUE6Record_GetJSON() { - _ = (*GLUE6Record).GetJSON -} - -func ExampleGLUE6Record_GetNS() { - _ = (*GLUE6Record).GetNS -} - -func ExampleGLUE6Record_GetSize() { - _ = (*GLUE6Record).GetSize -} - -func ExampleGLUE6Record_GetType() { - _ = (*GLUE6Record).GetType -} - -func ExampleGLUE6Record_Type() { - _ = (*GLUE6Record).Type -} - -func ExampleGetCreate() { - _ = GetCreate -} - -func ExampleGetDecodeResource() { - _ = GetDecodeResource -} - -func ExampleGetDummy() { - _ = GetDummy -} - -func ExampleGetHSTypes() { - _ = GetHSTypes -} - -func ExampleGetHSTypesByVal() { - _ = GetHSTypesByVal -} - -func ExampleGetHash() { - _ = GetHash -} - -func ExampleGetHashBinary() { - _ = GetHashBinary -} - -func ExampleGetHashByBinary() { - _ = GetHashByBinary -} - -func ExampleGetHashByName() { - _ = GetHashByName -} - -func ExampleGetHashByString() { - _ = GetHashByString -} - -func ExampleGetHashName() { - _ = GetHashName -} - -func ExampleGetHashString() { - _ = GetHashString -} - -func ExampleGetNewResource() { - _ = GetNewResource -} - -func ExampleGetNextName() { - _ = GetNextName -} - -func ExampleGetPrevName() { - _ = GetPrevName -} - -func ExampleGetResolve() { - _ = GetResolve -} - -func ExampleGetResolveBinary() { - _ = GetResolveBinary -} - -func ExampleGetResolveByBinary() { - _ = GetResolveByBinary -} - -func ExampleGetResolveByName() { - _ = GetResolveByName -} - -func ExampleGetResolveByString() { - _ = GetResolveByString -} - -func ExampleGetResolveName() { - _ = GetResolveName -} - -func ExampleGetResolveString() { - _ = GetResolveString -} - -func ExampleGetServiceName() { - _ = GetServiceName -} - -func ExampleGetTypeMapA() { - _ = GetTypeMapA -} - -func ExampleGetTypeMapAAAA() { - _ = GetTypeMapAAAA -} - -func ExampleGetTypeMapEmpty() { - _ = GetTypeMapEmpty -} - -func ExampleGetTypeMapNS() { - _ = GetTypeMapNS -} - -func ExampleGetTypeMapRoot() { - _ = GetTypeMapRoot -} - -func ExampleGetTypeMapTXT() { - _ = GetTypeMapTXT -} - -func ExampleGetVerify() { - _ = GetVerify -} - -func ExampleGetVerifyBinary() { - _ = GetVerifyBinary -} - -func ExampleGetVerifyByBinary() { - _ = GetVerifyByBinary -} - -func ExampleGetVerifyByName() { - _ = GetVerifyByName -} - -func ExampleGetVerifyByString() { - _ = GetVerifyByString -} - -func ExampleGetVerifyName() { - _ = GetVerifyName -} - -func ExampleGetVerifyString() { - _ = GetVerifyString -} - -func ExampleHash() { - _ = Hash -} - -func ExampleHashBinary() { - _ = HashBinary -} - -func ExampleHashByBinary() { - _ = HashByBinary -} - -func ExampleHashByName() { - _ = HashByName -} - -func ExampleHashByString() { - _ = HashByString -} - -func ExampleHashName() { - _ = HashName -} - -func ExampleHashString() { - _ = HashString -} - -func ExampleNSECRecord_GetName() { - _ = (*NSECRecord).GetName -} - -func ExampleNSECRecord_GetNextDomain() { - _ = (*NSECRecord).GetNextDomain -} - -func ExampleNSECRecord_GetTTL() { - _ = (*NSECRecord).GetTTL -} - -func ExampleNSECRecord_GetTypeBitmap() { - _ = (*NSECRecord).GetTypeBitmap -} - -func ExampleNSRecord_FromJSON() { - _ = (*NSRecord).FromJSON -} - -func ExampleNSRecord_GetJSON() { - _ = (*NSRecord).GetJSON -} - -func ExampleNSRecord_GetNS() { - _ = (*NSRecord).GetNS -} - -func ExampleNSRecord_GetSize() { - _ = (*NSRecord).GetSize -} - -func ExampleNSRecord_GetType() { - _ = (*NSRecord).GetType -} - -func ExampleNSRecord_Type() { - _ = (*NSRecord).Type -} - -func ExampleNewService() { - _ = NewService -} - -func ExamplePrevName() { - _ = PrevName -} - -func ExampleResolve() { - _ = Resolve -} - -func ExampleResolveBinary() { - _ = ResolveBinary -} - -func ExampleResolveByBinary() { - _ = ResolveByBinary -} - -func ExampleResolveByName() { - _ = ResolveByName -} - -func ExampleResolveByString() { - _ = ResolveByString -} - -func ExampleResolveName() { - _ = ResolveName -} - -func ExampleResolveString() { - _ = ResolveString -} - -func ExampleResource_Decode() { - _ = (*Resource).Decode -} - -func ExampleResource_Encode() { - _ = (*Resource).Encode -} - -func ExampleResource_FromJSON() { - _ = (*Resource).FromJSON -} - -func ExampleResource_GetDecode() { - _ = (*Resource).GetDecode -} - -func ExampleResource_GetEncode() { - _ = (*Resource).GetEncode -} - -func ExampleResource_GetHasDS() { - _ = (*Resource).GetHasDS -} - -func ExampleResource_GetHasNS() { - _ = (*Resource).GetHasNS -} - -func ExampleResource_GetHasType() { - _ = (*Resource).GetHasType -} - -func ExampleResource_GetJSON() { - _ = (*Resource).GetJSON -} - -func ExampleResource_GetRecords() { - _ = (*Resource).GetRecords -} - -func ExampleResource_GetSize() { - _ = (*Resource).GetSize -} - -func ExampleResource_GetTTL() { - _ = (*Resource).GetTTL -} - -func ExampleResource_GetToDNS() { - _ = (*Resource).GetToDNS -} - -func ExampleResource_GetToDS() { - _ = (*Resource).GetToDS -} - -func ExampleResource_GetToGlue() { - _ = (*Resource).GetToGlue -} - -func ExampleResource_GetToNS() { - _ = (*Resource).GetToNS -} - -func ExampleResource_GetToNSEC() { - _ = (*Resource).GetToNSEC -} - -func ExampleResource_GetToReferral() { - _ = (*Resource).GetToReferral -} - -func ExampleResource_GetToTXT() { - _ = (*Resource).GetToTXT -} - -func ExampleResource_GetToZone() { - _ = (*Resource).GetToZone -} - -func ExampleResource_HasDS() { - _ = (*Resource).HasDS -} - -func ExampleResource_HasNS() { - _ = (*Resource).HasNS -} - -func ExampleResource_HasType() { - _ = (*Resource).HasType -} - -func ExampleResource_ToDNS() { - _ = (*Resource).ToDNS -} - -func ExampleResource_ToDS() { - _ = (*Resource).ToDS -} - -func ExampleResource_ToGlue() { - _ = (*Resource).ToGlue -} - -func ExampleResource_ToNS() { - _ = (*Resource).ToNS -} - -func ExampleResource_ToNSEC() { - _ = (*Resource).ToNSEC -} - -func ExampleResource_ToReferral() { - _ = (*Resource).ToReferral -} - -func ExampleResource_ToTXT() { - _ = (*Resource).ToTXT -} - -func ExampleResource_ToZone() { - _ = (*Resource).ToZone -} - -func ExampleSYNTH4Record_FromJSON() { - _ = (*SYNTH4Record).FromJSON -} - -func ExampleSYNTH4Record_GetAddress() { - _ = (*SYNTH4Record).GetAddress -} - -func ExampleSYNTH4Record_GetJSON() { - _ = (*SYNTH4Record).GetJSON -} - -func ExampleSYNTH4Record_GetNS() { - _ = (*SYNTH4Record).GetNS -} - -func ExampleSYNTH4Record_GetSize() { - _ = (*SYNTH4Record).GetSize -} - -func ExampleSYNTH4Record_GetType() { - _ = (*SYNTH4Record).GetType -} - -func ExampleSYNTH4Record_NS() { - _ = (*SYNTH4Record).NS -} - -func ExampleSYNTH4Record_Type() { - _ = (*SYNTH4Record).Type -} - -func ExampleSYNTH6Record_FromJSON() { - _ = (*SYNTH6Record).FromJSON -} - -func ExampleSYNTH6Record_GetAddress() { - _ = (*SYNTH6Record).GetAddress -} - -func ExampleSYNTH6Record_GetJSON() { - _ = (*SYNTH6Record).GetJSON -} - -func ExampleSYNTH6Record_GetNS() { - _ = (*SYNTH6Record).GetNS -} - -func ExampleSYNTH6Record_GetSize() { - _ = (*SYNTH6Record).GetSize -} - -func ExampleSYNTH6Record_GetType() { - _ = (*SYNTH6Record).GetType -} - -func ExampleSYNTH6Record_NS() { - _ = (*SYNTH6Record).NS -} - -func ExampleSYNTH6Record_Type() { - _ = (*SYNTH6Record).Type -} - -func ExampleService_Core() { - _ = (*Service).Core -} - -func ExampleService_GetCore() { - _ = (*Service).GetCore -} - -func ExampleService_GetHash() { - _ = (*Service).GetHash -} - -func ExampleService_GetHashBinary() { - _ = (*Service).GetHashBinary -} - -func ExampleService_GetHashByBinary() { - _ = (*Service).GetHashByBinary -} - -func ExampleService_GetHashByName() { - _ = (*Service).GetHashByName -} - -func ExampleService_GetHashByString() { - _ = (*Service).GetHashByString -} - -func ExampleService_GetHashName() { - _ = (*Service).GetHashName -} - -func ExampleService_GetHashString() { - _ = (*Service).GetHashString -} - -func ExampleService_GetResolve() { - _ = (*Service).GetResolve -} - -func ExampleService_GetResolveBinary() { - _ = (*Service).GetResolveBinary -} - -func ExampleService_GetResolveByBinary() { - _ = (*Service).GetResolveByBinary -} - -func ExampleService_GetResolveByName() { - _ = (*Service).GetResolveByName -} - -func ExampleService_GetResolveByString() { - _ = (*Service).GetResolveByString -} - -func ExampleService_GetResolveName() { - _ = (*Service).GetResolveName -} - -func ExampleService_GetResolveString() { - _ = (*Service).GetResolveString -} - -func ExampleService_GetServiceName() { - _ = (*Service).GetServiceName -} - -func ExampleService_GetVerify() { - _ = (*Service).GetVerify -} - -func ExampleService_GetVerifyBinary() { - _ = (*Service).GetVerifyBinary -} - -func ExampleService_GetVerifyByBinary() { - _ = (*Service).GetVerifyByBinary -} - -func ExampleService_GetVerifyByName() { - _ = (*Service).GetVerifyByName -} - -func ExampleService_GetVerifyByString() { - _ = (*Service).GetVerifyByString -} - -func ExampleService_GetVerifyName() { - _ = (*Service).GetVerifyName -} - -func ExampleService_GetVerifyString() { - _ = (*Service).GetVerifyString -} - -func ExampleService_Hash() { - _ = (*Service).Hash -} - -func ExampleService_HashBinary() { - _ = (*Service).HashBinary -} - -func ExampleService_HashByBinary() { - _ = (*Service).HashByBinary -} - -func ExampleService_HashByName() { - _ = (*Service).HashByName -} - -func ExampleService_HashByString() { - _ = (*Service).HashByString -} - -func ExampleService_HashName() { - _ = (*Service).HashName -} - -func ExampleService_HashString() { - _ = (*Service).HashString -} - -func ExampleService_Resolve() { - _ = (*Service).Resolve -} - -func ExampleService_ResolveBinary() { - _ = (*Service).ResolveBinary -} - -func ExampleService_ResolveByBinary() { - _ = (*Service).ResolveByBinary -} - -func ExampleService_ResolveByName() { - _ = (*Service).ResolveByName -} - -func ExampleService_ResolveByString() { - _ = (*Service).ResolveByString -} - -func ExampleService_ResolveName() { - _ = (*Service).ResolveName -} - -func ExampleService_ResolveString() { - _ = (*Service).ResolveString -} - -func ExampleService_ServiceName() { - _ = (*Service).ServiceName -} - -func ExampleService_Verify() { - _ = (*Service).Verify -} - -func ExampleService_VerifyBinary() { - _ = (*Service).VerifyBinary -} - -func ExampleService_VerifyByBinary() { - _ = (*Service).VerifyByBinary -} - -func ExampleService_VerifyByName() { - _ = (*Service).VerifyByName -} - -func ExampleService_VerifyByString() { - _ = (*Service).VerifyByString -} - -func ExampleService_VerifyName() { - _ = (*Service).VerifyName -} - -func ExampleService_VerifyString() { - _ = (*Service).VerifyString -} - -func ExampleTXTRecord_FromJSON() { - _ = (*TXTRecord).FromJSON -} - -func ExampleTXTRecord_GetEntries() { - _ = (*TXTRecord).GetEntries -} - -func ExampleTXTRecord_GetJSON() { - _ = (*TXTRecord).GetJSON -} - -func ExampleTXTRecord_GetSize() { - _ = (*TXTRecord).GetSize -} - -func ExampleTXTRecord_GetType() { - _ = (*TXTRecord).GetType -} - -func ExampleTXTRecord_Type() { - _ = (*TXTRecord).Type -} - -func ExampleVerify() { - _ = Verify -} - -func ExampleVerifyBinary() { - _ = VerifyBinary -} - -func ExampleVerifyByBinary() { - _ = VerifyByBinary -} - -func ExampleVerifyByName() { - _ = VerifyByName -} - -func ExampleVerifyByString() { - _ = VerifyByString -} - -func ExampleVerifyName() { - _ = VerifyName -} - -func ExampleWithCore() { - _ = WithCore -} diff --git a/pkg/primitives/claim_example_test.go b/pkg/primitives/claim_example_test.go index 748ae41..fc7d244 100644 --- a/pkg/primitives/claim_example_test.go +++ b/pkg/primitives/claim_example_test.go @@ -4,8 +4,7 @@ package primitives import "fmt" -func ExampleNewClaim_good() { +func ExampleNewClaim() { fmt.Println(NewClaim().GetSize()) // Output: 2 } - diff --git a/pkg/primitives/covenant_binary_example_test.go b/pkg/primitives/covenant_binary_example_test.go index e88fdbc..3859712 100644 --- a/pkg/primitives/covenant_binary_example_test.go +++ b/pkg/primitives/covenant_binary_example_test.go @@ -4,9 +4,8 @@ package primitives import "fmt" -func ExampleCovenant_MarshalBinary_good() { +func ExampleCovenant_MarshalBinary() { raw, _ := Covenant{}.MarshalBinary() fmt.Println(len(raw)) // Output: 2 } - diff --git a/pkg/primitives/covenant_items_example_test.go b/pkg/primitives/covenant_items_example_test.go index f534b4e..d02cfd7 100644 --- a/pkg/primitives/covenant_items_example_test.go +++ b/pkg/primitives/covenant_items_example_test.go @@ -4,10 +4,9 @@ package primitives import "fmt" -func ExampleCovenant_SetOpen_good() { +func ExampleCovenant_SetOpen() { var cov Covenant cov.SetOpen(Hash{}, []byte("example")) fmt.Println(cov.Len()) // Output: 3 } - diff --git a/pkg/primitives/covenant_json_example_test.go b/pkg/primitives/covenant_json_example_test.go index dc9771d..c0934fc 100644 --- a/pkg/primitives/covenant_json_example_test.go +++ b/pkg/primitives/covenant_json_example_test.go @@ -4,7 +4,7 @@ package primitives import "fmt" -func ExampleCovenant_GetJSON_good() { +func ExampleCovenant_GetJSON() { json := Covenant{Type: covenantTypeOpen, Items: [][]byte{{0x01, 0x02}}}.GetJSON() fmt.Println(json.Action) // Output: OPEN diff --git a/pkg/primitives/invitem_example_test.go b/pkg/primitives/invitem_example_test.go index 4a7ac1d..129fc5a 100644 --- a/pkg/primitives/invitem_example_test.go +++ b/pkg/primitives/invitem_example_test.go @@ -4,8 +4,7 @@ package primitives import "fmt" -func ExampleNewInvItem_good() { +func ExampleNewInvItem() { fmt.Println(NewInvItem(InvTypeClaim, Hash{}).IsClaim()) // Output: true } - diff --git a/pkg/primitives/namedelta_example_test.go b/pkg/primitives/namedelta_example_test.go index 618051a..9b9ee65 100644 --- a/pkg/primitives/namedelta_example_test.go +++ b/pkg/primitives/namedelta_example_test.go @@ -4,8 +4,7 @@ package primitives import "fmt" -func ExampleNameDelta_IsNull_good() { +func ExampleNameDelta_IsNull() { fmt.Println(NameDelta{}.IsNull()) // Output: true } - diff --git a/pkg/primitives/namestate_binary_example_test.go b/pkg/primitives/namestate_binary_example_test.go index 50805dc..0e2648d 100644 --- a/pkg/primitives/namestate_binary_example_test.go +++ b/pkg/primitives/namestate_binary_example_test.go @@ -6,7 +6,7 @@ import ( "fmt" ) -func ExampleNameState_MarshalBinary_good() { +func ExampleNameState_MarshalBinary() { raw, _ := NameState{Name: []byte("example")}.MarshalBinary() fmt.Println(len(raw) > 0) // Output: true diff --git a/pkg/primitives/namestate_example_test.go b/pkg/primitives/namestate_example_test.go index 71b5ca5..e8cddfc 100644 --- a/pkg/primitives/namestate_example_test.go +++ b/pkg/primitives/namestate_example_test.go @@ -4,9 +4,8 @@ package primitives import "fmt" -func ExampleNameState_Clone_good() { +func ExampleNameState_Clone() { ns := NameState{Name: []byte("example")} fmt.Println(string(ns.Clone().Name)) // Output: example } - diff --git a/pkg/primitives/namestate_json_example_test.go b/pkg/primitives/namestate_json_example_test.go index fa83827..b5865b6 100644 --- a/pkg/primitives/namestate_json_example_test.go +++ b/pkg/primitives/namestate_json_example_test.go @@ -4,7 +4,7 @@ package primitives import "fmt" -func ExampleNameState_GetJSON_good() { +func ExampleNameState_GetJSON() { json := NameState{ Name: []byte("example"), NameHash: Hash{0x01}, diff --git a/pkg/primitives/namestate_state_example_test.go b/pkg/primitives/namestate_state_example_test.go index 39b406a..92fb31d 100644 --- a/pkg/primitives/namestate_state_example_test.go +++ b/pkg/primitives/namestate_state_example_test.go @@ -4,9 +4,8 @@ package primitives import "fmt" -func ExampleNameState_IsOpening_good() { +func ExampleNameState_IsOpening() { ns := NameState{Height: 10} fmt.Println(ns.IsOpening(10, NameStateRules{TreeInterval: 5})) // Output: true } - diff --git a/pkg/primitives/namestate_stats_example_test.go b/pkg/primitives/namestate_stats_example_test.go index 418b6c3..b90a850 100644 --- a/pkg/primitives/namestate_stats_example_test.go +++ b/pkg/primitives/namestate_stats_example_test.go @@ -4,7 +4,7 @@ package primitives import "fmt" -func ExampleNameState_ToStats_good() { +func ExampleNameState_ToStats() { stats := NameState{ Name: []byte("example"), Height: 10, diff --git a/pkg/primitives/outpoint_example_test.go b/pkg/primitives/outpoint_example_test.go index 6808658..d22df68 100644 --- a/pkg/primitives/outpoint_example_test.go +++ b/pkg/primitives/outpoint_example_test.go @@ -4,7 +4,7 @@ package primitives import "fmt" -func ExampleNewOutpoint_good() { +func ExampleNewOutpoint() { fmt.Println(NewOutpoint().IsNull()) // Output: true } diff --git a/pkg/primitives/outpoint_json_example_test.go b/pkg/primitives/outpoint_json_example_test.go index 79a83a3..d50f06f 100644 --- a/pkg/primitives/outpoint_json_example_test.go +++ b/pkg/primitives/outpoint_json_example_test.go @@ -4,7 +4,7 @@ package primitives import "fmt" -func ExampleOutpoint_GetJSON_good() { +func ExampleOutpoint_GetJSON() { fmt.Println(NewOutpoint().GetJSON().Index) // Output: 4294967295 } diff --git a/pkg/primitives/types_example_test.go b/pkg/primitives/types_example_test.go index 2f28bb5..ebdf446 100644 --- a/pkg/primitives/types_example_test.go +++ b/pkg/primitives/types_example_test.go @@ -4,8 +4,7 @@ package primitives import "fmt" -func ExampleCovenant_IsName_good() { +func ExampleCovenant_IsName() { fmt.Println(Covenant{Type: covenantTypeOpen}.IsName()) // Output: true } - diff --git a/pkg/primitives/view_example_test.go b/pkg/primitives/view_example_test.go index b4c08e0..8bff011 100644 --- a/pkg/primitives/view_example_test.go +++ b/pkg/primitives/view_example_test.go @@ -4,10 +4,9 @@ package primitives import "fmt" -func ExampleNewNameView_good() { +func ExampleNewNameView() { view := NewNameView() ns, _ := view.GetNameStateSync(nil, Hash{}) fmt.Println(ns.NameHash == (Hash{})) // Output: true } - diff --git a/pkg/primitives/zz_codex_examples_example_test.go b/pkg/primitives/zz_codex_examples_example_test.go deleted file mode 100644 index 292e7fd..0000000 --- a/pkg/primitives/zz_codex_examples_example_test.go +++ /dev/null @@ -1,699 +0,0 @@ -package primitives - -// Code generated by Codex. DO NOT EDIT. - -func ExampleAddress_Clone() { - _ = (*Address).Clone -} - -func ExampleAddress_Compare() { - _ = (*Address).Compare -} - -func ExampleAddress_Equals() { - _ = (*Address).Equals -} - -func ExampleAddress_GetSize() { - _ = (*Address).GetSize -} - -func ExampleAddress_Inject() { - _ = (*Address).Inject -} - -func ExampleAddress_IsNull() { - _ = (*Address).IsNull -} - -func ExampleAddress_IsNulldata() { - _ = (*Address).IsNulldata -} - -func ExampleAddress_IsPubkeyHash() { - _ = (*Address).IsPubkeyHash -} - -func ExampleAddress_IsScripthash() { - _ = (*Address).IsScripthash -} - -func ExampleAddress_IsUnknown() { - _ = (*Address).IsUnknown -} - -func ExampleAddress_IsUnspendable() { - _ = (*Address).IsUnspendable -} - -func ExampleAddress_IsValid() { - _ = (*Address).IsValid -} - -func ExampleClaim_Clone() { - _ = (*Claim).Clone -} - -func ExampleClaim_FromBlob() { - _ = (*Claim).FromBlob -} - -func ExampleClaim_GetBlob() { - _ = (*Claim).GetBlob -} - -func ExampleClaim_GetFromBlob() { - _ = (*Claim).GetFromBlob -} - -func ExampleClaim_GetHash() { - _ = (*Claim).GetHash -} - -func ExampleClaim_GetHashHex() { - _ = (*Claim).GetHashHex -} - -func ExampleClaim_GetSize() { - _ = (*Claim).GetSize -} - -func ExampleClaim_GetToBlob() { - _ = (*Claim).GetToBlob -} - -func ExampleClaim_GetToInv() { - _ = (*Claim).GetToInv -} - -func ExampleClaim_GetVirtualSize() { - _ = (*Claim).GetVirtualSize -} - -func ExampleClaim_GetWeight() { - _ = (*Claim).GetWeight -} - -func ExampleClaim_Hash() { - _ = (*Claim).Hash -} - -func ExampleClaim_HashHex() { - _ = (*Claim).HashHex -} - -func ExampleClaim_MarshalBinary() { - _ = (*Claim).MarshalBinary -} - -func ExampleClaim_Refresh() { - _ = (*Claim).Refresh -} - -func ExampleClaim_ToBlob() { - _ = (*Claim).ToBlob -} - -func ExampleClaim_ToInv() { - _ = (*Claim).ToInv -} - -func ExampleClaim_UnmarshalBinary() { - _ = (*Claim).UnmarshalBinary -} - -func ExampleClaim_VirtualSize() { - _ = (*Claim).VirtualSize -} - -func ExampleClaim_Weight() { - _ = (*Claim).Weight -} - -func ExampleCovenant_Clone() { - _ = (*Covenant).Clone -} - -func ExampleCovenant_FromArray() { - _ = (*Covenant).FromArray -} - -func ExampleCovenant_FromJSON() { - _ = (*Covenant).FromJSON -} - -func ExampleCovenant_Get() { - _ = (*Covenant).Get -} - -func ExampleCovenant_GetHash() { - _ = (*Covenant).GetHash -} - -func ExampleCovenant_GetJSON() { - _ = (*Covenant).GetJSON -} - -func ExampleCovenant_GetSize() { - _ = (*Covenant).GetSize -} - -func ExampleCovenant_GetString() { - _ = (*Covenant).GetString -} - -func ExampleCovenant_GetU32() { - _ = (*Covenant).GetU32 -} - -func ExampleCovenant_GetU8() { - _ = (*Covenant).GetU8 -} - -func ExampleCovenant_GetVarSize() { - _ = (*Covenant).GetVarSize -} - -func ExampleCovenant_IndexOf() { - _ = (*Covenant).IndexOf -} - -func ExampleCovenant_Inject() { - _ = (*Covenant).Inject -} - -func ExampleCovenant_IsBid() { - _ = (*Covenant).IsBid -} - -func ExampleCovenant_IsClaim() { - _ = (*Covenant).IsClaim -} - -func ExampleCovenant_IsDustworthy() { - _ = (*Covenant).IsDustworthy -} - -func ExampleCovenant_IsFinalize() { - _ = (*Covenant).IsFinalize -} - -func ExampleCovenant_IsKnown() { - _ = (*Covenant).IsKnown -} - -func ExampleCovenant_IsLinked() { - _ = (*Covenant).IsLinked -} - -func ExampleCovenant_IsName() { - _ = (*Covenant).IsName -} - -func ExampleCovenant_IsNone() { - _ = (*Covenant).IsNone -} - -func ExampleCovenant_IsNonspendable() { - _ = (*Covenant).IsNonspendable -} - -func ExampleCovenant_IsOpen() { - _ = (*Covenant).IsOpen -} - -func ExampleCovenant_IsRedeem() { - _ = (*Covenant).IsRedeem -} - -func ExampleCovenant_IsRegister() { - _ = (*Covenant).IsRegister -} - -func ExampleCovenant_IsRenew() { - _ = (*Covenant).IsRenew -} - -func ExampleCovenant_IsReveal() { - _ = (*Covenant).IsReveal -} - -func ExampleCovenant_IsRevoke() { - _ = (*Covenant).IsRevoke -} - -func ExampleCovenant_IsTransfer() { - _ = (*Covenant).IsTransfer -} - -func ExampleCovenant_IsUnknown() { - _ = (*Covenant).IsUnknown -} - -func ExampleCovenant_IsUnspendable() { - _ = (*Covenant).IsUnspendable -} - -func ExampleCovenant_IsUpdate() { - _ = (*Covenant).IsUpdate -} - -func ExampleCovenant_Len() { - _ = (*Covenant).Len -} - -func ExampleCovenant_MarshalBinary() { - _ = (*Covenant).MarshalBinary -} - -func ExampleCovenant_Push() { - _ = (*Covenant).Push -} - -func ExampleCovenant_PushHash() { - _ = (*Covenant).PushHash -} - -func ExampleCovenant_PushString() { - _ = (*Covenant).PushString -} - -func ExampleCovenant_PushU32() { - _ = (*Covenant).PushU32 -} - -func ExampleCovenant_PushU8() { - _ = (*Covenant).PushU8 -} - -func ExampleCovenant_Set() { - _ = (*Covenant).Set -} - -func ExampleCovenant_SetBid() { - _ = (*Covenant).SetBid -} - -func ExampleCovenant_SetClaim() { - _ = (*Covenant).SetClaim -} - -func ExampleCovenant_SetFinalize() { - _ = (*Covenant).SetFinalize -} - -func ExampleCovenant_SetNone() { - _ = (*Covenant).SetNone -} - -func ExampleCovenant_SetOpen() { - _ = (*Covenant).SetOpen -} - -func ExampleCovenant_SetRedeem() { - _ = (*Covenant).SetRedeem -} - -func ExampleCovenant_SetRegister() { - _ = (*Covenant).SetRegister -} - -func ExampleCovenant_SetRenew() { - _ = (*Covenant).SetRenew -} - -func ExampleCovenant_SetReveal() { - _ = (*Covenant).SetReveal -} - -func ExampleCovenant_SetRevoke() { - _ = (*Covenant).SetRevoke -} - -func ExampleCovenant_SetTransfer() { - _ = (*Covenant).SetTransfer -} - -func ExampleCovenant_SetUpdate() { - _ = (*Covenant).SetUpdate -} - -func ExampleCovenant_ToArray() { - _ = (*Covenant).ToArray -} - -func ExampleCovenant_UnmarshalBinary() { - _ = (*Covenant).UnmarshalBinary -} - -func ExampleGetNewClaim() { - _ = GetNewClaim -} - -func ExampleGetNewInvItem() { - _ = GetNewInvItem -} - -func ExampleInput_IsCoinbase() { - _ = (*Input).IsCoinbase -} - -func ExampleInput_IsFinal() { - _ = (*Input).IsFinal -} - -func ExampleInvItem_GetSize() { - _ = (*InvItem).GetSize -} - -func ExampleInvItem_IsAirdrop() { - _ = (*InvItem).IsAirdrop -} - -func ExampleInvItem_IsBlock() { - _ = (*InvItem).IsBlock -} - -func ExampleInvItem_IsClaim() { - _ = (*InvItem).IsClaim -} - -func ExampleInvItem_IsTX() { - _ = (*InvItem).IsTX -} - -func ExampleInvItem_MarshalBinary() { - _ = (*InvItem).MarshalBinary -} - -func ExampleInvItem_UnmarshalBinary() { - _ = (*InvItem).UnmarshalBinary -} - -func ExampleNameDelta_Clear() { - _ = (*NameDelta).Clear -} - -func ExampleNameDelta_Clone() { - _ = (*NameDelta).Clone -} - -func ExampleNameDelta_GetField() { - _ = (*NameDelta).GetField -} - -func ExampleNameDelta_GetSize() { - _ = (*NameDelta).GetSize -} - -func ExampleNameDelta_Inject() { - _ = (*NameDelta).Inject -} - -func ExampleNameDelta_IsNull() { - _ = (*NameDelta).IsNull -} - -func ExampleNameDelta_MarshalBinary() { - _ = (*NameDelta).MarshalBinary -} - -func ExampleNameDelta_UnmarshalBinary() { - _ = (*NameDelta).UnmarshalBinary -} - -func ExampleNameStateStatus_String() { - _ = (*NameStateStatus).String -} - -func ExampleNameState_ApplyState() { - _ = (*NameState).ApplyState -} - -func ExampleNameState_Clear() { - _ = (*NameState).Clear -} - -func ExampleNameState_Clone() { - _ = (*NameState).Clone -} - -func ExampleNameState_Delta() { - _ = (*NameState).Delta -} - -func ExampleNameState_Format() { - _ = (*NameState).Format -} - -func ExampleNameState_FromJSON() { - _ = (*NameState).FromJSON -} - -func ExampleNameState_GetApplyState() { - _ = (*NameState).GetApplyState -} - -func ExampleNameState_GetClear() { - _ = (*NameState).GetClear -} - -func ExampleNameState_GetClone() { - _ = (*NameState).GetClone -} - -func ExampleNameState_GetDelta() { - _ = (*NameState).GetDelta -} - -func ExampleNameState_GetFormat() { - _ = (*NameState).GetFormat -} - -func ExampleNameState_GetFromJSON() { - _ = (*NameState).GetFromJSON -} - -func ExampleNameState_GetHasDelta() { - _ = (*NameState).GetHasDelta -} - -func ExampleNameState_GetInject() { - _ = (*NameState).GetInject -} - -func ExampleNameState_GetIsBidding() { - _ = (*NameState).GetIsBidding -} - -func ExampleNameState_GetIsClaimable() { - _ = (*NameState).GetIsClaimable -} - -func ExampleNameState_GetIsClosed() { - _ = (*NameState).GetIsClosed -} - -func ExampleNameState_GetIsExpired() { - _ = (*NameState).GetIsExpired -} - -func ExampleNameState_GetIsLocked() { - _ = (*NameState).GetIsLocked -} - -func ExampleNameState_GetIsNull() { - _ = (*NameState).GetIsNull -} - -func ExampleNameState_GetIsOpening() { - _ = (*NameState).GetIsOpening -} - -func ExampleNameState_GetIsRedeemable() { - _ = (*NameState).GetIsRedeemable -} - -func ExampleNameState_GetIsReveal() { - _ = (*NameState).GetIsReveal -} - -func ExampleNameState_GetIsRevoked() { - _ = (*NameState).GetIsRevoked -} - -func ExampleNameState_GetJSON() { - _ = (*NameState).GetJSON -} - -func ExampleNameState_GetMaybeExpire() { - _ = (*NameState).GetMaybeExpire -} - -func ExampleNameState_GetReset() { - _ = (*NameState).GetReset -} - -func ExampleNameState_GetSet() { - _ = (*NameState).GetSet -} - -func ExampleNameState_GetSize() { - _ = (*NameState).GetSize -} - -func ExampleNameState_GetState() { - _ = (*NameState).GetState -} - -func ExampleNameState_GetToStats() { - _ = (*NameState).GetToStats -} - -func ExampleNameState_HasDelta() { - _ = (*NameState).HasDelta -} - -func ExampleNameState_Inject() { - _ = (*NameState).Inject -} - -func ExampleNameState_IsBidding() { - _ = (*NameState).IsBidding -} - -func ExampleNameState_IsClaimable() { - _ = (*NameState).IsClaimable -} - -func ExampleNameState_IsClosed() { - _ = (*NameState).IsClosed -} - -func ExampleNameState_IsExpired() { - _ = (*NameState).IsExpired -} - -func ExampleNameState_IsLocked() { - _ = (*NameState).IsLocked -} - -func ExampleNameState_IsNull() { - _ = (*NameState).IsNull -} - -func ExampleNameState_IsOpening() { - _ = (*NameState).IsOpening -} - -func ExampleNameState_IsRedeemable() { - _ = (*NameState).IsRedeemable -} - -func ExampleNameState_IsReveal() { - _ = (*NameState).IsReveal -} - -func ExampleNameState_IsRevoked() { - _ = (*NameState).IsRevoked -} - -func ExampleNameState_MarshalBinary() { - _ = (*NameState).MarshalBinary -} - -func ExampleNameState_MaybeExpire() { - _ = (*NameState).MaybeExpire -} - -func ExampleNameState_Reset() { - _ = (*NameState).Reset -} - -func ExampleNameState_Set() { - _ = (*NameState).Set -} - -func ExampleNameState_State() { - _ = (*NameState).State -} - -func ExampleNameState_ToStats() { - _ = (*NameState).ToStats -} - -func ExampleNameState_UnmarshalBinary() { - _ = (*NameState).UnmarshalBinary -} - -func ExampleNameUndo_FromView() { - _ = (*NameUndo).FromView -} - -func ExampleNameUndo_GetSize() { - _ = (*NameUndo).GetSize -} - -func ExampleNameUndo_MarshalBinary() { - _ = (*NameUndo).MarshalBinary -} - -func ExampleNameUndo_UnmarshalBinary() { - _ = (*NameUndo).UnmarshalBinary -} - -func ExampleNameView_GetNameState() { - _ = (*NameView).GetNameState -} - -func ExampleNameView_GetNameStateSync() { - _ = (*NameView).GetNameStateSync -} - -func ExampleNameView_ToNameUndo() { - _ = (*NameView).ToNameUndo -} - -func ExampleOutpoint_Clone() { - _ = (*Outpoint).Clone -} - -func ExampleOutpoint_Compare() { - _ = (*Outpoint).Compare -} - -func ExampleOutpoint_Equals() { - _ = (*Outpoint).Equals -} - -func ExampleOutpoint_FromJSON() { - _ = (*Outpoint).FromJSON -} - -func ExampleOutpoint_GetJSON() { - _ = (*Outpoint).GetJSON -} - -func ExampleOutpoint_GetSize() { - _ = (*Outpoint).GetSize -} - -func ExampleOutpoint_Inject() { - _ = (*Outpoint).Inject -} - -func ExampleOutpoint_IsNull() { - _ = (*Outpoint).IsNull -} - -func ExampleOutpoint_MarshalBinary() { - _ = (*Outpoint).MarshalBinary -} - -func ExampleOutpoint_UnmarshalBinary() { - _ = (*Outpoint).UnmarshalBinary -} - -func ExampleOutput_IsUnspendable() { - _ = (*Output).IsUnspendable -} diff --git a/zz_codex_examples_example_test.go b/zz_codex_examples_example_test.go deleted file mode 100644 index 26d1448..0000000 --- a/zz_codex_examples_example_test.go +++ /dev/null @@ -1,1959 +0,0 @@ -package lns - -// Code generated by Codex. DO NOT EDIT. - -func ExampleAddNames() { - _ = AddNames -} - -func ExampleBlind() { - _ = Blind -} - -func ExampleCountOpens() { - _ = CountOpens -} - -func ExampleCountRenewals() { - _ = CountRenewals -} - -func ExampleCountUpdates() { - _ = CountUpdates -} - -func ExampleCreate() { - _ = Create -} - -func ExampleDecodeResource() { - _ = DecodeResource -} - -func ExampleDefaultLockedCatalog() { - _ = DefaultLockedCatalog -} - -func ExampleDefaultReservedCatalog() { - _ = DefaultReservedCatalog -} - -func ExampleGetAddNames() { - _ = GetAddNames -} - -func ExampleGetBlacklist() { - _ = GetBlacklist -} - -func ExampleGetBlind() { - _ = GetBlind -} - -func ExampleGetCountOpens() { - _ = GetCountOpens -} - -func ExampleGetCountRenewals() { - _ = GetCountRenewals -} - -func ExampleGetCountUpdates() { - _ = GetCountUpdates -} - -func ExampleGetCovenantMaxSize() { - _ = GetCovenantMaxSize -} - -func ExampleGetCreate() { - _ = GetCreate -} - -func ExampleGetDecodeResource() { - _ = GetDecodeResource -} - -func ExampleGetDefaultLockedCatalog() { - _ = GetDefaultLockedCatalog -} - -func ExampleGetDefaultReservedCatalog() { - _ = GetDefaultReservedCatalog -} - -func ExampleGetDefaultTTL() { - _ = GetDefaultTTL -} - -func ExampleGetDummy() { - _ = GetDummy -} - -func ExampleGetGrindName() { - _ = GetGrindName -} - -func ExampleGetHSTypes() { - _ = GetHSTypes -} - -func ExampleGetHSTypesByVal() { - _ = GetHSTypesByVal -} - -func ExampleGetHasLocked() { - _ = GetHasLocked -} - -func ExampleGetHasLockedBinary() { - _ = GetHasLockedBinary -} - -func ExampleGetHasLockedByBinary() { - _ = GetHasLockedByBinary -} - -func ExampleGetHasLockedByHash() { - _ = GetHasLockedByHash -} - -func ExampleGetHasLockedByName() { - _ = GetHasLockedByName -} - -func ExampleGetHasLockedByString() { - _ = GetHasLockedByString -} - -func ExampleGetHasLockedCatalog() { - _ = GetHasLockedCatalog -} - -func ExampleGetHasLockedHash() { - _ = GetHasLockedHash -} - -func ExampleGetHasLockedName() { - _ = GetHasLockedName -} - -func ExampleGetHasLockedString() { - _ = GetHasLockedString -} - -func ExampleGetHasLookupCatalogName() { - _ = GetHasLookupCatalogName[any] -} - -func ExampleGetHasNames() { - _ = GetHasNames -} - -func ExampleGetHasReserved() { - _ = GetHasReserved -} - -func ExampleGetHasReservedBinary() { - _ = GetHasReservedBinary -} - -func ExampleGetHasReservedByBinary() { - _ = GetHasReservedByBinary -} - -func ExampleGetHasReservedByHash() { - _ = GetHasReservedByHash -} - -func ExampleGetHasReservedByName() { - _ = GetHasReservedByName -} - -func ExampleGetHasReservedByString() { - _ = GetHasReservedByString -} - -func ExampleGetHasReservedCatalog() { - _ = GetHasReservedCatalog -} - -func ExampleGetHasReservedHash() { - _ = GetHasReservedHash -} - -func ExampleGetHasReservedName() { - _ = GetHasReservedName -} - -func ExampleGetHasReservedString() { - _ = GetHasReservedString -} - -func ExampleGetHasRollout() { - _ = GetHasRollout -} - -func ExampleGetHasSaneCovenants() { - _ = GetHasSaneCovenants -} - -func ExampleGetHash() { - _ = GetHash -} - -func ExampleGetHashBinary() { - _ = GetHashBinary -} - -func ExampleGetHashByBinary() { - _ = GetHashByBinary -} - -func ExampleGetHashByName() { - _ = GetHashByName -} - -func ExampleGetHashByString() { - _ = GetHashByString -} - -func ExampleGetHashName() { - _ = GetHashName -} - -func ExampleGetHashString() { - _ = GetHashString -} - -func ExampleGetIsKnown() { - _ = GetIsKnown -} - -func ExampleGetIsLinked() { - _ = GetIsLinked -} - -func ExampleGetIsLockedUp() { - _ = GetIsLockedUp -} - -func ExampleGetIsName() { - _ = GetIsName -} - -func ExampleGetIsReserved() { - _ = GetIsReserved -} - -func ExampleGetLocked() { - _ = GetLocked -} - -func ExampleGetLockedBinary() { - _ = GetLockedBinary -} - -func ExampleGetLockedByBinary() { - _ = GetLockedByBinary -} - -func ExampleGetLockedByHash() { - _ = GetLockedByHash -} - -func ExampleGetLockedByName() { - _ = GetLockedByName -} - -func ExampleGetLockedByString() { - _ = GetLockedByString -} - -func ExampleGetLockedCatalog() { - _ = GetLockedCatalog -} - -func ExampleGetLockedEntries() { - _ = GetLockedEntries -} - -func ExampleGetLockedHash() { - _ = GetLockedHash -} - -func ExampleGetLockedKeys() { - _ = GetLockedKeys -} - -func ExampleGetLockedName() { - _ = GetLockedName -} - -func ExampleGetLockedPrefixSize() { - _ = GetLockedPrefixSize -} - -func ExampleGetLockedSize() { - _ = GetLockedSize -} - -func ExampleGetLockedString() { - _ = GetLockedString -} - -func ExampleGetLockedValues() { - _ = GetLockedValues -} - -func ExampleGetLookupCatalogName() { - _ = GetLookupCatalogName[any] -} - -func ExampleGetMandatoryVerifyCovenantFlags() { - _ = GetMandatoryVerifyCovenantFlags -} - -func ExampleGetMaxCovenantSize() { - _ = GetMaxCovenantSize -} - -func ExampleGetMaxNameSize() { - _ = GetMaxNameSize -} - -func ExampleGetMaxResourceSize() { - _ = GetMaxResourceSize -} - -func ExampleGetNameValue() { - _ = GetNameValue -} - -func ExampleGetNewClaim() { - _ = GetNewClaim -} - -func ExampleGetNewInvItem() { - _ = GetNewInvItem -} - -func ExampleGetNewNameView() { - _ = GetNewNameView -} - -func ExampleGetNewOutpoint() { - _ = GetNewOutpoint -} - -func ExampleGetNewResource() { - _ = GetNewResource -} - -func ExampleGetNewService() { - _ = GetNewService -} - -func ExampleGetNewServiceWithOptions() { - _ = GetNewServiceWithOptions -} - -func ExampleGetNextName() { - _ = GetNextName -} - -func ExampleGetPrefixSize() { - _ = GetPrefixSize -} - -func ExampleGetPrevName() { - _ = GetPrevName -} - -func ExampleGetRegister() { - _ = GetRegister -} - -func ExampleGetRegisterWithOptions() { - _ = GetRegisterWithOptions -} - -func ExampleGetRemoveNames() { - _ = GetRemoveNames -} - -func ExampleGetReserved() { - _ = GetReserved -} - -func ExampleGetReservedBinary() { - _ = GetReservedBinary -} - -func ExampleGetReservedByBinary() { - _ = GetReservedByBinary -} - -func ExampleGetReservedByHash() { - _ = GetReservedByHash -} - -func ExampleGetReservedByName() { - _ = GetReservedByName -} - -func ExampleGetReservedByString() { - _ = GetReservedByString -} - -func ExampleGetReservedCatalog() { - _ = GetReservedCatalog -} - -func ExampleGetReservedEntries() { - _ = GetReservedEntries -} - -func ExampleGetReservedHash() { - _ = GetReservedHash -} - -func ExampleGetReservedKeys() { - _ = GetReservedKeys -} - -func ExampleGetReservedName() { - _ = GetReservedName -} - -func ExampleGetReservedNameValue() { - _ = GetReservedNameValue -} - -func ExampleGetReservedPrefixSize() { - _ = GetReservedPrefixSize -} - -func ExampleGetReservedRootValue() { - _ = GetReservedRootValue -} - -func ExampleGetReservedSize() { - _ = GetReservedSize -} - -func ExampleGetReservedString() { - _ = GetReservedString -} - -func ExampleGetReservedTopValue() { - _ = GetReservedTopValue -} - -func ExampleGetReservedValues() { - _ = GetReservedValues -} - -func ExampleGetResolve() { - _ = GetResolve -} - -func ExampleGetResolveBinary() { - _ = GetResolveBinary -} - -func ExampleGetResolveByBinary() { - _ = GetResolveByBinary -} - -func ExampleGetResolveByName() { - _ = GetResolveByName -} - -func ExampleGetResolveByString() { - _ = GetResolveByString -} - -func ExampleGetResolveName() { - _ = GetResolveName -} - -func ExampleGetResolveString() { - _ = GetResolveString -} - -func ExampleGetRollout() { - _ = GetRollout -} - -func ExampleGetRootValue() { - _ = GetRootValue -} - -func ExampleGetTopValue() { - _ = GetTopValue -} - -func ExampleGetTypeMapA() { - _ = GetTypeMapA -} - -func ExampleGetTypeMapAAAA() { - _ = GetTypeMapAAAA -} - -func ExampleGetTypeMapEmpty() { - _ = GetTypeMapEmpty -} - -func ExampleGetTypeMapNS() { - _ = GetTypeMapNS -} - -func ExampleGetTypeMapRoot() { - _ = GetTypeMapRoot -} - -func ExampleGetTypeMapTXT() { - _ = GetTypeMapTXT -} - -func ExampleGetTypeName() { - _ = GetTypeName -} - -func ExampleGetTypes() { - _ = GetTypes -} - -func ExampleGetTypesByVal() { - _ = GetTypesByVal -} - -func ExampleGetVerificationFlags() { - _ = GetVerificationFlags -} - -func ExampleGetVerificationFlagsByVal() { - _ = GetVerificationFlagsByVal -} - -func ExampleGetVerify() { - _ = GetVerify -} - -func ExampleGetVerifyBinary() { - _ = GetVerifyBinary -} - -func ExampleGetVerifyByBinary() { - _ = GetVerifyByBinary -} - -func ExampleGetVerifyByName() { - _ = GetVerifyByName -} - -func ExampleGetVerifyByString() { - _ = GetVerifyByString -} - -func ExampleGetVerifyCovenants() { - _ = GetVerifyCovenants -} - -func ExampleGetVerifyCovenantsHardened() { - _ = GetVerifyCovenantsHardened -} - -func ExampleGetVerifyCovenantsLockup() { - _ = GetVerifyCovenantsLockup -} - -func ExampleGetVerifyCovenantsNone() { - _ = GetVerifyCovenantsNone -} - -func ExampleGetVerifyName() { - _ = GetVerifyName -} - -func ExampleGetVerifyString() { - _ = GetVerifyString -} - -func ExampleGetWithCore() { - _ = GetWithCore -} - -func ExampleGetWithLockedCatalog() { - _ = GetWithLockedCatalog -} - -func ExampleGetWithReservedCatalog() { - _ = GetWithReservedCatalog -} - -func ExampleGrindName() { - _ = GrindName -} - -func ExampleHasLocked() { - _ = HasLocked -} - -func ExampleHasLockedBinary() { - _ = HasLockedBinary -} - -func ExampleHasLockedByBinary() { - _ = HasLockedByBinary -} - -func ExampleHasLockedByHash() { - _ = HasLockedByHash -} - -func ExampleHasLockedByName() { - _ = HasLockedByName -} - -func ExampleHasLockedByString() { - _ = HasLockedByString -} - -func ExampleHasLockedCatalog() { - _ = HasLockedCatalog -} - -func ExampleHasLockedHash() { - _ = HasLockedHash -} - -func ExampleHasLockedName() { - _ = HasLockedName -} - -func ExampleHasLockedString() { - _ = HasLockedString -} - -func ExampleHasLookupCatalogName() { - _ = HasLookupCatalogName[any] -} - -func ExampleHasNames() { - _ = HasNames -} - -func ExampleHasReserved() { - _ = HasReserved -} - -func ExampleHasReservedBinary() { - _ = HasReservedBinary -} - -func ExampleHasReservedByBinary() { - _ = HasReservedByBinary -} - -func ExampleHasReservedByHash() { - _ = HasReservedByHash -} - -func ExampleHasReservedByName() { - _ = HasReservedByName -} - -func ExampleHasReservedByString() { - _ = HasReservedByString -} - -func ExampleHasReservedCatalog() { - _ = HasReservedCatalog -} - -func ExampleHasReservedHash() { - _ = HasReservedHash -} - -func ExampleHasReservedName() { - _ = HasReservedName -} - -func ExampleHasReservedString() { - _ = HasReservedString -} - -func ExampleHasRollout() { - _ = HasRollout -} - -func ExampleHasSaneCovenants() { - _ = HasSaneCovenants -} - -func ExampleHash() { - _ = Hash -} - -func ExampleHashBinary() { - _ = HashBinary -} - -func ExampleHashByBinary() { - _ = HashByBinary -} - -func ExampleHashByName() { - _ = HashByName -} - -func ExampleHashByString() { - _ = HashByString -} - -func ExampleHashName() { - _ = HashName -} - -func ExampleHashString() { - _ = HashString -} - -func ExampleIsKnown() { - _ = IsKnown -} - -func ExampleIsLinked() { - _ = IsLinked -} - -func ExampleIsLockedUp() { - _ = IsLockedUp -} - -func ExampleIsName() { - _ = IsName -} - -func ExampleIsReserved() { - _ = IsReserved -} - -func ExampleLockedCatalog() { - _ = LockedCatalog -} - -func ExampleLockedEntries() { - _ = LockedEntries -} - -func ExampleLockedKeys() { - _ = LockedKeys -} - -func ExampleLockedPrefixSize() { - _ = LockedPrefixSize -} - -func ExampleLockedSize() { - _ = LockedSize -} - -func ExampleLockedValues() { - _ = LockedValues -} - -func ExampleLookupCatalogName() { - _ = LookupCatalogName[any] -} - -func ExampleNameValue() { - _ = NameValue -} - -func ExampleNewClaim() { - _ = NewClaim -} - -func ExampleNewInvItem() { - _ = NewInvItem -} - -func ExampleNewNameView() { - _ = NewNameView -} - -func ExampleNewOutpoint() { - _ = NewOutpoint -} - -func ExampleNewResource() { - _ = NewResource -} - -func ExampleNewService() { - _ = NewService -} - -func ExampleNewServiceWithOptions() { - _ = NewServiceWithOptions -} - -func ExampleNextName() { - _ = NextName -} - -func ExamplePrefixSize() { - _ = PrefixSize -} - -func ExamplePrevName() { - _ = PrevName -} - -func ExampleRegister() { - _ = Register -} - -func ExampleRegisterWithOptions() { - _ = RegisterWithOptions -} - -func ExampleRemoveNames() { - _ = RemoveNames -} - -func ExampleReservedCatalog() { - _ = ReservedCatalog -} - -func ExampleReservedEntries() { - _ = ReservedEntries -} - -func ExampleReservedKeys() { - _ = ReservedKeys -} - -func ExampleReservedNameValue() { - _ = ReservedNameValue -} - -func ExampleReservedPrefixSize() { - _ = ReservedPrefixSize -} - -func ExampleReservedRootValue() { - _ = ReservedRootValue -} - -func ExampleReservedSize() { - _ = ReservedSize -} - -func ExampleReservedTopValue() { - _ = ReservedTopValue -} - -func ExampleReservedValues() { - _ = ReservedValues -} - -func ExampleResolve() { - _ = Resolve -} - -func ExampleResolveBinary() { - _ = ResolveBinary -} - -func ExampleResolveByBinary() { - _ = ResolveByBinary -} - -func ExampleResolveByName() { - _ = ResolveByName -} - -func ExampleResolveByString() { - _ = ResolveByString -} - -func ExampleResolveName() { - _ = ResolveName -} - -func ExampleResolveString() { - _ = ResolveString -} - -func ExampleRootValue() { - _ = RootValue -} - -func ExampleService_AddNames() { - _ = (*Service).AddNames -} - -func ExampleService_Blacklist() { - _ = (*Service).Blacklist -} - -func ExampleService_Blind() { - _ = (*Service).Blind -} - -func ExampleService_Core() { - _ = (*Service).Core -} - -func ExampleService_CountOpens() { - _ = (*Service).CountOpens -} - -func ExampleService_CountRenewals() { - _ = (*Service).CountRenewals -} - -func ExampleService_CountUpdates() { - _ = (*Service).CountUpdates -} - -func ExampleService_CovenantMaxSize() { - _ = (*Service).CovenantMaxSize -} - -func ExampleService_Create() { - _ = (*Service).Create -} - -func ExampleService_DecodeResource() { - _ = (*Service).DecodeResource -} - -func ExampleService_DefaultLockedCatalog() { - _ = (*Service).DefaultLockedCatalog -} - -func ExampleService_DefaultReservedCatalog() { - _ = (*Service).DefaultReservedCatalog -} - -func ExampleService_DefaultTTL() { - _ = (*Service).DefaultTTL -} - -func ExampleService_Dummy() { - _ = (*Service).Dummy -} - -func ExampleService_GetAddNames() { - _ = (*Service).GetAddNames -} - -func ExampleService_GetBlacklist() { - _ = (*Service).GetBlacklist -} - -func ExampleService_GetBlind() { - _ = (*Service).GetBlind -} - -func ExampleService_GetCore() { - _ = (*Service).GetCore -} - -func ExampleService_GetCountOpens() { - _ = (*Service).GetCountOpens -} - -func ExampleService_GetCountRenewals() { - _ = (*Service).GetCountRenewals -} - -func ExampleService_GetCountUpdates() { - _ = (*Service).GetCountUpdates -} - -func ExampleService_GetCovenantMaxSize() { - _ = (*Service).GetCovenantMaxSize -} - -func ExampleService_GetCreate() { - _ = (*Service).GetCreate -} - -func ExampleService_GetDecodeResource() { - _ = (*Service).GetDecodeResource -} - -func ExampleService_GetDefaultLockedCatalog() { - _ = (*Service).GetDefaultLockedCatalog -} - -func ExampleService_GetDefaultReservedCatalog() { - _ = (*Service).GetDefaultReservedCatalog -} - -func ExampleService_GetDefaultTTL() { - _ = (*Service).GetDefaultTTL -} - -func ExampleService_GetDummy() { - _ = (*Service).GetDummy -} - -func ExampleService_GetGrindName() { - _ = (*Service).GetGrindName -} - -func ExampleService_GetHSTypes() { - _ = (*Service).GetHSTypes -} - -func ExampleService_GetHSTypesByVal() { - _ = (*Service).GetHSTypesByVal -} - -func ExampleService_GetHandleIPCEvents() { - _ = (*Service).GetHandleIPCEvents -} - -func ExampleService_GetHasLocked() { - _ = (*Service).GetHasLocked -} - -func ExampleService_GetHasLockedBinary() { - _ = (*Service).GetHasLockedBinary -} - -func ExampleService_GetHasLockedByBinary() { - _ = (*Service).GetHasLockedByBinary -} - -func ExampleService_GetHasLockedByHash() { - _ = (*Service).GetHasLockedByHash -} - -func ExampleService_GetHasLockedByName() { - _ = (*Service).GetHasLockedByName -} - -func ExampleService_GetHasLockedByString() { - _ = (*Service).GetHasLockedByString -} - -func ExampleService_GetHasLockedCatalog() { - _ = (*Service).GetHasLockedCatalog -} - -func ExampleService_GetHasLockedHash() { - _ = (*Service).GetHasLockedHash -} - -func ExampleService_GetHasLockedName() { - _ = (*Service).GetHasLockedName -} - -func ExampleService_GetHasLockedString() { - _ = (*Service).GetHasLockedString -} - -func ExampleService_GetHasLookupCatalogName() { - _ = (*Service).GetHasLookupCatalogName -} - -func ExampleService_GetHasNames() { - _ = (*Service).GetHasNames -} - -func ExampleService_GetHasReserved() { - _ = (*Service).GetHasReserved -} - -func ExampleService_GetHasReservedBinary() { - _ = (*Service).GetHasReservedBinary -} - -func ExampleService_GetHasReservedByBinary() { - _ = (*Service).GetHasReservedByBinary -} - -func ExampleService_GetHasReservedByHash() { - _ = (*Service).GetHasReservedByHash -} - -func ExampleService_GetHasReservedByName() { - _ = (*Service).GetHasReservedByName -} - -func ExampleService_GetHasReservedByString() { - _ = (*Service).GetHasReservedByString -} - -func ExampleService_GetHasReservedCatalog() { - _ = (*Service).GetHasReservedCatalog -} - -func ExampleService_GetHasReservedHash() { - _ = (*Service).GetHasReservedHash -} - -func ExampleService_GetHasReservedName() { - _ = (*Service).GetHasReservedName -} - -func ExampleService_GetHasReservedString() { - _ = (*Service).GetHasReservedString -} - -func ExampleService_GetHasRollout() { - _ = (*Service).GetHasRollout -} - -func ExampleService_GetHasSaneCovenants() { - _ = (*Service).GetHasSaneCovenants -} - -func ExampleService_GetHash() { - _ = (*Service).GetHash -} - -func ExampleService_GetHashBinary() { - _ = (*Service).GetHashBinary -} - -func ExampleService_GetHashByBinary() { - _ = (*Service).GetHashByBinary -} - -func ExampleService_GetHashByName() { - _ = (*Service).GetHashByName -} - -func ExampleService_GetHashByString() { - _ = (*Service).GetHashByString -} - -func ExampleService_GetHashName() { - _ = (*Service).GetHashName -} - -func ExampleService_GetHashString() { - _ = (*Service).GetHashString -} - -func ExampleService_GetIsKnown() { - _ = (*Service).GetIsKnown -} - -func ExampleService_GetIsLinked() { - _ = (*Service).GetIsLinked -} - -func ExampleService_GetIsLockedUp() { - _ = (*Service).GetIsLockedUp -} - -func ExampleService_GetIsName() { - _ = (*Service).GetIsName -} - -func ExampleService_GetIsReserved() { - _ = (*Service).GetIsReserved -} - -func ExampleService_GetLocked() { - _ = (*Service).GetLocked -} - -func ExampleService_GetLockedBinary() { - _ = (*Service).GetLockedBinary -} - -func ExampleService_GetLockedByBinary() { - _ = (*Service).GetLockedByBinary -} - -func ExampleService_GetLockedByHash() { - _ = (*Service).GetLockedByHash -} - -func ExampleService_GetLockedByName() { - _ = (*Service).GetLockedByName -} - -func ExampleService_GetLockedByString() { - _ = (*Service).GetLockedByString -} - -func ExampleService_GetLockedCatalog() { - _ = (*Service).GetLockedCatalog -} - -func ExampleService_GetLockedEntries() { - _ = (*Service).GetLockedEntries -} - -func ExampleService_GetLockedHash() { - _ = (*Service).GetLockedHash -} - -func ExampleService_GetLockedKeys() { - _ = (*Service).GetLockedKeys -} - -func ExampleService_GetLockedName() { - _ = (*Service).GetLockedName -} - -func ExampleService_GetLockedPrefixSize() { - _ = (*Service).GetLockedPrefixSize -} - -func ExampleService_GetLockedSize() { - _ = (*Service).GetLockedSize -} - -func ExampleService_GetLockedString() { - _ = (*Service).GetLockedString -} - -func ExampleService_GetLockedValues() { - _ = (*Service).GetLockedValues -} - -func ExampleService_GetLookupCatalogName() { - _ = (*Service).GetLookupCatalogName -} - -func ExampleService_GetMandatoryVerifyCovenantFlags() { - _ = (*Service).GetMandatoryVerifyCovenantFlags -} - -func ExampleService_GetMaxCovenantSize() { - _ = (*Service).GetMaxCovenantSize -} - -func ExampleService_GetMaxNameSize() { - _ = (*Service).GetMaxNameSize -} - -func ExampleService_GetMaxResourceSize() { - _ = (*Service).GetMaxResourceSize -} - -func ExampleService_GetNameValue() { - _ = (*Service).GetNameValue -} - -func ExampleService_GetNewClaim() { - _ = (*Service).GetNewClaim -} - -func ExampleService_GetNewNameView() { - _ = (*Service).GetNewNameView -} - -func ExampleService_GetNewOutpoint() { - _ = (*Service).GetNewOutpoint -} - -func ExampleService_GetNewResource() { - _ = (*Service).GetNewResource -} - -func ExampleService_GetNextName() { - _ = (*Service).GetNextName -} - -func ExampleService_GetOnShutdown() { - _ = (*Service).GetOnShutdown -} - -func ExampleService_GetOnStartup() { - _ = (*Service).GetOnStartup -} - -func ExampleService_GetPrefixSize() { - _ = (*Service).GetPrefixSize -} - -func ExampleService_GetPrevName() { - _ = (*Service).GetPrevName -} - -func ExampleService_GetRemoveNames() { - _ = (*Service).GetRemoveNames -} - -func ExampleService_GetReserved() { - _ = (*Service).GetReserved -} - -func ExampleService_GetReservedBinary() { - _ = (*Service).GetReservedBinary -} - -func ExampleService_GetReservedByBinary() { - _ = (*Service).GetReservedByBinary -} - -func ExampleService_GetReservedByHash() { - _ = (*Service).GetReservedByHash -} - -func ExampleService_GetReservedByName() { - _ = (*Service).GetReservedByName -} - -func ExampleService_GetReservedByString() { - _ = (*Service).GetReservedByString -} - -func ExampleService_GetReservedCatalog() { - _ = (*Service).GetReservedCatalog -} - -func ExampleService_GetReservedEntries() { - _ = (*Service).GetReservedEntries -} - -func ExampleService_GetReservedHash() { - _ = (*Service).GetReservedHash -} - -func ExampleService_GetReservedKeys() { - _ = (*Service).GetReservedKeys -} - -func ExampleService_GetReservedName() { - _ = (*Service).GetReservedName -} - -func ExampleService_GetReservedNameValue() { - _ = (*Service).GetReservedNameValue -} - -func ExampleService_GetReservedPrefixSize() { - _ = (*Service).GetReservedPrefixSize -} - -func ExampleService_GetReservedRootValue() { - _ = (*Service).GetReservedRootValue -} - -func ExampleService_GetReservedSize() { - _ = (*Service).GetReservedSize -} - -func ExampleService_GetReservedString() { - _ = (*Service).GetReservedString -} - -func ExampleService_GetReservedTopValue() { - _ = (*Service).GetReservedTopValue -} - -func ExampleService_GetReservedValues() { - _ = (*Service).GetReservedValues -} - -func ExampleService_GetResolve() { - _ = (*Service).GetResolve -} - -func ExampleService_GetResolveBinary() { - _ = (*Service).GetResolveBinary -} - -func ExampleService_GetResolveByBinary() { - _ = (*Service).GetResolveByBinary -} - -func ExampleService_GetResolveByName() { - _ = (*Service).GetResolveByName -} - -func ExampleService_GetResolveByString() { - _ = (*Service).GetResolveByString -} - -func ExampleService_GetResolveName() { - _ = (*Service).GetResolveName -} - -func ExampleService_GetResolveString() { - _ = (*Service).GetResolveString -} - -func ExampleService_GetRollout() { - _ = (*Service).GetRollout -} - -func ExampleService_GetRootValue() { - _ = (*Service).GetRootValue -} - -func ExampleService_GetServiceName() { - _ = (*Service).GetServiceName -} - -func ExampleService_GetTopValue() { - _ = (*Service).GetTopValue -} - -func ExampleService_GetTypeMapA() { - _ = (*Service).GetTypeMapA -} - -func ExampleService_GetTypeMapAAAA() { - _ = (*Service).GetTypeMapAAAA -} - -func ExampleService_GetTypeMapEmpty() { - _ = (*Service).GetTypeMapEmpty -} - -func ExampleService_GetTypeMapNS() { - _ = (*Service).GetTypeMapNS -} - -func ExampleService_GetTypeMapRoot() { - _ = (*Service).GetTypeMapRoot -} - -func ExampleService_GetTypeMapTXT() { - _ = (*Service).GetTypeMapTXT -} - -func ExampleService_GetTypeName() { - _ = (*Service).GetTypeName -} - -func ExampleService_GetTypes() { - _ = (*Service).GetTypes -} - -func ExampleService_GetTypesByVal() { - _ = (*Service).GetTypesByVal -} - -func ExampleService_GetVerificationFlags() { - _ = (*Service).GetVerificationFlags -} - -func ExampleService_GetVerificationFlagsByVal() { - _ = (*Service).GetVerificationFlagsByVal -} - -func ExampleService_GetVerify() { - _ = (*Service).GetVerify -} - -func ExampleService_GetVerifyBinary() { - _ = (*Service).GetVerifyBinary -} - -func ExampleService_GetVerifyByBinary() { - _ = (*Service).GetVerifyByBinary -} - -func ExampleService_GetVerifyByName() { - _ = (*Service).GetVerifyByName -} - -func ExampleService_GetVerifyByString() { - _ = (*Service).GetVerifyByString -} - -func ExampleService_GetVerifyCovenants() { - _ = (*Service).GetVerifyCovenants -} - -func ExampleService_GetVerifyCovenantsHardened() { - _ = (*Service).GetVerifyCovenantsHardened -} - -func ExampleService_GetVerifyCovenantsLockup() { - _ = (*Service).GetVerifyCovenantsLockup -} - -func ExampleService_GetVerifyCovenantsNone() { - _ = (*Service).GetVerifyCovenantsNone -} - -func ExampleService_GetVerifyName() { - _ = (*Service).GetVerifyName -} - -func ExampleService_GetVerifyString() { - _ = (*Service).GetVerifyString -} - -func ExampleService_GrindName() { - _ = (*Service).GrindName -} - -func ExampleService_HSTypes() { - _ = (*Service).HSTypes -} - -func ExampleService_HSTypesByVal() { - _ = (*Service).HSTypesByVal -} - -func ExampleService_HandleIPCEvents() { - _ = (*Service).HandleIPCEvents -} - -func ExampleService_HasLocked() { - _ = (*Service).HasLocked -} - -func ExampleService_HasLockedBinary() { - _ = (*Service).HasLockedBinary -} - -func ExampleService_HasLockedByBinary() { - _ = (*Service).HasLockedByBinary -} - -func ExampleService_HasLockedByHash() { - _ = (*Service).HasLockedByHash -} - -func ExampleService_HasLockedByName() { - _ = (*Service).HasLockedByName -} - -func ExampleService_HasLockedByString() { - _ = (*Service).HasLockedByString -} - -func ExampleService_HasLockedCatalog() { - _ = (*Service).HasLockedCatalog -} - -func ExampleService_HasLockedHash() { - _ = (*Service).HasLockedHash -} - -func ExampleService_HasLockedName() { - _ = (*Service).HasLockedName -} - -func ExampleService_HasLockedString() { - _ = (*Service).HasLockedString -} - -func ExampleService_HasLookupCatalogName() { - _ = (*Service).HasLookupCatalogName -} - -func ExampleService_HasNames() { - _ = (*Service).HasNames -} - -func ExampleService_HasReserved() { - _ = (*Service).HasReserved -} - -func ExampleService_HasReservedBinary() { - _ = (*Service).HasReservedBinary -} - -func ExampleService_HasReservedByBinary() { - _ = (*Service).HasReservedByBinary -} - -func ExampleService_HasReservedByHash() { - _ = (*Service).HasReservedByHash -} - -func ExampleService_HasReservedByName() { - _ = (*Service).HasReservedByName -} - -func ExampleService_HasReservedByString() { - _ = (*Service).HasReservedByString -} - -func ExampleService_HasReservedCatalog() { - _ = (*Service).HasReservedCatalog -} - -func ExampleService_HasReservedHash() { - _ = (*Service).HasReservedHash -} - -func ExampleService_HasReservedName() { - _ = (*Service).HasReservedName -} - -func ExampleService_HasReservedString() { - _ = (*Service).HasReservedString -} - -func ExampleService_HasRollout() { - _ = (*Service).HasRollout -} - -func ExampleService_HasSaneCovenants() { - _ = (*Service).HasSaneCovenants -} - -func ExampleService_Hash() { - _ = (*Service).Hash -} - -func ExampleService_HashBinary() { - _ = (*Service).HashBinary -} - -func ExampleService_HashByBinary() { - _ = (*Service).HashByBinary -} - -func ExampleService_HashByName() { - _ = (*Service).HashByName -} - -func ExampleService_HashByString() { - _ = (*Service).HashByString -} - -func ExampleService_HashName() { - _ = (*Service).HashName -} - -func ExampleService_HashString() { - _ = (*Service).HashString -} - -func ExampleService_IsKnown() { - _ = (*Service).IsKnown -} - -func ExampleService_IsLinked() { - _ = (*Service).IsLinked -} - -func ExampleService_IsLockedUp() { - _ = (*Service).IsLockedUp -} - -func ExampleService_IsName() { - _ = (*Service).IsName -} - -func ExampleService_IsReserved() { - _ = (*Service).IsReserved -} - -func ExampleService_LockedCatalog() { - _ = (*Service).LockedCatalog -} - -func ExampleService_LockedEntries() { - _ = (*Service).LockedEntries -} - -func ExampleService_LockedKeys() { - _ = (*Service).LockedKeys -} - -func ExampleService_LockedPrefixSize() { - _ = (*Service).LockedPrefixSize -} - -func ExampleService_LockedSize() { - _ = (*Service).LockedSize -} - -func ExampleService_LockedValues() { - _ = (*Service).LockedValues -} - -func ExampleService_LookupCatalogName() { - _ = (*Service).LookupCatalogName -} - -func ExampleService_MandatoryVerifyCovenantFlags() { - _ = (*Service).MandatoryVerifyCovenantFlags -} - -func ExampleService_MaxCovenantSize() { - _ = (*Service).MaxCovenantSize -} - -func ExampleService_MaxNameSize() { - _ = (*Service).MaxNameSize -} - -func ExampleService_MaxResourceSize() { - _ = (*Service).MaxResourceSize -} - -func ExampleService_NameValue() { - _ = (*Service).NameValue -} - -func ExampleService_NewClaim() { - _ = (*Service).NewClaim -} - -func ExampleService_NewNameView() { - _ = (*Service).NewNameView -} - -func ExampleService_NewOutpoint() { - _ = (*Service).NewOutpoint -} - -func ExampleService_NewResource() { - _ = (*Service).NewResource -} - -func ExampleService_NextName() { - _ = (*Service).NextName -} - -func ExampleService_OnShutdown() { - _ = (*Service).OnShutdown -} - -func ExampleService_OnStartup() { - _ = (*Service).OnStartup -} - -func ExampleService_PrefixSize() { - _ = (*Service).PrefixSize -} - -func ExampleService_PrevName() { - _ = (*Service).PrevName -} - -func ExampleService_RemoveNames() { - _ = (*Service).RemoveNames -} - -func ExampleService_ReservedCatalog() { - _ = (*Service).ReservedCatalog -} - -func ExampleService_ReservedEntries() { - _ = (*Service).ReservedEntries -} - -func ExampleService_ReservedKeys() { - _ = (*Service).ReservedKeys -} - -func ExampleService_ReservedNameValue() { - _ = (*Service).ReservedNameValue -} - -func ExampleService_ReservedPrefixSize() { - _ = (*Service).ReservedPrefixSize -} - -func ExampleService_ReservedRootValue() { - _ = (*Service).ReservedRootValue -} - -func ExampleService_ReservedSize() { - _ = (*Service).ReservedSize -} - -func ExampleService_ReservedTopValue() { - _ = (*Service).ReservedTopValue -} - -func ExampleService_ReservedValues() { - _ = (*Service).ReservedValues -} - -func ExampleService_Resolve() { - _ = (*Service).Resolve -} - -func ExampleService_ResolveBinary() { - _ = (*Service).ResolveBinary -} - -func ExampleService_ResolveByBinary() { - _ = (*Service).ResolveByBinary -} - -func ExampleService_ResolveByName() { - _ = (*Service).ResolveByName -} - -func ExampleService_ResolveByString() { - _ = (*Service).ResolveByString -} - -func ExampleService_ResolveName() { - _ = (*Service).ResolveName -} - -func ExampleService_ResolveString() { - _ = (*Service).ResolveString -} - -func ExampleService_RootValue() { - _ = (*Service).RootValue -} - -func ExampleService_ServiceName() { - _ = (*Service).ServiceName -} - -func ExampleService_TopValue() { - _ = (*Service).TopValue -} - -func ExampleService_TypeMapA() { - _ = (*Service).TypeMapA -} - -func ExampleService_TypeMapAAAA() { - _ = (*Service).TypeMapAAAA -} - -func ExampleService_TypeMapEmpty() { - _ = (*Service).TypeMapEmpty -} - -func ExampleService_TypeMapNS() { - _ = (*Service).TypeMapNS -} - -func ExampleService_TypeMapRoot() { - _ = (*Service).TypeMapRoot -} - -func ExampleService_TypeMapTXT() { - _ = (*Service).TypeMapTXT -} - -func ExampleService_TypeName() { - _ = (*Service).TypeName -} - -func ExampleService_Types() { - _ = (*Service).Types -} - -func ExampleService_TypesByVal() { - _ = (*Service).TypesByVal -} - -func ExampleService_VerificationFlags() { - _ = (*Service).VerificationFlags -} - -func ExampleService_VerificationFlagsByVal() { - _ = (*Service).VerificationFlagsByVal -} - -func ExampleService_Verify() { - _ = (*Service).Verify -} - -func ExampleService_VerifyBinary() { - _ = (*Service).VerifyBinary -} - -func ExampleService_VerifyByBinary() { - _ = (*Service).VerifyByBinary -} - -func ExampleService_VerifyByName() { - _ = (*Service).VerifyByName -} - -func ExampleService_VerifyByString() { - _ = (*Service).VerifyByString -} - -func ExampleService_VerifyCovenants() { - _ = (*Service).VerifyCovenants -} - -func ExampleService_VerifyCovenantsHardened() { - _ = (*Service).VerifyCovenantsHardened -} - -func ExampleService_VerifyCovenantsLockup() { - _ = (*Service).VerifyCovenantsLockup -} - -func ExampleService_VerifyCovenantsNone() { - _ = (*Service).VerifyCovenantsNone -} - -func ExampleService_VerifyName() { - _ = (*Service).VerifyName -} - -func ExampleService_VerifyString() { - _ = (*Service).VerifyString -} - -func ExampleTopValue() { - _ = TopValue -} - -func ExampleTypeName() { - _ = TypeName -} - -func ExampleVerify() { - _ = Verify -} - -func ExampleVerifyBinary() { - _ = VerifyBinary -} - -func ExampleVerifyByBinary() { - _ = VerifyByBinary -} - -func ExampleVerifyByName() { - _ = VerifyByName -} - -func ExampleVerifyByString() { - _ = VerifyByString -} - -func ExampleVerifyCovenants() { - _ = VerifyCovenants -} - -func ExampleVerifyName() { - _ = VerifyName -} - -func ExampleVerifyString() { - _ = VerifyString -} - -func ExampleWithCore() { - _ = WithCore -} - -func ExampleWithLockedCatalog() { - _ = WithLockedCatalog -} - -func ExampleWithReservedCatalog() { - _ = WithReservedCatalog -} -- 2.45.3