mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-05 19:01:42 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f74bdc1d79 | ||
|
|
30475b9fbd | ||
|
|
1388a673e5 | ||
|
|
ac8c153b28 | ||
|
|
ee12bf684e | ||
|
|
63dc68caac | ||
|
|
ec57c76a2a | ||
|
|
99e9eefffb | ||
|
|
eb0777ebb4 | ||
|
|
ed5ee034b8 | ||
|
|
bb2972b527 | ||
|
|
45b474c9a6 | ||
|
|
99747c022e | ||
|
|
d9a2689469 | ||
|
|
08d8c7eda0 | ||
|
|
4dd23f1be8 | ||
|
|
0ebc988a68 | ||
|
|
9b8af84393 | ||
|
|
ff1ccd7c78 | ||
|
|
3176cc661a | ||
|
|
9ba387f2e4 | ||
|
|
c87dffd6da | ||
|
|
0cf69f5a59 | ||
|
|
babab1e09e | ||
|
|
6f5b079f51 | ||
|
|
9908669be0 | ||
|
|
c2f3e66405 | ||
|
|
b24c4668ed | ||
|
|
fcca387d9a | ||
|
|
97cc6a0d21 | ||
|
|
737565344d | ||
|
|
72f42afb81 | ||
|
|
0a2b91c9ac | ||
|
|
83b8fc597a | ||
|
|
0d4f2946f3 | ||
|
|
305efbea5d | ||
|
|
23f077ce75 | ||
|
|
d667c3c604 | ||
|
|
0502f52ec0 | ||
|
|
40f50bf37a | ||
|
|
0e0a46741f | ||
|
|
5b784659af | ||
|
|
e2f24eef8e | ||
|
|
aa43770bf4 | ||
|
|
45bc823de0 | ||
|
|
1250468f69 | ||
|
|
e94ce3b1cc | ||
|
|
ebb89facbd | ||
|
|
648b089c48 | ||
|
|
0befb6d431 | ||
|
|
35f2ad604c | ||
|
|
e139aee2b3 | ||
|
|
b57bea6f7b | ||
|
|
1828d2e710 | ||
|
|
04d929aae9 | ||
|
|
b51c36645e | ||
|
|
bd1ea5042e | ||
|
|
af4c66bc79 | ||
|
|
2d1f820451 | ||
|
|
179add9e12 | ||
|
|
9d3264256a | ||
|
|
fb234ed339 | ||
|
|
bb7724ece1 | ||
|
|
c67a7823a6 | ||
|
|
518109e9df | ||
|
|
e38a045de3 | ||
|
|
ba82d707d0 | ||
|
|
f366dd8cf2 | ||
|
|
dc6f02a000 | ||
|
|
b81bdebd64 | ||
|
|
6127d80f2a | ||
|
|
49c8a8c6d0 | ||
|
|
e2e0c35008 | ||
|
|
1de6eda49f | ||
|
|
000a0893c3 | ||
|
|
0a68ab682d | ||
|
|
54e51768c0 | ||
|
|
4eb294d856 | ||
|
|
e3b8f2cffe | ||
|
|
c158904efc | ||
|
|
f250082fff | ||
|
|
67432d3fdf | ||
|
|
0ff4299061 | ||
|
|
8ceb89053f | ||
|
|
6fbcb7cef5 | ||
|
|
f8d362352d | ||
|
|
ce3d073abd | ||
|
|
0e8b92e53d | ||
|
|
27d4dfcdfd | ||
|
|
38096db2dd | ||
|
|
bbb093b171 | ||
|
|
98bdf92d70 | ||
|
|
e572d7a626 | ||
|
|
aff4e3523c | ||
|
|
9972c5e40a | ||
|
|
2915ba2933 | ||
|
|
3d9264dae4 | ||
|
|
d030dbcfde | ||
|
|
60cede383a | ||
|
|
7ef06e8d05 | ||
|
|
e8475dbd8d | ||
|
|
3353d9f622 | ||
|
|
893631eb4c | ||
|
|
2286708d56 | ||
|
|
553cff37a1 | ||
|
|
7806c07381 | ||
|
|
b7a40ac3d7 | ||
|
|
5280209075 | ||
|
|
e0ebe92361 | ||
|
|
5c3966a9d6 | ||
|
|
38ca7b246b | ||
|
|
d9f2b21812 | ||
|
|
fb9f41248f | ||
|
|
4087fdd79e | ||
|
|
6bb2c2143e | ||
|
|
dae01698ef | ||
|
|
b65e844824 | ||
|
|
c64c506c52 | ||
|
|
889186ec3e | ||
|
|
9b3c89785e | ||
|
|
cfce4ba460 | ||
|
|
3cb72d89e9 | ||
|
|
cb6fb10c3c | ||
|
|
0c5f052f86 | ||
|
|
c36dc537ef | ||
|
|
4af64c8524 |
@@ -2,6 +2,7 @@
|
|||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
tag_format = "v$version"
|
tag_format = "v$version"
|
||||||
version_scheme = "semver"
|
version_scheme = "semver"
|
||||||
version = "0.5.20"
|
version = "0.5.26"
|
||||||
update_changelog_on_bump = true
|
update_changelog_on_bump = true
|
||||||
major_version_zero = true
|
major_version_zero = true
|
||||||
|
changelog_file = "./docs/docs/changelog/index.md"
|
||||||
|
|||||||
+306
-68
@@ -1,82 +1,218 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "cosmos/sdk",
|
"name": "app/cosmos-sdk",
|
||||||
"path": "app",
|
"path": "app",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://docs.cosmos.network/v0.50/build/building-modules/module-manager",
|
{
|
||||||
"https://docs.cosmos.network/v0.50/build/building-modules/messages-and-queries",
|
"keywords": [
|
||||||
"https://docs.cosmos.network/v0.50/build/building-modules/msg-services",
|
"module",
|
||||||
"https://docs.cosmos.network/v0.50/build/building-modules/query-services",
|
"cosmos"
|
||||||
"https://docs.cosmos.network/v0.50/build/building-modules/depinject"
|
],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/building-modules/module-manager"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [
|
||||||
|
"protobuf",
|
||||||
|
"cosmos"
|
||||||
|
],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/building-modules/messages-and-queries"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [
|
||||||
|
"rpc",
|
||||||
|
"protobuf",
|
||||||
|
"service",
|
||||||
|
"cosmos"
|
||||||
|
],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/building-modules/msg-services"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [
|
||||||
|
"protobuf",
|
||||||
|
"rpc",
|
||||||
|
"cosmos",
|
||||||
|
"query"
|
||||||
|
],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/building-modules/query-services"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [
|
||||||
|
"cosmos",
|
||||||
|
"depinject",
|
||||||
|
"sdk"
|
||||||
|
],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/building-modules/depinject"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "cosmos/ibc",
|
"name": "app/ibc",
|
||||||
"path": "app",
|
"path": "app",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://ibc.cosmos.network/v8/apps/interchain-accounts/overview/",
|
{
|
||||||
"https://ibc.cosmos.network/v8/apps/transfer/overview/",
|
"keywords": [
|
||||||
"https://docs.osmosis.zone/osmosis-core/asset-info/",
|
"cosmos",
|
||||||
"https://docs.osmosis.zone/osmosis-core/modules/tokenfactory",
|
"interchain",
|
||||||
"https://docs.noble.xyz/cctp/mint",
|
"accounts"
|
||||||
"https://docs.noble.xyz/cctp/mint_forward",
|
],
|
||||||
"https://docs.evmos.org/protocol/modules/erc20",
|
"url": "https://ibc.cosmos.network/v8/apps/interchain-accounts/overview/"
|
||||||
"https://docs.nomic.io/nbtc"
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://ibc.cosmos.network/v8/apps/transfer/overview/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.osmosis.zone/osmosis-core/asset-info/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.osmosis.zone/osmosis-core/modules/tokenfactory"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [
|
||||||
|
"usdc",
|
||||||
|
"mint",
|
||||||
|
"cosmos",
|
||||||
|
"noble"
|
||||||
|
],
|
||||||
|
"url": "https://docs.noble.xyz/cctp/mint"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [
|
||||||
|
"usdc"
|
||||||
|
],
|
||||||
|
"url": "https://docs.noble.xyz/cctp/mint_forward"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.evmos.org/protocol/modules/erc20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.nomic.io/nbtc"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "crypto/mpc",
|
"name": "crypto/mpc",
|
||||||
"path": "crypto/mpc",
|
"path": "crypto/mpc",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://csrc.nist.gov/CSRC/media/Events/NTCW19/papers/paper-DKLS.pdf"
|
{
|
||||||
|
"keywords": [
|
||||||
|
"mpc",
|
||||||
|
"wallet",
|
||||||
|
"security",
|
||||||
|
"advanced cryptography"
|
||||||
|
],
|
||||||
|
"url": "https://csrc.nist.gov/CSRC/media/Events/NTCW19/papers/paper-DKLS.pdf"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "crypto/ucan",
|
"name": "crypto/ucan",
|
||||||
"path": "crypto/ucan",
|
"path": "crypto/ucan",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://raw.githubusercontent.com/ucan-wg/spec/refs/heads/main/README.md"
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://raw.githubusercontent.com/ucan-wg/spec/refs/heads/main/README.md"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "crypto/zkp",
|
"name": "crypto/zkp",
|
||||||
"path": "crypto/accumulator",
|
"path": "crypto/accumulator",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://eprint.iacr.org/2021/1672.pdf"
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://eprint.iacr.org/2021/1672.pdf"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "gateway/handlers",
|
"name": "gateway/handlers",
|
||||||
"path": "pkg/gateway/handlers",
|
"path": "pkg/gateway/handlers",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://echo.labstack.com/docs/cookbook/sse",
|
{
|
||||||
"https://echo.labstack.com/docs/cookbook/websocket",
|
"keywords": [],
|
||||||
"https://echo.labstack.com/docs/cookbook/subdomain"
|
"url": "https://echo.labstack.com/docs/cookbook/sse"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://echo.labstack.com/docs/cookbook/websocket"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://echo.labstack.com/docs/cookbook/subdomain"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "gateway/database",
|
"name": "gateway/database",
|
||||||
"path": "pkg/gateway/internal/database",
|
"path": "pkg/gateway/internal/database",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://docs.tigerbeetle.com/coding/data-modeling",
|
{
|
||||||
"https://docs.tigerbeetle.com/coding/two-phase-transfers",
|
"keywords": [],
|
||||||
"https://docs.tigerbeetle.com/coding/reliable-transaction-submission",
|
"url": "https://docs.tigerbeetle.com/coding/data-modeling"
|
||||||
"https://docs.tigerbeetle.com/coding/recipes/currency-exchange",
|
},
|
||||||
"https://docs.tigerbeetle.com/coding/recipes/balance-conditional-transfers",
|
{
|
||||||
"https://docs.tigerbeetle.com/reference/account",
|
"keywords": [],
|
||||||
"https://docs.tigerbeetle.com/reference/transfer",
|
"url": "https://docs.tigerbeetle.com/coding/two-phase-transfers"
|
||||||
"https://docs.substreams.dev/documentation/consume/packages",
|
},
|
||||||
"https://docs.substreams.dev/documentation/consume/sql/deployable-services/local-service",
|
{
|
||||||
"https://docs.substreams.dev/tutorials/cosmos/injective/foundational"
|
"keywords": [],
|
||||||
|
"url": "https://docs.tigerbeetle.com/coding/reliable-transaction-submission"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [
|
||||||
|
"currency"
|
||||||
|
],
|
||||||
|
"url": "https://docs.tigerbeetle.com/coding/recipes/currency-exchange"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [
|
||||||
|
"balance"
|
||||||
|
],
|
||||||
|
"url": "https://docs.tigerbeetle.com/coding/recipes/balance-conditional-transfers"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.tigerbeetle.com/reference/account"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.tigerbeetle.com/reference/transfer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.substreams.dev/documentation/consume/packages"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.substreams.dev/documentation/consume/sql/deployable-services/local-service"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.substreams.dev/tutorials/cosmos/injective/foundational"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vault/handlers",
|
"name": "vault/handlers",
|
||||||
"path": "pkg/vault/handlers",
|
"path": "pkg/vault/handlers",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://echo.labstack.com/docs/cookbook/jwt",
|
{
|
||||||
"https://echo.labstack.com/docs/middleware/secure",
|
"keywords": [],
|
||||||
"https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
"url": "https://echo.labstack.com/docs/cookbook/jwt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://echo.labstack.com/docs/middleware/secure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -92,16 +228,28 @@
|
|||||||
"name": "pkl/ipfs",
|
"name": "pkl/ipfs",
|
||||||
"path": "pkl/ipfs.net",
|
"path": "pkl/ipfs.net",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://github.com/ipfs/kubo/blob/master/docs/config.md",
|
{
|
||||||
"https://pkl-lang.org/main/current/language-reference/index.html"
|
"keywords": [],
|
||||||
|
"url": "https://github.com/ipfs/kubo/blob/master/docs/config.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pkl/matrix",
|
"name": "pkl/matrix",
|
||||||
"path": "pkl/matrix.net",
|
"path": "pkl/matrix.net",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html",
|
{
|
||||||
"https://pkl-lang.org/main/current/language-reference/index.html"
|
"keywords": [],
|
||||||
|
"url": "https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -118,72 +266,162 @@
|
|||||||
"name": "pkl/hway",
|
"name": "pkl/hway",
|
||||||
"path": "pkl/sonr.hway",
|
"path": "pkl/sonr.hway",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://pkl-lang.org/main/current/language-reference/index.html"
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pkl/motr",
|
"name": "pkl/motr",
|
||||||
"path": "pkl/sonr.motr",
|
"path": "pkl/sonr.motr",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://pkl-lang.org/main/current/language-reference/index.html",
|
{
|
||||||
"https://web.dev/learn/pwa/service-workers/",
|
"keywords": [],
|
||||||
"https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://web.dev/learn/pwa/service-workers/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "x/did",
|
"name": "x/did",
|
||||||
"path": "proto/did",
|
"path": "proto/did",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://docs.cosmos.network/v0.50/build/packages/orm",
|
{
|
||||||
"https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations",
|
"keywords": [],
|
||||||
"https://docs.cosmos.network/v0.50/build/modules/auth",
|
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
|
||||||
"https://docs.cosmos.network/v0.50/build/packages/collections",
|
},
|
||||||
"https://docs.cosmos.network/v0.50/build/modules/bank"
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/modules/auth"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/modules/bank"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "x/dwn",
|
"name": "x/dwn",
|
||||||
"path": "proto/dwn",
|
"path": "proto/dwn",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations",
|
{
|
||||||
"https://docs.cosmos.network/v0.50/build/packages/orm",
|
"keywords": [],
|
||||||
"https://docs.cosmos.network/v0.50/build/modules/authz",
|
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
|
||||||
"https://docs.cosmos.network/v0.50/build/packages/collections",
|
},
|
||||||
"https://docs.cosmos.network/v0.50/build/modules/gov",
|
{
|
||||||
"https://docs.cosmos.network/v0.50/build/modules/staking"
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/modules/authz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/modules/gov"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/modules/staking"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "x/svc",
|
"name": "x/svc",
|
||||||
"path": "proto/svc",
|
"path": "proto/svc",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://docs.cosmos.network/v0.50/build/packages/collections",
|
{
|
||||||
"https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations",
|
"keywords": [],
|
||||||
"https://docs.cosmos.network/v0.50/build/packages/orm",
|
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
|
||||||
"https://docs.cosmos.network/v0.50/build/modules/group",
|
},
|
||||||
"https://docs.cosmos.network/v0.50/build/modules/nft"
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/modules/group"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.cosmos.network/v0.50/build/modules/nft"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "repo/ci-cd",
|
"name": "repo/ci-cd",
|
||||||
"path": "deploy",
|
"path": "deploy",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions",
|
{
|
||||||
"https://docs.cosmos.network/v0.50/build/tooling/cosmovisor",
|
"keywords": [],
|
||||||
"https://f1bonacc1.github.io/process-compose/configuration/",
|
"url": "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions"
|
||||||
"https://docs.nomic.io/network/ibc-relayer",
|
},
|
||||||
"https://www.jetify.com/docs/devbox",
|
{
|
||||||
"https://taskfile.dev/reference/cli",
|
"keywords": [],
|
||||||
"https://taskfile.dev/reference/schema",
|
"url": "https://docs.cosmos.network/v0.50/build/tooling/cosmovisor"
|
||||||
"https://taskfile.dev/reference/templating/"
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://f1bonacc1.github.io/process-compose/configuration/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://docs.nomic.io/network/ibc-relayer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://www.jetify.com/docs/devbox"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://taskfile.dev/reference/cli"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://taskfile.dev/reference/schema"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://taskfile.dev/reference/templating/"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "repo/docs",
|
"name": "repo/docs",
|
||||||
"path": "docs",
|
"path": "docs",
|
||||||
"docs": [
|
"docs": [
|
||||||
"https://squidfunk.github.io/mkdocs-material/reference/",
|
{
|
||||||
"https://github.com/mkdocs/catalog/blob/main/README.md"
|
"keywords": [],
|
||||||
|
"url": "https://squidfunk.github.io/mkdocs-material/reference/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keywords": [],
|
||||||
|
"url": "https://github.com/mkdocs/catalog/blob/main/README.md"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
|
|||||||
|
|
||||||
# Extract scope name and path using jq, and pass it to fzf for selection
|
# Extract scope name and path using jq, and pass it to fzf for selection
|
||||||
SCOPE=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r '.[] | "\(.name)"' | fzf --prompt "Select scope:")
|
SCOPE=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r '.[] | "\(.name)"' | fzf --prompt "Select scope:")
|
||||||
DOCS=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r ".[] | select(.name == \"$SCOPE\") | .docs[]")
|
DOCS=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r ".[] | select(.name == \"$SCOPE\") | .docs[].url")
|
||||||
|
|
||||||
# Write Title
|
# Write Title
|
||||||
TITLE=$(gum input --placeholder "Issue Title...")
|
TITLE=$(gum input --placeholder "Issue Title...")
|
||||||
@@ -38,9 +38,9 @@ create_body() {
|
|||||||
echo "$(($i + 1)). ${REQUIREMENTS[$i]}"
|
echo "$(($i + 1)). ${REQUIREMENTS[$i]}"
|
||||||
done
|
done
|
||||||
echo "### Resources:"
|
echo "### Resources:"
|
||||||
for doc in "${DOCS[@]}"; do
|
while IFS= read -r doc; do
|
||||||
echo "- $doc"
|
echo "- $doc"
|
||||||
done
|
done <<< "$DOCS"
|
||||||
}
|
}
|
||||||
|
|
||||||
ISSUE_BODY=$(create_body)
|
ISSUE_BODY=$(create_body)
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
name: Run All Checks
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
merge_group:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-builds:
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Run Build Tests
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: onsonr/sonr
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.23"
|
||||||
|
check-latest: true
|
||||||
|
- name: Run Sonrd Build
|
||||||
|
run: make build
|
||||||
|
- name: Run Hway Build
|
||||||
|
run: make build-hway
|
||||||
|
- name: Run Motr Build
|
||||||
|
run: make build-motr
|
||||||
|
|
||||||
|
test-unit:
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Run Unit Tests
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: onsonr/sonr
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.23"
|
||||||
|
check-latest: true
|
||||||
|
- run: make test-unit
|
||||||
|
|
||||||
|
test-race:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'merge_group'
|
||||||
|
name: Run Race Tests
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: onsonr/sonr
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.23"
|
||||||
|
check-latest: true
|
||||||
|
- run: make test-race
|
||||||
|
|
||||||
|
test-cover:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'merge_group'
|
||||||
|
name: Run Coverage Tests
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: onsonr/sonr
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.23"
|
||||||
|
check-latest: true
|
||||||
|
- run: make test-cover
|
||||||
|
|
||||||
|
goreleaser-check:
|
||||||
|
if: github.event_name == 'merge_group'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Check GoReleaser Config
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: onsonr/sonr
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.23"
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Check GoReleaser Config
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
distribution: goreleaser-pro
|
||||||
|
version: latest
|
||||||
|
args: check
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||||
|
|
||||||
|
- name: GoReleaser Dry Run
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
distribution: goreleaser-pro
|
||||||
|
version: latest
|
||||||
|
args: release --snapshot --clean --skip=publish
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
name: Deploy Networks
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
issues: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
reboot-devnet:
|
||||||
|
name: Devnet Deploy
|
||||||
|
runs-on: goliath
|
||||||
|
environment: "Devnet"
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
branch: develop
|
||||||
|
|
||||||
|
- name: Stop Existing Network
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
make stop-uds
|
||||||
|
make clean
|
||||||
|
|
||||||
|
- name: Start Updated Network
|
||||||
|
run: |
|
||||||
|
make start-uds
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
name: PR Labeler
|
name: PR Labeler
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened]
|
types: [opened, edited]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|||||||
@@ -2,7 +2,12 @@ name: Publish Docs via GitHub Pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- main
|
||||||
- master
|
- master
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
- "docs/**"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
name: Run Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
merge_group:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test-unit:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Run Unit Tests
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: onsonr/sonr
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.23"
|
|
||||||
check-latest: true
|
|
||||||
- run: make test-unit
|
|
||||||
|
|
||||||
test-race:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Run Race Tests
|
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: onsonr/sonr
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.23"
|
|
||||||
check-latest: true
|
|
||||||
- run: make test-race
|
|
||||||
|
|
||||||
test-cover:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Run Coverage Tests
|
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: onsonr/sonr
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.23"
|
|
||||||
check-latest: true
|
|
||||||
- run: make test-cover
|
|
||||||
@@ -1,17 +1,51 @@
|
|||||||
name: Scheduled Release
|
name: Versioned Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||||
|
workflow_dispatch:
|
||||||
|
repository_dispatch:
|
||||||
|
types: [trigger-release]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-release:
|
||||||
|
name: Check Existing Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
release_exists: ${{ steps.check.outputs.release_exists }}
|
||||||
|
is_tag: ${{ steps.check-ref.outputs.is_tag }}
|
||||||
|
ref_name: ${{ steps.check-ref.outputs.ref_name }}
|
||||||
|
steps:
|
||||||
|
- name: Determine ref type and name
|
||||||
|
id: check-ref
|
||||||
|
run: |
|
||||||
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
|
echo "is_tag=true" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "ref_name=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "is_tag=false" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "ref_name=${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Check if release exists
|
||||||
|
id: check
|
||||||
|
if: steps.check-ref.outputs.is_tag == 'true'
|
||||||
|
run: |
|
||||||
|
RELEASE_EXISTS=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
|
"https://api.github.com/repos/onsonr/sonr/releases/tags/${GITHUB_REF#refs/tags/}" \
|
||||||
|
| jq -r 'if .message == "Not Found" then "false" else "true" end')
|
||||||
|
echo "release_exists=$RELEASE_EXISTS" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
goreleaser:
|
goreleaser:
|
||||||
name: Release motr, sonrd, and DWN
|
name: Run GoReleaser
|
||||||
|
needs: check-release
|
||||||
|
if: |
|
||||||
|
(needs.check-release.outputs.is_tag == 'true' && needs.check-release.outputs.release_exists == 'false') ||
|
||||||
|
(needs.check-release.outputs.is_tag == 'false')
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -22,6 +56,18 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
|
- name: Set up release configuration
|
||||||
|
id: setup
|
||||||
|
run: |
|
||||||
|
if [[ "${{ needs.check-release.outputs.is_tag }}" == "true" ]]; then
|
||||||
|
echo "Using tag configuration"
|
||||||
|
git checkout ${{ needs.check-release.outputs.ref_name }}
|
||||||
|
echo "args=release --clean" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "Using snapshot configuration"
|
||||||
|
echo "args=release --snapshot --clean" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.23"
|
go-version: "1.23"
|
||||||
@@ -38,7 +84,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
distribution: goreleaser-pro
|
distribution: goreleaser-pro
|
||||||
version: latest
|
version: latest
|
||||||
args: release --clean
|
args: ${{ steps.setup.outputs.args }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
||||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||||
@@ -46,3 +92,4 @@ jobs:
|
|||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
|
CLOUDSMITH_TOKEN: ${{ secrets.CLOUDSMITH_TOKEN }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Update Version
|
name: Update Version and Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -27,13 +27,29 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: "Bump Version"
|
name: "Bump Version"
|
||||||
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
|
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
|
||||||
|
outputs:
|
||||||
|
new_tag: ${{ steps.bump.outputs.new_tag }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Create bump and changelog
|
- name: Create bump and changelog
|
||||||
|
id: bump
|
||||||
uses: commitizen-tools/commitizen-action@master
|
uses: commitizen-tools/commitizen-action@master
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
increment: "PATCH"
|
increment: "PATCH"
|
||||||
|
|
||||||
|
trigger-release:
|
||||||
|
needs: [bump-version]
|
||||||
|
if: needs.bump-version.outputs.new_tag != ''
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Trigger release workflow
|
||||||
|
uses: peter-evans/repository-dispatch@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
event-type: trigger-release
|
||||||
|
client-payload: '{"tag": "${{ needs.bump-version.outputs.new_tag }}"}'
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ go.work.sum
|
|||||||
# Environment files
|
# Environment files
|
||||||
.env
|
.env
|
||||||
**/*.env
|
**/*.env
|
||||||
|
**/sonr.log
|
||||||
|
|
||||||
|
|
||||||
# Terraform
|
# Terraform
|
||||||
@@ -60,6 +61,7 @@ override.tf.json
|
|||||||
.terraformrc
|
.terraformrc
|
||||||
terraform.rc
|
terraform.rc
|
||||||
|
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.tmp/
|
.tmp/
|
||||||
|
|||||||
+143
-26
@@ -4,24 +4,161 @@ project_name: sonr
|
|||||||
|
|
||||||
builds:
|
builds:
|
||||||
- id: sonr
|
- id: sonr
|
||||||
goos: [linux, darwin]
|
|
||||||
goarch: [amd64, arm64]
|
|
||||||
main: ./cmd/sonrd
|
main: ./cmd/sonrd
|
||||||
binary: sonrd
|
binary: sonrd
|
||||||
builder: go
|
builder: go
|
||||||
gobinary: go
|
gobinary: go
|
||||||
command: build
|
mod_timestamp: "{{ .CommitTimestamp }}"
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
goamd64:
|
||||||
|
- v1
|
||||||
|
flags:
|
||||||
|
- -mod=readonly
|
||||||
|
- -trimpath
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
- -X github.com/cosmos/cosmos-sdk/version.Name=sonr
|
||||||
|
- -X github.com/cosmos/cosmos-sdk/version.AppName=sonrd
|
||||||
|
- -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}}
|
||||||
|
- -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
|
||||||
|
- -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"
|
||||||
|
tags:
|
||||||
|
- netgo
|
||||||
|
- ledger
|
||||||
|
|
||||||
|
- id: hway
|
||||||
|
main: ./cmd/hway
|
||||||
|
binary: hway
|
||||||
|
builder: go
|
||||||
|
gobinary: go
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
mod_timestamp: "{{ .CommitTimestamp }}"
|
||||||
|
flags:
|
||||||
|
- -mod=readonly
|
||||||
|
- -trimpath
|
||||||
|
goamd64:
|
||||||
|
- v1
|
||||||
|
tags:
|
||||||
|
- netgo
|
||||||
|
ldflags:
|
||||||
|
- -X main.version={{.Version}}
|
||||||
|
- -X main.commit={{.Commit}}
|
||||||
|
- -X main.date={{.Date}}
|
||||||
archives:
|
archives:
|
||||||
- id: sonr
|
- id: sonr
|
||||||
builds: [sonr]
|
builds: [sonr]
|
||||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
name_template: >-
|
||||||
|
sonr_{{ .Version }}_
|
||||||
|
{{- title .Os }}_{{- if eq .Arch "amd64" }}x86_64
|
||||||
|
{{- else if eq .Arch "386" }}i386
|
||||||
|
{{- else }}{{ .Arch }}{{ end }}
|
||||||
format: tar.gz
|
format: tar.gz
|
||||||
files:
|
files:
|
||||||
- src: README*
|
- src: README*
|
||||||
- src: CHANGELOG*
|
wrap_in_directory: true
|
||||||
|
|
||||||
|
- id: hway
|
||||||
|
builds: [hway]
|
||||||
|
name_template: >-
|
||||||
|
hway_{{ .Version }}_
|
||||||
|
{{- title .Os }}_{{- if eq .Arch "amd64" }}x86_64
|
||||||
|
{{- else if eq .Arch "386" }}i386
|
||||||
|
{{- else }}{{ .Arch }}{{ end }}
|
||||||
|
format: tar.gz
|
||||||
|
files:
|
||||||
|
- src: README*
|
||||||
|
wrap_in_directory: true
|
||||||
|
|
||||||
|
nfpms:
|
||||||
|
- id: hway
|
||||||
|
package_name: hway
|
||||||
|
file_name_template: "{{ .ConventionalFileName }}"
|
||||||
|
builds: [hway]
|
||||||
|
vendor: Sonr
|
||||||
|
homepage: "https://onsonr.dev"
|
||||||
|
maintainer: "Sonr <support@onsonr.dev>"
|
||||||
|
description: "Sonr Highway is a decentralized, permissionless, and censorship-resistant identity network proxy."
|
||||||
|
license: "Apache 2.0"
|
||||||
|
formats:
|
||||||
|
- rpm
|
||||||
|
- deb
|
||||||
|
- apk
|
||||||
|
dependencies:
|
||||||
|
- ipfs
|
||||||
|
contents:
|
||||||
|
- src: README*
|
||||||
|
dst: /usr/share/doc/hway
|
||||||
|
bindir: /usr/bin
|
||||||
|
section: net
|
||||||
|
priority: optional
|
||||||
|
# Add these lines to match build config
|
||||||
|
|
||||||
|
- id: sonr
|
||||||
|
package_name: sonrd
|
||||||
|
file_name_template: "{{ .ConventionalFileName }}"
|
||||||
|
builds: [sonr]
|
||||||
|
vendor: Sonr
|
||||||
|
homepage: "https://onsonr.dev"
|
||||||
|
maintainer: "Sonr <support@onsonr.dev>"
|
||||||
|
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
||||||
|
license: "Apache 2.0"
|
||||||
|
formats:
|
||||||
|
- rpm
|
||||||
|
- deb
|
||||||
|
- apk
|
||||||
|
dependencies:
|
||||||
|
- ipfs
|
||||||
|
contents:
|
||||||
|
- src: README*
|
||||||
|
dst: /usr/share/doc/sonrd
|
||||||
|
bindir: /usr/bin
|
||||||
|
section: net
|
||||||
|
priority: optional
|
||||||
|
# Add these lines to match build config
|
||||||
|
|
||||||
|
brews:
|
||||||
|
- name: hway
|
||||||
|
ids: [hway]
|
||||||
|
commit_author:
|
||||||
|
name: goreleaserbot
|
||||||
|
email: bot@goreleaser.com
|
||||||
|
directory: Formula
|
||||||
|
caveats: "Run a local hway node and access it with the hway proxy"
|
||||||
|
homepage: "https://onsonr.dev"
|
||||||
|
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
||||||
|
dependencies:
|
||||||
|
- name: ipfs
|
||||||
|
repository:
|
||||||
|
owner: onsonr
|
||||||
|
name: homebrew-tap
|
||||||
|
branch: master
|
||||||
|
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
|
||||||
|
|
||||||
|
- name: sonr
|
||||||
|
ids: [sonr]
|
||||||
|
commit_author:
|
||||||
|
name: goreleaserbot
|
||||||
|
email: bot@goreleaser.com
|
||||||
|
directory: Formula
|
||||||
|
caveats: "Run a local sonr node and access it with the hway proxy"
|
||||||
|
homepage: "https://onsonr.dev"
|
||||||
|
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
||||||
|
dependencies:
|
||||||
|
- name: ipfs
|
||||||
|
repository:
|
||||||
|
owner: onsonr
|
||||||
|
name: homebrew-tap
|
||||||
|
branch: master
|
||||||
|
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
|
||||||
|
|
||||||
release:
|
release:
|
||||||
github:
|
github:
|
||||||
@@ -32,27 +169,7 @@ release:
|
|||||||
replace_existing_draft: true
|
replace_existing_draft: true
|
||||||
replace_existing_artifacts: true
|
replace_existing_artifacts: true
|
||||||
extra_files:
|
extra_files:
|
||||||
- glob: ./CHANGELOG*
|
|
||||||
- glob: ./README*
|
- glob: ./README*
|
||||||
- glob: ./LICENSE*
|
|
||||||
|
|
||||||
brews:
|
|
||||||
- name: sonr
|
|
||||||
ids: [sonr]
|
|
||||||
commit_author:
|
|
||||||
name: goreleaserbot
|
|
||||||
email: bot@goreleaser.com
|
|
||||||
directory: Formula
|
|
||||||
caveats: "Run a local sonr node and access it with the hway proxy"
|
|
||||||
homepage: "https://sonr.io/"
|
|
||||||
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
|
||||||
dependencies:
|
|
||||||
- name: ipfs
|
|
||||||
repository:
|
|
||||||
owner: onsonr
|
|
||||||
name: homebrew-tap
|
|
||||||
branch: master
|
|
||||||
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
|
|
||||||
|
|
||||||
announce:
|
announce:
|
||||||
telegram:
|
telegram:
|
||||||
|
|||||||
-498
@@ -1,498 +0,0 @@
|
|||||||
## v0.5.20 (2024-12-07)
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- simplify CI workflow by removing redundant asset publishing steps
|
|
||||||
|
|
||||||
## v0.5.19 (2024-12-06)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add support for parent field and resources list in Capability message
|
|
||||||
- add fast reflection methods for Capability and Resource
|
|
||||||
- add gum package and update devbox configuration
|
|
||||||
- add new button components and layout improvements
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- adjust fullscreen modal close button margin
|
|
||||||
- update devbox lockfile
|
|
||||||
- resolve rendering issue in login modal
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- rename accaddr package to address
|
|
||||||
- Update Credential table to match WebAuthn Credential Descriptor
|
|
||||||
- Deployment setup
|
|
||||||
- migrate build system from Taskfile to Makefile
|
|
||||||
- rename Assertion to Account and update related code
|
|
||||||
- remove unused TUI components
|
|
||||||
- Move IPFS interaction functions to common package
|
|
||||||
- remove dependency on DWN.pkl
|
|
||||||
- remove unused dependencies and simplify module imports
|
|
||||||
- Rename x/vault -> x/dwn and x/service -> x/svc
|
|
||||||
- move resolver formatter to services package
|
|
||||||
- remove web documentation
|
|
||||||
- update devbox configuration and scripts
|
|
||||||
- rename layout component to root
|
|
||||||
- refactor authentication pages into their own modules
|
|
||||||
- update templ version to v0.2.778 and remove unused air config
|
|
||||||
- move signer implementation to mpc package
|
|
||||||
|
|
||||||
## v0.5.18 (2024-11-06)
|
|
||||||
|
|
||||||
## v0.5.17 (2024-11-05)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add remote client constructor
|
|
||||||
- add avatar image components
|
|
||||||
- add SVG CDN Illustrations to marketing architecture
|
|
||||||
- **marketing**: refactor marketing page components
|
|
||||||
- Refactor intro video component to use a proper script template
|
|
||||||
- Move Alpine.js script initialization to separate component
|
|
||||||
- Add intro video modal component
|
|
||||||
- add homepage architecture section
|
|
||||||
- add Hero section component with stats and buttons
|
|
||||||
- **css**: add new utility classes for group hover
|
|
||||||
- implement authentication register finish endpoint
|
|
||||||
- add controller creation step to allocate
|
|
||||||
- Update service module README based on protobuf files
|
|
||||||
- Update x/macaroon/README.md with details from protobuf files
|
|
||||||
- update Vault README with details from proto files
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update file paths in error messages
|
|
||||||
- update intro video modal script
|
|
||||||
- include assets generation in wasm build
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- update marketing section architecture
|
|
||||||
- change verification table id
|
|
||||||
- **proto**: remove macaroon proto
|
|
||||||
- rename ValidateBasic to Validate
|
|
||||||
- rename session cookie key
|
|
||||||
- remove unused sync-initial endpoint
|
|
||||||
- remove formatter.go from service module
|
|
||||||
|
|
||||||
## v0.5.16 (2024-10-21)
|
|
||||||
|
|
||||||
## v0.5.15 (2024-10-21)
|
|
||||||
|
|
||||||
## v0.5.14 (2024-10-21)
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- remove StakingKeeper dependency from GlobalFeeDecorator
|
|
||||||
|
|
||||||
## v0.5.13 (2024-10-21)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add custom secp256k1 pubkey
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- update gRPC client to use new request types
|
|
||||||
- use RawPublicKey instead of PublicKey in macaroon issuer
|
|
||||||
- improve error handling in DID module
|
|
||||||
|
|
||||||
## v0.5.12 (2024-10-18)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add User-Agent and Platform to session
|
|
||||||
- introduce AuthState enum for authentication state
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- **version**: revert version bump to 0.5.11
|
|
||||||
- **version**: update version to 0.5.12
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- remove dependency on proto change detection
|
|
||||||
- update asset publishing configuration
|
|
||||||
|
|
||||||
## v0.5.11 (2024-10-10)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- nebula assets served from CDN
|
|
||||||
- use CDN for nebula frontend assets
|
|
||||||
- add static hero section content to homepage
|
|
||||||
- add wrangler scripts for development, build, and deployment
|
|
||||||
- remove build configuration
|
|
||||||
- move gateway web code to dedicated directory
|
|
||||||
- add PubKey fast reflection
|
|
||||||
- **macaroon**: add transaction allowlist/denylist caveats
|
|
||||||
- add PR labeler
|
|
||||||
- **devbox**: remove hway start command
|
|
||||||
- add GitHub Actions workflow for running tests
|
|
||||||
- add workflow for deploying Hway to Cloudflare Workers
|
|
||||||
- Publish configs to R2
|
|
||||||
- integrate nebula UI with worker-assets-gen
|
|
||||||
- extract reusable layout components
|
|
||||||
- Implement service worker for IPFS vault
|
|
||||||
- implement CDN support for assets
|
|
||||||
- add payment method support
|
|
||||||
- add support for public key management
|
|
||||||
- add ModalForm component
|
|
||||||
- add LoginStart and RegisterStart routes
|
|
||||||
- implement authentication views
|
|
||||||
- add json tags to config structs
|
|
||||||
- implement templ forms for consent privacy, credential assert, credential register, and profile details
|
|
||||||
- **vault**: introduce assembly of the initial vault
|
|
||||||
- add client logos to homepage
|
|
||||||
- add tailwind utility classes
|
|
||||||
- implement new profile card component
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- Correct source directory for asset publishing
|
|
||||||
- install dependencies before nebula build
|
|
||||||
- update Schema service to use new API endpoint
|
|
||||||
- fix broken logo image path
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- remove unnecessary branch configuration from scheduled release workflow
|
|
||||||
- update dwn configuration generation import path
|
|
||||||
- use nebula/routes instead of nebula/global
|
|
||||||
- move index template to routes package
|
|
||||||
- remove cdn package and move assets to global styles
|
|
||||||
- move nebula assets to hway build directory
|
|
||||||
- remove docker build and deployment
|
|
||||||
- rename internal/session package to internal/ctx
|
|
||||||
- remove unused fields from
|
|
||||||
- rename PR_TEMPLATE to PULL_REQUEST_TEMPLATE
|
|
||||||
- remove devbox.json init hook
|
|
||||||
- rename sonrd dockerfile to Dockerfile
|
|
||||||
- remove unused dependency
|
|
||||||
- rename 'global/cdn' to 'assets'
|
|
||||||
- move CDN assets to separate folder
|
|
||||||
- move Pkl module definitions to dedicated package
|
|
||||||
- move CDN assets to js/ folder
|
|
||||||
- remove unused component templates
|
|
||||||
- move ui components to global
|
|
||||||
- move view handlers to router package
|
|
||||||
|
|
||||||
## v0.5.10 (2024-10-07)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- **blocks**: remove button component
|
|
||||||
|
|
||||||
## v0.5.9 (2024-10-06)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add Motr support
|
|
||||||
- update UIUX PKL to utilize optional fields
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- Update source directory for asset publishing
|
|
||||||
|
|
||||||
## v0.5.8 (2024-10-04)
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- Remove unused logs configuration
|
|
||||||
|
|
||||||
## v0.5.7 (2024-10-04)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- **devbox**: use process-compose for testnet services
|
|
||||||
- remove motr.mjs dependency
|
|
||||||
- add markdown rendering to issue templates
|
|
||||||
- update issue templates for better clarity
|
|
||||||
- add issue templates for tracking and task issues
|
|
||||||
- add issue templates for bug report and tracking
|
|
||||||
- introduce docker-compose based setup
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- update issue template headings
|
|
||||||
- rename bug-report issue template to bug
|
|
||||||
|
|
||||||
## v0.5.6 (2024-10-03)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add hway and sonr processes to dev environment
|
|
||||||
|
|
||||||
## v0.5.5 (2024-10-03)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add rudimentary DidController table
|
|
||||||
- update home section with new features
|
|
||||||
- introduce Home model and refactor views
|
|
||||||
- **nebula**: create Home model for home page
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- reorganize pkl files for better separation of concerns
|
|
||||||
- rename msg_server_test.go to rpc_test.go
|
|
||||||
|
|
||||||
## v0.5.4 (2024-10-02)
|
|
||||||
|
|
||||||
## v0.5.3 (2024-10-02)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- remove unnecessary telegram message template
|
|
||||||
|
|
||||||
## v0.5.2 (2024-10-02)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- **service**: integrate group module (#1104)
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- revert version bump to 0.5.1
|
|
||||||
|
|
||||||
## v0.5.1 (2024-10-02)
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- move Motr API to state package
|
|
||||||
|
|
||||||
## v0.5.0 (2024-10-02)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- allow multiple macaroons with the same id
|
|
||||||
|
|
||||||
## v0.4.5 (2024-10-02)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- use correct secret for docker login
|
|
||||||
|
|
||||||
## v0.4.4 (2024-10-02)
|
|
||||||
|
|
||||||
## v0.4.3 (2024-10-02)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- **release**: add docker images for sonrd and motr
|
|
||||||
- update homepage with new visual design
|
|
||||||
- add DID to vault genesis schema
|
|
||||||
- add video component
|
|
||||||
- add video component
|
|
||||||
- add hx-get attribute to primary button in hero section
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- **layout**: add missing favicon
|
|
||||||
- **hero**: Use hx-swap for primary button to prevent flicker
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- use single GITHUB_TOKEN for release workflow
|
|
||||||
- update workflow variables
|
|
||||||
|
|
||||||
## v0.4.2 (2024-10-01)
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- use single GITHUB_TOKEN for release workflow
|
|
||||||
|
|
||||||
## v0.4.1 (2024-10-01)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- Implement session management
|
|
||||||
- allow manual release triggers
|
|
||||||
- add Input and RegistrationForm models
|
|
||||||
- add new utility classes
|
|
||||||
- add login and registration pages
|
|
||||||
- add tailwindcss utilities
|
|
||||||
- add support for ARM64 architecture
|
|
||||||
- add DWN resolver field
|
|
||||||
- add stats section to homepage
|
|
||||||
- implement hero section using Pkl
|
|
||||||
- add PKL schema for message formats
|
|
||||||
- add Homebrew tap for sonr
|
|
||||||
- update release workflow to use latest tag
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- **version**: update version number to 0.4.0
|
|
||||||
- update release workflow to use latest tag
|
|
||||||
- **versioning**: revert version to 0.9.0
|
|
||||||
- **cta**: Fix typo in CTA title
|
|
||||||
- change bento section title to reflect security focus
|
|
||||||
- adjust hero image dimensions
|
|
||||||
- **Input**: Change type from to
|
|
||||||
- update hero image height in config.pkl
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- move home page sections to home package
|
|
||||||
- rename motrd to motr
|
|
||||||
- update hero image dimensions
|
|
||||||
- move nebula configuration to static file
|
|
||||||
- rename buf-publish.yml to publish-assets.yml
|
|
||||||
- remove unused field from
|
|
||||||
|
|
||||||
## v0.4.0 (2024-09-30)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- **dwn**: add wasm build for dwn
|
|
||||||
- add macaroon and oracle genesis states
|
|
||||||
- add scheduled binary release workflow
|
|
||||||
- introduce process-compose for process management
|
|
||||||
- add counter animation to hero section
|
|
||||||
- add registration page
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- Enable scheduled release workflow
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- remove old changelog entries
|
|
||||||
- remove unnecessary checkout in scheduled-release workflow
|
|
||||||
- rename build ID to sonr
|
|
||||||
- remove unnecessary release existence check
|
|
||||||
- move dwn wasm build to pkg directory
|
|
||||||
|
|
||||||
## v0.3.1 (2024-09-29)
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- move nebula/pages to pkg/nebula/pages
|
|
||||||
|
|
||||||
## v0.3.0 (2024-09-29)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add buf.lock for proto definitions
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- remove unused linting rules
|
|
||||||
- update proto breaking check target to master branch
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- remove unused lock files and configurations
|
|
||||||
|
|
||||||
## v0.2.0 (2024-09-29)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- disable goreleaser workflow
|
|
||||||
- update workflows to include master branch
|
|
||||||
- remove global style declaration
|
|
||||||
- **oracle**: add oracle module
|
|
||||||
- optimize IPFS configuration for better performance
|
|
||||||
- add local IPFS bootstrap script and refactor devbox config
|
|
||||||
- add AllocateVault HTTP endpoint
|
|
||||||
- add WebAuthn credential management functionality
|
|
||||||
- remove unused coins interface
|
|
||||||
- remove global integrity proof from genesis state
|
|
||||||
- add vault module
|
|
||||||
- enable buf.build publishing on master and develop branches
|
|
||||||
- add Gitflow workflow for syncing branches
|
|
||||||
- add automated production release workflow
|
|
||||||
- **ui**: implement profile page
|
|
||||||
- add automated production release workflow
|
|
||||||
- **did**: remove unused proto files
|
|
||||||
- add enums.pulsar.go file for PermissionScope enum (#4)
|
|
||||||
- add initial DID implementation
|
|
||||||
- remove builder interface
|
|
||||||
- add basic UI for block explorer
|
|
||||||
- add Usage: pkl [OPTIONS] COMMAND [ARGS]...
|
|
||||||
- use SQLite embedded driver
|
|
||||||
- add DID method for each coin
|
|
||||||
- Expand KeyType enum and update KeyInfo message in genesis.proto
|
|
||||||
- Add whitelisted key types to genesis params
|
|
||||||
- Add DID grants protobuf definition
|
|
||||||
- Add fields to KeyInfo struct to distinguish CBOR and standard blockchain key types
|
|
||||||
- Add new message types for AssetInfo, ChainInfo, Endpoint, ExplorerInfo, FeeInfo, and KeyInfo
|
|
||||||
- run sonr-node container in testnet network and make network external
|
|
||||||
- Add docker-compose.yaml file to start a Sonr testnet node
|
|
||||||
- configure Sonr testnet environment
|
|
||||||
- Update Dockerfile to start and run a testnet
|
|
||||||
- add Equal methods for AssetInfo and ChainInfo types
|
|
||||||
- Add ProveWitness and SyncVault RPCs
|
|
||||||
- Add MsgRegisterService to handle service registration
|
|
||||||
- Add MsgRegisterService to handle service registration
|
|
||||||
- add enums.pulsar.go file for PermissionScope enum
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- ensure go version is up-to-date
|
|
||||||
- use GITHUB_TOKEN for version bump workflow
|
|
||||||
- update account table interface to use address, chain and network
|
|
||||||
- **ci**: update docker vm release workflow with new token
|
|
||||||
- use mnemonic phrases for test account keys
|
|
||||||
- reduce motr proxy shutdown timeout
|
|
||||||
- **nebula**: use bunx for tailwindcss build
|
|
||||||
- **proto**: update protobuf message index numbers
|
|
||||||
- **ante**: reduce POA rate floor and ceiling
|
|
||||||
- Update proc_list_width in mprocs.yaml
|
|
||||||
- Add service to database when registering
|
|
||||||
- pin added did documents to local ipfs node
|
|
||||||
- remove extra spaces in typeUrl
|
|
||||||
- **release**: remove unnecessary quotes in tag pattern
|
|
||||||
- remove unused imports and simplify KeyInfo message
|
|
||||||
- bind node ports to localhost
|
|
||||||
- Update docker-compose network name to dokploy-network
|
|
||||||
- Update network name to dokploy
|
|
||||||
- remove unused port mapping
|
|
||||||
- Update docker-compose.yaml to use correct volume path
|
|
||||||
- update docker-compose volume name
|
|
||||||
- Update docker-compose.yaml to use shell directly for sonrd command
|
|
||||||
- replace "sh" with "/bin/sh" in docker-compose.yaml command
|
|
||||||
- Update runner image dependencies for debian-11
|
|
||||||
- **deps**: update golang image to 1.21
|
|
||||||
- **chains**: update nomic chain build target
|
|
||||||
- Remove unused `Meta` message from `genesis.proto`
|
|
||||||
- Add ProveWitness and SyncVault RPCs
|
|
||||||
|
|
||||||
### Refactor
|
|
||||||
|
|
||||||
- adjust source directory for config files (#1102)
|
|
||||||
- Use actions/checkout@v4
|
|
||||||
- remove unused master branch from CI workflow
|
|
||||||
- rename github token secret
|
|
||||||
- remove unnecessary x-cloak styles
|
|
||||||
- optimize oracle genesis proto
|
|
||||||
- remove unused code related to whitelisted assets
|
|
||||||
- update buf publish source directory
|
|
||||||
- adjust devbox configuration to reflect nebula changes
|
|
||||||
- rename msg_server.go to rpc.go
|
|
||||||
- remove devbox integration
|
|
||||||
- move dwn package to app/config
|
|
||||||
- move configuration files to app directory
|
|
||||||
- extract root command creation to separate file
|
|
||||||
- move ipfs setup to function
|
|
||||||
- remove unnecessary proxy config
|
|
||||||
- rename script to
|
|
||||||
- move DWN proxy server logic to separate file
|
|
||||||
- use htmx instead of dwn for vault client
|
|
||||||
- remove unused environment variables
|
|
||||||
- simplify verification method structure
|
|
||||||
- use staking keeper in DID keeper
|
|
||||||
- remove unused dependencies
|
|
||||||
- remove unused image building workflow
|
|
||||||
- add field to
|
|
||||||
- Update KeyKind Enum to have proper naming conventions
|
|
||||||
- Update `DIDNamespace` to have proper naming convention
|
|
||||||
- expose ports directly in docker-compose
|
|
||||||
- remove unused port mappings
|
|
||||||
- streamline script execution
|
|
||||||
- use CMD instead of ENTRYPOINT in Dockerfile
|
|
||||||
- **deps**: Upgrade Debian base image to 11
|
|
||||||
- Simplify the types and properties to keep a consistent structure for the blockchain
|
|
||||||
- remove PERMISSION_SCOPE_IDENTIFIERS_ENS enum value
|
|
||||||
@@ -8,9 +8,14 @@ SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
|
|||||||
BINDIR ?= $(GOPATH)/bin
|
BINDIR ?= $(GOPATH)/bin
|
||||||
SIMAPP = ./app
|
SIMAPP = ./app
|
||||||
|
|
||||||
|
PC_PORT_NUM=42069
|
||||||
|
PC_LOG_FILE=./sonr.log
|
||||||
|
PC_SOCKET_PATH=/tmp/sonr-net.sock
|
||||||
|
|
||||||
# for dockerized protobuf tools
|
# for dockerized protobuf tools
|
||||||
DOCKER := $(shell which docker)
|
DOCKER := $(shell which docker)
|
||||||
HTTPS_GIT := github.com/onsonr/sonr.git
|
HTTPS_GIT := github.com/onsonr/sonr.git
|
||||||
|
PROCESS_COMPOSE := $(shell which process-compose)
|
||||||
|
|
||||||
export GO111MODULE = on
|
export GO111MODULE = on
|
||||||
|
|
||||||
@@ -115,13 +120,17 @@ clean:
|
|||||||
rm -rf .aider*
|
rm -rf .aider*
|
||||||
rm -rf static
|
rm -rf static
|
||||||
rm -rf .out
|
rm -rf .out
|
||||||
rm -rf build
|
|
||||||
rm -rf hway.db
|
rm -rf hway.db
|
||||||
rm -rf snapcraft-local.yaml build/
|
rm -rf snapcraft-local.yaml build/
|
||||||
|
rm -rf build
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf vendor/
|
rm -rf vendor/
|
||||||
|
|
||||||
|
init-env:
|
||||||
|
@echo "Installing process-compose"
|
||||||
|
sh scripts/init_env.sh
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
@@ -175,7 +184,6 @@ format: format-tools
|
|||||||
|
|
||||||
mod-tidy:
|
mod-tidy:
|
||||||
go mod tidy
|
go mod tidy
|
||||||
cd interchaintest && go mod tidy
|
|
||||||
|
|
||||||
.PHONY: format-tools lint format mod-tidy
|
.PHONY: format-tools lint format mod-tidy
|
||||||
|
|
||||||
@@ -298,51 +306,66 @@ sh-testnet: mod-tidy
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
### generation ###
|
### generation ###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
.PHONY: pkl-gen tailwind-gen templ-gen
|
.PHONY: gen-pkl gen-templ
|
||||||
|
|
||||||
pkl-gen:
|
gen-pkl: init-env
|
||||||
go install github.com/apple/pkl-go/cmd/pkl-gen-go@latest
|
pkl-gen-go pkl/sonr.orm/UCAN.pkl
|
||||||
pkl-gen-go pkl/sonr.motr/ATN.pkl
|
pkl-gen-go pkl/sonr.orm/Models.pkl
|
||||||
pkl-gen-go pkl/sonr.hway/Env.pkl
|
pkl-gen-go pkl/sonr.net/Hway.pkl
|
||||||
pkl-gen-go pkl/sonr.motr/DWN.pkl
|
pkl-gen-go pkl/sonr.net/Motr.pkl
|
||||||
pkl-gen-go pkl/sonr.hway/ORM.pkl
|
|
||||||
|
|
||||||
templ-gen:
|
gen-templ: init-env
|
||||||
@go install github.com/a-h/templ/cmd/templ@latest
|
|
||||||
templ generate
|
templ generate
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
### custom builds ###
|
### custom builds ###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
.PHONY: motr-build hway-build hway-serve
|
.PHONY: build-motr build-hway logs-hway logs-sonr
|
||||||
|
|
||||||
motr-build:
|
build-motr:
|
||||||
GOOS=js GOARCH=wasm go build -o static/wasm/app.wasm ./cmd/motr/main.go
|
GOOS=js GOARCH=wasm go build -o static/wasm/app.wasm ./cmd/motr/main.go
|
||||||
|
|
||||||
hway-build: templ-gen
|
build-hway: gen-templ
|
||||||
go build -o build/hway ./cmd/hway/main.go
|
go build -o build/hway ./cmd/hway
|
||||||
|
|
||||||
hway-serve: hway-build
|
logs-hway: init-env
|
||||||
./build/hway
|
bin/process-compose process logs hway --port $(PC_PORT_NUM) --follow
|
||||||
|
|
||||||
|
logs-sonr: init-env
|
||||||
|
bin/process-compose process logs sonr --port $(PC_PORT_NUM) --follow
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
### Network Start/Stop ###
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
.PHONY: deploy start start-tui start-uds stop stop-uds restart status
|
||||||
|
|
||||||
|
start: build-hway init-env
|
||||||
|
bin/process-compose up --port $(PC_PORT_NUM) --log-file $(PC_LOG_FILE) -f deploy/process-compose.yaml
|
||||||
|
|
||||||
|
start-uds: build-hway init-env
|
||||||
|
bin/process-compose up --use-uds --unix-socket $(PC_SOCKET_PATH) --log-file $(PC_LOG_FILE) --detached -f deploy/process-compose.yaml
|
||||||
|
|
||||||
|
stop: init-env
|
||||||
|
bin/process-compose down --port $(PC_PORT_NUM)
|
||||||
|
|
||||||
|
stop-uds: init-env
|
||||||
|
bin/process-compose down --use-uds --unix-socket $(PC_SOCKET_PATH)
|
||||||
|
|
||||||
|
status: init-env
|
||||||
|
bin/process-compose project state --port $(PC_PORT_NUM)
|
||||||
|
|
||||||
|
status-uds: init-env
|
||||||
|
bin/process-compose project state --use-uds --unix-socket $(PC_SOCKET_PATH)
|
||||||
###############################################################################
|
###############################################################################
|
||||||
### help ###
|
### help ###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
.PHONY: deploy-buf deploy-pkl
|
|
||||||
|
|
||||||
deploy-buf:
|
deploy:
|
||||||
cd ./proto && bunx buf dep update && bunx buf build && bunx buf push
|
cd ./proto && bunx buf dep update && bunx buf build && bunx buf push
|
||||||
|
|
||||||
deploy-pkl:
|
|
||||||
sh ./.github/scripts/upload_cdn.sh
|
sh ./.github/scripts/upload_cdn.sh
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
### help ###
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Usage: make <target>"
|
@echo "Usage: make <target>"
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
[](https://sonr.io)
|
[](https://sonr.io)
|
||||||
[](https://goreportcard.com/report/github.com/onsonr/sonr)
|
[](https://goreportcard.com/report/github.com/onsonr/sonr)
|
||||||
[](https://sonarcloud.io/summary/new_code?id=sonr-io_sonr)
|
[](https://sonarcloud.io/summary/new_code?id=sonr-io_sonr)
|
||||||
|
[](https://cloudsmith.io/~sonr/repos/sonr/packages/detail/deb/sonrd/latest/a=amd64;xc=main;d=ubuntu%252Fxenial;t=binary/)
|
||||||
|
|
||||||
> Sonr is a combination of decentralized primitives. Fundamentally, it is a peer-to-peer identity and asset management system that leverages DID documents, Webauthn, and IPFS—providing users with a secure, portable decentralized identity.
|
> Sonr is a combination of decentralized primitives. Fundamentally, it is a peer-to-peer identity and asset management system that leverages DID documents, Webauthn, and IPFS—providing users with a secure, portable decentralized identity.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Command line flags
|
||||||
|
var (
|
||||||
|
servePort int // Gateway http entry point (default 3000)
|
||||||
|
chainID string // Current chain ID (default sonr-testnet-1)
|
||||||
|
ipfsGatewayURL string // IPFS gateway URL (default localhost:8080)
|
||||||
|
sonrAPIURL string // Sonr API URL (default localhost:1317)
|
||||||
|
sonrGrpcURL string // Sonr gRPC URL (default localhost:9090)
|
||||||
|
sonrRPCURL string // Sonr RPC URL (default localhost:26657)
|
||||||
|
|
||||||
|
sqliteFile string // SQLite database file (default hway.db)
|
||||||
|
psqlHost string // PostgresSQL Host Flag
|
||||||
|
psqlUser string // PostgresSQL User Flag
|
||||||
|
psqlPass string // PostgresSQL Password Flag
|
||||||
|
psqlDB string // PostgresSQL Database Flag
|
||||||
|
)
|
||||||
|
|
||||||
|
func rootCmd() *cobra.Command {
|
||||||
|
cmd := &cobra.Command{
|
||||||
|
Use: "hway",
|
||||||
|
Short: "Sonr DID gateway",
|
||||||
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
env, err := loadEnvImplFromArgs(args)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
db, ipc, err := initDeps(env)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
e, err := setupServer(env, db, ipc)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
if err := e.Start(fmt.Sprintf(":%d", env.GetServePort())); err != http.ErrServerClosed {
|
||||||
|
log.Fatal(err)
|
||||||
|
os.Exit(1)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
cmd.Flags().IntVar(&servePort, "serve-port", 3000, "Port to serve the gateway on")
|
||||||
|
cmd.Flags().StringVar(&chainID, "chain-id", "sonr-testnet-1", "Chain ID")
|
||||||
|
cmd.Flags().StringVar(&ipfsGatewayURL, "ipfs-gateway-url", "localhost:8080", "IPFS gateway URL")
|
||||||
|
cmd.Flags().StringVar(&sonrAPIURL, "sonr-api-url", "localhost:1317", "Sonr API URL")
|
||||||
|
cmd.Flags().StringVar(&sonrGrpcURL, "sonr-grpc-url", "localhost:9090", "Sonr gRPC URL")
|
||||||
|
cmd.Flags().StringVar(&sonrRPCURL, "sonr-rpc-url", "localhost:26657", "Sonr RPC URL")
|
||||||
|
cmd.Flags().StringVar(&sqliteFile, "sqlite-file", "hway.db", "File to store sqlite database")
|
||||||
|
cmd.Flags().StringVar(&psqlHost, "psql-host", "", "PostgresSQL Host")
|
||||||
|
cmd.Flags().StringVar(&psqlUser, "psql-user", "", "PostgresSQL User")
|
||||||
|
cmd.Flags().StringVar(&psqlPass, "psql-pass", "", "PostgresSQL Password")
|
||||||
|
cmd.Flags().StringVar(&psqlDB, "psql-db", "", "PostgresSQL Database")
|
||||||
|
return cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
func formatPsqlDSN() string {
|
||||||
|
if psqlHost == "" {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return fmt.Sprintf("host=%s user=%s password=%s dbname=%s sslmode=disable", psqlHost, psqlUser, psqlPass, psqlDB)
|
||||||
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
amends "https://pkl.sh/sonr.hway/0.0.3/Env.pkl"
|
|
||||||
+49
-35
@@ -3,56 +3,70 @@ package main
|
|||||||
import (
|
import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"net/http"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/labstack/echo-contrib/echoprometheus"
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/labstack/echo/v4/middleware"
|
"github.com/labstack/echo/v4/middleware"
|
||||||
"github.com/onsonr/sonr/crypto/ucan"
|
"github.com/onsonr/sonr/crypto/ucan"
|
||||||
"github.com/onsonr/sonr/pkg/common/ipfs"
|
"github.com/onsonr/sonr/internal/gateway"
|
||||||
"github.com/onsonr/sonr/pkg/common/producer"
|
config "github.com/onsonr/sonr/pkg/config/hway"
|
||||||
"github.com/onsonr/sonr/pkg/gateway"
|
"github.com/onsonr/sonr/pkg/didauth/producer"
|
||||||
"github.com/onsonr/sonr/pkg/gateway/config"
|
"github.com/onsonr/sonr/pkg/ipfsapi"
|
||||||
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed config.pkl
|
// main is the entry point for the application
|
||||||
var configBz []byte
|
func main() {
|
||||||
|
cmd := rootCmd()
|
||||||
|
if err := cmd.Execute(); err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
func loadConfig() (config.Env, error) {
|
func initDeps(env config.Hway) (*gorm.DB, ipfsapi.Client, error) {
|
||||||
return config.LoadFromBytes(configBz)
|
db, err := gateway.NewDB(env)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
ipc, err := ipfsapi.NewClient()
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return db, ipc, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func loadEnvImplFromArgs(args []string) (config.Hway, error) {
|
||||||
|
cmd := rootCmd()
|
||||||
|
if err := cmd.ParseFlags(args); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
env := &config.HwayImpl{
|
||||||
|
ServePort: servePort,
|
||||||
|
SqliteFile: sqliteFile,
|
||||||
|
ChainId: chainID,
|
||||||
|
IpfsGatewayUrl: ipfsGatewayURL,
|
||||||
|
SonrApiUrl: sonrAPIURL,
|
||||||
|
SonrGrpcUrl: sonrGrpcURL,
|
||||||
|
SonrRpcUrl: sonrRPCURL,
|
||||||
|
PsqlDSN: formatPsqlDSN(),
|
||||||
|
}
|
||||||
|
return env, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// setupServer sets up the server
|
// setupServer sets up the server
|
||||||
func setupServer(env config.Env) (*echo.Echo, error) {
|
func setupServer(env config.Hway, db *gorm.DB, ipc ipfsapi.Client) (*echo.Echo, error) {
|
||||||
ipc, err := ipfs.NewClient()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
e := echo.New()
|
e := echo.New()
|
||||||
|
e.Use(echoprometheus.NewMiddleware("hway"))
|
||||||
e.IPExtractor = echo.ExtractIPDirect()
|
e.IPExtractor = echo.ExtractIPDirect()
|
||||||
e.Use(middleware.Logger())
|
e.Use(middleware.Logger())
|
||||||
e.Use(middleware.Recover())
|
e.Use(middleware.Recover())
|
||||||
e.Use(producer.Middleware(ipc, ucan.ServicePermissions))
|
e.Use(producer.Middleware(ipc, ucan.ServicePermissions))
|
||||||
gateway.RegisterRoutes(e, env)
|
gateway.RegisterRoutes(e, env, db)
|
||||||
return e, nil
|
return e, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// main is the entry point for the application
|
|
||||||
func main() {
|
|
||||||
env, err := loadConfig()
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
e, err := setupServer(env)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := e.Start(fmt.Sprintf(":%d", env.GetServePort())); err != http.ErrServerClosed {
|
|
||||||
log.Fatal(err)
|
|
||||||
os.Exit(1)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
+9
-9
@@ -8,15 +8,15 @@ import (
|
|||||||
"syscall/js"
|
"syscall/js"
|
||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/cmd/motr/internal"
|
"github.com/onsonr/sonr/internal/vault"
|
||||||
"github.com/onsonr/sonr/pkg/common/controller"
|
"github.com/onsonr/sonr/pkg/common/wasm"
|
||||||
"github.com/onsonr/sonr/pkg/vault"
|
"github.com/onsonr/sonr/pkg/config/motr"
|
||||||
"github.com/onsonr/sonr/pkg/vault/types"
|
// "github.com/onsonr/sonr/pkg/didauth/controller"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
env *types.Environment
|
env *motr.Environment
|
||||||
config *types.Config
|
config *motr.Config
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -48,8 +48,8 @@ func main() {
|
|||||||
js.Global().Set("processConfig", js.FuncOf(processConfig))
|
js.Global().Set("processConfig", js.FuncOf(processConfig))
|
||||||
|
|
||||||
e := echo.New()
|
e := echo.New()
|
||||||
e.Use(internal.WasmContextMiddleware)
|
e.Use(wasm.ContextMiddleware)
|
||||||
e.Use(controller.Middleware(nil))
|
// e.Use(controller.Middleware(nil))
|
||||||
vault.RegisterRoutes(e, config)
|
vault.RegisterRoutes(e, config)
|
||||||
internal.ServeFetch(e)
|
wasm.ServeFetch(e)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/apple/pkl-go/pkl"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
var configDir string
|
||||||
|
|
||||||
|
func newPklInitCmd() *cobra.Command {
|
||||||
|
cmd := &cobra.Command{
|
||||||
|
Use: "init-pkl",
|
||||||
|
Short: "Initialize the Sonrd configuration using PKL",
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
ctx := context.Background()
|
||||||
|
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer evaluator.Close()
|
||||||
|
|
||||||
|
appPath := formatConfigPath(cmd, "app.toml")
|
||||||
|
configPath := formatConfigPath(cmd, "config.toml")
|
||||||
|
|
||||||
|
// Create app.toml
|
||||||
|
if err := createAppToml(evaluator, appPath); err != nil {
|
||||||
|
cmd.PrintErrf("Failed to create app.toml: %v\n", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
cmd.Printf("Successfully created %s\n", appPath)
|
||||||
|
|
||||||
|
// Create config.toml
|
||||||
|
if err := createConfigToml(evaluator, configPath); err != nil {
|
||||||
|
cmd.PrintErrf("Failed to create config.toml: %v\n", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
cmd.Printf("Successfully created %s\n", configPath)
|
||||||
|
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
}
|
||||||
|
cmd.Flags().StringVar(&configDir, "config-dir", "~/.sonr/config", "Path to where pkl files should be output")
|
||||||
|
return cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
func createAppToml(evaluator pkl.Evaluator, path string) error {
|
||||||
|
appSource := pkl.UriSource("https://pkl.sh/sonr.chain/0.0.2/App.pkl")
|
||||||
|
res, err := evaluator.EvaluateOutputText(context.Background(), appSource)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
log.Printf("res: %s", res)
|
||||||
|
return writeConfigFile(path, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func createConfigToml(evaluator pkl.Evaluator, path string) error {
|
||||||
|
configSource := pkl.UriSource("https://pkl.sh/sonr.chain/0.0.2/Config.pkl")
|
||||||
|
res, err := evaluator.EvaluateOutputText(context.Background(), configSource)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
log.Printf("res: %s", res)
|
||||||
|
return writeConfigFile(path, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func formatConfigPath(cmd *cobra.Command, fileName string) string {
|
||||||
|
configDir := cmd.Flag("config-dir").Value.String()
|
||||||
|
// Expand home directory if needed
|
||||||
|
if configDir[:2] == "~/" {
|
||||||
|
home, err := os.UserHomeDir()
|
||||||
|
if err == nil {
|
||||||
|
configDir = filepath.Join(home, configDir[2:])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return filepath.Join(configDir, fileName)
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeConfigFile(path string, content string) error {
|
||||||
|
// Create the directory path if it doesn't exist
|
||||||
|
dir := filepath.Dir(path)
|
||||||
|
if err := os.MkdirAll(dir, 0o755); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if file already exists
|
||||||
|
if _, err := os.Stat(path); err == nil {
|
||||||
|
// File exists, create backup
|
||||||
|
backupPath := path + ".backup"
|
||||||
|
if err := os.Rename(path, backupPath); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write the new config file
|
||||||
|
return os.WriteFile(path, []byte(content), 0o644)
|
||||||
|
}
|
||||||
+1
-1
@@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
rootCmd := NewRootCmd()
|
rootCmd := NewRootCmd()
|
||||||
|
rootCmd.AddCommand(newPklInitCmd())
|
||||||
if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil {
|
if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil {
|
||||||
log.NewLogger(rootCmd.OutOrStderr()).Error("failure when running app", "err", err)
|
log.NewLogger(rootCmd.OutOrStderr()).Error("failure when running app", "err", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|||||||
@@ -601,11 +601,11 @@ func (p *PointBls12377G1) UnmarshalText(input []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointBls12377G1) MarshalJSON() ([]byte, error) {
|
func (p *PointBls12377G1) MarshalJSON() ([]byte, error) {
|
||||||
return pointMarshalJson(p)
|
return pointMarshalJSON(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointBls12377G1) UnmarshalJSON(input []byte) error {
|
func (p *PointBls12377G1) UnmarshalJSON(input []byte) error {
|
||||||
pt, err := pointUnmarshalJson(input)
|
pt, err := pointUnmarshalJSON(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -874,11 +874,11 @@ func (p *PointBls12377G2) UnmarshalText(input []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointBls12377G2) MarshalJSON() ([]byte, error) {
|
func (p *PointBls12377G2) MarshalJSON() ([]byte, error) {
|
||||||
return pointMarshalJson(p)
|
return pointMarshalJSON(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointBls12377G2) UnmarshalJSON(input []byte) error {
|
func (p *PointBls12377G2) UnmarshalJSON(input []byte) error {
|
||||||
pt, err := pointUnmarshalJson(input)
|
pt, err := pointUnmarshalJSON(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -573,11 +573,11 @@ func (p *PointBls12381G1) UnmarshalText(input []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointBls12381G1) MarshalJSON() ([]byte, error) {
|
func (p *PointBls12381G1) MarshalJSON() ([]byte, error) {
|
||||||
return pointMarshalJson(p)
|
return pointMarshalJSON(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointBls12381G1) UnmarshalJSON(input []byte) error {
|
func (p *PointBls12381G1) UnmarshalJSON(input []byte) error {
|
||||||
pt, err := pointUnmarshalJson(input)
|
pt, err := pointUnmarshalJSON(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -823,11 +823,11 @@ func (p *PointBls12381G2) UnmarshalText(input []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointBls12381G2) MarshalJSON() ([]byte, error) {
|
func (p *PointBls12381G2) MarshalJSON() ([]byte, error) {
|
||||||
return pointMarshalJson(p)
|
return pointMarshalJSON(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointBls12381G2) UnmarshalJSON(input []byte) error {
|
func (p *PointBls12381G2) UnmarshalJSON(input []byte) error {
|
||||||
pt, err := pointUnmarshalJson(input)
|
pt, err := pointUnmarshalJSON(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,14 +336,14 @@ func pointUnmarshalText(input []byte) (Point, error) {
|
|||||||
return curve.Point.FromAffineCompressed(buffer)
|
return curve.Point.FromAffineCompressed(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func pointMarshalJson(point Point) ([]byte, error) {
|
func pointMarshalJSON(point Point) ([]byte, error) {
|
||||||
m := make(map[string]string, 2)
|
m := make(map[string]string, 2)
|
||||||
m["type"] = point.CurveName()
|
m["type"] = point.CurveName()
|
||||||
m["value"] = hex.EncodeToString(point.ToAffineCompressed())
|
m["value"] = hex.EncodeToString(point.ToAffineCompressed())
|
||||||
return json.Marshal(m)
|
return json.Marshal(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
func pointUnmarshalJson(input []byte) (Point, error) {
|
func pointUnmarshalJSON(input []byte) (Point, error) {
|
||||||
var m map[string]string
|
var m map[string]string
|
||||||
|
|
||||||
err := json.Unmarshal(input, &m)
|
err := json.Unmarshal(input, &m)
|
||||||
|
|||||||
@@ -682,11 +682,11 @@ func (p *PointEd25519) UnmarshalText(input []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointEd25519) MarshalJSON() ([]byte, error) {
|
func (p *PointEd25519) MarshalJSON() ([]byte, error) {
|
||||||
return pointMarshalJson(p)
|
return pointMarshalJSON(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointEd25519) UnmarshalJSON(input []byte) error {
|
func (p *PointEd25519) UnmarshalJSON(input []byte) error {
|
||||||
pt, err := pointUnmarshalJson(input)
|
pt, err := pointUnmarshalJSON(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -653,11 +653,11 @@ func (p *PointK256) UnmarshalText(input []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointK256) MarshalJSON() ([]byte, error) {
|
func (p *PointK256) MarshalJSON() ([]byte, error) {
|
||||||
return pointMarshalJson(p)
|
return pointMarshalJSON(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointK256) UnmarshalJSON(input []byte) error {
|
func (p *PointK256) UnmarshalJSON(input []byte) error {
|
||||||
pt, err := pointUnmarshalJson(input)
|
pt, err := pointUnmarshalJSON(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -701,11 +701,11 @@ func (p *BenchPointP256) UnmarshalText(input []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *BenchPointP256) MarshalJSON() ([]byte, error) {
|
func (p *BenchPointP256) MarshalJSON() ([]byte, error) {
|
||||||
return pointMarshalJson(p)
|
return pointMarshalJSON(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *BenchPointP256) UnmarshalJSON(input []byte) error {
|
func (p *BenchPointP256) UnmarshalJSON(input []byte) error {
|
||||||
pt, err := pointUnmarshalJson(input)
|
pt, err := pointUnmarshalJSON(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -651,11 +651,11 @@ func (p *PointP256) UnmarshalText(input []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointP256) MarshalJSON() ([]byte, error) {
|
func (p *PointP256) MarshalJSON() ([]byte, error) {
|
||||||
return pointMarshalJson(p)
|
return pointMarshalJSON(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointP256) UnmarshalJSON(input []byte) error {
|
func (p *PointP256) UnmarshalJSON(input []byte) error {
|
||||||
pt, err := pointUnmarshalJson(input)
|
pt, err := pointUnmarshalJSON(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -669,11 +669,11 @@ func (p *PointPallas) UnmarshalText(input []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointPallas) MarshalJSON() ([]byte, error) {
|
func (p *PointPallas) MarshalJSON() ([]byte, error) {
|
||||||
return pointMarshalJson(p)
|
return pointMarshalJSON(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PointPallas) UnmarshalJSON(input []byte) error {
|
func (p *PointPallas) UnmarshalJSON(input []byte) error {
|
||||||
pt, err := pointUnmarshalJson(input)
|
pt, err := pointUnmarshalJSON(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,157 @@
|
|||||||
|
package keys
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/ed25519"
|
||||||
|
"crypto/rsa"
|
||||||
|
"crypto/x509"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/libp2p/go-libp2p/core/crypto"
|
||||||
|
mb "github.com/multiformats/go-multibase"
|
||||||
|
varint "github.com/multiformats/go-varint"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// KeyPrefix indicates a decentralized identifier that uses the key method
|
||||||
|
KeyPrefix = "did:key"
|
||||||
|
// MulticodecKindRSAPubKey rsa-x509-pub https://github.com/multiformats/multicodec/pull/226
|
||||||
|
MulticodecKindRSAPubKey = 0x1205
|
||||||
|
// MulticodecKindEd25519PubKey ed25519-pub
|
||||||
|
MulticodecKindEd25519PubKey = 0xed
|
||||||
|
// MulticodecKindSecp256k1PubKey secp256k1-pub
|
||||||
|
MulticodecKindSecp256k1PubKey = 0x1206
|
||||||
|
)
|
||||||
|
|
||||||
|
// DID is a DID:key identifier
|
||||||
|
type DID struct {
|
||||||
|
crypto.PubKey
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDID constructs an Identifier from a public key
|
||||||
|
func NewDID(pub crypto.PubKey) (DID, error) {
|
||||||
|
switch pub.Type() {
|
||||||
|
case crypto.Ed25519, crypto.RSA, crypto.Secp256k1:
|
||||||
|
return DID{PubKey: pub}, nil
|
||||||
|
default:
|
||||||
|
return DID{}, fmt.Errorf("unsupported key type: %s", pub.Type())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MulticodecType indicates the type for this multicodec
|
||||||
|
func (id DID) MulticodecType() uint64 {
|
||||||
|
switch id.Type() {
|
||||||
|
case crypto.RSA:
|
||||||
|
return MulticodecKindRSAPubKey
|
||||||
|
case crypto.Ed25519:
|
||||||
|
return MulticodecKindEd25519PubKey
|
||||||
|
case crypto.Secp256k1:
|
||||||
|
return MulticodecKindSecp256k1PubKey
|
||||||
|
default:
|
||||||
|
panic("unexpected crypto type")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// String returns this did:key formatted as a string
|
||||||
|
func (id DID) String() string {
|
||||||
|
raw, err := id.Raw()
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
t := id.MulticodecType()
|
||||||
|
size := varint.UvarintSize(t)
|
||||||
|
data := make([]byte, size+len(raw))
|
||||||
|
n := varint.PutUvarint(data, t)
|
||||||
|
copy(data[n:], raw)
|
||||||
|
|
||||||
|
b58BKeyStr, err := mb.Encode(mb.Base58BTC, data)
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("%s:%s", KeyPrefix, b58BKeyStr)
|
||||||
|
}
|
||||||
|
|
||||||
|
// VerifyKey returns the backing implementation for a public key, one of:
|
||||||
|
// *rsa.PublicKey, ed25519.PublicKey
|
||||||
|
func (id DID) VerifyKey() (interface{}, error) {
|
||||||
|
rawPubBytes, err := id.Raw()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
switch id.Type() {
|
||||||
|
case crypto.RSA:
|
||||||
|
verifyKeyiface, err := x509.ParsePKIXPublicKey(rawPubBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
verifyKey, ok := verifyKeyiface.(*rsa.PublicKey)
|
||||||
|
if !ok {
|
||||||
|
return nil, fmt.Errorf("public key is not an RSA key. got type: %T", verifyKeyiface)
|
||||||
|
}
|
||||||
|
return verifyKey, nil
|
||||||
|
case crypto.Ed25519:
|
||||||
|
return ed25519.PublicKey(rawPubBytes), nil
|
||||||
|
case crypto.Secp256k1:
|
||||||
|
// Handle both compressed and uncompressed Secp256k1 public keys
|
||||||
|
if len(rawPubBytes) == 65 || len(rawPubBytes) == 33 {
|
||||||
|
return rawPubBytes, nil
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("invalid Secp256k1 public key length: %d", len(rawPubBytes))
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("unrecognized Public Key type: %s", id.Type())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse turns a string into a key method ID
|
||||||
|
func Parse(keystr string) (DID, error) {
|
||||||
|
var id DID
|
||||||
|
if !strings.HasPrefix(keystr, KeyPrefix) {
|
||||||
|
return id, fmt.Errorf("decentralized identifier is not a 'key' type")
|
||||||
|
}
|
||||||
|
|
||||||
|
keystr = strings.TrimPrefix(keystr, KeyPrefix+":")
|
||||||
|
|
||||||
|
enc, data, err := mb.Decode(keystr)
|
||||||
|
if err != nil {
|
||||||
|
return id, fmt.Errorf("decoding multibase: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if enc != mb.Base58BTC {
|
||||||
|
return id, fmt.Errorf("unexpected multibase encoding: %s", mb.EncodingToStr[enc])
|
||||||
|
}
|
||||||
|
|
||||||
|
keyType, n, err := varint.FromUvarint(data)
|
||||||
|
if err != nil {
|
||||||
|
return id, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch keyType {
|
||||||
|
case MulticodecKindRSAPubKey:
|
||||||
|
pub, err := crypto.UnmarshalRsaPublicKey(data[n:])
|
||||||
|
if err != nil {
|
||||||
|
return id, err
|
||||||
|
}
|
||||||
|
return DID{pub}, nil
|
||||||
|
case MulticodecKindEd25519PubKey:
|
||||||
|
pub, err := crypto.UnmarshalEd25519PublicKey(data[n:])
|
||||||
|
if err != nil {
|
||||||
|
return id, err
|
||||||
|
}
|
||||||
|
return DID{pub}, nil
|
||||||
|
case MulticodecKindSecp256k1PubKey:
|
||||||
|
// Handle both compressed and uncompressed formats
|
||||||
|
keyData := data[n:]
|
||||||
|
if len(keyData) != 33 && len(keyData) != 65 {
|
||||||
|
return id, fmt.Errorf("invalid Secp256k1 public key length: %d", len(keyData))
|
||||||
|
}
|
||||||
|
pub, err := crypto.UnmarshalSecp256k1PublicKey(keyData)
|
||||||
|
if err != nil {
|
||||||
|
return id, fmt.Errorf("failed to unmarshal Secp256k1 key: %w", err)
|
||||||
|
}
|
||||||
|
return DID{pub}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return id, fmt.Errorf("unrecognized key type multicodec prefix: %x", data[0])
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package keys
|
||||||
|
|
||||||
|
type DIDMethod string
|
||||||
|
|
||||||
|
const (
|
||||||
|
DIDMethodKey DIDMethod = "key"
|
||||||
|
DIDMethodSonr DIDMethod = "sonr"
|
||||||
|
DIDMehthodBitcoin DIDMethod = "btcr"
|
||||||
|
DIDMethodEthereum DIDMethod = "ethr"
|
||||||
|
DIDMethodCbor DIDMethod = "cbor"
|
||||||
|
DIDMethodCID DIDMethod = "cid"
|
||||||
|
DIDMethodIPFS DIDMethod = "ipfs"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (d DIDMethod) String() string {
|
||||||
|
return string(d)
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
package parsers
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package parsers
|
||||||
|
|
||||||
|
type CosmosPrefix string
|
||||||
|
|
||||||
|
const (
|
||||||
|
ATOMPrefix CosmosPrefix = "cosmos"
|
||||||
|
AXELARPrefix CosmosPrefix = "axelar"
|
||||||
|
EVMOSPrefix CosmosPrefix = "evmos"
|
||||||
|
OSMOPrefix CosmosPrefix = "osmo"
|
||||||
|
SONRPrefix CosmosPrefix = "idx"
|
||||||
|
STARSPrefix CosmosPrefix = "stars"
|
||||||
|
)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
package parsers
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
package parsers
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package didkey
|
package parsers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/ed25519"
|
"crypto/ed25519"
|
||||||
@@ -23,23 +23,23 @@ const (
|
|||||||
MulticodecKindSecp256k1PubKey = 0x1206
|
MulticodecKindSecp256k1PubKey = 0x1206
|
||||||
)
|
)
|
||||||
|
|
||||||
// ID is a DID:key identifier
|
// DIDKey is a DID:key identifier
|
||||||
type ID struct {
|
type DIDKey struct {
|
||||||
crypto.PubKey
|
crypto.PubKey
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewID constructs an Identifier from a public key
|
// NewKeyDID constructs an Identifier from a public key
|
||||||
func NewID(pub crypto.PubKey) (ID, error) {
|
func NewKeyDID(pub crypto.PubKey) (DIDKey, error) {
|
||||||
switch pub.Type() {
|
switch pub.Type() {
|
||||||
case crypto.Ed25519, crypto.RSA, crypto.Secp256k1:
|
case crypto.Ed25519, crypto.RSA, crypto.Secp256k1:
|
||||||
return ID{PubKey: pub}, nil
|
return DIDKey{PubKey: pub}, nil
|
||||||
default:
|
default:
|
||||||
return ID{}, fmt.Errorf("unsupported key type: %s", pub.Type())
|
return DIDKey{}, fmt.Errorf("unsupported key type: %s", pub.Type())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MulticodecType indicates the type for this multicodec
|
// MulticodecType indicates the type for this multicodec
|
||||||
func (id ID) MulticodecType() uint64 {
|
func (id DIDKey) MulticodecType() uint64 {
|
||||||
switch id.Type() {
|
switch id.Type() {
|
||||||
case crypto.RSA:
|
case crypto.RSA:
|
||||||
return MulticodecKindRSAPubKey
|
return MulticodecKindRSAPubKey
|
||||||
@@ -53,7 +53,7 @@ func (id ID) MulticodecType() uint64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// String returns this did:key formatted as a string
|
// String returns this did:key formatted as a string
|
||||||
func (id ID) String() string {
|
func (id DIDKey) String() string {
|
||||||
raw, err := id.Raw()
|
raw, err := id.Raw()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ""
|
return ""
|
||||||
@@ -75,7 +75,7 @@ func (id ID) String() string {
|
|||||||
|
|
||||||
// VerifyKey returns the backing implementation for a public key, one of:
|
// VerifyKey returns the backing implementation for a public key, one of:
|
||||||
// *rsa.PublicKey, ed25519.PublicKey
|
// *rsa.PublicKey, ed25519.PublicKey
|
||||||
func (id ID) VerifyKey() (interface{}, error) {
|
func (id DIDKey) VerifyKey() (interface{}, error) {
|
||||||
rawPubBytes, err := id.PubKey.Raw()
|
rawPubBytes, err := id.PubKey.Raw()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -100,13 +100,13 @@ func (id ID) VerifyKey() (interface{}, error) {
|
|||||||
}
|
}
|
||||||
return nil, fmt.Errorf("invalid Secp256k1 public key length: %d", len(rawPubBytes))
|
return nil, fmt.Errorf("invalid Secp256k1 public key length: %d", len(rawPubBytes))
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unrecognized Public Key type: %s", id.PubKey.Type())
|
return nil, fmt.Errorf("unrecognized Public Key type: %s", id.Type())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse turns a string into a key method ID
|
// Parse turns a string into a key method ID
|
||||||
func Parse(keystr string) (ID, error) {
|
func Parse(keystr string) (DIDKey, error) {
|
||||||
var id ID
|
var id DIDKey
|
||||||
if !strings.HasPrefix(keystr, KeyPrefix) {
|
if !strings.HasPrefix(keystr, KeyPrefix) {
|
||||||
return id, fmt.Errorf("decentralized identifier is not a 'key' type")
|
return id, fmt.Errorf("decentralized identifier is not a 'key' type")
|
||||||
}
|
}
|
||||||
@@ -133,13 +133,13 @@ func Parse(keystr string) (ID, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return id, err
|
return id, err
|
||||||
}
|
}
|
||||||
return ID{pub}, nil
|
return DIDKey{pub}, nil
|
||||||
case MulticodecKindEd25519PubKey:
|
case MulticodecKindEd25519PubKey:
|
||||||
pub, err := crypto.UnmarshalEd25519PublicKey(data[n:])
|
pub, err := crypto.UnmarshalEd25519PublicKey(data[n:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return id, err
|
return id, err
|
||||||
}
|
}
|
||||||
return ID{pub}, nil
|
return DIDKey{pub}, nil
|
||||||
case MulticodecKindSecp256k1PubKey:
|
case MulticodecKindSecp256k1PubKey:
|
||||||
// Handle both compressed and uncompressed formats
|
// Handle both compressed and uncompressed formats
|
||||||
keyData := data[n:]
|
keyData := data[n:]
|
||||||
@@ -150,7 +150,7 @@ func Parse(keystr string) (ID, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return id, fmt.Errorf("failed to unmarshal Secp256k1 key: %w", err)
|
return id, fmt.Errorf("failed to unmarshal Secp256k1 key: %w", err)
|
||||||
}
|
}
|
||||||
return ID{pub}, nil
|
return DIDKey{pub}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return id, fmt.Errorf("unrecognized key type multicodec prefix: %x", data[0])
|
return id, fmt.Errorf("unrecognized key type multicodec prefix: %x", data[0])
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
package parsers
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
package parsers
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package keys
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/ecdsa"
|
||||||
|
"encoding/hex"
|
||||||
|
|
||||||
|
"github.com/onsonr/sonr/crypto/core/curves"
|
||||||
|
"golang.org/x/crypto/sha3"
|
||||||
|
)
|
||||||
|
|
||||||
|
type PubKey interface {
|
||||||
|
Bytes() []byte
|
||||||
|
Type() string
|
||||||
|
Hex() string
|
||||||
|
Verify(msg []byte, sig []byte) (bool, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type pubKey struct {
|
||||||
|
publicPoint curves.Point
|
||||||
|
method string
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewPubKey(pk curves.Point) PubKey {
|
||||||
|
return &pubKey{
|
||||||
|
publicPoint: pk,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p pubKey) Bytes() []byte {
|
||||||
|
return p.publicPoint.ToAffineCompressed()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p pubKey) Hex() string {
|
||||||
|
return hex.EncodeToString(p.publicPoint.ToAffineCompressed())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p pubKey) Type() string {
|
||||||
|
return "secp256k1"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p pubKey) Verify(data []byte, sigBz []byte) (bool, error) {
|
||||||
|
sig, err := deserializeSignature(sigBz)
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
pp, err := getEcdsaPoint(p.Bytes())
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
pk := &ecdsa.PublicKey{
|
||||||
|
Curve: pp.Curve,
|
||||||
|
X: pp.X,
|
||||||
|
Y: pp.Y,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hash the message using SHA3-256
|
||||||
|
hash := sha3.New256()
|
||||||
|
hash.Write(data)
|
||||||
|
digest := hash.Sum(nil)
|
||||||
|
|
||||||
|
return ecdsa.Verify(pk, digest, sig.R, sig.S), nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package keys
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"math/big"
|
||||||
|
|
||||||
|
"github.com/onsonr/sonr/crypto/core/curves"
|
||||||
|
)
|
||||||
|
|
||||||
|
// getEcdsaPoint builds an elliptic curve point from a compressed byte slice
|
||||||
|
func getEcdsaPoint(pubKey []byte) (*curves.EcPoint, error) {
|
||||||
|
crv := curves.K256()
|
||||||
|
x := new(big.Int).SetBytes(pubKey[1:33])
|
||||||
|
y := new(big.Int).SetBytes(pubKey[33:])
|
||||||
|
ecCurve, err := crv.ToEllipticCurve()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error converting curve: %v", err)
|
||||||
|
}
|
||||||
|
return &curves.EcPoint{X: x, Y: y, Curve: ecCurve}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SerializeSecp256k1Signature serializes an ECDSA signature into a byte slice
|
||||||
|
func serializeSignature(sig *curves.EcdsaSignature) ([]byte, error) {
|
||||||
|
rBytes := sig.R.Bytes()
|
||||||
|
sBytes := sig.S.Bytes()
|
||||||
|
|
||||||
|
sigBytes := make([]byte, 66) // V (1 byte) + R (32 bytes) + S (32 bytes)
|
||||||
|
sigBytes[0] = byte(sig.V)
|
||||||
|
copy(sigBytes[33-len(rBytes):33], rBytes)
|
||||||
|
copy(sigBytes[66-len(sBytes):66], sBytes)
|
||||||
|
return sigBytes, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeserializeSecp256k1Signature deserializes an ECDSA signature from a byte slice
|
||||||
|
func deserializeSignature(sigBytes []byte) (*curves.EcdsaSignature, error) {
|
||||||
|
if len(sigBytes) != 66 {
|
||||||
|
return nil, errors.New("malformed signature: not the correct size")
|
||||||
|
}
|
||||||
|
sig := &curves.EcdsaSignature{
|
||||||
|
V: int(sigBytes[0]),
|
||||||
|
R: new(big.Int).SetBytes(sigBytes[1:33]),
|
||||||
|
S: new(big.Int).SetBytes(sigBytes[33:66]),
|
||||||
|
}
|
||||||
|
return sig, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package mpc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/onsonr/sonr/crypto/core/curves"
|
||||||
|
"github.com/onsonr/sonr/crypto/core/protocol"
|
||||||
|
"github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ╭───────────────────────────────────────────────────────────╮
|
||||||
|
// │ Exported Generics │
|
||||||
|
// ╰───────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
|
type (
|
||||||
|
AliceOut *dkg.AliceOutput
|
||||||
|
BobOut *dkg.BobOutput
|
||||||
|
Point curves.Point
|
||||||
|
Role string // Role is the type for the role
|
||||||
|
Message *protocol.Message // Message is the protocol.Message that is used for MPC
|
||||||
|
Signature *curves.EcdsaSignature // Signature is the type for the signature
|
||||||
|
RefreshFunc interface{ protocol.Iterator } // RefreshFunc is the type for the refresh function
|
||||||
|
SignFunc interface{ protocol.Iterator } // SignFunc is the type for the sign function
|
||||||
|
)
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package mpc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestKeyShareGeneration(t *testing.T) {
|
||||||
|
t.Run("Generate Valid Enclave", func(t *testing.T) {
|
||||||
|
// Generate enclave
|
||||||
|
enclave, err := GenEnclave()
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.NotNil(t, enclave)
|
||||||
|
|
||||||
|
// Validate enclave contents
|
||||||
|
assert.True(t, enclave.IsValid())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestEnclaveOperations(t *testing.T) {
|
||||||
|
t.Run("Signing and Verification", func(t *testing.T) {
|
||||||
|
// Generate valid enclave
|
||||||
|
enclave, err := GenEnclave()
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
// Test signing
|
||||||
|
testData := []byte("test message")
|
||||||
|
signature, err := enclave.Sign(testData)
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.NotNil(t, signature)
|
||||||
|
|
||||||
|
// Verify the signature
|
||||||
|
valid, err := enclave.Verify(testData, signature)
|
||||||
|
require.NoError(t, err)
|
||||||
|
assert.True(t, valid)
|
||||||
|
|
||||||
|
// Test invalid data verification
|
||||||
|
invalidData := []byte("wrong message")
|
||||||
|
valid, err = enclave.Verify(invalidData, signature)
|
||||||
|
require.NoError(t, err)
|
||||||
|
assert.False(t, valid)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Address and Public Key", func(t *testing.T) {
|
||||||
|
enclave, err := GenEnclave()
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
// Test Address
|
||||||
|
addr := enclave.Address()
|
||||||
|
assert.NotEmpty(t, addr)
|
||||||
|
assert.True(t, strings.HasPrefix(addr, "idx"))
|
||||||
|
|
||||||
|
// Test Public Key
|
||||||
|
pubKey := enclave.PubKey()
|
||||||
|
assert.NotNil(t, pubKey)
|
||||||
|
assert.NotEmpty(t, pubKey.Bytes())
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Refresh Operation", func(t *testing.T) {
|
||||||
|
enclave, err := GenEnclave()
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
// Test refresh
|
||||||
|
refreshedEnclave, err := enclave.Refresh()
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.NotNil(t, refreshedEnclave)
|
||||||
|
|
||||||
|
// Verify refreshed enclave is valid
|
||||||
|
assert.True(t, refreshedEnclave.IsValid())
|
||||||
|
|
||||||
|
// Verify it maintains the same address
|
||||||
|
assert.Equal(t, enclave.Address(), refreshedEnclave.Address())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestEnclaveSerialization(t *testing.T) {
|
||||||
|
t.Run("Marshal and Unmarshal", func(t *testing.T) {
|
||||||
|
// Generate original enclave
|
||||||
|
original, err := GenEnclave()
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.NotNil(t, original)
|
||||||
|
|
||||||
|
// Marshal
|
||||||
|
keyEnclave, ok := original.(*KeyEnclave)
|
||||||
|
require.True(t, ok)
|
||||||
|
|
||||||
|
data, err := keyEnclave.Marshal()
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.NotEmpty(t, data)
|
||||||
|
|
||||||
|
// Unmarshal
|
||||||
|
restored := &KeyEnclave{}
|
||||||
|
err = restored.Unmarshal(data)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
// Verify restored enclave
|
||||||
|
assert.Equal(t, keyEnclave.Addr, restored.Addr)
|
||||||
|
assert.True(t, keyEnclave.PubPoint.Equal(restored.PubPoint))
|
||||||
|
assert.Equal(t, keyEnclave.VaultCID, restored.VaultCID)
|
||||||
|
assert.True(t, restored.IsValid())
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
package mpc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/ecdsa"
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"github.com/onsonr/sonr/crypto/core/curves"
|
||||||
|
"github.com/onsonr/sonr/crypto/core/protocol"
|
||||||
|
"github.com/onsonr/sonr/crypto/keys"
|
||||||
|
"github.com/onsonr/sonr/crypto/tecdsa/dklsv1"
|
||||||
|
"golang.org/x/crypto/sha3"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enclave defines the interface for key management operations
|
||||||
|
type Enclave interface {
|
||||||
|
Address() string
|
||||||
|
IsValid() bool
|
||||||
|
PubKey() keys.PubKey
|
||||||
|
Refresh() (Enclave, error)
|
||||||
|
Sign(data []byte) ([]byte, error)
|
||||||
|
Verify(data []byte, sig []byte) (bool, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// KeyEnclave implements the Enclave interface
|
||||||
|
type KeyEnclave struct {
|
||||||
|
Addr string `json:"address"`
|
||||||
|
PubPoint curves.Point `json:"-"`
|
||||||
|
PubBytes []byte `json:"pub_key"`
|
||||||
|
ValShare Message `json:"val_share"`
|
||||||
|
UserShare Message `json:"user_share"`
|
||||||
|
VaultCID string `json:"vault_cid,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Marshal returns the JSON encoding of KeyEnclave
|
||||||
|
func (k *KeyEnclave) Marshal() ([]byte, error) {
|
||||||
|
// Store compressed public point bytes before marshaling
|
||||||
|
k.PubBytes = k.PubPoint.ToAffineCompressed()
|
||||||
|
return json.Marshal(k)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unmarshal parses the JSON-encoded data and stores the result
|
||||||
|
func (k *KeyEnclave) Unmarshal(data []byte) error {
|
||||||
|
if err := json.Unmarshal(data, k); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// Reconstruct Point from bytes
|
||||||
|
curve := curves.K256()
|
||||||
|
point, err := curve.NewIdentityPoint().FromAffineCompressed(k.PubBytes)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
k.PubPoint = point
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) IsValid() bool {
|
||||||
|
return k.PubPoint != nil && k.ValShare != nil && k.UserShare != nil && k.Addr != ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func initKeyEnclave(valShare, userShare Message) (*KeyEnclave, error) {
|
||||||
|
pubPoint, err := getAlicePubPoint(valShare)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
addr, err := computeSonrAddr(pubPoint)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &KeyEnclave{
|
||||||
|
Addr: addr,
|
||||||
|
PubPoint: pubPoint,
|
||||||
|
ValShare: valShare,
|
||||||
|
UserShare: userShare,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) Address() string {
|
||||||
|
return k.Addr
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) PubKey() keys.PubKey {
|
||||||
|
return keys.NewPubKey(k.PubPoint)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) Refresh() (Enclave, error) {
|
||||||
|
refreshFuncVal, err := k.valRefreshFunc()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
refreshFuncUser, err := k.userRefreshFunc()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return ExecuteRefresh(refreshFuncVal, refreshFuncUser)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) Sign(data []byte) ([]byte, error) {
|
||||||
|
userSign, err := k.userSignFunc(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
valSign, err := k.valSignFunc(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return ExecuteSigning(valSign, userSign)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) Verify(data []byte, sig []byte) (bool, error) {
|
||||||
|
edSig, err := deserializeSignature(sig)
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
ePub, err := getEcdsaPoint(k.PubPoint.ToAffineUncompressed())
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
pk := &ecdsa.PublicKey{
|
||||||
|
Curve: ePub.Curve,
|
||||||
|
X: ePub.X,
|
||||||
|
Y: ePub.Y,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hash the message using SHA3-256
|
||||||
|
hash := sha3.New256()
|
||||||
|
hash.Write(data)
|
||||||
|
digest := hash.Sum(nil)
|
||||||
|
|
||||||
|
return ecdsa.Verify(pk, digest, edSig.R, edSig.S), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) userSignFunc(bz []byte) (SignFunc, error) {
|
||||||
|
curve := curves.K256()
|
||||||
|
return dklsv1.NewBobSign(curve, sha3.New256(), bz, k.UserShare, protocol.Version1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) userRefreshFunc() (RefreshFunc, error) {
|
||||||
|
curve := curves.K256()
|
||||||
|
return dklsv1.NewBobRefresh(curve, k.UserShare, protocol.Version1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) valSignFunc(bz []byte) (SignFunc, error) {
|
||||||
|
curve := curves.K256()
|
||||||
|
return dklsv1.NewAliceSign(curve, sha3.New256(), bz, k.ValShare, protocol.Version1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KeyEnclave) valRefreshFunc() (RefreshFunc, error) {
|
||||||
|
curve := curves.K256()
|
||||||
|
return dklsv1.NewAliceRefresh(curve, k.ValShare, protocol.Version1)
|
||||||
|
}
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
package mpc
|
|
||||||
|
|
||||||
import (
|
|
||||||
genericecdsa "crypto/ecdsa"
|
|
||||||
"fmt"
|
|
||||||
"math/big"
|
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/types/bech32"
|
|
||||||
"github.com/onsonr/sonr/crypto/core/curves"
|
|
||||||
"github.com/onsonr/sonr/crypto/core/protocol"
|
|
||||||
"golang.org/x/crypto/sha3"
|
|
||||||
)
|
|
||||||
|
|
||||||
type (
|
|
||||||
ExportedKeyset = []byte
|
|
||||||
)
|
|
||||||
|
|
||||||
type Keyset interface {
|
|
||||||
Address() string
|
|
||||||
Val() *ValKeyshare
|
|
||||||
ValJSON() string
|
|
||||||
User() *UserKeyshare
|
|
||||||
UserJSON() string
|
|
||||||
}
|
|
||||||
|
|
||||||
type keyset struct {
|
|
||||||
val *ValKeyshare
|
|
||||||
user *UserKeyshare
|
|
||||||
addr string
|
|
||||||
}
|
|
||||||
|
|
||||||
func (k keyset) Address() string {
|
|
||||||
return k.addr
|
|
||||||
}
|
|
||||||
|
|
||||||
func (k keyset) Val() *ValKeyshare {
|
|
||||||
return k.val
|
|
||||||
}
|
|
||||||
|
|
||||||
func (k keyset) User() *UserKeyshare {
|
|
||||||
return k.user
|
|
||||||
}
|
|
||||||
|
|
||||||
func (k keyset) ValJSON() string {
|
|
||||||
return k.val.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (k keyset) UserJSON() string {
|
|
||||||
return k.user.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
func ComputeIssuerDID(pk []byte) (string, string, error) {
|
|
||||||
addr, err := ComputeSonrAddr(pk)
|
|
||||||
if err != nil {
|
|
||||||
return "", "", err
|
|
||||||
}
|
|
||||||
return fmt.Sprintf("did:sonr:%s", addr), addr, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func ComputeSonrAddr(pk []byte) (string, error) {
|
|
||||||
sonrAddr, err := bech32.ConvertAndEncode("idx", pk)
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return sonrAddr, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// For DKG bob starts first. For refresh and sign, Alice starts first.
|
|
||||||
func RunProtocol(firstParty protocol.Iterator, secondParty protocol.Iterator) (error, error) {
|
|
||||||
var (
|
|
||||||
message *protocol.Message
|
|
||||||
aErr error
|
|
||||||
bErr error
|
|
||||||
)
|
|
||||||
|
|
||||||
for aErr != protocol.ErrProtocolFinished || bErr != protocol.ErrProtocolFinished {
|
|
||||||
// Crank each protocol forward one iteration
|
|
||||||
message, bErr = firstParty.Next(message)
|
|
||||||
if bErr != nil && bErr != protocol.ErrProtocolFinished {
|
|
||||||
return nil, bErr
|
|
||||||
}
|
|
||||||
|
|
||||||
message, aErr = secondParty.Next(message)
|
|
||||||
if aErr != nil && aErr != protocol.ErrProtocolFinished {
|
|
||||||
return aErr, nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return aErr, bErr
|
|
||||||
}
|
|
||||||
|
|
||||||
// ComputeEcPoint builds an elliptic curve point from a compressed byte slice
|
|
||||||
func ComputeEcPoint(pubKey []byte) (*curves.EcPoint, error) {
|
|
||||||
crv := curves.K256()
|
|
||||||
x := new(big.Int).SetBytes(pubKey[1:33])
|
|
||||||
y := new(big.Int).SetBytes(pubKey[33:])
|
|
||||||
ecCurve, err := crv.ToEllipticCurve()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error converting curve: %v", err)
|
|
||||||
}
|
|
||||||
return &curves.EcPoint{X: x, Y: y, Curve: ecCurve}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func ComputeEcdsaPublicKey(pubKey []byte) (*genericecdsa.PublicKey, error) {
|
|
||||||
pk, err := ComputeEcPoint(pubKey)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return &genericecdsa.PublicKey{
|
|
||||||
Curve: pk.Curve,
|
|
||||||
X: pk.X,
|
|
||||||
Y: pk.Y,
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// VerifySignature verifies the signature of a message
|
|
||||||
func VerifySignature(pk []byte, msg []byte, sig []byte) (bool, error) {
|
|
||||||
pp, err := ComputeEcPoint(pk)
|
|
||||||
if err != nil {
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
sigEd, err := DeserializeSignature(sig)
|
|
||||||
if err != nil {
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
hash := sha3.New256()
|
|
||||||
_, err = hash.Write(msg)
|
|
||||||
if err != nil {
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
digest := hash.Sum(nil)
|
|
||||||
return curves.VerifyEcdsa(pp, digest[:], sigEd), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func checkIteratedErrors(aErr, bErr error) error {
|
|
||||||
if aErr == protocol.ErrProtocolFinished && bErr == protocol.ErrProtocolFinished {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if aErr != protocol.ErrProtocolFinished {
|
|
||||||
return aErr
|
|
||||||
}
|
|
||||||
if bErr != protocol.ErrProtocolFinished {
|
|
||||||
return bErr
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
package mpc
|
|
||||||
|
|
||||||
import (
|
|
||||||
"crypto/ecdsa"
|
|
||||||
|
|
||||||
"github.com/onsonr/sonr/crypto/core/protocol"
|
|
||||||
"github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg"
|
|
||||||
)
|
|
||||||
|
|
||||||
// BaseKeyshare contains common fields and methods for both validator and user keyshares
|
|
||||||
type BaseKeyshare struct {
|
|
||||||
Message *protocol.Message `json:"message"`
|
|
||||||
Role int `json:"role"`
|
|
||||||
UncompressedPubKey []byte `json:"public_key"`
|
|
||||||
CompressedPubKey []byte `json:"compressed_public_key"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func initFromAlice(aliceOut *dkg.AliceOutput, originalMsg *protocol.Message) BaseKeyshare {
|
|
||||||
return BaseKeyshare{
|
|
||||||
Message: originalMsg,
|
|
||||||
Role: 1,
|
|
||||||
UncompressedPubKey: aliceOut.PublicKey.ToAffineUncompressed(),
|
|
||||||
CompressedPubKey: aliceOut.PublicKey.ToAffineCompressed(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func initFromBob(bobOut *dkg.BobOutput, originalMsg *protocol.Message) BaseKeyshare {
|
|
||||||
return BaseKeyshare{
|
|
||||||
Message: originalMsg,
|
|
||||||
Role: 2,
|
|
||||||
UncompressedPubKey: bobOut.PublicKey.ToAffineUncompressed(),
|
|
||||||
CompressedPubKey: bobOut.PublicKey.ToAffineCompressed(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BaseKeyshare) GetPayloads() map[string][]byte {
|
|
||||||
return b.Message.Payloads
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BaseKeyshare) GetMetadata() map[string]string {
|
|
||||||
return b.Message.Metadata
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BaseKeyshare) GetPublicKey() []byte {
|
|
||||||
return b.UncompressedPubKey
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BaseKeyshare) GetProtocol() string {
|
|
||||||
return b.Message.Protocol
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BaseKeyshare) GetRole() int32 {
|
|
||||||
return int32(b.Role)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BaseKeyshare) GetVersion() uint32 {
|
|
||||||
return uint32(b.Message.Version)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BaseKeyshare) ECDSAPublicKey() (*ecdsa.PublicKey, error) {
|
|
||||||
return ComputeEcdsaPublicKey(b.UncompressedPubKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BaseKeyshare) ExtractMessage() *protocol.Message {
|
|
||||||
return &protocol.Message{
|
|
||||||
Payloads: b.GetPayloads(),
|
|
||||||
Metadata: b.GetMetadata(),
|
|
||||||
Protocol: b.GetProtocol(),
|
|
||||||
Version: uint(b.GetVersion()),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+52
-54
@@ -1,17 +1,14 @@
|
|||||||
package mpc
|
package mpc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/ecdsa"
|
"github.com/ipfs/kubo/client/rpc"
|
||||||
"errors"
|
|
||||||
"math/big"
|
|
||||||
|
|
||||||
"github.com/onsonr/sonr/crypto/core/curves"
|
"github.com/onsonr/sonr/crypto/core/curves"
|
||||||
"github.com/onsonr/sonr/crypto/core/protocol"
|
"github.com/onsonr/sonr/crypto/core/protocol"
|
||||||
"github.com/onsonr/sonr/crypto/tecdsa/dklsv1"
|
"github.com/onsonr/sonr/crypto/tecdsa/dklsv1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewKeyshareSource generates a new MPC keyshare
|
// GenEnclave generates a new MPC keyshare
|
||||||
func NewKeyset() (Keyset, error) {
|
func GenEnclave() (Enclave, error) {
|
||||||
curve := curves.K256()
|
curve := curves.K256()
|
||||||
valKs := dklsv1.NewAliceDkg(curve, protocol.Version1)
|
valKs := dklsv1.NewAliceDkg(curve, protocol.Version1)
|
||||||
userKs := dklsv1.NewBobDkg(curve, protocol.Version1)
|
userKs := dklsv1.NewBobDkg(curve, protocol.Version1)
|
||||||
@@ -23,7 +20,23 @@ func NewKeyset() (Keyset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
valShare, err := NewValKeyshare(valRes)
|
userRes, err := userKs.Result(protocol.Version1)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return initKeyEnclave(valRes, userRes)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenEnclaveIPFS generates a new MPC keyshare
|
||||||
|
func GenEnclaveIPFS(ipc *rpc.HttpApi) (Enclave, error) {
|
||||||
|
curve := curves.K256()
|
||||||
|
valKs := dklsv1.NewAliceDkg(curve, protocol.Version1)
|
||||||
|
userKs := dklsv1.NewBobDkg(curve, protocol.Version1)
|
||||||
|
aErr, bErr := RunProtocol(userKs, valKs)
|
||||||
|
if err := checkIteratedErrors(aErr, bErr); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
valRes, err := valKs.Result(protocol.Version1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -31,19 +44,15 @@ func NewKeyset() (Keyset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
userShare, err := NewUserKeyshare(userRes)
|
e, err := initKeyEnclave(valRes, userRes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
addr, err := computeSonrAddr(valShare.CompressedPublicKey())
|
return addEnclaveIPFS(e, ipc)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return keyset{val: valShare, user: userShare, addr: addr}, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExecuteSigning runs the MPC signing protocol
|
// ExecuteSigning runs the MPC signing protocol
|
||||||
func ExecuteSigning(signFuncVal SignFunc, signFuncUser SignFunc) (Signature, error) {
|
func ExecuteSigning(signFuncVal SignFunc, signFuncUser SignFunc) ([]byte, error) {
|
||||||
aErr, bErr := RunProtocol(signFuncVal, signFuncUser)
|
aErr, bErr := RunProtocol(signFuncVal, signFuncUser)
|
||||||
if err := checkIteratedErrors(aErr, bErr); err != nil {
|
if err := checkIteratedErrors(aErr, bErr); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -52,11 +61,19 @@ func ExecuteSigning(signFuncVal SignFunc, signFuncUser SignFunc) (Signature, err
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return dklsv1.DecodeSignature(out)
|
s, err := dklsv1.DecodeSignature(out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
sig, err := serializeSignature(s)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return sig, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExecuteRefresh runs the MPC refresh protocol
|
// ExecuteRefresh runs the MPC refresh protocol
|
||||||
func ExecuteRefresh(refreshFuncVal RefreshFunc, refreshFuncUser RefreshFunc) (Keyset, error) {
|
func ExecuteRefresh(refreshFuncVal RefreshFunc, refreshFuncUser RefreshFunc) (*KeyEnclave, error) {
|
||||||
aErr, bErr := RunProtocol(refreshFuncVal, refreshFuncUser)
|
aErr, bErr := RunProtocol(refreshFuncVal, refreshFuncUser)
|
||||||
if err := checkIteratedErrors(aErr, bErr); err != nil {
|
if err := checkIteratedErrors(aErr, bErr); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -65,51 +82,32 @@ func ExecuteRefresh(refreshFuncVal RefreshFunc, refreshFuncUser RefreshFunc) (Ke
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
valShare, err := NewValKeyshare(valRefreshResult)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
userRefreshResult, err := refreshFuncUser.Result(protocol.Version1)
|
userRefreshResult, err := refreshFuncUser.Result(protocol.Version1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
userShare, err := NewUserKeyshare(userRefreshResult)
|
return initKeyEnclave(valRefreshResult, userRefreshResult)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
addr, err := computeSonrAddr(valShare.CompressedPublicKey())
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return keyset{val: valShare, user: userShare, addr: addr}, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SerializeSecp256k1Signature serializes an ECDSA signature into a byte slice
|
// For DKG bob starts first. For refresh and sign, Alice starts first.
|
||||||
func SerializeSignature(sig Signature) ([]byte, error) {
|
func RunProtocol(firstParty protocol.Iterator, secondParty protocol.Iterator) (error, error) {
|
||||||
rBytes := sig.R.Bytes()
|
var (
|
||||||
sBytes := sig.S.Bytes()
|
message *protocol.Message
|
||||||
|
aErr error
|
||||||
|
bErr error
|
||||||
|
)
|
||||||
|
|
||||||
sigBytes := make([]byte, 66) // V (1 byte) + R (32 bytes) + S (32 bytes)
|
for aErr != protocol.ErrProtocolFinished || bErr != protocol.ErrProtocolFinished {
|
||||||
sigBytes[0] = byte(sig.V)
|
// Crank each protocol forward one iteration
|
||||||
copy(sigBytes[33-len(rBytes):33], rBytes)
|
message, bErr = firstParty.Next(message)
|
||||||
copy(sigBytes[66-len(sBytes):66], sBytes)
|
if bErr != nil && bErr != protocol.ErrProtocolFinished {
|
||||||
return sigBytes, nil
|
return nil, bErr
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeserializeSecp256k1Signature deserializes an ECDSA signature from a byte slice
|
message, aErr = secondParty.Next(message)
|
||||||
func DeserializeSignature(sigBytes []byte) (Signature, error) {
|
if aErr != nil && aErr != protocol.ErrProtocolFinished {
|
||||||
if len(sigBytes) != 66 {
|
return aErr, nil
|
||||||
return nil, errors.New("malformed signature: not the correct size")
|
}
|
||||||
}
|
}
|
||||||
sig := &curves.EcdsaSignature{
|
return aErr, bErr
|
||||||
V: int(sigBytes[0]),
|
|
||||||
R: new(big.Int).SetBytes(sigBytes[1:33]),
|
|
||||||
S: new(big.Int).SetBytes(sigBytes[33:66]),
|
|
||||||
}
|
|
||||||
return sig, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// VerifyMPCSignature verifies an MPC signature
|
|
||||||
func VerifyMPCSignature(sig Signature, msg []byte, publicKey *ecdsa.PublicKey) bool {
|
|
||||||
return ecdsa.Verify(publicKey, msg, sig.R, sig.S)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,150 +0,0 @@
|
|||||||
package mpc
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/types/bech32"
|
|
||||||
"github.com/onsonr/sonr/crypto/core/curves"
|
|
||||||
"github.com/onsonr/sonr/crypto/core/protocol"
|
|
||||||
"github.com/onsonr/sonr/crypto/tecdsa/dklsv1"
|
|
||||||
"golang.org/x/crypto/sha3"
|
|
||||||
)
|
|
||||||
|
|
||||||
var ErrInvalidKeyshareRole = errors.New("invalid keyshare role")
|
|
||||||
|
|
||||||
type Role int
|
|
||||||
|
|
||||||
const (
|
|
||||||
RoleUnknown Role = iota
|
|
||||||
RoleUser
|
|
||||||
RoleValidator
|
|
||||||
)
|
|
||||||
|
|
||||||
func (r Role) IsUser() bool {
|
|
||||||
return r == RoleUser
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r Role) IsValidator() bool {
|
|
||||||
return r == RoleValidator
|
|
||||||
}
|
|
||||||
|
|
||||||
// Message is the protocol.Message that is used for MPC
|
|
||||||
type Message *protocol.Message
|
|
||||||
|
|
||||||
type Signature *curves.EcdsaSignature
|
|
||||||
|
|
||||||
// RefreshFunc is the type for the refresh function
|
|
||||||
type RefreshFunc interface {
|
|
||||||
protocol.Iterator
|
|
||||||
}
|
|
||||||
|
|
||||||
// SignFunc is the type for the sign function
|
|
||||||
type SignFunc interface {
|
|
||||||
protocol.Iterator
|
|
||||||
}
|
|
||||||
|
|
||||||
type ValKeyshare struct {
|
|
||||||
BaseKeyshare
|
|
||||||
encoded string
|
|
||||||
}
|
|
||||||
|
|
||||||
func computeSonrAddr(pk []byte) (string, error) {
|
|
||||||
sonrAddr, err := bech32.ConvertAndEncode("idx", pk)
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return sonrAddr, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewValKeyshare(msg *protocol.Message) (*ValKeyshare, error) {
|
|
||||||
vks := new(ValKeyshare)
|
|
||||||
encoded, err := protocol.EncodeMessage(msg)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
valShare, err := dklsv1.DecodeAliceDkgResult(msg)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
vks.BaseKeyshare = initFromAlice(valShare, msg)
|
|
||||||
vks.encoded = encoded
|
|
||||||
return vks, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *ValKeyshare) RefreshFunc() (RefreshFunc, error) {
|
|
||||||
curve := curves.K256()
|
|
||||||
return dklsv1.NewAliceRefresh(curve, v.ExtractMessage(), protocol.Version1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *ValKeyshare) SignFunc(msg []byte) (SignFunc, error) {
|
|
||||||
curve := curves.K256()
|
|
||||||
return dklsv1.NewAliceSign(curve, sha3.New256(), msg, v.ExtractMessage(), protocol.Version1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *ValKeyshare) String() string {
|
|
||||||
return v.encoded
|
|
||||||
}
|
|
||||||
|
|
||||||
// PublicKey returns the uncompressed public key (65 bytes)
|
|
||||||
func (v *ValKeyshare) PublicKey() []byte {
|
|
||||||
return v.UncompressedPubKey
|
|
||||||
}
|
|
||||||
|
|
||||||
// CompressedPublicKey returns the compressed public key (33 bytes)
|
|
||||||
func (v *ValKeyshare) CompressedPublicKey() []byte {
|
|
||||||
return v.CompressedPubKey
|
|
||||||
}
|
|
||||||
|
|
||||||
type UserKeyshare struct {
|
|
||||||
BaseKeyshare
|
|
||||||
encoded string
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewUserKeyshare(msg *protocol.Message) (*UserKeyshare, error) {
|
|
||||||
uks := new(UserKeyshare)
|
|
||||||
encoded, err := protocol.EncodeMessage(msg)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
out, err := dklsv1.DecodeBobDkgResult(msg)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
uks.BaseKeyshare = initFromBob(out, msg)
|
|
||||||
uks.encoded = encoded
|
|
||||||
return uks, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (u *UserKeyshare) RefreshFunc() (RefreshFunc, error) {
|
|
||||||
curve := curves.K256()
|
|
||||||
return dklsv1.NewBobRefresh(curve, u.ExtractMessage(), protocol.Version1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (u *UserKeyshare) SignFunc(msg []byte) (SignFunc, error) {
|
|
||||||
curve := curves.K256()
|
|
||||||
return dklsv1.NewBobSign(curve, sha3.New256(), msg, u.ExtractMessage(), protocol.Version1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (u *UserKeyshare) String() string {
|
|
||||||
return u.encoded
|
|
||||||
}
|
|
||||||
|
|
||||||
// PublicKey returns the uncompressed public key (65 bytes)
|
|
||||||
func (u *UserKeyshare) PublicKey() []byte {
|
|
||||||
return u.UncompressedPubKey
|
|
||||||
}
|
|
||||||
|
|
||||||
// CompressedPublicKey returns the compressed public key (33 bytes)
|
|
||||||
func (u *UserKeyshare) CompressedPublicKey() []byte {
|
|
||||||
return u.CompressedPubKey
|
|
||||||
}
|
|
||||||
|
|
||||||
func encodeMessage(m *protocol.Message) (string, error) {
|
|
||||||
return protocol.EncodeMessage(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
func decodeMessage(s string) (*protocol.Message, error) {
|
|
||||||
return protocol.DecodeMessage(s)
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package spec
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/sha256"
|
||||||
|
|
||||||
|
"github.com/golang-jwt/jwt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MPCSigningMethod implements the SigningMethod interface for MPC-based signing
|
||||||
|
type MPCSigningMethod struct {
|
||||||
|
Name string
|
||||||
|
ks ucanKeyshare
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewJWTSigningMethod creates a new MPC signing method with the given keyshare source
|
||||||
|
func NewJWTSigningMethod(name string, ks ucanKeyshare) *MPCSigningMethod {
|
||||||
|
return &MPCSigningMethod{
|
||||||
|
Name: name,
|
||||||
|
ks: ks,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Alg returns the signing method's name
|
||||||
|
func (m *MPCSigningMethod) Alg() string {
|
||||||
|
return m.Name
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify verifies the signature using the MPC public key
|
||||||
|
func (m *MPCSigningMethod) Verify(signingString, signature string, key interface{}) error {
|
||||||
|
// // Decode the signature
|
||||||
|
// sig, err := base64.RawURLEncoding.DecodeString(signature)
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Hash the signing string
|
||||||
|
// hasher := sha256.New()
|
||||||
|
// hasher.Write([]byte(signingString))
|
||||||
|
// digest := hasher.Sum(nil)
|
||||||
|
// valid, err := m.ks.valShare.PublicKey().Verify(digest, sig)
|
||||||
|
// if !valid || err != nil {
|
||||||
|
// return fmt.Errorf("invalid signature")
|
||||||
|
// }
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sign signs the data using MPC
|
||||||
|
func (m *MPCSigningMethod) Sign(signingString string, key interface{}) (string, error) {
|
||||||
|
// Hash the signing string
|
||||||
|
hasher := sha256.New()
|
||||||
|
hasher.Write([]byte(signingString))
|
||||||
|
// digest := hasher.Sum(nil)
|
||||||
|
//
|
||||||
|
// // Create signing functions
|
||||||
|
// signFunc, err := m.ks.userShare.SignFunc(digest)
|
||||||
|
// if err != nil {
|
||||||
|
// return "", fmt.Errorf("failed to create sign function: %w", err)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// valSignFunc, err := m.ks.valShare.SignFunc(digest)
|
||||||
|
// if err != nil {
|
||||||
|
// return "", fmt.Errorf("failed to create validator sign function: %w", err)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Run the signing protocol
|
||||||
|
// sig, err := mpc.ExecuteSigning(valSignFunc, signFunc)
|
||||||
|
// if err != nil {
|
||||||
|
// return "", fmt.Errorf("failed to run sign protocol: %w", err)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Encode the signature
|
||||||
|
// encoded := base64.RawURLEncoding.EncodeToString(sig)
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// Register the MPC signing method
|
||||||
|
jwt.RegisterSigningMethod("MPC256", func() jwt.SigningMethod {
|
||||||
|
return &MPCSigningMethod{
|
||||||
|
Name: "MPC256",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -5,9 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/onsonr/sonr/crypto/mpc"
|
"github.com/onsonr/sonr/crypto/keys"
|
||||||
"github.com/onsonr/sonr/crypto/ucan"
|
"github.com/onsonr/sonr/crypto/ucan"
|
||||||
"github.com/onsonr/sonr/crypto/ucan/didkey"
|
|
||||||
"lukechampine.com/blake3"
|
"lukechampine.com/blake3"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -23,21 +22,18 @@ type KeyshareSource interface {
|
|||||||
UCANParser() *ucan.TokenParser
|
UCANParser() *ucan.TokenParser
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSource(ks mpc.Keyset) (KeyshareSource, error) {
|
// func NewSource(ks mpc.KeyEnclave) (KeyshareSource, error) {
|
||||||
val := ks.Val()
|
// iss, addr, err := getIssuerDID(val.PublicKey())
|
||||||
user := ks.User()
|
// if err != nil {
|
||||||
iss, addr, err := ComputeIssuerDID(val.GetPublicKey())
|
// return nil, err
|
||||||
if err != nil {
|
// }
|
||||||
return nil, err
|
//
|
||||||
}
|
// return ucanKeyshare{
|
||||||
return ucanKeyshare{
|
// issuerDID: iss,
|
||||||
userShare: user,
|
// addr: addr,
|
||||||
valShare: val,
|
// }, nil
|
||||||
addr: addr,
|
// }
|
||||||
issuerDID: iss,
|
//
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Address returns the address of the keyshare
|
// Address returns the address of the keyshare
|
||||||
func (k ucanKeyshare) Address() string {
|
func (k ucanKeyshare) Address() string {
|
||||||
return k.addr
|
return k.addr
|
||||||
@@ -67,27 +63,25 @@ func (k ucanKeyshare) OriginToken() (*Token, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (k ucanKeyshare) SignData(data []byte) ([]byte, error) {
|
func (k ucanKeyshare) SignData(data []byte) ([]byte, error) {
|
||||||
// Create signing functions
|
// // Create signing functions
|
||||||
signFunc, err := k.userShare.SignFunc(data)
|
// signFunc, err := k.userShare.SignFunc(data)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return nil, fmt.Errorf("failed to create sign function: %w", err)
|
// return nil, fmt.Errorf("failed to create sign function: %w", err)
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
valSignFunc, err := k.valShare.SignFunc(data)
|
// valSignFunc, err := k.valShare.SignFunc(data)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return nil, fmt.Errorf("failed to create validator sign function: %w", err)
|
// return nil, fmt.Errorf("failed to create validator sign function: %w", err)
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Run the signing protocol
|
// Run the signing protocol
|
||||||
sig, err := mpc.ExecuteSigning(valSignFunc, signFunc)
|
// return mpc.ExecuteSigning(valSignFunc, signFunc)
|
||||||
if err != nil {
|
return nil, nil
|
||||||
return nil, fmt.Errorf("failed to run sign protocol: %w", err)
|
|
||||||
}
|
|
||||||
return mpc.SerializeSignature(sig)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (k ucanKeyshare) VerifyData(data []byte, sig []byte) (bool, error) {
|
func (k ucanKeyshare) VerifyData(data []byte, sig []byte) (bool, error) {
|
||||||
return mpc.VerifySignature(k.userShare.PublicKey(), data, sig)
|
return false, nil
|
||||||
|
// return k.valShare.PublicKey().Verify(data, sig)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenParser returns a token parser that can be used to parse tokens
|
// TokenParser returns a token parser that can be used to parse tokens
|
||||||
@@ -127,6 +121,6 @@ func (k ucanKeyshare) UCANParser() *ucan.TokenParser {
|
|||||||
type customDIDPubKeyResolver struct{}
|
type customDIDPubKeyResolver struct{}
|
||||||
|
|
||||||
// ResolveDIDKey extracts a public key from a did:key string
|
// ResolveDIDKey extracts a public key from a did:key string
|
||||||
func (customDIDPubKeyResolver) ResolveDIDKey(ctx context.Context, didStr string) (didkey.ID, error) {
|
func (customDIDPubKeyResolver) ResolveDIDKey(ctx context.Context, didStr string) (keys.DID, error) {
|
||||||
return didkey.Parse(didStr)
|
return keys.Parse(didStr)
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/types/bech32"
|
"github.com/cosmos/cosmos-sdk/types/bech32"
|
||||||
"github.com/golang-jwt/jwt"
|
"github.com/golang-jwt/jwt"
|
||||||
"github.com/onsonr/sonr/crypto/mpc"
|
"github.com/onsonr/sonr/crypto/keys"
|
||||||
"github.com/onsonr/sonr/crypto/ucan"
|
"github.com/onsonr/sonr/crypto/ucan"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -30,9 +30,6 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ucanKeyshare struct {
|
type ucanKeyshare struct {
|
||||||
userShare *mpc.UserKeyshare
|
|
||||||
valShare *mpc.ValKeyshare
|
|
||||||
|
|
||||||
addr string
|
addr string
|
||||||
issuerDID string
|
issuerDID string
|
||||||
}
|
}
|
||||||
@@ -97,20 +94,10 @@ func (k ucanKeyshare) newToken(audienceDID string, prf []Proof, att Attenuations
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ComputeIssuerDID computes the issuer DID from a public key
|
func getIssuerDID(pk keys.PubKey) (string, string, error) {
|
||||||
func ComputeIssuerDID(pk []byte) (string, string, error) {
|
addr, err := bech32.ConvertAndEncode("idx", pk.Bytes())
|
||||||
addr, err := ComputeSonrAddr(pk)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("did:sonr:%s", addr), addr, nil
|
return fmt.Sprintf("did:sonr:%s", addr), addr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ComputeSonrAddr computes the Sonr address from a public key
|
|
||||||
func ComputeSonrAddr(pk []byte) (string, error) {
|
|
||||||
sonrAddr, err := bech32.ConvertAndEncode("idx", pk)
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return sonrAddr, nil
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
package mpc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"math/big"
|
||||||
|
|
||||||
|
"github.com/cosmos/cosmos-sdk/types/bech32"
|
||||||
|
"github.com/ipfs/boxo/files"
|
||||||
|
"github.com/ipfs/kubo/client/rpc"
|
||||||
|
"github.com/onsonr/sonr/crypto/core/curves"
|
||||||
|
"github.com/onsonr/sonr/crypto/core/protocol"
|
||||||
|
"github.com/onsonr/sonr/crypto/tecdsa/dklsv1"
|
||||||
|
)
|
||||||
|
|
||||||
|
func addEnclaveIPFS(enclave *KeyEnclave, ipc *rpc.HttpApi) (Enclave, error) {
|
||||||
|
jsonEnclave, err := json.Marshal(enclave)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
// Save enclave to IPFS
|
||||||
|
cid, err := ipc.Unixfs().Add(context.Background(), files.NewBytesFile(jsonEnclave))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
enclave.VaultCID = cid.String()
|
||||||
|
return enclave, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func checkIteratedErrors(aErr, bErr error) error {
|
||||||
|
if aErr == protocol.ErrProtocolFinished && bErr == protocol.ErrProtocolFinished {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if aErr != protocol.ErrProtocolFinished {
|
||||||
|
return aErr
|
||||||
|
}
|
||||||
|
if bErr != protocol.ErrProtocolFinished {
|
||||||
|
return bErr
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func computeSonrAddr(pp Point) (string, error) {
|
||||||
|
pk := pp.ToAffineCompressed()
|
||||||
|
sonrAddr, err := bech32.ConvertAndEncode("idx", pk)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return sonrAddr, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func getAliceOut(msg *protocol.Message) (AliceOut, error) {
|
||||||
|
return dklsv1.DecodeAliceDkgResult(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getAlicePubPoint(msg *protocol.Message) (Point, error) {
|
||||||
|
out, err := dklsv1.DecodeAliceDkgResult(msg)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out.PublicKey, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func getBobOut(msg *protocol.Message) (BobOut, error) {
|
||||||
|
return dklsv1.DecodeBobDkgResult(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getBobPubPoint(msg *protocol.Message) (Point, error) {
|
||||||
|
out, err := dklsv1.DecodeBobDkgResult(msg)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out.PublicKey, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// getEcdsaPoint builds an elliptic curve point from a compressed byte slice
|
||||||
|
func getEcdsaPoint(pubKey []byte) (*curves.EcPoint, error) {
|
||||||
|
crv := curves.K256()
|
||||||
|
x := new(big.Int).SetBytes(pubKey[1:33])
|
||||||
|
y := new(big.Int).SetBytes(pubKey[33:])
|
||||||
|
ecCurve, err := crv.ToEllipticCurve()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("error converting curve: %v", err)
|
||||||
|
}
|
||||||
|
return &curves.EcPoint{X: x, Y: y, Curve: ecCurve}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func serializeSignature(sig *curves.EcdsaSignature) ([]byte, error) {
|
||||||
|
if sig == nil {
|
||||||
|
return nil, errors.New("nil signature")
|
||||||
|
}
|
||||||
|
|
||||||
|
rBytes := sig.R.Bytes()
|
||||||
|
sBytes := sig.S.Bytes()
|
||||||
|
|
||||||
|
// Ensure both components are 32 bytes
|
||||||
|
rPadded := make([]byte, 32)
|
||||||
|
sPadded := make([]byte, 32)
|
||||||
|
copy(rPadded[32-len(rBytes):], rBytes)
|
||||||
|
copy(sPadded[32-len(sBytes):], sBytes)
|
||||||
|
|
||||||
|
// Concatenate R and S
|
||||||
|
result := make([]byte, 64)
|
||||||
|
copy(result[0:32], rPadded)
|
||||||
|
copy(result[32:64], sPadded)
|
||||||
|
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deserializeSignature(sigBytes []byte) (*curves.EcdsaSignature, error) {
|
||||||
|
if len(sigBytes) != 64 {
|
||||||
|
return nil, fmt.Errorf("invalid signature length: expected 64 bytes, got %d", len(sigBytes))
|
||||||
|
}
|
||||||
|
|
||||||
|
r := new(big.Int).SetBytes(sigBytes[:32])
|
||||||
|
s := new(big.Int).SetBytes(sigBytes[32:])
|
||||||
|
|
||||||
|
return &curves.EcdsaSignature{
|
||||||
|
R: r,
|
||||||
|
S: s,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT.
|
// Code generated from Pkl module `sonr.orm.UCAN`. DO NOT EDIT.
|
||||||
package attns
|
package attns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -7,11 +7,11 @@ import (
|
|||||||
"github.com/apple/pkl-go/pkl"
|
"github.com/apple/pkl-go/pkl"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ATN struct {
|
type UCAN struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a ATN
|
// LoadFromPath loads the pkl module at the given path and evaluates it into a UCAN
|
||||||
func LoadFromPath(ctx context.Context, path string) (ret *ATN, err error) {
|
func LoadFromPath(ctx context.Context, path string) (ret *UCAN, err error) {
|
||||||
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -26,9 +26,9 @@ func LoadFromPath(ctx context.Context, path string) (ret *ATN, err error) {
|
|||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a ATN
|
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a UCAN
|
||||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*ATN, error) {
|
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*UCAN, error) {
|
||||||
var ret ATN
|
var ret UCAN
|
||||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT.
|
// Code generated from Pkl module `sonr.orm.UCAN`. DO NOT EDIT.
|
||||||
package capability
|
package capability
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
package capability
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT.
|
// Code generated from Pkl module `sonr.orm.UCAN`. DO NOT EDIT.
|
||||||
package attns
|
package attns
|
||||||
|
|
||||||
import "github.com/apple/pkl-go/pkl"
|
import "github.com/apple/pkl-go/pkl"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
pkl.RegisterMapping("sonr.motr.ATN", ATN{})
|
pkl.RegisterMapping("sonr.orm.UCAN", UCAN{})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT.
|
// Code generated from Pkl module `sonr.orm.UCAN`. DO NOT EDIT.
|
||||||
package policytype
|
package policytype
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT.
|
// Code generated from Pkl module `sonr.orm.UCAN`. DO NOT EDIT.
|
||||||
package resourcetype
|
package resourcetype
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
package resourcetype
|
|
||||||
|
|
||||||
// Resource is a unique identifier for a thing, usually stored state. Resources
|
|
||||||
// are organized by string types
|
|
||||||
type Resource interface {
|
|
||||||
Type() ResourceType
|
|
||||||
Value() string
|
|
||||||
Contains(b Resource) bool
|
|
||||||
}
|
|
||||||
|
|
||||||
type stringResource struct {
|
|
||||||
t ResourceType
|
|
||||||
v string
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r stringResource) Type() ResourceType {
|
|
||||||
return r.t
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r stringResource) Value() string {
|
|
||||||
return r.v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r stringResource) Contains(b Resource) bool {
|
|
||||||
return r.Type() == b.Type() && len(r.Value()) <= len(b.Value())
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewResource(typ ResourceType, val string) Resource {
|
|
||||||
return stringResource{
|
|
||||||
t: typ,
|
|
||||||
v: val,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -98,12 +98,9 @@ func ServiceCapabilities() []string {
|
|||||||
|
|
||||||
// NewVault creates default attenuations for a smart account
|
// NewVault creates default attenuations for a smart account
|
||||||
func NewVault(
|
func NewVault(
|
||||||
kss mpc.Keyset,
|
kss mpc.KeyEnclave,
|
||||||
) Attenuations {
|
) Attenuations {
|
||||||
accountAddr, err := mpc.ComputeSonrAddr(kss.User().GetPublicKey())
|
accountAddr := kss.Address()
|
||||||
if err != nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
caps := VaultPermissions.GetCapabilities()
|
caps := VaultPermissions.GetCapabilities()
|
||||||
return Attenuations{
|
return Attenuations{
|
||||||
// Owner capabilities
|
// Owner capabilities
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
package didkey
|
|
||||||
|
|
||||||
import (
|
|
||||||
"log"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/libp2p/go-libp2p/core/crypto"
|
|
||||||
"github.com/onsonr/sonr/crypto/mpc"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestID_Parse(t *testing.T) {
|
|
||||||
keyStrED := "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"
|
|
||||||
id, err := Parse(keyStrED)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if id.String() != keyStrED {
|
|
||||||
t.Errorf("string mismatch.\nwant: %q\ngot: %q", keyStrED, id.String())
|
|
||||||
}
|
|
||||||
|
|
||||||
keyStrRSA := "did:key:z2MGw4gk84USotaWf4AkJ83DcnrfgGaceF86KQXRYMfQ7xqnUFp38UZ6Le8JPfkb4uCLGjHBzKpjEXb9hx9n2ftecQWCHXKtKszkke4FmENdTZ7i9sqRmL3pLnEEJ774r3HMuuC7tNRQ6pqzrxatXx2WinCibdhUmvh3FobnA9ygeqkSGtV6WLa7NVFw9cAvnv8Y6oHcaoZK7fNP4ASGs6AHmSC6ydSR676aKYMe95QmEAj4xJptDsSxG7zLAGzAdwCgm56M4fTno8GdWNmU6Pdghnuf6fWyYus9ASwdfwyaf3SDf4uo5T16PRJssHkQh6DJHfK4Rka7RNQLjzfGBPjFLHbUSvmf4EdbHasbVaveAArD68ZfazRCCvjdovQjWr6uyLCwSAQLPUFZBTT8mW"
|
|
||||||
|
|
||||||
id, err = Parse(keyStrRSA)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if id.String() != keyStrRSA {
|
|
||||||
t.Errorf("string mismatch.\nwant: %q\ngot: %q", keyStrRSA, id.String())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestID_FromMPCKey(t *testing.T) {
|
|
||||||
// Generate new MPC keyset
|
|
||||||
ks, err := mpc.NewKeyset()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("failed to generate MPC keyset: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get public key from validator share
|
|
||||||
pubKey := ks.Val().PublicKey()
|
|
||||||
if len(pubKey) != 65 {
|
|
||||||
t.Fatalf("expected 65-byte uncompressed public key, got %d bytes", len(pubKey))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create crypto.PubKey from raw bytes
|
|
||||||
cryptoPubKey, err := crypto.UnmarshalSecp256k1PublicKey(pubKey)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("failed to unmarshal public key: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create DID Key ID
|
|
||||||
id, err := NewID(cryptoPubKey)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("failed to create DID Key ID: %v", err)
|
|
||||||
}
|
|
||||||
log.Printf("%s\n", id.String())
|
|
||||||
|
|
||||||
// Verify the key can be parsed back
|
|
||||||
parsed, err := Parse(id.String())
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("failed to parse DID Key string: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify the parsed key matches original
|
|
||||||
if parsed.String() != id.String() {
|
|
||||||
t.Errorf("parsed key doesn't match original.\nwant: %q\ngot: %q",
|
|
||||||
id.String(), parsed.String())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify we can get back a valid verify key
|
|
||||||
verifyKey, err := id.VerifyKey()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("failed to get verify key: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify the key is the right type and length
|
|
||||||
rawKey, ok := verifyKey.([]byte)
|
|
||||||
if !ok {
|
|
||||||
t.Fatalf("expected []byte verify key, got %T", verifyKey)
|
|
||||||
}
|
|
||||||
if len(rawKey) != 65 && len(rawKey) != 33 {
|
|
||||||
t.Errorf("invalid key length %d, expected 65 or 33 bytes", len(rawKey))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
package spec
|
|
||||||
|
|
||||||
import (
|
|
||||||
"crypto/sha256"
|
|
||||||
"encoding/base64"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/golang-jwt/jwt"
|
|
||||||
"github.com/onsonr/sonr/crypto/mpc"
|
|
||||||
)
|
|
||||||
|
|
||||||
// MPCSigningMethod implements the SigningMethod interface for MPC-based signing
|
|
||||||
type MPCSigningMethod struct {
|
|
||||||
Name string
|
|
||||||
ks ucanKeyshare
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewJWTSigningMethod creates a new MPC signing method with the given keyshare source
|
|
||||||
func NewJWTSigningMethod(name string, ks ucanKeyshare) *MPCSigningMethod {
|
|
||||||
return &MPCSigningMethod{
|
|
||||||
Name: name,
|
|
||||||
ks: ks,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Alg returns the signing method's name
|
|
||||||
func (m *MPCSigningMethod) Alg() string {
|
|
||||||
return m.Name
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify verifies the signature using the MPC public key
|
|
||||||
func (m *MPCSigningMethod) Verify(signingString, signature string, key interface{}) error {
|
|
||||||
// Decode the signature
|
|
||||||
sig, err := base64.RawURLEncoding.DecodeString(signature)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hash the signing string
|
|
||||||
hasher := sha256.New()
|
|
||||||
hasher.Write([]byte(signingString))
|
|
||||||
digest := hasher.Sum(nil)
|
|
||||||
|
|
||||||
// Verify using the keyshare's public key
|
|
||||||
valid, err := mpc.VerifySignature(m.ks.valShare.PublicKey(), digest, sig)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("failed to verify signature: %w", err)
|
|
||||||
}
|
|
||||||
if !valid {
|
|
||||||
return fmt.Errorf("invalid signature")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sign signs the data using MPC
|
|
||||||
func (m *MPCSigningMethod) Sign(signingString string, key interface{}) (string, error) {
|
|
||||||
// Hash the signing string
|
|
||||||
hasher := sha256.New()
|
|
||||||
hasher.Write([]byte(signingString))
|
|
||||||
digest := hasher.Sum(nil)
|
|
||||||
|
|
||||||
// Create signing functions
|
|
||||||
signFunc, err := m.ks.userShare.SignFunc(digest)
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("failed to create sign function: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
valSignFunc, err := m.ks.valShare.SignFunc(digest)
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("failed to create validator sign function: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Run the signing protocol
|
|
||||||
sig, err := mpc.ExecuteSigning(valSignFunc, signFunc)
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("failed to run sign protocol: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Serialize the signature
|
|
||||||
sigBytes, err := mpc.SerializeSignature(sig)
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("failed to serialize signature: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Encode the signature
|
|
||||||
encoded := base64.RawURLEncoding.EncodeToString(sigBytes)
|
|
||||||
return encoded, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
// Register the MPC signing method
|
|
||||||
jwt.RegisterSigningMethod("MPC256", func() jwt.SigningMethod {
|
|
||||||
return &MPCSigningMethod{
|
|
||||||
Name: "MPC256",
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
+11
-11
@@ -21,7 +21,7 @@ import (
|
|||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
"github.com/libp2p/go-libp2p/core/crypto"
|
"github.com/libp2p/go-libp2p/core/crypto"
|
||||||
mh "github.com/multiformats/go-multihash"
|
mh "github.com/multiformats/go-multihash"
|
||||||
"github.com/onsonr/sonr/crypto/ucan/didkey"
|
"github.com/onsonr/sonr/crypto/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrInvalidToken indicates an access token is invalid
|
// ErrInvalidToken indicates an access token is invalid
|
||||||
@@ -47,8 +47,8 @@ const (
|
|||||||
type Token struct {
|
type Token struct {
|
||||||
// Entire UCAN as a signed JWT string
|
// Entire UCAN as a signed JWT string
|
||||||
Raw string
|
Raw string
|
||||||
Issuer didkey.ID
|
Issuer keys.DID
|
||||||
Audience didkey.ID
|
Audience keys.DID
|
||||||
// the "inputs" to this token, a chain UCAN tokens with broader scopes &
|
// the "inputs" to this token, a chain UCAN tokens with broader scopes &
|
||||||
// deadlines than this token
|
// deadlines than this token
|
||||||
Proofs []Proof `json:"prf,omitempty"`
|
Proofs []Proof `json:"prf,omitempty"`
|
||||||
@@ -261,12 +261,12 @@ func (a *pkSource) newToken(audienceDID string, prf []Proof, att Attenuations, f
|
|||||||
// DIDPubKeyResolver turns did:key Decentralized IDentifiers into a public key,
|
// DIDPubKeyResolver turns did:key Decentralized IDentifiers into a public key,
|
||||||
// possibly using a network request
|
// possibly using a network request
|
||||||
type DIDPubKeyResolver interface {
|
type DIDPubKeyResolver interface {
|
||||||
ResolveDIDKey(ctx context.Context, did string) (didkey.ID, error)
|
ResolveDIDKey(ctx context.Context, did string) (keys.DID, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DIDStringFromPublicKey creates a did:key identifier string from a public key
|
// DIDStringFromPublicKey creates a did:key identifier string from a public key
|
||||||
func DIDStringFromPublicKey(pub crypto.PubKey) (string, error) {
|
func DIDStringFromPublicKey(pub crypto.PubKey) (string, error) {
|
||||||
id, err := didkey.NewID(pub)
|
id, err := keys.NewDID(pub)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@@ -279,8 +279,8 @@ func DIDStringFromPublicKey(pub crypto.PubKey) (string, error) {
|
|||||||
type StringDIDPubKeyResolver struct{}
|
type StringDIDPubKeyResolver struct{}
|
||||||
|
|
||||||
// ResolveDIDKey extracts a public key from a did:key string
|
// ResolveDIDKey extracts a public key from a did:key string
|
||||||
func (StringDIDPubKeyResolver) ResolveDIDKey(ctx context.Context, didStr string) (didkey.ID, error) {
|
func (StringDIDPubKeyResolver) ResolveDIDKey(ctx context.Context, didStr string) (keys.DID, error) {
|
||||||
return didkey.Parse(didStr)
|
return keys.Parse(didStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenParser parses a raw string into a Token
|
// TokenParser parses a raw string into a Token
|
||||||
@@ -315,11 +315,11 @@ func (p *TokenParser) parseAndVerify(ctx context.Context, raw string, child *Tok
|
|||||||
return nil, fmt.Errorf("parser fail")
|
return nil, fmt.Errorf("parser fail")
|
||||||
}
|
}
|
||||||
|
|
||||||
var iss didkey.ID
|
var iss keys.DID
|
||||||
// TODO(b5): we're double parsing here b/c the jwt lib we're using doesn't expose
|
// TODO(b5): we're double parsing here b/c the jwt lib we're using doesn't expose
|
||||||
// an API (that I know of) for storing parsed issuer / audience
|
// an API (that I know of) for storing parsed issuer / audience
|
||||||
if issStr, ok := mc["iss"].(string); ok {
|
if issStr, ok := mc["iss"].(string); ok {
|
||||||
iss, err = didkey.Parse(issStr)
|
iss, err = keys.Parse(issStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -327,11 +327,11 @@ func (p *TokenParser) parseAndVerify(ctx context.Context, raw string, child *Tok
|
|||||||
return nil, fmt.Errorf(`"iss" key is not in claims`)
|
return nil, fmt.Errorf(`"iss" key is not in claims`)
|
||||||
}
|
}
|
||||||
|
|
||||||
var aud didkey.ID
|
var aud keys.DID
|
||||||
// TODO(b5): we're double parsing here b/c the jwt lib we're using doesn't expose
|
// TODO(b5): we're double parsing here b/c the jwt lib we're using doesn't expose
|
||||||
// an API (that I know of) for storing parsed issuer / audience
|
// an API (that I know of) for storing parsed issuer / audience
|
||||||
if audStr, ok := mc["aud"].(string); ok {
|
if audStr, ok := mc["aud"].(string); ok {
|
||||||
aud, err = didkey.Parse(audStr)
|
aud, err = keys.Parse(audStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
# https://taskfile.dev
|
|
||||||
|
|
||||||
version: "3"
|
|
||||||
|
|
||||||
vars:
|
|
||||||
GREETING: Hello, World!
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
init:sonrd:
|
|
||||||
cmds:
|
|
||||||
- sonrd init {{.NODE_NAME}} --chain-id {{.CHAIN_ID}} --home {{.HOME}}
|
|
||||||
|
|
||||||
init:ipfs:
|
|
||||||
cmds:
|
|
||||||
- ipfs init
|
|
||||||
|
|
||||||
init:hway:
|
|
||||||
cmds:
|
|
||||||
- sonrd hway init {{.NODE_NAME}} --home {{.HOME}}
|
|
||||||
|
|
||||||
start:sonrd:
|
|
||||||
cmds:
|
|
||||||
- sonrd start --home {{.HOME}}
|
|
||||||
|
|
||||||
start:ipfs:
|
|
||||||
cmds:
|
|
||||||
- ipfs daemon
|
|
||||||
|
|
||||||
start:hway:
|
|
||||||
cmds:
|
|
||||||
- sonrd hway start --home {{.HOME}}
|
|
||||||
|
|
||||||
stop:sonrd:
|
|
||||||
cmds:
|
|
||||||
- sonrd stop
|
|
||||||
|
|
||||||
stop:ipfs:
|
|
||||||
cmds:
|
|
||||||
- ipfs daemon stop
|
|
||||||
|
|
||||||
stop:hway:
|
|
||||||
cmds:
|
|
||||||
- sonrd hway stop
|
|
||||||
|
|
||||||
clean:sonrd:
|
|
||||||
cmds:
|
|
||||||
- rm -rf {{.HOME}}
|
|
||||||
|
|
||||||
clean:ipfs:
|
|
||||||
cmds:
|
|
||||||
- rm -rf ~/.ipfs
|
|
||||||
|
|
||||||
clean:hway:
|
|
||||||
cmds:
|
|
||||||
- rm -rf {{.HOME}}/data/hway
|
|
||||||
@@ -1,251 +0,0 @@
|
|||||||
{
|
|
||||||
"lockfile_version": "1",
|
|
||||||
"packages": {
|
|
||||||
"air@latest": {
|
|
||||||
"last_modified": "2024-11-16T04:25:12Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#air",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.61.1",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/0s90vbnmsyyixs0991md21pbrw8babfb-air-1.61.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/0s90vbnmsyyixs0991md21pbrw8babfb-air-1.61.1"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/8mpw2asxs297v26fxqy2y1bq438f344l-air-1.61.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/8mpw2asxs297v26fxqy2y1bq438f344l-air-1.61.1"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/abminkf7ldqf9vm14xx5wvsrdx3wrvy6-air-1.61.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/abminkf7ldqf9vm14xx5wvsrdx3wrvy6-air-1.61.1"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/ajx8v5rbbvglncb97yybg3x9kn95gfrm-air-1.61.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/ajx8v5rbbvglncb97yybg3x9kn95gfrm-air-1.61.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bun@latest": {
|
|
||||||
"last_modified": "2024-11-18T00:41:09Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/5083ec887760adfe12af64830a66807423a859a7#bun",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.1.34",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/xnj00gq1mfffvgyisghk4m9f38gc5c5c-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/xnj00gq1mfffvgyisghk4m9f38gc5c5c-bun-1.1.34"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/kccpzv8fb7swmmxbhv805qzq242rhy33-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/kccpzv8fb7swmmxbhv805qzq242rhy33-bun-1.1.34"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/8h5k3l4fpgs3al2wvna7x9ybyyc8k36d-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/8h5k3l4fpgs3al2wvna7x9ybyyc8k36d-bun-1.1.34"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/x089g4srqw71w5jnc87vxbh7m12498i0-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/x089g4srqw71w5jnc87vxbh7m12498i0-bun-1.1.34"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ipfs@latest": {
|
|
||||||
"last_modified": "2023-02-24T09:01:09Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#ipfs",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "0.17.0"
|
|
||||||
},
|
|
||||||
"skate@latest": {
|
|
||||||
"last_modified": "2024-11-16T04:25:12Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#skate",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/q6yhpyfbqiabyic6ymx5rp2db62bnbvr-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/q6yhpyfbqiabyic6ymx5rp2db62bnbvr-skate-1.0.0"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/q55dbgvc4xwvr2g02dks6j2j699qni2k-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/q55dbgvc4xwvr2g02dks6j2j699qni2k-skate-1.0.0"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/s1hy525y8ciya3nrns9kryy3jlcw8igv-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/s1hy525y8ciya3nrns9kryy3jlcw8igv-skate-1.0.0"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/8s03iazymz77nv6pjxpz7wair0m646wv-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/8s03iazymz77nv6pjxpz7wair0m646wv-skate-1.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"templ@latest": {
|
|
||||||
"last_modified": "2024-11-16T04:25:12Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#templ",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "0.2.793",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/ivargvf76g71k5gk3iz4al52rsy28w38-templ-0.2.793",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/ivargvf76g71k5gk3iz4al52rsy28w38-templ-0.2.793"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/03654iddn006yx5j1lqq496hax60v8p5-templ-0.2.793",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/03654iddn006yx5j1lqq496hax60v8p5-templ-0.2.793"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/blvd5wbd1ix6m745s4zx3b84kwzprshq-templ-0.2.793",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/blvd5wbd1ix6m745s4zx3b84kwzprshq-templ-0.2.793"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/sn5h79d36r86i6a8rm1k52c2ij1s32kx-templ-0.2.793",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/sn5h79d36r86i6a8rm1k52c2ij1s32kx-templ-0.2.793"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tigerbeetle@latest": {
|
|
||||||
"last_modified": "2024-11-16T04:25:12Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#tigerbeetle",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "0.16.12",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/mm3jzwf24p35afr55v7kl5a0h6962i6p-tigerbeetle-0.16.12",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/mm3jzwf24p35afr55v7kl5a0h6962i6p-tigerbeetle-0.16.12"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/4106973gg3crfxq0gwrgwn4hcx64mzyy-tigerbeetle-0.16.12",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/4106973gg3crfxq0gwrgwn4hcx64mzyy-tigerbeetle-0.16.12"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/6lnwnr3mvdamm5lxjjqkaagw2pyqlq0a-tigerbeetle-0.16.12",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/6lnwnr3mvdamm5lxjjqkaagw2pyqlq0a-tigerbeetle-0.16.12"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/afrj2ph61xz0lh7f3d1g1d7v2rslbvny-tigerbeetle-0.16.12",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/afrj2ph61xz0lh7f3d1g1d7v2rslbvny-tigerbeetle-0.16.12"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,16 +3,10 @@ version: "0.6"
|
|||||||
processes:
|
processes:
|
||||||
sonr:
|
sonr:
|
||||||
namespace: devnet
|
namespace: devnet
|
||||||
background: true
|
|
||||||
command: "make sh-testnet"
|
command: "make sh-testnet"
|
||||||
restart: never
|
|
||||||
max_restarts: 1
|
|
||||||
|
|
||||||
hway:
|
hway:
|
||||||
namespace: devnet
|
namespace: devnet
|
||||||
background: true
|
|
||||||
command: "./build/hway"
|
command: "./build/hway"
|
||||||
restart: never
|
|
||||||
max_restarts: 1
|
|
||||||
depends:
|
depends:
|
||||||
- sonr
|
- sonr
|
||||||
@@ -1,202 +0,0 @@
|
|||||||
import "https://pkl.sh/ipfs.net/0.0.1/Config.pkl"
|
|
||||||
|
|
||||||
API {
|
|
||||||
HTTPHeaders {
|
|
||||||
`Access-Control-Allow-Origin` = new { "*" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Addresses {
|
|
||||||
API = "/ip4/127.0.0.1/tcp/5001"
|
|
||||||
Gateway = "/ip4/127.0.0.1/tcp/8080"
|
|
||||||
Swarm = new {
|
|
||||||
"/ip4/0.0.0.0/tcp/4001"
|
|
||||||
"/ip6/::/tcp/4001"
|
|
||||||
"/ip4/0.0.0.0/udp/4001/quic"
|
|
||||||
"/ip6/::/udp/4001/quic"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Bootstrap {
|
|
||||||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa"
|
|
||||||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb"
|
|
||||||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt"
|
|
||||||
"/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
|
|
||||||
"/ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
|
|
||||||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN"
|
|
||||||
}
|
|
||||||
|
|
||||||
Datastore {
|
|
||||||
BloomFilterSize = 0
|
|
||||||
GCPeriod = "1h"
|
|
||||||
HashOnRead = false
|
|
||||||
StorageGCWatermark = 90
|
|
||||||
StorageMax = "10GB"
|
|
||||||
Spec = new {
|
|
||||||
mounts = new {
|
|
||||||
new {
|
|
||||||
prefix = "flatfs.datastore"
|
|
||||||
child = new {
|
|
||||||
path = "blocks"
|
|
||||||
shardFunc = "/repo/flatfs/shard/v1/next-to-last/2"
|
|
||||||
type = "flatfs"
|
|
||||||
sync = true
|
|
||||||
}
|
|
||||||
mountpoint = "/blocks"
|
|
||||||
type = "measure"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
prefix = "leveldb.datastore"
|
|
||||||
child = new {
|
|
||||||
compression = "none"
|
|
||||||
path = "datastore"
|
|
||||||
type = "levelds"
|
|
||||||
}
|
|
||||||
mountpoint = "/"
|
|
||||||
type = "measure"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type = "mount"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Discovery {
|
|
||||||
MDNS = new {
|
|
||||||
Enabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Experimental {
|
|
||||||
StrategicProviding = false
|
|
||||||
UrlstoreEnabled = false
|
|
||||||
AcceleratedDHTClient = false
|
|
||||||
GraphsyncEnabled = false
|
|
||||||
FilestoreEnabled = false
|
|
||||||
Libp2pStreamMounting = false
|
|
||||||
P2pHttpProxy = false
|
|
||||||
}
|
|
||||||
|
|
||||||
Gateway {
|
|
||||||
HTTPHeaders = new {
|
|
||||||
`Access-Control-Allow-Headers` = new {
|
|
||||||
"X-Requested-With"
|
|
||||||
"Range"
|
|
||||||
"User-Agent"
|
|
||||||
}
|
|
||||||
`Access-Control-Allow-Methods` = new { "GET" }
|
|
||||||
`Access-Control-Allow-Origin` = new { "*" }
|
|
||||||
}
|
|
||||||
NoDNSLink = false
|
|
||||||
NoFetch = false
|
|
||||||
PublicGateways = null
|
|
||||||
RootRedirect = ""
|
|
||||||
Writable = false
|
|
||||||
}
|
|
||||||
|
|
||||||
Identity {
|
|
||||||
PrivKey = "CAESQP0FRhYf5Nvxg0wrbN+VTK7kWdgy+3AKoxU3vNH0K9FHVpXyx6/mHKyCaPjqI11YsHUW0B2ZODGROPafyS6IeWY="
|
|
||||||
PeerID = "12D3KooWFeMr1tHFs8WAF11rKDULJbmKg9rE5aVhYJU23oC7pqjB"
|
|
||||||
}
|
|
||||||
|
|
||||||
Ipns {
|
|
||||||
RecordLifetime = ""
|
|
||||||
RepublishPeriod = ""
|
|
||||||
ResolveCacheSize = 128
|
|
||||||
}
|
|
||||||
|
|
||||||
Migration {
|
|
||||||
Keep = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
Mounts {
|
|
||||||
IPNS = "/ipns"
|
|
||||||
FuseAllowOther = false
|
|
||||||
IPFS = "/ipfs"
|
|
||||||
}
|
|
||||||
|
|
||||||
Peering {
|
|
||||||
Peers = new {
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-1.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcFf2FH3CEgTNHeMRGhN7HNHU1EXAxoEk6EFuSyXCsvRE"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-2.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcFmLd5ySfk2WZuJ1mfSWLDjdmHZq7rSAua4GoeSQfs1z"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-3.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcfFmzSDVbwexQ9Au2pt5YEXHK5xajwgaU6PpkbLWerMa"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-4.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcfJeB3Js1FG7T8YaZATEiaHqNKVdQfybYYkbT1knUswx"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-5.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcfVvzK4tMdFmpJjEKDUoqRgP4W9FnmJoziYX5GXJJ8eZ"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-6.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcfZD3VKrUxyP9BbyUnZDpbqDnT7cQ4WjPP8TRLXaoE7G"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-7.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcfZP2LuW4jxviTeG8fi28qjnZScACb8PEgHAc17ZEri3"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-8.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcfgsJsMtx6qJb74akCw1M24X1zFwgGo11h1cuhwQjtJP"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-9.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "Qmcfr2FC7pFzJbTSDfYaSy1J8Uuy8ccGLeLyqJCKJvTHMi"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-10.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcfR3V5YAtHBzxVACWCzXTt26SyEkxdwhGJ6875A8BuWx"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-11.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "Qmcfuo1TM9uUiJp6dTbm915Rf1aTqm3a3dnmCdDQLHgvL5"
|
|
||||||
}
|
|
||||||
new {
|
|
||||||
Addrs = new { "/dnsaddr/node-12.ingress.cloudflare-ipfs.com" }
|
|
||||||
ID = "QmcfV2sg9zaq7UUHVCGuSvT2M2rnLBAPsiE79vVyK3Cuev"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Provider {
|
|
||||||
Strategy = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
Pubsub {
|
|
||||||
Router = ""
|
|
||||||
DisableSigning = false
|
|
||||||
}
|
|
||||||
|
|
||||||
Reprovider {
|
|
||||||
Strategy = "all"
|
|
||||||
Interval = "12h"
|
|
||||||
}
|
|
||||||
|
|
||||||
Routing {
|
|
||||||
Methods = null
|
|
||||||
Routers = null
|
|
||||||
Type = "dht"
|
|
||||||
}
|
|
||||||
|
|
||||||
Swarm {
|
|
||||||
AddrFilters = null
|
|
||||||
ConnMgr = new {}
|
|
||||||
DisableBandwidthMetrics = false
|
|
||||||
DisableNatPortMap = false
|
|
||||||
RelayClient = new {}
|
|
||||||
ResourceMgr = new {}
|
|
||||||
Transports = new {
|
|
||||||
Multiplexers = new {}
|
|
||||||
Network = new {}
|
|
||||||
Security = new {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
amends "https://pkl.sh/sonr.chain/0.0.2/App.pkl"
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
amends "https://pkl.sh/sonr.chain/0.0.2/Genesis.pkl"
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,404 +0,0 @@
|
|||||||
{
|
|
||||||
"lockfile_version": "1",
|
|
||||||
"packages": {
|
|
||||||
"bun@latest": {
|
|
||||||
"last_modified": "2024-11-18T00:41:09Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/5083ec887760adfe12af64830a66807423a859a7#bun",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.1.34",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/xnj00gq1mfffvgyisghk4m9f38gc5c5c-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/xnj00gq1mfffvgyisghk4m9f38gc5c5c-bun-1.1.34"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/kccpzv8fb7swmmxbhv805qzq242rhy33-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/kccpzv8fb7swmmxbhv805qzq242rhy33-bun-1.1.34"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/8h5k3l4fpgs3al2wvna7x9ybyyc8k36d-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/8h5k3l4fpgs3al2wvna7x9ybyyc8k36d-bun-1.1.34"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/x089g4srqw71w5jnc87vxbh7m12498i0-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/x089g4srqw71w5jnc87vxbh7m12498i0-bun-1.1.34"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cloudflared@latest": {
|
|
||||||
"last_modified": "2024-11-18T00:41:09Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/5083ec887760adfe12af64830a66807423a859a7#cloudflared",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "2024.11.0",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/95knk04xlh78swlk9a6kg524rfykzzmz-cloudflared-2024.11.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/95knk04xlh78swlk9a6kg524rfykzzmz-cloudflared-2024.11.0"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/2d6mh1pi99m19bc9m3phcsfgygbfpyig-cloudflared-2024.11.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/2d6mh1pi99m19bc9m3phcsfgygbfpyig-cloudflared-2024.11.0"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/4dii539ldfv0f9n7xigfy19ivrg3ng2n-cloudflared-2024.11.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/4dii539ldfv0f9n7xigfy19ivrg3ng2n-cloudflared-2024.11.0"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/hlnabpfi58mpd16symqb7kp8xc2lf1pf-cloudflared-2024.11.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/hlnabpfi58mpd16symqb7kp8xc2lf1pf-cloudflared-2024.11.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"go@1.23": {
|
|
||||||
"last_modified": "2024-11-16T04:25:12Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#go",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.23.3",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ipfs@latest": {
|
|
||||||
"last_modified": "2023-02-24T09:01:09Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#ipfs",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "0.17.0"
|
|
||||||
},
|
|
||||||
"matrix-synapse@latest": {
|
|
||||||
"last_modified": "2024-11-18T00:41:09Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/5083ec887760adfe12af64830a66807423a859a7#matrix-synapse",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.119.0",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/dfgj6lgmxy18qd5v9z91376i0b1z06jx-matrix-synapse-wrapped-1.119.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/dfgj6lgmxy18qd5v9z91376i0b1z06jx-matrix-synapse-wrapped-1.119.0"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/570l35c4n3qdxaszrf6bz4rrrw87pkil-matrix-synapse-wrapped-1.119.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/570l35c4n3qdxaszrf6bz4rrrw87pkil-matrix-synapse-wrapped-1.119.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"postgresql@latest": {
|
|
||||||
"last_modified": "2024-11-22T01:27:12Z",
|
|
||||||
"plugin_version": "0.0.2",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/8edf06bea5bcbee082df1b7369ff973b91618b8d#postgresql",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "16.4",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/j6n9b877yhrnkp9z9p1gllxpnfvdrbrb-postgresql-16.4",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "man",
|
|
||||||
"path": "/nix/store/465icqyw6m38jxpx5yr1ri26ki0f96sz-postgresql-16.4-man",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lib",
|
|
||||||
"path": "/nix/store/l9w6d22hrcrxkv005g2gbzhvk64vp4rm-postgresql-16.4-lib"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "dev",
|
|
||||||
"path": "/nix/store/jvw9nsblsbh9m4n551sq7qnw82hhsv08-postgresql-16.4-dev"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "doc",
|
|
||||||
"path": "/nix/store/fk1x8k1qsiaasp73qnzyrzw4ylaf1xy6-postgresql-16.4-doc"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/j6n9b877yhrnkp9z9p1gllxpnfvdrbrb-postgresql-16.4"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/2ywn472iqfdiyw5w4frm63rn3nyrkgn1-postgresql-16.4",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "man",
|
|
||||||
"path": "/nix/store/650fqsb195p9x00jgqgzkisjwddbvgfd-postgresql-16.4-man",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "debug",
|
|
||||||
"path": "/nix/store/wm34pd2y04mjgvhanqw4ymmhds56l9da-postgresql-16.4-debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "dev",
|
|
||||||
"path": "/nix/store/ai2ckvi44jdh9i5078gj5brdwsxk4ydm-postgresql-16.4-dev"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "doc",
|
|
||||||
"path": "/nix/store/qys6z2y4iwr0f6ahpq9gcv9hb551w479-postgresql-16.4-doc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lib",
|
|
||||||
"path": "/nix/store/pii1vyxbzggi7aqy7xglav8p52c0qfp2-postgresql-16.4-lib"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/2ywn472iqfdiyw5w4frm63rn3nyrkgn1-postgresql-16.4"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/5k1p2jjnsdcsvk8zpsqxlzhajh1x9ghq-postgresql-16.4",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "man",
|
|
||||||
"path": "/nix/store/p8b24icm7xiwlky1dggqcinn1ah92agl-postgresql-16.4-man",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "dev",
|
|
||||||
"path": "/nix/store/cvl9wdw387jk02bbhm1qvidzl18hayyr-postgresql-16.4-dev"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "doc",
|
|
||||||
"path": "/nix/store/ysmwxhh3s2l1k2jkzxq0bv6vdzlgr14j-postgresql-16.4-doc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lib",
|
|
||||||
"path": "/nix/store/4va0gp1c718dk1zyqs0il2gn7a81spr0-postgresql-16.4-lib"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/5k1p2jjnsdcsvk8zpsqxlzhajh1x9ghq-postgresql-16.4"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/ypx0whdqvwbql73nija0zrm4z3rgcm9l-postgresql-16.4",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "man",
|
|
||||||
"path": "/nix/store/7x75jfmpc7x36863cf6kr61ikcz787ki-postgresql-16.4-man",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "doc",
|
|
||||||
"path": "/nix/store/4c7h8sg2i0jim6hzmzhjw5nn0zmx1xvd-postgresql-16.4-doc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lib",
|
|
||||||
"path": "/nix/store/xd8ks7bs2p7gjgk8h98bfg8801swl9m0-postgresql-16.4-lib"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "debug",
|
|
||||||
"path": "/nix/store/pxhd0wq2sbafamjmcp7f890qza76gwav-postgresql-16.4-debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "dev",
|
|
||||||
"path": "/nix/store/20i6jma3fbm4sw060hdnrs311fw4aczj-postgresql-16.4-dev"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/ypx0whdqvwbql73nija0zrm4z3rgcm9l-postgresql-16.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"skate@latest": {
|
|
||||||
"last_modified": "2024-11-16T04:25:12Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#skate",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/q6yhpyfbqiabyic6ymx5rp2db62bnbvr-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/q6yhpyfbqiabyic6ymx5rp2db62bnbvr-skate-1.0.0"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/q55dbgvc4xwvr2g02dks6j2j699qni2k-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/q55dbgvc4xwvr2g02dks6j2j699qni2k-skate-1.0.0"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/s1hy525y8ciya3nrns9kryy3jlcw8igv-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/s1hy525y8ciya3nrns9kryy3jlcw8igv-skate-1.0.0"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/8s03iazymz77nv6pjxpz7wair0m646wv-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/8s03iazymz77nv6pjxpz7wair0m646wv-skate-1.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tigerbeetle@latest": {
|
|
||||||
"last_modified": "2024-11-16T04:25:12Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#tigerbeetle",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "0.16.12",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/mm3jzwf24p35afr55v7kl5a0h6962i6p-tigerbeetle-0.16.12",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/mm3jzwf24p35afr55v7kl5a0h6962i6p-tigerbeetle-0.16.12"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/4106973gg3crfxq0gwrgwn4hcx64mzyy-tigerbeetle-0.16.12",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/4106973gg3crfxq0gwrgwn4hcx64mzyy-tigerbeetle-0.16.12"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/6lnwnr3mvdamm5lxjjqkaagw2pyqlq0a-tigerbeetle-0.16.12",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/6lnwnr3mvdamm5lxjjqkaagw2pyqlq0a-tigerbeetle-0.16.12"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/afrj2ph61xz0lh7f3d1g1d7v2rslbvny-tigerbeetle-0.16.12",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/afrj2ph61xz0lh7f3d1g1d7v2rslbvny-tigerbeetle-0.16.12"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
version: "0.6"
|
|
||||||
|
|
||||||
processes:
|
|
||||||
ipfs:
|
|
||||||
namespace: testnet
|
|
||||||
command: "devbox run ipfs"
|
|
||||||
background: true
|
|
||||||
availability:
|
|
||||||
restart: never
|
|
||||||
max_restarts: 0
|
|
||||||
|
|
||||||
sonr:
|
|
||||||
namespace: testnet
|
|
||||||
background: true
|
|
||||||
command: "devbox run sonr"
|
|
||||||
restart: never
|
|
||||||
max_restarts: 1
|
|
||||||
depends:
|
|
||||||
- ipfs
|
|
||||||
|
|
||||||
hway:
|
|
||||||
namespace: testnet
|
|
||||||
background: true
|
|
||||||
command: "devbox run hway"
|
|
||||||
restart: never
|
|
||||||
max_restarts: 1
|
|
||||||
depends:
|
|
||||||
- ipfs
|
|
||||||
- sonr
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
/*
|
|
||||||
This file defines the database schema for the PostgresQL ("psql") event sink
|
|
||||||
implementation in CometBFT. The operator must create a database and install
|
|
||||||
this schema before using the database to index events.
|
|
||||||
*/
|
|
||||||
|
|
||||||
-- The blocks table records metadata about each block.
|
|
||||||
-- The block record does not include its events or transactions (see tx_results).
|
|
||||||
CREATE TABLE blocks (
|
|
||||||
rowid BIGSERIAL PRIMARY KEY,
|
|
||||||
|
|
||||||
height BIGINT NOT NULL,
|
|
||||||
chain_id VARCHAR NOT NULL,
|
|
||||||
|
|
||||||
-- When this block header was logged into the sink, in UTC.
|
|
||||||
created_at TIMESTAMPTZ NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE (height, chain_id)
|
|
||||||
);
|
|
||||||
|
|
||||||
-- Index blocks by height and chain, since we need to resolve block IDs when
|
|
||||||
-- indexing transaction records and transaction events.
|
|
||||||
CREATE INDEX idx_blocks_height_chain ON blocks(height, chain_id);
|
|
||||||
|
|
||||||
-- The tx_results table records metadata about transaction results. Note that
|
|
||||||
-- the events from a transaction are stored separately.
|
|
||||||
CREATE TABLE tx_results (
|
|
||||||
rowid BIGSERIAL PRIMARY KEY,
|
|
||||||
|
|
||||||
-- The block to which this transaction belongs.
|
|
||||||
block_id BIGINT NOT NULL REFERENCES blocks(rowid),
|
|
||||||
-- The sequential index of the transaction within the block.
|
|
||||||
index INTEGER NOT NULL,
|
|
||||||
-- When this result record was logged into the sink, in UTC.
|
|
||||||
created_at TIMESTAMPTZ NOT NULL,
|
|
||||||
-- The hex-encoded hash of the transaction.
|
|
||||||
tx_hash VARCHAR NOT NULL,
|
|
||||||
-- The protobuf wire encoding of the TxResult message.
|
|
||||||
tx_result BYTEA NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE (block_id, index)
|
|
||||||
);
|
|
||||||
|
|
||||||
-- The events table records events. All events (both block and transaction) are
|
|
||||||
-- associated with a block ID; transaction events also have a transaction ID.
|
|
||||||
CREATE TABLE events (
|
|
||||||
rowid BIGSERIAL PRIMARY KEY,
|
|
||||||
|
|
||||||
-- The block and transaction this event belongs to.
|
|
||||||
-- If tx_id is NULL, this is a block event.
|
|
||||||
block_id BIGINT NOT NULL REFERENCES blocks(rowid),
|
|
||||||
tx_id BIGINT NULL REFERENCES tx_results(rowid),
|
|
||||||
|
|
||||||
-- The application-defined type label for the event.
|
|
||||||
type VARCHAR NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
-- The attributes table records event attributes.
|
|
||||||
CREATE TABLE attributes (
|
|
||||||
event_id BIGINT NOT NULL REFERENCES events(rowid),
|
|
||||||
key VARCHAR NOT NULL, -- bare key
|
|
||||||
composite_key VARCHAR NOT NULL, -- composed type.key
|
|
||||||
value VARCHAR NULL,
|
|
||||||
|
|
||||||
UNIQUE (event_id, key)
|
|
||||||
);
|
|
||||||
|
|
||||||
-- A joined view of events and their attributes. Events that do not have any
|
|
||||||
-- attributes are represented as a single row with empty key and value fields.
|
|
||||||
CREATE VIEW event_attributes AS
|
|
||||||
SELECT block_id, tx_id, type, key, composite_key, value
|
|
||||||
FROM events LEFT JOIN attributes ON (events.rowid = attributes.event_id);
|
|
||||||
|
|
||||||
-- A joined view of all block events (those having tx_id NULL).
|
|
||||||
CREATE VIEW block_events AS
|
|
||||||
SELECT blocks.rowid as block_id, height, chain_id, type, key, composite_key, value
|
|
||||||
FROM blocks JOIN event_attributes ON (blocks.rowid = event_attributes.block_id)
|
|
||||||
WHERE event_attributes.tx_id IS NULL;
|
|
||||||
|
|
||||||
-- A joined view of all transaction events.
|
|
||||||
CREATE VIEW tx_events AS
|
|
||||||
SELECT height, index, chain_id, type, key, composite_key, value, tx_results.created_at
|
|
||||||
FROM blocks JOIN tx_results ON (blocks.rowid = tx_results.block_id)
|
|
||||||
JOIN event_attributes ON (tx_results.rowid = event_attributes.tx_id)
|
|
||||||
WHERE event_attributes.tx_id IS NOT NULL;
|
|
||||||
-44
@@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
|
|
||||||
"packages": [
|
|
||||||
"go@1.22",
|
|
||||||
"bun@latest",
|
|
||||||
"gum@latest",
|
|
||||||
"ipfs@latest",
|
|
||||||
"skate@latest",
|
|
||||||
"air@latest",
|
|
||||||
"go-task@latest",
|
|
||||||
"templ@latest",
|
|
||||||
"tigerbeetle@latest",
|
|
||||||
"process-compose@latest"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"GOPATH": "$HOME/go",
|
|
||||||
"PATH": "./build:$HOME/go/bin:$PATH",
|
|
||||||
"CHAIN_ID": "sonr-testnet-1",
|
|
||||||
"DENOM": "usnr",
|
|
||||||
"KEYRING": "test",
|
|
||||||
"MONIKER": "florence",
|
|
||||||
"BINARY": "sonrd",
|
|
||||||
"ACC0_NAME": "acc0",
|
|
||||||
"ACC1_NAME": "acc1",
|
|
||||||
"ACC0_ADDRESS": "idx1efd63aw40lxf3n4mhf7dzhjkr453axur9vjt6y",
|
|
||||||
"ACC1_ADDRESS": "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd",
|
|
||||||
"ACC0_MNEMONIC": "$(skate get ACC0_MNEMONIC)",
|
|
||||||
"ACC1_MNEMONIC": "$(skate get ACC1_MNEMONIC)",
|
|
||||||
"TUNNEL_TOKEN": "$(skate get CLOUDFLARE_TUNNEL_TOKEN)",
|
|
||||||
"TURNSTILE_SITE_KEY": "$(skate get TURNSTILE_SITE_KEY)",
|
|
||||||
"TEMPL_EXPERIMENT": "rawgo"
|
|
||||||
},
|
|
||||||
"shell": {
|
|
||||||
"scripts": {
|
|
||||||
"deploy": [
|
|
||||||
"gum spin --title='Generating PKL' -- make pkl-gen",
|
|
||||||
"gum spin --title='Building Motr WASM' -- make motr-build",
|
|
||||||
"gum spin --title='Uploading to Bucket' -- make deploy-cdn"
|
|
||||||
],
|
|
||||||
"devnet": ["process-compose up -f deploy/devnet/process-compose.yaml"],
|
|
||||||
"testnet": ["process-compose run -f deploy/testnet/process-compose.yaml"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-443
@@ -1,443 +0,0 @@
|
|||||||
{
|
|
||||||
"lockfile_version": "1",
|
|
||||||
"packages": {
|
|
||||||
"air@latest": {
|
|
||||||
"last_modified": "2024-11-28T07:51:56Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#air",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.61.1",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/0s90vbnmsyyixs0991md21pbrw8babfb-air-1.61.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/0s90vbnmsyyixs0991md21pbrw8babfb-air-1.61.1"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/8mpw2asxs297v26fxqy2y1bq438f344l-air-1.61.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/8mpw2asxs297v26fxqy2y1bq438f344l-air-1.61.1"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/abminkf7ldqf9vm14xx5wvsrdx3wrvy6-air-1.61.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/abminkf7ldqf9vm14xx5wvsrdx3wrvy6-air-1.61.1"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/ajx8v5rbbvglncb97yybg3x9kn95gfrm-air-1.61.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/ajx8v5rbbvglncb97yybg3x9kn95gfrm-air-1.61.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bun@latest": {
|
|
||||||
"last_modified": "2024-11-26T10:33:56Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/af51545ec9a44eadf3fe3547610a5cdd882bc34e#bun",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.1.34",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/0hxh6hmzkpg56l11vsnyb287jynhf5f4-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/0hxh6hmzkpg56l11vsnyb287jynhf5f4-bun-1.1.34"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/mc6bikx8a0rqm1xk040w2q861syxpr8d-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/mc6bikx8a0rqm1xk040w2q861syxpr8d-bun-1.1.34"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/fn9h6y3v8il2yax5pm965lacxzj8pq9q-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/fn9h6y3v8il2yax5pm965lacxzj8pq9q-bun-1.1.34"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/mzk71frmsppga4i7sz7ca3r9wxv8slx9-bun-1.1.34",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/mzk71frmsppga4i7sz7ca3r9wxv8slx9-bun-1.1.34"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"go-task@latest": {
|
|
||||||
"last_modified": "2024-11-28T07:51:56Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#go-task",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "3.40.0",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/ynnx5bghcar86a89026rdysvpf51b2li-go-task-3.40.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/ynnx5bghcar86a89026rdysvpf51b2li-go-task-3.40.0"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/2ga7yc7nn0k01n2w3wa6fjbp0i31r6d6-go-task-3.40.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/2ga7yc7nn0k01n2w3wa6fjbp0i31r6d6-go-task-3.40.0"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/0fc73lrh98s9i7qjsxk8gjddxam5kv76-go-task-3.40.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/0fc73lrh98s9i7qjsxk8gjddxam5kv76-go-task-3.40.0"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/x5pbyv5p0yj3fl77j4bmgcj8s7jjcjwn-go-task-3.40.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/x5pbyv5p0yj3fl77j4bmgcj8s7jjcjwn-go-task-3.40.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"go@1.22": {
|
|
||||||
"last_modified": "2024-11-28T07:51:56Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#go_1_22",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.22.9",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/4nf51i4ah186y2jy3fad2fyvpa49qx6q-go-1.22.9",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/4nf51i4ah186y2jy3fad2fyvpa49qx6q-go-1.22.9"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/8w8vzwgp55yl8j1ljgm4wzdgjkvkv5v3-go-1.22.9",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/8w8vzwgp55yl8j1ljgm4wzdgjkvkv5v3-go-1.22.9"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/vlih7j78ki05i8nvzdsxvws7a7ksq04m-go-1.22.9",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/vlih7j78ki05i8nvzdsxvws7a7ksq04m-go-1.22.9"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gum@latest": {
|
|
||||||
"last_modified": "2024-11-16T04:25:12Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#gum",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "0.14.5",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/rzqm62ixipbzbhfagqlic5xxag9a2v82-gum-0.14.5",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/rzqm62ixipbzbhfagqlic5xxag9a2v82-gum-0.14.5"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/3ick2j8z9jgkk3cyc1ik4zkbs3m4583n-gum-0.14.5",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/3ick2j8z9jgkk3cyc1ik4zkbs3m4583n-gum-0.14.5"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/9rh8qxbxgb07v3a62mx9404ynk2yhxrj-gum-0.14.5",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/9rh8qxbxgb07v3a62mx9404ynk2yhxrj-gum-0.14.5"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/1bnivwijzrnzx5h0hd5rywwy8rlhxmw5-gum-0.14.5",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/1bnivwijzrnzx5h0hd5rywwy8rlhxmw5-gum-0.14.5"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ipfs@latest": {
|
|
||||||
"last_modified": "2023-02-24T09:01:09Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#ipfs",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "0.17.0"
|
|
||||||
},
|
|
||||||
"process-compose@latest": {
|
|
||||||
"last_modified": "2024-11-28T07:51:56Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#process-compose",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.40.1",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/ndvh1v1881a3pwxyw1g38mhp5xzrpz16-process-compose-1.40.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/ndvh1v1881a3pwxyw1g38mhp5xzrpz16-process-compose-1.40.1"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/7jw864z6wlzcirsz8fgaj2bw0f22izch-process-compose-1.40.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/7jw864z6wlzcirsz8fgaj2bw0f22izch-process-compose-1.40.1"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/qz9gb3briakkvylq3markxd1s7plaw47-process-compose-1.40.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/qz9gb3briakkvylq3markxd1s7plaw47-process-compose-1.40.1"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/0vq97wmm879440n8plsk1yjc1g28ai85-process-compose-1.40.1",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/0vq97wmm879440n8plsk1yjc1g28ai85-process-compose-1.40.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"skate@latest": {
|
|
||||||
"last_modified": "2024-11-28T07:51:56Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#skate",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/q6yhpyfbqiabyic6ymx5rp2db62bnbvr-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/q6yhpyfbqiabyic6ymx5rp2db62bnbvr-skate-1.0.0"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/q55dbgvc4xwvr2g02dks6j2j699qni2k-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/q55dbgvc4xwvr2g02dks6j2j699qni2k-skate-1.0.0"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/s1hy525y8ciya3nrns9kryy3jlcw8igv-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/s1hy525y8ciya3nrns9kryy3jlcw8igv-skate-1.0.0"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/8s03iazymz77nv6pjxpz7wair0m646wv-skate-1.0.0",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/8s03iazymz77nv6pjxpz7wair0m646wv-skate-1.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"templ@latest": {
|
|
||||||
"last_modified": "2024-11-28T07:51:56Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#templ",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "0.2.793",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/ivargvf76g71k5gk3iz4al52rsy28w38-templ-0.2.793",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/ivargvf76g71k5gk3iz4al52rsy28w38-templ-0.2.793"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/03654iddn006yx5j1lqq496hax60v8p5-templ-0.2.793",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/03654iddn006yx5j1lqq496hax60v8p5-templ-0.2.793"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/blvd5wbd1ix6m745s4zx3b84kwzprshq-templ-0.2.793",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/blvd5wbd1ix6m745s4zx3b84kwzprshq-templ-0.2.793"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/sn5h79d36r86i6a8rm1k52c2ij1s32kx-templ-0.2.793",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/sn5h79d36r86i6a8rm1k52c2ij1s32kx-templ-0.2.793"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tigerbeetle@latest": {
|
|
||||||
"last_modified": "2024-11-30T03:39:21Z",
|
|
||||||
"resolved": "github:NixOS/nixpkgs/4703b8d2c708e13a8cab03d865f90973536dcdf5#tigerbeetle",
|
|
||||||
"source": "devbox-search",
|
|
||||||
"version": "0.16.14",
|
|
||||||
"systems": {
|
|
||||||
"aarch64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/jgcj3ci7708zsgirgjl4cdnaq7x59fm4-tigerbeetle-0.16.14",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/jgcj3ci7708zsgirgjl4cdnaq7x59fm4-tigerbeetle-0.16.14"
|
|
||||||
},
|
|
||||||
"aarch64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/b4zqvr0zanwvdz8c7fs6w1h51fh6pa1j-tigerbeetle-0.16.14",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/b4zqvr0zanwvdz8c7fs6w1h51fh6pa1j-tigerbeetle-0.16.14"
|
|
||||||
},
|
|
||||||
"x86_64-darwin": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/nqi4rb34bdcra0sx59dnipdp347smndx-tigerbeetle-0.16.14",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/nqi4rb34bdcra0sx59dnipdp347smndx-tigerbeetle-0.16.14"
|
|
||||||
},
|
|
||||||
"x86_64-linux": {
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "out",
|
|
||||||
"path": "/nix/store/224jvdiazicsmm1r5dpykk912rzlyhgr-tigerbeetle-0.16.14",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"store_path": "/nix/store/224jvdiazicsmm1r5dpykk912rzlyhgr-tigerbeetle-0.16.14"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
onsonr.dev
|
||||||
@@ -1,3 +1,140 @@
|
|||||||
|
## v0.5.26 (2024-12-13)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- Correct regular expression for version tags in release workflow
|
||||||
|
|
||||||
|
## v0.5.25 (2024-12-11)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- enable GoReleaser releases on tags and snapshots
|
||||||
|
- automate release on tag and workflow dispatch
|
||||||
|
|
||||||
|
## v0.5.24 (2024-12-11)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- prevent duplicate releases
|
||||||
|
|
||||||
|
## v0.5.23 (2024-12-11)
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- rename scheduled release workflow to versioned release
|
||||||
|
- remove changelog from release artifacts
|
||||||
|
|
||||||
|
## v0.5.22 (2024-12-11)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- Implement passkey-based authentication and registration flow
|
||||||
|
|
||||||
|
## v0.5.21 (2024-12-11)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- allow manual triggering of deployment workflow
|
||||||
|
- add start-tui command for interactive mode
|
||||||
|
- add coin selection and update passkey input in registration form
|
||||||
|
- add hway command for Sonr DID gateway
|
||||||
|
- Conditionally install process-compose only if binary not found
|
||||||
|
- Add process-compose support with custom start and down commands
|
||||||
|
- implement passkey registration flow
|
||||||
|
- Improve createProfile form layout with wider max-width and enhanced spacing
|
||||||
|
- improve index page UI with new navigation buttons and remove redundant settings buttons
|
||||||
|
- Make input rows responsive with grid layout for mobile and desktop
|
||||||
|
- enhance index page with additional settings buttons and style adjustments
|
||||||
|
- implement passkey-based authentication
|
||||||
|
- add support for Cloudsmith releases
|
||||||
|
- add go dependency and enhance devbox environment variables
|
||||||
|
- update create profile form placeholders and handle
|
||||||
|
- add DID-based authentication middleware
|
||||||
|
- Add validation for human verification slider sum in CreateProfile form
|
||||||
|
- implement passkey registration flow
|
||||||
|
- Update WebAuthn credential handling with modern browser standards
|
||||||
|
- Streamline passkey registration with automatic form submission
|
||||||
|
- Add credential parsing and logging in register finish handler
|
||||||
|
- Add credential details row with icon after passkey creation
|
||||||
|
- Add form validation for passkey credential input
|
||||||
|
- implement passkey registration flow
|
||||||
|
- Add hidden input to store passkey credential data for form submission
|
||||||
|
- add CI workflow for deploying network
|
||||||
|
- add hway binary support and Homebrew formula
|
||||||
|
- remove username from passkey creation
|
||||||
|
- implement passkey registration flow
|
||||||
|
- add passkey creation functionality
|
||||||
|
- add CNAME for onsonr.dev domain
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- use Unix domain sockets for devnet processes
|
||||||
|
- correct workflow name and improve devnet deployment process
|
||||||
|
- correct title of profile creation page
|
||||||
|
- rename devbox start script to up and remove stop script
|
||||||
|
- Consolidate archive configuration and add LICENSE file
|
||||||
|
- Improve cross-browser passkey credential handling and encoding
|
||||||
|
- Remove commented-out code in passkey registration script
|
||||||
|
- remove line-clamp from tailwind config
|
||||||
|
- remove unnecessary background and restart settings from process-compose.yaml
|
||||||
|
- suppress process-compose server output and log to file
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- remove unnecessary git fetch step in deploy workflow
|
||||||
|
- remove obsolete interchain test dependencies
|
||||||
|
- update index views to use new nebula components
|
||||||
|
- move Wasm related code to pkg/common/wasm
|
||||||
|
- migrate config package to pkg directory
|
||||||
|
- migrate to new configuration system and model definitions
|
||||||
|
- move session package to pkg directory
|
||||||
|
- Refactor registration forms to use UI components
|
||||||
|
- move gateway config to vault package
|
||||||
|
- improve command line flag descriptions and variable names
|
||||||
|
- refactor hway command to use echo framework for server
|
||||||
|
- Update root command to load EnvImpl from cobra flags
|
||||||
|
- Modify command flags and environment loading logic in cmds.go
|
||||||
|
- improve build process and move process-compose.yaml
|
||||||
|
- remove unused devbox.json and related configurations
|
||||||
|
- Improve mobile layout responsiveness for Rows and Columns components
|
||||||
|
- Remove max-w-fit from Rows component
|
||||||
|
- replace session package with context package
|
||||||
|
- rename database initialization function
|
||||||
|
- move session management to dedicated database module
|
||||||
|
- remove unused UI components related to wallet and index pages
|
||||||
|
- consolidate handlers into single files
|
||||||
|
- move gateway and vault packages to internal directory
|
||||||
|
- Move registration form components to dedicated directory
|
||||||
|
- remove unused devbox package
|
||||||
|
- remove devbox configuration
|
||||||
|
- move vault package to app directory
|
||||||
|
- improve code structure within gateway package
|
||||||
|
- move gateway package to app directory
|
||||||
|
- move vault package internal components to root
|
||||||
|
- migrate layout imports to common styles package
|
||||||
|
- Move form templates and styles to common directory
|
||||||
|
- consolidate authentication and DID handling logic
|
||||||
|
- Improve WebAuthn credential handling and validation in register finish route
|
||||||
|
- remove profile card component
|
||||||
|
- Simplify passkey registration UI and move profile component inline
|
||||||
|
- Update credential logging with transport and ID type
|
||||||
|
- Update register handler to use protocol.CredentialDescriptor struct
|
||||||
|
- Update credential handling to use protocol.CredentialDescriptor
|
||||||
|
- improve profile card styling and functionality
|
||||||
|
- Simplify session management and browser information extraction
|
||||||
|
- Update PeerInfo to extract and store comprehensive device information
|
||||||
|
- improve address display in property details
|
||||||
|
- remove unused documentation generation script
|
||||||
|
- replace sonr/pkg/styles/layout with nebula/ui/layout
|
||||||
|
- migrate UI components to nebula module
|
||||||
|
- improve scopes.json structure and update scripts for better usability
|
||||||
|
|
||||||
|
## v0.5.20 (2024-12-07)
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- simplify CI workflow by removing redundant asset publishing steps
|
||||||
|
|
||||||
## v0.5.19 (2024-12-06)
|
## v0.5.19 (2024-12-06)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
<div class="splash">
|
|
||||||
<div class="splash-start">
|
|
||||||
<img class="splash-logo" src="/assets/images/wordmark.svg" alt="Shoelace">
|
|
||||||
|
|
||||||
# <sl-visually-hidden>Shoelace:</sl-visually-hidden> A forward-thinking library of web components.
|
|
||||||
|
|
||||||
- Works with all frameworks 🧩
|
|
||||||
- Works with CDNs 🚛
|
|
||||||
- Fully customizable with CSS 🎨
|
|
||||||
- Includes a dark theme 🌛
|
|
||||||
- Built with accessibility in mind ♿️
|
|
||||||
- First-class [React support](/frameworks/react) ⚛️
|
|
||||||
- Built-in localization 💬
|
|
||||||
- Open source 😸
|
|
||||||
- [More awesome than ever](https://blog.fontawesome.com/shoelace-joins-font-awesome/) 
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="splash-end">
|
|
||||||
<img class="splash-image" src="/assets/images/undraw-content-team.svg" alt="Cartoon of people assembling components while standing on a giant laptop.">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="badges">
|
|
||||||
|
|
||||||
[](https://www.jsdelivr.com/package/npm/@shoelace-style/shoelace)
|
|
||||||
[](https://www.npmjs.com/package/@shoelace-style/shoelace)
|
|
||||||
[](https://github.com/shoelace-style/shoelace/blob/next/LICENSE.md)<br>
|
|
||||||
[](https://discord.gg/mg8f26C)
|
|
||||||
[](https://twitter.com/shoelace_style)
|
|
||||||
[](https://github.com/shoelace-style/shoelace)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Quick Start
|
|
||||||
|
|
||||||
Add the following code to your page.
|
|
||||||
|
|
||||||
<!-- prettier-ignore -->
|
|
||||||
```html
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/themes/light.css" />
|
|
||||||
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/shoelace-autoloader.js"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
Now you have access to all of Shoelace's components! Try adding a button:
|
|
||||||
|
|
||||||
```html:preview:expanded:no-codepen
|
|
||||||
<sl-button>Click me</sl-button>
|
|
||||||
```
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
This will activate Shoelace's experimental autoloader, which registers components on the fly as you use them. To learn more about it, or for other ways to install Shoelace, refer to the [installation instructions](getting-started/installation).
|
|
||||||
:::
|
|
||||||
|
|
||||||
## New to Web Components?
|
|
||||||
|
|
||||||
**TL;DR** – we finally have a way to create [our own HTML elements](https://html.spec.whatwg.org/multipage/custom-elements.html) and use them in any framework we want!
|
|
||||||
|
|
||||||
Thanks to the popularity of frameworks such as Angular, Vue, and React, component-driven development has become a part of our every day lives. Components help us encapsulate styles and behaviors into reusable building blocks. They make a lot of sense in terms of design, development, and testing.
|
|
||||||
|
|
||||||
Unfortunately, _framework-specific_ components fail us in a number of ways:
|
|
||||||
|
|
||||||
- You can only use them in the framework they're designed for 🔒
|
|
||||||
- Their lifespan is limited to that of the framework's ⏳
|
|
||||||
- New frameworks/versions can lead to breaking changes, requiring substantial effort to update components 😭
|
|
||||||
|
|
||||||
Web components solve these problems. They're [supported by all modern browsers](https://caniuse.com/#feat=custom-elementsv1), they're framework-agnostic, and they're [part of the standard](https://developer.mozilla.org/en-US/docs/Web/Web_Components), so we know they'll be supported for many years to come.
|
|
||||||
|
|
||||||
This is the technology that Shoelace is built on.
|
|
||||||
|
|
||||||
## What Problem Does This Solve?
|
|
||||||
|
|
||||||
Shoelace provides a collection of professionally designed, highly customizable UI components built on a framework agnostic technology. Why spend hundreds of hours (or more) building a design system from scratch? Why make a component library that only works with one framework?
|
|
||||||
|
|
||||||
With Shoelace, you can:
|
|
||||||
|
|
||||||
- Start building things faster (no need to roll your own buttons)
|
|
||||||
- Build multiple apps with different frameworks that all share the same UI components
|
|
||||||
- Fully customize components to match your existing designs
|
|
||||||
- Incrementally adopt components as needed (no need to ditch your framework)
|
|
||||||
- Upgrade or switch frameworks without rebuilding foundational components
|
|
||||||
|
|
||||||
If your organization is looking to build a design system, [Shoelace will save you thousands of dollars](https://medium.com/eightshapes-llc/and-you-thought-buttons-were-easy-26eb5b5c1871). All the foundational components you need are right here, ready to be customized for your brand. And since it's built on web standards, browsers will continue to support it for many years to come.
|
|
||||||
|
|
||||||
Whether you use Shoelace as a starting point for your organization's design system or for a fun personal project, there's no limit to what you can do with it.
|
|
||||||
|
|
||||||
## Browser Support
|
|
||||||
|
|
||||||
Shoelace is tested in the latest two versions of the following browsers.
|
|
||||||
|
|
||||||
<img src="/assets/images/chrome.png" alt="Chrome" width="64" height="64">
|
|
||||||
<img src="/assets/images/edge.png" alt="Edge" width="64" height="64">
|
|
||||||
<img src="/assets/images/firefox.png" alt="Firefox" width="64" height="64">
|
|
||||||
<img src="/assets/images/opera.png" alt="Opera" width="64" height="64">
|
|
||||||
<img src="/assets/images/safari.png" alt="Safari" width="64" height="64">
|
|
||||||
|
|
||||||
Critical bug fixes in earlier versions will be addressed based on their severity and impact.
|
|
||||||
|
|
||||||
If you need to support IE11 or pre-Chromium Edge, this library isn't for you. Although web components can (to some degree) be polyfilled for legacy browsers, supporting them is outside the scope of this project. If you're using Shoelace in such a browser, you're gonna have a bad time. ⛷
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Shoelace was created in New Hampshire by [Cory LaViska](https://twitter.com/claviska). It's available under the terms of the [MIT license](https://github.com/shoelace-style/shoelace/blob/next/LICENSE.md).
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
Special thanks to the following projects and individuals that help make Shoelace possible.
|
|
||||||
|
|
||||||
- Components are built with [Lit](https://lit.dev/)
|
|
||||||
- Component metadata is generated by the [Custom Elements Manifest Analyzer](https://github.com/open-wc/custom-elements-manifest)
|
|
||||||
- Documentation is powered by [11ty](https://www.11ty.dev/)
|
|
||||||
- CDN services are provided by [jsDelivr](https://www.jsdelivr.com/)
|
|
||||||
- Color primitives are inspired by [Tailwind](https://tailwindcss.com/)
|
|
||||||
- Icons are courtesy of [Bootstrap Icons](https://icons.getbootstrap.com/)
|
|
||||||
- The homepage illustration is courtesy of [unDraw](https://undraw.co/)
|
|
||||||
- Positioning of dropdowns, tooltips, et al is handled by [Floating UI](https://floating-ui.com/)
|
|
||||||
- Animations are courtesy of [animate.css](https://animate.style/)
|
|
||||||
- Search is powered by [Lunr](https://lunrjs.com/)
|
|
||||||
- The Shoelace logo was designed with a single shoelace by [Adam K Olson](https://twitter.com/adamkolson)
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Sonr Blockchain
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<div style="text-align: center;">
|
||||||
|
|
||||||
|
# Page Not Found
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The page you were looking for couldn't be found.
|
||||||
|
|
||||||
|
Press [[/]] to search, or [head back to the homepage](/).
|
||||||
|
|
||||||
|
</div>
|
||||||
+2
-2
@@ -51,5 +51,5 @@ theme:
|
|||||||
icon: material/toggle-switch-off
|
icon: material/toggle-switch-off
|
||||||
name: Switch to system preference
|
name: Switch to system preference
|
||||||
font:
|
font:
|
||||||
text: Roboto
|
text: Geist
|
||||||
code: Roboto Mono
|
code: Geist Mono
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
module github.com/onsonr/sonr
|
module github.com/onsonr/sonr
|
||||||
|
|
||||||
go 1.23
|
go 1.23.3
|
||||||
|
|
||||||
toolchain go1.23.1
|
|
||||||
|
|
||||||
// overrides
|
// overrides
|
||||||
replace (
|
replace (
|
||||||
@@ -54,7 +52,7 @@ require (
|
|||||||
github.com/btcsuite/btcd/btcec/v2 v2.3.4
|
github.com/btcsuite/btcd/btcec/v2 v2.3.4
|
||||||
github.com/bwesterb/go-ristretto v1.2.3
|
github.com/bwesterb/go-ristretto v1.2.3
|
||||||
github.com/cometbft/cometbft v0.38.12
|
github.com/cometbft/cometbft v0.38.12
|
||||||
github.com/consensys/gnark-crypto v0.12.1
|
github.com/consensys/gnark-crypto v0.14.0
|
||||||
github.com/cosmos/btcutil v1.0.5
|
github.com/cosmos/btcutil v1.0.5
|
||||||
github.com/cosmos/cosmos-db v1.0.2
|
github.com/cosmos/cosmos-db v1.0.2
|
||||||
github.com/cosmos/cosmos-proto v1.0.0-beta.5
|
github.com/cosmos/cosmos-proto v1.0.0-beta.5
|
||||||
@@ -76,8 +74,10 @@ require (
|
|||||||
github.com/ipfs/go-cid v0.4.1
|
github.com/ipfs/go-cid v0.4.1
|
||||||
github.com/ipfs/kubo v0.32.1
|
github.com/ipfs/kubo v0.32.1
|
||||||
github.com/joho/godotenv v1.5.1
|
github.com/joho/godotenv v1.5.1
|
||||||
github.com/labstack/echo/v4 v4.10.2
|
github.com/labstack/echo-contrib v0.17.1
|
||||||
|
github.com/labstack/echo/v4 v4.12.0
|
||||||
github.com/libp2p/go-libp2p v0.37.2
|
github.com/libp2p/go-libp2p v0.37.2
|
||||||
|
github.com/medama-io/go-useragent v1.0.1
|
||||||
github.com/mr-tron/base58 v1.2.0
|
github.com/mr-tron/base58 v1.2.0
|
||||||
github.com/multiformats/go-multibase v0.2.0
|
github.com/multiformats/go-multibase v0.2.0
|
||||||
github.com/multiformats/go-multicodec v0.9.0
|
github.com/multiformats/go-multicodec v0.9.0
|
||||||
@@ -93,10 +93,12 @@ require (
|
|||||||
github.com/strangelove-ventures/poa v0.50.0
|
github.com/strangelove-ventures/poa v0.50.0
|
||||||
github.com/strangelove-ventures/tokenfactory v0.50.0
|
github.com/strangelove-ventures/tokenfactory v0.50.0
|
||||||
github.com/stretchr/testify v1.10.0
|
github.com/stretchr/testify v1.10.0
|
||||||
golang.org/x/crypto v0.30.0
|
golang.org/x/crypto v0.31.0
|
||||||
|
golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9
|
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9
|
||||||
google.golang.org/grpc v1.67.1
|
google.golang.org/grpc v1.67.1
|
||||||
google.golang.org/protobuf v1.35.2
|
google.golang.org/protobuf v1.35.2
|
||||||
|
gorm.io/driver/postgres v1.5.11
|
||||||
gorm.io/driver/sqlite v1.5.6
|
gorm.io/driver/sqlite v1.5.6
|
||||||
gorm.io/gorm v1.25.12
|
gorm.io/gorm v1.25.12
|
||||||
lukechampine.com/blake3 v1.3.0
|
lukechampine.com/blake3 v1.3.0
|
||||||
@@ -117,9 +119,10 @@ require (
|
|||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
||||||
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
|
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
|
||||||
github.com/bits-and-blooms/bitset v1.13.0 // indirect
|
github.com/bits-and-blooms/bitset v1.19.1 // indirect
|
||||||
github.com/blang/semver/v4 v4.0.0 // indirect
|
github.com/blang/semver/v4 v4.0.0 // indirect
|
||||||
github.com/btcsuite/btcd v0.20.1-beta // indirect
|
github.com/boyter/go-string v1.0.5 // indirect
|
||||||
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
|
||||||
github.com/caddyserver/certmagic v0.21.4 // indirect
|
github.com/caddyserver/certmagic v0.21.4 // indirect
|
||||||
github.com/caddyserver/zerossl v0.1.3 // indirect
|
github.com/caddyserver/zerossl v0.1.3 // indirect
|
||||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||||
@@ -134,7 +137,7 @@ require (
|
|||||||
github.com/cockroachdb/redact v1.1.5 // indirect
|
github.com/cockroachdb/redact v1.1.5 // indirect
|
||||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
||||||
github.com/cometbft/cometbft-db v0.11.0 // indirect
|
github.com/cometbft/cometbft-db v0.11.0 // indirect
|
||||||
github.com/consensys/bavard v0.1.13 // indirect
|
github.com/consensys/bavard v0.1.24 // indirect
|
||||||
github.com/cosmos/go-bip39 v1.0.0 // indirect
|
github.com/cosmos/go-bip39 v1.0.0 // indirect
|
||||||
github.com/cosmos/gogogateway v1.2.0 // indirect
|
github.com/cosmos/gogogateway v1.2.0 // indirect
|
||||||
github.com/cosmos/iavl v1.1.2 // indirect
|
github.com/cosmos/iavl v1.1.2 // indirect
|
||||||
@@ -146,6 +149,7 @@ require (
|
|||||||
github.com/danieljoos/wincred v1.1.2 // indirect
|
github.com/danieljoos/wincred v1.1.2 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||||
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
|
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
|
||||||
|
github.com/decred/dcrd/crypto/blake256 v1.1.0 // indirect
|
||||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
||||||
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
|
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
|
||||||
github.com/dgraph-io/ristretto v0.1.1 // indirect
|
github.com/dgraph-io/ristretto v0.1.1 // indirect
|
||||||
@@ -153,7 +157,7 @@ require (
|
|||||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||||
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
|
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
|
||||||
github.com/emicklei/dot v1.6.1 // indirect
|
github.com/emicklei/dot v1.6.1 // indirect
|
||||||
github.com/ethereum/go-ethereum v1.14.6 // indirect
|
github.com/ethereum/go-ethereum v1.14.12 // indirect
|
||||||
github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 // indirect
|
github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 // indirect
|
||||||
github.com/fatih/color v1.16.0 // indirect
|
github.com/fatih/color v1.16.0 // indirect
|
||||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||||
@@ -231,6 +235,10 @@ require (
|
|||||||
github.com/ipld/go-codec-dagpb v1.6.0 // indirect
|
github.com/ipld/go-codec-dagpb v1.6.0 // indirect
|
||||||
github.com/ipld/go-ipld-prime v0.21.0 // indirect
|
github.com/ipld/go-ipld-prime v0.21.0 // indirect
|
||||||
github.com/ipshipyard/p2p-forge v0.0.2 // indirect
|
github.com/ipshipyard/p2p-forge v0.0.2 // indirect
|
||||||
|
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||||
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
||||||
|
github.com/jackc/pgx/v5 v5.7.1 // indirect
|
||||||
|
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
||||||
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
|
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
|
||||||
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
|
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
|
||||||
github.com/jbenet/goprocess v0.1.4 // indirect
|
github.com/jbenet/goprocess v0.1.4 // indirect
|
||||||
@@ -243,7 +251,7 @@ require (
|
|||||||
github.com/koron/go-ssdp v0.0.4 // indirect
|
github.com/koron/go-ssdp v0.0.4 // indirect
|
||||||
github.com/kr/pretty v0.3.1 // indirect
|
github.com/kr/pretty v0.3.1 // indirect
|
||||||
github.com/kr/text v0.2.0 // indirect
|
github.com/kr/text v0.2.0 // indirect
|
||||||
github.com/labstack/gommon v0.4.0 // indirect
|
github.com/labstack/gommon v0.4.2 // indirect
|
||||||
github.com/lib/pq v1.10.7 // indirect
|
github.com/lib/pq v1.10.7 // indirect
|
||||||
github.com/libdns/libdns v0.2.2 // indirect
|
github.com/libdns/libdns v0.2.2 // indirect
|
||||||
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
|
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
|
||||||
@@ -354,7 +362,6 @@ require (
|
|||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
go.uber.org/zap v1.27.0 // indirect
|
go.uber.org/zap v1.27.0 // indirect
|
||||||
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
|
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
|
||||||
golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d // indirect
|
|
||||||
golang.org/x/mod v0.22.0 // indirect
|
golang.org/x/mod v0.22.0 // indirect
|
||||||
golang.org/x/net v0.32.0 // indirect
|
golang.org/x/net v0.32.0 // indirect
|
||||||
golang.org/x/oauth2 v0.23.0 // indirect
|
golang.org/x/oauth2 v0.23.0 // indirect
|
||||||
|
|||||||
@@ -885,7 +885,6 @@ github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0/go.mod h1:55qNq4vc
|
|||||||
github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY=
|
github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY=
|
||||||
github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I=
|
github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I=
|
||||||
github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg=
|
github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg=
|
||||||
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
|
||||||
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||||
github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY=
|
github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY=
|
||||||
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
|
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
|
||||||
@@ -958,30 +957,25 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2
|
|||||||
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||||
github.com/bits-and-blooms/bitset v1.5.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
|
github.com/bits-and-blooms/bitset v1.5.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
|
||||||
github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
|
github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
|
||||||
github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE=
|
github.com/bits-and-blooms/bitset v1.19.1 h1:mv2yVhy96D2CuskLPXnc58oJNMs5PCWjAZuyYU0p12M=
|
||||||
github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
|
github.com/bits-and-blooms/bitset v1.19.1/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
|
||||||
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
|
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
|
||||||
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
|
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
|
||||||
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=
|
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=
|
||||||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||||
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
||||||
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
||||||
|
github.com/boyter/go-string v1.0.5 h1:/xcOlWdgelLYLVkUU0xBLfioGjZ9KIMUMI/RXG138YY=
|
||||||
|
github.com/boyter/go-string v1.0.5/go.mod h1:Mww9cDld2S2cdJ0tQffBhsZFMQRA2OJdcjWYZXvZ4Ss=
|
||||||
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
|
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
|
||||||
github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=
|
|
||||||
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
|
|
||||||
github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU=
|
github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU=
|
||||||
github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ=
|
github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ=
|
||||||
github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
|
github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
|
||||||
github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c=
|
github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c=
|
||||||
github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE=
|
github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE=
|
||||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
||||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ=
|
||||||
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
||||||
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
|
|
||||||
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
|
|
||||||
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
|
||||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
|
|
||||||
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
|
||||||
github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY=
|
github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY=
|
||||||
github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE=
|
github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE=
|
||||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||||
@@ -1073,12 +1067,14 @@ github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v
|
|||||||
github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8=
|
github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8=
|
||||||
github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc=
|
github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc=
|
||||||
github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ=
|
github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ=
|
||||||
github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ=
|
|
||||||
github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI=
|
github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI=
|
||||||
|
github.com/consensys/bavard v0.1.24 h1:Lfe+bjYbpaoT7K5JTFoMi5wo9V4REGLvQQbHmatoN2I=
|
||||||
|
github.com/consensys/bavard v0.1.24/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs=
|
||||||
github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q=
|
github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q=
|
||||||
github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU=
|
github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU=
|
||||||
github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M=
|
|
||||||
github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
|
github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
|
||||||
|
github.com/consensys/gnark-crypto v0.14.0 h1:DDBdl4HaBtdQsq/wfMwJvZNE80sHidrK3Nfrefatm0E=
|
||||||
|
github.com/consensys/gnark-crypto v0.14.0/go.mod h1:CU4UijNPsHawiVGNxe9co07FkzCeWHHrb1li/n1XoU0=
|
||||||
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
|
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
|
||||||
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
|
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
|
||||||
github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
|
github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
|
||||||
@@ -1142,7 +1138,6 @@ github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV
|
|||||||
github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=
|
github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=
|
||||||
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
|
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
|
||||||
github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg=
|
github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg=
|
||||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||||
@@ -1152,8 +1147,9 @@ github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6Uh
|
|||||||
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
|
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
|
||||||
github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
|
github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
|
||||||
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
|
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
|
||||||
github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y=
|
|
||||||
github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=
|
github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=
|
||||||
|
github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8=
|
||||||
|
github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=
|
||||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
|
||||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
|
||||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg=
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg=
|
||||||
@@ -1232,8 +1228,8 @@ github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHj
|
|||||||
github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
|
github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
|
||||||
github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg=
|
github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg=
|
||||||
github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0=
|
github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0=
|
||||||
github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWXVKaaC8=
|
github.com/ethereum/go-ethereum v1.14.12 h1:8hl57x77HSUo+cXExrURjU/w1VhL+ShCTJrTwcCQSe4=
|
||||||
github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0=
|
github.com/ethereum/go-ethereum v1.14.12/go.mod h1:RAC2gVMWJ6FkxSPESfbshrcKpIokgQKsVKmAuqdekDY=
|
||||||
github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 h1:BBso6MBKW8ncyZLv37o+KNyy0HrrHgfnOaGQC2qvN+A=
|
github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 h1:BBso6MBKW8ncyZLv37o+KNyy0HrrHgfnOaGQC2qvN+A=
|
||||||
github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg=
|
github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg=
|
||||||
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
|
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
|
||||||
@@ -1770,6 +1766,14 @@ github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbk
|
|||||||
github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
|
github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
|
||||||
github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI=
|
github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI=
|
||||||
github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw=
|
github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw=
|
||||||
|
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||||
|
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||||
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
|
||||||
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||||
|
github.com/jackc/pgx/v5 v5.7.1 h1:x7SYsPBYDkHDksogeSmZZ5xzThcTgRz++I5E+ePFUcs=
|
||||||
|
github.com/jackc/pgx/v5 v5.7.1/go.mod h1:e7O26IywZZ+naJtWWos6i6fvWK+29etgITqrqHLfoZA=
|
||||||
|
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
|
||||||
|
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||||
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
|
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
|
||||||
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
||||||
github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA=
|
github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA=
|
||||||
@@ -1780,7 +1784,6 @@ github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZl
|
|||||||
github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU=
|
github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU=
|
||||||
github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E=
|
github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E=
|
||||||
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
|
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
|
||||||
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
|
||||||
github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls=
|
github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls=
|
||||||
github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k=
|
github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k=
|
||||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||||
@@ -1796,7 +1799,6 @@ github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+
|
|||||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||||
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
|
|
||||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
@@ -1823,7 +1825,6 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:C
|
|||||||
github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig=
|
github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig=
|
||||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
|
||||||
github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE=
|
github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE=
|
||||||
github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||||
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||||
@@ -1863,15 +1864,18 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
|||||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
|
github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
|
||||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||||
|
github.com/labstack/echo-contrib v0.17.1 h1:7I/he7ylVKsDUieaGRZ9XxxTYOjfQwVzHzUYrNykfCU=
|
||||||
|
github.com/labstack/echo-contrib v0.17.1/go.mod h1:SnsCZtwHBAZm5uBSAtQtXQHI3wqEA73hvTn0bYMKnZA=
|
||||||
github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
|
github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
|
||||||
github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg=
|
github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg=
|
||||||
github.com/labstack/echo/v4 v4.10.2 h1:n1jAhnq/elIFTHr1EYpiYtyKgx4RW9ccVgkqByZaN2M=
|
github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+kI0=
|
||||||
github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k=
|
github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM=
|
||||||
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
||||||
github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8=
|
github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
|
||||||
github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
|
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
|
||||||
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
|
|
||||||
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
|
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
|
||||||
|
github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4=
|
||||||
|
github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c=
|
||||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||||
github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
|
github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
|
||||||
@@ -1942,7 +1946,6 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope
|
|||||||
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
|
||||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||||
@@ -1975,6 +1978,8 @@ github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpe
|
|||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||||
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
|
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
|
||||||
|
github.com/medama-io/go-useragent v1.0.1 h1:staHGaZKIRpGI7sPVnyjYVT0SMRlQmp0L21rKYusi8Y=
|
||||||
|
github.com/medama-io/go-useragent v1.0.1/go.mod h1:H9GYWth4IN8vAFZh5LeARza7VwM4jK9uk7Tb9huVzLw=
|
||||||
github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg=
|
github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg=
|
||||||
github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ=
|
github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ=
|
||||||
github.com/mholt/acmez/v2 v2.0.3 h1:CgDBlEwg3QBp6s45tPQmFIBrkRIkBT4rW4orMM6p4sw=
|
github.com/mholt/acmez/v2 v2.0.3 h1:CgDBlEwg3QBp6s45tPQmFIBrkRIkBT4rW4orMM6p4sw=
|
||||||
@@ -2081,7 +2086,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV
|
|||||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
|
||||||
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||||
github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0=
|
github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0=
|
||||||
@@ -2090,7 +2094,6 @@ github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
|||||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||||
github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg=
|
github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg=
|
||||||
github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
|
github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
|
||||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
|
||||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||||
github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8=
|
github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8=
|
||||||
@@ -2559,7 +2562,6 @@ go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZM
|
|||||||
go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc=
|
go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc=
|
||||||
go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU=
|
go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU=
|
||||||
golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
|
golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
|
||||||
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
@@ -2597,8 +2599,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY
|
|||||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||||
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||||
golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY=
|
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
|
||||||
golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
@@ -2910,7 +2912,6 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211020174200-9d6173849985/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211020174200-9d6173849985/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
@@ -3484,6 +3485,8 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C
|
|||||||
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gorm.io/driver/postgres v1.5.11 h1:ubBVAfbKEUld/twyKZ0IYn9rSQh448EdelLYk9Mv314=
|
||||||
|
gorm.io/driver/postgres v1.5.11/go.mod h1:DX3GReXH+3FPWGrrgffdvCk3DQ1dwDPdmbenSkweRGI=
|
||||||
gorm.io/driver/sqlite v1.5.6 h1:fO/X46qn5NUEEOZtnjJRWRzZMe8nqJiQ9E+0hi+hKQE=
|
gorm.io/driver/sqlite v1.5.6 h1:fO/X46qn5NUEEOZtnjJRWRzZMe8nqJiQ9E+0hi+hKQE=
|
||||||
gorm.io/driver/sqlite v1.5.6/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4=
|
gorm.io/driver/sqlite v1.5.6/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4=
|
||||||
gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8=
|
gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8=
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
package e2e
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
"go.uber.org/zap/zaptest"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestBasicChain(t *testing.T) {
|
|
||||||
cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{
|
|
||||||
&DefaultChainSpec,
|
|
||||||
})
|
|
||||||
|
|
||||||
chains, err := cf.Chains(t.Name())
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
chain := chains[0].(*cosmos.CosmosChain)
|
|
||||||
|
|
||||||
ic := interchaintest.NewInterchain().
|
|
||||||
AddChain(chain)
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
client, network := interchaintest.DockerSetup(t)
|
|
||||||
|
|
||||||
require.NoError(t, ic.Build(ctx, nil, interchaintest.InterchainBuildOptions{
|
|
||||||
TestName: t.Name(),
|
|
||||||
Client: client,
|
|
||||||
NetworkID: network,
|
|
||||||
SkipPathCreation: true,
|
|
||||||
}))
|
|
||||||
t.Cleanup(func() {
|
|
||||||
_ = ic.Close()
|
|
||||||
})
|
|
||||||
|
|
||||||
// faucet funds to the user
|
|
||||||
users := interchaintest.GetAndFundTestUsers(t, ctx, "default", GenesisFundsAmount, chain)
|
|
||||||
user := users[0]
|
|
||||||
|
|
||||||
// balance check
|
|
||||||
balance, err := chain.GetBalance(ctx, user.FormattedAddress(), Denom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.True(t, balance.Equal(GenesisFundsAmount), "user balance should be equal to genesis funds")
|
|
||||||
}
|
|
||||||
@@ -1,280 +0,0 @@
|
|||||||
module github.com/di-dao/core/interchaintest
|
|
||||||
|
|
||||||
go 1.22
|
|
||||||
|
|
||||||
toolchain go1.22.7
|
|
||||||
|
|
||||||
replace (
|
|
||||||
// not tagged properly (SDK v51)
|
|
||||||
cosmossdk.io/core => cosmossdk.io/core v0.11.0
|
|
||||||
github.com/ChainSafe/go-schnorrkel => github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d
|
|
||||||
github.com/ChainSafe/go-schnorrkel/1 => github.com/ChainSafe/go-schnorrkel v1.0.0
|
|
||||||
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.2 //indirect
|
|
||||||
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
|
|
||||||
// breaks SDK app.toml parsing for client configs.
|
|
||||||
github.com/spf13/viper => github.com/spf13/viper v1.17.0
|
|
||||||
|
|
||||||
// If using custom internal modules, replace your app here with the parent application
|
|
||||||
// github.com/di-dao/core => ../.
|
|
||||||
|
|
||||||
github.com/vedhavyas/go-subkey => github.com/strangelove-ventures/go-subkey v1.0.7
|
|
||||||
)
|
|
||||||
|
|
||||||
require (
|
|
||||||
cosmossdk.io/math v1.3.0
|
|
||||||
github.com/cosmos/cosmos-sdk v0.50.5
|
|
||||||
github.com/cosmos/ibc-go/v8 v8.2.0
|
|
||||||
github.com/strangelove-ventures/globalfee v0.50.0
|
|
||||||
github.com/strangelove-ventures/interchaintest/v8 v8.1.0
|
|
||||||
github.com/strangelove-ventures/poa v0.50.0
|
|
||||||
github.com/strangelove-ventures/tokenfactory v0.50.0
|
|
||||||
github.com/stretchr/testify v1.9.0
|
|
||||||
go.uber.org/zap v1.27.0
|
|
||||||
)
|
|
||||||
|
|
||||||
require (
|
|
||||||
cloud.google.com/go v0.112.0 // indirect
|
|
||||||
cloud.google.com/go/compute/metadata v0.5.0 // indirect
|
|
||||||
cloud.google.com/go/iam v1.1.6 // indirect
|
|
||||||
cloud.google.com/go/storage v1.37.0 // indirect
|
|
||||||
cosmossdk.io/api v0.7.3 // indirect
|
|
||||||
cosmossdk.io/collections v0.4.0 // indirect
|
|
||||||
cosmossdk.io/core v0.12.0 // indirect
|
|
||||||
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
|
|
||||||
cosmossdk.io/errors v1.0.1 // indirect
|
|
||||||
cosmossdk.io/log v1.3.1 // indirect
|
|
||||||
cosmossdk.io/store v1.0.2 // indirect
|
|
||||||
cosmossdk.io/x/feegrant v0.1.0 // indirect
|
|
||||||
cosmossdk.io/x/tx v0.13.1 // indirect
|
|
||||||
cosmossdk.io/x/upgrade v0.1.1 // indirect
|
|
||||||
filippo.io/edwards25519 v1.0.0 // indirect
|
|
||||||
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
|
|
||||||
github.com/99designs/keyring v1.2.2 // indirect
|
|
||||||
github.com/BurntSushi/toml v1.4.0 // indirect
|
|
||||||
github.com/ChainSafe/go-schnorrkel v1.1.0 // indirect
|
|
||||||
github.com/ChainSafe/go-schnorrkel/1 v0.0.0-00010101000000-000000000000 // indirect
|
|
||||||
github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 // indirect
|
|
||||||
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
|
|
||||||
github.com/DataDog/zstd v1.5.5 // indirect
|
|
||||||
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect
|
|
||||||
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect
|
|
||||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
|
||||||
github.com/StirlingMarketingGroup/go-namecase v1.0.0 // indirect
|
|
||||||
github.com/avast/retry-go/v4 v4.5.1 // indirect
|
|
||||||
github.com/aws/aws-sdk-go v1.46.6 // indirect
|
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
|
||||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
|
||||||
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
|
|
||||||
github.com/bits-and-blooms/bitset v1.10.0 // indirect
|
|
||||||
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
|
|
||||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
|
||||||
github.com/cespare/xxhash v1.1.0 // indirect
|
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
||||||
github.com/chzyer/readline v1.5.1 // indirect
|
|
||||||
github.com/cockroachdb/errors v1.11.3 // indirect
|
|
||||||
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
|
|
||||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
|
|
||||||
github.com/cockroachdb/pebble v1.1.1 // indirect
|
|
||||||
github.com/cockroachdb/redact v1.1.5 // indirect
|
|
||||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
|
||||||
github.com/cometbft/cometbft v0.38.12 // indirect
|
|
||||||
github.com/cometbft/cometbft-db v0.11.0 // indirect
|
|
||||||
github.com/containerd/log v0.1.0 // indirect
|
|
||||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
|
||||||
github.com/cosmos/cosmos-db v1.0.2 // indirect
|
|
||||||
github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect
|
|
||||||
github.com/cosmos/go-bip39 v1.0.0 // indirect
|
|
||||||
github.com/cosmos/gogogateway v1.2.0 // indirect
|
|
||||||
github.com/cosmos/gogoproto v1.7.0 // indirect
|
|
||||||
github.com/cosmos/iavl v1.0.1 // indirect
|
|
||||||
github.com/cosmos/ibc-go/modules/capability v1.0.0 // indirect
|
|
||||||
github.com/cosmos/ics23/go v0.10.0 // indirect
|
|
||||||
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
|
|
||||||
github.com/danieljoos/wincred v1.2.0 // indirect
|
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
||||||
github.com/deckarep/golang-set v1.8.0 // indirect
|
|
||||||
github.com/decred/base58 v1.0.5 // indirect
|
|
||||||
github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect
|
|
||||||
github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1 // indirect
|
|
||||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
|
|
||||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
|
||||||
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
|
|
||||||
github.com/dgraph-io/ristretto v0.1.1 // indirect
|
|
||||||
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
|
|
||||||
github.com/distribution/reference v0.5.0 // indirect
|
|
||||||
github.com/docker/docker v25.0.6+incompatible // indirect
|
|
||||||
github.com/docker/go-connections v0.5.0 // indirect
|
|
||||||
github.com/docker/go-units v0.5.0 // indirect
|
|
||||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
||||||
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
|
|
||||||
github.com/emicklei/dot v1.6.1 // indirect
|
|
||||||
github.com/ethereum/go-ethereum v1.14.0 // indirect
|
|
||||||
github.com/fatih/color v1.15.0 // indirect
|
|
||||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
|
||||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
|
||||||
github.com/getsentry/sentry-go v0.27.0 // indirect
|
|
||||||
github.com/go-kit/kit v0.13.0 // indirect
|
|
||||||
github.com/go-kit/log v0.2.1 // indirect
|
|
||||||
github.com/go-logfmt/logfmt v0.6.0 // indirect
|
|
||||||
github.com/go-logr/logr v1.4.2 // indirect
|
|
||||||
github.com/go-logr/stdr v1.2.2 // indirect
|
|
||||||
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
|
|
||||||
github.com/gogo/googleapis v1.4.1 // indirect
|
|
||||||
github.com/gogo/protobuf v1.3.3 // indirect
|
|
||||||
github.com/golang/glog v1.2.2 // indirect
|
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
|
||||||
github.com/golang/mock v1.6.0 // indirect
|
|
||||||
github.com/golang/protobuf v1.5.4 // indirect
|
|
||||||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
|
|
||||||
github.com/google/btree v1.1.2 // indirect
|
|
||||||
github.com/google/go-cmp v0.6.0 // indirect
|
|
||||||
github.com/google/orderedcode v0.0.1 // indirect
|
|
||||||
github.com/google/s2a-go v0.1.7 // indirect
|
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
|
||||||
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
|
|
||||||
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
|
|
||||||
github.com/gorilla/handlers v1.5.2 // indirect
|
|
||||||
github.com/gorilla/mux v1.8.1 // indirect
|
|
||||||
github.com/gorilla/websocket v1.5.3 // indirect
|
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
|
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
|
||||||
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
|
|
||||||
github.com/gtank/merlin v0.1.1 // indirect
|
|
||||||
github.com/gtank/ristretto255 v0.1.2 // indirect
|
|
||||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
|
||||||
github.com/hashicorp/go-getter v1.7.5 // indirect
|
|
||||||
github.com/hashicorp/go-hclog v1.5.0 // indirect
|
|
||||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
|
||||||
github.com/hashicorp/go-metrics v0.5.2 // indirect
|
|
||||||
github.com/hashicorp/go-plugin v1.5.2 // indirect
|
|
||||||
github.com/hashicorp/go-safetemp v1.0.0 // indirect
|
|
||||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
|
||||||
github.com/hashicorp/golang-lru v1.0.2 // indirect
|
|
||||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
|
||||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
|
||||||
github.com/hashicorp/yamux v0.1.1 // indirect
|
|
||||||
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
|
|
||||||
github.com/holiman/uint256 v1.2.4 // indirect
|
|
||||||
github.com/huandu/skiplist v1.2.0 // indirect
|
|
||||||
github.com/iancoleman/strcase v0.3.0 // indirect
|
|
||||||
github.com/icza/dyno v0.0.0-20230330125955-09f820a8d9c0 // indirect
|
|
||||||
github.com/improbable-eng/grpc-web v0.15.0 // indirect
|
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
||||||
github.com/ipfs/go-cid v0.4.1 // indirect
|
|
||||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
|
||||||
github.com/jmhodges/levigo v1.0.0 // indirect
|
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
|
||||||
github.com/klauspost/compress v1.17.9 // indirect
|
|
||||||
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
|
|
||||||
github.com/kr/pretty v0.3.1 // indirect
|
|
||||||
github.com/kr/text v0.2.0 // indirect
|
|
||||||
github.com/lib/pq v1.10.9 // indirect
|
|
||||||
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
|
|
||||||
github.com/libp2p/go-libp2p v0.33.2 // indirect
|
|
||||||
github.com/linxGnu/grocksdb v1.8.12 // indirect
|
|
||||||
github.com/magiconair/properties v1.8.7 // indirect
|
|
||||||
github.com/manifoldco/promptui v0.9.0 // indirect
|
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
||||||
github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect
|
|
||||||
github.com/minio/highwayhash v1.0.2 // indirect
|
|
||||||
github.com/minio/sha256-simd v1.0.1 // indirect
|
|
||||||
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230913220906-b988ea7da0c2 // indirect
|
|
||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
|
||||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
|
||||||
github.com/mr-tron/base58 v1.2.0 // indirect
|
|
||||||
github.com/mtibben/percent v0.2.1 // indirect
|
|
||||||
github.com/multiformats/go-base32 v0.1.0 // indirect
|
|
||||||
github.com/multiformats/go-base36 v0.2.0 // indirect
|
|
||||||
github.com/multiformats/go-multiaddr v0.12.3 // indirect
|
|
||||||
github.com/multiformats/go-multibase v0.2.0 // indirect
|
|
||||||
github.com/multiformats/go-multicodec v0.9.0 // indirect
|
|
||||||
github.com/multiformats/go-multihash v0.2.3 // indirect
|
|
||||||
github.com/multiformats/go-varint v0.0.7 // indirect
|
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
|
||||||
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
|
|
||||||
github.com/oklog/run v1.1.0 // indirect
|
|
||||||
github.com/onsi/gomega v1.30.0 // indirect
|
|
||||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
|
||||||
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
|
|
||||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
|
||||||
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
|
||||||
github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect
|
|
||||||
github.com/pierrec/xxHash v0.1.5 // indirect
|
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
|
||||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
|
||||||
github.com/prometheus/client_golang v1.20.1 // indirect
|
|
||||||
github.com/prometheus/client_model v0.6.1 // indirect
|
|
||||||
github.com/prometheus/common v0.55.0 // indirect
|
|
||||||
github.com/prometheus/procfs v0.15.1 // indirect
|
|
||||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
||||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
|
||||||
github.com/rs/cors v1.11.1 // indirect
|
|
||||||
github.com/rs/zerolog v1.32.0 // indirect
|
|
||||||
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
|
||||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
|
||||||
github.com/sasha-s/go-deadlock v0.3.1 // indirect
|
|
||||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
|
||||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
|
||||||
github.com/spf13/afero v1.11.0 // indirect
|
|
||||||
github.com/spf13/cast v1.6.0 // indirect
|
|
||||||
github.com/spf13/cobra v1.8.1 // indirect
|
|
||||||
github.com/spf13/pflag v1.0.5 // indirect
|
|
||||||
github.com/spf13/viper v1.19.0 // indirect
|
|
||||||
github.com/subosito/gotenv v1.6.0 // indirect
|
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
|
|
||||||
github.com/tendermint/go-amino v0.16.0 // indirect
|
|
||||||
github.com/tidwall/btree v1.7.0 // indirect
|
|
||||||
github.com/tyler-smith/go-bip32 v1.0.0 // indirect
|
|
||||||
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
|
|
||||||
github.com/ulikunitz/xz v0.5.11 // indirect
|
|
||||||
github.com/zondax/hid v0.9.2 // indirect
|
|
||||||
github.com/zondax/ledger-go v0.14.3 // indirect
|
|
||||||
go.etcd.io/bbolt v1.3.10 // indirect
|
|
||||||
go.opencensus.io v0.24.0 // indirect
|
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
|
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
|
|
||||||
go.opentelemetry.io/otel v1.31.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/metric v1.31.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/trace v1.31.0 // indirect
|
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
|
||||||
golang.org/x/crypto v0.28.0 // indirect
|
|
||||||
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
|
|
||||||
golang.org/x/mod v0.17.0 // indirect
|
|
||||||
golang.org/x/net v0.30.0 // indirect
|
|
||||||
golang.org/x/oauth2 v0.22.0 // indirect
|
|
||||||
golang.org/x/sync v0.8.0 // indirect
|
|
||||||
golang.org/x/sys v0.26.0 // indirect
|
|
||||||
golang.org/x/term v0.25.0 // indirect
|
|
||||||
golang.org/x/text v0.19.0 // indirect
|
|
||||||
golang.org/x/time v0.5.0 // indirect
|
|
||||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
|
|
||||||
google.golang.org/api v0.162.0 // indirect
|
|
||||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
|
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
|
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
|
|
||||||
google.golang.org/grpc v1.67.1 // indirect
|
|
||||||
google.golang.org/protobuf v1.35.1 // indirect
|
|
||||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
|
||||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
||||||
gotest.tools/v3 v3.5.1 // indirect
|
|
||||||
lukechampine.com/blake3 v1.2.2 // indirect
|
|
||||||
lukechampine.com/uint128 v1.3.0 // indirect
|
|
||||||
modernc.org/cc/v3 v3.41.0 // indirect
|
|
||||||
modernc.org/ccgo/v3 v3.16.15 // indirect
|
|
||||||
modernc.org/libc v1.29.0 // indirect
|
|
||||||
modernc.org/mathutil v1.6.0 // indirect
|
|
||||||
modernc.org/memory v1.7.2 // indirect
|
|
||||||
modernc.org/opt v0.1.3 // indirect
|
|
||||||
modernc.org/sqlite v1.28.0 // indirect
|
|
||||||
modernc.org/strutil v1.2.0 // indirect
|
|
||||||
modernc.org/token v1.1.0 // indirect
|
|
||||||
nhooyr.io/websocket v1.8.10 // indirect
|
|
||||||
pgregory.net/rapid v1.1.0 // indirect
|
|
||||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
|
||||||
)
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,137 +0,0 @@
|
|||||||
package e2e
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"cosmossdk.io/math"
|
|
||||||
transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/ibc"
|
|
||||||
interchaintestrelayer "github.com/strangelove-ventures/interchaintest/v8/relayer"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/testreporter"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
"go.uber.org/zap/zapcore"
|
|
||||||
"go.uber.org/zap/zaptest"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ibcPath = "ibc-path"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestIBC(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
ctx := context.Background()
|
|
||||||
|
|
||||||
cfgA := DefaultChainConfig
|
|
||||||
cfgA.ChainID = cfgA.ChainID + "-1"
|
|
||||||
|
|
||||||
cfgB := DefaultChainConfig
|
|
||||||
cfgB.ChainID = cfgB.ChainID + "-2"
|
|
||||||
|
|
||||||
cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t, zaptest.Level(zapcore.DebugLevel)), []*interchaintest.ChainSpec{
|
|
||||||
{
|
|
||||||
Name: DefaultChainConfig.Name,
|
|
||||||
Version: ChainImage.Version,
|
|
||||||
ChainName: cfgA.ChainID,
|
|
||||||
NumValidators: &NumberVals,
|
|
||||||
NumFullNodes: &NumberFullNodes,
|
|
||||||
ChainConfig: cfgA,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: DefaultChainConfig.Name,
|
|
||||||
Version: ChainImage.Version,
|
|
||||||
ChainName: cfgB.ChainID,
|
|
||||||
NumValidators: &NumberVals,
|
|
||||||
NumFullNodes: &NumberFullNodes,
|
|
||||||
ChainConfig: cfgB,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
chains, err := cf.Chains(t.Name())
|
|
||||||
require.NoError(t, err)
|
|
||||||
chainA, chainB := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain)
|
|
||||||
|
|
||||||
// Relayer Factory
|
|
||||||
client, network := interchaintest.DockerSetup(t)
|
|
||||||
rf := interchaintest.NewBuiltinRelayerFactory(
|
|
||||||
ibc.CosmosRly,
|
|
||||||
zaptest.NewLogger(t, zaptest.Level(zapcore.DebugLevel)),
|
|
||||||
interchaintestrelayer.CustomDockerImage(RelayerRepo, RelayerVersion, "100:1000"),
|
|
||||||
interchaintestrelayer.StartupFlags("--processor", "events", "--block-history", "100"),
|
|
||||||
)
|
|
||||||
|
|
||||||
r := rf.Build(t, client, network)
|
|
||||||
|
|
||||||
ic := interchaintest.NewInterchain().
|
|
||||||
AddChain(chainA).
|
|
||||||
AddChain(chainB).
|
|
||||||
AddRelayer(r, "relayer").
|
|
||||||
AddLink(interchaintest.InterchainLink{
|
|
||||||
Chain1: chainA,
|
|
||||||
Chain2: chainB,
|
|
||||||
Relayer: r,
|
|
||||||
Path: ibcPath,
|
|
||||||
})
|
|
||||||
|
|
||||||
rep := testreporter.NewNopReporter()
|
|
||||||
eRep := rep.RelayerExecReporter(t)
|
|
||||||
|
|
||||||
// Build interchain
|
|
||||||
require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{
|
|
||||||
TestName: t.Name(),
|
|
||||||
Client: client,
|
|
||||||
NetworkID: network,
|
|
||||||
SkipPathCreation: false,
|
|
||||||
}))
|
|
||||||
|
|
||||||
// Create and Fund User Wallets
|
|
||||||
fundAmount := math.NewInt(10_000_000)
|
|
||||||
users := interchaintest.GetAndFundTestUsers(t, ctx, "default", fundAmount, chainA, chainB)
|
|
||||||
userA := users[0]
|
|
||||||
userB := users[1]
|
|
||||||
|
|
||||||
userAInitial, err := chainA.GetBalance(ctx, userA.FormattedAddress(), chainA.Config().Denom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.True(t, userAInitial.Equal(fundAmount))
|
|
||||||
|
|
||||||
// Get Channel ID
|
|
||||||
aInfo, err := r.GetChannels(ctx, eRep, chainA.Config().ChainID)
|
|
||||||
require.NoError(t, err)
|
|
||||||
aChannelID := aInfo[0].ChannelID
|
|
||||||
|
|
||||||
bInfo, err := r.GetChannels(ctx, eRep, chainB.Config().ChainID)
|
|
||||||
require.NoError(t, err)
|
|
||||||
bChannelID := bInfo[0].ChannelID
|
|
||||||
|
|
||||||
// Send Transaction
|
|
||||||
amountToSend := math.NewInt(1_000_000)
|
|
||||||
dstAddress := userB.FormattedAddress()
|
|
||||||
transfer := ibc.WalletAmount{
|
|
||||||
Address: dstAddress,
|
|
||||||
Denom: chainA.Config().Denom,
|
|
||||||
Amount: amountToSend,
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = chainA.SendIBCTransfer(ctx, aChannelID, userA.KeyName(), transfer, ibc.TransferOptions{})
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
// relay MsgRecvPacket to chainB, then MsgAcknowledgement back to chainA
|
|
||||||
require.NoError(t, r.Flush(ctx, eRep, ibcPath, aChannelID))
|
|
||||||
|
|
||||||
// test source wallet has decreased funds
|
|
||||||
expectedBal := userAInitial.Sub(amountToSend)
|
|
||||||
aNewBal, err := chainA.GetBalance(ctx, userA.FormattedAddress(), chainA.Config().Denom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.True(t, aNewBal.Equal(expectedBal))
|
|
||||||
|
|
||||||
// Trace IBC Denom
|
|
||||||
srcDenomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom("transfer", bChannelID, chainA.Config().Denom))
|
|
||||||
dstIbcDenom := srcDenomTrace.IBCDenom()
|
|
||||||
|
|
||||||
// Test destination wallet has increased funds
|
|
||||||
bNewBal, err := chainB.GetBalance(ctx, userB.FormattedAddress(), dstIbcDenom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.True(t, bNewBal.Equal(amountToSend))
|
|
||||||
}
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
package e2e
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"encoding/json"
|
|
||||||
"testing"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"cosmossdk.io/math"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/ibc"
|
|
||||||
interchaintestrelayer "github.com/strangelove-ventures/interchaintest/v8/relayer"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/testreporter"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/testutil"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
"go.uber.org/zap/zaptest"
|
|
||||||
|
|
||||||
transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
|
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
type PacketMetadata struct {
|
|
||||||
Forward *ForwardMetadata `json:"forward"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ForwardMetadata struct {
|
|
||||||
Receiver string `json:"receiver"`
|
|
||||||
Port string `json:"port"`
|
|
||||||
Channel string `json:"channel"`
|
|
||||||
Timeout time.Duration `json:"timeout"`
|
|
||||||
Retries *uint8 `json:"retries,omitempty"`
|
|
||||||
Next *string `json:"next,omitempty"`
|
|
||||||
RefundSequence *uint64 `json:"refund_sequence,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestPacketForwardMiddleware(t *testing.T) {
|
|
||||||
if testing.Short() {
|
|
||||||
t.Skip()
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
ctx = context.Background()
|
|
||||||
client, network = interchaintest.DockerSetup(t)
|
|
||||||
rep = testreporter.NewNopReporter()
|
|
||||||
eRep = rep.RelayerExecReporter(t)
|
|
||||||
chainID_A, chainID_B, chainID_C = "chain-a", "chain-b", "chain-c"
|
|
||||||
chainA, chainB, chainC *cosmos.CosmosChain
|
|
||||||
)
|
|
||||||
|
|
||||||
// base config which all networks will use as defaults.
|
|
||||||
baseCfg := DefaultChainConfig
|
|
||||||
|
|
||||||
// Set specific chain ids for each so they are their own unique networks
|
|
||||||
baseCfg.ChainID = chainID_A
|
|
||||||
configA := baseCfg
|
|
||||||
|
|
||||||
baseCfg.ChainID = chainID_B
|
|
||||||
configB := baseCfg
|
|
||||||
|
|
||||||
baseCfg.ChainID = chainID_C
|
|
||||||
configC := baseCfg
|
|
||||||
|
|
||||||
// Create chain factory with multiple individual networks.
|
|
||||||
numVals := 1
|
|
||||||
numFullNodes := 0
|
|
||||||
|
|
||||||
cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{
|
|
||||||
{
|
|
||||||
Name: configA.Name,
|
|
||||||
ChainConfig: configA,
|
|
||||||
NumValidators: &numVals,
|
|
||||||
NumFullNodes: &numFullNodes,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: configA.Name,
|
|
||||||
ChainConfig: configB,
|
|
||||||
NumValidators: &numVals,
|
|
||||||
NumFullNodes: &numFullNodes,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: configA.Name,
|
|
||||||
ChainConfig: configC,
|
|
||||||
NumValidators: &numVals,
|
|
||||||
NumFullNodes: &numFullNodes,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
// Get chains from the chain factory
|
|
||||||
chains, err := cf.Chains(t.Name())
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
chainA, chainB, chainC = chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain), chains[2].(*cosmos.CosmosChain)
|
|
||||||
|
|
||||||
r := interchaintest.NewBuiltinRelayerFactory(
|
|
||||||
ibc.CosmosRly,
|
|
||||||
zaptest.NewLogger(t),
|
|
||||||
interchaintestrelayer.CustomDockerImage(RelayerRepo, RelayerVersion, "100:1000"),
|
|
||||||
interchaintestrelayer.StartupFlags("--processor", "events", "--block-history", "100"),
|
|
||||||
).Build(t, client, network)
|
|
||||||
|
|
||||||
const pathAB = "ab"
|
|
||||||
const pathBC = "bc"
|
|
||||||
|
|
||||||
ic := interchaintest.NewInterchain().
|
|
||||||
AddChain(chainA).
|
|
||||||
AddChain(chainB).
|
|
||||||
AddChain(chainC).
|
|
||||||
AddRelayer(r, "relayer").
|
|
||||||
AddLink(interchaintest.InterchainLink{
|
|
||||||
Chain1: chainA,
|
|
||||||
Chain2: chainB,
|
|
||||||
Relayer: r,
|
|
||||||
Path: pathAB,
|
|
||||||
}).
|
|
||||||
AddLink(interchaintest.InterchainLink{
|
|
||||||
Chain1: chainB,
|
|
||||||
Chain2: chainC,
|
|
||||||
Relayer: r,
|
|
||||||
Path: pathBC,
|
|
||||||
})
|
|
||||||
|
|
||||||
require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{
|
|
||||||
TestName: t.Name(),
|
|
||||||
Client: client,
|
|
||||||
NetworkID: network,
|
|
||||||
BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(),
|
|
||||||
|
|
||||||
SkipPathCreation: false,
|
|
||||||
}))
|
|
||||||
t.Cleanup(func() {
|
|
||||||
_ = ic.Close()
|
|
||||||
})
|
|
||||||
|
|
||||||
users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), GenesisFundsAmount, chainA, chainB, chainC)
|
|
||||||
|
|
||||||
abChan, err := ibc.GetTransferChannel(ctx, r, eRep, chainID_A, chainID_B)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
baChan := abChan.Counterparty
|
|
||||||
|
|
||||||
cbChan, err := ibc.GetTransferChannel(ctx, r, eRep, chainID_C, chainID_B)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
bcChan := cbChan.Counterparty
|
|
||||||
|
|
||||||
// Start the relayer on all paths
|
|
||||||
err = r.StartRelayer(ctx, eRep, pathAB, pathBC)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
t.Cleanup(
|
|
||||||
func() {
|
|
||||||
err := r.StopRelayer(ctx, eRep)
|
|
||||||
if err != nil {
|
|
||||||
t.Logf("an error occurred while stopping the relayer: %s", err)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
// Get original account balances
|
|
||||||
userA, userB, userC := users[0], users[1], users[2]
|
|
||||||
|
|
||||||
var transferAmount math.Int = math.NewInt(100_000)
|
|
||||||
|
|
||||||
// Compose the prefixed denoms and ibc denom for asserting balances
|
|
||||||
firstHopDenom := transfertypes.GetPrefixedDenom(baChan.PortID, baChan.ChannelID, chainA.Config().Denom)
|
|
||||||
secondHopDenom := transfertypes.GetPrefixedDenom(cbChan.PortID, cbChan.ChannelID, firstHopDenom)
|
|
||||||
|
|
||||||
firstHopDenomTrace := transfertypes.ParseDenomTrace(firstHopDenom)
|
|
||||||
secondHopDenomTrace := transfertypes.ParseDenomTrace(secondHopDenom)
|
|
||||||
|
|
||||||
firstHopIBCDenom := firstHopDenomTrace.IBCDenom()
|
|
||||||
secondHopIBCDenom := secondHopDenomTrace.IBCDenom()
|
|
||||||
|
|
||||||
firstHopEscrowAccount := sdk.MustBech32ifyAddressBytes(chainA.Config().Bech32Prefix, transfertypes.GetEscrowAddress(abChan.PortID, abChan.ChannelID))
|
|
||||||
secondHopEscrowAccount := sdk.MustBech32ifyAddressBytes(chainB.Config().Bech32Prefix, transfertypes.GetEscrowAddress(bcChan.PortID, bcChan.ChannelID))
|
|
||||||
|
|
||||||
t.Run("multi-hop a->b->c", func(t *testing.T) {
|
|
||||||
// Send packet from Chain A->Chain B->Chain C
|
|
||||||
|
|
||||||
transfer := ibc.WalletAmount{
|
|
||||||
Address: userB.FormattedAddress(),
|
|
||||||
Denom: chainA.Config().Denom,
|
|
||||||
Amount: transferAmount,
|
|
||||||
}
|
|
||||||
|
|
||||||
firstHopMetadata := &PacketMetadata{
|
|
||||||
Forward: &ForwardMetadata{
|
|
||||||
Receiver: userC.FormattedAddress(),
|
|
||||||
Channel: bcChan.ChannelID,
|
|
||||||
Port: bcChan.PortID,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
memo, err := json.Marshal(firstHopMetadata)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
chainAHeight, err := chainA.Height(ctx)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
transferTx, err := chainA.SendIBCTransfer(ctx, abChan.ChannelID, userA.KeyName(), transfer, ibc.TransferOptions{Memo: string(memo)})
|
|
||||||
require.NoError(t, err)
|
|
||||||
_, err = testutil.PollForAck(ctx, chainA, chainAHeight, chainAHeight+30, transferTx.Packet)
|
|
||||||
require.NoError(t, err)
|
|
||||||
err = testutil.WaitForBlocks(ctx, 1, chainA)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
chainABalance, err := chainA.GetBalance(ctx, userA.FormattedAddress(), chainA.Config().Denom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
chainBBalance, err := chainB.GetBalance(ctx, userB.FormattedAddress(), firstHopIBCDenom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
chainCBalance, err := chainC.GetBalance(ctx, userC.FormattedAddress(), secondHopIBCDenom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
require.Equal(t, GenesisFundsAmount.Sub(transferAmount).Int64(), chainABalance.Int64())
|
|
||||||
require.Equal(t, int64(0), chainBBalance.Int64())
|
|
||||||
require.Equal(t, int64(100000), chainCBalance.Int64())
|
|
||||||
|
|
||||||
firstHopEscrowBalance, err := chainA.GetBalance(ctx, firstHopEscrowAccount, chainA.Config().Denom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
secondHopEscrowBalance, err := chainB.GetBalance(ctx, secondHopEscrowAccount, firstHopIBCDenom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
require.Equal(t, transferAmount.Int64(), firstHopEscrowBalance.Int64())
|
|
||||||
require.Equal(t, transferAmount.Int64(), secondHopEscrowBalance.Int64())
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
package e2e
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
||||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/ibc"
|
|
||||||
"github.com/strangelove-ventures/poa"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
)
|
|
||||||
|
|
||||||
func POASetPower(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, valoper string, power int64, flags ...string) (sdk.TxResponse, error) {
|
|
||||||
cmd := TxCommandBuilder(ctx, chain, []string{"tx", "poa", "set-power", valoper, fmt.Sprintf("%d", power)}, user.KeyName(), flags...)
|
|
||||||
return ExecuteTransaction(ctx, chain, cmd)
|
|
||||||
}
|
|
||||||
|
|
||||||
func POARemove(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, valoper string) (sdk.TxResponse, error) {
|
|
||||||
cmd := TxCommandBuilder(ctx, chain, []string{"tx", "poa", "remove", valoper}, user.KeyName())
|
|
||||||
return ExecuteTransaction(ctx, chain, cmd)
|
|
||||||
}
|
|
||||||
|
|
||||||
func POARemovePending(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, valoper string) (sdk.TxResponse, error) {
|
|
||||||
cmd := TxCommandBuilder(ctx, chain, []string{"tx", "poa", "remove-pending", valoper}, user.KeyName())
|
|
||||||
return ExecuteTransaction(ctx, chain, cmd)
|
|
||||||
}
|
|
||||||
|
|
||||||
func POACreatePendingValidator(
|
|
||||||
t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet,
|
|
||||||
ed25519PubKey string, moniker string, commissionRate string, commissionMaxRate string, commissionMaxChangeRate string,
|
|
||||||
) (sdk.TxResponse, error) {
|
|
||||||
file := "validator_file.json"
|
|
||||||
|
|
||||||
content := fmt.Sprintf(`{
|
|
||||||
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"%s"},
|
|
||||||
"amount": "0%s",
|
|
||||||
"moniker": "%s",
|
|
||||||
"identity": "",
|
|
||||||
"website": "https://website.com",
|
|
||||||
"security": "security@cosmos.xyz",
|
|
||||||
"details": "description",
|
|
||||||
"commission-rate": "%s",
|
|
||||||
"commission-max-rate": "%s",
|
|
||||||
"commission-max-change-rate": "%s",
|
|
||||||
"min-self-delegation": "1"
|
|
||||||
|
|
||||||
}`, ed25519PubKey, chain.Config().Denom, moniker, commissionRate, commissionMaxRate, commissionMaxChangeRate)
|
|
||||||
|
|
||||||
err := chain.GetNode().WriteFile(ctx, []byte(content), file)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
filePath := fmt.Sprintf("%s/%s", chain.GetNode().HomeDir(), file)
|
|
||||||
cmd := TxCommandBuilder(ctx, chain, []string{"tx", "poa", "create-validator", filePath}, user.KeyName())
|
|
||||||
return ExecuteTransaction(ctx, chain, cmd)
|
|
||||||
}
|
|
||||||
|
|
||||||
func SubmitGovernanceProposalForValidatorChanges(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, validator string, power uint64, unsafe bool) string {
|
|
||||||
govAddr := "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn"
|
|
||||||
|
|
||||||
powerMsg := []cosmos.ProtoMessage{
|
|
||||||
&poa.MsgSetPower{
|
|
||||||
Sender: govAddr,
|
|
||||||
ValidatorAddress: validator,
|
|
||||||
Power: power,
|
|
||||||
Unsafe: unsafe,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
title := fmt.Sprintf("Update" + validator + "Power")
|
|
||||||
desc := fmt.Sprintf("Updating power for validator %s to %d", validator, power)
|
|
||||||
|
|
||||||
proposal, err := chain.BuildProposal(powerMsg, title, desc, desc, fmt.Sprintf(`50%s`, chain.Config().Denom), user.FormattedAddress(), false)
|
|
||||||
require.NoError(t, err, "error building proposal")
|
|
||||||
|
|
||||||
fmt.Printf("proposal: %+v\n", proposal)
|
|
||||||
|
|
||||||
txProp, err := chain.SubmitProposal(ctx, user.KeyName(), proposal)
|
|
||||||
t.Log("txProp", txProp)
|
|
||||||
require.NoError(t, err, "error submitting proposal")
|
|
||||||
|
|
||||||
return txProp.ProposalID
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetPOAParams(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain) poa.Params {
|
|
||||||
var res poa.ParamsResponse
|
|
||||||
ExecuteQuery(ctx, chain, []string{"query", "poa", "params"}, &res)
|
|
||||||
return res.Params
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetPOAConsensusPower(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, valoperAddr string) int64 {
|
|
||||||
res, err := poa.NewQueryClient(chain.GetNode().GrpcConn).ConsensusPower(ctx, &poa.QueryConsensusPowerRequest{ValidatorAddress: valoperAddr})
|
|
||||||
require.NoError(t, err)
|
|
||||||
return res.ConsensusPower
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetPOAPending(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain) []poa.Validator {
|
|
||||||
res, err := poa.NewQueryClient(chain.GetNode().GrpcConn).PendingValidators(ctx, &poa.QueryPendingValidatorsRequest{})
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
return res.Pending
|
|
||||||
}
|
|
||||||
|
|
||||||
func POAUpdateParams(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, admins []string, gracefulExit bool) (sdk.TxResponse, error) {
|
|
||||||
// admin1,admin2,admin3
|
|
||||||
adminList := ""
|
|
||||||
for _, admin := range admins {
|
|
||||||
adminList += admin + ","
|
|
||||||
}
|
|
||||||
adminList = adminList[:len(adminList)-1]
|
|
||||||
|
|
||||||
gracefulParam := "true"
|
|
||||||
if !gracefulExit {
|
|
||||||
gracefulParam = "false"
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd := TxCommandBuilder(ctx, chain, []string{"tx", "poa", "update-params", adminList, gracefulParam}, user.KeyName())
|
|
||||||
return ExecuteTransaction(ctx, chain, cmd)
|
|
||||||
}
|
|
||||||
|
|
||||||
func POAUpdateStakingParams(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, sp stakingtypes.Params) (sdk.TxResponse, error) {
|
|
||||||
command := []string{"tx", "poa", "update-staking-params",
|
|
||||||
sp.UnbondingTime.String(),
|
|
||||||
fmt.Sprintf("%d", sp.MaxValidators),
|
|
||||||
fmt.Sprintf("%d", sp.MaxEntries),
|
|
||||||
fmt.Sprintf("%d", sp.HistoricalEntries),
|
|
||||||
sp.BondDenom,
|
|
||||||
fmt.Sprintf("%d", sp.MinCommissionRate),
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd := TxCommandBuilder(ctx, chain, command, user.KeyName())
|
|
||||||
return ExecuteTransaction(ctx, chain, cmd)
|
|
||||||
}
|
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
package e2e
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/ibc"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/testutil"
|
|
||||||
"github.com/strangelove-ventures/poa"
|
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
numPOAVals = 2
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestPOA(t *testing.T) {
|
|
||||||
if testing.Short() {
|
|
||||||
t.Skip("skipping in short mode")
|
|
||||||
}
|
|
||||||
|
|
||||||
// setup base chain
|
|
||||||
chains := interchaintest.CreateChainWithConfig(t, numPOAVals, NumberFullNodes, Name, ChainImage.Version, DefaultChainConfig)
|
|
||||||
chain := chains[0].(*cosmos.CosmosChain)
|
|
||||||
|
|
||||||
enableBlockDB := false
|
|
||||||
ctx, _, _, _ := interchaintest.BuildInitialChain(t, chains, enableBlockDB)
|
|
||||||
|
|
||||||
// setup accounts
|
|
||||||
acc0, err := interchaintest.GetAndFundTestUserWithMnemonic(ctx, "acc0", AccMnemonic, GenesisFundsAmount, chain)
|
|
||||||
require.NoError(t, err)
|
|
||||||
acc1, err := interchaintest.GetAndFundTestUserWithMnemonic(ctx, "acc1", Acc1Mnemonic, GenesisFundsAmount, chain)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), GenesisFundsAmount, chain)
|
|
||||||
incorrectUser := users[0]
|
|
||||||
|
|
||||||
// get validator operator addresses
|
|
||||||
vals, err := chain.StakingQueryValidators(ctx, stakingtypes.Bonded.String())
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.Equal(t, len(vals), numPOAVals)
|
|
||||||
|
|
||||||
validators := make([]string, len(vals))
|
|
||||||
for i, v := range vals {
|
|
||||||
validators[i] = v.OperatorAddress
|
|
||||||
}
|
|
||||||
|
|
||||||
// === Test Cases ===
|
|
||||||
testStakingDisabled(t, ctx, chain, validators, acc0, acc1)
|
|
||||||
testPowerErrors(t, ctx, chain, validators, incorrectUser, acc0)
|
|
||||||
testPending(t, ctx, chain, acc0)
|
|
||||||
testRemoveValidator(t, ctx, chain, validators, acc0)
|
|
||||||
}
|
|
||||||
|
|
||||||
func testRemoveValidator(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, validators []string, acc0 ibc.Wallet) {
|
|
||||||
t.Log("\n===== TEST REMOVE VALIDATOR =====")
|
|
||||||
powerOne := int64(9_000_000_000_000)
|
|
||||||
powerTwo := int64(2_500_000)
|
|
||||||
|
|
||||||
res, _ := POASetPower(t, ctx, chain, acc0, validators[0], powerOne, "--unsafe")
|
|
||||||
fmt.Printf("%+v", res)
|
|
||||||
res, _ = POASetPower(t, ctx, chain, acc0, validators[1], powerTwo, "--unsafe")
|
|
||||||
fmt.Printf("%+v", res)
|
|
||||||
|
|
||||||
// decode res.TxHash into a TxResponse
|
|
||||||
txRes, err := chain.GetTransaction(res.TxHash)
|
|
||||||
require.NoError(t, err)
|
|
||||||
fmt.Printf("%+v", txRes)
|
|
||||||
|
|
||||||
if err := testutil.WaitForBlocks(ctx, 2, chain); err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
vals, err := chain.StakingQueryValidators(ctx, stakingtypes.Bonded.String())
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.Equal(t, fmt.Sprintf("%d", powerOne), vals[0].Tokens.String())
|
|
||||||
require.Equal(t, fmt.Sprintf("%d", powerTwo), vals[1].Tokens.String())
|
|
||||||
|
|
||||||
// validate the validators both have a conesnsus-power of /1_000_000
|
|
||||||
p1 := GetPOAConsensusPower(t, ctx, chain, vals[0].OperatorAddress)
|
|
||||||
require.EqualValues(t, powerOne/1_000_000, p1) // = 9000000
|
|
||||||
p2 := GetPOAConsensusPower(t, ctx, chain, vals[1].OperatorAddress)
|
|
||||||
require.EqualValues(t, powerTwo/1_000_000, p2) // = 2
|
|
||||||
|
|
||||||
// remove the 2nd validator (lower power)
|
|
||||||
POARemove(t, ctx, chain, acc0, validators[1])
|
|
||||||
|
|
||||||
// allow the poa.BeginBlocker to update new status
|
|
||||||
if err := testutil.WaitForBlocks(ctx, 5, chain); err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
vals, err = chain.StakingQueryValidators(ctx, stakingtypes.Bonded.String())
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.Equal(t, fmt.Sprintf("%d", powerOne), vals[0].Tokens.String())
|
|
||||||
require.Equal(t, 1, len(vals))
|
|
||||||
|
|
||||||
vals, err = chain.StakingQueryValidators(ctx, stakingtypes.Unbonded.String())
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.Equal(t, "0", vals[0].Tokens.String())
|
|
||||||
require.Equal(t, 1, len(vals))
|
|
||||||
p2 = GetPOAConsensusPower(t, ctx, chain, vals[0].OperatorAddress)
|
|
||||||
require.EqualValues(t, 0, p2)
|
|
||||||
}
|
|
||||||
|
|
||||||
func testStakingDisabled(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, validators []string, acc0, acc1 ibc.Wallet) {
|
|
||||||
t.Log("\n===== TEST STAKING DISABLED =====")
|
|
||||||
|
|
||||||
err := chain.GetNode().StakingDelegate(ctx, acc0.KeyName(), validators[0], "1stake")
|
|
||||||
require.Error(t, err)
|
|
||||||
require.Contains(t, err.Error(), poa.ErrStakingActionNotAllowed.Error())
|
|
||||||
|
|
||||||
granter := acc1
|
|
||||||
grantee := acc0
|
|
||||||
|
|
||||||
// Grant grantee (acc0) the ability to delegate from granter (acc1)
|
|
||||||
res, err := chain.GetNode().AuthzGrant(ctx, granter, grantee.FormattedAddress(), "generic", "--msg-type", "/cosmos.staking.v1beta1.MsgDelegate")
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.EqualValues(t, res.Code, 0)
|
|
||||||
|
|
||||||
// Generate nested message
|
|
||||||
nested := []string{"tx", "staking", "delegate", validators[0], "1stake"}
|
|
||||||
nestedCmd := TxCommandBuilder(ctx, chain, nested, granter.FormattedAddress())
|
|
||||||
|
|
||||||
// Execute nested message via a wrapped Exec
|
|
||||||
_, err = chain.GetNode().AuthzExec(ctx, grantee, nestedCmd)
|
|
||||||
require.Error(t, err)
|
|
||||||
require.Contains(t, err.Error(), poa.ErrStakingActionNotAllowed.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
func testPending(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, acc0 ibc.Wallet) {
|
|
||||||
t.Log("\n===== TEST PENDING =====")
|
|
||||||
|
|
||||||
res, _ := POACreatePendingValidator(t, ctx, chain, acc0, "pl3Q8OQwtC7G2dSqRqsUrO5VZul7l40I+MKUcejqRsg=", "testval", "0.10", "0.25", "0.05")
|
|
||||||
require.EqualValues(t, 0, res.Code)
|
|
||||||
|
|
||||||
require.NoError(t, testutil.WaitForBlocks(ctx, 2, chain))
|
|
||||||
|
|
||||||
pv := GetPOAPending(t, ctx, chain)
|
|
||||||
require.Equal(t, 1, len(pv))
|
|
||||||
require.Equal(t, "0", pv[0].Tokens.String())
|
|
||||||
require.Equal(t, "1", pv[0].MinSelfDelegation.String())
|
|
||||||
|
|
||||||
res, _ = POARemovePending(t, ctx, chain, acc0, pv[0].OperatorAddress)
|
|
||||||
require.EqualValues(t, 0, res.Code)
|
|
||||||
|
|
||||||
// validate it was removed
|
|
||||||
pv = GetPOAPending(t, ctx, chain)
|
|
||||||
require.Equal(t, 0, len(pv))
|
|
||||||
}
|
|
||||||
|
|
||||||
func testPowerErrors(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, validators []string, incorrectUser ibc.Wallet, admin ibc.Wallet) {
|
|
||||||
t.Log("\n===== TEST POWER ERRORS =====")
|
|
||||||
var res sdk.TxResponse
|
|
||||||
var err error
|
|
||||||
|
|
||||||
t.Run("fail: set-power message from a non authorized user", func(t *testing.T) {
|
|
||||||
res, _ = POASetPower(t, ctx, chain, incorrectUser, validators[1], 1_000_000)
|
|
||||||
res, err := chain.GetTransaction(res.TxHash)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.Contains(t, res.RawLog, poa.ErrNotAnAuthority.Error())
|
|
||||||
})
|
|
||||||
|
|
||||||
t.Run("fail: set-power message below minimum power requirement (self bond)", func(t *testing.T) {
|
|
||||||
res, err = POASetPower(t, ctx, chain, admin, validators[0], 1)
|
|
||||||
require.Error(t, err) // cli validate error
|
|
||||||
require.Contains(t, err.Error(), poa.ErrPowerBelowMinimum.Error())
|
|
||||||
})
|
|
||||||
|
|
||||||
t.Run("fail: set-power message above 30%% without unsafe flag", func(t *testing.T) {
|
|
||||||
res, _ = POASetPower(t, ctx, chain, admin, validators[0], 9_000_000_000_000_000)
|
|
||||||
res, err := chain.GetTransaction(res.TxHash)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.Contains(t, res.RawLog, poa.ErrUnsafePower.Error())
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,175 +0,0 @@
|
|||||||
package e2e
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
|
||||||
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/ibc"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/testutil"
|
|
||||||
|
|
||||||
sdkmath "cosmossdk.io/math"
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
||||||
|
|
||||||
globalfee "github.com/strangelove-ventures/globalfee/x/globalfee/types"
|
|
||||||
poa "github.com/strangelove-ventures/poa"
|
|
||||||
tokenfactory "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
VotingPeriod = "15s"
|
|
||||||
MaxDepositPeriod = "10s"
|
|
||||||
|
|
||||||
Denom = "usnr"
|
|
||||||
Name = "sonr"
|
|
||||||
ChainID = "chainid-1"
|
|
||||||
Binary = "sonrd"
|
|
||||||
|
|
||||||
Bech32 = "idx"
|
|
||||||
|
|
||||||
NumberVals = 1
|
|
||||||
NumberFullNodes = 0
|
|
||||||
GenesisFundsAmount = sdkmath.NewInt(1000_000000) // 1k tokens
|
|
||||||
|
|
||||||
ChainImage = ibc.NewDockerImage("core", "local", "1025:1025")
|
|
||||||
|
|
||||||
DefaultGenesis = []cosmos.GenesisKV{
|
|
||||||
// default
|
|
||||||
cosmos.NewGenesisKV("app_state.gov.params.voting_period", VotingPeriod),
|
|
||||||
cosmos.NewGenesisKV("app_state.gov.params.max_deposit_period", MaxDepositPeriod),
|
|
||||||
cosmos.NewGenesisKV("app_state.gov.params.min_deposit.0.denom", Denom),
|
|
||||||
cosmos.NewGenesisKV("app_state.gov.params.min_deposit.0.amount", "1"),
|
|
||||||
// poa: gov & testing account
|
|
||||||
cosmos.NewGenesisKV("app_state.poa.params.admins", []string{"idx10d07y265gmmuvt4z0w9aw880jnsr700j9kqcfa", "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd"}),
|
|
||||||
// globalfee: set minimum fee requirements
|
|
||||||
cosmos.NewGenesisKV("app_state.globalfee.params.minimum_gas_prices", sdk.DecCoins{sdk.NewDecCoinFromDec(Denom, sdkmath.LegacyMustNewDecFromStr("0.0"))}),
|
|
||||||
// tokenfactory: set create cost in set denom or in gas usage.
|
|
||||||
cosmos.NewGenesisKV("app_state.tokenfactory.params.denom_creation_fee", nil),
|
|
||||||
cosmos.NewGenesisKV("app_state.tokenfactory.params.denom_creation_gas_consume", 1), // cost 1 gas to create a new denom
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
DefaultChainConfig = ibc.ChainConfig{
|
|
||||||
Images: []ibc.DockerImage{
|
|
||||||
ChainImage,
|
|
||||||
},
|
|
||||||
GasAdjustment: 1.5,
|
|
||||||
ModifyGenesis: cosmos.ModifyGenesis(DefaultGenesis),
|
|
||||||
EncodingConfig: func() *moduletestutil.TestEncodingConfig {
|
|
||||||
cfg := cosmos.DefaultEncoding()
|
|
||||||
// TODO: add encoding types here for the modules you want to use
|
|
||||||
tokenfactory.RegisterInterfaces(cfg.InterfaceRegistry)
|
|
||||||
globalfee.RegisterInterfaces(cfg.InterfaceRegistry)
|
|
||||||
poa.RegisterInterfaces(cfg.InterfaceRegistry)
|
|
||||||
return &cfg
|
|
||||||
}(),
|
|
||||||
Type: "cosmos",
|
|
||||||
Name: Name,
|
|
||||||
ChainID: ChainID,
|
|
||||||
Bin: Binary,
|
|
||||||
Bech32Prefix: Bech32,
|
|
||||||
Denom: Denom,
|
|
||||||
CoinType: "118",
|
|
||||||
GasPrices: "0" + Denom,
|
|
||||||
TrustingPeriod: "336h",
|
|
||||||
}
|
|
||||||
|
|
||||||
DefaultChainSpec = interchaintest.ChainSpec{
|
|
||||||
Name: Name,
|
|
||||||
ChainName: Name,
|
|
||||||
Version: ChainImage.Version,
|
|
||||||
ChainConfig: DefaultChainConfig,
|
|
||||||
NumValidators: &NumberVals,
|
|
||||||
NumFullNodes: &NumberFullNodes,
|
|
||||||
}
|
|
||||||
|
|
||||||
// cosmos1hj5fveer5cjtn4wd6wstzugjfdxzl0xpxvjjvr - test_node.sh
|
|
||||||
AccMnemonic = "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry"
|
|
||||||
Acc1Mnemonic = "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise"
|
|
||||||
|
|
||||||
RelayerRepo = "ghcr.io/cosmos/relayer"
|
|
||||||
RelayerVersion = "main"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Other Helpers
|
|
||||||
func ExecuteQuery(ctx context.Context, chain *cosmos.CosmosChain, cmd []string, i interface{}, extraFlags ...string) {
|
|
||||||
flags := []string{
|
|
||||||
"--node", chain.GetRPCAddress(),
|
|
||||||
"--output=json",
|
|
||||||
}
|
|
||||||
flags = append(flags, extraFlags...)
|
|
||||||
|
|
||||||
ExecuteExec(ctx, chain, cmd, i, flags...)
|
|
||||||
}
|
|
||||||
func ExecuteExec(ctx context.Context, chain *cosmos.CosmosChain, cmd []string, i interface{}, extraFlags ...string) {
|
|
||||||
command := []string{chain.Config().Bin}
|
|
||||||
command = append(command, cmd...)
|
|
||||||
command = append(command, extraFlags...)
|
|
||||||
fmt.Println(command)
|
|
||||||
|
|
||||||
stdout, _, err := chain.Exec(ctx, command, nil)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Println(string(stdout))
|
|
||||||
if err := json.Unmarshal(stdout, &i); err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Executes a command from CommandBuilder
|
|
||||||
func ExecuteTransaction(ctx context.Context, chain *cosmos.CosmosChain, cmd []string) (sdk.TxResponse, error) {
|
|
||||||
var err error
|
|
||||||
var stdout []byte
|
|
||||||
|
|
||||||
stdout, _, err = chain.Exec(ctx, cmd, nil)
|
|
||||||
if err != nil {
|
|
||||||
return sdk.TxResponse{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := testutil.WaitForBlocks(ctx, 2, chain); err != nil {
|
|
||||||
return sdk.TxResponse{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var res sdk.TxResponse
|
|
||||||
if err := json.Unmarshal(stdout, &res); err != nil {
|
|
||||||
return res, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return res, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func TxCommandBuilder(ctx context.Context, chain *cosmos.CosmosChain, cmd []string, fromUser string, extraFlags ...string) []string {
|
|
||||||
return TxCommandBuilderNode(ctx, chain.GetNode(), cmd, fromUser, extraFlags...)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TxCommandBuilderNode(ctx context.Context, node *cosmos.ChainNode, cmd []string, fromUser string, extraFlags ...string) []string {
|
|
||||||
command := []string{node.Chain.Config().Bin}
|
|
||||||
command = append(command, cmd...)
|
|
||||||
command = append(command, "--node", node.Chain.GetRPCAddress())
|
|
||||||
command = append(command, "--home", node.HomeDir())
|
|
||||||
command = append(command, "--chain-id", node.Chain.Config().ChainID)
|
|
||||||
command = append(command, "--from", fromUser)
|
|
||||||
command = append(command, "--keyring-backend", keyring.BackendTest)
|
|
||||||
command = append(command, "--output=json")
|
|
||||||
command = append(command, "--yes")
|
|
||||||
|
|
||||||
gasFlag := false
|
|
||||||
for _, flag := range extraFlags {
|
|
||||||
if flag == "--gas" {
|
|
||||||
gasFlag = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if !gasFlag {
|
|
||||||
command = append(command, "--gas", "500000")
|
|
||||||
}
|
|
||||||
|
|
||||||
command = append(command, extraFlags...)
|
|
||||||
return command
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
package e2e
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8"
|
|
||||||
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestTokenFactory(t *testing.T) {
|
|
||||||
if testing.Short() {
|
|
||||||
t.Skip("skipping in short mode")
|
|
||||||
}
|
|
||||||
|
|
||||||
// setup base chain
|
|
||||||
chains := interchaintest.CreateChainWithConfig(t, NumberVals, NumberFullNodes, Name, ChainImage.Version, DefaultChainConfig)
|
|
||||||
chain := chains[0].(*cosmos.CosmosChain)
|
|
||||||
ctx, ic, _, _ := interchaintest.BuildInitialChain(t, chains, false)
|
|
||||||
|
|
||||||
users := interchaintest.GetAndFundTestUsers(t, ctx, "default", GenesisFundsAmount, chain, chain)
|
|
||||||
user := users[0]
|
|
||||||
user2 := users[1]
|
|
||||||
|
|
||||||
uaddr := user.FormattedAddress()
|
|
||||||
uaddr2 := user2.FormattedAddress()
|
|
||||||
|
|
||||||
node := chain.GetNode()
|
|
||||||
|
|
||||||
tfDenom, _, err := node.TokenFactoryCreateDenom(ctx, user, "ictestdenom", 2_500_00)
|
|
||||||
t.Log("TF Denom: ", tfDenom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
t.Log("Mint TF Denom to user")
|
|
||||||
node.TokenFactoryMintDenom(ctx, user.FormattedAddress(), tfDenom, 100)
|
|
||||||
if balance, err := chain.GetBalance(ctx, uaddr, tfDenom); err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
} else if balance.Int64() != 100 {
|
|
||||||
t.Fatal("balance not 100")
|
|
||||||
}
|
|
||||||
|
|
||||||
t.Log("Mint TF Denom to another user")
|
|
||||||
node.TokenFactoryMintDenomTo(ctx, user.FormattedAddress(), tfDenom, 70, user2.FormattedAddress())
|
|
||||||
if balance, err := chain.GetBalance(ctx, uaddr2, tfDenom); err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
} else if balance.Int64() != 70 {
|
|
||||||
t.Fatal("balance not 70")
|
|
||||||
}
|
|
||||||
|
|
||||||
t.Log("Change admin to uaddr2")
|
|
||||||
_, err = node.TokenFactoryChangeAdmin(ctx, user.KeyName(), tfDenom, uaddr2)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
// ensure the admin is the contract
|
|
||||||
res, err := chain.TokenFactoryQueryAdmin(ctx, tfDenom)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.EqualValues(t, res.AuthorityMetadata.Admin, uaddr2, "admin not uaddr2. Did not properly transfer.")
|
|
||||||
|
|
||||||
t.Cleanup(func() {
|
|
||||||
_ = ic.Close()
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user