2024-10-07 20:13:38 -04:00
|
|
|
package state
|
|
|
|
|
|
|
|
|
|
templ InsertAccount(accountName string) {
|
|
|
|
|
<script>
|
|
|
|
|
const accountId = await motr.insertAccount({
|
|
|
|
|
name: accountName,
|
|
|
|
|
address: "0x1234567890123456789012345678901234567890",
|
|
|
|
|
publicKey: "sample_public_key",
|
|
|
|
|
chainCode: "SONR",
|
|
|
|
|
index: 0,
|
|
|
|
|
controller: "sample_controller",
|
|
|
|
|
createdAt: new Date(),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
console.log("Inserted account with ID:", accountId);
|
|
|
|
|
</script>
|
|
|
|
|
}
|
2024-10-15 14:31:19 -04:00
|
|
|
|
|
|
|
|
templ InsertCredential(credentialName string) {
|
|
|
|
|
<script>
|
|
|
|
|
const credentialId = await motr.insertCredential({
|
|
|
|
|
name: credentialName,
|
|
|
|
|
createdAt: new Date(),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
console.log("Inserted credential with ID:", credentialId);
|
|
|
|
|
</script>
|
|
|
|
|
}
|