Skip to content

Commit

Permalink
Update reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
scrypt committed Sep 21, 2023
1 parent 7f83525 commit 87c087e
Show file tree
Hide file tree
Showing 9 changed files with 217 additions and 99 deletions.
163 changes: 115 additions & 48 deletions docs/reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ scrypt-ts
- [filterUTXO](README.md#filterutxo)
- [findSig](README.md#findsig)
- [findSigs](README.md#findsigs)
- [fromByteString](README.md#frombytestring)
- [getDummyP2pkhUTXOs](README.md#getdummyp2pkhutxos)
- [getDummySig](README.md#getdummysig)
- [getRandomAddress](README.md#getrandomaddress)
Expand Down Expand Up @@ -225,21 +226,23 @@ let bbb: FixedArray<FixedArray<FixedArray<bigint, 1>, 2>, 3> = [[[1n], [1n]], [[

#### Defined in

dist/smart-contract/builtins/types.d.ts:62
dist/smart-contract/builtins/types.d.ts:118

___

## Other Type Aliases

### Addr

Ƭ **Addr**: [`PubKeyHash`](README.md#pubkeyhash)
Ƭ **Addr**: `_PubKeyHash`

A domain specific subtype of `ByteString`, representing an address.

#### Defined in

dist/smart-contract/builtins/types.d.ts:29
dist/smart-contract/builtins/types.d.ts:75

dist/smart-contract/builtins/types.d.ts:22
dist/smart-contract/builtins/types.d.ts:37

___

Expand Down Expand Up @@ -271,7 +274,7 @@ a ByteString represents a byte array.

#### Defined in

dist/smart-contract/builtins/types.d.ts:33
dist/smart-contract/builtins/types.d.ts:89

___

Expand Down Expand Up @@ -343,23 +346,27 @@ ___

Ƭ **PubKey**: `_PubKey`

A domain specific subtype of `ByteString`, representing a public key.

#### Defined in

dist/smart-contract/builtins/types.d.ts:25
dist/smart-contract/builtins/types.d.ts:51

dist/smart-contract/builtins/types.d.ts:18
dist/smart-contract/builtins/types.d.ts:21

___

### PubKeyHash

Ƭ **PubKeyHash**: `_PubKeyHash`

A domain specific subtype of `ByteString`, representing an address.

#### Defined in

dist/smart-contract/builtins/types.d.ts:28
dist/smart-contract/builtins/types.d.ts:69

dist/smart-contract/builtins/types.d.ts:21
dist/smart-contract/builtins/types.d.ts:33

___

Expand Down Expand Up @@ -397,47 +404,55 @@ ___

Ƭ **Ripemd160**: `_Ripemd160`

A domain specific subtype of `ByteString`, representing a RIPEMD-160 hash.

#### Defined in

dist/smart-contract/builtins/types.d.ts:27
dist/smart-contract/builtins/types.d.ts:63

dist/smart-contract/builtins/types.d.ts:20
dist/smart-contract/builtins/types.d.ts:29

___

### Sha1

Ƭ **Sha1**: `_Sha1`

A domain specific subtype of `ByteString`, representing a SHA-1 hash.

#### Defined in

dist/smart-contract/builtins/types.d.ts:30
dist/smart-contract/builtins/types.d.ts:81

dist/smart-contract/builtins/types.d.ts:24
dist/smart-contract/builtins/types.d.ts:45

___

### Sha256

Ƭ **Sha256**: `_Sha256`

A domain specific subtype of `ByteString`, representing a SHA-256 hash.

#### Defined in

dist/smart-contract/builtins/types.d.ts:31
dist/smart-contract/builtins/types.d.ts:87

dist/smart-contract/builtins/types.d.ts:23
dist/smart-contract/builtins/types.d.ts:41

___

### Sig

Ƭ **Sig**: `_Sig`

A domain specific subtype of `ByteString`, representing a signature.

#### Defined in

dist/smart-contract/builtins/types.d.ts:26
dist/smart-contract/builtins/types.d.ts:57

dist/smart-contract/builtins/types.d.ts:19
dist/smart-contract/builtins/types.d.ts:25

___

Expand Down Expand Up @@ -533,7 +548,7 @@ The auto keyword specifies that the type of the variable, of basic type, declare

#### Defined in

dist/smart-contract/builtins/types.d.ts:46
dist/smart-contract/builtins/types.d.ts:102

## Variables

Expand Down Expand Up @@ -732,7 +747,7 @@ returns true if equal; otherwise returns false

#### Defined in

dist/smart-contract/builtins/types.d.ts:68
dist/smart-contract/builtins/types.d.ts:124

___

Expand Down Expand Up @@ -1001,19 +1016,23 @@ ___

**Addr**(`b`): [`Addr`](README.md#addr)

Creates an `Addr` instance from a `ByteString`.

#### Parameters

| Name | Type |
| :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) | Input ByteString. |

#### Returns

[`Addr`](README.md#addr)

- A domain specific address representation.

#### Defined in

dist/smart-contract/builtins/types.d.ts:29
dist/smart-contract/builtins/types.d.ts:75

___

Expand Down Expand Up @@ -1061,119 +1080,143 @@ ___

**PubKey**(`b`): [`PubKey`](README.md#pubkey)

Creates a `PubKey` instance from a `ByteString`.

#### Parameters

| Name | Type |
| :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) | Input ByteString. |

#### Returns

[`PubKey`](README.md#pubkey)

- A domain specific public key representation.

#### Defined in

dist/smart-contract/builtins/types.d.ts:25
dist/smart-contract/builtins/types.d.ts:51

___

### PubKeyHash

**PubKeyHash**(`b`): [`PubKeyHash`](README.md#pubkeyhash)

Creates a `PubKeyHash` instance from a `ByteString`.

#### Parameters

| Name | Type |
| :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) | Input ByteString. |

#### Returns

[`PubKeyHash`](README.md#pubkeyhash)

- A domain specific address representation.

#### Defined in

dist/smart-contract/builtins/types.d.ts:28
dist/smart-contract/builtins/types.d.ts:69

___

### Ripemd160

**Ripemd160**(`b`): [`Ripemd160`](README.md#ripemd160)

Creates a `Ripemd160` instance from a `ByteString`.

#### Parameters

| Name | Type |
| :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) | Input ByteString. |

#### Returns

[`Ripemd160`](README.md#ripemd160)

- A domain specific RIPEMD-160 hash representation.

#### Defined in

dist/smart-contract/builtins/types.d.ts:27
dist/smart-contract/builtins/types.d.ts:63

___

### Sha1

**Sha1**(`b`): [`Sha1`](README.md#sha1)

Creates a `Sha1` instance from a `ByteString`.

#### Parameters

| Name | Type |
| :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) | Input ByteString. |

#### Returns

[`Sha1`](README.md#sha1)

- A domain specific SHA-1 hash representation.

#### Defined in

dist/smart-contract/builtins/types.d.ts:30
dist/smart-contract/builtins/types.d.ts:81

___

### Sha256

**Sha256**(`b`): [`Sha256`](README.md#sha256)

Creates a `Sha256` instance from a `ByteString`.

#### Parameters

| Name | Type |
| :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) | Input ByteString. |

#### Returns

[`Sha256`](README.md#sha256)

- A domain specific SHA-256 hash representation.

#### Defined in

dist/smart-contract/builtins/types.d.ts:31
dist/smart-contract/builtins/types.d.ts:87

___

### Sig

**Sig**(`b`): [`Sig`](README.md#sig)

Creates a `Sig` instance from a `ByteString`.

#### Parameters

| Name | Type |
| :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `b` | [`ByteString`](README.md#bytestring) | Input ByteString. |

#### Returns

[`Sig`](README.md#sig)

- A domain specific digital signature representation.

#### Defined in

dist/smart-contract/builtins/types.d.ts:26
dist/smart-contract/builtins/types.d.ts:57

___

Expand Down Expand Up @@ -1415,6 +1458,30 @@ dist/smart-contract/utils/index.d.ts:8

___

### fromByteString

**fromByteString**(`bs`): `string`

convert ByteString to utf8 string

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `bs` | [`ByteString`](README.md#bytestring) | ByteString |

#### Returns

`string`

utf8 string

#### Defined in

dist/smart-contract/utils/index.d.ts:18

___

### getDummyP2pkhUTXOs

**getDummyP2pkhUTXOs**(`count?`): [`UTXO`](README.md#utxo)[]
Expand Down Expand Up @@ -1666,7 +1733,7 @@ Otherwise, `literal` should be in the format of utf8 literal, i.e. `hello world`

#### Defined in

dist/smart-contract/builtins/types.d.ts:41
dist/smart-contract/builtins/types.d.ts:97

___

Expand Down
Loading

0 comments on commit 87c087e

Please sign in to comment.