Skip to content

Conversation

@chenyukang
Copy link
Contributor

Type OutputsValidator

Transaction output validators that prevent common mistakes.

It's an enum value from one of:

# @param key [CKB::Key | String] Key or private key hex string
# @param fee [Integer] transaction fee, in shannon
def send_capacity(target_address, capacity, data = "0x", key: nil, fee: 0, outputs_validator: "default", from_block_number: 0)
def send_capacity(target_address, capacity, data = "0x", key: nil, fee: 0, outputs_validator: "passthrough", from_block_number: 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is safer to set the default value of outputs_validator to 'default'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CKB provides two built-in validators, well_known_scripts_only and passthrough. When no validator is specified, well_known_scripts_only is used.

you means set well_known_scripts_only to be default?
now outputs_validator: "default" will report an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants