diff --git a/Dockerfile.local b/Dockerfile.local index df861b5a..7951f4b4 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Multi-stage build for relayer + bootstrap tools # Using full golang image (not alpine) for toolchain auto-download support FROM golang:1.23 AS builder diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..fbb1bf26 --- /dev/null +++ b/NOTICE @@ -0,0 +1,117 @@ +Canton Middleware +Copyright 2026 ChainSafe Systems, Inc. + +This product includes software developed by ChainSafe Systems, Inc. +(https://chainsafe.io). + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +================================================================================ +Third-Party Software +================================================================================ + +This product bundles or depends on third-party software with the following +licenses. The full text of each license is reproduced in the source +distribution of each dependency. + +-------------------------------------------------------------------------------- +go-ethereum (github.com/ethereum/go-ethereum) +Copyright The go-ethereum Authors. +License: LGPL-3.0-or-later (library code) and GPL-3.0-or-later (binaries), +with some packages dual-licensed under Apache-2.0 and BSD-3-Clause. +Only Apache-2.0 / BSD-3-Clause licensed packages are consumed by this project +as Go library imports. + +-------------------------------------------------------------------------------- +go-chi/chi (github.com/go-chi/chi) +Copyright (c) 2015-present Peter Kieltyka (https://github.com/pkieltyka), +Google Inc. +License: MIT + +-------------------------------------------------------------------------------- +uptrace/bun (github.com/uptrace/bun) +Copyright (c) 2021 Uptrace.dev +License: BSD-2-Clause + +-------------------------------------------------------------------------------- +shopspring/decimal (github.com/shopspring/decimal) +Copyright (c) 2015 Spring, Inc. +License: MIT + +-------------------------------------------------------------------------------- +go.uber.org/zap +Copyright (c) 2016-2017 Uber Technologies, Inc. +License: MIT + +-------------------------------------------------------------------------------- +golang-jwt/jwt (github.com/golang-jwt/jwt) +Copyright (c) 2012 Dave Grijalva, 2021 golang-jwt maintainers. +License: MIT + +-------------------------------------------------------------------------------- +go-playground/validator (github.com/go-playground/validator) +Copyright (c) 2015 Dean Karn. +License: MIT + +-------------------------------------------------------------------------------- +google/uuid (github.com/google/uuid) +Copyright (c) 2009,2014 Google Inc. +License: BSD-3-Clause + +-------------------------------------------------------------------------------- +lib/pq (github.com/lib/pq) +Copyright (c) 2011-2013, 'pq' Contributors. +License: MIT + +-------------------------------------------------------------------------------- +prometheus/client_golang (github.com/prometheus/client_golang) +Copyright Prometheus Authors. +License: Apache-2.0 + +-------------------------------------------------------------------------------- +stretchr/testify (github.com/stretchr/testify) +Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. +License: MIT + +-------------------------------------------------------------------------------- +testcontainers-go (github.com/testcontainers/testcontainers-go) +Copyright (c) 2017-present Atomic Jar Inc. +License: MIT + +-------------------------------------------------------------------------------- +creasty/defaults (github.com/creasty/defaults) +Copyright (c) 2017 Yuki Iwanaga. +License: MIT + +-------------------------------------------------------------------------------- +golang.org/x/* (crypto, sync, net, sys, text, exp) +Copyright (c) 2009 The Go Authors. +License: BSD-3-Clause + +-------------------------------------------------------------------------------- +google.golang.org/grpc, google.golang.org/protobuf, +google.golang.org/genproto +Copyright Google Inc. +License: Apache-2.0 / BSD-3-Clause + +-------------------------------------------------------------------------------- +gopkg.in/yaml.v3 +Copyright (c) 2006-2010 Kirill Simonov, +Copyright (c) 2006-2011 Kirill Simonov, +Copyright (c) 2011-2019 Canonical Ltd. +License: Apache-2.0 / MIT + +-------------------------------------------------------------------------------- + +For the complete list of transitive dependencies and their licenses, see +go.mod and the upstream repositories of each dependency. diff --git a/README.md b/README.md index c1115bc2..053f227e 100644 --- a/README.md +++ b/README.md @@ -339,4 +339,7 @@ Key Canton-specific fields (auto-detected by bootstrap): ## License -[License details here] +This project is licensed under the Apache License, Version 2.0. See +[LICENSE](LICENSE) for the full license text and [NOTICE](NOTICE) for +attributions of third-party software included in or depended on by this +project. diff --git a/cmd/api-server/Dockerfile b/cmd/api-server/Dockerfile index 00cbbd69..76c3a417 100644 --- a/cmd/api-server/Dockerfile +++ b/cmd/api-server/Dockerfile @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Build stage # Using full golang image (not alpine) for toolchain auto-download support FROM golang:1.24 AS builder diff --git a/cmd/api-server/main.go b/cmd/api-server/main.go index 89cdef12..e72f6659 100644 --- a/cmd/api-server/main.go +++ b/cmd/api-server/main.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package main import ( diff --git a/cmd/api-server/migrate/main.go b/cmd/api-server/migrate/main.go index 6e2bdc94..6d6cb079 100644 --- a/cmd/api-server/migrate/main.go +++ b/cmd/api-server/migrate/main.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package main import ( diff --git a/cmd/generate-test-vectors/main.go b/cmd/generate-test-vectors/main.go index 7f962381..18c493b3 100644 --- a/cmd/generate-test-vectors/main.go +++ b/cmd/generate-test-vectors/main.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Command generate-test-vectors produces deterministic crypto test vectors // for cross-validation with the canton-snap TypeScript implementation. // diff --git a/cmd/indexer/Dockerfile b/cmd/indexer/Dockerfile index 0b3d0c3b..e2fe8515 100644 --- a/cmd/indexer/Dockerfile +++ b/cmd/indexer/Dockerfile @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Build stage # Using full golang image (not alpine) for toolchain auto-download support FROM golang:1.24 AS builder diff --git a/cmd/indexer/main.go b/cmd/indexer/main.go index 5548fc8d..6bf2a89f 100644 --- a/cmd/indexer/main.go +++ b/cmd/indexer/main.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package main import ( diff --git a/cmd/indexer/migrate/main.go b/cmd/indexer/migrate/main.go index 13427b78..b30e1b36 100644 --- a/cmd/indexer/migrate/main.go +++ b/cmd/indexer/migrate/main.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package main import ( diff --git a/cmd/relayer/Dockerfile b/cmd/relayer/Dockerfile index 0d3510cf..c07afa7c 100644 --- a/cmd/relayer/Dockerfile +++ b/cmd/relayer/Dockerfile @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Build stage # Using full golang image (not alpine) for toolchain auto-download support FROM golang:1.24 AS builder diff --git a/cmd/relayer/main.go b/cmd/relayer/main.go index 4153fd34..72312e7b 100644 --- a/cmd/relayer/main.go +++ b/cmd/relayer/main.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package main import ( diff --git a/cmd/relayer/migrate/main.go b/cmd/relayer/migrate/main.go index 9fae1d0f..66abd06b 100644 --- a/cmd/relayer/migrate/main.go +++ b/cmd/relayer/migrate/main.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package main import ( diff --git a/pkg/app/api/server.go b/pkg/app/api/server.go index 55ad8f8a..c3ef36fa 100644 --- a/pkg/app/api/server.go +++ b/pkg/app/api/server.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package api implements app.Runner for the API server process. package api diff --git a/pkg/app/app.go b/pkg/app/app.go index 9440b7b4..bff55cc6 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package app defines common runtime contracts shared by different // executable entrypoints (e.g., API server, relayer, migration runner). // diff --git a/pkg/app/errors/errors.go b/pkg/app/errors/errors.go index 6e77cd26..6ca43712 100644 --- a/pkg/app/errors/errors.go +++ b/pkg/app/errors/errors.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package errors contains helper functions and types to work with errors package errors diff --git a/pkg/app/http/config.go b/pkg/app/http/config.go index 882eca7a..4d369cf6 100644 --- a/pkg/app/http/config.go +++ b/pkg/app/http/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package http import "time" diff --git a/pkg/app/http/handler.go b/pkg/app/http/handler.go index 5553e672..0c66ab26 100644 --- a/pkg/app/http/handler.go +++ b/pkg/app/http/handler.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package http provides HTTP utilities including chi-compatible error handling package http diff --git a/pkg/app/http/middleware.go b/pkg/app/http/middleware.go index 947545ad..6a1a1b74 100644 --- a/pkg/app/http/middleware.go +++ b/pkg/app/http/middleware.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package http import "net/http" diff --git a/pkg/app/http/server.go b/pkg/app/http/server.go index f120aa15..1512b442 100644 --- a/pkg/app/http/server.go +++ b/pkg/app/http/server.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package http import ( diff --git a/pkg/app/indexer/server.go b/pkg/app/indexer/server.go index 99c3f26c..8d52c5cd 100644 --- a/pkg/app/indexer/server.go +++ b/pkg/app/indexer/server.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package indexer implements the runner for the indexer process. // // The indexer has two concurrent responsibilities: diff --git a/pkg/app/relayer/server.go b/pkg/app/relayer/server.go index 19fc8c5f..0b758458 100644 --- a/pkg/app/relayer/server.go +++ b/pkg/app/relayer/server.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package relayer implements app.Runner for the relayer process. package relayer diff --git a/pkg/auth/canton.go b/pkg/auth/canton.go index 14437a05..f05c62d8 100644 --- a/pkg/auth/canton.go +++ b/pkg/auth/canton.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package auth import ( diff --git a/pkg/auth/context.go b/pkg/auth/context.go index a79fc3e4..ed838c41 100644 --- a/pkg/auth/context.go +++ b/pkg/auth/context.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package auth import ( diff --git a/pkg/auth/evm.go b/pkg/auth/evm.go index be0e14a0..ec779f8a 100644 --- a/pkg/auth/evm.go +++ b/pkg/auth/evm.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package auth import ( diff --git a/pkg/auth/jwt.go b/pkg/auth/jwt.go index e2f04e80..7fea447a 100644 --- a/pkg/auth/jwt.go +++ b/pkg/auth/jwt.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package auth import ( diff --git a/pkg/cantonsdk/bridge/client.go b/pkg/cantonsdk/bridge/client.go index 1501607c..f0d1a9d7 100644 --- a/pkg/cantonsdk/bridge/client.go +++ b/pkg/cantonsdk/bridge/client.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package bridge implements optional Wayfinder bridge operations for Canton. // // It provides deposit/withdrawal flows and bridge-related event queries. diff --git a/pkg/cantonsdk/bridge/config.go b/pkg/cantonsdk/bridge/config.go index abf6597f..e2bc4e97 100644 --- a/pkg/cantonsdk/bridge/config.go +++ b/pkg/cantonsdk/bridge/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package bridge import "fmt" diff --git a/pkg/cantonsdk/bridge/decode.go b/pkg/cantonsdk/bridge/decode.go index 549f5d63..0767d16f 100644 --- a/pkg/cantonsdk/bridge/decode.go +++ b/pkg/cantonsdk/bridge/decode.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package bridge import ( diff --git a/pkg/cantonsdk/bridge/encode.go b/pkg/cantonsdk/bridge/encode.go index 7981006f..fbfa05a4 100644 --- a/pkg/cantonsdk/bridge/encode.go +++ b/pkg/cantonsdk/bridge/encode.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package bridge import ( diff --git a/pkg/cantonsdk/bridge/options.go b/pkg/cantonsdk/bridge/options.go index ce9422b3..1eb88ef7 100644 --- a/pkg/cantonsdk/bridge/options.go +++ b/pkg/cantonsdk/bridge/options.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package bridge import "go.uber.org/zap" diff --git a/pkg/cantonsdk/bridge/types.go b/pkg/cantonsdk/bridge/types.go index 693b7ef5..40900efb 100644 --- a/pkg/cantonsdk/bridge/types.go +++ b/pkg/cantonsdk/bridge/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package bridge import ( diff --git a/pkg/cantonsdk/client/client.go b/pkg/cantonsdk/client/client.go index 06448fac..0cec315e 100644 --- a/pkg/cantonsdk/client/client.go +++ b/pkg/cantonsdk/client/client.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package client provides the high-level Canton SDK client. // // It exposes a unified interface for interacting with a Canton ledger, diff --git a/pkg/cantonsdk/client/config.go b/pkg/cantonsdk/client/config.go index e0d32c3b..42794ce9 100644 --- a/pkg/cantonsdk/client/config.go +++ b/pkg/cantonsdk/client/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package client import ( diff --git a/pkg/cantonsdk/client/options.go b/pkg/cantonsdk/client/options.go index c845db08..e46d2d31 100644 --- a/pkg/cantonsdk/client/options.go +++ b/pkg/cantonsdk/client/options.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package client import ( diff --git a/pkg/cantonsdk/identity/client.go b/pkg/cantonsdk/identity/client.go index 0a5f6f78..8ee6b22f 100644 --- a/pkg/cantonsdk/identity/client.go +++ b/pkg/cantonsdk/identity/client.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package identity implements Canton identity operations such as party management // and fingerprint-to-party mapping. package identity diff --git a/pkg/cantonsdk/identity/config.go b/pkg/cantonsdk/identity/config.go index 3d7fdd50..306a58f1 100644 --- a/pkg/cantonsdk/identity/config.go +++ b/pkg/cantonsdk/identity/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package identity import "errors" diff --git a/pkg/cantonsdk/identity/encode.go b/pkg/cantonsdk/identity/encode.go index e3b95478..311df4bb 100644 --- a/pkg/cantonsdk/identity/encode.go +++ b/pkg/cantonsdk/identity/encode.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package identity import ( diff --git a/pkg/cantonsdk/identity/options.go b/pkg/cantonsdk/identity/options.go index 5fbc9dc1..1edf9220 100644 --- a/pkg/cantonsdk/identity/options.go +++ b/pkg/cantonsdk/identity/options.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package identity import "go.uber.org/zap" diff --git a/pkg/cantonsdk/identity/types.go b/pkg/cantonsdk/identity/types.go index 8731789e..1ff2fca6 100644 --- a/pkg/cantonsdk/identity/types.go +++ b/pkg/cantonsdk/identity/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package identity import ( diff --git a/pkg/cantonsdk/ledger/auth.go b/pkg/cantonsdk/ledger/auth.go index 1b26cbd1..3386f6db 100644 --- a/pkg/cantonsdk/ledger/auth.go +++ b/pkg/cantonsdk/ledger/auth.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ledger import ( diff --git a/pkg/cantonsdk/ledger/client.go b/pkg/cantonsdk/ledger/client.go index 7df83502..5ab006e5 100644 --- a/pkg/cantonsdk/ledger/client.go +++ b/pkg/cantonsdk/ledger/client.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package ledger implements the low-level Canton Ledger API client. // // It manages gRPC connectivity, TLS configuration, OAuth2 authentication, diff --git a/pkg/cantonsdk/ledger/config.go b/pkg/cantonsdk/ledger/config.go index 01506851..af3f8928 100644 --- a/pkg/cantonsdk/ledger/config.go +++ b/pkg/cantonsdk/ledger/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ledger import ( diff --git a/pkg/cantonsdk/ledger/dial.go b/pkg/cantonsdk/ledger/dial.go index b82954bf..4ba447b5 100644 --- a/pkg/cantonsdk/ledger/dial.go +++ b/pkg/cantonsdk/ledger/dial.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ledger import ( diff --git a/pkg/cantonsdk/ledger/options.go b/pkg/cantonsdk/ledger/options.go index 32380bd0..8404d87f 100644 --- a/pkg/cantonsdk/ledger/options.go +++ b/pkg/cantonsdk/ledger/options.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ledger import ( diff --git a/pkg/cantonsdk/streaming/builder.go b/pkg/cantonsdk/streaming/builder.go index d1421371..2bf52f08 100644 --- a/pkg/cantonsdk/streaming/builder.go +++ b/pkg/cantonsdk/streaming/builder.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package streaming import ( diff --git a/pkg/cantonsdk/streaming/client.go b/pkg/cantonsdk/streaming/client.go index a6db5a3e..72e8936c 100644 --- a/pkg/cantonsdk/streaming/client.go +++ b/pkg/cantonsdk/streaming/client.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package streaming import ( diff --git a/pkg/cantonsdk/streaming/options.go b/pkg/cantonsdk/streaming/options.go index b3de7f4b..a17591c1 100644 --- a/pkg/cantonsdk/streaming/options.go +++ b/pkg/cantonsdk/streaming/options.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package streaming import "go.uber.org/zap" diff --git a/pkg/cantonsdk/streaming/stream.go b/pkg/cantonsdk/streaming/stream.go index dd150b8c..9e461b54 100644 --- a/pkg/cantonsdk/streaming/stream.go +++ b/pkg/cantonsdk/streaming/stream.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package streaming import "context" diff --git a/pkg/cantonsdk/streaming/types.go b/pkg/cantonsdk/streaming/types.go index 9869b1fd..4d286a9e 100644 --- a/pkg/cantonsdk/streaming/types.go +++ b/pkg/cantonsdk/streaming/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package streaming provides a reusable, generic Canton ledger streaming client. // // It wraps UpdateService.GetUpdates with automatic reconnection, exponential backoff, diff --git a/pkg/cantonsdk/token/client.go b/pkg/cantonsdk/token/client.go index 3408248c..974f46ce 100644 --- a/pkg/cantonsdk/token/client.go +++ b/pkg/cantonsdk/token/client.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package token implements CIP-56 token operations such as mint, burn, transfer, // and balance queries. package token diff --git a/pkg/cantonsdk/token/config.go b/pkg/cantonsdk/token/config.go index 43592aaa..705b077a 100644 --- a/pkg/cantonsdk/token/config.go +++ b/pkg/cantonsdk/token/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import "errors" diff --git a/pkg/cantonsdk/token/decimal.go b/pkg/cantonsdk/token/decimal.go index d9b87742..087f11a8 100644 --- a/pkg/cantonsdk/token/decimal.go +++ b/pkg/cantonsdk/token/decimal.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/cantonsdk/token/decode.go b/pkg/cantonsdk/token/decode.go index 30b06b60..caf51f30 100644 --- a/pkg/cantonsdk/token/decode.go +++ b/pkg/cantonsdk/token/decode.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/cantonsdk/token/encode.go b/pkg/cantonsdk/token/encode.go index 789eac40..bcd5775e 100644 --- a/pkg/cantonsdk/token/encode.go +++ b/pkg/cantonsdk/token/encode.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/cantonsdk/token/encode_test.go b/pkg/cantonsdk/token/encode_test.go index 24d7d4c9..c5d18678 100644 --- a/pkg/cantonsdk/token/encode_test.go +++ b/pkg/cantonsdk/token/encode_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/cantonsdk/token/options.go b/pkg/cantonsdk/token/options.go index 624a603c..edff3306 100644 --- a/pkg/cantonsdk/token/options.go +++ b/pkg/cantonsdk/token/options.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import "go.uber.org/zap" diff --git a/pkg/cantonsdk/token/registry_client.go b/pkg/cantonsdk/token/registry_client.go index 9ac10508..48fd97e9 100644 --- a/pkg/cantonsdk/token/registry_client.go +++ b/pkg/cantonsdk/token/registry_client.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/cantonsdk/token/types.go b/pkg/cantonsdk/token/types.go index 03cf7edc..1082dfcd 100644 --- a/pkg/cantonsdk/token/types.go +++ b/pkg/cantonsdk/token/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/cantonsdk/values/decode.go b/pkg/cantonsdk/values/decode.go index 1f590e73..03c0666e 100644 --- a/pkg/cantonsdk/values/decode.go +++ b/pkg/cantonsdk/values/decode.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package values import ( diff --git a/pkg/cantonsdk/values/encode.go b/pkg/cantonsdk/values/encode.go index 2a4f9292..0faf4056 100644 --- a/pkg/cantonsdk/values/encode.go +++ b/pkg/cantonsdk/values/encode.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package values import ( diff --git a/pkg/cantonsdk/values/meta.go b/pkg/cantonsdk/values/meta.go index 3a4fcc04..355b7631 100644 --- a/pkg/cantonsdk/values/meta.go +++ b/pkg/cantonsdk/values/meta.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package values import ( diff --git a/pkg/cantonsdk/values/values.go b/pkg/cantonsdk/values/values.go index 6802e1c9..67649857 100644 --- a/pkg/cantonsdk/values/values.go +++ b/pkg/cantonsdk/values/values.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package values provides helper utilities for working with // Canton Ledger API value types. package values diff --git a/pkg/config/config.go b/pkg/config/config.go index be29803b..615016f4 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package config import ( diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index f9992af0..67a0c55b 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package config import ( diff --git a/pkg/custodial/accept_worker.go b/pkg/custodial/accept_worker.go index 0b7b5b6a..e59d84b8 100644 --- a/pkg/custodial/accept_worker.go +++ b/pkg/custodial/accept_worker.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package custodial implements background automation for custodial Canton parties. package custodial diff --git a/pkg/custodial/accept_worker_test.go b/pkg/custodial/accept_worker_test.go index d4fc4585..9ade69d7 100644 --- a/pkg/custodial/accept_worker_test.go +++ b/pkg/custodial/accept_worker_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package custodial import ( diff --git a/pkg/custodial/config.go b/pkg/custodial/config.go index d0248082..115eb81c 100644 --- a/pkg/custodial/config.go +++ b/pkg/custodial/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package custodial import "time" diff --git a/pkg/ethereum/abi.go b/pkg/ethereum/abi.go index 45d58e5c..029063c3 100644 --- a/pkg/ethereum/abi.go +++ b/pkg/ethereum/abi.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ethereum // ERC20ABI is the standard ERC20 token interface ABI. diff --git a/pkg/ethereum/client.go b/pkg/ethereum/client.go index 79af4331..d9689bec 100644 --- a/pkg/ethereum/client.go +++ b/pkg/ethereum/client.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ethereum import ( diff --git a/pkg/ethereum/config.go b/pkg/ethereum/config.go index 561c147e..8bc686ce 100644 --- a/pkg/ethereum/config.go +++ b/pkg/ethereum/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ethereum import "time" diff --git a/pkg/ethereum/types.go b/pkg/ethereum/types.go index 0ae3766a..9c8fdfd7 100644 --- a/pkg/ethereum/types.go +++ b/pkg/ethereum/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ethereum import ( diff --git a/pkg/ethereum/util.go b/pkg/ethereum/util.go index a403b34f..b3e0ea16 100644 --- a/pkg/ethereum/util.go +++ b/pkg/ethereum/util.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ethereum import ( diff --git a/pkg/ethrpc/config.go b/pkg/ethrpc/config.go index 6bd6ce5a..ec67d24c 100644 --- a/pkg/ethrpc/config.go +++ b/pkg/ethrpc/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ethrpc import ( diff --git a/pkg/ethrpc/miner/miner.go b/pkg/ethrpc/miner/miner.go index a0047a3b..7fb31a65 100644 --- a/pkg/ethrpc/miner/miner.go +++ b/pkg/ethrpc/miner/miner.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package miner import ( diff --git a/pkg/ethrpc/miner/miner_test.go b/pkg/ethrpc/miner/miner_test.go index ebfaf208..f5197d0f 100644 --- a/pkg/ethrpc/miner/miner_test.go +++ b/pkg/ethrpc/miner/miner_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package miner import ( diff --git a/pkg/ethrpc/service/eth_api.go b/pkg/ethrpc/service/eth_api.go index 8f5cf00e..056d3cfa 100644 --- a/pkg/ethrpc/service/eth_api.go +++ b/pkg/ethrpc/service/eth_api.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/ethrpc/service/eth_api_test.go b/pkg/ethrpc/service/eth_api_test.go index 172cdda4..f4d41c4d 100644 --- a/pkg/ethrpc/service/eth_api_test.go +++ b/pkg/ethrpc/service/eth_api_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service_test import ( diff --git a/pkg/ethrpc/service/http.go b/pkg/ethrpc/service/http.go index 05aa9a0b..72b08b92 100644 --- a/pkg/ethrpc/service/http.go +++ b/pkg/ethrpc/service/http.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/ethrpc/service/log.go b/pkg/ethrpc/service/log.go index 4d37b7cb..9ca1e505 100644 --- a/pkg/ethrpc/service/log.go +++ b/pkg/ethrpc/service/log.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/ethrpc/service/net_api.go b/pkg/ethrpc/service/net_api.go index 8f316e9a..8d656e21 100644 --- a/pkg/ethrpc/service/net_api.go +++ b/pkg/ethrpc/service/net_api.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/ethrpc/service/net_api_test.go b/pkg/ethrpc/service/net_api_test.go index 9f0377e8..3ea893c0 100644 --- a/pkg/ethrpc/service/net_api_test.go +++ b/pkg/ethrpc/service/net_api_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service_test import ( diff --git a/pkg/ethrpc/service/service.go b/pkg/ethrpc/service/service.go index 3924f90f..8c7eba84 100644 --- a/pkg/ethrpc/service/service.go +++ b/pkg/ethrpc/service/service.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/ethrpc/service/service_test.go b/pkg/ethrpc/service/service_test.go index 673095f9..02b342f5 100644 --- a/pkg/ethrpc/service/service_test.go +++ b/pkg/ethrpc/service/service_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service_test import ( diff --git a/pkg/ethrpc/service/web3_api.go b/pkg/ethrpc/service/web3_api.go index 9df703a1..e78efb8c 100644 --- a/pkg/ethrpc/service/web3_api.go +++ b/pkg/ethrpc/service/web3_api.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/ethrpc/service/web3_api_test.go b/pkg/ethrpc/service/web3_api_test.go index e5d8b822..a1f2c31b 100644 --- a/pkg/ethrpc/service/web3_api_test.go +++ b/pkg/ethrpc/service/web3_api_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service_test import ( diff --git a/pkg/ethrpc/store/model.go b/pkg/ethrpc/store/model.go index 69442308..ef44bea2 100644 --- a/pkg/ethrpc/store/model.go +++ b/pkg/ethrpc/store/model.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/ethrpc/store/pg.go b/pkg/ethrpc/store/pg.go index fbe2d5d7..d345728c 100644 --- a/pkg/ethrpc/store/pg.go +++ b/pkg/ethrpc/store/pg.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/ethrpc/store/pg_test.go b/pkg/ethrpc/store/pg_test.go index cbad1aa8..abdba04d 100644 --- a/pkg/ethrpc/store/pg_test.go +++ b/pkg/ethrpc/store/pg_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/ethrpc/submitter/submitter.go b/pkg/ethrpc/submitter/submitter.go index 3c723c18..98f83478 100644 --- a/pkg/ethrpc/submitter/submitter.go +++ b/pkg/ethrpc/submitter/submitter.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package submitter drains pending mempool entries by submitting the // corresponding ERC-20 transfer to Canton. It is the asynchronous counterpart // to ethrpc.service.SendRawTransaction: that handler records intent and diff --git a/pkg/ethrpc/submitter/submitter_test.go b/pkg/ethrpc/submitter/submitter_test.go index 0117a6b9..a022fcac 100644 --- a/pkg/ethrpc/submitter/submitter_test.go +++ b/pkg/ethrpc/submitter/submitter_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package submitter import ( diff --git a/pkg/ethrpc/types.go b/pkg/ethrpc/types.go index 1f9bc36a..53ea6b48 100644 --- a/pkg/ethrpc/types.go +++ b/pkg/ethrpc/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package ethrpc import ( diff --git a/pkg/indexer/client/http.go b/pkg/indexer/client/http.go index 5cb160cb..382d45bf 100644 --- a/pkg/indexer/client/http.go +++ b/pkg/indexer/client/http.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package client provides an HTTP client for the indexer's admin API. package client diff --git a/pkg/indexer/client/http_test.go b/pkg/indexer/client/http_test.go index 66403e9f..239fd319 100644 --- a/pkg/indexer/client/http_test.go +++ b/pkg/indexer/client/http_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package client_test import ( diff --git a/pkg/indexer/config.go b/pkg/indexer/config.go index 2823b7f8..8c7fd63f 100644 --- a/pkg/indexer/config.go +++ b/pkg/indexer/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package indexer // Config holds stream-specific settings for the indexer process. diff --git a/pkg/indexer/engine/decoder.go b/pkg/indexer/engine/decoder.go index 8aaad25c..89be5b51 100644 --- a/pkg/indexer/engine/decoder.go +++ b/pkg/indexer/engine/decoder.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/indexer/engine/decoder_test.go b/pkg/indexer/engine/decoder_test.go index 65e5cce2..7aab4196 100644 --- a/pkg/indexer/engine/decoder_test.go +++ b/pkg/indexer/engine/decoder_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/indexer/engine/export_test.go b/pkg/indexer/engine/export_test.go index 9e8e6a7f..242aaece 100644 --- a/pkg/indexer/engine/export_test.go +++ b/pkg/indexer/engine/export_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import "time" diff --git a/pkg/indexer/engine/fetcher.go b/pkg/indexer/engine/fetcher.go index 81a3b531..a51f5222 100644 --- a/pkg/indexer/engine/fetcher.go +++ b/pkg/indexer/engine/fetcher.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/indexer/engine/processor.go b/pkg/indexer/engine/processor.go index 43f622ef..f0ecae39 100644 --- a/pkg/indexer/engine/processor.go +++ b/pkg/indexer/engine/processor.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/indexer/engine/processor_test.go b/pkg/indexer/engine/processor_test.go index 36f884cb..fa0fd3a6 100644 --- a/pkg/indexer/engine/processor_test.go +++ b/pkg/indexer/engine/processor_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine_test import ( diff --git a/pkg/indexer/service/http.go b/pkg/indexer/service/http.go index d9d60f9f..866f6b55 100644 --- a/pkg/indexer/service/http.go +++ b/pkg/indexer/service/http.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/indexer/service/http_test.go b/pkg/indexer/service/http_test.go index 711a2ac1..4b6a4b83 100644 --- a/pkg/indexer/service/http_test.go +++ b/pkg/indexer/service/http_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service_test import ( diff --git a/pkg/indexer/service/log.go b/pkg/indexer/service/log.go index af0c8a2f..4b12c9bb 100644 --- a/pkg/indexer/service/log.go +++ b/pkg/indexer/service/log.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/indexer/service/service.go b/pkg/indexer/service/service.go index bbe21b3d..f3a581e7 100644 --- a/pkg/indexer/service/service.go +++ b/pkg/indexer/service/service.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/indexer/service/service_test.go b/pkg/indexer/service/service_test.go index bb7ec642..6071cc56 100644 --- a/pkg/indexer/service/service_test.go +++ b/pkg/indexer/service/service_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service_test import ( diff --git a/pkg/indexer/store/model.go b/pkg/indexer/store/model.go index efa194ce..1661d2f9 100644 --- a/pkg/indexer/store/model.go +++ b/pkg/indexer/store/model.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/indexer/store/pg.go b/pkg/indexer/store/pg.go index c964cbda..b178610f 100644 --- a/pkg/indexer/store/pg.go +++ b/pkg/indexer/store/pg.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/indexer/store/pg_test.go b/pkg/indexer/store/pg_test.go index fb35c328..d74babf3 100644 --- a/pkg/indexer/store/pg_test.go +++ b/pkg/indexer/store/pg_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/indexer/types.go b/pkg/indexer/types.go index fad3b169..7545ebe1 100644 --- a/pkg/indexer/types.go +++ b/pkg/indexer/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package indexer import "time" diff --git a/pkg/keys/canton_keys.go b/pkg/keys/canton_keys.go index 25e8ecb8..768daabb 100644 --- a/pkg/keys/canton_keys.go +++ b/pkg/keys/canton_keys.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package keys provides Canton key generation and encryption for custodial key management. // This package is used to generate Canton keypairs for users and encrypt them for secure storage. // Uses secp256k1 (same curve as Ethereum) for compatibility with user wallets. diff --git a/pkg/keys/canton_keys_test.go b/pkg/keys/canton_keys_test.go index 194385a1..df1c25af 100644 --- a/pkg/keys/canton_keys_test.go +++ b/pkg/keys/canton_keys_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package keys import ( diff --git a/pkg/log/config.go b/pkg/log/config.go index 65b9c470..530afd19 100644 --- a/pkg/log/config.go +++ b/pkg/log/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package log // Config contains logging settings diff --git a/pkg/log/logger.go b/pkg/log/logger.go index 53a56aea..7380c55f 100644 --- a/pkg/log/logger.go +++ b/pkg/log/logger.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package log import ( diff --git a/pkg/migrations/apidb/01_create_users.go b/pkg/migrations/apidb/01_create_users.go index 1ff81aaa..77e1c63f 100644 --- a/pkg/migrations/apidb/01_create_users.go +++ b/pkg/migrations/apidb/01_create_users.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/02_create_whitelist.go b/pkg/migrations/apidb/02_create_whitelist.go index 232b6381..5ceb5824 100644 --- a/pkg/migrations/apidb/02_create_whitelist.go +++ b/pkg/migrations/apidb/02_create_whitelist.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/03_create_token_metrics.go b/pkg/migrations/apidb/03_create_token_metrics.go index 8a55c44c..59446359 100644 --- a/pkg/migrations/apidb/03_create_token_metrics.go +++ b/pkg/migrations/apidb/03_create_token_metrics.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/04_seed_token_metrics.go b/pkg/migrations/apidb/04_seed_token_metrics.go index d03c78b6..8b3c025b 100644 --- a/pkg/migrations/apidb/04_seed_token_metrics.go +++ b/pkg/migrations/apidb/04_seed_token_metrics.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/05_create_bridge_events.go b/pkg/migrations/apidb/05_create_bridge_events.go index db1ebf64..b8836545 100644 --- a/pkg/migrations/apidb/05_create_bridge_events.go +++ b/pkg/migrations/apidb/05_create_bridge_events.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/06_create_reconciliation_state.go b/pkg/migrations/apidb/06_create_reconciliation_state.go index dd49dba2..9ada0b34 100644 --- a/pkg/migrations/apidb/06_create_reconciliation_state.go +++ b/pkg/migrations/apidb/06_create_reconciliation_state.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/07_create_evm_transactions.go b/pkg/migrations/apidb/07_create_evm_transactions.go index 75420bae..7153e7ca 100644 --- a/pkg/migrations/apidb/07_create_evm_transactions.go +++ b/pkg/migrations/apidb/07_create_evm_transactions.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/08_create_evm_state.go b/pkg/migrations/apidb/08_create_evm_state.go index 0bd991a6..e707a782 100644 --- a/pkg/migrations/apidb/08_create_evm_state.go +++ b/pkg/migrations/apidb/08_create_evm_state.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/09_create_evm_logs.go b/pkg/migrations/apidb/09_create_evm_logs.go index f3c60a0c..e4199f27 100644 --- a/pkg/migrations/apidb/09_create_evm_logs.go +++ b/pkg/migrations/apidb/09_create_evm_logs.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/10_create_user_token_balances.go b/pkg/migrations/apidb/10_create_user_token_balances.go index 606e31c9..d3acf546 100644 --- a/pkg/migrations/apidb/10_create_user_token_balances.go +++ b/pkg/migrations/apidb/10_create_user_token_balances.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/11_add_user_token_balances_indexes.go b/pkg/migrations/apidb/11_add_user_token_balances_indexes.go index d6ba21b3..405e160a 100644 --- a/pkg/migrations/apidb/11_add_user_token_balances_indexes.go +++ b/pkg/migrations/apidb/11_add_user_token_balances_indexes.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/12_create_mempool.go b/pkg/migrations/apidb/12_create_mempool.go index 4fec3d3a..69b94bf7 100644 --- a/pkg/migrations/apidb/12_create_mempool.go +++ b/pkg/migrations/apidb/12_create_mempool.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/13_add_evm_logs_block_timestamp.go b/pkg/migrations/apidb/13_add_evm_logs_block_timestamp.go index 3f3bc07c..a9995bb0 100644 --- a/pkg/migrations/apidb/13_add_evm_logs_block_timestamp.go +++ b/pkg/migrations/apidb/13_add_evm_logs_block_timestamp.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package apidb import ( diff --git a/pkg/migrations/apidb/service.go b/pkg/migrations/apidb/service.go index 17cdcd6b..8b33e2b1 100644 --- a/pkg/migrations/apidb/service.go +++ b/pkg/migrations/apidb/service.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package apidb holds all the migrations for the API database package apidb diff --git a/pkg/migrations/indexerdb/1_create_events.go b/pkg/migrations/indexerdb/1_create_events.go index 4eb30cd9..0a1bb5e3 100644 --- a/pkg/migrations/indexerdb/1_create_events.go +++ b/pkg/migrations/indexerdb/1_create_events.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package indexerdb import ( diff --git a/pkg/migrations/indexerdb/2_create_tokens.go b/pkg/migrations/indexerdb/2_create_tokens.go index bc795618..c31fa69e 100644 --- a/pkg/migrations/indexerdb/2_create_tokens.go +++ b/pkg/migrations/indexerdb/2_create_tokens.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package indexerdb import ( diff --git a/pkg/migrations/indexerdb/3_create_balances.go b/pkg/migrations/indexerdb/3_create_balances.go index abb7ee1f..fdf8542b 100644 --- a/pkg/migrations/indexerdb/3_create_balances.go +++ b/pkg/migrations/indexerdb/3_create_balances.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package indexerdb import ( diff --git a/pkg/migrations/indexerdb/4_create_offsets.go b/pkg/migrations/indexerdb/4_create_offsets.go index 8846d969..82b5fa30 100644 --- a/pkg/migrations/indexerdb/4_create_offsets.go +++ b/pkg/migrations/indexerdb/4_create_offsets.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package indexerdb import ( diff --git a/pkg/migrations/indexerdb/5_create_pending_offers.go b/pkg/migrations/indexerdb/5_create_pending_offers.go index ca5b868b..8ce90072 100644 --- a/pkg/migrations/indexerdb/5_create_pending_offers.go +++ b/pkg/migrations/indexerdb/5_create_pending_offers.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package indexerdb import ( diff --git a/pkg/migrations/indexerdb/6_create_holdings.go b/pkg/migrations/indexerdb/6_create_holdings.go index c9d5257d..479d8199 100644 --- a/pkg/migrations/indexerdb/6_create_holdings.go +++ b/pkg/migrations/indexerdb/6_create_holdings.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package indexerdb import ( diff --git a/pkg/migrations/indexerdb/service.go b/pkg/migrations/indexerdb/service.go index 825944ef..02c98198 100644 --- a/pkg/migrations/indexerdb/service.go +++ b/pkg/migrations/indexerdb/service.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package indexerdb holds all migrations for the indexer database. package indexerdb diff --git a/pkg/migrations/migrations_test.go b/pkg/migrations/migrations_test.go index d89b7258..2fcc872a 100644 --- a/pkg/migrations/migrations_test.go +++ b/pkg/migrations/migrations_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package migrations import ( diff --git a/pkg/migrations/relayerdb/1_create_transfers.go b/pkg/migrations/relayerdb/1_create_transfers.go index 8adf1db2..5b509917 100644 --- a/pkg/migrations/relayerdb/1_create_transfers.go +++ b/pkg/migrations/relayerdb/1_create_transfers.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package relayerdb import ( diff --git a/pkg/migrations/relayerdb/2_create_chain_state.go b/pkg/migrations/relayerdb/2_create_chain_state.go index 46a3888d..e2a72556 100644 --- a/pkg/migrations/relayerdb/2_create_chain_state.go +++ b/pkg/migrations/relayerdb/2_create_chain_state.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package relayerdb import ( diff --git a/pkg/migrations/relayerdb/service.go b/pkg/migrations/relayerdb/service.go index a8cf7c7e..bee5c4b9 100644 --- a/pkg/migrations/relayerdb/service.go +++ b/pkg/migrations/relayerdb/service.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package relayerdb holds all the migrations for the relayer database package relayerdb diff --git a/pkg/pgutil/config.go b/pkg/pgutil/config.go index 0e457757..77512020 100644 --- a/pkg/pgutil/config.go +++ b/pkg/pgutil/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package pgutil import "net/url" diff --git a/pkg/pgutil/config_test.go b/pkg/pgutil/config_test.go index e6b506c1..39e118e9 100644 --- a/pkg/pgutil/config_test.go +++ b/pkg/pgutil/config_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package pgutil import "testing" diff --git a/pkg/pgutil/connect.go b/pkg/pgutil/connect.go index 0f6e3bce..cd61cf07 100644 --- a/pkg/pgutil/connect.go +++ b/pkg/pgutil/connect.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package pgutil import ( diff --git a/pkg/pgutil/migrations/migration.go b/pkg/pgutil/migrations/migration.go index eb7614d5..084c5283 100644 --- a/pkg/pgutil/migrations/migration.go +++ b/pkg/pgutil/migrations/migration.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package migrations holds migrations related helpers package migrations diff --git a/pkg/pgutil/migrations/migration_test.go b/pkg/pgutil/migrations/migration_test.go index d20eb1e1..0c167f79 100644 --- a/pkg/pgutil/migrations/migration_test.go +++ b/pkg/pgutil/migrations/migration_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package migrations import ( diff --git a/pkg/pgutil/testutil.go b/pkg/pgutil/testutil.go index 3691c313..4390459a 100644 --- a/pkg/pgutil/testutil.go +++ b/pkg/pgutil/testutil.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package pgutil import ( diff --git a/pkg/reconciler/config.go b/pkg/reconciler/config.go index ac4c272c..27f24e5d 100644 --- a/pkg/reconciler/config.go +++ b/pkg/reconciler/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package reconciler import "time" diff --git a/pkg/reconciler/reconciler.go b/pkg/reconciler/reconciler.go index 2363aebd..4678a2a8 100644 --- a/pkg/reconciler/reconciler.go +++ b/pkg/reconciler/reconciler.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package reconciler import ( diff --git a/pkg/reconciler/store/model.go b/pkg/reconciler/store/model.go index 99c71b0f..40c2962d 100644 --- a/pkg/reconciler/store/model.go +++ b/pkg/reconciler/store/model.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/reconciler/store/pg.go b/pkg/reconciler/store/pg.go index b4d1a318..e4480996 100644 --- a/pkg/reconciler/store/pg.go +++ b/pkg/reconciler/store/pg.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/reconciler/store/pg_test.go b/pkg/reconciler/store/pg_test.go index e3811e7b..47e9e87e 100644 --- a/pkg/reconciler/store/pg_test.go +++ b/pkg/reconciler/store/pg_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/registry/handler.go b/pkg/registry/handler.go index 041b60db..28470e10 100644 --- a/pkg/registry/handler.go +++ b/pkg/registry/handler.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package registry implements the Splice Registry API for external wallet integration. // // It exposes contract discovery endpoints that allow wallets like Canton Loop diff --git a/pkg/relayer/config.go b/pkg/relayer/config.go index b56d55d4..7c0ea81b 100644 --- a/pkg/relayer/config.go +++ b/pkg/relayer/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package relayer import "time" diff --git a/pkg/relayer/engine/destination.go b/pkg/relayer/engine/destination.go index 8ce9bae8..43083bb1 100644 --- a/pkg/relayer/engine/destination.go +++ b/pkg/relayer/engine/destination.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/relayer/engine/destination_test.go b/pkg/relayer/engine/destination_test.go index 7e6e8c14..020cd322 100644 --- a/pkg/relayer/engine/destination_test.go +++ b/pkg/relayer/engine/destination_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine_test import ( diff --git a/pkg/relayer/engine/engine.go b/pkg/relayer/engine/engine.go index d58cf8b2..f94d495c 100644 --- a/pkg/relayer/engine/engine.go +++ b/pkg/relayer/engine/engine.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/relayer/engine/engine_test.go b/pkg/relayer/engine/engine_test.go index 5a4c8dd1..2ea68920 100644 --- a/pkg/relayer/engine/engine_test.go +++ b/pkg/relayer/engine/engine_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/relayer/engine/metrics.go b/pkg/relayer/engine/metrics.go index e055e584..cf463fc3 100644 --- a/pkg/relayer/engine/metrics.go +++ b/pkg/relayer/engine/metrics.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/relayer/engine/processor.go b/pkg/relayer/engine/processor.go index b0267be7..487fd5c7 100644 --- a/pkg/relayer/engine/processor.go +++ b/pkg/relayer/engine/processor.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/relayer/engine/processor_test.go b/pkg/relayer/engine/processor_test.go index 30fbed1b..d980bc32 100644 --- a/pkg/relayer/engine/processor_test.go +++ b/pkg/relayer/engine/processor_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine_test import ( diff --git a/pkg/relayer/engine/source.go b/pkg/relayer/engine/source.go index a2f4bf04..9d49b892 100644 --- a/pkg/relayer/engine/source.go +++ b/pkg/relayer/engine/source.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine import ( diff --git a/pkg/relayer/engine/source_test.go b/pkg/relayer/engine/source_test.go index c0a3bb15..bb3991f7 100644 --- a/pkg/relayer/engine/source_test.go +++ b/pkg/relayer/engine/source_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package engine_test import ( diff --git a/pkg/relayer/service/http.go b/pkg/relayer/service/http.go index 2c05b8bb..0bf77554 100644 --- a/pkg/relayer/service/http.go +++ b/pkg/relayer/service/http.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/relayer/service/log.go b/pkg/relayer/service/log.go index 3f6c0b58..337cfdf6 100644 --- a/pkg/relayer/service/log.go +++ b/pkg/relayer/service/log.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/relayer/service/service.go b/pkg/relayer/service/service.go index 9765a3d3..16b6fc36 100644 --- a/pkg/relayer/service/service.go +++ b/pkg/relayer/service/service.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package service provides the relayer HTTP service layer. package service diff --git a/pkg/relayer/store/instrumented.go b/pkg/relayer/store/instrumented.go index c7f1fe1a..cab64f66 100644 --- a/pkg/relayer/store/instrumented.go +++ b/pkg/relayer/store/instrumented.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/relayer/store/metrics.go b/pkg/relayer/store/metrics.go index 85e31c18..95cda17a 100644 --- a/pkg/relayer/store/metrics.go +++ b/pkg/relayer/store/metrics.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/relayer/store/model.go b/pkg/relayer/store/model.go index f398565c..a29ebc1f 100644 --- a/pkg/relayer/store/model.go +++ b/pkg/relayer/store/model.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/relayer/store/pg.go b/pkg/relayer/store/pg.go index 40945356..7b928202 100644 --- a/pkg/relayer/store/pg.go +++ b/pkg/relayer/store/pg.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/relayer/store/pg_test.go b/pkg/relayer/store/pg_test.go index a9b2ac10..f5322498 100644 --- a/pkg/relayer/store/pg_test.go +++ b/pkg/relayer/store/pg_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package store import ( diff --git a/pkg/relayer/types.go b/pkg/relayer/types.go index d9938b14..35848f0e 100644 --- a/pkg/relayer/types.go +++ b/pkg/relayer/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package relayer import "time" diff --git a/pkg/token/config.go b/pkg/token/config.go index b5b920a5..1e062396 100644 --- a/pkg/token/config.go +++ b/pkg/token/config.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/token/erc20.go b/pkg/token/erc20.go index 3b73ba25..5f61b0be 100644 --- a/pkg/token/erc20.go +++ b/pkg/token/erc20.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/token/erc20_test.go b/pkg/token/erc20_test.go index ff35e84c..432efe30 100644 --- a/pkg/token/erc20_test.go +++ b/pkg/token/erc20_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token_test import ( diff --git a/pkg/token/http.go b/pkg/token/http.go index bf55d0d1..e7ef7cc7 100644 --- a/pkg/token/http.go +++ b/pkg/token/http.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/token/http_test.go b/pkg/token/http_test.go index 43162d84..c83fe924 100644 --- a/pkg/token/http_test.go +++ b/pkg/token/http_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token_test import ( diff --git a/pkg/token/native.go b/pkg/token/native.go index 6bfeeacf..d39d7497 100644 --- a/pkg/token/native.go +++ b/pkg/token/native.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/token/native_test.go b/pkg/token/native_test.go index 51c38830..d1b75aef 100644 --- a/pkg/token/native_test.go +++ b/pkg/token/native_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token_test import ( diff --git a/pkg/token/provider/canton.go b/pkg/token/provider/canton.go index a5bbaacb..023745c1 100644 --- a/pkg/token/provider/canton.go +++ b/pkg/token/provider/canton.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package provider import ( diff --git a/pkg/token/provider/indexer.go b/pkg/token/provider/indexer.go index 3b6248eb..70f1eff6 100644 --- a/pkg/token/provider/indexer.go +++ b/pkg/token/provider/indexer.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package provider import ( diff --git a/pkg/token/service.go b/pkg/token/service.go index 850fe45b..142cabc6 100644 --- a/pkg/token/service.go +++ b/pkg/token/service.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token import ( diff --git a/pkg/token/types.go b/pkg/token/types.go index 923d25f3..12e5015e 100644 --- a/pkg/token/types.go +++ b/pkg/token/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package token // Type identifies a token for balance operations. diff --git a/pkg/transfer/cache.go b/pkg/transfer/cache.go index 799c325e..25df63b8 100644 --- a/pkg/transfer/cache.go +++ b/pkg/transfer/cache.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package transfer import ( diff --git a/pkg/transfer/cache_test.go b/pkg/transfer/cache_test.go index c29433df..26571e88 100644 --- a/pkg/transfer/cache_test.go +++ b/pkg/transfer/cache_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package transfer import ( diff --git a/pkg/transfer/http.go b/pkg/transfer/http.go index ce16a515..c8e3e714 100644 --- a/pkg/transfer/http.go +++ b/pkg/transfer/http.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package transfer import ( diff --git a/pkg/transfer/log.go b/pkg/transfer/log.go index 188bdd6e..2933d063 100644 --- a/pkg/transfer/log.go +++ b/pkg/transfer/log.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package transfer import ( diff --git a/pkg/transfer/service.go b/pkg/transfer/service.go index 52dd7901..a2a8ec6d 100644 --- a/pkg/transfer/service.go +++ b/pkg/transfer/service.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package transfer import ( diff --git a/pkg/transfer/service_test.go b/pkg/transfer/service_test.go index 6c9ecf8b..2e0ed05e 100644 --- a/pkg/transfer/service_test.go +++ b/pkg/transfer/service_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package transfer import ( diff --git a/pkg/transfer/types.go b/pkg/transfer/types.go index 25d4e1d3..99f4ebd7 100644 --- a/pkg/transfer/types.go +++ b/pkg/transfer/types.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + // Package transfer implements the non-custodial prepare/execute transfer API. package transfer diff --git a/pkg/user/service/http.go b/pkg/user/service/http.go index bdc391a2..64e75e95 100644 --- a/pkg/user/service/http.go +++ b/pkg/user/service/http.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/user/service/http_test.go b/pkg/user/service/http_test.go index d71617cb..fcedf4f7 100644 --- a/pkg/user/service/http_test.go +++ b/pkg/user/service/http_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/user/service/log.go b/pkg/user/service/log.go index a607d586..90f4425a 100644 --- a/pkg/user/service/log.go +++ b/pkg/user/service/log.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/user/service/service.go b/pkg/user/service/service.go index fcd1e6de..f83eda16 100644 --- a/pkg/user/service/service.go +++ b/pkg/user/service/service.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/user/service/service_test.go b/pkg/user/service/service_test.go index fd3092f9..2fcbc4a9 100644 --- a/pkg/user/service/service_test.go +++ b/pkg/user/service/service_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/user/service/topology_cache.go b/pkg/user/service/topology_cache.go index bf1b8b9e..7f395e70 100644 --- a/pkg/user/service/topology_cache.go +++ b/pkg/user/service/topology_cache.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package service import ( diff --git a/pkg/user/user.go b/pkg/user/user.go index ea8c432b..3a9895f8 100644 --- a/pkg/user/user.go +++ b/pkg/user/user.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package user import ( diff --git a/pkg/userstore/model.go b/pkg/userstore/model.go index de26c6ae..2d088421 100644 --- a/pkg/userstore/model.go +++ b/pkg/userstore/model.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package userstore import ( diff --git a/pkg/userstore/pg.go b/pkg/userstore/pg.go index 0c57cf4e..283709e5 100644 --- a/pkg/userstore/pg.go +++ b/pkg/userstore/pg.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package userstore import ( diff --git a/pkg/userstore/pg_test.go b/pkg/userstore/pg_test.go index 56931113..331d8436 100644 --- a/pkg/userstore/pg_test.go +++ b/pkg/userstore/pg_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package userstore import ( diff --git a/scripts/dev/add-spdx-headers.sh b/scripts/dev/add-spdx-headers.sh new file mode 100755 index 00000000..a9928592 --- /dev/null +++ b/scripts/dev/add-spdx-headers.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# +# Idempotently add `SPDX-License-Identifier: Apache-2.0` headers to first-party +# source files. Re-running this script is safe; files that already carry an +# SPDX header in their first 5 lines are skipped, and files that look +# generated are skipped entirely. +# +# Usage: bash scripts/dev/add-spdx-headers.sh +# +# Run from the repository root. + +set -euo pipefail + +SPDX_LINE_SLASH="// SPDX-License-Identifier: Apache-2.0" +SPDX_LINE_HASH="# SPDX-License-Identifier: Apache-2.0" + +# Returns 0 (true) if the file already has an SPDX header in its first 5 lines, +# OR if it looks like generated code we should skip. +should_skip() { + local file="$1" + local first_five + first_five=$(head -n 5 "$file" 2>/dev/null || true) + + case "$first_five" in + *"SPDX-License-Identifier"*) return 0 ;; + *"Code generated"*) return 0 ;; + *"DO NOT EDIT"*) return 0 ;; + *"protoc-gen-go"*) return 0 ;; + *"abigen"*) return 0 ;; + esac + return 1 +} + +# Prepend a header line to the top of the file. Preserves the target's +# file mode, since `mv tmp file` adopts the source mktemp's mode (typically +# 0600 normalized to 100644 in git) and would silently strip the executable +# bit on shell scripts. +prepend_top() { + local file="$1" + local header="$2" + local tmp + tmp=$(mktemp) + { + printf '%s\n\n' "$header" + cat "$file" + } >"$tmp" + cat "$tmp" >"$file" + rm -f "$tmp" +} + +# Insert a header line immediately after the shebang on line 1. Same +# mode-preservation reasoning as prepend_top. +insert_after_shebang() { + local file="$1" + local header="$2" + local tmp + tmp=$(mktemp) + { + head -n 1 "$file" + printf '%s\n' "$header" + tail -n +2 "$file" + } >"$tmp" + cat "$tmp" >"$file" + rm -f "$tmp" +} + +# Process Go files. +process_go() { + local count=0 skipped=0 + while IFS= read -r -d '' file; do + if should_skip "$file"; then + skipped=$((skipped + 1)) + continue + fi + prepend_top "$file" "$SPDX_LINE_SLASH" + count=$((count + 1)) + done < <(find cmd pkg -type f -name '*.go' \ + -not -path '*/lapi/v2/*' \ + -not -path '*/ethereum/contracts/*' \ + -not -name '*.pb.go' \ + -print0) + printf 'Go: added headers to %d files (skipped %d)\n' "$count" "$skipped" +} + +# Process shell scripts. +process_shell() { + local count=0 skipped=0 + while IFS= read -r -d '' file; do + if should_skip "$file"; then + skipped=$((skipped + 1)) + continue + fi + if head -n 1 "$file" | grep -q '^#!'; then + insert_after_shebang "$file" "$SPDX_LINE_HASH" + else + prepend_top "$file" "$SPDX_LINE_HASH" + fi + count=$((count + 1)) + done < <(find scripts -type f -name '*.sh' -print0) + printf 'Shell: added headers to %d files (skipped %d)\n' "$count" "$skipped" +} + +# Process Dockerfiles. Targets explicit list rather than a glob to avoid +# accidentally touching vendor/test Dockerfiles outside our scope. +process_dockerfiles() { + local count=0 skipped=0 + local dockerfiles=( + "Dockerfile.local" + "cmd/api-server/Dockerfile" + "cmd/indexer/Dockerfile" + "cmd/relayer/Dockerfile" + ) + for file in "${dockerfiles[@]}"; do + if [[ ! -f "$file" ]]; then + continue + fi + if should_skip "$file"; then + skipped=$((skipped + 1)) + continue + fi + prepend_top "$file" "$SPDX_LINE_HASH" + count=$((count + 1)) + done + printf 'Dockerfile: added headers to %d files (skipped %d)\n' "$count" "$skipped" +} + +main() { + if [[ ! -f go.mod ]]; then + echo "error: run from repository root (go.mod not found)" >&2 + exit 1 + fi + process_go + process_shell + process_dockerfiles +} + +main "$@" diff --git a/scripts/lib/bridge.sh b/scripts/lib/bridge.sh index 2f887716..7d614aa9 100755 --- a/scripts/lib/bridge.sh +++ b/scripts/lib/bridge.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Bridge operations for Canton-Ethereum bridge tests # ============================================================================= diff --git a/scripts/lib/common.sh b/scripts/lib/common.sh index 82b11fed..21900d2d 100755 --- a/scripts/lib/common.sh +++ b/scripts/lib/common.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Common utilities for Canton-Ethereum bridge test scripts # ============================================================================= diff --git a/scripts/lib/config.sh b/scripts/lib/config.sh index dae006ab..6b157556 100755 --- a/scripts/lib/config.sh +++ b/scripts/lib/config.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Configuration loading for Canton-Ethereum bridge tests # ============================================================================= diff --git a/scripts/lib/services.sh b/scripts/lib/services.sh index a77e4933..e442c3cf 100755 --- a/scripts/lib/services.sh +++ b/scripts/lib/services.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Service management for Canton-Ethereum bridge tests # ============================================================================= diff --git a/scripts/remote/bootstrap-remote.sh b/scripts/remote/bootstrap-remote.sh index c791c0fe..141d6542 100755 --- a/scripts/remote/bootstrap-remote.sh +++ b/scripts/remote/bootstrap-remote.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Canton Bridge Remote Bootstrap Script (DevNet / Mainnet) # ============================================================================= diff --git a/scripts/setup/bootstrap-all.sh b/scripts/setup/bootstrap-all.sh index 658b16ea..4de7e195 100755 --- a/scripts/setup/bootstrap-all.sh +++ b/scripts/setup/bootstrap-all.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Canton Bridge Full Bootstrap Script # ============================================================================= diff --git a/scripts/setup/build-dars.sh b/scripts/setup/build-dars.sh index 0e678a83..7c693960 100755 --- a/scripts/setup/build-dars.sh +++ b/scripts/setup/build-dars.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Build all DAR packages for Canton Bridge # ============================================================================= diff --git a/scripts/setup/docker-bootstrap.sh b/scripts/setup/docker-bootstrap.sh index 947644c8..bea7f826 100644 --- a/scripts/setup/docker-bootstrap.sh +++ b/scripts/setup/docker-bootstrap.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Docker Bootstrap Script # ============================================================================= diff --git a/scripts/setup/download-usdcx-dars.sh b/scripts/setup/download-usdcx-dars.sh index d50abcd8..07e1ff5e 100755 --- a/scripts/setup/download-usdcx-dars.sh +++ b/scripts/setup/download-usdcx-dars.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" diff --git a/scripts/setup/entrypoint.sh b/scripts/setup/entrypoint.sh index 531ff332..72165967 100755 --- a/scripts/setup/entrypoint.sh +++ b/scripts/setup/entrypoint.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: Apache-2.0 set -e # entrypoint.sh - Entrypoint script for Go services to handle migrations and startup diff --git a/scripts/setup/generate-protos.sh b/scripts/setup/generate-protos.sh index b9d83576..c35712ce 100755 --- a/scripts/setup/generate-protos.sh +++ b/scripts/setup/generate-protos.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # Script to generate Go protobuf stubs for Canton Ledger API # Updated for Canton 3.4.8 which uses v2 API only diff --git a/scripts/setup/init-multiple-dbs.sh b/scripts/setup/init-multiple-dbs.sh index cbc97df2..a87f1ed2 100755 --- a/scripts/setup/init-multiple-dbs.sh +++ b/scripts/setup/init-multiple-dbs.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # init-multiple-dbs.sh - Initialize multiple PostgreSQL databases # This script is executed by postgres docker-entrypoint-initdb.d diff --git a/scripts/setup/setup-devnet.sh b/scripts/setup/setup-devnet.sh index 48379d99..e4c976ce 100755 --- a/scripts/setup/setup-devnet.sh +++ b/scripts/setup/setup-devnet.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Canton-Ethereum Bridge - DevNet + Sepolia Setup Script # ============================================================================= diff --git a/scripts/setup/setup-local.sh b/scripts/setup/setup-local.sh index ba2fcccd..21984b98 100755 --- a/scripts/setup/setup-local.sh +++ b/scripts/setup/setup-local.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Canton-Ethereum Bridge - Local Setup Script # ============================================================================= diff --git a/scripts/testing/bootstrap-local.sh b/scripts/testing/bootstrap-local.sh index 86b9ce77..7a4912c2 100755 --- a/scripts/testing/bootstrap-local.sh +++ b/scripts/testing/bootstrap-local.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Canton-Ethereum Bridge - Local Bootstrap (One-Command Setup) # ============================================================================= diff --git a/scripts/testing/e2e-local.sh b/scripts/testing/e2e-local.sh index c9e0e4dc..8345d4fd 100755 --- a/scripts/testing/e2e-local.sh +++ b/scripts/testing/e2e-local.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # Canton-Ethereum Bridge Local E2E Test (Bash + Cast version - Refactored) # ============================================================================= diff --git a/scripts/utils/check-anvil-state.sh b/scripts/utils/check-anvil-state.sh index ea904195..026f752b 100755 --- a/scripts/utils/check-anvil-state.sh +++ b/scripts/utils/check-anvil-state.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # Quick diagnostic script to check Anvil state echo "=== Checking Anvil State ===" diff --git a/scripts/utils/metamask-info-devnet.sh b/scripts/utils/metamask-info-devnet.sh index 68cc0d0a..50c9b4d7 100755 --- a/scripts/utils/metamask-info-devnet.sh +++ b/scripts/utils/metamask-info-devnet.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # MetaMask Connection Info - DevNet/Sepolia # ============================================================================= diff --git a/scripts/utils/metamask-info.sh b/scripts/utils/metamask-info.sh index b5f189e4..2ec6b22b 100755 --- a/scripts/utils/metamask-info.sh +++ b/scripts/utils/metamask-info.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # ============================================================================= # MetaMask Connection Info # ============================================================================= diff --git a/scripts/utils/query-canton-holdings.sh b/scripts/utils/query-canton-holdings.sh index 27a30fc5..8e773cdd 100755 --- a/scripts/utils/query-canton-holdings.sh +++ b/scripts/utils/query-canton-holdings.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: Apache-2.0 # Query Canton Holdings Script # # This script queries CIP56Holding contracts from Canton via the Go verification tool,