+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- 1.19.13-bullseye
- 1.20.13-bullseye
- 1.21.6-bookworm
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
container: golang:${{matrix.containers}}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ var chainIDs = map[chainIDKey]ChainID{
{Polygon, Cardona}: 2442,
{Privado, Main}: 21000,
{Privado, Test}: 21001,
{Billions, Main}: 45056,
{Billions, Test}: 6913,
{Linea, Main}: 59144,
{Linea, Sepolia}: 59141,
}
Expand Down
6 changes: 6 additions & 0 deletions did.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ const (
Polygon Blockchain = "polygon"
// Privado is Privado blockchain network
Privado Blockchain = "privado"
// Billions is Billions blockchain network
Billions Blockchain = "billions"
// Linea is Linea blockchain network
Linea Blockchain = "linea"
// UnknownChain is used when it's not possible to retrieve blockchain type from identifier
Expand All @@ -78,6 +80,7 @@ var blockchains = map[Blockchain]Blockchain{
Ethereum: Ethereum,
Polygon: Polygon,
Privado: Privado,
Billions: Billions,
Linea: Linea,
UnknownChain: UnknownChain,
ReadOnly: ReadOnly,
Expand Down Expand Up @@ -216,6 +219,9 @@ var blockchainNetworkMap = map[DIDNetworkFlag]byte{
{Blockchain: Privado, NetworkID: Main}: 0b1010_0000 | 0b0000_0001,
{Blockchain: Privado, NetworkID: Test}: 0b1010_0000 | 0b0000_0010,

{Blockchain: Billions, NetworkID: Main}: 0b1011_0000 | 0b0000_0001,
{Blockchain: Billions, NetworkID: Test}: 0b1011_0000 | 0b0000_0010,

{Blockchain: Linea, NetworkID: Main}: 0b0100_0000 | 0b0000_1001,
{Blockchain: Linea, NetworkID: Sepolia}: 0b0100_0000 | 0b0000_1000,
}
Expand Down
14 changes: 14 additions & 0 deletions did_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,20 @@ func TestDID_Build_From_Types(t *testing.T) {
net: Test,
wantDID: "did:iden3:privado:test:2Skqvp4vnSFtq5bgAXbDs1Fs4AA5QGpRut9mCDew5R",
},
{
title: "Iden3 | Billions chain, main",
method: DIDMethodIden3,
chain: Billions,
net: Main,
wantDID: "did:iden3:billions:main:2VmAkXrihYaKzzVRkb3hoFRH3zdjibHXPK2Ahm3xBq",
},
{
title: "Iden3 | Billions chain, test",
method: DIDMethodIden3,
chain: Billions,
net: Test,
wantDID: "did:iden3:billions:test:2VxnoiNqdMPxUigcPf9LTfZdz7jSwQv8YscTjjH5zf",
},
{
title: "Iden3 | Linea, Main",
method: DIDMethodIden3,
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载