💰

1Wallet as Client Library

Integrate with timeless.space app.

At this time, It is recommended that apps that wish to customize wallet experience to add 1wallet repository as a dependency. Apps could use various library functions under /code/lib to perform functionalities needed for performing transactions. If apps do not want to use Google Authenticator, they should maintain the authenticator seed internally and keep them secure. Detailed instructions will be provided in wiki soon. Here are some examples.

Generate OTP: https://github.com/polymorpher/one-wallet/blob/3b2d3764786b6d523392c421382855c80fcc4c05/code/lib/util.js#L104

Test Example: https://github.com/polymorpher/one-wallet/blob/3b2d3764786b6d523392c421382855c80fcc4c05/code/test/wallet.js#L101

Production Example: https://github.com/polymorpher/one-wallet/blob/3b2d3764786b6d523392c421382855c80fcc4c05/code/client/src/pages/Create.jsx#L269

Compute root (for creating wallet): https://github.com/polymorpher/one-wallet/blob/3b2d3764786b6d523392c421382855c80fcc4c05/code/lib/onewallet.js#L8

Test Example: https://github.com/polymorpher/one-wallet/blob/3b2d3764786b6d523392c421382855c80fcc4c05/code/test/util.js#L15

Production Example: https://github.com/polymorpher/one-wallet/blob/3b2d3764786b6d523392c421382855c80fcc4c05/code/client/src/worker/ONEWalletWorker.js#L38

https://github.com/polymorpher/one-wallet/blob/3b2d3764786b6d523392c421382855c80fcc4c05/code/client/src/pages/Create.jsx#L227

https://github.com/polymorpher/one-wallet/blob/3b2d3764786b6d523392c421382855c80fcc4c05/code/client/src/pages/Create.jsx#L213