Defined in: index.ts:129
Stamper to use with @turnkey/http
’s TurnkeyClient
Creating a stamper inserts an iframe in the current page.
new IframeStamper(
config
):IframeStamper
Defined in: index.ts:142
Creates a new iframe stamper. This function does not insert the iframe in the DOM.
Call .init()
to insert the iframe element in the DOM.
IframeStamper
container:
HTMLElement
Defined in: index.ts:130
iframe:
HTMLIFrameElement
Defined in: index.ts:131
iframeOrigin:
string
Defined in: index.ts:132
iframePublicKey:
null
|string
Defined in: index.ts:133
messageChannel:
MessageChannel
Defined in: index.ts:134
applySettings(
settings
):Promise
<boolean
>
Defined in: index.ts:451
Function to apply settings on allowed parameters in the iframe This is used to style the HTML element used for plaintext in wallet and private key import.
Promise
<boolean
>
clear():
void
Defined in: index.ts:276
Removes the iframe from the DOM
void
clearEmbeddedKey():
Promise
<null
>
Defined in: index.ts:306
Clears the embedded key within an iframe.
Promise
<null
>
extractKeyEncryptedBundle(
keyFormat
?):Promise
<string
>
Defined in: index.ts:440
Function to extract an encrypted bundle from the iframe The bundle should be encrypted to Turnkey’s Signer enclave’s initial public key Encryption should be performed with HPKE (RFC 9180). The key format to encode the private key in before it’s encrypted and imported: HEXADECIMAL or SOLANA. Defaults to HEXADECIMAL. This is used during the private key import flow.
Promise
<string
>
extractWalletEncryptedBundle():
Promise
<string
>
Defined in: index.ts:427
Function to extract an encrypted bundle from the iframe The bundle should be encrypted to Turnkey’s Signer enclave’s initial public key Encryption should be performed with HPKE (RFC 9180). This is used during the wallet import flow.
Promise
<string
>
getEmbeddedPublicKey():
Promise
<null
|string
>
Defined in: index.ts:294
Returns the public key, or null
if the underlying iframe isn’t properly initialized.
This differs from the above in that it reaches out to the live iframe to see if an embedded key exists.
Promise
<null
| string
>
init(
dangerouslyOverrideIframeKeyTtl
?):Promise
<string
>
Defined in: index.ts:234
Inserts the iframe on the page and returns a promise resolving to the iframe’s public key
number
Optional TTL override for the iframe’s embedded key (default 48 hours). Only use this if you are intentional about the security implications.
Promise
<string
>
initEmbeddedKey():
Promise
<null
|string
>
Defined in: index.ts:319
Creates a new embedded key within an iframe. If an embedded key already exists, this will return it.
This is primarily to be used in conjunction with clearEmbeddedKey()
: after an embedded key is cleared,
this can be used to create a new one.
Promise
<null
| string
>
the newly created embedded public key.
injectCredentialBundle(
bundle
):Promise
<boolean
>
Defined in: index.ts:361
Function to inject a new credential into the iframe The bundle should be encrypted to the iframe’s initial public key Encryption should be performed with HPKE (RFC 9180). This is used during recovery and auth flows.
string
Promise
<boolean
>
injectImportBundle(
bundle
,organizationId
,userId
):Promise
<boolean
>
Defined in: index.ts:409
Function to inject an import bundle into the iframe This is used to initiate either the wallet import flow or the private key import flow.
string
string
string
Promise
<boolean
>
injectKeyExportBundle(
bundle
,organizationId
,keyFormat
?):Promise
<boolean
>
Defined in: index.ts:374
Function to inject an export bundle into the iframe The bundle should be encrypted to the iframe’s initial public key Encryption should be performed with HPKE (RFC 9180). The key format to encode the private key in after it’s exported and decrypted: HEXADECIMAL or SOLANA. Defaults to HEXADECIMAL. This is used during the private key export flow.
string
string
Promise
<boolean
>
injectWalletExportBundle(
bundle
,organizationId
):Promise
<boolean
>
Defined in: index.ts:392
Function to inject an export bundle into the iframe The bundle should be encrypted to the iframe’s initial public key Encryption should be performed with HPKE (RFC 9180). This is used during the wallet export flow.
string
string
Promise
<boolean
>
onMessageHandler(
event
):void
Defined in: index.ts:191
MessageEvent
void
publicKey():
null
|string
Defined in: index.ts:286
Returns the public key, or null
if the underlying iframe isn’t properly initialized.
null
| string
stamp(
payload
):Promise
<TStamp
>
Defined in: index.ts:460
Function to sign a payload with the underlying iframe
string
Promise
<TStamp
>
Defined in: index.ts:129
Stamper to use with @turnkey/http
’s TurnkeyClient
Creating a stamper inserts an iframe in the current page.
new IframeStamper(
config
):IframeStamper
Defined in: index.ts:142
Creates a new iframe stamper. This function does not insert the iframe in the DOM.
Call .init()
to insert the iframe element in the DOM.
IframeStamper
container:
HTMLElement
Defined in: index.ts:130
iframe:
HTMLIFrameElement
Defined in: index.ts:131
iframeOrigin:
string
Defined in: index.ts:132
iframePublicKey:
null
|string
Defined in: index.ts:133
messageChannel:
MessageChannel
Defined in: index.ts:134
applySettings(
settings
):Promise
<boolean
>
Defined in: index.ts:451
Function to apply settings on allowed parameters in the iframe This is used to style the HTML element used for plaintext in wallet and private key import.
Promise
<boolean
>
clear():
void
Defined in: index.ts:276
Removes the iframe from the DOM
void
clearEmbeddedKey():
Promise
<null
>
Defined in: index.ts:306
Clears the embedded key within an iframe.
Promise
<null
>
extractKeyEncryptedBundle(
keyFormat
?):Promise
<string
>
Defined in: index.ts:440
Function to extract an encrypted bundle from the iframe The bundle should be encrypted to Turnkey’s Signer enclave’s initial public key Encryption should be performed with HPKE (RFC 9180). The key format to encode the private key in before it’s encrypted and imported: HEXADECIMAL or SOLANA. Defaults to HEXADECIMAL. This is used during the private key import flow.
Promise
<string
>
extractWalletEncryptedBundle():
Promise
<string
>
Defined in: index.ts:427
Function to extract an encrypted bundle from the iframe The bundle should be encrypted to Turnkey’s Signer enclave’s initial public key Encryption should be performed with HPKE (RFC 9180). This is used during the wallet import flow.
Promise
<string
>
getEmbeddedPublicKey():
Promise
<null
|string
>
Defined in: index.ts:294
Returns the public key, or null
if the underlying iframe isn’t properly initialized.
This differs from the above in that it reaches out to the live iframe to see if an embedded key exists.
Promise
<null
| string
>
init(
dangerouslyOverrideIframeKeyTtl
?):Promise
<string
>
Defined in: index.ts:234
Inserts the iframe on the page and returns a promise resolving to the iframe’s public key
number
Optional TTL override for the iframe’s embedded key (default 48 hours). Only use this if you are intentional about the security implications.
Promise
<string
>
initEmbeddedKey():
Promise
<null
|string
>
Defined in: index.ts:319
Creates a new embedded key within an iframe. If an embedded key already exists, this will return it.
This is primarily to be used in conjunction with clearEmbeddedKey()
: after an embedded key is cleared,
this can be used to create a new one.
Promise
<null
| string
>
the newly created embedded public key.
injectCredentialBundle(
bundle
):Promise
<boolean
>
Defined in: index.ts:361
Function to inject a new credential into the iframe The bundle should be encrypted to the iframe’s initial public key Encryption should be performed with HPKE (RFC 9180). This is used during recovery and auth flows.
string
Promise
<boolean
>
injectImportBundle(
bundle
,organizationId
,userId
):Promise
<boolean
>
Defined in: index.ts:409
Function to inject an import bundle into the iframe This is used to initiate either the wallet import flow or the private key import flow.
string
string
string
Promise
<boolean
>
injectKeyExportBundle(
bundle
,organizationId
,keyFormat
?):Promise
<boolean
>
Defined in: index.ts:374
Function to inject an export bundle into the iframe The bundle should be encrypted to the iframe’s initial public key Encryption should be performed with HPKE (RFC 9180). The key format to encode the private key in after it’s exported and decrypted: HEXADECIMAL or SOLANA. Defaults to HEXADECIMAL. This is used during the private key export flow.
string
string
Promise
<boolean
>
injectWalletExportBundle(
bundle
,organizationId
):Promise
<boolean
>
Defined in: index.ts:392
Function to inject an export bundle into the iframe The bundle should be encrypted to the iframe’s initial public key Encryption should be performed with HPKE (RFC 9180). This is used during the wallet export flow.
string
string
Promise
<boolean
>
onMessageHandler(
event
):void
Defined in: index.ts:191
MessageEvent
void
publicKey():
null
|string
Defined in: index.ts:286
Returns the public key, or null
if the underlying iframe isn’t properly initialized.
null
| string
stamp(
payload
):Promise
<TStamp
>
Defined in: index.ts:460
Function to sign a payload with the underlying iframe
string
Promise
<TStamp
>