Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 91a4122

Browse files
authored
Signature Scope & WitnessRule (#1368)
1 parent 614030e commit 91a4122

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/en-us/basic/concept/transaction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The version allows the transaction structure to be updated to make it backward c
2626

2727
The first field is the script hash of the transaction sender account. Since UTXO model has been deprecated in Neo N3 and the native assets NEO and GAS turned into NEP-17 assets, the input and outputs fields are no longer recorded in the transaction structure, instead, the `sender` is used to track the sender of the transaction.
2828

29-
The rest fields are used to define the effective scope of signature. When checkwitness is used for transaction verification, cosigners except the transaction sender need to define the scope of their signature. See [Scopes](Scopes) for details.
29+
The rest fields are used to define the effective scope of signature. When checkwitness is used for transaction verification, cosigners except the transaction sender need to define the scope of their signature. See [Signature Scope](#Signature Scope) for details.
3030

3131
| Field | Description | Type |
3232
| ------------------ | ------------------------------------------------------------ | ---------------- |
@@ -164,7 +164,7 @@ When constructing a transaction, you need to specify the field `scopes` in `sign
164164
| 0x10 | `CustomContracts` | The signature is only effective to the specified contract script. It can be used in conjunction with CalledByEntry. |
165165
| 0x20 | `CustomGroups` | The signature is effective to contracts in the group. It can be used in conjunction with CalledByEntry. |
166166
| 0x80 | `Global` | The signature is globally effective. The risk is extremely high because the contract may transfer all assets in the address. Only choose it when the contract is extremely trusted. |
167-
| 0x40 | `WitnessRules` | You need to specify the rule and scope. See [WitnessRule](WitnessRule) |
167+
| 0x40 | `WitnessRules` | You need to specify the rule and scope. See [WitnessRule](#WitnessRule) |
168168

169169
For better understanding, suppose there is a contract invocation chain: **[entry]->[Contract A]->[Contract B]->[Contract C]...->[Target]**
170170

docs/zh-cn/basic/concept/transaction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ version属性允许对交易结构进行更新,使其具有向后兼容性。
2323
### signers
2424
signers中的第一个字段为交易发起账户的地址哈希。由于Neo N3弃用了UTXO模型,仅保留有账户余额模型,原生资产NEO和GAS的转账交易统一为NEP-17资产操作方式,因此交易结构中不再记录inputs和outputs字段,通过signers字段来跟踪交易的发送方。
2525

26-
signers中余下的字段定义了签名的作用范围。当 checkwitness 用于交易验证时,除交易发送者 sender 外,其他的 signers 都需要定义其签名的作用范围。详情请参见 [签名作用域](#signature-scope)
26+
signers中余下的字段定义了签名的作用范围。当 checkwitness 用于交易验证时,除交易发送者 sender 外,其他的 signers 都需要定义其签名的作用范围。详情请参见 [签名作用域](#签名作用域)
2727

2828
| 字段 | 说明| 类型|
2929
|--------------|------------------| --|
@@ -152,7 +152,7 @@ witnesses属性用于验证交易的有效性和完整性。Witness即“见证
152152
| 0x10 | `CustomContracts` | 自定义合约,在指定的合约中可以使用该签名。可与 CalledByEntry 配合使用。 |
153153
| 0x20 | `CustomGroups` | 自定义合约组,在指定的合约组中可以使用该签名。可与 CalledByEntry 配合使用。 |
154154
| 0x80 | `Global` | 签名全局有效,所有合约均可使用签名。风险极高,合约有可能会转移地址中的所有资产,仅在极其信任该合约时选择。 |
155-
| 0x40 | `WitnessRules` | 用户自己指定验签规则和范围,参见下节说明。 |
155+
| 0x40 | `WitnessRules` | 用户自己指定验签规则和范围,参见[WitnessRule](#WitnessRule) |
156156

157157
为了更好地说明各类型,我们假设一条合约调用链为: **[entry]->[合约A]->[合约B]->[合约C]...->[Target]**
158158

0 commit comments

Comments
 (0)