keeper

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestDepositor, _ = sdk.AccAddressFromBech32("cosmos187pz9tpycrhaes72c77p62zjh6p9zwt9amzpp6")
View Source
var TestDidDepositRequest = types.DidDepositRequest{
	Recipient:     TestPairwiseDid,
	Amount:        sdk.NewCoins(sdk.NewInt64Coin("uatom", 100)),
	Proof:         "68576d5a7134743777217a25432646294a404e635266556a586e327235753878",
	EncryptionKey: "333b68743231343b6833346832313468354a40617364617364",
	FromAddress:   TestDepositor,
}
View Source
var TestDidDocument types.DidDocument
View Source
var TestDidPowerUpRequest = types.DidPowerUpRequest{
	Claimant:      TestDepositor,
	Amount:        sdk.NewCoins(sdk.NewInt64Coin("uatom", 100)),
	Proof:         "68576d5a7134743777217a25432646294a404e635266556a586e327235753878",
	EncryptionKey: "333b68743231343b6833346832313468354a40617364617364",
}

Power up requests

View Source
var TestGovernment, _ = sdk.AccAddressFromBech32("cosmos1gdpsu89prllyw49eehskv6t8800p6chefyuuwe")

Deposit requests

View Source
var TestOwnerAddress sdk.AccAddress

Identities

View Source
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

func NewQuerier(keeper Keeper) sdk.Querier

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

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

func (k Keeper) FundAccount(ctx sdk.Context, account sdk.AccAddress, amount sdk.Coins) sdk.Error

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

func (k Keeper) GetDidDocuments(ctx sdk.Context) ([]types.DidDocument, error)

GetDidDocuments returns the list of all identities for the given context

func (Keeper) GetHandledPowerUpRequestsReferences added in v1.3.0

func (k Keeper) GetHandledPowerUpRequestsReferences(ctx sdk.Context) ctypes.Strings

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

func (k Keeper) GetPoolAmount(ctx sdk.Context) (pool sdk.Coins)

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 (k Keeper) HandledPowerUpRequestsIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) SaveDidDocument added in v1.3.0

func (k Keeper) SaveDidDocument(ctx sdk.Context, document types.DidDocument) sdk.Error

SaveDidDocument saves the given didDocumentUri associating it with the given owner, replacing any existent one.

func (Keeper) SetHandledPowerUpRequestsReference added in v1.5.0

func (k Keeper) SetHandledPowerUpRequestsReference(ctx sdk.Context, reference string)

func (Keeper) SetPowerUpRequestHandled added in v1.3.0

func (k Keeper) SetPowerUpRequestHandled(ctx sdk.Context, activationReference string) error

func (Keeper) StoreDidDepositRequest added in v1.3.0

func (k Keeper) StoreDidDepositRequest(ctx sdk.Context, request types.DidDepositRequest) sdk.Error

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

func (k Keeper) StorePowerUpRequest(ctx sdk.Context, request types.DidPowerUpRequest) sdk.Error

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL