Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@tkey/share-transfer
Advanced tools
The Share Transfer Module helps you add or remove the and password as a share for tkey. This module is the part of the tKey SDK.
npm install --save @tkey/share-transfer
ShareTransferModule
class from @tkey/share-transfer
import ShareTransferModule from "@tkey/share-transfer";
ShareTransferModule
class to a variableconst shareTransferModule = new ShareTransferModule();
The ShareTransferModule
class returns an object with the following properties:
declare class ShareTransferModule implements IModule {
moduleName: string;
tbSDK: ITKeyApi;
currentEncKey: BN;
requestStatusCheckId: number;
requestStatusCheckInterval: number;
constructor();
static refreshShareTransferMiddleware(
generalStore: unknown,
oldShareStores: ShareStoreMap,
newShareStores: ShareStoreMap
): ShareTransferStorePointer;
setModuleReferences(tbSDK: ITKeyApi): void;
setRequestStatusCheckInterval(interval: number): void;
initialize(): Promise<void>;
requestNewShare(
userAgent: string,
availableShareIndexes: Array<string>,
callback?: (err?: ITkeyError, shareStore?: ShareStore) => void
): Promise<string>;
addCustomInfoToShareRequest(encPubKeyX: string, customInfo: string): Promise<void>;
lookForRequests(): Promise<Array<string>>;
approveRequest(encPubKeyX: string, shareStore?: ShareStore): Promise<void>;
approveRequestWithShareIndex(encPubKeyX: string, shareIndex: string): Promise<void>;
getShareTransferStore(): Promise<ShareTransferStore>;
setShareTransferStore(shareTransferStore: ShareTransferStore): Promise<void>;
startRequestStatusCheck(encPubKeyX: string, deleteRequestAfterCompletion: boolean): Promise<ShareStore>;
cancelRequestStatusCheck(): Promise<void>;
deleteShareTransferStore(encPubKey: string): Promise<void>;
resetShareTransferStore(): Promise<void>;
private _cleanUpCurrentRequest;
}
With the ShareTransferModule
, you've access to the following functions:
requestNewShare(userAgent: string, availableShareIndexes: Array<string>, callback?: (err?: ITkeyError, shareStore?: ShareStore) => void)
userAgent
: The user agent of the client that is requesting a new share.availableShareIndexes
: An array of share indexes that are available for the client.callback
: A callback function that is called when the request is complete.Promise<string>
: Share index of the new share.addCustomInfoToShareRequest(encPubKeyX: string, customInfo: string)
encPubKeyX
: The public key of the share that is being requested.customInfo
: The custom info that is being added to the share request.lookForRequests()
Promise<Array<string>>
: An array of indexes of pending requestsapproveRequest(encPubKeyX: string, shareStore?: ShareStore)
encPubKeyX
: The public key of the share that is being approved.shareStore
: The share store that is being approved.approveRequestWithShareIndex(encPubKeyX: string, shareIndex: string)
encPubKeyX
: The public key of the share that is being approved.shareIndex
: The share index that is being approved.getShareTransferStore()
Promise<ShareTransferStore>
: The share transfer store.setShareTransferStore(shareTransferStore: ShareTransferStore)
shareTransferStore
: The share transfer store.startRequestStatusCheck(encPubKeyX: string, deleteRequestAfterCompletion: boolean)
encPubKeyX
: The public key of the share that is being checked.deleteRequestAfterCompletion
: Whether or not to delete the request after it is completed.Promise<ShareStore>
: The share store.cancelRequestStatusCheck()
deleteShareTransferStore(encPubKey: string)
encPubKey
: The public key of the share that is being deleted.resetShareTransferStore()
FAQs
TKey Share Transfer Module
The npm package @tkey/share-transfer receives a total of 458 weekly downloads. As such, @tkey/share-transfer popularity was classified as not popular.
We found that @tkey/share-transfer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.