Skip to content

Commit 87817a4

Browse files
authored
Merge pull request #201 from pheuberger/safe-integration-profile
Safe integration for profile updates
2 parents c1c6e7c + 3f83f99 commit 87817a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2020
-212
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"@hypercerts-org/sdk": "2.3.0",
3232
"@ipld/car": "^5.2.5",
3333
"@openzeppelin/merkle-tree": "^1.0.5",
34+
"@safe-global/api-kit": "^2.5.4",
35+
"@safe-global/protocol-kit": "^5.0.4",
3436
"@sentry/integrations": "^7.114.0",
3537
"@sentry/node": "^8.2.1",
3638
"@sentry/profiling-node": "^8.2.1",

pnpm-lock.yaml

Lines changed: 236 additions & 91 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema.graphql

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,11 @@ type GetSalesResponse {
460460
data: [Sale!]
461461
}
462462

463+
type GetSignatureRequestResponse {
464+
count: Int
465+
data: [SignatureRequest!]
466+
}
467+
463468
type GetUsersResponse {
464469
count: Int
465470
data: [User!]
@@ -505,6 +510,9 @@ type HyperboardOwner {
505510
"""The display name of the user"""
506511
display_name: String
507512
percentage_owned: Float!
513+
514+
"""Pending signature requests for the user"""
515+
signature_requests: [SignatureRequest!]
508516
}
509517

510518
input HyperboardSortOptions {
@@ -832,6 +840,7 @@ type Query {
832840
metadata(first: Int, offset: Int, sort: MetadataFetchInput, where: MetadataWhereInput): GetMetadataResponse!
833841
orders(first: Int, offset: Int, sort: OrderFetchInput, where: OrderWhereInput): GetOrdersResponse!
834842
sales(first: Int, offset: Int, sort: SaleFetchInput, where: SaleWhereInput): GetSalesResponse!
843+
signatureRequests(first: Int, offset: Int, sort: SignatureRequestFetchInput, where: SignatureRequestWhereInput): GetSignatureRequestResponse!
835844
users(first: Int, offset: Int, where: UserWhereInput): GetUsersResponse!
836845
}
837846

@@ -941,6 +950,9 @@ type SectionEntryOwner {
941950
"""The display name of the user"""
942951
display_name: String
943952
percentage: Float!
953+
954+
"""Pending signature requests for the user"""
955+
signature_requests: [SignatureRequest!]
944956
units: BigInt
945957
}
946958

@@ -949,6 +961,70 @@ type SectionResponseType {
949961
data: [Section!]!
950962
}
951963

964+
"""Pending signature request for a user"""
965+
type SignatureRequest {
966+
"""The chain ID of the signature request"""
967+
chain_id: EthBigInt!
968+
969+
"""The message data in JSON format"""
970+
message: String!
971+
972+
"""The hash of the Safe message (not the message to be signed)"""
973+
message_hash: String!
974+
975+
"""The purpose of the signature request"""
976+
purpose: SignatureRequestPurpose!
977+
978+
"""The safe address of the user who needs to sign"""
979+
safe_address: String!
980+
981+
"""The status of the signature request"""
982+
status: SignatureRequestStatus!
983+
984+
"""Timestamp of when the signature request was created"""
985+
timestamp: EthBigInt!
986+
}
987+
988+
input SignatureRequestFetchInput {
989+
by: SignatureRequestSortOptions
990+
}
991+
992+
"""Purpose of the signature request"""
993+
enum SignatureRequestPurpose {
994+
UPDATE_USER_DATA
995+
}
996+
997+
input SignatureRequestPurposeSearchOptions {
998+
eq: SignatureRequestPurpose
999+
}
1000+
1001+
input SignatureRequestSortOptions {
1002+
message_hash: SortOrder
1003+
purpose: SortOrder
1004+
safe_address: SortOrder
1005+
timestamp: SortOrder
1006+
}
1007+
1008+
"""Status of the signature request"""
1009+
enum SignatureRequestStatus {
1010+
CANCELED
1011+
EXECUTED
1012+
PENDING
1013+
}
1014+
1015+
input SignatureRequestStatusSearchOptions {
1016+
eq: SignatureRequestStatus
1017+
}
1018+
1019+
input SignatureRequestWhereInput {
1020+
chain_id: BigIntSearchOptions
1021+
message_hash: StringSearchOptions
1022+
purpose: SignatureRequestPurposeSearchOptions
1023+
safe_address: StringSearchOptions
1024+
status: SignatureRequestStatusSearchOptions
1025+
timestamp: BigIntSearchOptions
1026+
}
1027+
9521028
"""The direction to sort the query results"""
9531029
enum SortOrder {
9541030
"""Ascending order"""
@@ -988,6 +1064,9 @@ type User {
9881064

9891065
"""The display name of the user"""
9901066
display_name: String
1067+
1068+
"""Pending signature requests for the user"""
1069+
signature_requests: [SignatureRequest!]
9911070
}
9921071

9931072
input UserWhereInput {

src/__generated__/routes/routes.ts

Lines changed: 91 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)