TelegramCloudStorageStamper
Class: TelegramCloudStorageStamper
Defined in: telegram-cloud-storage-stamper/src/index.ts:31
Stamper to use within a TurnkeyClient
Constructors
Constructor
new TelegramCloudStorageStamper():
TelegramCloudStorageStamper
Defined in: telegram-cloud-storage-stamper/src/index.ts:36
Returns
TelegramCloudStorageStamper
Properties
stamper?
optional
stamper:ApiKeyStamper
Defined in: telegram-cloud-storage-stamper/src/index.ts:33
Methods
checkTelegramContext()
checkTelegramContext():
void
Defined in: telegram-cloud-storage-stamper/src/index.ts:151
Returns
void
clearItem()
clearItem(
key
):Promise
<void
>
Defined in: telegram-cloud-storage-stamper/src/index.ts:244
Parameters
key
string
Returns
Promise
<void
>
getAPIKey()
getAPIKey(
key
):Promise
<null
|CloudStorageAPIKey
>
Defined in: telegram-cloud-storage-stamper/src/index.ts:135
Parameters
key
string
= DEFAULT_TURNKEY_CLOUD_STORAGE_KEY
Returns
Promise
<null
| CloudStorageAPIKey
>
getItem()
getItem(
key
):Promise
<string
>
Defined in: telegram-cloud-storage-stamper/src/index.ts:193
Parameters
key
string
Returns
Promise
<string
>
insertAPIKey()
insertAPIKey(
apiPublicKey
,apiPrivateKey
,key
):Promise
<void
>
Defined in: telegram-cloud-storage-stamper/src/index.ts:124
Parameters
apiPublicKey
string
apiPrivateKey
string
key
string
= DEFAULT_TURNKEY_CLOUD_STORAGE_KEY
Returns
Promise
<void
>
isCloudStorageAPIKey()
isCloudStorageAPIKey(
apiKey
):boolean
Defined in: telegram-cloud-storage-stamper/src/index.ts:186
Parameters
apiKey
Returns
boolean
parseAPIKey()
parseAPIKey(
apiKey
):null
| {apiPrivateKey
:any
;apiPublicKey
:any
; }
Defined in: telegram-cloud-storage-stamper/src/index.ts:166
Parameters
apiKey
string
Returns
null
| { apiPrivateKey
: any
; apiPublicKey
: any
; }
setItem()
setItem(
key
,value
):Promise
<void
>
Defined in: telegram-cloud-storage-stamper/src/index.ts:214
Parameters
key
string
value
string
Returns
Promise
<void
>
setSigningKey()
setSigningKey(
config
?):Promise
<void
>
Defined in: telegram-cloud-storage-stamper/src/index.ts:65
Parameters
config?
TTelegramCloudStorageStamperConfig
Returns
Promise
<void
>
stamp()
stamp(
payload
):Promise
<{stampHeaderName
:string
;stampHeaderValue
:string
; }>
Defined in: telegram-cloud-storage-stamper/src/index.ts:50
Parameters
payload
string
Returns
Promise
<{ stampHeaderName
: string
; stampHeaderValue
: string
; }>
stringifyAPIKey()
stringifyAPIKey(
apiPublicKey
,apiPrivateKey
):string
Defined in: telegram-cloud-storage-stamper/src/index.ts:159
Parameters
apiPublicKey
string
apiPrivateKey
string
Returns
string
create()
static
create(config
?):Promise
<TelegramCloudStorageStamper
>
Defined in: telegram-cloud-storage-stamper/src/index.ts:42
Parameters
config?
TTelegramCloudStorageStamperConfig
Returns
Promise
<TelegramCloudStorageStamper
>