Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/solana/token-gated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This example shows how to build a token-gated content system where:

The encryption uses ACE threshold cryptography—the decryption key is only released when a buyer proves they have purchased access via a signed Solana transaction.

> **Note:** ACE is a temporary access control solution for this example. Once a more production-ready access control system is available, this example will be updated accordingly.

## Quick Start

```bash
Expand Down
109 changes: 14 additions & 95 deletions apps/solana/token-gated/anchor/target/idl/access_control.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,7 @@
"Purchase access to a blob by paying the owner.",
"Creates a receipt PDA that proves the buyer has paid."
],
"discriminator": [
21,
93,
113,
154,
193,
160,
242,
168
],
"discriminator": [21, 93, 113, 154, 193, 160, 242, 168],
"accounts": [
{
"name": "blob_metadata",
Expand All @@ -31,19 +22,7 @@
{
"kind": "const",
"value": [
98,
108,
111,
98,
95,
109,
101,
116,
97,
100,
97,
116,
97
98, 108, 111, 98, 95, 109, 101, 116, 97, 100, 97, 116, 97
]
},
{
Expand All @@ -64,14 +43,7 @@
"seeds": [
{
"kind": "const",
"value": [
97,
99,
99,
101,
115,
115
]
"value": [97, 99, 99, 101, 115, 115]
},
{
"kind": "arg",
Expand Down Expand Up @@ -106,10 +78,7 @@
{
"name": "storage_account_address",
"type": {
"array": [
"u8",
32
]
"array": ["u8", 32]
}
},
{
Expand All @@ -124,16 +93,7 @@
"Register a new encrypted blob with its greenBox and price.",
"Called by the file owner after uploading encrypted content to Shelby."
],
"discriminator": [
121,
87,
124,
41,
94,
254,
44,
87
],
"discriminator": [121, 87, 124, 41, 94, 254, 44, 87],
"accounts": [
{
"name": "blob_metadata",
Expand All @@ -143,19 +103,7 @@
{
"kind": "const",
"value": [
98,
108,
111,
98,
95,
109,
101,
116,
97,
100,
97,
116,
97
98, 108, 111, 98, 95, 109, 101, 116, 97, 100, 97, 116, 97
]
},
{
Expand Down Expand Up @@ -183,10 +131,7 @@
{
"name": "storage_account_address",
"type": {
"array": [
"u8",
32
]
"array": ["u8", 32]
}
},
{
Expand All @@ -211,29 +156,11 @@
"accounts": [
{
"name": "BlobMetadata",
"discriminator": [
93,
126,
241,
85,
221,
131,
119,
253
]
"discriminator": [93, 126, 241, 85, 221, 131, 119, 253]
},
{
"name": "Receipt",
"discriminator": [
39,
154,
73,
106,
80,
102,
145,
153
]
"discriminator": [39, 154, 73, 106, 80, 102, 145, 153]
}
],
"errors": [
Expand All @@ -255,9 +182,7 @@
"fields": [
{
"name": "owner",
"docs": [
"The Solana owner who registered this blob"
],
"docs": ["The Solana owner who registered this blob"],
"type": "pubkey"
},
{
Expand All @@ -276,26 +201,20 @@
},
{
"name": "seqnum",
"docs": [
"Sequence number for tracking updates"
],
"docs": ["Sequence number for tracking updates"],
"type": "u64"
},
{
"name": "price",
"docs": [
"Price in lamports to purchase access"
],
"docs": ["Price in lamports to purchase access"],
"type": "u64"
}
]
}
},
{
"name": "Receipt",
"docs": [
"Receipt proving a buyer has purchased access to a blob."
],
"docs": ["Receipt proving a buyer has purchased access to a blob."],
"type": {
"kind": "struct",
"fields": [
Expand All @@ -310,4 +229,4 @@
}
}
]
}
}
13 changes: 2 additions & 11 deletions apps/solana/token-gated/anchor/target/idl/ace_hook.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,7 @@
"This function is called by consumers who sign a transaction proving their access.",
"The signed transaction can then be presented to decryption key providers as proof of permission."
],
"discriminator": [
236,
161,
40,
115,
1,
219,
223,
121
],
"discriminator": [236, 161, 40, 115, 1, 219, 223, 121],
"accounts": [
{
"name": "blob_metadata"
Expand Down Expand Up @@ -61,4 +52,4 @@
"msg": "Invalid account owner"
}
]
}
}
Loading