Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
message ResourceID {
  string orgID = 1; // orgid always start with the prefix "ORG:"
  enum ResourceType {
    reserved 0 to 99;
    USER = 101;
    ASSET = 102;
    reserved 103ESCROW_ACCOUNT = 103;
    SETTLEMENT_ASSET = 104;
    ASSET_TRANSACTION_INTENT = 105;
    reserved 106 to 999;
  }
  ResourceType type = 2;
  bytes resource = 3;
}

...

The Transfer message defines the transfer transaction and includes the senders signature. In order to sign a message that can be verified by the destination Ledger, an Asset Transaction Signature Template (ATST)is defined for each Asset. This template defines the cryptographic algorithms and the structure of the message to sign. The ATST is defined per Asset and is included when retrieving asset’s resource information.

Code Block
message TransferRequestSignedTransferRequest {
  Envelope envelope = 1;
  TransferRequestPayloadSignature signature = 2;
}  TransferRequest message Investor {payload = 3;
}

message TransferRequest {
ResourceID resource =enum 1;Operation {
   FinID finIDUNKNOWN = 20;
  } message TransferRequestPayload {
  Investor buyer ISSUE = 1;
  Investor  sellerTRANSFER = 2;
   ResourceID assetREDEEM = 3;
  }
  uint64Operation amountoperation = 41;
  bytesTransferRequestPayload datapayload = 52;
//  Arbitraryoneof datacondition for{
this transfer.   bytesSignedEscrowPayload signatureescrow = 610;
// Based on}
ATST}
}
Response Message

An asset transaction may have multiple messages. We will define a set of messages that can be received from the Primary Node running the transaction

message TransferResponse { Envelope envelope
Code Block
Code Block
  message Investor {
    ResourceID resource = 1;
  Status  FinID statusfinID = 2;
  TransferResponsePayload
= 3; }
Code Block
message TxPendingTransferRequestPayload {
  stringInvestor txidbuyer = 1;
// Represents aInvestor Txseller id= in2;
progress at theResourceID Cluster DLT
}

// TxDone is the final Response Message.
message TxDone {
  string txid = 1;      // the transaction id
  uint32 code = 2;         // represents the outcome of the Tx
  string message = 3;   // Printable status message
  bytes chainpoint = 4; // If the Tx was succesful, this field holds the ChainPoint 
                        // where the transaction was recorded
}

message TransferResponsePayload {
  oneof payload {
    TxPending pendingasset = 3;
  uint64 amount = 4;
  bytes data = 5; // Arbitrary data
  bytes signature = 6; // Based on ATST
}
Code Block
message EscrowPayload {
  google.protobuf.Timestamp timestamp = 1; // Time in the future when this
  // transaction is no longer valid.
}

message SignedEscrowPayload {
  EscrowPayload payload = 1;
  common.Signature signature = 2;
}
Response Message

An asset transaction may have multiple messages. We will define a set of messages that can be received from the Primary Node running the transaction

Code Block
message SignedTransferResponse {
  common.Envelope envelope = 1;
  common.Signature signature = 2;
  oneof payload {
    Acknowledgement ack = 10;
    TransferResponse transferResponse = 11;
  }
}
Code Block
message Acknowledgement {
  string cid = 1; // correlation id for the response stream
}

message TransferResponse {
  bytes nonce = 1;
  string txid = 2;      // the transaction id
  uint32 code = 3;      // represents the outcome of the Tx
  string message = 4;   // Printable status message
  bytes chainpoint = 5; // If the Tx was succesful, this field holds the ChainPoint where the transaction was recorded
  Receipt receipt = 6;
}
message Receipt {
  string transactionId = 1;
  string assetId = 2;
  string recipientPublicKey = 3;
  string sourcePublicKey = 4;
  string quantity = 5;
  string settlementRef = 6;
  TransactionDetails transactionDetails = 7;
  int64 timestamp = 8;
  string intentId = 9;
}

message TransactionDetails {

  message Inputs {
    string transactionId = 1;
    string quantity = 2;
    uint32 index = 3;
  }

  message Outputs {
    string quantity = 1;
    string publicKey = 2;
    uint32 index = 3;
  }
  repeated Inputs inputs = 1;
  repeated Outputs TxDone    done outputs = 2;
  }
}

Balance

In the balance request is broadcast to the members of the cluster.

...