You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
having HashMap<Text,Text> as a field on Entity gives error: is or contains non-shared type Text -> ()
13
+
function on Entity to retrieve entityType specific fields (or a static field)
14
+
work with JSON: https://github.com/Toniq-Labs/creator-nfts/blob/main/canisters/nft/main.mo
15
+
UI sends in JSON encoded as Blob: https://github.com/Toniq-Labs/creator-nfts/blob/main/frontend/src/canisters/nft/minting.ts
16
+
potentially String / Text also works (i.e. no en-/decoding) --> work with Text for now, probably change to Blob later (after finding out about its potential benefits)
A decentralized protocol to store and manage a form of hyperlinks between all different kinds of nodes.
4
3
5
4
This protocol, which enables everyone to create and retrieve connections, build applications on top of it and together establish a wide-spanning network of connections between different kinds of nodes, will serve as a fundamental building block of proof-of-concept applications building on top (e.g. Personal NFT Gallery).
@@ -20,9 +19,29 @@ dfx start --background
20
19
dfx deploy
21
20
```
22
21
23
-
Once the job completes, your application will be available at `http://localhost:8000?canisterId={asset_canister_id}`.
22
+
## Different Stages
23
+
Local:
24
+
dfx deploy
25
+
26
+
Development:
27
+
dfx deploy --network development
24
28
25
-
Additionally, if you are making frontend changes, you can start a development server with
29
+
Testing:
30
+
dfx deploy --network testing
31
+
32
+
Production:
33
+
dfx deploy --network ic
34
+
35
+
## Testing Backend Changes
36
+
The majority of the changes are tested via the candid backend. To access the Candid backend, after you run
37
+
```bash
38
+
dfx deploy
39
+
```
40
+
as shown above. It will provide the URL to the canister backend Candid UI. You can test the API calls through that interface
41
+
42
+
## Testing Frontend Changes
43
+
44
+
If you are making frontend changes, you can start a development server with
26
45
27
46
```bash
28
47
npm start
@@ -31,79 +50,3 @@ npm start
31
50
Which will start a server at `http://localhost:8080`, proxying API requests to the replica at port 8000.
32
51
33
52
Note: while the protocol doesn't need or have a UI, the asset's canister here serves as a simple way of testing the protocol by simulating how an application might create Entities and connect them via Bridges.
having HashMap<Text,Text> as a field on Entity gives error: is or contains non-shared type Text -> ()
81
-
function on Entity to retrieve entityType specific fields (or a static field)
82
-
work with JSON: https://github.com/Toniq-Labs/creator-nfts/blob/main/canisters/nft/main.mo
83
-
UI sends in JSON encoded as Blob: https://github.com/Toniq-Labs/creator-nfts/blob/main/frontend/src/canisters/nft/minting.ts
84
-
potentially String / Text also works (i.e. no en-/decoding) --> work with Text for now, probably change to Blob later (after finding out about its potential benefits)
85
-
86
-
Generate ID:
87
-
Motoko library with example: https://github.com/aviate-labs/uuid.mo/tree/main/example
88
-
import with vessel package manager: https://github.com/dfinity/vessel
89
-
use synchronous:
90
-
private let rr = XorShift.toReader(XorShift.XorShift64(null));
91
-
private let c : [Nat8] = [0, 0, 0, 0, 0, 0]; // Replace with identifier of canister f.e.
92
-
private let se = Source.Source(rr, c);
93
-
let id = se.new();
94
-
UUID.toText(id);
95
-
to get identifier of canister: get canister principal (let canisterId = Principal.fromActor(Invoice);), Principal.toBlob(p), Blob to [Nat8] (https://forum.dfinity.org/t/type-mismatch-in-ledger-canister-and-invoice-canister/13300/4)
96
-
97
-
## TODOs
98
-
TODO: bug in create_entity_and_bridge: Entity's and Bridge's internalIds are the same
99
-
TODO: bug in create functions: canister's id is taken as owner and creator
100
-
TODO: update and delete functions
101
-
TODO: Replace with identifier of canister f.e.
102
-
TODO: should bridge id be assignable? probably: always assign random id
103
-
TODO: fill as stringified object with fields as listed in listOfEntitySpecificFieldKeys
104
-
TODO: state has to be correctly assigned (e.g. Confirmed if created by Entity owner)
105
-
TODO: define bridge categories
106
-
TODO: determine which category's list/categories' lists in entry to return [multiple]
107
-
TODO: potentially update entityToCreate fields (might vary depending on EntityType)
108
-
TODO: potentially assign final internal_id to Entity (might vary depending on EntityType)
109
-
TODO: possible to return promise? Would this speed up this canister? e.g. try ... : async (async Entity.Entity) [multiple, all files]
0 commit comments