UNPKG

@ledgerhq/hw-app-near

Version:
48 lines 1.73 kB
/// <reference types="node" /> /// <reference types="node" /> /******************************************************************************** * Ledger Node JS API * (c) 2017-2018 Ledger * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ********************************************************************************/ import type Transport from "@ledgerhq/hw-transport"; /** * NEAR API * * @example * import Near from "@ledgerhq/hw-app-near"; * const near = new Near(transport) */ export default class Near { transport: Transport; constructor(transport: Transport); /** * @param path * @option verify - if true, user must verify if the address is correct on the device * @return an object with a publicKey and address * @example * near.getAddress("44'/397'/0'/0'/0'", true).then(o => o.address) */ getAddress(path: string, verify?: boolean): Promise<{ publicKey: string; address: string; }>; /** * @param transaction * @param path * @return a signature to be broadcasted to the chain */ signTransaction(transaction: Uint8Array, path: string): Promise<Buffer | undefined>; } //# sourceMappingURL=Near.d.ts.map