Messages
Message Types
UpdateParams
Purpose: Update the x/depository module parameters (governance operation).
Sender: Must be the module authority (typically x/gov)
Parameters:
authority: The address that controls the moduleparams: New parameters to setplatform_admin: Address authorised to register depositories
Returns: MsgUpdateParamsResponse (empty)
RegisterDepository
Purpose: Register a new depository that can custody Global Notes.
Sender: Must be the platform admin (from module params)
Parameters:
admin: Platform admin address (signer)owner: Address that will own and manage the depositorypauser: Address that can pause/unpause the depositoryregion: Geographic region identifier
Authorization:
- Only the
platform_adminfrom module params can register depositories
Returns:
message MsgRegisterDepositoryResponse {
string depository_id = 1;
}
UpdateDepositoryParams
Purpose: Update depository owner and/or pauser addresses.
Sender: Must be the current owner of the depository
Parameters:
owner: Current owner address (signer)depository_id: ID of the depository to updatenew_owner: New owner address (optional, empty string = no change)new_pauser: New pauser address (optional, empty string = no change)
Authorization:
- Only the current
ownerof the depository can update parameters
Returns: MsgUpdateDepositoryParamsResponse (empty)
PauseDepository
Purpose: Pause all operations on a depository.
Sender: Must be the pauser of the depository
Parameters:
pauser: Pauser address (signer)depository_id: ID of the depository to pause
Effects:
- Sets
depository.paused = true - Blocks
IssuePTWithGlobalNoteandSurrenderGlobalNoteoperations
Authorization:
- Only the
pauserof the depository can pause it
Returns: MsgPauseDepositoryResponse (empty)
UnpauseDepository
Purpose: Resume operations on a paused depository.
Sender: Must be the pauser of the depository
Parameters:
pauser: Pauser address (signer)depository_id: ID of the depository to unpause
Effects:
- Sets
depository.paused = false - Re-enables
IssuePTWithGlobalNoteandSurrenderGlobalNoteoperations
Authorization:
- Only the
pauserof the depository can unpause it
Returns: MsgUnpauseDepositoryResponse (empty)
AddAuthorizedIssuer
Purpose: Authorise an SPV issuer to issue Global Notes under a depository.
Sender: Must be the owner of the depository
Parameters:
owner: Depository owner address (signer)depository_id: ID of the depositoryspv_issuer: Address of the SPV issuer to authorise
Effects:
- Adds entry to
AuthorisedIssuersmapping:(depository_id, spv_issuer) → true
Authorization:
- Only the
ownerof the depository can authorise issuers
Errors:
ErrIssuerAlreadyAuthorised: If the issuer is already authorised
Returns: MsgAddAuthorizedIssuerResponse (empty)
RemoveAuthorizedIssuer
Purpose: Remove authorisation from an SPV issuer.
Sender: Must be the owner of the depository
Parameters:
owner: Depository owner address (signer)depository_id: ID of the depositoryspv_issuer: Address of the SPV issuer to remove
Effects:
- Sets entry in
AuthorisedIssuersmapping:(depository_id, spv_issuer) → false
Authorization:
- Only the
ownerof the depository can remove issuers
Errors:
ErrIssuerNotAuthorised: If the issuer is not currently authorised
Returns: MsgRemoveAuthorizedIssuerResponse (empty)
IssuePTWithGlobalNote
Purpose: Issue a Global Note and mint corresponding PT tokens.
Sender: Must be an authorised SPV issuer for the depository
Parameters:
spv_issuer: SPV issuer address (signer)depository_id: ID of the custodian depositoryisin: International Securities Identification Number (unique)global_note_hash: Hash of the underlying asset datatotal_supply: Number of PT tokens to mintasset_type_id: Links to x/notary asset typenotarised_asset_id: Links to the notarised asset in x/notary
Effects:
- Creates
InternalGlobalNoterecord - Creates
PTDenomrecord with ISIN and total supply - Initialises
PtTransferabilityas unpaused and unrestricted - Mints
total_supplyPT tokens to the module account - Transfers all PT tokens to the SPV issuer
Authorization:
- SPV issuer must be authorised for the depository
- Depository must not be paused
Validation:
total_supplymust be positive- ISIN must be unique (no existing Global Note with same ISIN)
Errors:
ErrDepositoryNotFound: Depository doesn't existErrDepositoryPaused: Depository is pausedErrIssuerNotAuthorised: SPV issuer not authorisedErrInvalidAmount: Total supply is zero or negativeErrGlobalNoteAlreadyExists: ISIN already used
Returns:
message MsgIssuePTWithGlobalNoteResponse {
GlobalNote global_note = 1;
string pt_denom = 2;
}
SurrenderGlobalNote
Purpose: Surrender a Global Note at maturity, burning all PT tokens.
Sender: Must be the original SPV issuer of the Global Note
Parameters:
spv_issuer: SPV issuer address (signer)isin: ISIN of the Global Note to surrender
Effects:
- Retrieves all PT token holders and their balances
- Transfers all PT tokens from holders to module account
- Burns all PT tokens
- Updates
PTDenom.TotalSupplyto zero - Records final holder balances in response
Authorization:
- Only the original
spv_issuerof the Global Note can surrender it - Associated depository must not be paused
Error Handling:
- If any transfer fails, all successful transfers are rolled back
- Balance restoration is logged if rollback fails
Errors:
ErrGlobalNoteNotFound: Global Note doesn't existErrDepositoryNotFound: Associated depository doesn't existErrDepositoryPaused: Depository is pausedErrUnauthorized: Sender is not the original SPV issuerErrPTDenomSurrenderFailed: Total supply mismatch during surrender
Returns:
message MsgSurrenderGlobalNoteResponse {
cosmos.base.v1beta1.Coin total_burnt = 1;
LatestPtHolders latest_pt_holders = 2;
}
The latest_pt_holders contains the final balances of all PT holders before burning, useful for off-chain settlement.
Authorization Summary
| Message | Authorised Sender |
|---|---|
| UpdateParams | Module authority (x/gov) |
| RegisterDepository | Platform admin |
| UpdateDepositoryParams | Depository owner |
| PauseDepository | Depository pauser |
| UnpauseDepository | Depository pauser |
| AddAuthorizedIssuer | Depository owner |
| RemoveAuthorizedIssuer | Depository owner |
| IssuePTWithGlobalNote | Authorised SPV issuer |
| SurrenderGlobalNote | Original SPV issuer of the note |