-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Introduce wallet provider (#423) * Use wallet provider in massa-web3 * Remove constraint private provider * Remove test on constraint private API and fix parameters format in call sc using wallet providers. * Remove duplicate readsmart contract * Rework client initialization * Update package json (#425) * Remove args and use web3-utils * Update version * update p json --------- Co-authored-by: AurelienFT <[email protected]> * update version minor --------- Co-authored-by: AurelienFT <[email protected]> Co-authored-by: AurelienFT <[email protected]>
- Loading branch information
1 parent
7cc1c96
commit 6adda18
Showing
29 changed files
with
3,499 additions
and
4,400 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { ICallData } from './ICallData'; | ||
import { IContractData } from './IContractData'; | ||
import { IRollsData } from './IRollsData'; | ||
import { ISignature } from './ISignature'; | ||
import { ITransactionData } from './ITransactionData'; | ||
|
||
/** | ||
* Represents a BaseAccount object. | ||
* | ||
* @see sign - Sign an array of bytes. | ||
* @see address - The address of the account. | ||
* @see sellRolls - Sell rolls. | ||
* @see buyRolls - Buy rolls. | ||
* @see sendTransaction - Send a transaction. | ||
* @see callSmartContract - Call a smart contract. | ||
* @see deploySmartContract - Deploy a smart contract. | ||
*/ | ||
export interface IBaseAccount { | ||
/** | ||
* Sign a message. | ||
* | ||
* @returns Signature of the message. | ||
*/ | ||
sign(data: Buffer): Promise<ISignature>; | ||
|
||
/** | ||
* Verify integrity of the account. | ||
* | ||
* @throws - If the account is not valid. | ||
*/ | ||
verify(): Promise<void>; | ||
|
||
/** | ||
* The address of the account. | ||
* | ||
* @returns The address of the account. | ||
*/ | ||
address(): string; | ||
|
||
/** | ||
* @param txData - The transaction data. | ||
* | ||
* @returns A promise that resolves to an array of operation ids as strings. | ||
*/ | ||
sellRolls(txData: IRollsData): Promise<string>; | ||
|
||
/** | ||
* @param txData - The transaction data. | ||
* | ||
* @returns A promise that resolves to an array of operation ids as strings. | ||
*/ | ||
buyRolls(txData: IRollsData): Promise<string>; | ||
|
||
/** | ||
* @param txData - The transaction data. | ||
* | ||
* @returns A promise that resolves to an array of operation ids as strings. | ||
*/ | ||
sendTransaction(txData: ITransactionData): Promise<string>; | ||
|
||
/** | ||
* @param callData - The call data. | ||
* | ||
* @returns A promise that resolves to the result of the call. | ||
*/ | ||
callSmartContract(callData: ICallData): Promise<string>; | ||
|
||
/** | ||
* @param contractData - The contract data. | ||
* | ||
* @returns A promise that resolves to the address of the deployed contract. | ||
*/ | ||
deploySmartContract(contractData: IContractData): Promise<string>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.