Documentation ¶
Index ¶
- Variables
- func NewHandler(keeper Keeper, govKeeper government.Keeper) sdk.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (k Keeper) ChangeDepositRequestStatus(ctx sdk.Context, proof string, status types.RequestStatus) sdk.Error
- func (k Keeper) ChangePowerUpRequestStatus(ctx sdk.Context, proof string, status types.RequestStatus) sdk.Error
- func (k Keeper) DepositIntoPool(ctx sdk.Context, depositor sdk.AccAddress, amount sdk.Coins) sdk.Error
- func (k Keeper) FundAccount(ctx sdk.Context, account sdk.AccAddress, amount sdk.Coins) sdk.Error
- func (k Keeper) GetDepositRequests(ctx sdk.Context) (requests []types.DidDepositRequest)
- func (k Keeper) GetDidDepositRequestByProof(ctx sdk.Context, proof string) (types.DidDepositRequest, error)
- func (k Keeper) GetDidDocumentByOwner(ctx sdk.Context, owner sdk.AccAddress) (types.DidDocument, error)
- func (k Keeper) GetDidDocuments(ctx sdk.Context) ([]types.DidDocument, error)
- func (k Keeper) GetHandledPowerUpRequestsReferences(ctx sdk.Context) ctypes.Strings
- func (k Keeper) GetIdentitiesModuleAccount(ctx sdk.Context) exported.ModuleAccountI
- func (k Keeper) GetPoolAmount(ctx sdk.Context) (pool sdk.Coins)
- func (k Keeper) GetPowerUpRequestByProof(ctx sdk.Context, proof string) (types.DidPowerUpRequest, error)
- func (k Keeper) GetPowerUpRequests(ctx sdk.Context) (requests []types.DidPowerUpRequest)
- func (k Keeper) HandledPowerUpRequestsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) SaveDidDocument(ctx sdk.Context, document types.DidDocument) sdk.Error
- func (k Keeper) SetHandledPowerUpRequestsReference(ctx sdk.Context, reference string)
- func (k Keeper) SetPowerUpRequestHandled(ctx sdk.Context, activationReference string) error
- func (k Keeper) StoreDidDepositRequest(ctx sdk.Context, request types.DidDepositRequest) sdk.Error
- func (k Keeper) StorePowerUpRequest(ctx sdk.Context, request types.DidPowerUpRequest) sdk.Error
- type ResolveIdentityResponse
Constants ¶
This section is empty.
Variables ¶
var TestDepositor, _ = sdk.AccAddressFromBech32("cosmos187pz9tpycrhaes72c77p62zjh6p9zwt9amzpp6")
var TestDidDepositRequest = types.DidDepositRequest{ Recipient: TestPairwiseDid, Amount: sdk.NewCoins(sdk.NewInt64Coin("uatom", 100)), Proof: "68576d5a7134743777217a25432646294a404e635266556a586e327235753878", EncryptionKey: "333b68743231343b6833346832313468354a40617364617364", FromAddress: TestDepositor, }
var TestDidDocument types.DidDocument
var TestDidPowerUpRequest = types.DidPowerUpRequest{ Claimant: TestDepositor, Amount: sdk.NewCoins(sdk.NewInt64Coin("uatom", 100)), Proof: "68576d5a7134743777217a25432646294a404e635266556a586e327235753878", EncryptionKey: "333b68743231343b6833346832313468354a40617364617364", }
Power up requests
var TestGovernment, _ = sdk.AccAddressFromBech32("cosmos1gdpsu89prllyw49eehskv6t8800p6chefyuuwe")
Deposit requests
var TestOwnerAddress sdk.AccAddress
Identities
var TestPairwiseDid, _ = sdk.AccAddressFromBech32("cosmos1yhd6h25ksupyezrajk30n7y99nrcgcnppj2haa")
Functions ¶
func NewHandler ¶ added in v1.3.0
func NewHandler(keeper Keeper, govKeeper government.Keeper) sdk.Handler
NewHandler returns a handler for type messages and is essentially a sub-router that directs messages coming into this module to the proper handler.
func NewQuerier ¶
NewQuerier is the module level router for state queries
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey, accKeeper auth.AccountKeeper, supplyKeeper supply.Keeper) Keeper
NewKeeper creates new instances of the CommercioID Keeper
func SetupTestInput ¶
func SetupTestInput() (*codec.Codec, sdk.Context, auth.AccountKeeper, bank.Keeper, government.Keeper, Keeper)
This function create an environment to test modules
func (Keeper) ChangeDepositRequestStatus ¶ added in v1.3.0
func (k Keeper) ChangeDepositRequestStatus(ctx sdk.Context, proof string, status types.RequestStatus) sdk.Error
ChangePowerUpRequestStatus changes the status of the request having the same proof, or returns an error if no request with the given proof could be found
func (Keeper) ChangePowerUpRequestStatus ¶ added in v1.3.0
func (k Keeper) ChangePowerUpRequestStatus(ctx sdk.Context, proof string, status types.RequestStatus) sdk.Error
ChangePowerUpRequestStatus changes the status of the request having the same proof, or returns an error if no request with the given proof could be found
func (Keeper) DepositIntoPool ¶ added in v1.3.0
func (k Keeper) DepositIntoPool(ctx sdk.Context, depositor sdk.AccAddress, amount sdk.Coins) sdk.Error
DepositIntoPool allows to deposit the specified amount into the liquidity pool, taking it from the specified depositor balance
func (Keeper) FundAccount ¶ added in v1.3.0
FundAccount allows to take the specified amount from the liquidity pool and move them into the specified account balance
func (Keeper) GetDepositRequests ¶ added in v1.3.0
func (k Keeper) GetDepositRequests(ctx sdk.Context) (requests []types.DidDepositRequest)
GetDepositRequests returns the list of the deposit requests existing inside the given context
func (Keeper) GetDidDepositRequestByProof ¶ added in v1.3.0
func (k Keeper) GetDidDepositRequestByProof(ctx sdk.Context, proof string) (types.DidDepositRequest, error)
GetDidDepositRequestByProof returns the request having the same proof.
func (Keeper) GetDidDocumentByOwner ¶ added in v1.2.0
func (k Keeper) GetDidDocumentByOwner(ctx sdk.Context, owner sdk.AccAddress) (types.DidDocument, error)
GetIdentity returns the Did Document reference associated to a given Did. If the given Did has no Did Document reference associated, returns nil.
func (Keeper) GetDidDocuments ¶ added in v1.3.0
GetDidDocuments returns the list of all identities for the given context
func (Keeper) GetHandledPowerUpRequestsReferences ¶ added in v1.3.0
func (Keeper) GetIdentitiesModuleAccount ¶ added in v1.3.2
func (k Keeper) GetIdentitiesModuleAccount(ctx sdk.Context) exported.ModuleAccountI
GetIdentitiesModuleAccount returns the id ModuleAccount
func (Keeper) GetPoolAmount ¶ added in v1.3.0
GetPoolAmount returns the current pool amount
func (Keeper) GetPowerUpRequestByProof ¶ added in v1.3.0
func (k Keeper) GetPowerUpRequestByProof(ctx sdk.Context, proof string) (types.DidPowerUpRequest, error)
GetDidDepositRequestByProof returns the request having the same proof.
func (Keeper) GetPowerUpRequests ¶ added in v1.3.0
func (k Keeper) GetPowerUpRequests(ctx sdk.Context) (requests []types.DidPowerUpRequest)
GetPowerUpRequests returns the list the requests saved inside the given context
func (Keeper) HandledPowerUpRequestsIterator ¶ added in v1.5.0
func (Keeper) SaveDidDocument ¶ added in v1.3.0
SaveDidDocument saves the given didDocumentUri associating it with the given owner, replacing any existent one.
func (Keeper) SetHandledPowerUpRequestsReference ¶ added in v1.5.0
func (Keeper) SetPowerUpRequestHandled ¶ added in v1.3.0
func (Keeper) StoreDidDepositRequest ¶ added in v1.3.0
StorePowerUpRequest allows to save the given request. Returns an error if a request with the same proof already exists
func (Keeper) StorePowerUpRequest ¶ added in v1.3.0
StorePowerUpRequest allows to save the given request. Returns an error if a request with the same proof already exists
type ResolveIdentityResponse ¶ added in v1.2.0
type ResolveIdentityResponse struct { Owner sdk.AccAddress `json:"owner"` DidDocument *types.DidDocument `json:"did_document"` }