Skip to content

Commit

Permalink
feat(x/warden): add ability to assign Intent to Keys (#109)
Browse files Browse the repository at this point in the history
* feat(x/warden): add IntentID to Keys

* chore(spaceward): regen hooks

* fixup! feat(x/warden): add IntentID to Keys

* fixup! chore(spaceward): regen hooks

* feat(x/warden): use IntentID specified in Key if present
  • Loading branch information
Pitasi committed Mar 21, 2024
1 parent 6ce5a0b commit cc03e6f
Show file tree
Hide file tree
Showing 79 changed files with 17,330 additions and 16,799 deletions.
206 changes: 163 additions & 43 deletions api/warden/warden/v1beta2/key.pulsar.go

Large diffs are not rendered by default.

420 changes: 239 additions & 181 deletions api/warden/warden/v1beta2/tx.pulsar.go

Large diffs are not rendered by default.

10,246 changes: 5,187 additions & 5,059 deletions docs/static/openapi.yml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions proto/warden/warden/v1beta2/key.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ message KeyRequest {
KeyType key_type = 5;
KeyRequestStatus status = 6;
string reject_reason = 7;
// IntentId is the ID of the intent that the resulting Key will use.
uint64 intent_id = 8;
}

// KeyType indicates what crypto scheme will be used by this key (e.g.
Expand All @@ -50,4 +52,8 @@ message Key {
uint64 keychain_id = 3;
KeyType type = 4;
bytes public_key = 5;
// IntentId is the ID of the intent that will need to be satisfied for using
// this key to sign data.
// If this is not set, the key will use the signing intent of the Space.
uint64 intent_id = 8;
}
1 change: 1 addition & 0 deletions proto/warden/warden/v1beta2/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ message MsgNewKeyRequest {
uint64 keychain_id = 3;
KeyType key_type = 4;
uint64 btl = 5;
uint64 intent_id = 6;
}

message MsgNewKeyRequestResponse { uint64 id = 1; }
Expand Down
2 changes: 1 addition & 1 deletion spaceward/src/hooks/useWardenWardenV1Beta1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useQuery, type UseQueryOptions, useInfiniteQuery, type UseInfiniteQueryOptions } from "@tanstack/react-query";
import { useClient } from '../useClient';

export default function useWardenWardenV1Beta2V1Beta1() {
export default function useWardenWardenV1Beta1() {
const client = useClient();
const QueryParams = ( options: any) => {
const key = { type: 'QueryParams', };
Expand Down
2 changes: 1 addition & 1 deletion spaceward/src/hooks/useWardenWardenV1Beta2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useQuery, type UseQueryOptions, useInfiniteQuery, type UseInfiniteQueryOptions } from "@tanstack/react-query";
import { useClient } from '../useClient';

export default function useWardenWardenV1Beta2V1Beta2() {
export default function useWardenWardenV1Beta2() {
const client = useClient();
const QueryParams = ( options: any) => {
const key = { type: 'QueryParams', };
Expand Down

0 comments on commit cc03e6f

Please sign in to comment.