I'm not sure how can I build everything and run tests.
I'm not sure where can I find a usage example of the package.
(venv) vladimirsmelov@Vladimirs-Air tmp % cargo build
Compiling proc-macro2 v1.0.29
Compiling unicode-xid v0.2.2
Compiling syn v1.0.77
Compiling serde_derive v1.0.130
Compiling serde v1.0.130
Compiling version_check v0.9.3
Compiling typenum v1.14.0
Compiling libc v0.2.102
Compiling cfg-if v1.0.0
Compiling block-padding v0.2.1
Compiling opaque-debug v0.3.0
Compiling subtle v2.4.1
Compiling bs58 v0.3.1
Compiling semver-parser v0.7.0
Compiling memchr v2.4.1
Compiling crunchy v0.2.2
Compiling ryu v1.0.5
Compiling getrandom v0.1.16
Compiling autocfg v1.0.1
Compiling serde_json v1.0.68
Compiling anyhow v1.0.44
Compiling regex-syntax v0.6.25
Compiling yansi v0.5.0
Compiling log v0.4.14
Compiling itoa v0.4.8
Compiling unicode-segmentation v1.8.0
Compiling feature-probe v0.1.1
Compiling rustversion v1.0.5
Compiling ppv-lite86 v0.2.10
Compiling termcolor v1.1.2
Compiling cc v1.0.70
Compiling humantime v2.1.0
Compiling ahash v0.4.7
Compiling lazy_static v1.4.0
Compiling ucd-trie v0.1.3
Compiling arrayref v0.3.6
Compiling arrayvec v0.5.2
Compiling zeroize v1.4.2
Compiling constant_time_eq v0.1.5
Compiling byteorder v1.4.3
Compiling keccak v0.1.0
Compiling cfg-if v0.1.10
Compiling base64 v0.12.3
Compiling either v1.6.1
Compiling hex v0.4.3
Compiling bytemuck v1.7.2
Compiling alloc-traits v0.1.1
Compiling bs58 v0.4.0
Compiling base64 v0.13.0
Compiling safe-transmute v0.11.2
Compiling static_assertions v1.1.0
Compiling generic-array v0.14.4
Compiling proc-macro2-diagnostics v0.9.1
Compiling semver v0.9.0
Compiling num-traits v0.2.14
Compiling memoffset v0.6.4
Compiling bv v0.11.1
Compiling heck v0.3.3
Compiling hashbrown v0.9.1
Compiling pest v2.1.3
Compiling itertools v0.9.0
Compiling without-alloc v0.2.1
Compiling blake3 v0.3.8
Compiling rustc_version v0.2.3
Compiling cpufeatures v0.2.1
Compiling atty v0.2.14
Compiling memmap2 v0.1.0
Compiling semver-parser v0.10.2
Compiling solana-frozen-abi-macro v1.7.11
Compiling solana-frozen-abi v1.7.11
Compiling solana-program v1.7.11
Compiling quote v1.0.9
Compiling aho-corasick v0.7.18
Compiling generic-array v0.12.4
Compiling rand_core v0.5.1
Compiling digest v0.8.1
Compiling semver v0.11.0
Compiling rand_chacha v0.2.2
Compiling regex v1.5.4
Compiling curve25519-dalek v2.1.3
Compiling rand v0.7.3
Compiling rustc_version v0.3.3
Compiling field-offset v0.3.4
Compiling env_logger v0.8.4
Compiling solana-logger v1.7.11
Compiling borsh-schema-derive-internal v0.9.1
Compiling borsh-derive-internal v0.9.1
Compiling thiserror-impl v1.0.29
Compiling solana-sdk-macro v1.7.11
Compiling num-derive v0.3.3
Compiling derivative v2.2.0
Compiling enumflags2_derive v0.6.4
Compiling enumflags2 v0.6.4
Compiling thiserror v1.0.29
Compiling toml v0.5.8
Compiling bincode v1.3.3
Compiling serde_bytes v0.11.5
Compiling digest v0.9.0
Compiling block-buffer v0.9.0
Compiling crypto-mac v0.8.0
Compiling sha2 v0.9.8
Compiling libsecp256k1-core v0.2.2
Compiling hmac v0.8.1
Compiling sha3 v0.9.1
Compiling proc-macro-crate v0.1.5
Compiling proc-macro-crate v1.1.0
Compiling hmac-drbg v0.3.0
Compiling anchor-syn v0.17.0
Compiling libsecp256k1-gen-genmult v0.2.1
Compiling libsecp256k1-gen-ecmult v0.2.1
Compiling libsecp256k1 v0.5.0
Compiling borsh-derive v0.9.1
Compiling num_enum_derive v0.5.4
Compiling borsh v0.9.1
Compiling num_enum v0.5.4
Compiling anchor-attribute-program v0.17.0
Compiling anchor-attribute-event v0.17.0
Compiling anchor-attribute-error v0.17.0
Compiling anchor-attribute-state v0.17.0
Compiling anchor-attribute-access-control v0.17.0
Compiling anchor-derive-accounts v0.17.0
Compiling anchor-attribute-interface v0.17.0
Compiling anchor-attribute-account v0.17.0
Compiling anchor-lang v0.17.0
Compiling spl-token v3.2.0
Compiling spl-associated-token-account v1.0.3
Compiling serum_dex v0.4.0
Compiling streamflow-timelock v0.2.0 (https://github.com/streamflow-finance/streamflow-timelock?rev=769a2629168ec273710a66e150ecb0a0124f3723#769a2629)
Compiling anchor-spl v0.17.0
Compiling timelock v0.1.0 (/Users/vladimirsmelov/PycharmProjects/hashex/tmp/programs/timelock)
error[E0433]: failed to resolve: could not find `token` in `streamflow_timelock`
--> programs/timelock/src/lib.rs:53:30
|
53 | streamflow_timelock::token::create(ctx.program_id, acc, ix)
| ^^^^^ could not find `token` in `streamflow_timelock`
error[E0433]: failed to resolve: could not find `token` in `streamflow_timelock`
--> programs/timelock/src/lib.rs:68:30
|
68 | streamflow_timelock::token::withdraw(ctx.program_id, acc, amount)
| ^^^^^ could not find `token` in `streamflow_timelock`
error[E0433]: failed to resolve: could not find `token` in `streamflow_timelock`
--> programs/timelock/src/lib.rs:83:30
|
83 | streamflow_timelock::token::cancel(ctx.program_id, acc)
| ^^^^^ could not find `token` in `streamflow_timelock`
error[E0433]: failed to resolve: could not find `token` in `streamflow_timelock`
--> programs/timelock/src/lib.rs:100:30
|
100 | streamflow_timelock::token::transfer_recipient(ctx.program_id, acc)
| ^^^^^ could not find `token` in `streamflow_timelock`
error[E0560]: struct `streamflow_timelock::state::StreamInstruction` has no field named `is_cancelable_by_sender`
--> programs/timelock/src/lib.rs:32:13
|
32 | is_cancelable_by_sender: true,
| ^^^^^^^^^^^^^^^^^^^^^^^ `streamflow_timelock::state::StreamInstruction` does not have this field
|
= note: available fields are: `start_time`, `end_time`, `deposited_amount`, `total_amount`, `period` ... and 2 others
error[E0560]: struct `streamflow_timelock::state::StreamInstruction` has no field named `is_cancelable_by_recipient`
--> programs/timelock/src/lib.rs:33:13
|
33 | is_cancelable_by_recipient: false,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `streamflow_timelock::state::StreamInstruction` does not have this field
|
= note: available fields are: `start_time`, `end_time`, `deposited_amount`, `total_amount`, `period` ... and 2 others
error[E0560]: struct `streamflow_timelock::state::StreamInstruction` has no field named `is_withdrawal_public`
--> programs/timelock/src/lib.rs:34:13
|
34 | is_withdrawal_public: false,
| ^^^^^^^^^^^^^^^^^^^^ `streamflow_timelock::state::StreamInstruction` does not have this field
|
= note: available fields are: `start_time`, `end_time`, `deposited_amount`, `total_amount`, `period` ... and 2 others
error[E0560]: struct `streamflow_timelock::state::StreamInstruction` has no field named `is_transferable`
--> programs/timelock/src/lib.rs:35:13
|
35 | is_transferable: true,
| ^^^^^^^^^^^^^^^ `streamflow_timelock::state::StreamInstruction` does not have this field
|
= note: available fields are: `start_time`, `end_time`, `deposited_amount`, `total_amount`, `period` ... and 2 others
error[E0560]: struct `streamflow_timelock::state::StreamInstruction` has no field named `padding`
--> programs/timelock/src/lib.rs:36:13
|
36 | padding: 0,
| ^^^^^^^ `streamflow_timelock::state::StreamInstruction` does not have this field
|
= note: available fields are: `start_time`, `end_time`, `deposited_amount`, `total_amount`, `period` ... and 2 others
error[E0560]: struct `streamflow_timelock::state::WithdrawAccounts<'_>` has no field named `withdraw_authority`
--> programs/timelock/src/lib.rs:58:13
|
58 | withdraw_authority: ctx.accounts.withdraw_authority.to_account_info(),
| ^^^^^^^^^^^^^^^^^^ `streamflow_timelock::state::WithdrawAccounts<'_>` does not have this field
|
= note: available fields are: `recipient`, `recipient_tokens`, `metadata`, `escrow_tokens`, `mint`, `token_program`
error[E0560]: struct `streamflow_timelock::state::WithdrawAccounts<'_>` has no field named `sender`
--> programs/timelock/src/lib.rs:59:13
|
59 | sender: ctx.accounts.sender.to_account_info(),
| ^^^^^^ `streamflow_timelock::state::WithdrawAccounts<'_>` does not have this field
|
= note: available fields are: `recipient`, `recipient_tokens`, `metadata`, `escrow_tokens`, `mint`, `token_program`
error[E0560]: struct `streamflow_timelock::state::CancelAccounts<'_>` has no field named `cancel_authority`
--> programs/timelock/src/lib.rs:73:13
|
73 | cancel_authority: ctx.accounts.cancel_authority.to_account_info(),
| ^^^^^^^^^^^^^^^^ `streamflow_timelock::state::CancelAccounts<'_>` does not have this field
|
= note: available fields are: `sender`, `sender_tokens`, `recipient`, `recipient_tokens`, `metadata` ... and 3 others
Some errors have detailed explanations: E0433, E0560.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `timelock` due to 12 previous errors
(venv) vladimirsmelov@Vladimirs-Air tmp %