mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 18:01:39 +00:00
feature/ipfs vault allocation (#8)
* refactor: move constants to genesis.proto * feat: add ipfs_active flag to genesis state * feat: add IPFS connection initialization to keeper * feat: add testnet process-compose * refactor: rename sonr-testnet docker image to sonr-runner * refactor: update docker-vm-release workflow to use 'latest' tag * feat: add permission to workflows * feat: add new service chain execution * feat: add abstract vault class to pkl * feat: use jetpackio/devbox image for runner * feat: introduce dwn for local service worker * refactor: remove unnecessary dockerfile layers * refactor(deploy): Update Dockerfile to copy go.mod and go.sum from the parent directory * build: move Dockerfile to root directory * build: Add Dockerfile for deployment * feat: Update Dockerfile to work with Go project in parent directory * build: Update docker-compose.yaml to use relative paths * feat: Update docker-compose to work with new image and parent git directory * refactor: remove unnecessary test script * <no value> * feat: add test_node script for running node tests * feat: add IPFS cluster to testnet * feat: add docker image for sonr-runner * fix: typo in export path * feat(did): Add Localhost Registration Enabled Genesis Option * feat: add support for Sqlite DB in vault * feat: improve vault model JSON serialization * feat: support querying HTMX endpoint for DID * feat: Add primary key, unique, default, not null, auto increment, and foreign key field types * feat: Add PublicKey model in pkl/vault.pkl * feat: add frontend server * refactor: move dwn.wasm to vfs directory * feat(frontend): remove frontend server implementation * feat: Add a frontend server and web auth protocol * feat: implement new key types for MPC and ZK proofs * fix: Update enum types and DefaultKeyInfos * fix: correct typo in KeyAlgorithm enum * feat(did): add attestation format validation * feat: Add x/did/builder/extractor.go * feat: Update JWK parsing in x/did/builder/extractor.go * feat: Use github.com/onsonr/sonr/x/did/types package * feat: Extract and format public keys from WebAuthn credentials * feat: Introduce a new `mapToJWK` function to convert a map to a `types.JWK` struct * feat: add support for extracting JWK public keys * feat: remove VerificationMethod struct * refactor: extract public key extraction logic * feat: add helper functions to map COSECurveID to JWK curve names * feat: pin initial vault
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type Account interface {
|
||||
Model
|
||||
|
||||
GetId() uint
|
||||
|
||||
GetName() string
|
||||
|
||||
GetAddress() string
|
||||
|
||||
GetPublicKey() *pkl.Object
|
||||
|
||||
GetCreatedAt() *string
|
||||
}
|
||||
|
||||
var _ Account = (*AccountImpl)(nil)
|
||||
|
||||
type AccountImpl struct {
|
||||
Table string `pkl:"table"`
|
||||
|
||||
Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"`
|
||||
|
||||
Name string `pkl:"name" json:"name,omitempty"`
|
||||
|
||||
Address string `pkl:"address" json:"address,omitempty"`
|
||||
|
||||
PublicKey *pkl.Object `pkl:"publicKey" json:"publicKey,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
}
|
||||
|
||||
func (rcv *AccountImpl) GetTable() string {
|
||||
return rcv.Table
|
||||
}
|
||||
|
||||
func (rcv *AccountImpl) GetId() uint {
|
||||
return rcv.Id
|
||||
}
|
||||
|
||||
func (rcv *AccountImpl) GetName() string {
|
||||
return rcv.Name
|
||||
}
|
||||
|
||||
func (rcv *AccountImpl) GetAddress() string {
|
||||
return rcv.Address
|
||||
}
|
||||
|
||||
func (rcv *AccountImpl) GetPublicKey() *pkl.Object {
|
||||
return rcv.PublicKey
|
||||
}
|
||||
|
||||
func (rcv *AccountImpl) GetCreatedAt() *string {
|
||||
return rcv.CreatedAt
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type Asset interface {
|
||||
Model
|
||||
|
||||
GetId() uint
|
||||
|
||||
GetName() string
|
||||
|
||||
GetSymbol() string
|
||||
|
||||
GetDecimals() int
|
||||
|
||||
GetChainId() *int
|
||||
|
||||
GetCreatedAt() *string
|
||||
}
|
||||
|
||||
var _ Asset = (*AssetImpl)(nil)
|
||||
|
||||
type AssetImpl struct {
|
||||
Table string `pkl:"table"`
|
||||
|
||||
Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"`
|
||||
|
||||
Name string `pkl:"name" json:"name,omitempty"`
|
||||
|
||||
Symbol string `pkl:"symbol" json:"symbol,omitempty"`
|
||||
|
||||
Decimals int `pkl:"decimals" json:"decimals,omitempty"`
|
||||
|
||||
ChainId *int `pkl:"chainId" json:"chainId,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
}
|
||||
|
||||
func (rcv *AssetImpl) GetTable() string {
|
||||
return rcv.Table
|
||||
}
|
||||
|
||||
func (rcv *AssetImpl) GetId() uint {
|
||||
return rcv.Id
|
||||
}
|
||||
|
||||
func (rcv *AssetImpl) GetName() string {
|
||||
return rcv.Name
|
||||
}
|
||||
|
||||
func (rcv *AssetImpl) GetSymbol() string {
|
||||
return rcv.Symbol
|
||||
}
|
||||
|
||||
func (rcv *AssetImpl) GetDecimals() int {
|
||||
return rcv.Decimals
|
||||
}
|
||||
|
||||
func (rcv *AssetImpl) GetChainId() *int {
|
||||
return rcv.ChainId
|
||||
}
|
||||
|
||||
func (rcv *AssetImpl) GetCreatedAt() *string {
|
||||
return rcv.CreatedAt
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type Chain interface {
|
||||
Model
|
||||
|
||||
GetId() uint
|
||||
|
||||
GetName() string
|
||||
|
||||
GetNetworkId() string
|
||||
|
||||
GetCreatedAt() *string
|
||||
}
|
||||
|
||||
var _ Chain = (*ChainImpl)(nil)
|
||||
|
||||
type ChainImpl struct {
|
||||
Table string `pkl:"table"`
|
||||
|
||||
Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"`
|
||||
|
||||
Name string `pkl:"name" json:"name,omitempty"`
|
||||
|
||||
NetworkId string `pkl:"networkId" json:"networkId,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
}
|
||||
|
||||
func (rcv *ChainImpl) GetTable() string {
|
||||
return rcv.Table
|
||||
}
|
||||
|
||||
func (rcv *ChainImpl) GetId() uint {
|
||||
return rcv.Id
|
||||
}
|
||||
|
||||
func (rcv *ChainImpl) GetName() string {
|
||||
return rcv.Name
|
||||
}
|
||||
|
||||
func (rcv *ChainImpl) GetNetworkId() string {
|
||||
return rcv.NetworkId
|
||||
}
|
||||
|
||||
func (rcv *ChainImpl) GetCreatedAt() *string {
|
||||
return rcv.CreatedAt
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type Client interface {
|
||||
GetChainId() string
|
||||
|
||||
GetKeyringBackend() string
|
||||
|
||||
GetOutput() string
|
||||
|
||||
GetNode() string
|
||||
|
||||
GetBroadcastMode() string
|
||||
|
||||
GetApiUrl() string
|
||||
|
||||
GetAddressPrefix() string
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type Credential interface {
|
||||
Model
|
||||
|
||||
GetId() uint
|
||||
|
||||
GetSubject() string
|
||||
|
||||
GetController() string
|
||||
|
||||
GetAttestationType() string
|
||||
|
||||
GetOrigin() string
|
||||
|
||||
GetCredentialId() *pkl.Object
|
||||
|
||||
GetPublicKey() *pkl.Object
|
||||
|
||||
GetTransport() string
|
||||
|
||||
GetSignCount() uint
|
||||
|
||||
GetUserPresent() bool
|
||||
|
||||
GetUserVerified() bool
|
||||
|
||||
GetBackupEligible() bool
|
||||
|
||||
GetBackupState() bool
|
||||
|
||||
GetCloneWarning() bool
|
||||
|
||||
GetCreatedAt() *string
|
||||
|
||||
GetUpdatedAt() *string
|
||||
}
|
||||
|
||||
var _ Credential = (*CredentialImpl)(nil)
|
||||
|
||||
type CredentialImpl struct {
|
||||
Table string `pkl:"table"`
|
||||
|
||||
Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"`
|
||||
|
||||
Subject string `pkl:"subject" json:"subject,omitempty"`
|
||||
|
||||
Controller string `pkl:"controller" json:"controller,omitempty"`
|
||||
|
||||
AttestationType string `pkl:"attestationType" json:"attestationType,omitempty"`
|
||||
|
||||
Origin string `pkl:"origin" json:"origin,omitempty"`
|
||||
|
||||
CredentialId *pkl.Object `pkl:"credentialId" json:"credentialId,omitempty"`
|
||||
|
||||
PublicKey *pkl.Object `pkl:"publicKey" json:"publicKey,omitempty"`
|
||||
|
||||
Transport string `pkl:"transport" json:"transport,omitempty"`
|
||||
|
||||
SignCount uint `pkl:"signCount" json:"signCount,omitempty"`
|
||||
|
||||
UserPresent bool `pkl:"userPresent" json:"userPresent,omitempty"`
|
||||
|
||||
UserVerified bool `pkl:"userVerified" json:"userVerified,omitempty"`
|
||||
|
||||
BackupEligible bool `pkl:"backupEligible" json:"backupEligible,omitempty"`
|
||||
|
||||
BackupState bool `pkl:"backupState" json:"backupState,omitempty"`
|
||||
|
||||
CloneWarning bool `pkl:"cloneWarning" json:"cloneWarning,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
|
||||
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetTable() string {
|
||||
return rcv.Table
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetId() uint {
|
||||
return rcv.Id
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetSubject() string {
|
||||
return rcv.Subject
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetController() string {
|
||||
return rcv.Controller
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetAttestationType() string {
|
||||
return rcv.AttestationType
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetOrigin() string {
|
||||
return rcv.Origin
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetCredentialId() *pkl.Object {
|
||||
return rcv.CredentialId
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetPublicKey() *pkl.Object {
|
||||
return rcv.PublicKey
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetTransport() string {
|
||||
return rcv.Transport
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetSignCount() uint {
|
||||
return rcv.SignCount
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetUserPresent() bool {
|
||||
return rcv.UserPresent
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetUserVerified() bool {
|
||||
return rcv.UserVerified
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetBackupEligible() bool {
|
||||
return rcv.BackupEligible
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetBackupState() bool {
|
||||
return rcv.BackupState
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetCloneWarning() bool {
|
||||
return rcv.CloneWarning
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetCreatedAt() *string {
|
||||
return rcv.CreatedAt
|
||||
}
|
||||
|
||||
func (rcv *CredentialImpl) GetUpdatedAt() *string {
|
||||
return rcv.UpdatedAt
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type DB interface {
|
||||
GetFilename() string
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type Ipfs struct {
|
||||
ResolverUrl string `pkl:"resolverUrl"`
|
||||
|
||||
IpfsMountPath string `pkl:"ipfsMountPath"`
|
||||
|
||||
IpnsMountPath string `pkl:"ipnsMountPath"`
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type Keyshare interface {
|
||||
Model
|
||||
|
||||
GetId() uint
|
||||
|
||||
GetMetadata() string
|
||||
|
||||
GetPayloads() string
|
||||
|
||||
GetProtocol() string
|
||||
|
||||
GetPublicKey() *pkl.Object
|
||||
|
||||
GetRole() int
|
||||
|
||||
GetVersion() int
|
||||
|
||||
GetCreatedAt() *string
|
||||
}
|
||||
|
||||
var _ Keyshare = (*KeyshareImpl)(nil)
|
||||
|
||||
type KeyshareImpl struct {
|
||||
Table string `pkl:"table"`
|
||||
|
||||
Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"`
|
||||
|
||||
Metadata string `pkl:"metadata" json:"metadata,omitempty"`
|
||||
|
||||
Payloads string `pkl:"payloads" json:"payloads,omitempty"`
|
||||
|
||||
Protocol string `pkl:"protocol" json:"protocol,omitempty"`
|
||||
|
||||
PublicKey *pkl.Object `pkl:"publicKey" json:"publicKey,omitempty"`
|
||||
|
||||
Role int `pkl:"role" json:"role,omitempty"`
|
||||
|
||||
Version int `pkl:"version" json:"version,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
}
|
||||
|
||||
func (rcv *KeyshareImpl) GetTable() string {
|
||||
return rcv.Table
|
||||
}
|
||||
|
||||
func (rcv *KeyshareImpl) GetId() uint {
|
||||
return rcv.Id
|
||||
}
|
||||
|
||||
func (rcv *KeyshareImpl) GetMetadata() string {
|
||||
return rcv.Metadata
|
||||
}
|
||||
|
||||
func (rcv *KeyshareImpl) GetPayloads() string {
|
||||
return rcv.Payloads
|
||||
}
|
||||
|
||||
func (rcv *KeyshareImpl) GetProtocol() string {
|
||||
return rcv.Protocol
|
||||
}
|
||||
|
||||
func (rcv *KeyshareImpl) GetPublicKey() *pkl.Object {
|
||||
return rcv.PublicKey
|
||||
}
|
||||
|
||||
func (rcv *KeyshareImpl) GetRole() int {
|
||||
return rcv.Role
|
||||
}
|
||||
|
||||
func (rcv *KeyshareImpl) GetVersion() int {
|
||||
return rcv.Version
|
||||
}
|
||||
|
||||
func (rcv *KeyshareImpl) GetCreatedAt() *string {
|
||||
return rcv.CreatedAt
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type Model interface {
|
||||
GetTable() string
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type Permission interface {
|
||||
Model
|
||||
|
||||
GetId() uint
|
||||
|
||||
GetServiceId() string
|
||||
|
||||
GetGrants() string
|
||||
|
||||
GetScopes() string
|
||||
|
||||
GetCreatedAt() *string
|
||||
|
||||
GetUpdatedAt() *string
|
||||
}
|
||||
|
||||
var _ Permission = (*PermissionImpl)(nil)
|
||||
|
||||
type PermissionImpl struct {
|
||||
Table string `pkl:"table"`
|
||||
|
||||
Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"`
|
||||
|
||||
ServiceId string `pkl:"serviceId" json:"serviceId,omitempty"`
|
||||
|
||||
Grants string `pkl:"grants" json:"grants,omitempty"`
|
||||
|
||||
Scopes string `pkl:"scopes" json:"scopes,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
|
||||
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
func (rcv *PermissionImpl) GetTable() string {
|
||||
return rcv.Table
|
||||
}
|
||||
|
||||
func (rcv *PermissionImpl) GetId() uint {
|
||||
return rcv.Id
|
||||
}
|
||||
|
||||
func (rcv *PermissionImpl) GetServiceId() string {
|
||||
return rcv.ServiceId
|
||||
}
|
||||
|
||||
func (rcv *PermissionImpl) GetGrants() string {
|
||||
return rcv.Grants
|
||||
}
|
||||
|
||||
func (rcv *PermissionImpl) GetScopes() string {
|
||||
return rcv.Scopes
|
||||
}
|
||||
|
||||
func (rcv *PermissionImpl) GetCreatedAt() *string {
|
||||
return rcv.CreatedAt
|
||||
}
|
||||
|
||||
func (rcv *PermissionImpl) GetUpdatedAt() *string {
|
||||
return rcv.UpdatedAt
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type Profile interface {
|
||||
Model
|
||||
|
||||
GetId() string
|
||||
|
||||
GetSubject() string
|
||||
|
||||
GetController() string
|
||||
|
||||
GetOriginUri() *string
|
||||
|
||||
GetPublicMetadata() *string
|
||||
|
||||
GetPrivateMetadata() *string
|
||||
|
||||
GetCreatedAt() *string
|
||||
|
||||
GetUpdatedAt() *string
|
||||
}
|
||||
|
||||
var _ Profile = (*ProfileImpl)(nil)
|
||||
|
||||
type ProfileImpl struct {
|
||||
Table string `pkl:"table"`
|
||||
|
||||
Id string `pkl:"id" gorm:"primaryKey" json:"id,omitempty"`
|
||||
|
||||
Subject string `pkl:"subject" json:"subject,omitempty"`
|
||||
|
||||
Controller string `pkl:"controller" json:"controller,omitempty"`
|
||||
|
||||
OriginUri *string `pkl:"originUri" json:"originUri,omitempty"`
|
||||
|
||||
PublicMetadata *string `pkl:"publicMetadata" json:"publicMetadata,omitempty"`
|
||||
|
||||
PrivateMetadata *string `pkl:"privateMetadata" json:"privateMetadata,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
|
||||
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
func (rcv *ProfileImpl) GetTable() string {
|
||||
return rcv.Table
|
||||
}
|
||||
|
||||
func (rcv *ProfileImpl) GetId() string {
|
||||
return rcv.Id
|
||||
}
|
||||
|
||||
func (rcv *ProfileImpl) GetSubject() string {
|
||||
return rcv.Subject
|
||||
}
|
||||
|
||||
func (rcv *ProfileImpl) GetController() string {
|
||||
return rcv.Controller
|
||||
}
|
||||
|
||||
func (rcv *ProfileImpl) GetOriginUri() *string {
|
||||
return rcv.OriginUri
|
||||
}
|
||||
|
||||
func (rcv *ProfileImpl) GetPublicMetadata() *string {
|
||||
return rcv.PublicMetadata
|
||||
}
|
||||
|
||||
func (rcv *ProfileImpl) GetPrivateMetadata() *string {
|
||||
return rcv.PrivateMetadata
|
||||
}
|
||||
|
||||
func (rcv *ProfileImpl) GetCreatedAt() *string {
|
||||
return rcv.CreatedAt
|
||||
}
|
||||
|
||||
func (rcv *ProfileImpl) GetUpdatedAt() *string {
|
||||
return rcv.UpdatedAt
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type Property interface {
|
||||
Model
|
||||
|
||||
GetId() uint
|
||||
|
||||
GetProfileId() string
|
||||
|
||||
GetKey() string
|
||||
|
||||
GetAccumulator() *pkl.Object
|
||||
|
||||
GetPropertyKey() *pkl.Object
|
||||
}
|
||||
|
||||
var _ Property = (*PropertyImpl)(nil)
|
||||
|
||||
type PropertyImpl struct {
|
||||
Table string `pkl:"table"`
|
||||
|
||||
Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"`
|
||||
|
||||
ProfileId string `pkl:"profileId" json:"profileId,omitempty"`
|
||||
|
||||
Key string `pkl:"key" json:"key,omitempty"`
|
||||
|
||||
Accumulator *pkl.Object `pkl:"accumulator" json:"accumulator,omitempty"`
|
||||
|
||||
PropertyKey *pkl.Object `pkl:"propertyKey" json:"propertyKey,omitempty"`
|
||||
}
|
||||
|
||||
func (rcv *PropertyImpl) GetTable() string {
|
||||
return rcv.Table
|
||||
}
|
||||
|
||||
func (rcv *PropertyImpl) GetId() uint {
|
||||
return rcv.Id
|
||||
}
|
||||
|
||||
func (rcv *PropertyImpl) GetProfileId() string {
|
||||
return rcv.ProfileId
|
||||
}
|
||||
|
||||
func (rcv *PropertyImpl) GetKey() string {
|
||||
return rcv.Key
|
||||
}
|
||||
|
||||
func (rcv *PropertyImpl) GetAccumulator() *pkl.Object {
|
||||
return rcv.Accumulator
|
||||
}
|
||||
|
||||
func (rcv *PropertyImpl) GetPropertyKey() *pkl.Object {
|
||||
return rcv.PropertyKey
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type PublicKey interface {
|
||||
Model
|
||||
|
||||
GetId() uint
|
||||
|
||||
GetRole() int
|
||||
|
||||
GetAlgorithm() int
|
||||
|
||||
GetEncoding() int
|
||||
|
||||
GetRaw() *pkl.Object
|
||||
|
||||
GetHex() string
|
||||
|
||||
GetMultibase() string
|
||||
|
||||
GetJwk() *pkl.Object
|
||||
|
||||
GetCreatedAt() *string
|
||||
}
|
||||
|
||||
var _ PublicKey = (*PublicKeyImpl)(nil)
|
||||
|
||||
type PublicKeyImpl struct {
|
||||
Table string `pkl:"table"`
|
||||
|
||||
Id uint `pkl:"id" gorm:"primaryKey" json:"id,omitempty"`
|
||||
|
||||
Role int `pkl:"role" json:"role,omitempty"`
|
||||
|
||||
Algorithm int `pkl:"algorithm" json:"algorithm,omitempty"`
|
||||
|
||||
Encoding int `pkl:"encoding" json:"encoding,omitempty"`
|
||||
|
||||
Raw *pkl.Object `pkl:"raw" json:"raw,omitempty"`
|
||||
|
||||
Hex string `pkl:"hex" json:"hex,omitempty"`
|
||||
|
||||
Multibase string `pkl:"multibase" json:"multibase,omitempty"`
|
||||
|
||||
Jwk *pkl.Object `pkl:"jwk" json:"jwk,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetTable() string {
|
||||
return rcv.Table
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetId() uint {
|
||||
return rcv.Id
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetRole() int {
|
||||
return rcv.Role
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetAlgorithm() int {
|
||||
return rcv.Algorithm
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetEncoding() int {
|
||||
return rcv.Encoding
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetRaw() *pkl.Object {
|
||||
return rcv.Raw
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetHex() string {
|
||||
return rcv.Hex
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetMultibase() string {
|
||||
return rcv.Multibase
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetJwk() *pkl.Object {
|
||||
return rcv.Jwk
|
||||
}
|
||||
|
||||
func (rcv *PublicKeyImpl) GetCreatedAt() *string {
|
||||
return rcv.CreatedAt
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type Sonr interface {
|
||||
Client
|
||||
|
||||
GetRpcUrl() any
|
||||
}
|
||||
|
||||
var _ Sonr = (*SonrImpl)(nil)
|
||||
|
||||
type SonrImpl struct {
|
||||
ChainId string `pkl:"chainId"`
|
||||
|
||||
KeyringBackend string `pkl:"keyringBackend"`
|
||||
|
||||
Output string `pkl:"output"`
|
||||
|
||||
RpcUrl any `pkl:"rpcUrl"`
|
||||
|
||||
BroadcastMode string `pkl:"broadcastMode"`
|
||||
|
||||
ApiUrl string `pkl:"apiUrl"`
|
||||
|
||||
AddressPrefix string `pkl:"addressPrefix"`
|
||||
|
||||
Node string `pkl:"node"`
|
||||
}
|
||||
|
||||
func (rcv *SonrImpl) GetChainId() string {
|
||||
return rcv.ChainId
|
||||
}
|
||||
|
||||
func (rcv *SonrImpl) GetKeyringBackend() string {
|
||||
return rcv.KeyringBackend
|
||||
}
|
||||
|
||||
func (rcv *SonrImpl) GetOutput() string {
|
||||
return rcv.Output
|
||||
}
|
||||
|
||||
func (rcv *SonrImpl) GetRpcUrl() any {
|
||||
return rcv.RpcUrl
|
||||
}
|
||||
|
||||
func (rcv *SonrImpl) GetBroadcastMode() string {
|
||||
return rcv.BroadcastMode
|
||||
}
|
||||
|
||||
func (rcv *SonrImpl) GetApiUrl() string {
|
||||
return rcv.ApiUrl
|
||||
}
|
||||
|
||||
func (rcv *SonrImpl) GetAddressPrefix() string {
|
||||
return rcv.AddressPrefix
|
||||
}
|
||||
|
||||
func (rcv *SonrImpl) GetNode() string {
|
||||
return rcv.Node
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
type Sqlite interface {
|
||||
DB
|
||||
}
|
||||
|
||||
var _ Sqlite = (*SqliteImpl)(nil)
|
||||
|
||||
type SqliteImpl struct {
|
||||
Filename string `pkl:"filename"`
|
||||
}
|
||||
|
||||
func (rcv *SqliteImpl) GetFilename() string {
|
||||
return rcv.Filename
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/apple/pkl-go/pkl"
|
||||
)
|
||||
|
||||
type Vault struct {
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Vault
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Vault, err error) {
|
||||
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
cerr := evaluator.Close()
|
||||
if err == nil {
|
||||
err = cerr
|
||||
}
|
||||
}()
|
||||
ret, err = Load(ctx, evaluator, pkl.FileSource(path))
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Vault
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Vault, error) {
|
||||
var ret Vault
|
||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// Code generated from Pkl module `vault`. DO NOT EDIT.
|
||||
package vault
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
func init() {
|
||||
pkl.RegisterMapping("vault", Vault{})
|
||||
pkl.RegisterMapping("vault#Sonr", SonrImpl{})
|
||||
pkl.RegisterMapping("vault#Sqlite", SqliteImpl{})
|
||||
pkl.RegisterMapping("vault#Account", AccountImpl{})
|
||||
pkl.RegisterMapping("vault#Asset", AssetImpl{})
|
||||
pkl.RegisterMapping("vault#Chain", ChainImpl{})
|
||||
pkl.RegisterMapping("vault#Credential", CredentialImpl{})
|
||||
pkl.RegisterMapping("vault#Profile", ProfileImpl{})
|
||||
pkl.RegisterMapping("vault#Property", PropertyImpl{})
|
||||
pkl.RegisterMapping("vault#Keyshare", KeyshareImpl{})
|
||||
pkl.RegisterMapping("vault#PublicKey", PublicKeyImpl{})
|
||||
pkl.RegisterMapping("vault#Permission", PermissionImpl{})
|
||||
}
|
||||
Reference in New Issue
Block a user