transaction

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 5 Imported by: 4

Documentation

Overview

Package transaction implements CKB transaction signing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Key     *secp256k1.Secp256k1Key
	Payload interface{}
}

Context is user provided information for `signer.TransactionSigner.SignTransaction`. In turn the context is passed to `signer.ScriptSigner.SignTransaction`.

See more in github.com/nervosnetwork/ckb-sdk-go/v2/transaction/signer

func NewContext

func NewContext(ecPrivateKey string) (*Context, error)

func NewContextWithPayload

func NewContextWithPayload(ecPrivateKey string, payload interface{}) (*Context, error)

type ScriptGroup

type ScriptGroup struct {
	Script        *types.Script    `json:"script"`
	GroupType     types.ScriptType `json:"group_type"`
	InputIndices  []uint32         `json:"input_indices"`
	OutputIndices []uint32         `json:"output_indices"`
}

func (*ScriptGroup) UnmarshalJSON

func (r *ScriptGroup) UnmarshalJSON(input []byte) error

type TransactionWithScriptGroups

type TransactionWithScriptGroups struct {
	TxView       *types.Transaction `json:"tx_view"`
	ScriptGroups []*ScriptGroup     `json:"script_groups"`
}

Directories

Path Synopsis
Package signer implements a CKB transaction signing framework.
Package signer implements a CKB transaction signing framework.

Jump to

Keyboard shortcuts

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