nft

package
v0.0.2-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2018 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const BootstrappedPayObService = "BootstrappedPayObService"

BootstrappedPayObService is the key to PaymentObligationService in bootstrap context.

View Source
const EthereumPaymentObligationContractABI = "" /* 6640-byte string literal not displayed */

EthereumPaymentObligationContractABI is the input ABI used to generate the binding from.

Variables

This section is empty.

Functions

func GRPCHandler

func GRPCHandler(payOb PaymentObligation) nftpb.NFTServiceServer

GRPCHandler returns an implementation of invoice.DocumentServiceServer

Types

type Bootstrapper

type Bootstrapper struct{}

Bootstrapper implements bootstrap.Bootstrapper.

func (*Bootstrapper) Bootstrap

func (*Bootstrapper) Bootstrap(ctx map[string]interface{}) error

Bootstrap initializes the payment obligation contract

type Config

type Config interface {
	GetIdentityID() ([]byte, error)
	GetEthereumDefaultAccountName() string
	GetContractAddress(address string) common.Address
	GetEthereumContextWaitTimeout() time.Duration
}

Config is an interface to configurations required by nft package

type EthereumPaymentObligationContract

type EthereumPaymentObligationContract struct {
	EthereumPaymentObligationContractCaller     // Read-only binding to the contract
	EthereumPaymentObligationContractTransactor // Write-only binding to the contract
	EthereumPaymentObligationContractFilterer   // Log filterer for contract events
}

EthereumPaymentObligationContract is an auto generated Go binding around an Ethereum contract.

func NewEthereumPaymentObligationContract

func NewEthereumPaymentObligationContract(address common.Address, backend bind.ContractBackend) (*EthereumPaymentObligationContract, error)

NewEthereumPaymentObligationContract creates a new instance of EthereumPaymentObligationContract, bound to a specific deployed contract.

type EthereumPaymentObligationContractApproval

type EthereumPaymentObligationContractApproval struct {
	Owner    common.Address
	Approved common.Address
	TokenId  *big.Int
	Raw      types.Log // Blockchain specific contextual infos
}

EthereumPaymentObligationContractApproval represents a Approval event raised by the EthereumPaymentObligationContract contract.

type EthereumPaymentObligationContractApprovalForAll

type EthereumPaymentObligationContractApprovalForAll struct {
	Owner    common.Address
	Operator common.Address
	Approved bool
	Raw      types.Log // Blockchain specific contextual infos
}

EthereumPaymentObligationContractApprovalForAll represents a ApprovalForAll event raised by the EthereumPaymentObligationContract contract.

type EthereumPaymentObligationContractApprovalForAllIterator

type EthereumPaymentObligationContractApprovalForAllIterator struct {
	Event *EthereumPaymentObligationContractApprovalForAll // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

EthereumPaymentObligationContractApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the EthereumPaymentObligationContract contract.

func (*EthereumPaymentObligationContractApprovalForAllIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*EthereumPaymentObligationContractApprovalForAllIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*EthereumPaymentObligationContractApprovalForAllIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type EthereumPaymentObligationContractApprovalIterator

type EthereumPaymentObligationContractApprovalIterator struct {
	Event *EthereumPaymentObligationContractApproval // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

EthereumPaymentObligationContractApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the EthereumPaymentObligationContract contract.

func (*EthereumPaymentObligationContractApprovalIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*EthereumPaymentObligationContractApprovalIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*EthereumPaymentObligationContractApprovalIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type EthereumPaymentObligationContractCaller

type EthereumPaymentObligationContractCaller struct {
	// contains filtered or unexported fields
}

EthereumPaymentObligationContractCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewEthereumPaymentObligationContractCaller

func NewEthereumPaymentObligationContractCaller(address common.Address, caller bind.ContractCaller) (*EthereumPaymentObligationContractCaller, error)

NewEthereumPaymentObligationContractCaller creates a new read-only instance of EthereumPaymentObligationContract, bound to a specific deployed contract.

func (*EthereumPaymentObligationContractCaller) AnchorRegistry

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) AnchorRegistry(opts *bind.CallOpts) (common.Address, error)

AnchorRegistry is a free data retrieval call binding the contract method 0x5a180c0a.

Solidity: function anchorRegistry() constant returns(address)

func (*EthereumPaymentObligationContractCaller) BalanceOf

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(uint256)

func (*EthereumPaymentObligationContractCaller) Exists

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) Exists(opts *bind.CallOpts, _tokenId *big.Int) (bool, error)

Exists is a free data retrieval call binding the contract method 0x4f558e79.

Solidity: function exists(_tokenId uint256) constant returns(bool)

func (*EthereumPaymentObligationContractCaller) GetApproved

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) GetApproved(opts *bind.CallOpts, _tokenId *big.Int) (common.Address, error)

GetApproved is a free data retrieval call binding the contract method 0x081812fc.

Solidity: function getApproved(_tokenId uint256) constant returns(address)

func (*EthereumPaymentObligationContractCaller) GetTokenDetails

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) GetTokenDetails(opts *bind.CallOpts, _tokenId *big.Int) (struct {
	GrossAmount  string
	Currency     string
	DueDate      string
	AnchorId     *big.Int
	DocumentRoot [32]byte
}, error)

GetTokenDetails is a free data retrieval call binding the contract method 0xc1e03728.

Solidity: function getTokenDetails(_tokenId uint256) constant returns(grossAmount string, currency string, dueDate string, anchorId uint256, documentRoot bytes32)

func (*EthereumPaymentObligationContractCaller) InterfaceIdERC165

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) InterfaceIdERC165(opts *bind.CallOpts) ([4]byte, error)

InterfaceIdERC165 is a free data retrieval call binding the contract method 0x19fa8f50.

Solidity: function InterfaceId_ERC165() constant returns(bytes4)

func (*EthereumPaymentObligationContractCaller) IsApprovedForAll

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) IsApprovedForAll(opts *bind.CallOpts, _owner common.Address, _operator common.Address) (bool, error)

IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5.

Solidity: function isApprovedForAll(_owner address, _operator address) constant returns(bool)

func (*EthereumPaymentObligationContractCaller) Name

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) Name(opts *bind.CallOpts) (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*EthereumPaymentObligationContractCaller) OwnerOf

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) OwnerOf(opts *bind.CallOpts, _tokenId *big.Int) (common.Address, error)

OwnerOf is a free data retrieval call binding the contract method 0x6352211e.

Solidity: function ownerOf(_tokenId uint256) constant returns(address)

func (*EthereumPaymentObligationContractCaller) SupportsInterface

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) SupportsInterface(opts *bind.CallOpts, _interfaceId [4]byte) (bool, error)

SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.

Solidity: function supportsInterface(_interfaceId bytes4) constant returns(bool)

func (*EthereumPaymentObligationContractCaller) Symbol

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) Symbol(opts *bind.CallOpts) (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*EthereumPaymentObligationContractCaller) TokenByIndex

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) TokenByIndex(opts *bind.CallOpts, _index *big.Int) (*big.Int, error)

TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.

Solidity: function tokenByIndex(_index uint256) constant returns(uint256)

func (*EthereumPaymentObligationContractCaller) TokenOfOwnerByIndex

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, _owner common.Address, _index *big.Int) (*big.Int, error)

TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.

Solidity: function tokenOfOwnerByIndex(_owner address, _index uint256) constant returns(uint256)

func (*EthereumPaymentObligationContractCaller) TokenURI

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) TokenURI(opts *bind.CallOpts, _tokenId *big.Int) (string, error)

TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.

Solidity: function tokenURI(_tokenId uint256) constant returns(string)

func (*EthereumPaymentObligationContractCaller) TotalSupply

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

type EthereumPaymentObligationContractCallerRaw

type EthereumPaymentObligationContractCallerRaw struct {
	Contract *EthereumPaymentObligationContractCaller // Generic read-only contract binding to access the raw methods on
}

EthereumPaymentObligationContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*EthereumPaymentObligationContractCallerRaw) Call

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type EthereumPaymentObligationContractCallerSession

type EthereumPaymentObligationContractCallerSession struct {
	Contract *EthereumPaymentObligationContractCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts                            // Call options to use throughout this session
}

EthereumPaymentObligationContractCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*EthereumPaymentObligationContractCallerSession) AnchorRegistry

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) AnchorRegistry() (common.Address, error)

AnchorRegistry is a free data retrieval call binding the contract method 0x5a180c0a.

Solidity: function anchorRegistry() constant returns(address)

func (*EthereumPaymentObligationContractCallerSession) BalanceOf

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(uint256)

func (*EthereumPaymentObligationContractCallerSession) Exists

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) Exists(_tokenId *big.Int) (bool, error)

Exists is a free data retrieval call binding the contract method 0x4f558e79.

Solidity: function exists(_tokenId uint256) constant returns(bool)

func (*EthereumPaymentObligationContractCallerSession) GetApproved

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) GetApproved(_tokenId *big.Int) (common.Address, error)

GetApproved is a free data retrieval call binding the contract method 0x081812fc.

Solidity: function getApproved(_tokenId uint256) constant returns(address)

func (*EthereumPaymentObligationContractCallerSession) GetTokenDetails

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) GetTokenDetails(_tokenId *big.Int) (struct {
	GrossAmount  string
	Currency     string
	DueDate      string
	AnchorId     *big.Int
	DocumentRoot [32]byte
}, error)

GetTokenDetails is a free data retrieval call binding the contract method 0xc1e03728.

Solidity: function getTokenDetails(_tokenId uint256) constant returns(grossAmount string, currency string, dueDate string, anchorId uint256, documentRoot bytes32)

func (*EthereumPaymentObligationContractCallerSession) InterfaceIdERC165

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) InterfaceIdERC165() ([4]byte, error)

InterfaceIdERC165 is a free data retrieval call binding the contract method 0x19fa8f50.

Solidity: function InterfaceId_ERC165() constant returns(bytes4)

func (*EthereumPaymentObligationContractCallerSession) IsApprovedForAll

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) IsApprovedForAll(_owner common.Address, _operator common.Address) (bool, error)

IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5.

Solidity: function isApprovedForAll(_owner address, _operator address) constant returns(bool)

func (*EthereumPaymentObligationContractCallerSession) Name

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*EthereumPaymentObligationContractCallerSession) OwnerOf

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) OwnerOf(_tokenId *big.Int) (common.Address, error)

OwnerOf is a free data retrieval call binding the contract method 0x6352211e.

Solidity: function ownerOf(_tokenId uint256) constant returns(address)

func (*EthereumPaymentObligationContractCallerSession) SupportsInterface

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) SupportsInterface(_interfaceId [4]byte) (bool, error)

SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.

Solidity: function supportsInterface(_interfaceId bytes4) constant returns(bool)

func (*EthereumPaymentObligationContractCallerSession) Symbol

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*EthereumPaymentObligationContractCallerSession) TokenByIndex

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) TokenByIndex(_index *big.Int) (*big.Int, error)

TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.

Solidity: function tokenByIndex(_index uint256) constant returns(uint256)

func (*EthereumPaymentObligationContractCallerSession) TokenOfOwnerByIndex

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) TokenOfOwnerByIndex(_owner common.Address, _index *big.Int) (*big.Int, error)

TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.

Solidity: function tokenOfOwnerByIndex(_owner address, _index uint256) constant returns(uint256)

func (*EthereumPaymentObligationContractCallerSession) TokenURI

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) TokenURI(_tokenId *big.Int) (string, error)

TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.

Solidity: function tokenURI(_tokenId uint256) constant returns(string)

func (*EthereumPaymentObligationContractCallerSession) TotalSupply

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractCallerSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

type EthereumPaymentObligationContractFilterer

type EthereumPaymentObligationContractFilterer struct {
	// contains filtered or unexported fields
}

EthereumPaymentObligationContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewEthereumPaymentObligationContractFilterer

func NewEthereumPaymentObligationContractFilterer(address common.Address, filterer bind.ContractFilterer) (*EthereumPaymentObligationContractFilterer, error)

NewEthereumPaymentObligationContractFilterer creates a new log filterer instance of EthereumPaymentObligationContract, bound to a specific deployed contract.

func (*EthereumPaymentObligationContractFilterer) FilterApproval

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractFilterer) FilterApproval(opts *bind.FilterOpts, _owner []common.Address, _approved []common.Address, _tokenId []*big.Int) (*EthereumPaymentObligationContractApprovalIterator, error)

FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: e Approval(_owner indexed address, _approved indexed address, _tokenId indexed uint256)

func (*EthereumPaymentObligationContractFilterer) FilterApprovalForAll

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractFilterer) FilterApprovalForAll(opts *bind.FilterOpts, _owner []common.Address, _operator []common.Address) (*EthereumPaymentObligationContractApprovalForAllIterator, error)

FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31.

Solidity: e ApprovalForAll(_owner indexed address, _operator indexed address, _approved bool)

func (*EthereumPaymentObligationContractFilterer) FilterPaymentObligationMinted

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractFilterer) FilterPaymentObligationMinted(opts *bind.FilterOpts) (*EthereumPaymentObligationContractPaymentObligationMintedIterator, error)

FilterPaymentObligationMinted is a free log retrieval operation binding the contract event 0xe2e4e975c4de5fbb1416db2c5ff8e2f4108bbfcdfd27a1a1eb03935cbfa3b8f9.

Solidity: e PaymentObligationMinted(to address, tokenId uint256, tokenURI string)

func (*EthereumPaymentObligationContractFilterer) FilterTransfer

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractFilterer) FilterTransfer(opts *bind.FilterOpts, _from []common.Address, _to []common.Address, _tokenId []*big.Int) (*EthereumPaymentObligationContractTransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: e Transfer(_from indexed address, _to indexed address, _tokenId indexed uint256)

func (*EthereumPaymentObligationContractFilterer) WatchApproval

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *EthereumPaymentObligationContractApproval, _owner []common.Address, _approved []common.Address, _tokenId []*big.Int) (event.Subscription, error)

WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: e Approval(_owner indexed address, _approved indexed address, _tokenId indexed uint256)

func (*EthereumPaymentObligationContractFilterer) WatchApprovalForAll

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *EthereumPaymentObligationContractApprovalForAll, _owner []common.Address, _operator []common.Address) (event.Subscription, error)

WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31.

Solidity: e ApprovalForAll(_owner indexed address, _operator indexed address, _approved bool)

func (*EthereumPaymentObligationContractFilterer) WatchPaymentObligationMinted

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractFilterer) WatchPaymentObligationMinted(opts *bind.WatchOpts, sink chan<- *EthereumPaymentObligationContractPaymentObligationMinted) (event.Subscription, error)

WatchPaymentObligationMinted is a free log subscription operation binding the contract event 0xe2e4e975c4de5fbb1416db2c5ff8e2f4108bbfcdfd27a1a1eb03935cbfa3b8f9.

Solidity: e PaymentObligationMinted(to address, tokenId uint256, tokenURI string)

func (*EthereumPaymentObligationContractFilterer) WatchTransfer

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *EthereumPaymentObligationContractTransfer, _from []common.Address, _to []common.Address, _tokenId []*big.Int) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: e Transfer(_from indexed address, _to indexed address, _tokenId indexed uint256)

type EthereumPaymentObligationContractPaymentObligationMinted

type EthereumPaymentObligationContractPaymentObligationMinted struct {
	To       common.Address
	TokenId  *big.Int
	TokenURI string
	Raw      types.Log // Blockchain specific contextual infos
}

EthereumPaymentObligationContractPaymentObligationMinted represents a PaymentObligationMinted event raised by the EthereumPaymentObligationContract contract.

type EthereumPaymentObligationContractPaymentObligationMintedIterator

type EthereumPaymentObligationContractPaymentObligationMintedIterator struct {
	Event *EthereumPaymentObligationContractPaymentObligationMinted // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

EthereumPaymentObligationContractPaymentObligationMintedIterator is returned from FilterPaymentObligationMinted and is used to iterate over the raw logs and unpacked data for PaymentObligationMinted events raised by the EthereumPaymentObligationContract contract.

func (*EthereumPaymentObligationContractPaymentObligationMintedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*EthereumPaymentObligationContractPaymentObligationMintedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*EthereumPaymentObligationContractPaymentObligationMintedIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type EthereumPaymentObligationContractRaw

type EthereumPaymentObligationContractRaw struct {
	Contract *EthereumPaymentObligationContract // Generic contract binding to access the raw methods on
}

EthereumPaymentObligationContractRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*EthereumPaymentObligationContractRaw) Call

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*EthereumPaymentObligationContractRaw) Transact

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*EthereumPaymentObligationContractRaw) Transfer

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type EthereumPaymentObligationContractSession

type EthereumPaymentObligationContractSession struct {
	Contract     *EthereumPaymentObligationContract // Generic contract binding to set the session for
	CallOpts     bind.CallOpts                      // Call options to use throughout this session
	TransactOpts bind.TransactOpts                  // Transaction auth options to use throughout this session
}

EthereumPaymentObligationContractSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*EthereumPaymentObligationContractSession) AnchorRegistry

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) AnchorRegistry() (common.Address, error)

AnchorRegistry is a free data retrieval call binding the contract method 0x5a180c0a.

Solidity: function anchorRegistry() constant returns(address)

func (*EthereumPaymentObligationContractSession) Approve

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) Approve(_to common.Address, _tokenId *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_to address, _tokenId uint256) returns()

func (*EthereumPaymentObligationContractSession) BalanceOf

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(uint256)

func (*EthereumPaymentObligationContractSession) Exists

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) Exists(_tokenId *big.Int) (bool, error)

Exists is a free data retrieval call binding the contract method 0x4f558e79.

Solidity: function exists(_tokenId uint256) constant returns(bool)

func (*EthereumPaymentObligationContractSession) GetApproved

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) GetApproved(_tokenId *big.Int) (common.Address, error)

GetApproved is a free data retrieval call binding the contract method 0x081812fc.

Solidity: function getApproved(_tokenId uint256) constant returns(address)

func (*EthereumPaymentObligationContractSession) GetTokenDetails

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) GetTokenDetails(_tokenId *big.Int) (struct {
	GrossAmount  string
	Currency     string
	DueDate      string
	AnchorId     *big.Int
	DocumentRoot [32]byte
}, error)

GetTokenDetails is a free data retrieval call binding the contract method 0xc1e03728.

Solidity: function getTokenDetails(_tokenId uint256) constant returns(grossAmount string, currency string, dueDate string, anchorId uint256, documentRoot bytes32)

func (*EthereumPaymentObligationContractSession) InterfaceIdERC165

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) InterfaceIdERC165() ([4]byte, error)

InterfaceIdERC165 is a free data retrieval call binding the contract method 0x19fa8f50.

Solidity: function InterfaceId_ERC165() constant returns(bytes4)

func (*EthereumPaymentObligationContractSession) IsApprovedForAll

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) IsApprovedForAll(_owner common.Address, _operator common.Address) (bool, error)

IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5.

Solidity: function isApprovedForAll(_owner address, _operator address) constant returns(bool)

func (*EthereumPaymentObligationContractSession) Mint

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) Mint(_to common.Address, _tokenId *big.Int, _tokenURI string, _anchorId *big.Int, _merkleRoot [32]byte, _collaboratorField string, _values [5]string, _salts [5][32]byte, _proofs [5][][32]byte) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0xcb40425f.

Solidity: function mint(_to address, _tokenId uint256, _tokenURI string, _anchorId uint256, _merkleRoot bytes32, _collaboratorField string, _values string[5], _salts bytes32[5], _proofs bytes32[][5]) returns()

func (*EthereumPaymentObligationContractSession) Name

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*EthereumPaymentObligationContractSession) OwnerOf

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) OwnerOf(_tokenId *big.Int) (common.Address, error)

OwnerOf is a free data retrieval call binding the contract method 0x6352211e.

Solidity: function ownerOf(_tokenId uint256) constant returns(address)

func (*EthereumPaymentObligationContractSession) SafeTransferFrom

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) SafeTransferFrom(_from common.Address, _to common.Address, _tokenId *big.Int, _data []byte) (*types.Transaction, error)

SafeTransferFrom is a paid mutator transaction binding the contract method 0xb88d4fde.

Solidity: function safeTransferFrom(_from address, _to address, _tokenId uint256, _data bytes) returns()

func (*EthereumPaymentObligationContractSession) SetApprovalForAll

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) SetApprovalForAll(_to common.Address, _approved bool) (*types.Transaction, error)

SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.

Solidity: function setApprovalForAll(_to address, _approved bool) returns()

func (*EthereumPaymentObligationContractSession) SupportsInterface

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) SupportsInterface(_interfaceId [4]byte) (bool, error)

SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.

Solidity: function supportsInterface(_interfaceId bytes4) constant returns(bool)

func (*EthereumPaymentObligationContractSession) Symbol

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*EthereumPaymentObligationContractSession) TokenByIndex

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) TokenByIndex(_index *big.Int) (*big.Int, error)

TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7.

Solidity: function tokenByIndex(_index uint256) constant returns(uint256)

func (*EthereumPaymentObligationContractSession) TokenOfOwnerByIndex

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) TokenOfOwnerByIndex(_owner common.Address, _index *big.Int) (*big.Int, error)

TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59.

Solidity: function tokenOfOwnerByIndex(_owner address, _index uint256) constant returns(uint256)

func (*EthereumPaymentObligationContractSession) TokenURI

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) TokenURI(_tokenId *big.Int) (string, error)

TokenURI is a free data retrieval call binding the contract method 0xc87b56dd.

Solidity: function tokenURI(_tokenId uint256) constant returns(string)

func (*EthereumPaymentObligationContractSession) TotalSupply

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

func (*EthereumPaymentObligationContractSession) TransferFrom

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractSession) TransferFrom(_from common.Address, _to common.Address, _tokenId *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _tokenId uint256) returns()

type EthereumPaymentObligationContractTransactor

type EthereumPaymentObligationContractTransactor struct {
	// contains filtered or unexported fields
}

EthereumPaymentObligationContractTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewEthereumPaymentObligationContractTransactor

func NewEthereumPaymentObligationContractTransactor(address common.Address, transactor bind.ContractTransactor) (*EthereumPaymentObligationContractTransactor, error)

NewEthereumPaymentObligationContractTransactor creates a new write-only instance of EthereumPaymentObligationContract, bound to a specific deployed contract.

func (*EthereumPaymentObligationContractTransactor) Approve

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactor) Approve(opts *bind.TransactOpts, _to common.Address, _tokenId *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_to address, _tokenId uint256) returns()

func (*EthereumPaymentObligationContractTransactor) Mint

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactor) Mint(opts *bind.TransactOpts, _to common.Address, _tokenId *big.Int, _tokenURI string, _anchorId *big.Int, _merkleRoot [32]byte, _collaboratorField string, _values [5]string, _salts [5][32]byte, _proofs [5][][32]byte) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0xcb40425f.

Solidity: function mint(_to address, _tokenId uint256, _tokenURI string, _anchorId uint256, _merkleRoot bytes32, _collaboratorField string, _values string[5], _salts bytes32[5], _proofs bytes32[][5]) returns()

func (*EthereumPaymentObligationContractTransactor) SafeTransferFrom

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactor) SafeTransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _tokenId *big.Int, _data []byte) (*types.Transaction, error)

SafeTransferFrom is a paid mutator transaction binding the contract method 0xb88d4fde.

Solidity: function safeTransferFrom(_from address, _to address, _tokenId uint256, _data bytes) returns()

func (*EthereumPaymentObligationContractTransactor) SetApprovalForAll

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactor) SetApprovalForAll(opts *bind.TransactOpts, _to common.Address, _approved bool) (*types.Transaction, error)

SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.

Solidity: function setApprovalForAll(_to address, _approved bool) returns()

func (*EthereumPaymentObligationContractTransactor) TransferFrom

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _tokenId *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _tokenId uint256) returns()

type EthereumPaymentObligationContractTransactorRaw

type EthereumPaymentObligationContractTransactorRaw struct {
	Contract *EthereumPaymentObligationContractTransactor // Generic write-only contract binding to access the raw methods on
}

EthereumPaymentObligationContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*EthereumPaymentObligationContractTransactorRaw) Transact

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*EthereumPaymentObligationContractTransactorRaw) Transfer

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type EthereumPaymentObligationContractTransactorSession

type EthereumPaymentObligationContractTransactorSession struct {
	Contract     *EthereumPaymentObligationContractTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts                            // Transaction auth options to use throughout this session
}

EthereumPaymentObligationContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*EthereumPaymentObligationContractTransactorSession) Approve

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactorSession) Approve(_to common.Address, _tokenId *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_to address, _tokenId uint256) returns()

func (*EthereumPaymentObligationContractTransactorSession) Mint

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactorSession) Mint(_to common.Address, _tokenId *big.Int, _tokenURI string, _anchorId *big.Int, _merkleRoot [32]byte, _collaboratorField string, _values [5]string, _salts [5][32]byte, _proofs [5][][32]byte) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0xcb40425f.

Solidity: function mint(_to address, _tokenId uint256, _tokenURI string, _anchorId uint256, _merkleRoot bytes32, _collaboratorField string, _values string[5], _salts bytes32[5], _proofs bytes32[][5]) returns()

func (*EthereumPaymentObligationContractTransactorSession) SafeTransferFrom

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactorSession) SafeTransferFrom(_from common.Address, _to common.Address, _tokenId *big.Int, _data []byte) (*types.Transaction, error)

SafeTransferFrom is a paid mutator transaction binding the contract method 0xb88d4fde.

Solidity: function safeTransferFrom(_from address, _to address, _tokenId uint256, _data bytes) returns()

func (*EthereumPaymentObligationContractTransactorSession) SetApprovalForAll

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactorSession) SetApprovalForAll(_to common.Address, _approved bool) (*types.Transaction, error)

SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465.

Solidity: function setApprovalForAll(_to address, _approved bool) returns()

func (*EthereumPaymentObligationContractTransactorSession) TransferFrom

func (_EthereumPaymentObligationContract *EthereumPaymentObligationContractTransactorSession) TransferFrom(_from common.Address, _to common.Address, _tokenId *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _tokenId uint256) returns()

type EthereumPaymentObligationContractTransfer

type EthereumPaymentObligationContractTransfer struct {
	From    common.Address
	To      common.Address
	TokenId *big.Int
	Raw     types.Log // Blockchain specific contextual infos
}

EthereumPaymentObligationContractTransfer represents a Transfer event raised by the EthereumPaymentObligationContract contract.

type EthereumPaymentObligationContractTransferIterator

type EthereumPaymentObligationContractTransferIterator struct {
	Event *EthereumPaymentObligationContractTransfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

EthereumPaymentObligationContractTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the EthereumPaymentObligationContract contract.

func (*EthereumPaymentObligationContractTransferIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*EthereumPaymentObligationContractTransferIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*EthereumPaymentObligationContractTransferIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type MintRequest

type MintRequest struct {

	// To is the address of the recipient of the minted token
	To common.Address

	// TokenID is the ID for the minted token
	TokenID *big.Int

	// TokenURI is the metadata uri
	TokenURI string

	// AnchorID is the ID of the document as identified by the set up anchorRepository.
	AnchorID *big.Int

	// MerkleRoot is the root hash of the merkle proof/doc
	MerkleRoot [32]byte

	//CollaboratorField contains the value of the collaborator leaf
	CollaboratorField string

	// Values are the values of the leafs that is being proved Will be converted to string and concatenated for proof verification as outlined in precise-proofs library.
	Values [amountOfProofs]string

	// salts are the salts for the field that is being proved Will be concatenated for proof verification as outlined in precise-proofs library.
	Salts [amountOfProofs][32]byte

	// Proofs are the documents proofs that are needed
	Proofs [amountOfProofs][][32]byte
}

MintRequest holds the data needed to mint and NFT from a Centrifuge document

func NewMintRequest

func NewMintRequest(to common.Address, anchorID anchors.AnchorID, proofs []*proofspb.Proof, rootHash [32]byte, collaboratorField string) (*MintRequest, error)

NewMintRequest converts the parameters and returns a struct with needed parameter for minting

type PaymentObligation

type PaymentObligation interface {

	// MintNFT mints an NFT
	MintNFT(documentID []byte, registryAddress, depositAddress string, proofFields []string) (<-chan *watchTokenMinted, error)
}

PaymentObligation handles transactions related to minting of NFTs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL