Skip to content

Commit 79d06cd

Browse files
committed
refactor: method order
1 parent 2e871c4 commit 79d06cd

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

ucan/receipt/receipt.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ type Receipt struct {
3131
meta *datamodel.Map
3232
}
3333

34-
// Ran is the CID of the executed task this receipt is for.
35-
func (rcpt *Receipt) Ran() cid.Cid {
36-
return rcpt.model.SigPayload.TokenPayload1_0_0_rc1.Args.Ran
37-
}
38-
39-
// Out is the attested result of the execution of the task.
40-
func (rcpt *Receipt) Out() result.Result[ipld.Any, ipld.Any] {
41-
return rcpt.out
42-
}
43-
4434
func (rcpt *Receipt) Audience() ucan.Principal {
4535
return rcpt.model.SigPayload.TokenPayload1_0_0_rc1.Aud
4636
}
@@ -61,7 +51,7 @@ func (rcpt *Receipt) Issuer() ucan.Principal {
6151
return rcpt.model.SigPayload.TokenPayload1_0_0_rc1.Iss
6252
}
6353

64-
func (rcpt *Receipt) Metadata() ipld.Map[string, any] {
54+
func (rcpt *Receipt) Metadata() ipld.Map[string, ipld.Any] {
6555
if rcpt.meta == nil {
6656
return nil
6757
}
@@ -77,10 +67,20 @@ func (rcpt *Receipt) Nonce() ucan.Nonce {
7767
return rcpt.model.SigPayload.TokenPayload1_0_0_rc1.Nonce
7868
}
7969

70+
// Out is the attested result of the execution of the task.
71+
func (rcpt *Receipt) Out() result.Result[ipld.Any, ipld.Any] {
72+
return rcpt.out
73+
}
74+
8075
func (rcpt *Receipt) Proofs() []cid.Cid {
8176
return rcpt.model.SigPayload.TokenPayload1_0_0_rc1.Prf
8277
}
8378

79+
// Ran is the CID of the executed task this receipt is for.
80+
func (rcpt *Receipt) Ran() cid.Cid {
81+
return rcpt.model.SigPayload.TokenPayload1_0_0_rc1.Args.Ran
82+
}
83+
8484
func (rcpt *Receipt) Signature() ucan.Signature {
8585
return rcpt.sig
8686
}

0 commit comments

Comments
 (0)