@blinklabs/dingo 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +5 -0
- package/.github/CODEOWNERS +5 -0
- package/.github/assets/dingo-ate-my-blockchain.png +0 -0
- package/.github/assets/dingo-illustration.png +0 -0
- package/.github/assets/dingo-logo-with-text-horizontal.png +0 -0
- package/.github/assets/dingo-logo-with-text.png +0 -0
- package/.github/dependabot.yml +19 -0
- package/.github/dingo-20241210.png +0 -0
- package/.github/dingo.md +56 -0
- package/.github/workflows/ci-docker.yml +36 -0
- package/.github/workflows/conventional-commits.yml +17 -0
- package/.github/workflows/go-test.yml +29 -0
- package/.github/workflows/golangci-lint.yml +23 -0
- package/.github/workflows/publish.yml +207 -0
- package/.golangci.yml +71 -0
- package/Dockerfile +25 -0
- package/LICENSE +201 -0
- package/Makefile +53 -0
- package/README.md +150 -0
- package/blockfetch.go +144 -0
- package/chain/chain.go +504 -0
- package/chain/chain_test.go +468 -0
- package/chain/errors.go +80 -0
- package/chain/event.go +33 -0
- package/chain/iter.go +64 -0
- package/chainsync/chainsync.go +97 -0
- package/chainsync.go +223 -0
- package/cmd/dingo/load.go +52 -0
- package/cmd/dingo/main.go +118 -0
- package/cmd/dingo/serve.go +49 -0
- package/config/cardano/node.go +192 -0
- package/config/cardano/node_test.go +85 -0
- package/config/cardano/preview/README.md +4 -0
- package/config/cardano/preview/alonzo-genesis.json +196 -0
- package/config/cardano/preview/byron-genesis.json +117 -0
- package/config/cardano/preview/config.json +114 -0
- package/config/cardano/preview/conway-genesis.json +297 -0
- package/config/cardano/preview/shelley-genesis.json +68 -0
- package/config.go +245 -0
- package/connmanager/connection_manager.go +105 -0
- package/connmanager/connection_manager_test.go +185 -0
- package/connmanager/event.go +37 -0
- package/connmanager/listener.go +140 -0
- package/connmanager/outbound.go +93 -0
- package/connmanager/socket.go +55 -0
- package/connmanager/unix.go +78 -0
- package/custom-p2p-topology.json +24 -0
- package/custom-p2p-topology.json.backup +24 -0
- package/custom-p2p-topology.json.mainnet +37 -0
- package/database/account.go +138 -0
- package/database/block.go +362 -0
- package/database/certs.go +53 -0
- package/database/commit_timestamp.go +77 -0
- package/database/database.go +118 -0
- package/database/database_test.go +62 -0
- package/database/drep.go +27 -0
- package/database/epoch.go +121 -0
- package/database/immutable/chunk.go +182 -0
- package/database/immutable/immutable.go +350 -0
- package/database/immutable/immutable_test.go +59 -0
- package/database/immutable/primary.go +106 -0
- package/database/immutable/secondary.go +103 -0
- package/database/immutable/testdata/08893.chunk +0 -0
- package/database/immutable/testdata/08893.primary +0 -0
- package/database/immutable/testdata/08893.secondary +0 -0
- package/database/immutable/testdata/08894.chunk +0 -0
- package/database/immutable/testdata/08894.primary +0 -0
- package/database/immutable/testdata/08894.secondary +0 -0
- package/database/immutable/testdata/README.md +4 -0
- package/database/plugin/blob/badger/commit_timestamp.go +50 -0
- package/database/plugin/blob/badger/database.go +152 -0
- package/database/plugin/blob/badger/logger.go +63 -0
- package/database/plugin/blob/badger/metrics.go +98 -0
- package/database/plugin/blob/blob.go +19 -0
- package/database/plugin/blob/store.go +40 -0
- package/database/plugin/log.go +27 -0
- package/database/plugin/metadata/metadata.go +19 -0
- package/database/plugin/metadata/sqlite/account.go +224 -0
- package/database/plugin/metadata/sqlite/certs.go +58 -0
- package/database/plugin/metadata/sqlite/commit_timestamp.go +68 -0
- package/database/plugin/metadata/sqlite/database.go +218 -0
- package/database/plugin/metadata/sqlite/epoch.go +120 -0
- package/database/plugin/metadata/sqlite/models/account.go +81 -0
- package/database/plugin/metadata/sqlite/models/auth_committee_hot.go +26 -0
- package/database/plugin/metadata/sqlite/models/deregistration_drep.go +26 -0
- package/database/plugin/metadata/sqlite/models/drep.go +27 -0
- package/database/plugin/metadata/sqlite/models/epoch.go +31 -0
- package/database/plugin/metadata/sqlite/models/models.go +45 -0
- package/database/plugin/metadata/sqlite/models/pool.go +97 -0
- package/database/plugin/metadata/sqlite/models/pparam_update.go +27 -0
- package/database/plugin/metadata/sqlite/models/pparams.go +27 -0
- package/database/plugin/metadata/sqlite/models/registration_drep.go +28 -0
- package/database/plugin/metadata/sqlite/models/resign_committee_cold.go +27 -0
- package/database/plugin/metadata/sqlite/models/stake_registration_delegation.go +27 -0
- package/database/plugin/metadata/sqlite/models/stake_vote_delegation.go +27 -0
- package/database/plugin/metadata/sqlite/models/stake_vote_registration_delegation.go +27 -0
- package/database/plugin/metadata/sqlite/models/tip.go +26 -0
- package/database/plugin/metadata/sqlite/models/update_drep.go +27 -0
- package/database/plugin/metadata/sqlite/models/utxo.go +30 -0
- package/database/plugin/metadata/sqlite/models/vote_delegation.go +26 -0
- package/database/plugin/metadata/sqlite/models/vote_registration_delegation.go +26 -0
- package/database/plugin/metadata/sqlite/pool.go +240 -0
- package/database/plugin/metadata/sqlite/pparams.go +110 -0
- package/database/plugin/metadata/sqlite/tip.go +83 -0
- package/database/plugin/metadata/sqlite/utxo.go +292 -0
- package/database/plugin/metadata/store.go +168 -0
- package/database/plugin/option.go +190 -0
- package/database/plugin/plugin.go +20 -0
- package/database/plugin/register.go +118 -0
- package/database/pparams.go +145 -0
- package/database/tip.go +45 -0
- package/database/txn.go +147 -0
- package/database/types/types.go +74 -0
- package/database/types/types_test.go +83 -0
- package/database/utxo.go +263 -0
- package/dist/artifacts.json +1 -0
- package/dist/checksums.txt +22 -0
- package/dist/config.yaml +253 -0
- package/dist/dingo-0.5.0-SNAPSHOT-d9431e4.tar.gz +0 -0
- package/dist/dingo-0.5.0-SNAPSHOT-d9431e4.tar.gz.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_arm64.tar.gz +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_arm64.tar.gz.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_x86_64.tar.gz +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_darwin_x86_64.tar.gz.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.apk +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.apk.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.deb +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.deb.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.rpm +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_amd64.rpm.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.apk +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.apk.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.deb +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.deb.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.rpm +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.rpm.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.tar.gz +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_arm64.tar.gz.sbom.json +1 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_x86_64.tar.gz +0 -0
- package/dist/dingo_0.5.0-SNAPSHOT-d9431e4_linux_x86_64.tar.gz.sbom.json +1 -0
- package/dist/dingo_darwin_amd64_v1/dingo +0 -0
- package/dist/dingo_darwin_arm64_v8.0/dingo +0 -0
- package/dist/dingo_linux_amd64_v1/dingo +0 -0
- package/dist/dingo_linux_arm64_v8.0/dingo +0 -0
- package/dist/homebrew/dingo.rb +51 -0
- package/dist/metadata.json +1 -0
- package/event/event.go +141 -0
- package/event/event_test.go +115 -0
- package/event/metrics.go +44 -0
- package/go.mod +98 -0
- package/go.sum +358 -0
- package/internal/config/config.go +145 -0
- package/internal/config/config_test.go +118 -0
- package/internal/node/load.go +149 -0
- package/internal/node/node.go +176 -0
- package/internal/version/version.go +33 -0
- package/ledger/certs.go +113 -0
- package/ledger/chainsync.go +578 -0
- package/ledger/eras/allegra.go +154 -0
- package/ledger/eras/alonzo.go +156 -0
- package/ledger/eras/babbage.go +154 -0
- package/ledger/eras/byron.go +42 -0
- package/ledger/eras/conway.go +158 -0
- package/ledger/eras/eras.go +44 -0
- package/ledger/eras/mary.go +154 -0
- package/ledger/eras/shelley.go +164 -0
- package/ledger/error.go +19 -0
- package/ledger/event.go +50 -0
- package/ledger/metrics.go +53 -0
- package/ledger/queries.go +260 -0
- package/ledger/slot.go +127 -0
- package/ledger/slot_test.go +147 -0
- package/ledger/state.go +726 -0
- package/ledger/view.go +73 -0
- package/localstatequery.go +50 -0
- package/localtxmonitor.go +44 -0
- package/localtxsubmission.go +52 -0
- package/mempool/consumer.go +98 -0
- package/mempool/mempool.go +322 -0
- package/node.go +320 -0
- package/package.json +33 -0
- package/peergov/event.go +27 -0
- package/peergov/peer.go +67 -0
- package/peergov/peergov.go +290 -0
- package/peersharing.go +70 -0
- package/preview-local-topology.json +23 -0
- package/topology/topology.go +69 -0
- package/topology/topology_test.go +179 -0
- package/tracing.go +65 -0
- package/txsubmission.go +233 -0
- package/utxorpc/query.go +311 -0
- package/utxorpc/submit.go +395 -0
- package/utxorpc/sync.go +276 -0
- package/utxorpc/utxorpc.go +166 -0
- package/utxorpc/watch.go +310 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
// MigrateModels contains a list of model objects that should have DB migrations applied
|
|
18
|
+
var MigrateModels = []any{
|
|
19
|
+
&Account{},
|
|
20
|
+
&AuthCommitteeHot{},
|
|
21
|
+
&Deregistration{},
|
|
22
|
+
&Drep{},
|
|
23
|
+
&Epoch{},
|
|
24
|
+
&Pool{},
|
|
25
|
+
&PoolRegistration{},
|
|
26
|
+
&PoolRegistrationOwner{},
|
|
27
|
+
&PoolRegistrationRelay{},
|
|
28
|
+
&PoolRetirement{},
|
|
29
|
+
&PParams{},
|
|
30
|
+
&PParamUpdate{},
|
|
31
|
+
&Registration{},
|
|
32
|
+
&RegistrationDrep{},
|
|
33
|
+
&ResignCommitteeCold{},
|
|
34
|
+
&StakeDelegation{},
|
|
35
|
+
&StakeDeregistration{},
|
|
36
|
+
&StakeRegistration{},
|
|
37
|
+
&StakeRegistrationDelegation{},
|
|
38
|
+
&StakeVoteDelegation{},
|
|
39
|
+
&StakeVoteRegistrationDelegation{},
|
|
40
|
+
&Tip{},
|
|
41
|
+
&UpdateDrep{},
|
|
42
|
+
&Utxo{},
|
|
43
|
+
&VoteDelegation{},
|
|
44
|
+
&VoteRegistrationDelegation{},
|
|
45
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
import (
|
|
18
|
+
"net"
|
|
19
|
+
|
|
20
|
+
"github.com/blinklabs-io/dingo/database/types"
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
type Pool struct {
|
|
24
|
+
ID uint `gorm:"primarykey"`
|
|
25
|
+
PoolKeyHash []byte `gorm:"index"`
|
|
26
|
+
VrfKeyHash []byte
|
|
27
|
+
Pledge types.Uint64
|
|
28
|
+
Cost types.Uint64
|
|
29
|
+
Margin *types.Rat
|
|
30
|
+
RewardAccount []byte
|
|
31
|
+
Owners []PoolRegistrationOwner
|
|
32
|
+
Relays []PoolRegistrationRelay
|
|
33
|
+
Registration []PoolRegistration
|
|
34
|
+
Retirement []PoolRetirement
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
func (p *Pool) TableName() string {
|
|
38
|
+
return "pool"
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type PoolRegistration struct {
|
|
42
|
+
ID uint `gorm:"primarykey"`
|
|
43
|
+
PoolID uint
|
|
44
|
+
PoolKeyHash []byte `gorm:"index"`
|
|
45
|
+
VrfKeyHash []byte
|
|
46
|
+
Pledge types.Uint64
|
|
47
|
+
Cost types.Uint64
|
|
48
|
+
Margin *types.Rat
|
|
49
|
+
RewardAccount []byte
|
|
50
|
+
Owners []PoolRegistrationOwner
|
|
51
|
+
Relays []PoolRegistrationRelay
|
|
52
|
+
MetadataUrl string
|
|
53
|
+
MetadataHash []byte
|
|
54
|
+
AddedSlot uint64
|
|
55
|
+
DepositAmount uint64
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
func (PoolRegistration) TableName() string {
|
|
59
|
+
return "pool_registration"
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type PoolRegistrationOwner struct {
|
|
63
|
+
ID uint `gorm:"primarykey"`
|
|
64
|
+
PoolRegistrationID uint
|
|
65
|
+
PoolID uint
|
|
66
|
+
KeyHash []byte
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
func (PoolRegistrationOwner) TableName() string {
|
|
70
|
+
return "pool_registration_owner"
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type PoolRegistrationRelay struct {
|
|
74
|
+
ID uint `gorm:"primarykey"`
|
|
75
|
+
PoolRegistrationID uint
|
|
76
|
+
PoolID uint
|
|
77
|
+
Port uint
|
|
78
|
+
Ipv4 *net.IP
|
|
79
|
+
Ipv6 *net.IP
|
|
80
|
+
Hostname string
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
func (PoolRegistrationRelay) TableName() string {
|
|
84
|
+
return "pool_registration_relay"
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type PoolRetirement struct {
|
|
88
|
+
ID uint `gorm:"primarykey"`
|
|
89
|
+
PoolID uint
|
|
90
|
+
PoolKeyHash []byte `gorm:"index"`
|
|
91
|
+
Epoch uint64
|
|
92
|
+
AddedSlot uint64
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
func (PoolRetirement) TableName() string {
|
|
96
|
+
return "pool_retirement"
|
|
97
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type PParamUpdate struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
GenesisHash []byte
|
|
20
|
+
Cbor []byte
|
|
21
|
+
AddedSlot uint64
|
|
22
|
+
Epoch uint64
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func (PParamUpdate) TableName() string {
|
|
26
|
+
return "pparam_update"
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type PParams struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
Cbor []byte
|
|
20
|
+
AddedSlot uint64
|
|
21
|
+
Epoch uint64
|
|
22
|
+
EraId uint
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func (PParams) TableName() string {
|
|
26
|
+
return "pparams"
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type RegistrationDrep struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
DrepCredential []byte `gorm:"index"`
|
|
20
|
+
AddedSlot uint64
|
|
21
|
+
DepositAmount uint64
|
|
22
|
+
AnchorUrl string
|
|
23
|
+
AnchorHash []byte
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
func (RegistrationDrep) TableName() string {
|
|
27
|
+
return "registration_drep"
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type ResignCommitteeCold struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
ColdCredential []byte `gorm:"index"`
|
|
20
|
+
AnchorUrl string
|
|
21
|
+
AnchorHash []byte
|
|
22
|
+
AddedSlot uint64
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func (ResignCommitteeCold) TableName() string {
|
|
26
|
+
return "resign_committee_cold"
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type StakeRegistrationDelegation struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
StakingKey []byte `gorm:"index"`
|
|
20
|
+
PoolKeyHash []byte `gorm:"index"`
|
|
21
|
+
AddedSlot uint64
|
|
22
|
+
DepositAmount uint64
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func (StakeRegistrationDelegation) TableName() string {
|
|
26
|
+
return "stake_registration_delegation"
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type StakeVoteDelegation struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
StakingKey []byte `gorm:"index"`
|
|
20
|
+
PoolKeyHash []byte `gorm:"index"`
|
|
21
|
+
Drep []byte `gorm:"index"`
|
|
22
|
+
AddedSlot uint64
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func (StakeVoteDelegation) TableName() string {
|
|
26
|
+
return "stake_vote_delegation"
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type StakeVoteRegistrationDelegation struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
StakingKey []byte `gorm:"index"`
|
|
20
|
+
PoolKeyHash []byte `gorm:"index"`
|
|
21
|
+
Drep []byte `gorm:"index"`
|
|
22
|
+
AddedSlot uint64
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func (StakeVoteRegistrationDelegation) TableName() string {
|
|
26
|
+
return "stake_vote_registration_delegation"
|
|
27
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type Tip struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
Slot uint64
|
|
20
|
+
Hash []byte
|
|
21
|
+
BlockNumber uint64
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
func (Tip) TableName() string {
|
|
25
|
+
return "tip"
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type UpdateDrep struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
Credential []byte `gorm:"index"`
|
|
20
|
+
AnchorUrl string
|
|
21
|
+
AnchorHash []byte
|
|
22
|
+
AddedSlot uint64
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func (UpdateDrep) TableName() string {
|
|
26
|
+
return "update_drep"
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type Utxo struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
TxId []byte `gorm:"index:tx_id_output_idx"`
|
|
20
|
+
OutputIdx uint32 `gorm:"index:tx_id_output_idx"`
|
|
21
|
+
AddedSlot uint64 `gorm:"index"`
|
|
22
|
+
DeletedSlot uint64 `gorm:"index"`
|
|
23
|
+
PaymentKey []byte `gorm:"index"`
|
|
24
|
+
StakingKey []byte `gorm:"index"`
|
|
25
|
+
Cbor []byte `gorm:"-"` // This is here for convenience but not represented in the metadata DB
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
func (u *Utxo) TableName() string {
|
|
29
|
+
return "utxo"
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type VoteDelegation struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
StakingKey []byte `gorm:"index"`
|
|
20
|
+
Drep []byte `gorm:"index"`
|
|
21
|
+
AddedSlot uint64
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
func (VoteDelegation) TableName() string {
|
|
25
|
+
return "vote_delegation"
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2025 Blink Labs Software
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
package models
|
|
16
|
+
|
|
17
|
+
type VoteRegistrationDelegation struct {
|
|
18
|
+
ID uint `gorm:"primarykey"`
|
|
19
|
+
StakingKey []byte `gorm:"index"`
|
|
20
|
+
Drep []byte `gorm:"index"`
|
|
21
|
+
AddedSlot uint64
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
func (VoteRegistrationDelegation) TableName() string {
|
|
25
|
+
return "vote_registration_delegation"
|
|
26
|
+
}
|