11 design patterns of the logic required for social implementation. #10
xembook
started this conversation in
Framework Ideas
Replies: 9 comments
Description of pseudocodetransactionAlice.TransactionType{
[option]
}->Bobmultisig transactionAssetAccount<-(2-of-3){CosignerAccount1,CosignerAccount2,...}
.TransactionType{}
->RecipientAccountsign by cosignaturelistener.aggregateBondedAdded(Bob)
.subscribe(tx => Bob.signCosignature(tx));transaction search by hashTransactionRepo.search({id:hash})
.subscribe(tx=> Alice.publicKey.verify(tx.hash)) |
0 replies
sample expressionTransfer TransactionAlice.Transfer{
Message:"Hello",
Mosaic:{xym:10}
}-> BobMetadata TransactionAlice.AccountMetadata{
Endpoint:http://...,
PublicKey:asdfada
}->AliceAccounInfo SearchAccountRepo.search({publicKey:Alice})
.subscribe(accountInfo=> getPublicKey(publicKey))Metadata SearchMetadataRepo.search({
sourceAddress:Alice,
targetAddress:Alice,
scopedMetadataKey:canceled
})
.subscribe(meta=> getCancelInfo(meta.value)) |
0 replies
1.Notarization and ApostilleIssuer.Transfer{
Message:hash(Artwork.file)
} -> Holder
//Verifier
TransactionRepo.search({id:hash(Artwork)})
.subscribe(tx => Holder.publicKey.verify(tx.hash)) |
0 replies
2.TraceabilityAlice.Transfer{
Message:hash(work1.file),
} -> Alice
Bob.Transfer{
Message:hash(work2.file),
} -> Alice
Carol.Transfer{
Message:hash(work3.file),
} -> Alice |
0 replies
3.Ownership/Sharing//create multisig
Alice.MultisigAccountModification{
Add:[Bob,Security]
}
//optin
listener.aggregateBondedAdded(Bob)
.subscribe(tx => Bob.signCosignature(tx));
listener.aggregateBondedAdded(Security)
.subscribe(tx => Security.signCosignature(tx));Alice is owned/shared by Bob and Security Account |
0 replies
4. transfer/restorationAlice<-(2-of-3){Bob,Security,...}
.MultisigAccountModification{
Delete:[Bob],
Add:[Carol]
}
//optin
listener.aggregateBondedAdded(Bob)
.subscribe(tx => Bob.signCosignature(tx));
listener.aggregateBondedAdded(Carol)
.subscribe(tx => Carol.signCosignature(tx)); |
0 replies
5.CancellationAlice.AccountMetadata{
canceled:True
}->Alice
//verifier
MetadataRepo.search({
sourceAddress:Alice,
targetAddress:Alice,
scopedMetadataKey:canceled
})
.subscribe(meta=> getCancelInfo(meta.value)) |
0 replies
6.Expiration dateIssuer.AccountMetadata{
StartBlock:234566
}-> Alice
//Extend expired period
listener.aggregateBondedAdded(Alice)
.subscribe(tx => Alice.signCosignature(tx));
//update expired period
Issuer.Transfer{
Mosaic:{expired:1}
}-> Alice
//verifier get start block
MetadataRepo.search({
sourceAddress:Ivan,
targetAddress:Alice,
scopedMetadataKey:StartBlock
})
.subscribe(meta=> getStartBlock(meta.value))
//verifier get expired period
TransactionRepo.search({transferMosaicId:expired})
.subscribe(tx=> getAmount(tx.mosaics) + startBlock) |
0 replies
7.Name resolution/* regster */
Alice.NamespaceRegistration{
name:alice_name
}
Alice.AccountMetadata{
Endpoint:http://aaa.com
}-> Alice
/* resolve */
//verifier
NamespaceRepo.getNamespace(alice_name)
.subscribe(
(ns) => getOwnerAddress(ns)
);
MetadataRepo.search({
sourceAddress:OwnerAddress,
targetAddress:OwnerAddress,
scopedMetadataKey:"Endpoint"
})
.subscribe(meta=> getEndpoint(meta.value)) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Last year, I put together 11 design patterns of the logic required for social implementation.
https://qiita.com/nem_takanobu/items/cc2aa777ad1fa78d9ede
They are still in Japanese, and I don't know how to express them if I replace them with English.
I hope we can discuss the deletion of what is unnecessary and the addition of what seems even more necessary.
1.Notarization and Apostille
2.Traceability
3.Ownership/Sharing
4. transfer/restoration
5.Cancellation
6.Expiration date
7.Name resolution
8.Timer remittance
9. Authentication
10.Distribution
11.Definitive proof of existence
All reactions