Skip to main content

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 module
  • params: New parameters to set
    • platform_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 depository
  • pauser: Address that can pause/unpause the depository
  • region: Geographic region identifier

Authorization:

  • Only the platform_admin from 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 update
  • new_owner: New owner address (optional, empty string = no change)
  • new_pauser: New pauser address (optional, empty string = no change)

Authorization:

  • Only the current owner of 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 IssuePTWithGlobalNote and SurrenderGlobalNote operations

Authorization:

  • Only the pauser of 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 IssuePTWithGlobalNote and SurrenderGlobalNote operations

Authorization:

  • Only the pauser of 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 depository
  • spv_issuer: Address of the SPV issuer to authorise

Effects:

  • Adds entry to AuthorisedIssuers mapping: (depository_id, spv_issuer) → true

Authorization:

  • Only the owner of 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 depository
  • spv_issuer: Address of the SPV issuer to remove

Effects:

  • Sets entry in AuthorisedIssuers mapping: (depository_id, spv_issuer) → false

Authorization:

  • Only the owner of 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 depository
  • isin: International Securities Identification Number (unique)
  • global_note_hash: Hash of the underlying asset data
  • total_supply: Number of PT tokens to mint
  • asset_type_id: Links to x/notary asset type
  • notarised_asset_id: Links to the notarised asset in x/notary

Effects:

  1. Creates InternalGlobalNote record
  2. Creates PTDenom record with ISIN and total supply
  3. Initialises PtTransferability as unpaused and unrestricted
  4. Mints total_supply PT tokens to the module account
  5. Transfers all PT tokens to the SPV issuer

Authorization:

  • SPV issuer must be authorised for the depository
  • Depository must not be paused

Validation:

  • total_supply must be positive
  • ISIN must be unique (no existing Global Note with same ISIN)

Errors:

  • ErrDepositoryNotFound: Depository doesn't exist
  • ErrDepositoryPaused: Depository is paused
  • ErrIssuerNotAuthorised: SPV issuer not authorised
  • ErrInvalidAmount: Total supply is zero or negative
  • ErrGlobalNoteAlreadyExists: 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:

  1. Retrieves all PT token holders and their balances
  2. Transfers all PT tokens from holders to module account
  3. Burns all PT tokens
  4. Updates PTDenom.TotalSupply to zero
  5. Records final holder balances in response

Authorization:

  • Only the original spv_issuer of 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 exist
  • ErrDepositoryNotFound: Associated depository doesn't exist
  • ErrDepositoryPaused: Depository is paused
  • ErrUnauthorized: Sender is not the original SPV issuer
  • ErrPTDenomSurrenderFailed: 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

MessageAuthorised Sender
UpdateParamsModule authority (x/gov)
RegisterDepositoryPlatform admin
UpdateDepositoryParamsDepository owner
PauseDepositoryDepository pauser
UnpauseDepositoryDepository pauser
AddAuthorizedIssuerDepository owner
RemoveAuthorizedIssuerDepository owner
IssuePTWithGlobalNoteAuthorised SPV issuer
SurrenderGlobalNoteOriginal SPV issuer of the note