powcodev / scrypt / GithubIssueWorkContract
scrypt.GithubIssueWorkContract
-
SmartContract
↳
GithubIssueWorkContract
- _provider
- _signer
- arbiterPubkey
- contracteePubkey
- contractorPubkey
- ctx
- githubIssueId
- githubOrg
- githubRepo
- platformPubkey
- buildDeployTransaction
- buildStateOutput
- checkPreimage
- checkPreimageAdvanced
- checkPreimageSigHashType
- clone
- connect
- deploy
- genLaunchConfig
- getCtxMethods
- getStateScript
- getUnlockingScript
- markAsGenesis
- next
- setDataPartInASM
- setDataPartInHex
- updateState
- updateStateSigHashType
- verify
- compile
- findKeyIndex
- loadArtifact
• new GithubIssueWorkContract(«destructured»
)
Name | Type |
---|---|
«destructured» |
Object |
› arbiterPubkey |
Ripemd160 |
› contracteePubkey |
Ripemd160 |
› contractorPubkey |
Ripemd160 |
› githubIssueId |
number |
› githubOrg |
string |
› githubRepo |
string |
› platformPubkey |
Ripemd160 |
SmartContract.constructor
src/scrypt/contracts/GithubIssueWorkContract.ts:16
• Optional
_provider: Provider
SmartContract._provider
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:142
• Optional
_signer: Signer
SmartContract._signer
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:143
• Readonly
arbiterPubkey: Ripemd160
src/scrypt/contracts/GithubIssueWorkContract.ts:10
• Readonly
contracteePubkey: Ripemd160
src/scrypt/contracts/GithubIssueWorkContract.ts:9
• Readonly
contractorPubkey: Ripemd160
src/scrypt/contracts/GithubIssueWorkContract.ts:8
• Optional
ctx: ScriptContext
SmartContract.ctx
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:90
• Readonly
githubIssueId: number
src/scrypt/contracts/GithubIssueWorkContract.ts:14
• Readonly
githubOrg: string
src/scrypt/contracts/GithubIssueWorkContract.ts:12
• Readonly
githubRepo: string
src/scrypt/contracts/GithubIssueWorkContract.ts:13
• Readonly
platformPubkey: Ripemd160
src/scrypt/contracts/GithubIssueWorkContract.ts:11
• get
codePart(): string
string
SmartContract.codePart
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:106
• get
dataPart(): undefined
| Script
undefined
| Script
SmartContract.dataPart
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:135
• get
debug(): DebugFunctions
DebugFunctions
SmartContract.debug
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:154
• get
lockTo(): undefined
| TxOutputRef
undefined
| TxOutputRef
SmartContract.lockTo
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:140
• set
lockTo(ref
): void
Name | Type |
---|---|
ref |
TxOutputRef |
void
SmartContract.lockTo
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:141
• get
lockingScript(): Script
Script
SmartContract.lockingScript
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:105
• get
provider(): undefined
| Provider
undefined
| Provider
SmartContract.provider
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:146
• get
signer(): Signer
Signer
SmartContract.signer
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:145
• get
unlockFrom(): undefined
| TxInputRef
undefined
| TxInputRef
SmartContract.unlockFrom
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:139
• set
unlockFrom(ref
): void
Name | Type |
---|---|
ref |
TxInputRef |
void
SmartContract.unlockFrom
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:138
▸ buildDeployTransaction(utxos
, amount
, changeAddress?
): Transaction
Name | Type |
---|---|
utxos |
IUnspentOutput [] |
amount |
number |
changeAddress? |
string | Address |
Transaction
SmartContract.buildDeployTransaction
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:147
▸ buildStateOutput(amount
): Bytes
Name | Type |
---|---|
amount |
bigint |
Bytes
SmartContract.buildStateOutput
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:111
▸ checkPreimage(txPreimage
): boolean
Name | Type |
---|---|
txPreimage |
SigHashPreimage |
boolean
SmartContract.checkPreimage
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:121
▸ checkPreimageAdvanced(txPreimage
, privKey
, pubKey
, inverseK
, r
, rBigEndian
, sigHashType
): boolean
Name | Type |
---|---|
txPreimage |
SigHashPreimage |
privKey |
PrivKey |
pubKey |
PubKey |
inverseK |
bigint |
r |
bigint |
rBigEndian |
string |
sigHashType |
SigHashType |
boolean
SmartContract.checkPreimageAdvanced
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:119
▸ checkPreimageSigHashType(txPreimage
, sigHashType
): boolean
Name | Type |
---|---|
txPreimage |
SigHashPreimage |
sigHashType |
SigHashType |
boolean
SmartContract.checkPreimageSigHashType
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:120
▸ clone(): GithubIssueWorkContract
SmartContract.clone
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:107
▸ connect(providerOrSigner
): void
Name | Type |
---|---|
providerOrSigner |
Provider | Signer |
void
SmartContract.connect
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:144
▸ deploy(amount?
, options?
): Promise
<TransactionResponse
>
Name | Type |
---|---|
amount? |
number |
options? |
Object |
options.address? |
string | Address |
options.changeAddress? |
string | Address |
Promise
<TransactionResponse
>
SmartContract.deploy
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:148
▸ genLaunchConfig(a
, tx
, inputIndex?
): string
Name | Type |
---|---|
a |
any |
tx |
Transaction |
inputIndex? |
number |
string
SmartContract.genLaunchConfig
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:103
▸ getCtxMethods(): string
[]
string
[]
SmartContract.getCtxMethods
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:98
▸ getStateScript(): Bytes
Bytes
SmartContract.getStateScript
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:112
▸ getUnlockingScript<T
>(callPub
): SamePromiseOrValue
<T
, Script
>
Name | Type |
---|---|
T |
extends void | Promise <void > |
Name | Type |
---|---|
callPub |
(self : GithubIssueWorkContract ) => T |
SamePromiseOrValue
<T
, Script
>
SmartContract.getUnlockingScript
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:102
▸ markAsGenesis(): GithubIssueWorkContract
SmartContract.markAsGenesis
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:109
▸ next(): GithubIssueWorkContract
SmartContract.next
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:108
▸ setDataPartInASM(dataPart
): void
Name | Type |
---|---|
dataPart |
string |
void
SmartContract.setDataPartInASM
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:133
▸ setDataPartInHex(dataPart
): void
Name | Type |
---|---|
dataPart |
string |
void
SmartContract.setDataPartInHex
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:134
▸ updateState(preimage
, amount
): boolean
Name | Type |
---|---|
preimage |
SigHashPreimage |
amount |
bigint |
boolean
SmartContract.updateState
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:128
▸ updateStateSigHashType(txPreimage
, amount
, sigHashType
): boolean
Name | Type |
---|---|
txPreimage |
SigHashPreimage |
amount |
bigint |
sigHashType |
SigHashType |
boolean
SmartContract.updateStateSigHashType
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:110
▸ verify<T
>(entryMethodInvoking
): SamePromiseOrValue
<T
, VerifyResult
>
Name | Type |
---|---|
T |
extends void | Promise <void > |
Name | Type |
---|---|
entryMethodInvoking |
(self : GithubIssueWorkContract ) => T |
SamePromiseOrValue
<T
, VerifyResult
>
SmartContract.verify
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:101
▸ Static
compile(): Promise
<undefined
| TranspileError
[]>
Promise
<undefined
| TranspileError
[]>
SmartContract.compile
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:93
▸ Static
findKeyIndex(collection
, key
, keyType?
): bigint
Name | Type |
---|---|
collection |
Map <SupportedParamType , SupportedParamType > | Set <SupportedParamType > |
key |
SupportedParamType |
keyType? |
string |
bigint
SmartContract.findKeyIndex
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:152
▸ Static
loadArtifact(artifact
): void
Name | Type |
---|---|
artifact |
ContractArtifact |
void
SmartContract.loadArtifact
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:94
▸ checkMultiSig(signatures
, publickeys
): boolean
Compares the first signature against each public key until it finds an ECDSA match. Starting with the subsequent public key, it compares the second signature against each remaining public key until it finds an ECDSA match. The process is repeated until all signatures have been checked or not enough public keys remain to produce a successful result. All signatures need to match a public key. Because public keys are not checked again if they fail any signature comparison, signatures must be placed in the scriptSig using the same order as their corresponding public keys were placed in the scriptPubKey or redeemScript. If all signatures are valid, 1 is returned, 0 otherwise. Due to a bug, one extra unused value is removed from the stack.
See
https://wiki.bitcoinsv.io/index.php/Opcodes_used_in_Bitcoin_Script
Name | Type |
---|---|
signatures |
Sig [] |
publickeys |
PubKey [] |
boolean
SmartContract.checkMultiSig
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:127
▸ checkSig(signature
, publickey
): boolean
verifies an ECDSA signature. It takes two inputs from the stack, a public key (on top of the stack) and an ECDSA signature in its DER_CANONISED format concatenated with sighash flags. It outputs true or false on the stack based on whether the signature check passes or fails.
See
https://wiki.bitcoinsv.io/index.php/Opcodes_used_in_Bitcoin_Script
Name | Type |
---|---|
signature |
Sig |
publickey |
PubKey |
boolean
SmartContract.checkSig
node_modules/scrypt-ts/dist/smart-contract/contract.d.ts:118