2.0.2-beta.0 • Published 10 months ago

@oraichain/share-serialization v2.0.2-beta.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

oKey Share Serialization Module

npm version minzip

The Share Serialization Module helps you add or remove the and password as a share for oKey. This module is the part of the oKey SDK.

Installation

npm install --save @oraichain/share-serialization

Initialization

Import the ShareSerializationModule class from @oraichain/share-serialization

import ShareSerializationModule from "@oraichain/share-serialization";

Assign the ShareSerializationModule class to a variable

const shareSerializationModule = new ShareSerializationModule();

Returns

The ShareSerializationModule class returns an object with the following properties:

declare class ShareSerializationModule implements IModule {
  moduleName: string;
  tbSDK: ITKeyApi;
  constructor();
  static serializeMnemonic(share: BN): string;
  static deserializeMnemonic(share: string): BN;
  setModuleReferences(tbSDK: ITKeyApi): void;
  initialize(): Promise<void>;
  serialize(share: BN, type: string): Promise<unknown>;
  deserialize(serializedShare: unknown, type: string): Promise<BN>;
}

Usage

With the ShareSerializationModule, you've access to the following functions:

Serialize a share

serialize(share: BN, type: string)

  • share: The share to serialize.
  • type: The type of share to serialize.

Deserialize a share

deserialize(serializedShare: unknown, type: string)

Return

  • Promise<BN>: The deserialized share.
2.2.1

10 months ago

2.2.0

10 months ago

2.1.4

10 months ago

2.1.3

10 months ago

2.1.6

10 months ago

2.1.5

10 months ago

2.1.2

11 months ago

2.1.1

11 months ago

2.1.0

11 months ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.2-beta.0

2 years ago

2.0.1

2 years ago

2.0.1-beta.2

2 years ago

2.0.0

2 years ago

1.3.1-beta.0

2 years ago

1.3.0

2 years ago

1.2.19-beta.0

2 years ago

1.2.18

2 years ago

1.2.18-beta.2

2 years ago

1.2.18-beta.1

2 years ago

1.2.18-beta.0

2 years ago

1.2.17

2 years ago

1.2.17-beta.4

2 years ago

1.2.17-beta.3

2 years ago

1.2.17-beta.0

2 years ago

1.2.16

2 years ago

1.2.15

2 years ago

1.2.14

2 years ago

1.2.13

2 years ago

1.2.12

2 years ago

1.2.11

2 years ago

1.2.10

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago