LogoLogo
PAO DocsInfrastructure DocsDeveloper DocsPeerplays.com
  • Introduction to Peerplays
  • Concepts
    • Decentralization
    • Consensus Mechanisms Compared
  • Technology
    • Peerplays Technical Summary
    • Intro to Peerplays Tokens
    • Intro to Peerplays Liquidity Pools
      • Service Infrastructure Pools
    • Staking (PowerUp) in Peerplays
    • Gamified User Namespaces and Subject Matter Expert Committees
    • Peer-to-Peer Autonomous Organizations: Flow Diagram
    • Gamified Proof of Stake (GPOS)
      • Wallet User Guide
        • GPOS Panel
        • GPOS Landing Page
        • Power Up
        • Power Down
        • Vote
        • Thank you for voting!
      • FAQ
        • General
        • GPOS Panel
        • Power Up & Power Down
        • Voting
        • Participation Rewards
    • Sidechain Operator Nodes (SONs)
      • New to SONs?
        • What are Sidechain Operating Nodes?
        • How do SONs Work?
        • Why are SONs important?
        • How do SONs impact me?
        • SON Fees & Performance Requirements
        • Peerplays SONs
      • FAQ
      • Running a SON Node
    • NFTs and Marketplace
      • NFT marketplace in Python
      • NFT Operations in Python
      • NFT, Marketplace, HRP, and RBAC related Commands/Use Cases
      • NFT command reference
    • Peerplays DEX
      • User Guide
        • Account Creation
        • Dashboard
          • Bitcoin Transaction
        • Market Activity
        • Peerplays Blocks
        • Settings
        • Wallet
        • Profile
        • GPOS - Voting
        • Logout
  • Witnesses
    • What is a Peerplays Witness?
    • Becoming a Peerplays Witness
    • Hardware Requirements
    • Installation Guides
  • Bookie Oracle Suite (BOS)
    • Introduction to BOS
    • BOS Installation
    • BookieSports
    • Manual Intervention Tool (MINT)
  • Data Proxies
    • Introduction to Data Proxies
    • How Data Proxies Work
    • Data Proxy Set Up
  • Couch Potato
    • Introduction
    • Installation
    • User Guide
  • Random Number Generator (RNG)
    • RNG Technical Summary
    • RNG API
  • API
    • Peerplays Core API
      • Popular API Calls
      • Account History API
      • Asset API
      • Block API
      • Crypto API
      • Database API
      • Network Broadcast API
      • Network Nodes API
      • Orders API
    • Wallet API
      • Account Calls
      • Asset Calls
      • Blockchain Inspection
      • General Calls
      • Governance
      • Privacy Mode
      • Trading Calls
      • Transaction Builder
      • Wallet Calls
    • Bookie API
      • General
      • Tournaments
      • Listeners
    • Python Peerplays
      • Installation
      • Creating the wallet
      • Creating an Account
      • NFT
      • Market Place
      • HRP / RBAC
  • Connecting Elasticsearch to a blockchain node
  • GitLab
    • GitLab Ticket Templates
    • Labels
    • Time Tracking
  • Other Documentation
    • Peerplays Home
    • Infrastructure Docs
    • Developer Docs
    • Site Reliability Engineering
  • Known Issues
    • Peerplays Disaster Recovery Plan
    • Sept 2021 Mainnet Outage - Postmortem Report
  • Kickstart Guide
    • Peerplays Developer
  • Risk Register
    • Introduction
      • Bunker Issue
        • DDOS Attack
        • Hypervisor Compromised
        • Power and Backup Failure
        • Crypto Restriction
      • Core-Block Issue
        • Expensive Servers
        • Witness node - Not reachable
        • Witnesses get DDOS'd
        • Bad Actor infiltrate witness/SONs
      • Credential Security
        • NEX Open Source Vulnerabilities
        • Keyloggers, access to NEX deployment
        • Password manager hacked
        • SONs active keys exposed in configuration
    • Glossary
  • Operation Cost Estimation
    • Project Operations
    • Cost Estimation
Powered by GitBook
On this page
  • Transaction Builder
  • begin_builder_transaction
  • add_operation_to_builder_transaction
  • replace_operation_in_builder_transaction
  • set_fees_on_builder_transaction
  • preview_builder_transaction
  • sign_builder_transaction
  • propose_builder_transaction
  • propose_builder_transaction2
  • remove_builder_transaction
  • serialize_transaction
  • sign_transaction
  • get_prototype_operation
Export as PDF
  1. API
  2. Wallet API

Transaction Builder

Transaction Builder

begin_builder_transaction

Create a new transaction builder.

transaction_handle_typegraphene::wallet::wallet_api::begin_builder_transaction()

Handle of the new transaction builder.

add_operation_to_builder_transaction

Append a new operation to a transaction builder.

void graphene::wallet::wallet_api::add_operation_to_builder_transaction(
    transaction_handle_typetransaction_handle, 
    const operation &op)
  • transaction_handle: handle of the transaction builder

  • op: the operation in JSON format

replace_operation_in_builder_transaction

Replace an operation in a transaction builder with a new operation.

void graphene::wallet::wallet_api::replace_operation_in_builder_transaction(
    transaction_handle_typehandle, 
    unsigned operation_index, 
    const operation &new_op)
  • handle: handle of the transaction builder

  • operation_index: the index of the old operation in the builder to be replaced

  • new_op: the new operation in JSON format

set_fees_on_builder_transaction

Calculate and update fees for the operations in a transaction builder.

asset graphene::wallet::wallet_api::set_fees_on_builder_transaction(
    transaction_handle_typehandle, 
    string fee_asset = GRAPHENE_SYMBOL)
  • handle: handle of the transaction builder

  • fee_asset: name or ID of an asset that to be used to pay fees

Total fees.

preview_builder_transaction

Show content of a transaction builder.

transaction graphene::wallet::wallet_api::preview_builder_transaction(
    transaction_handle_typehandle)
  • handle: handle of the transaction builder

A transaction.

sign_builder_transaction

Sign the transaction in a transaction builder and optionally broadcast to the network.

signed_transaction graphene::wallet::wallet_api::sign_builder_transaction(
    transaction_handle_typetransaction_handle, 
    bool broadcast = true)
  • transaction_handle: handle of the transaction builder

  • broadcast: whether to broadcast the signed transaction to the network

A signed transaction.

propose_builder_transaction

Create a proposal containing the operations in a transaction builder (create a new proposal_create operation, then replace the transaction builder with the new operation), then sign the transaction and optionally broadcast to the network.

Note: this command is not effective because you're unable to specify a proposer. It will be deprecated in a future release. Use propose_builder_transaction2() instead.

signed_transaction graphene::wallet::wallet_api::propose_builder_transaction(
    transaction_handle_typehandle, 
    time_point_sec expiration = time_point::now() + fc::minutes(1), 
    uint32_t review_period_seconds = 0, 
    bool broadcast = true)
  • handle: handle of the transaction builder

  • expiration: when the proposal will expire

  • review_period_seconds: review period of the proposal in seconds

  • broadcast: whether to broadcast the signed transaction to the network

A signed transaction.

propose_builder_transaction2

Create a proposal containing the operations in a transaction builder (create a new proposal_create operation, then replace the transaction builder with the new operation), then sign the transaction and optionally broadcast to the network.

signed_transaction graphene::wallet::wallet_api::propose_builder_transaction2(
    transaction_handle_typehandle, 
    string account_name_or_id, 
    time_point_sec expiration = time_point::now() + fc::minutes(1), 
    uint32_t review_period_seconds = 0, 
    bool broadcast = true)
  • handle: handle of the transaction builder

  • account_name_or_id: name or ID of the account who would pay fees for creating the proposal

  • expiration: when the proposal will expire

  • review_period_seconds: review period of the proposal in seconds

  • broadcast: whether to broadcast the signed transaction to the network

A signed transaction.

remove_builder_transaction

Destroy a transaction builder.

void graphene::wallet::wallet_api::remove_builder_transaction(
    transaction_handle_typehandle)
  • handle: handle of the transaction builder

serialize_transaction

Converts a signed_transaction in JSON form to its binary representation.

string graphene::wallet::wallet_api::serialize_transaction(
    signed_transaction tx)const
  • tx: the transaction to serialize

The binary form of the transaction. It will not be hex encoded, this returns a raw string that may have null characters embedded in it

sign_transaction

Signs a transaction.

Given a fully-formed transaction that is only lacking signatures, this signs the transaction with the necessary keys and optionally broadcasts the transaction.

signed_transaction graphene::wallet::wallet_api::sign_transaction(
    signed_transaction tx, 
    bool broadcast = false)
  • tx: the unsigned transaction

  • broadcast: true if you wish to broadcast the transaction

The signed version of the transaction

get_prototype_operation

Returns an uninitialized object representing a given blockchain operation.

This returns a default-initialized object of the given type; it can be used during early development of the wallet when we don’t yet have custom commands for creating all of the operations the blockchain supports.

Any operation the blockchain supports can be created using the transaction builder’s add_operation_to_builder_transaction() , but to do that from the CLI you need to know what the JSON form of the operation looks like. This will give you a template you can fill in. It’s better than nothing.

operation graphene::wallet::wallet_api::get_prototype_operation(
    string operation_type)
  • operation_type: the type of operation to return, must be one of the operations defined in graphene/protocol/operations.hpp (e.g., “global_parameters_update_operation”)

A default-constructed operation of the given type.

PreviousTrading CallsNextWallet Calls

Last updated 1 year ago