本文整理汇总了TypeScript中dpos-offline/dist/es5/liskWallet.LiskWallet类的典型用法代码示例。如果您正苦于以下问题:TypeScript LiskWallet类的具体用法?TypeScript LiskWallet怎么用?TypeScript LiskWallet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LiskWallet类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1:
export const generateAccounts = (howMany: number): LiskWallet[] => {
const toRet = [];
for (let i = 0; i < howMany; i++) {
toRet.push(generateAccount());
}
return toRet;
};
开发者ID:RiseVision,项目名称:rise-node,代码行数:7,代码来源:accountsUtils.ts
示例2:
export const createMultiSigTX = (from: LiskWallet, fee: number, obj: any = {}): ITransaction => {
const t = new dposOffline.transactions.MultiSignatureTx(obj.asset)
// .withRecipientId(from.address)
.withTimestamp(0);
Object.keys(obj).forEach((k) => t.set(k as any, obj[k]));
return from.signTransaction(t.withFees(fee));
};
开发者ID:RiseVision,项目名称:rise-node,代码行数:7,代码来源:txCrafter.ts
示例3: async
export const createRandomAccountsWithFunds = async (howManyAccounts: number, amount: number): Promise<Array<{ tx: ITransaction, account: LiskWallet, senderWallet: LiskWallet }>> => {
const systemModule = initializer.appManager.container.get<ISystemModule>(Symbols.modules.system);
const senderWallet = getRandomDelegateWallet();
const txs = [];
const accounts: LiskWallet[] = [];
for (let i = 0; i < howManyAccounts; i++) {
const randomRecipient = createRandomWallet();
const t = new dposOffline.transactions.SendTx();
t.set('amount', amount);
t.set('fee', systemModule.getFees().fees.send);
t.set('timestamp', 0);
t.set('recipientId', randomRecipient.address);
const signedTx = senderWallet.signTransaction(t);
txs.push(signedTx);
accounts.push(randomRecipient);
}
await confirmTransactions(txs, false);
return txs
.map((tx, idx) => ({ tx, account: accounts[idx], senderWallet }));
};
开发者ID:RiseVision,项目名称:rise-node,代码行数:22,代码来源:utils.ts
示例4: Array
const keys = new Array(howMany).fill(null).map(() => createRandomWallet());
开发者ID:RiseVision,项目名称:rise-node,代码行数:1,代码来源:utils.ts
示例5: generateAccount
export const generateFakeAddress = (): string => {
return generateAccount().address;
};
开发者ID:RiseVision,项目名称:rise-node,代码行数:3,代码来源:accountsUtils.ts
注:本文中的dpos-offline/dist/es5/liskWallet.LiskWallet类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论