common.transfer

io.token.proto.common.transfer /common/src/main/proto/transfer.proto


syntax = "proto3";
package io.token.proto.common.transfer;

option java_outer_classname = "TransferProtos";
option csharp_namespace = "Tokenio.Proto.Common.TransferProtos";

import "money.proto";
import "security.proto";
import "transaction.proto";
import "transferinstructions.proto";

// A transfer record as persisted on the ledger.
message Transfer {
  string id = 1;                               // Computed as the hash of the transfer payload.
  string transaction_id = 2;                   // Bank transaction reference id.
  int64 created_at_ms = 3;
  TransferPayload payload = 4;
  repeated io.token.proto.common.security.Signature payload_signatures = 5; // Signatures
  io.token.proto.common.transaction.TransactionStatus status = 6;
  string order_id = 7;                         // Currency Ledger order id.
  Method method = 8;                           // Instant (currency ledger) or default

  enum Method {
    DEFAULT = 0;
    INSTANT = 1; // Use Token's Currency Ledger
  }
}

// A transfer payload that is being signed by the redeemer and the bank.
message TransferPayload {
  string ref_id = 1;                                                                      // Client assigned unique request id.
  string token_id = 2;                                                                    // Token id.
  io.token.proto.common.money.Money amount = 3;                                           // Amount and currency.
  repeated io.token.proto.common.transferinstructions.TransferEndpoint destinations = 5 [deprecated=true];
  string description = 6;                                                                 // Optional
  repeated io.token.proto.common.transferinstructions.TransferDestination transfer_destinations = 7;  // Transfer destinations, sorted in priority order.
}