-
Notifications
You must be signed in to change notification settings - Fork 23
feat: add keyName #89
Changes from 1 commit
1d6b911
483f494
fe2e2ee
de917c7
3f7312e
f22f875
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ type DA interface { | |
| // | ||
| // This method is synchronous. Upon successful submission to Data Availability layer, it returns the IDs identifying blobs | ||
| // in DA. | ||
| Submit(ctx context.Context, blobs []Blob, gasPrice float64, namespace Namespace) ([]ID, error) | ||
| Submit(ctx context.Context, blobs []Blob, gasPrice float64, namespace Namespace, keyringkeyname *Keyringkeyname) ([]ID, error) | ||
jcstein marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // Validate validates Commitments against the corresponding Proofs. This should be possible without retrieving the Blobs. | ||
| Validate(ctx context.Context, ids []ID, proofs []Proof, namespace Namespace) ([]bool, error) | ||
|
|
@@ -36,6 +36,10 @@ type DA interface { | |
| // posted to, for DA layers supporting the functionality. | ||
| type Namespace = []byte | ||
|
|
||
| // Keyringkeyname is an optional parameter used to set the keyring keyname for | ||
jcstein marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| // the DA service. | ||
| type Keyringkeyname = []byte | ||
|
||
|
|
||
| // Blob is the data submitted/received from DA interface. | ||
| type Blob = []byte | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,7 +69,12 @@ func (p *proxySrv) GetProofs(ctx context.Context, request *pbda.GetProofsRequest | |
| func (p *proxySrv) Submit(ctx context.Context, request *pbda.SubmitRequest) (*pbda.SubmitResponse, error) { | ||
| blobs := blobsPB2DA(request.Blobs) | ||
|
|
||
| ids, err := p.target.Submit(ctx, blobs, request.GasPrice, request.Namespace.GetValue()) | ||
| var keyringkeyname *da.Keyringkeyname | ||
jcstein marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if request.Keyringkeyname != nil { | ||
jcstein marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| keyringkeyname = (*da.Keyringkeyname)(&request.Keyringkeyname.Value) | ||
jcstein marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
|
||
| ids, err := p.target.Submit(ctx, blobs, request.GasPrice, request.Namespace.GetValue(), keyringkeyname) | ||
jcstein marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.