Add Web Monetization properties
This commit is contained in:
@@ -13,6 +13,9 @@ type Person struct {
|
||||
Summary string `json:"summary"`
|
||||
PublicKey PublicKey `json:"publicKey"`
|
||||
Endpoints Endpoints `json:"endpoints"`
|
||||
|
||||
// Extensions
|
||||
Monetization string `json:"monetization,omitempty"`
|
||||
}
|
||||
|
||||
func NewPerson(accountRoot string) *Person {
|
||||
@@ -49,3 +52,8 @@ func (p *Person) SetPrivKey(k []byte) {
|
||||
func (p *Person) GetPrivKey() []byte {
|
||||
return p.PublicKey.privateKey
|
||||
}
|
||||
|
||||
func (p *Person) AddWebMonetization(wallet string) {
|
||||
p.Context = append(p.Context, apMonetizationContext)
|
||||
p.Monetization = wallet
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user