Language

Choose a language

/build/rpc / contracts / forward

forward.import_offer

forward.import_offer {} Import a forward contract offer JSON payload into the wallet registry (stub - offer already stored by counterparty). Arguments: 1. offer (json object, required) Offer payload { } Result: { (json object) "offer_id" : "hex" (string) Unique offer identifier } Examples: > bitcoin-cli forward.import_offer "{...offer json...}"

Signature

forward.import_offer(offer: object) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"forward.import_offer","params":[{}]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
offerobjectyesOffer payload { }

Result

Type:  any

{ (json object) "offer_id" : "hex" (string) Unique offer identifier }

Source: services/core-node/bcore/src/wallet/rpc/contracts.cpp:14052

C++ symbol: forward_import_offer