Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Tezos integration #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions src/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,43 @@ export default class Session extends EventEmitter {
});
}

@integrityCheck
tezosGetAddress(
address_n: Array<number>,
show_display: ?boolean
): Promise<MessageResponse<{
address: string;
path: Array<number>;
}>> {
return this.typedCall('TezosGetAddress', 'TezosAddress', {
address_n: address_n,
show_display: !!show_display,
}).then(res => {
res.message.path = address_n || [];
return res;
});
}

@integrityCheck
tezosSignTx(
address_n: Array<number>,
to: string,
fee: number,
amount: number,
operation: string,
): Promise<MessageResponse<{
data: string;
signature: string;
}>> {
return this.typedCall('TezosSignTx', 'TezosSignedTx', {
address_n: address_n,
to: to,
value: amount,
fee: fee,
operation_bytes: operation,
});
}

@integrityCheck
getPublicKey(
address_n: Array<number>,
Expand Down