Full Service API
  • Welcome!
  • Overview
  • API Endpoints
    • v2
      • Account
        • Account
          • Create Account
          • Import Account
          • Import Account Legacy
          • Get Accounts
          • Get Account Status
          • Get Balance
          • Update Account Name
          • Set Require Spend Subaddress
          • Remove Account
        • Account Secrets
          • Export Account Secrets
        • Address
          • Assign Address For Account
          • Get Address For Account
          • Get Addresses
          • Get Address Status
          • Verify Address
        • View Only Account
          • Import View Only Account
          • Create View Only Account Import Request
          • Create View Only Account Sync Request
          • Sync View Only Account
      • Transaction
        • Transaction
          • Build Transaction
          • Submit Transaction
          • Build And Submit Transaction
          • Build Burn Transaction
          • Build Unsigned Transaction
          • Build Unsigned Burn Transaction
        • Transaction Output TXO
          • Memo
            • Validate Sender Memo
          • Get TXO
          • Get TXOs
          • Get MobileCoin Protocol TXO
          • Get TXO Membership Proofs
          • Sample Mixins
          • Get TXO Block Index
        • Confirmation
          • Get Confirmations
          • Validate Confirmations
        • Receiver Receipt
          • Check Receiver Receipt Status
          • Create Receiver Receipts
        • Transaction Log
          • Get Transaction Log
          • Get Transaction Logs
          • Get MobileCoin Protocol Transaction
        • Payment Request
          • Create Payment Request
          • Check B58 Type
      • Block
        • Get Block
        • Get Blocks
        • Get Recent Blocks
        • Search Ledger
      • Network Status
        • Get Network Status
      • Wallet Status
        • Get Wallet Status
      • Version
        • Get Version
    • v1 (deprecated)
      • Account
        • Account
          • Create Account
          • Import Account
          • Import Account Legacy
          • Get Account
          • Get All Accounts
          • Get Account Status
          • Update Account Name
          • Remove Account
        • Account Secrets
          • Export Account Secrets
        • Address
          • Assign Address For Account
          • Get Addresses For Account
          • Verify Address
        • Balance
          • Get Balance For Account
          • Get Balance For Address
      • Transaction
        • Transaction
          • Build Transaction
          • Submit Transaction
          • Build And Submit Transaction
          • Build Split Txo Transaction
        • Transaction Output TXO
          • Get TXO
          • Get MobileCoin Protocol TXO
          • Get TXOs For Account
          • Get TXOs For View Only Account
          • Get All TXOs For Address
        • Confirmation
          • Get Confirmations
          • Validate Confirmations
        • Receiver Receipt
          • Check Receiver Receipt Status
          • Create Receiver Receipts
        • Transaction Log
          • Get Transaction Object
          • Get Transaction Log
          • Get Transaction Logs For Account
          • Get All Transaction Logs For Block
          • Get All Transaction Logs Ordered By Block
          • Get MobileCoin Protocol Transaction
        • Payment Request
          • Create Payment Request
          • Check B58 Type
      • Gift Code
        • Build Gift Code
        • Submit Gift Code
        • Get Gift Code
        • Get All Gift Codes
        • Check Gift Code Status
        • Claim Gift Code
        • Remove Gift Code
      • Block
        • Get Block
      • Network Status
        • Get Network Status
      • Wallet Status
        • Get Wallet Status
      • Version
        • Get Version
    • Signer Service
      • Create Account
      • Get Account
      • Sign Transaction
      • Sync Txos
  • Usage
    • Getting Started
      • Running Full Service
      • Create an Account
      • Receiving MobileCoin
      • Sending MobileCoin
      • Next Steps
    • Full Service Network Diagram
    • Supported Token Metadata
    • Database Usage
    • API Key
    • View Only Account
      • Signer
      • Signer Service
    • No Wallet Mode
    • Validator Service
      • Running
      • Running With TLS
    • Mirror Service
      • Running
      • Running With TLS
      • Running With Encryption
    • Logging
      • Text Logs (syslog style)
      • Crash Reports
    • T3
    • Sender Memos
  • FAQ
    • Resolving Disputes
    • How do I check if Full-Service is operational?
    • Where are logs stored?
    • How do I speed up account import?
    • What is the precision of MOB?
  • Glossary
    • Account
    • Block
    • Blockchain
    • Consensus Protocol
    • Fog
    • Full Service
    • Key Image
    • Ledger
    • MOB
    • Public Address
    • Secure Enclave
    • Subaddress
    • Transaction
    • Transaction Proposal
    • Validator Node
    • Validator Service
Powered by GitBook
On this page
  • Parameters
  • Example

Was this helpful?

  1. API Endpoints
  2. v1 (deprecated)
  3. Gift Code

Build Gift Code

Build a gift code in a tx_proposal that you can fund and submit to the ledger.

Parameters

Required Param
Purpose
Requirements

account_id

The account on which to perform this action.

Account must exist in the wallet.

value_pmob

The amount of MOB to send in this transaction.

Optional Param
Purpose
Requirements

input_txo_ids

The specific TXOs to use as inputs to this transaction.

TXO IDs (obtain from get_txos_for_account)

fee

The fee amount to submit with this transaction.

If not provided, uses MINIMUM_FEE = .01 MOB.

tombstone_block

The block after which this transaction expires.

If not provided, uses cur_height + 10.

max_spendable_value

The maximum amount for an input TXO selected for this transaction.

memo

Memo for whoever claims the gift code.

Example

{
  "method": "build_gift_code",
  "params": {
    "account_id": "a8c9c7acb96cf4ad9154eec9384c09f2c75a340b441924847fe5f60a41805bde",
    "value_pmob": "42000000000000",
    "memo": "Happy Birthday!"
  },
  "jsonrpc": "2.0",
  "id": 1
}
{
  "method": "build_gift_code",
  "result": {
    "tx_proposal": "...",
    "gift_code_b58": "3Th9MSyznKV8VWAHAYoF8ZnVVunaTcMjRTnXvtzqeJPfAY8c7uQn71d6McViyzjLaREg7AppT7quDmBRG5E48csVhhzF4TEn1tw9Ekwr2hrq57A8cqR6sqpNC47mF7kHe",
  },
  "error": null,
  "jsonrpc": "2.0",
  "id": 1
}
PreviousGift CodeNextSubmit Gift Code

Last updated 2 years ago

Was this helpful?