GramIO API Reference / @gramio/callback-data/dist
@gramio/callback-data/dist
Classes
| Class | Description |
|---|---|
| CallbackData | Class-helper that construct schema and serialize/deserialize with CallbackData.pack and CallbackData.unpack methods |
Type Aliases
| Type Alias | Description |
|---|---|
| InferDataPack | - |
| InferDataUnpack | - |
| SafeUnpackResult | - |
Functions
decode()
decode(
suffix):string
Defined in: callback-data/index.d.ts:67
Decode an invisible suffix created by encode.
Parameters
| Parameter | Type |
|---|---|
suffix | string |
Returns
string
embed()
embed(
visible,data):string
Defined in: callback-data/index.d.ts:69
Append an invisible payload to human-visible text.
Parameters
| Parameter | Type |
|---|---|
visible | string |
data | string |
Returns
string
encode()
encode(
data):string
Defined in: callback-data/index.d.ts:65
Encode a string as an invisible base-16 UTF-8 suffix.
Parameters
| Parameter | Type |
|---|---|
data | string |
Returns
string
extract()
extract(
text):object
Defined in: callback-data/index.d.ts:71
Extract a trailing invisible payload and the human-visible text.
Parameters
| Parameter | Type |
|---|---|
text | string |
Returns
object
| Name | Type | Defined in |
|---|---|---|
data | string | callback-data/index.d.ts:73 |
visible | string | callback-data/index.d.ts:72 |