Skip to content

Commit b581b55

Browse files
author
David Case
committed
add ALIAS support
1 parent a8b8705 commit b581b55

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

bap.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const (
2929
ATTEST AttestationType = "ATTEST"
3030
ID AttestationType = "ID"
3131
REVOKE AttestationType = "REVOKE"
32+
ALIAS AttestationType = "ALIAS"
3233
)
3334

3435
// CreateIdentity creates an identity from a private key, an id key, and a counter

bob.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ type Bap struct {
1515
Sequence uint64 `json:"sequence" bson:"sequence"`
1616
Type AttestationType `json:"type,omitempty" bson:"type,omitempty"`
1717
URNHash string `json:"urn_hash,omitempty" bson:"urn_hash,omitempty"`
18+
Profile string `json:"profile,omitempty" bson:"profile,omitempty"`
1819
}
1920

2021
// FromTape takes a bob.Tape and returns a BAP data structure
@@ -44,6 +45,9 @@ func (b *Bap) FromTape(tape *bpu.Tape) (err error) {
4445
case ID:
4546
b.Address = *tape.Cell[3].S
4647
b.IDKey = *tape.Cell[2].S
48+
case ALIAS:
49+
b.IDKey = *tape.Cell[2].S
50+
b.Profile = *tape.Cell[3].S
4751
}
4852
return
4953
}

0 commit comments

Comments
 (0)