-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdb6d17
commit 3e8bf09
Showing
18 changed files
with
319 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package common | ||
|
||
import ( | ||
"github.com/ten-protocol/go-ten/go/common/viewingkey" | ||
|
||
"github.com/ethereum/go-ethereum/common" | ||
) | ||
|
||
type GWAccount struct { | ||
User *GWUser | ||
Address *common.Address | ||
Signature []byte | ||
SignatureType viewingkey.SignatureType | ||
} | ||
|
||
type GWUser struct { | ||
UserID []byte | ||
Accounts map[common.Address]*GWAccount | ||
UserKey []byte | ||
} | ||
|
||
func (u GWUser) GetAllAddresses() []*common.Address { | ||
accts := make([]*common.Address, 0) | ||
for _, acc := range u.Accounts { | ||
accts = append(accts, acc.Address) | ||
} | ||
return accts | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.