@wuwei-labs/srsly 3.0.0-beta.2 → 3.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/dist/cjs/accounts/borrower.js +79 -15
- package/dist/cjs/accounts/borrower.js.map +1 -1
- package/dist/cjs/accounts/config.js +51 -3
- package/dist/cjs/accounts/config.js.map +1 -1
- package/dist/cjs/accounts/contract.js +52 -1
- package/dist/cjs/accounts/contract.js.map +1 -1
- package/dist/cjs/accounts/fleet.js +2 -1
- package/dist/cjs/accounts/fleet.js.map +1 -1
- package/dist/cjs/accounts/member.js +16 -0
- package/dist/cjs/accounts/member.js.map +1 -0
- package/dist/cjs/accounts/owner.js +105 -0
- package/dist/cjs/accounts/owner.js.map +1 -0
- package/dist/cjs/accounts/rental.js +49 -1
- package/dist/cjs/accounts/rental.js.map +1 -1
- package/dist/cjs/demos.js +337 -34
- package/dist/cjs/demos.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/borrowerState.js +25 -25
- package/dist/cjs/generated/codama/accounts/borrowerState.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/configState.js +55 -48
- package/dist/cjs/generated/codama/accounts/configState.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/contractState.js +59 -42
- package/dist/cjs/generated/codama/accounts/contractState.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/fleet.js +103 -0
- package/dist/cjs/generated/codama/accounts/fleet.js.map +1 -0
- package/dist/cjs/generated/codama/accounts/index.js +2 -2
- package/dist/cjs/generated/codama/accounts/index.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/ownerState.js +86 -0
- package/dist/cjs/generated/codama/accounts/ownerState.js.map +1 -0
- package/dist/cjs/generated/codama/accounts/rentalState.js +42 -30
- package/dist/cjs/generated/codama/accounts/rentalState.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/thread.js +47 -44
- package/dist/cjs/generated/codama/accounts/thread.js.map +1 -1
- package/dist/cjs/generated/codama/errors/srsly.js +61 -19
- package/dist/cjs/generated/codama/errors/srsly.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/acceptRental.js +39 -61
- package/dist/cjs/generated/codama/instructions/acceptRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/activateRental.js +193 -0
- package/dist/cjs/generated/codama/instructions/activateRental.js.map +1 -0
- package/dist/cjs/generated/codama/instructions/cancelRental.js +50 -28
- package/dist/cjs/generated/codama/instructions/cancelRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/claimBorrower.js +36 -23
- package/dist/cjs/generated/codama/instructions/claimBorrower.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/{claimContractPayments.js → claimOwner.js} +70 -56
- package/dist/cjs/generated/codama/instructions/claimOwner.js.map +1 -0
- package/dist/cjs/generated/codama/instructions/claimRental.js +336 -0
- package/dist/cjs/generated/codama/instructions/claimRental.js.map +1 -0
- package/dist/cjs/generated/codama/instructions/closeContract.js +17 -85
- package/dist/cjs/generated/codama/instructions/closeContract.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/closeRental.js +46 -45
- package/dist/cjs/generated/codama/instructions/closeRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/createConfig.js +56 -20
- package/dist/cjs/generated/codama/instructions/createConfig.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/createContract.js +53 -37
- package/dist/cjs/generated/codama/instructions/createContract.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/deleteConfig.js +15 -15
- package/dist/cjs/generated/codama/instructions/deleteConfig.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/deleteContract.js +5 -5
- package/dist/cjs/generated/codama/instructions/deleteRental.js +5 -5
- package/dist/cjs/generated/codama/instructions/index.js +7 -4
- package/dist/cjs/generated/codama/instructions/index.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/invalidateRental.js +156 -0
- package/dist/cjs/generated/codama/instructions/invalidateRental.js.map +1 -0
- package/dist/cjs/generated/codama/instructions/payRental.js +64 -24
- package/dist/cjs/generated/codama/instructions/payRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/releaseRental.js +8 -49
- package/dist/cjs/generated/codama/instructions/releaseRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/reserveRental.js +41 -22
- package/dist/cjs/generated/codama/instructions/reserveRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/scheduleRental.js +265 -0
- package/dist/cjs/generated/codama/instructions/scheduleRental.js.map +1 -0
- package/dist/cjs/generated/codama/instructions/setDelegate.js +79 -0
- package/dist/cjs/generated/codama/instructions/setDelegate.js.map +1 -0
- package/dist/cjs/generated/codama/instructions/updateBorrower.js +9 -9
- package/dist/cjs/generated/codama/instructions/updateBorrower.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/updateConfig.js +43 -45
- package/dist/cjs/generated/codama/instructions/updateConfig.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/updateContract.js +24 -22
- package/dist/cjs/generated/codama/instructions/updateContract.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/updateOwner.js +79 -0
- package/dist/cjs/generated/codama/instructions/updateOwner.js.map +1 -0
- package/dist/cjs/generated/codama/programs/srsly.js +48 -36
- package/dist/cjs/generated/codama/programs/srsly.js.map +1 -1
- package/dist/cjs/generated/codama/shared/index.js +8 -8
- package/dist/cjs/generated/codama/types/atlasClaimed.js +33 -0
- package/dist/cjs/generated/codama/types/atlasClaimed.js.map +1 -0
- package/dist/cjs/generated/codama/types/borrowerInitialized.js +29 -0
- package/dist/cjs/generated/codama/types/borrowerInitialized.js.map +1 -0
- package/dist/cjs/generated/codama/types/cargoStats.js +43 -0
- package/dist/cjs/generated/codama/types/cargoStats.js.map +1 -0
- package/dist/cjs/generated/codama/types/contractClosed.js +31 -0
- package/dist/cjs/generated/codama/types/contractClosed.js.map +1 -0
- package/dist/cjs/generated/codama/types/contractCreated.js +33 -0
- package/dist/cjs/generated/codama/types/contractCreated.js.map +1 -0
- package/dist/cjs/generated/codama/types/contractDelegateSet.js +31 -0
- package/dist/cjs/generated/codama/types/contractDelegateSet.js.map +1 -0
- package/dist/cjs/generated/codama/types/contractPendingClose.js +31 -0
- package/dist/cjs/generated/codama/types/contractPendingClose.js.map +1 -0
- package/dist/cjs/generated/codama/types/contractUpdated.js +34 -0
- package/dist/cjs/generated/codama/types/contractUpdated.js.map +1 -0
- package/dist/cjs/generated/codama/types/discountAuthorization.js +33 -0
- package/dist/cjs/generated/codama/types/discountAuthorization.js.map +1 -0
- package/dist/cjs/generated/codama/types/fieldUpdate.js +29 -0
- package/dist/cjs/generated/codama/types/fieldUpdate.js.map +1 -0
- package/dist/cjs/generated/codama/types/index.js +25 -3
- package/dist/cjs/generated/codama/types/index.js.map +1 -1
- package/dist/cjs/generated/codama/types/miscStats.js +47 -0
- package/dist/cjs/generated/codama/types/miscStats.js.map +1 -0
- package/dist/cjs/generated/codama/types/movementStats.js +39 -0
- package/dist/cjs/generated/codama/types/movementStats.js.map +1 -0
- package/dist/cjs/generated/codama/types/optionalNonSystemPubkey.js +23 -0
- package/dist/cjs/generated/codama/types/optionalNonSystemPubkey.js.map +1 -0
- package/dist/cjs/generated/codama/types/rentalAccepted.js +43 -0
- package/dist/cjs/generated/codama/types/rentalAccepted.js.map +1 -0
- package/dist/cjs/generated/codama/types/rentalActivated.js +31 -0
- package/dist/cjs/generated/codama/types/rentalActivated.js.map +1 -0
- package/dist/cjs/generated/codama/types/rentalCancelled.js +35 -0
- package/dist/cjs/generated/codama/types/rentalCancelled.js.map +1 -0
- package/dist/cjs/generated/codama/types/rentalClaimed.js +41 -0
- package/dist/cjs/generated/codama/types/rentalClaimed.js.map +1 -0
- package/dist/cjs/generated/codama/types/rentalClosed.js +33 -0
- package/dist/cjs/generated/codama/types/rentalClosed.js.map +1 -0
- package/dist/cjs/generated/codama/types/rentalPaymentProcessed.js +33 -0
- package/dist/cjs/generated/codama/types/rentalPaymentProcessed.js.map +1 -0
- package/dist/cjs/generated/codama/types/rentalScheduled.js +35 -0
- package/dist/cjs/generated/codama/types/rentalScheduled.js.map +1 -0
- package/dist/cjs/generated/codama/types/rentalStatus.js +31 -0
- package/dist/cjs/generated/codama/types/rentalStatus.js.map +1 -0
- package/dist/cjs/generated/codama/types/reservationCreated.js +35 -0
- package/dist/cjs/generated/codama/types/reservationCreated.js.map +1 -0
- package/dist/cjs/generated/codama/types/reservationKnockoff.js +35 -0
- package/dist/cjs/generated/codama/types/reservationKnockoff.js.map +1 -0
- package/dist/cjs/generated/codama/types/schedule.js +14 -14
- package/dist/cjs/generated/codama/types/shipCounts.js +45 -0
- package/dist/cjs/generated/codama/types/shipCounts.js.map +1 -0
- package/dist/cjs/generated/codama/types/shipStats.js +32 -0
- package/dist/cjs/generated/codama/types/shipStats.js.map +1 -0
- package/dist/cjs/generated/codama/types/signal.js +12 -12
- package/dist/cjs/generated/codama/types/trigger.js +36 -36
- package/dist/cjs/index.js +64 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/instructions/acceptRental.js +82 -24
- package/dist/cjs/instructions/acceptRental.js.map +1 -1
- package/dist/cjs/instructions/approveAffiliate.js +11 -0
- package/dist/cjs/instructions/approveAffiliate.js.map +1 -0
- package/dist/cjs/instructions/cancelRental.js +12 -5
- package/dist/cjs/instructions/cancelRental.js.map +1 -1
- package/dist/cjs/instructions/claimBorrower.js +7 -3
- package/dist/cjs/instructions/claimBorrower.js.map +1 -1
- package/dist/cjs/instructions/claimRental.js +201 -0
- package/dist/cjs/instructions/claimRental.js.map +1 -0
- package/dist/cjs/instructions/closeContract.js +4 -3
- package/dist/cjs/instructions/closeContract.js.map +1 -1
- package/dist/cjs/instructions/closeRental.js +42 -12
- package/dist/cjs/instructions/closeRental.js.map +1 -1
- package/dist/cjs/instructions/createAffiliate.js +73 -0
- package/dist/cjs/instructions/createAffiliate.js.map +1 -0
- package/dist/cjs/instructions/createConfig.js +12 -0
- package/dist/cjs/instructions/createConfig.js.map +1 -1
- package/dist/cjs/instructions/createContract.js +12 -5
- package/dist/cjs/instructions/createContract.js.map +1 -1
- package/dist/cjs/instructions/deleteConfig.js +16 -5
- package/dist/cjs/instructions/deleteConfig.js.map +1 -1
- package/dist/cjs/instructions/deleteContract.js +79 -0
- package/dist/cjs/instructions/deleteContract.js.map +1 -0
- package/dist/cjs/instructions/index.js +56 -0
- package/dist/cjs/instructions/index.js.map +1 -0
- package/dist/cjs/instructions/invalidateRental.js +101 -0
- package/dist/cjs/instructions/invalidateRental.js.map +1 -0
- package/dist/cjs/instructions/ownerClaim.js +110 -0
- package/dist/cjs/instructions/ownerClaim.js.map +1 -0
- package/dist/cjs/instructions/ownerUpdate.js +68 -0
- package/dist/cjs/instructions/ownerUpdate.js.map +1 -0
- package/dist/cjs/instructions/releaseRental.js +20 -53
- package/dist/cjs/instructions/releaseRental.js.map +1 -1
- package/dist/cjs/instructions/removeAffiliate.js +11 -0
- package/dist/cjs/instructions/removeAffiliate.js.map +1 -0
- package/dist/cjs/instructions/reserveRental.js +8 -6
- package/dist/cjs/instructions/reserveRental.js.map +1 -1
- package/dist/cjs/instructions/setDelegate.js +72 -0
- package/dist/cjs/instructions/setDelegate.js.map +1 -0
- package/dist/cjs/instructions/updateAffiliate.js +57 -0
- package/dist/cjs/instructions/updateAffiliate.js.map +1 -0
- package/dist/cjs/instructions/updateBorrower.js +4 -2
- package/dist/cjs/instructions/updateBorrower.js.map +1 -1
- package/dist/cjs/instructions/updateConfig.js +0 -1
- package/dist/cjs/instructions/updateConfig.js.map +1 -1
- package/dist/cjs/instructions/updateContract.js +12 -5
- package/dist/cjs/instructions/updateContract.js.map +1 -1
- package/dist/cjs/kit/index.js +34 -0
- package/dist/cjs/kit/index.js.map +1 -0
- package/dist/cjs/legacy/index.js +127 -0
- package/dist/cjs/legacy/index.js.map +1 -0
- package/dist/cjs/package.json +9 -5
- package/dist/cjs/params/amount.js +4 -4
- package/dist/cjs/pda/constants.js +2 -1
- package/dist/cjs/pda/constants.js.map +1 -1
- package/dist/cjs/pda/index.js +7 -2
- package/dist/cjs/pda/index.js.map +1 -1
- package/dist/cjs/pda/lookupTable.js +59 -0
- package/dist/cjs/pda/lookupTable.js.map +1 -0
- package/dist/cjs/pda/slyvault.js +5 -49
- package/dist/cjs/pda/slyvault.js.map +1 -1
- package/dist/cjs/pda/srsly.js +32 -6
- package/dist/cjs/pda/srsly.js.map +1 -1
- package/dist/cjs/pda/thread.js +2 -2
- package/dist/cjs/utils/addresses.js +7 -1
- package/dist/cjs/utils/addresses.js.map +1 -1
- package/dist/cjs/utils/config.js +20 -2
- package/dist/cjs/utils/config.js.map +1 -1
- package/dist/cjs/utils/discountAuth.js +157 -0
- package/dist/cjs/utils/discountAuth.js.map +1 -0
- package/dist/cjs/utils/index.js +27 -1
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/instructionResult.js +76 -0
- package/dist/cjs/utils/instructionResult.js.map +1 -0
- package/dist/cjs/utils/instructions.js +12 -17
- package/dist/cjs/utils/instructions.js.map +1 -1
- package/dist/cjs/utils/lookupTable.js +143 -0
- package/dist/cjs/utils/lookupTable.js.map +1 -0
- package/dist/cjs/utils/rental.js +135 -0
- package/dist/cjs/utils/rental.js.map +1 -0
- package/dist/cjs/utils/rpc.js +57 -0
- package/dist/cjs/utils/rpc.js.map +1 -0
- package/dist/cjs/utils/signer.js +8 -8
- package/dist/cjs/utils/signer.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/accounts/borrower.js +80 -17
- package/dist/esm/accounts/borrower.js.map +1 -1
- package/dist/esm/accounts/config.js +50 -3
- package/dist/esm/accounts/config.js.map +1 -1
- package/dist/esm/accounts/contract.js +53 -3
- package/dist/esm/accounts/contract.js.map +1 -1
- package/dist/esm/accounts/fleet.js +3 -2
- package/dist/esm/accounts/fleet.js.map +1 -1
- package/dist/esm/accounts/member.js +9 -0
- package/dist/esm/accounts/member.js.map +1 -0
- package/dist/esm/accounts/owner.js +101 -0
- package/dist/esm/accounts/owner.js.map +1 -0
- package/dist/esm/accounts/rental.js +50 -3
- package/dist/esm/accounts/rental.js.map +1 -1
- package/dist/esm/demos.js +336 -33
- package/dist/esm/demos.js.map +1 -1
- package/dist/esm/generated/codama/accounts/borrowerState.js +26 -26
- package/dist/esm/generated/codama/accounts/borrowerState.js.map +1 -1
- package/dist/esm/generated/codama/accounts/configState.js +57 -50
- package/dist/esm/generated/codama/accounts/configState.js.map +1 -1
- package/dist/esm/generated/codama/accounts/contractState.js +60 -43
- package/dist/esm/generated/codama/accounts/contractState.js.map +1 -1
- package/dist/esm/generated/codama/accounts/fleet.js +90 -0
- package/dist/esm/generated/codama/accounts/fleet.js.map +1 -0
- package/dist/esm/generated/codama/accounts/index.js +7 -7
- package/dist/esm/generated/codama/accounts/index.js.map +1 -1
- package/dist/esm/generated/codama/accounts/ownerState.js +73 -0
- package/dist/esm/generated/codama/accounts/ownerState.js.map +1 -0
- package/dist/esm/generated/codama/accounts/rentalState.js +43 -30
- package/dist/esm/generated/codama/accounts/rentalState.js.map +1 -1
- package/dist/esm/generated/codama/accounts/thread.js +49 -46
- package/dist/esm/generated/codama/accounts/thread.js.map +1 -1
- package/dist/esm/generated/codama/errors/index.js +1 -1
- package/dist/esm/generated/codama/errors/srsly.js +62 -20
- package/dist/esm/generated/codama/errors/srsly.js.map +1 -1
- package/dist/esm/generated/codama/index.js +5 -5
- package/dist/esm/generated/codama/instructions/acceptRental.js +42 -64
- package/dist/esm/generated/codama/instructions/acceptRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/activateRental.js +183 -0
- package/dist/esm/generated/codama/instructions/activateRental.js.map +1 -0
- package/dist/esm/generated/codama/instructions/cancelRental.js +53 -31
- package/dist/esm/generated/codama/instructions/cancelRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/claimBorrower.js +39 -26
- package/dist/esm/generated/codama/instructions/claimBorrower.js.map +1 -1
- package/dist/esm/generated/codama/instructions/{claimContractPayments.js → claimOwner.js} +65 -51
- package/dist/esm/generated/codama/instructions/claimOwner.js.map +1 -0
- package/dist/esm/generated/codama/instructions/claimRental.js +326 -0
- package/dist/esm/generated/codama/instructions/claimRental.js.map +1 -0
- package/dist/esm/generated/codama/instructions/closeContract.js +20 -88
- package/dist/esm/generated/codama/instructions/closeContract.js.map +1 -1
- package/dist/esm/generated/codama/instructions/closeRental.js +49 -48
- package/dist/esm/generated/codama/instructions/closeRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/createConfig.js +59 -23
- package/dist/esm/generated/codama/instructions/createConfig.js.map +1 -1
- package/dist/esm/generated/codama/instructions/createContract.js +56 -40
- package/dist/esm/generated/codama/instructions/createContract.js.map +1 -1
- package/dist/esm/generated/codama/instructions/deleteConfig.js +18 -18
- package/dist/esm/generated/codama/instructions/deleteConfig.js.map +1 -1
- package/dist/esm/generated/codama/instructions/deleteContract.js +8 -8
- package/dist/esm/generated/codama/instructions/deleteRental.js +8 -8
- package/dist/esm/generated/codama/instructions/index.js +23 -20
- package/dist/esm/generated/codama/instructions/index.js.map +1 -1
- package/dist/esm/generated/codama/instructions/invalidateRental.js +146 -0
- package/dist/esm/generated/codama/instructions/invalidateRental.js.map +1 -0
- package/dist/esm/generated/codama/instructions/payRental.js +67 -27
- package/dist/esm/generated/codama/instructions/payRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/releaseRental.js +11 -52
- package/dist/esm/generated/codama/instructions/releaseRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/reserveRental.js +44 -25
- package/dist/esm/generated/codama/instructions/reserveRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/scheduleRental.js +255 -0
- package/dist/esm/generated/codama/instructions/scheduleRental.js.map +1 -0
- package/dist/esm/generated/codama/instructions/setDelegate.js +70 -0
- package/dist/esm/generated/codama/instructions/setDelegate.js.map +1 -0
- package/dist/esm/generated/codama/instructions/updateBorrower.js +12 -12
- package/dist/esm/generated/codama/instructions/updateBorrower.js.map +1 -1
- package/dist/esm/generated/codama/instructions/updateConfig.js +47 -49
- package/dist/esm/generated/codama/instructions/updateConfig.js.map +1 -1
- package/dist/esm/generated/codama/instructions/updateContract.js +27 -25
- package/dist/esm/generated/codama/instructions/updateContract.js.map +1 -1
- package/dist/esm/generated/codama/instructions/updateOwner.js +70 -0
- package/dist/esm/generated/codama/instructions/updateOwner.js.map +1 -0
- package/dist/esm/generated/codama/programs/index.js +1 -1
- package/dist/esm/generated/codama/programs/srsly.js +49 -37
- package/dist/esm/generated/codama/programs/srsly.js.map +1 -1
- package/dist/esm/generated/codama/shared/index.js +9 -9
- package/dist/esm/generated/codama/types/atlasClaimed.js +28 -0
- package/dist/esm/generated/codama/types/atlasClaimed.js.map +1 -0
- package/dist/esm/generated/codama/types/borrowerInitialized.js +24 -0
- package/dist/esm/generated/codama/types/borrowerInitialized.js.map +1 -0
- package/dist/esm/generated/codama/types/cargoStats.js +38 -0
- package/dist/esm/generated/codama/types/cargoStats.js.map +1 -0
- package/dist/esm/generated/codama/types/contractClosed.js +26 -0
- package/dist/esm/generated/codama/types/contractClosed.js.map +1 -0
- package/dist/esm/generated/codama/types/contractCreated.js +28 -0
- package/dist/esm/generated/codama/types/contractCreated.js.map +1 -0
- package/dist/esm/generated/codama/types/contractDelegateSet.js +26 -0
- package/dist/esm/generated/codama/types/contractDelegateSet.js.map +1 -0
- package/dist/esm/generated/codama/types/contractPendingClose.js +26 -0
- package/dist/esm/generated/codama/types/contractPendingClose.js.map +1 -0
- package/dist/esm/generated/codama/types/contractUpdated.js +29 -0
- package/dist/esm/generated/codama/types/contractUpdated.js.map +1 -0
- package/dist/esm/generated/codama/types/discountAuthorization.js +28 -0
- package/dist/esm/generated/codama/types/discountAuthorization.js.map +1 -0
- package/dist/esm/generated/codama/types/fieldUpdate.js +24 -0
- package/dist/esm/generated/codama/types/fieldUpdate.js.map +1 -0
- package/dist/esm/generated/codama/types/index.js +29 -7
- package/dist/esm/generated/codama/types/index.js.map +1 -1
- package/dist/esm/generated/codama/types/miscStats.js +42 -0
- package/dist/esm/generated/codama/types/miscStats.js.map +1 -0
- package/dist/esm/generated/codama/types/movementStats.js +34 -0
- package/dist/esm/generated/codama/types/movementStats.js.map +1 -0
- package/dist/esm/generated/codama/types/optionalNonSystemPubkey.js +18 -0
- package/dist/esm/generated/codama/types/optionalNonSystemPubkey.js.map +1 -0
- package/dist/esm/generated/codama/types/paymentFrequency.js +1 -1
- package/dist/esm/generated/codama/types/rentalAccepted.js +38 -0
- package/dist/esm/generated/codama/types/rentalAccepted.js.map +1 -0
- package/dist/esm/generated/codama/types/rentalActivated.js +26 -0
- package/dist/esm/generated/codama/types/rentalActivated.js.map +1 -0
- package/dist/esm/generated/codama/types/rentalCancelled.js +30 -0
- package/dist/esm/generated/codama/types/rentalCancelled.js.map +1 -0
- package/dist/esm/generated/codama/types/rentalClaimed.js +36 -0
- package/dist/esm/generated/codama/types/rentalClaimed.js.map +1 -0
- package/dist/esm/generated/codama/types/rentalClosed.js +28 -0
- package/dist/esm/generated/codama/types/rentalClosed.js.map +1 -0
- package/dist/esm/generated/codama/types/rentalPaymentProcessed.js +28 -0
- package/dist/esm/generated/codama/types/rentalPaymentProcessed.js.map +1 -0
- package/dist/esm/generated/codama/types/rentalScheduled.js +30 -0
- package/dist/esm/generated/codama/types/rentalScheduled.js.map +1 -0
- package/dist/esm/generated/codama/types/rentalStatus.js +25 -0
- package/dist/esm/generated/codama/types/rentalStatus.js.map +1 -0
- package/dist/esm/generated/codama/types/reservationCreated.js +30 -0
- package/dist/esm/generated/codama/types/reservationCreated.js.map +1 -0
- package/dist/esm/generated/codama/types/reservationKnockoff.js +30 -0
- package/dist/esm/generated/codama/types/reservationKnockoff.js.map +1 -0
- package/dist/esm/generated/codama/types/schedule.js +15 -15
- package/dist/esm/generated/codama/types/shipCounts.js +40 -0
- package/dist/esm/generated/codama/types/shipCounts.js.map +1 -0
- package/dist/esm/generated/codama/types/shipStats.js +27 -0
- package/dist/esm/generated/codama/types/shipStats.js.map +1 -0
- package/dist/esm/generated/codama/types/signal.js +14 -14
- package/dist/esm/generated/codama/types/trigger.js +37 -37
- package/dist/esm/index.js +38 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/instructions/acceptRental.js +84 -26
- package/dist/esm/instructions/acceptRental.js.map +1 -1
- package/dist/esm/instructions/approveAffiliate.js +7 -0
- package/dist/esm/instructions/approveAffiliate.js.map +1 -0
- package/dist/esm/instructions/cancelRental.js +12 -5
- package/dist/esm/instructions/cancelRental.js.map +1 -1
- package/dist/esm/instructions/claimBorrower.js +8 -4
- package/dist/esm/instructions/claimBorrower.js.map +1 -1
- package/dist/esm/instructions/claimRental.js +198 -0
- package/dist/esm/instructions/claimRental.js.map +1 -0
- package/dist/esm/instructions/closeContract.js +4 -3
- package/dist/esm/instructions/closeContract.js.map +1 -1
- package/dist/esm/instructions/closeRental.js +43 -13
- package/dist/esm/instructions/closeRental.js.map +1 -1
- package/dist/esm/instructions/createAffiliate.js +70 -0
- package/dist/esm/instructions/createAffiliate.js.map +1 -0
- package/dist/esm/instructions/createConfig.js +12 -0
- package/dist/esm/instructions/createConfig.js.map +1 -1
- package/dist/esm/instructions/createContract.js +12 -5
- package/dist/esm/instructions/createContract.js.map +1 -1
- package/dist/esm/instructions/deleteConfig.js +17 -6
- package/dist/esm/instructions/deleteConfig.js.map +1 -1
- package/dist/esm/instructions/deleteContract.js +76 -0
- package/dist/esm/instructions/deleteContract.js.map +1 -0
- package/dist/esm/instructions/index.js +29 -0
- package/dist/esm/instructions/index.js.map +1 -0
- package/dist/esm/instructions/invalidateRental.js +98 -0
- package/dist/esm/instructions/invalidateRental.js.map +1 -0
- package/dist/esm/instructions/ownerClaim.js +107 -0
- package/dist/esm/instructions/ownerClaim.js.map +1 -0
- package/dist/esm/instructions/ownerUpdate.js +65 -0
- package/dist/esm/instructions/ownerUpdate.js.map +1 -0
- package/dist/esm/instructions/releaseRental.js +20 -53
- package/dist/esm/instructions/releaseRental.js.map +1 -1
- package/dist/esm/instructions/removeAffiliate.js +7 -0
- package/dist/esm/instructions/removeAffiliate.js.map +1 -0
- package/dist/esm/instructions/reserveRental.js +10 -8
- package/dist/esm/instructions/reserveRental.js.map +1 -1
- package/dist/esm/instructions/setDelegate.js +69 -0
- package/dist/esm/instructions/setDelegate.js.map +1 -0
- package/dist/esm/instructions/updateAffiliate.js +54 -0
- package/dist/esm/instructions/updateAffiliate.js.map +1 -0
- package/dist/esm/instructions/updateBorrower.js +4 -2
- package/dist/esm/instructions/updateBorrower.js.map +1 -1
- package/dist/esm/instructions/updateConfig.js +0 -1
- package/dist/esm/instructions/updateConfig.js.map +1 -1
- package/dist/esm/instructions/updateContract.js +12 -5
- package/dist/esm/instructions/updateContract.js.map +1 -1
- package/dist/esm/kit/index.js +18 -0
- package/dist/esm/kit/index.js.map +1 -0
- package/dist/esm/legacy/index.js +86 -0
- package/dist/esm/legacy/index.js.map +1 -0
- package/dist/esm/package.json +9 -5
- package/dist/esm/params/amount.js +4 -4
- package/dist/esm/pda/constants.js +1 -0
- package/dist/esm/pda/constants.js.map +1 -1
- package/dist/esm/pda/index.js +5 -3
- package/dist/esm/pda/index.js.map +1 -1
- package/dist/esm/pda/lookupTable.js +56 -0
- package/dist/esm/pda/lookupTable.js.map +1 -0
- package/dist/esm/pda/slyvault.js +2 -47
- package/dist/esm/pda/slyvault.js.map +1 -1
- package/dist/esm/pda/srsly.js +32 -7
- package/dist/esm/pda/srsly.js.map +1 -1
- package/dist/esm/pda/thread.js +2 -2
- package/dist/esm/utils/addresses.js +7 -1
- package/dist/esm/utils/addresses.js.map +1 -1
- package/dist/esm/utils/config.js +19 -2
- package/dist/esm/utils/config.js.map +1 -1
- package/dist/esm/utils/discountAuth.js +151 -0
- package/dist/esm/utils/discountAuth.js.map +1 -0
- package/dist/esm/utils/index.js +11 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/instructionResult.js +72 -0
- package/dist/esm/utils/instructionResult.js.map +1 -0
- package/dist/esm/utils/instructions.js +12 -17
- package/dist/esm/utils/instructions.js.map +1 -1
- package/dist/esm/utils/lookupTable.js +139 -0
- package/dist/esm/utils/lookupTable.js.map +1 -0
- package/dist/esm/utils/rental.js +129 -0
- package/dist/esm/utils/rental.js.map +1 -0
- package/dist/esm/utils/rpc.js +52 -0
- package/dist/esm/utils/rpc.js.map +1 -0
- package/dist/esm/utils/signer.js +8 -8
- package/dist/esm/utils/signer.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/idl/srsly.json +7364 -0
- package/dist/types/accounts/borrower.d.ts +33 -9
- package/dist/types/accounts/borrower.d.ts.map +1 -1
- package/dist/types/accounts/config.d.ts +19 -0
- package/dist/types/accounts/config.d.ts.map +1 -1
- package/dist/types/accounts/contract.d.ts +19 -0
- package/dist/types/accounts/contract.d.ts.map +1 -1
- package/dist/types/accounts/fleet.d.ts.map +1 -1
- package/dist/types/accounts/member.d.ts +9 -0
- package/dist/types/accounts/member.d.ts.map +1 -0
- package/dist/types/accounts/owner.d.ts +52 -0
- package/dist/types/accounts/owner.d.ts.map +1 -0
- package/dist/types/accounts/rental.d.ts +19 -0
- package/dist/types/accounts/rental.d.ts.map +1 -1
- package/dist/types/demos.d.ts +47 -2
- package/dist/types/demos.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/borrowerState.d.ts +12 -20
- package/dist/types/generated/codama/accounts/borrowerState.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/configState.d.ts +23 -6
- package/dist/types/generated/codama/accounts/configState.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/contractState.d.ts +64 -19
- package/dist/types/generated/codama/accounts/contractState.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/fleet.d.ts +64 -0
- package/dist/types/generated/codama/accounts/fleet.d.ts.map +1 -0
- package/dist/types/generated/codama/accounts/index.d.ts +7 -7
- package/dist/types/generated/codama/accounts/index.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/ownerState.d.ts +65 -0
- package/dist/types/generated/codama/accounts/ownerState.d.ts.map +1 -0
- package/dist/types/generated/codama/accounts/rentalState.d.ts +32 -5
- package/dist/types/generated/codama/accounts/rentalState.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/thread.d.ts +5 -2
- package/dist/types/generated/codama/accounts/thread.d.ts.map +1 -1
- package/dist/types/generated/codama/errors/index.d.ts +1 -1
- package/dist/types/generated/codama/errors/srsly.d.ts +43 -15
- package/dist/types/generated/codama/errors/srsly.d.ts.map +1 -1
- package/dist/types/generated/codama/index.d.ts +5 -5
- package/dist/types/generated/codama/instructions/acceptRental.d.ts +28 -27
- package/dist/types/generated/codama/instructions/acceptRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/activateRental.d.ts +90 -0
- package/dist/types/generated/codama/instructions/activateRental.d.ts.map +1 -0
- package/dist/types/generated/codama/instructions/cancelRental.d.ts +25 -13
- package/dist/types/generated/codama/instructions/cancelRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/claimBorrower.d.ts +33 -21
- package/dist/types/generated/codama/instructions/claimBorrower.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/claimOwner.d.ts +91 -0
- package/dist/types/generated/codama/instructions/claimOwner.d.ts.map +1 -0
- package/dist/types/generated/codama/instructions/claimRental.d.ts +133 -0
- package/dist/types/generated/codama/instructions/claimRental.d.ts.map +1 -0
- package/dist/types/generated/codama/instructions/closeContract.d.ts +20 -29
- package/dist/types/generated/codama/instructions/closeContract.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/closeRental.d.ts +45 -24
- package/dist/types/generated/codama/instructions/closeRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/createConfig.d.ts +36 -15
- package/dist/types/generated/codama/instructions/createConfig.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/createContract.d.ts +47 -36
- package/dist/types/generated/codama/instructions/createContract.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/deleteConfig.d.ts +3 -3
- package/dist/types/generated/codama/instructions/deleteConfig.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/deleteContract.d.ts +2 -2
- package/dist/types/generated/codama/instructions/deleteRental.d.ts +2 -2
- package/dist/types/generated/codama/instructions/index.d.ts +23 -20
- package/dist/types/generated/codama/instructions/index.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/invalidateRental.d.ts +89 -0
- package/dist/types/generated/codama/instructions/invalidateRental.d.ts.map +1 -0
- package/dist/types/generated/codama/instructions/payRental.d.ts +50 -28
- package/dist/types/generated/codama/instructions/payRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/releaseRental.d.ts +42 -49
- package/dist/types/generated/codama/instructions/releaseRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/reserveRental.d.ts +25 -21
- package/dist/types/generated/codama/instructions/reserveRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/scheduleRental.d.ts +114 -0
- package/dist/types/generated/codama/instructions/scheduleRental.d.ts.map +1 -0
- package/dist/types/generated/codama/instructions/setDelegate.d.ts +44 -0
- package/dist/types/generated/codama/instructions/setDelegate.d.ts.map +1 -0
- package/dist/types/generated/codama/instructions/updateBorrower.d.ts +5 -5
- package/dist/types/generated/codama/instructions/updateBorrower.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/updateConfig.d.ts +41 -47
- package/dist/types/generated/codama/instructions/updateConfig.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/updateContract.d.ts +37 -31
- package/dist/types/generated/codama/instructions/updateContract.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/updateOwner.d.ts +44 -0
- package/dist/types/generated/codama/instructions/updateOwner.d.ts.map +1 -0
- package/dist/types/generated/codama/programs/index.d.ts +1 -1
- package/dist/types/generated/codama/programs/srsly.d.ts +39 -30
- package/dist/types/generated/codama/programs/srsly.d.ts.map +1 -1
- package/dist/types/generated/codama/shared/index.d.ts +2 -2
- package/dist/types/generated/codama/types/atlasClaimed.d.ts +24 -0
- package/dist/types/generated/codama/types/atlasClaimed.d.ts.map +1 -0
- package/dist/types/generated/codama/types/borrowerInitialized.d.ts +17 -0
- package/dist/types/generated/codama/types/borrowerInitialized.d.ts.map +1 -0
- package/dist/types/generated/codama/types/cargoStats.d.ts +25 -0
- package/dist/types/generated/codama/types/cargoStats.d.ts.map +1 -0
- package/dist/types/generated/codama/types/contractClosed.d.ts +18 -0
- package/dist/types/generated/codama/types/contractClosed.d.ts.map +1 -0
- package/dist/types/generated/codama/types/contractCreated.d.ts +24 -0
- package/dist/types/generated/codama/types/contractCreated.d.ts.map +1 -0
- package/dist/types/generated/codama/types/contractDelegateSet.d.ts +22 -0
- package/dist/types/generated/codama/types/contractDelegateSet.d.ts.map +1 -0
- package/dist/types/generated/codama/types/contractPendingClose.d.ts +18 -0
- package/dist/types/generated/codama/types/contractPendingClose.d.ts.map +1 -0
- package/dist/types/generated/codama/types/contractUpdated.d.ts +27 -0
- package/dist/types/generated/codama/types/contractUpdated.d.ts.map +1 -0
- package/dist/types/generated/codama/types/discountAuthorization.d.ts +36 -0
- package/dist/types/generated/codama/types/discountAuthorization.d.ts.map +1 -0
- package/dist/types/generated/codama/types/fieldUpdate.d.ts +20 -0
- package/dist/types/generated/codama/types/fieldUpdate.d.ts.map +1 -0
- package/dist/types/generated/codama/types/index.d.ts +29 -7
- package/dist/types/generated/codama/types/index.d.ts.map +1 -1
- package/dist/types/generated/codama/types/miscStats.d.ts +27 -0
- package/dist/types/generated/codama/types/miscStats.d.ts.map +1 -0
- package/dist/types/generated/codama/types/movementStats.d.ts +23 -0
- package/dist/types/generated/codama/types/movementStats.d.ts.map +1 -0
- package/dist/types/generated/codama/types/optionalNonSystemPubkey.d.ts +17 -0
- package/dist/types/generated/codama/types/optionalNonSystemPubkey.d.ts.map +1 -0
- package/dist/types/generated/codama/types/paymentFrequency.d.ts +1 -1
- package/dist/types/generated/codama/types/rentalAccepted.d.ts +34 -0
- package/dist/types/generated/codama/types/rentalAccepted.d.ts.map +1 -0
- package/dist/types/generated/codama/types/rentalActivated.d.ts +18 -0
- package/dist/types/generated/codama/types/rentalActivated.d.ts.map +1 -0
- package/dist/types/generated/codama/types/rentalCancelled.d.ts +26 -0
- package/dist/types/generated/codama/types/rentalCancelled.d.ts.map +1 -0
- package/dist/types/generated/codama/types/rentalClaimed.d.ts +32 -0
- package/dist/types/generated/codama/types/rentalClaimed.d.ts.map +1 -0
- package/dist/types/generated/codama/types/rentalClosed.d.ts +19 -0
- package/dist/types/generated/codama/types/rentalClosed.d.ts.map +1 -0
- package/dist/types/generated/codama/types/rentalPaymentProcessed.d.ts +24 -0
- package/dist/types/generated/codama/types/rentalPaymentProcessed.d.ts.map +1 -0
- package/dist/types/generated/codama/types/rentalScheduled.d.ts +20 -0
- package/dist/types/generated/codama/types/rentalScheduled.d.ts.map +1 -0
- package/dist/types/generated/codama/types/rentalStatus.d.ts +19 -0
- package/dist/types/generated/codama/types/rentalStatus.d.ts.map +1 -0
- package/dist/types/generated/codama/types/reservationCreated.d.ts +26 -0
- package/dist/types/generated/codama/types/reservationCreated.d.ts.map +1 -0
- package/dist/types/generated/codama/types/reservationKnockoff.d.ts +26 -0
- package/dist/types/generated/codama/types/reservationKnockoff.d.ts.map +1 -0
- package/dist/types/generated/codama/types/schedule.d.ts +11 -11
- package/dist/types/generated/codama/types/shipCounts.d.ts +26 -0
- package/dist/types/generated/codama/types/shipCounts.d.ts.map +1 -0
- package/dist/types/generated/codama/types/shipStats.d.ts +24 -0
- package/dist/types/generated/codama/types/shipStats.d.ts.map +1 -0
- package/dist/types/generated/codama/types/signal.d.ts +21 -21
- package/dist/types/generated/codama/types/trigger.d.ts +23 -23
- package/dist/types/index.d.ts +20 -11
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/instructions/acceptRental.d.ts +31 -2
- package/dist/types/instructions/acceptRental.d.ts.map +1 -1
- package/dist/types/instructions/approveAffiliate.d.ts +7 -0
- package/dist/types/instructions/approveAffiliate.d.ts.map +1 -0
- package/dist/types/instructions/cancelRental.d.ts +5 -0
- package/dist/types/instructions/cancelRental.d.ts.map +1 -1
- package/dist/types/instructions/claimBorrower.d.ts +6 -0
- package/dist/types/instructions/claimBorrower.d.ts.map +1 -1
- package/dist/types/instructions/claimRental.d.ts +114 -0
- package/dist/types/instructions/claimRental.d.ts.map +1 -0
- package/dist/types/instructions/closeContract.d.ts.map +1 -1
- package/dist/types/instructions/closeRental.d.ts +12 -5
- package/dist/types/instructions/closeRental.d.ts.map +1 -1
- package/dist/types/instructions/createAffiliate.d.ts +66 -0
- package/dist/types/instructions/createAffiliate.d.ts.map +1 -0
- package/dist/types/instructions/createConfig.d.ts +10 -0
- package/dist/types/instructions/createConfig.d.ts.map +1 -1
- package/dist/types/instructions/createContract.d.ts +17 -9
- package/dist/types/instructions/createContract.d.ts.map +1 -1
- package/dist/types/instructions/deleteConfig.d.ts +4 -2
- package/dist/types/instructions/deleteConfig.d.ts.map +1 -1
- package/dist/types/instructions/deleteContract.d.ts +60 -0
- package/dist/types/instructions/deleteContract.d.ts.map +1 -0
- package/dist/types/instructions/index.d.ts +29 -0
- package/dist/types/instructions/index.d.ts.map +1 -0
- package/dist/types/instructions/invalidateRental.d.ts +86 -0
- package/dist/types/instructions/invalidateRental.d.ts.map +1 -0
- package/dist/types/instructions/ownerClaim.d.ts +72 -0
- package/dist/types/instructions/ownerClaim.d.ts.map +1 -0
- package/dist/types/instructions/ownerUpdate.d.ts +57 -0
- package/dist/types/instructions/ownerUpdate.d.ts.map +1 -0
- package/dist/types/instructions/releaseRental.d.ts +19 -39
- package/dist/types/instructions/releaseRental.d.ts.map +1 -1
- package/dist/types/instructions/removeAffiliate.d.ts +7 -0
- package/dist/types/instructions/removeAffiliate.d.ts.map +1 -0
- package/dist/types/instructions/reserveRental.d.ts.map +1 -1
- package/dist/types/instructions/setDelegate.d.ts +63 -0
- package/dist/types/instructions/setDelegate.d.ts.map +1 -0
- package/dist/types/instructions/updateAffiliate.d.ts +64 -0
- package/dist/types/instructions/updateAffiliate.d.ts.map +1 -0
- package/dist/types/instructions/updateBorrower.d.ts.map +1 -1
- package/dist/types/instructions/updateConfig.d.ts.map +1 -1
- package/dist/types/instructions/updateContract.d.ts +13 -4
- package/dist/types/instructions/updateContract.d.ts.map +1 -1
- package/dist/types/kit/index.d.ts +18 -0
- package/dist/types/kit/index.d.ts.map +1 -0
- package/dist/types/legacy/index.d.ts +90 -0
- package/dist/types/legacy/index.d.ts.map +1 -0
- package/dist/types/params/amount.d.ts +3 -3
- package/dist/types/pda/constants.d.ts +1 -0
- package/dist/types/pda/constants.d.ts.map +1 -1
- package/dist/types/pda/index.d.ts +4 -3
- package/dist/types/pda/index.d.ts.map +1 -1
- package/dist/types/pda/lookupTable.d.ts +29 -0
- package/dist/types/pda/lookupTable.d.ts.map +1 -0
- package/dist/types/pda/slyvault.d.ts +2 -23
- package/dist/types/pda/slyvault.d.ts.map +1 -1
- package/dist/types/pda/srsly.d.ts +17 -3
- package/dist/types/pda/srsly.d.ts.map +1 -1
- package/dist/types/pda/thread.d.ts +2 -2
- package/dist/types/utils/addresses.d.ts +7 -1
- package/dist/types/utils/addresses.d.ts.map +1 -1
- package/dist/types/utils/config.d.ts +48 -0
- package/dist/types/utils/config.d.ts.map +1 -1
- package/dist/types/utils/discountAuth.d.ts +90 -0
- package/dist/types/utils/discountAuth.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +6 -1
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/instructionResult.d.ts +57 -0
- package/dist/types/utils/instructionResult.d.ts.map +1 -0
- package/dist/types/utils/instructions.d.ts +16 -18
- package/dist/types/utils/instructions.d.ts.map +1 -1
- package/dist/types/utils/lookupTable.d.ts +48 -0
- package/dist/types/utils/lookupTable.d.ts.map +1 -0
- package/dist/types/utils/rental.d.ts +80 -0
- package/dist/types/utils/rental.d.ts.map +1 -0
- package/dist/types/utils/rpc.d.ts +37 -0
- package/dist/types/utils/rpc.d.ts.map +1 -0
- package/dist/types/utils/signer.d.ts +2 -2
- package/dist/types/utils/signer.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +40 -21
- package/dist/cjs/generated/codama/accounts/memberState.js +0 -78
- package/dist/cjs/generated/codama/accounts/memberState.js.map +0 -1
- package/dist/cjs/generated/codama/accounts/vaultState.js +0 -82
- package/dist/cjs/generated/codama/accounts/vaultState.js.map +0 -1
- package/dist/cjs/generated/codama/instructions/captureRental.js +0 -129
- package/dist/cjs/generated/codama/instructions/captureRental.js.map +0 -1
- package/dist/cjs/generated/codama/instructions/claimBorrowerPayments.js +0 -225
- package/dist/cjs/generated/codama/instructions/claimBorrowerPayments.js.map +0 -1
- package/dist/cjs/generated/codama/instructions/claimContractPayments.js.map +0 -1
- package/dist/cjs/generated/codama/instructions/closeBorrower.js +0 -84
- package/dist/cjs/generated/codama/instructions/closeBorrower.js.map +0 -1
- package/dist/cjs/generated/codama/instructions/deleteBorrower.js +0 -126
- package/dist/cjs/generated/codama/instructions/deleteBorrower.js.map +0 -1
- package/dist/cjs/generated/codama/instructions/discountBorrower.js +0 -118
- package/dist/cjs/generated/codama/instructions/discountBorrower.js.map +0 -1
- package/dist/cjs/generated/codama/types/capturedFlagData.js +0 -31
- package/dist/cjs/generated/codama/types/capturedFlagData.js.map +0 -1
- package/dist/cjs/generated/codama/types/memberConfig.js +0 -33
- package/dist/cjs/generated/codama/types/memberConfig.js.map +0 -1
- package/dist/cjs/generated/codama/types/memberType.js +0 -55
- package/dist/cjs/generated/codama/types/memberType.js.map +0 -1
- package/dist/cjs/instructions/captureRental.js +0 -85
- package/dist/cjs/instructions/captureRental.js.map +0 -1
- package/dist/cjs/instructions/claimBorrowerPayments.js +0 -69
- package/dist/cjs/instructions/claimBorrowerPayments.js.map +0 -1
- package/dist/cjs/instructions/claimContractPayments.js +0 -79
- package/dist/cjs/instructions/claimContractPayments.js.map +0 -1
- package/dist/cjs/instructions/closeBorrower.js +0 -60
- package/dist/cjs/instructions/closeBorrower.js.map +0 -1
- package/dist/cjs/instructions/deleteBorrower.js +0 -60
- package/dist/cjs/instructions/deleteBorrower.js.map +0 -1
- package/dist/cjs/instructions/discountBorrower.js +0 -75
- package/dist/cjs/instructions/discountBorrower.js.map +0 -1
- package/dist/esm/generated/codama/accounts/memberState.js +0 -66
- package/dist/esm/generated/codama/accounts/memberState.js.map +0 -1
- package/dist/esm/generated/codama/accounts/vaultState.js +0 -70
- package/dist/esm/generated/codama/accounts/vaultState.js.map +0 -1
- package/dist/esm/generated/codama/instructions/captureRental.js +0 -119
- package/dist/esm/generated/codama/instructions/captureRental.js.map +0 -1
- package/dist/esm/generated/codama/instructions/claimContractPayments.js.map +0 -1
- package/dist/esm/generated/codama/instructions/closeBorrower.js +0 -75
- package/dist/esm/generated/codama/instructions/closeBorrower.js.map +0 -1
- package/dist/esm/generated/codama/instructions/deleteBorrower.js +0 -116
- package/dist/esm/generated/codama/instructions/deleteBorrower.js.map +0 -1
- package/dist/esm/generated/codama/instructions/discountBorrower.js +0 -108
- package/dist/esm/generated/codama/instructions/discountBorrower.js.map +0 -1
- package/dist/esm/generated/codama/types/capturedFlagData.js +0 -26
- package/dist/esm/generated/codama/types/capturedFlagData.js.map +0 -1
- package/dist/esm/generated/codama/types/memberConfig.js +0 -28
- package/dist/esm/generated/codama/types/memberConfig.js.map +0 -1
- package/dist/esm/generated/codama/types/memberType.js +0 -48
- package/dist/esm/generated/codama/types/memberType.js.map +0 -1
- package/dist/esm/instructions/captureRental.js +0 -82
- package/dist/esm/instructions/captureRental.js.map +0 -1
- package/dist/esm/instructions/claimContractPayments.js +0 -76
- package/dist/esm/instructions/claimContractPayments.js.map +0 -1
- package/dist/esm/instructions/closeBorrower.js +0 -57
- package/dist/esm/instructions/closeBorrower.js.map +0 -1
- package/dist/esm/instructions/deleteBorrower.js +0 -57
- package/dist/esm/instructions/deleteBorrower.js.map +0 -1
- package/dist/esm/instructions/discountBorrower.js +0 -72
- package/dist/esm/instructions/discountBorrower.js.map +0 -1
- package/dist/types/generated/codama/accounts/memberState.d.ts +0 -58
- package/dist/types/generated/codama/accounts/memberState.d.ts.map +0 -1
- package/dist/types/generated/codama/accounts/vaultState.d.ts +0 -66
- package/dist/types/generated/codama/accounts/vaultState.d.ts.map +0 -1
- package/dist/types/generated/codama/instructions/captureRental.d.ts +0 -59
- package/dist/types/generated/codama/instructions/captureRental.d.ts.map +0 -1
- package/dist/types/generated/codama/instructions/claimBorrowerPayments.d.ts +0 -75
- package/dist/types/generated/codama/instructions/claimBorrowerPayments.d.ts.map +0 -1
- package/dist/types/generated/codama/instructions/claimContractPayments.d.ts +0 -98
- package/dist/types/generated/codama/instructions/claimContractPayments.d.ts.map +0 -1
- package/dist/types/generated/codama/instructions/closeBorrower.d.ts +0 -43
- package/dist/types/generated/codama/instructions/closeBorrower.d.ts.map +0 -1
- package/dist/types/generated/codama/instructions/deleteBorrower.d.ts +0 -55
- package/dist/types/generated/codama/instructions/deleteBorrower.d.ts.map +0 -1
- package/dist/types/generated/codama/instructions/discountBorrower.d.ts +0 -56
- package/dist/types/generated/codama/instructions/discountBorrower.d.ts.map +0 -1
- package/dist/types/generated/codama/types/capturedFlagData.d.ts +0 -35
- package/dist/types/generated/codama/types/capturedFlagData.d.ts.map +0 -1
- package/dist/types/generated/codama/types/memberConfig.d.ts +0 -33
- package/dist/types/generated/codama/types/memberConfig.d.ts.map +0 -1
- package/dist/types/generated/codama/types/memberType.d.ts +0 -48
- package/dist/types/generated/codama/types/memberType.d.ts.map +0 -1
- package/dist/types/instructions/captureRental.d.ts +0 -58
- package/dist/types/instructions/captureRental.d.ts.map +0 -1
- package/dist/types/instructions/claimBorrowerPayments.d.ts +0 -59
- package/dist/types/instructions/claimBorrowerPayments.d.ts.map +0 -1
- package/dist/types/instructions/claimContractPayments.d.ts +0 -78
- package/dist/types/instructions/claimContractPayments.d.ts.map +0 -1
- package/dist/types/instructions/closeBorrower.d.ts +0 -45
- package/dist/types/instructions/closeBorrower.d.ts.map +0 -1
- package/dist/types/instructions/deleteBorrower.d.ts +0 -53
- package/dist/types/instructions/deleteBorrower.d.ts.map +0 -1
- package/dist/types/instructions/discountBorrower.d.ts +0 -64
- package/dist/types/instructions/discountBorrower.d.ts.map +0 -1
package/dist/esm/demos.js
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
export const createContractDemo = {
|
|
11
11
|
tabName: 'create',
|
|
12
12
|
description: 'Create a new rental contract',
|
|
13
|
-
imports: `import { createContract } from '@wuwei-labs/srsly';`,
|
|
13
|
+
imports: `import { createContract } from '@wuwei-labs/srsly/kit';`,
|
|
14
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
15
|
+
import { setSdkConfig, createContract } from '@wuwei-labs/srsly/legacy';
|
|
16
|
+
|
|
17
|
+
setSdkConfig({ PublicKey });`,
|
|
14
18
|
instruction: `const instruction = await createContract({
|
|
15
19
|
owner: {{signerType}},
|
|
16
20
|
fleet: "FLEET_ADDRESS",
|
|
@@ -18,39 +22,85 @@ export const createContractDemo = {
|
|
|
18
22
|
paymentsFreq: "@daily",
|
|
19
23
|
durationMin: { days: 1 },
|
|
20
24
|
durationMax: { days: 30 },
|
|
21
|
-
|
|
22
|
-
disableReservations: false
|
|
25
|
+
cancelDelayMin: { hours: 1 }
|
|
23
26
|
});`,
|
|
24
27
|
};
|
|
25
28
|
export const closeContractDemo = {
|
|
26
29
|
tabName: 'close',
|
|
27
30
|
description: 'Close an existing rental contract (idempotent)',
|
|
28
|
-
imports: `import { closeContract } from '@wuwei-labs/srsly';`,
|
|
31
|
+
imports: `import { closeContract } from '@wuwei-labs/srsly/kit';`,
|
|
32
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
33
|
+
import { setSdkConfig, closeContract } from '@wuwei-labs/srsly/legacy';
|
|
34
|
+
|
|
35
|
+
setSdkConfig({ PublicKey });`,
|
|
29
36
|
instruction: `const instruction = await closeContract({
|
|
30
37
|
owner: {{signerType}},
|
|
31
|
-
fleet: "FLEET_ADDRESS"
|
|
38
|
+
fleet: "FLEET_ADDRESS"
|
|
39
|
+
});`,
|
|
40
|
+
};
|
|
41
|
+
export const updateContractDemo = {
|
|
42
|
+
tabName: 'update',
|
|
43
|
+
description: 'Update contract settings (rate, duration, etc.)',
|
|
44
|
+
imports: `import { updateContract } from '@wuwei-labs/srsly/kit';`,
|
|
45
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
46
|
+
import { setSdkConfig, updateContract } from '@wuwei-labs/srsly/legacy';
|
|
47
|
+
|
|
48
|
+
setSdkConfig({ PublicKey });`,
|
|
49
|
+
instruction: `const instruction = await updateContract({
|
|
50
|
+
owner: {{signerType}},
|
|
51
|
+
contract: "CONTRACT_ADDRESS",
|
|
52
|
+
// Omit fields to keep current values
|
|
53
|
+
rate: { atlas: 15 },
|
|
54
|
+
durationMin: { days: 2 },
|
|
55
|
+
durationMax: { days: 60 },
|
|
56
|
+
paymentsFreq: "@weekly",
|
|
57
|
+
cancelDelayMin: { seconds: 0 },
|
|
58
|
+
reservationsDisabled: false,
|
|
59
|
+
automationRequired: true
|
|
60
|
+
});`,
|
|
61
|
+
};
|
|
62
|
+
export const setDelegateDemo = {
|
|
63
|
+
tabName: 'delegate',
|
|
64
|
+
description: 'Set or remove delegate for rate updates',
|
|
65
|
+
imports: `import { setDelegate } from '@wuwei-labs/srsly/kit';`,
|
|
66
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
67
|
+
import { setSdkConfig, setDelegate } from '@wuwei-labs/srsly/legacy';
|
|
68
|
+
|
|
69
|
+
setSdkConfig({ PublicKey });`,
|
|
70
|
+
instruction: `const instruction = await setDelegate({
|
|
71
|
+
owner: {{signerType}},
|
|
72
|
+
contract: "CONTRACT_ADDRESS",
|
|
73
|
+
delegate: "DELEGATE_ADDRESS"
|
|
32
74
|
});`,
|
|
33
75
|
};
|
|
34
76
|
// ============================================================================
|
|
35
77
|
// Borrower Demos
|
|
36
78
|
// ============================================================================
|
|
37
|
-
export const
|
|
38
|
-
tabName: '
|
|
39
|
-
description: '
|
|
40
|
-
imports: `import {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
79
|
+
export const claimBorrowerDemo = {
|
|
80
|
+
tabName: 'claim',
|
|
81
|
+
description: 'Claim borrower ATLAS refunds (optionally close account)',
|
|
82
|
+
imports: `import { claimBorrower } from '@wuwei-labs/srsly/kit';`,
|
|
83
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
84
|
+
import { setSdkConfig, claimBorrower } from '@wuwei-labs/srsly/legacy';
|
|
85
|
+
|
|
86
|
+
setSdkConfig({ PublicKey });`,
|
|
87
|
+
instruction: `const instruction = await claimBorrower({
|
|
88
|
+
borrower: {{signerType}},
|
|
89
|
+
close: false // Set to true to close BorrowerState after claiming
|
|
44
90
|
});`,
|
|
45
91
|
};
|
|
46
92
|
export const updateBorrowerDemo = {
|
|
47
93
|
tabName: 'update',
|
|
48
94
|
description: 'Update borrower settings (profile, refund destination)',
|
|
49
|
-
imports: `import { updateBorrower } from '@wuwei-labs/srsly';`,
|
|
95
|
+
imports: `import { updateBorrower } from '@wuwei-labs/srsly/kit';`,
|
|
96
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
97
|
+
import { setSdkConfig, updateBorrower } from '@wuwei-labs/srsly/legacy';
|
|
98
|
+
|
|
99
|
+
setSdkConfig({ PublicKey });`,
|
|
50
100
|
instruction: `const instruction = await updateBorrower({
|
|
51
101
|
borrower: {{signerType}},
|
|
52
|
-
borrowerProfile: "NEW_BORROWER_PROFILE_ADDRESS",
|
|
53
|
-
refundDestination: "TOKEN_ACCOUNT_ADDRESS"
|
|
102
|
+
borrowerProfile: "NEW_BORROWER_PROFILE_ADDRESS",
|
|
103
|
+
refundDestination: "TOKEN_ACCOUNT_ADDRESS"
|
|
54
104
|
});`,
|
|
55
105
|
};
|
|
56
106
|
// ============================================================================
|
|
@@ -59,60 +109,293 @@ export const updateBorrowerDemo = {
|
|
|
59
109
|
export const acceptRentalDemo = {
|
|
60
110
|
tabName: 'accept',
|
|
61
111
|
description: 'Accept a rental offer from an existing contract',
|
|
62
|
-
imports: `import { acceptRental } from '@wuwei-labs/srsly';`,
|
|
112
|
+
imports: `import { acceptRental, createDiscount } from '@wuwei-labs/srsly/kit';`,
|
|
113
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
114
|
+
import { setSdkConfig, acceptRental, createDiscount } from '@wuwei-labs/srsly/legacy';
|
|
115
|
+
|
|
116
|
+
setSdkConfig({ PublicKey });`,
|
|
63
117
|
instruction: `const instructions = await acceptRental({
|
|
64
118
|
borrower: {{signerType}},
|
|
65
|
-
borrowerProfile: "
|
|
119
|
+
borrowerProfile: "BORROWER_PLAYER_PROFILE_ADDRESS",
|
|
66
120
|
contract: "CONTRACT_ADDRESS",
|
|
67
121
|
duration: { days: 7 },
|
|
68
|
-
computeUnits:
|
|
122
|
+
computeUnits: 450_000
|
|
69
123
|
});`,
|
|
70
124
|
};
|
|
71
125
|
export const cancelRentalDemo = {
|
|
72
126
|
tabName: 'cancel',
|
|
73
127
|
description: 'Cancel an active rental',
|
|
74
|
-
imports: `import { cancelRental } from '@wuwei-labs/srsly';`,
|
|
128
|
+
imports: `import { cancelRental } from '@wuwei-labs/srsly/kit';`,
|
|
129
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
130
|
+
import { setSdkConfig, cancelRental } from '@wuwei-labs/srsly/legacy';
|
|
131
|
+
|
|
132
|
+
setSdkConfig({ PublicKey });`,
|
|
75
133
|
instruction: `const instruction = await cancelRental({
|
|
76
134
|
borrower: {{signerType}},
|
|
77
|
-
contract: "CONTRACT_ADDRESS"
|
|
78
|
-
cancelDelay: { hours: 1 }
|
|
135
|
+
contract: "CONTRACT_ADDRESS"
|
|
136
|
+
// cancelDelay: { hours: 1 } // Optional - defaults to 1 hour. Use 0 for instant
|
|
137
|
+
// rentalSlot: 0 // Optional - auto-detected from borrower's rental
|
|
79
138
|
});`,
|
|
80
139
|
};
|
|
81
140
|
export const closeRentalDemo = {
|
|
82
141
|
tabName: 'close',
|
|
83
142
|
description: 'Close a completed rental',
|
|
84
|
-
imports: `import { closeRental } from '@wuwei-labs/srsly';`,
|
|
143
|
+
imports: `import { closeRental } from '@wuwei-labs/srsly/kit';`,
|
|
144
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
145
|
+
import { setSdkConfig, closeRental } from '@wuwei-labs/srsly/legacy';
|
|
146
|
+
|
|
147
|
+
setSdkConfig({ PublicKey });`,
|
|
85
148
|
instruction: `const instruction = await closeRental({
|
|
86
149
|
payer: {{signerType}},
|
|
87
|
-
borrower: "BORROWER_ADDRESS",
|
|
88
150
|
contract: "CONTRACT_ADDRESS"
|
|
151
|
+
// borrower: "BORROWER_ADDRESS" // Optional - auto-detected from rental state
|
|
89
152
|
});`,
|
|
90
153
|
};
|
|
91
154
|
export const releaseRentalDemo = {
|
|
92
155
|
tabName: 'release',
|
|
93
156
|
description: 'Release a rental (emergency - works even if contract deleted)',
|
|
94
|
-
imports: `import { releaseRental } from '@wuwei-labs/srsly';`,
|
|
157
|
+
imports: `import { releaseRental } from '@wuwei-labs/srsly/kit';`,
|
|
158
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
159
|
+
import { setSdkConfig, releaseRental } from '@wuwei-labs/srsly/legacy';
|
|
160
|
+
|
|
161
|
+
setSdkConfig({ PublicKey });`,
|
|
95
162
|
instruction: `const instruction = await releaseRental({
|
|
96
163
|
signer: {{signerType}},
|
|
97
164
|
fleet: "FLEET_ADDRESS",
|
|
98
|
-
borrower: "
|
|
99
|
-
borrowerProfile: "
|
|
100
|
-
faction: "mud"
|
|
101
|
-
// Thread is automatically deleted if it exists
|
|
165
|
+
borrower: "BORROWER_WALLET_ADDRESS",
|
|
166
|
+
borrowerProfile: "BORROWER_PLAYER_PROFILE_ADDRESS",
|
|
167
|
+
faction: "mud" // mud, oni, or ustur
|
|
102
168
|
});`,
|
|
103
169
|
};
|
|
104
170
|
export const reserveRentalDemo = {
|
|
105
171
|
tabName: 'reserve',
|
|
106
172
|
description: 'Reserve a rental contract using points or ATLAS',
|
|
107
|
-
imports: `import { reserveRental } from '@wuwei-labs/srsly';`,
|
|
173
|
+
imports: `import { reserveRental } from '@wuwei-labs/srsly/kit';`,
|
|
174
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
175
|
+
import { setSdkConfig, reserveRental } from '@wuwei-labs/srsly/legacy';
|
|
176
|
+
|
|
177
|
+
setSdkConfig({ PublicKey });`,
|
|
108
178
|
instruction: `const instruction = await reserveRental({
|
|
109
179
|
challenger: {{signerType}},
|
|
110
180
|
contract: "CONTRACT_ADDRESS",
|
|
111
|
-
amount: 5
|
|
112
|
-
useAtlas:
|
|
113
|
-
computeUnits: 200_000
|
|
181
|
+
amount: 5 // Amount in point-equivalents
|
|
182
|
+
// useAtlas: true // Uncomment to pay with ATLAS instead of points
|
|
114
183
|
});`,
|
|
115
184
|
};
|
|
185
|
+
export const claimRentalDemo = {
|
|
186
|
+
tabName: 'claim',
|
|
187
|
+
description: 'Claim rental slot as crowned winner (reservation holder)',
|
|
188
|
+
imports: `import { claimRental, createDiscount } from '@wuwei-labs/srsly/kit';`,
|
|
189
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
190
|
+
import { setSdkConfig, claimRental, createDiscount } from '@wuwei-labs/srsly/legacy';
|
|
191
|
+
|
|
192
|
+
setSdkConfig({ PublicKey });`,
|
|
193
|
+
instruction: `const instructions = await claimRental({
|
|
194
|
+
borrower: {{signerType}},
|
|
195
|
+
borrowerProfile: "BORROWER_PLAYER_PROFILE_ADDRESS",
|
|
196
|
+
contract: "CONTRACT_ADDRESS",
|
|
197
|
+
duration: { days: 7 }
|
|
198
|
+
});`,
|
|
199
|
+
};
|
|
200
|
+
// ============================================================================
|
|
201
|
+
// Owner Demos
|
|
202
|
+
// ============================================================================
|
|
203
|
+
export const ownerClaimDemo = {
|
|
204
|
+
tabName: 'claim',
|
|
205
|
+
description: 'Claim accumulated ATLAS from owner managed token account',
|
|
206
|
+
imports: `import { ownerClaim } from '@wuwei-labs/srsly/kit';`,
|
|
207
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
208
|
+
import { setSdkConfig, ownerClaim } from '@wuwei-labs/srsly/legacy';
|
|
209
|
+
|
|
210
|
+
setSdkConfig({ PublicKey });`,
|
|
211
|
+
instruction: `const instruction = await ownerClaim({
|
|
212
|
+
owner: {{signerType}},
|
|
213
|
+
close: false // Set to true to close OwnerState (requires no active contracts)
|
|
214
|
+
});`,
|
|
215
|
+
};
|
|
216
|
+
export const ownerUpdateDemo = {
|
|
217
|
+
tabName: 'update',
|
|
218
|
+
description: 'Transfer OwnerState authority to a new address',
|
|
219
|
+
imports: `import { ownerUpdate } from '@wuwei-labs/srsly/kit';`,
|
|
220
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
221
|
+
import { setSdkConfig, ownerUpdate } from '@wuwei-labs/srsly/legacy';
|
|
222
|
+
|
|
223
|
+
setSdkConfig({ PublicKey });`,
|
|
224
|
+
instruction: `const instruction = await ownerUpdate({
|
|
225
|
+
authority: {{signerType}},
|
|
226
|
+
owner: "OWNER_WALLET_ADDRESS",
|
|
227
|
+
newAuthority: "NEW_AUTHORITY_ADDRESS"
|
|
228
|
+
});`,
|
|
229
|
+
};
|
|
230
|
+
export const fetchOwnerDemo = {
|
|
231
|
+
tabName: 'fetch',
|
|
232
|
+
description: 'Fetch owner state by address',
|
|
233
|
+
imports: `import { fetchOwner } from '@wuwei-labs/srsly/kit';`,
|
|
234
|
+
legacyImports: `import { fetchOwner } from '@wuwei-labs/srsly/legacy';`,
|
|
235
|
+
instruction: `const result = await fetchOwner("OWNER_ADDRESS");
|
|
236
|
+
console.log(result);`,
|
|
237
|
+
isFetchOperation: true,
|
|
238
|
+
};
|
|
239
|
+
export const fetchAllOwnersDemo = {
|
|
240
|
+
tabName: 'fetch all',
|
|
241
|
+
description: 'Fetch all owner states from the program',
|
|
242
|
+
imports: `import { fetchAllOwners } from '@wuwei-labs/srsly/kit';`,
|
|
243
|
+
legacyImports: `import { fetchAllOwners } from '@wuwei-labs/srsly/legacy';`,
|
|
244
|
+
instruction: `const result = await fetchAllOwners();
|
|
245
|
+
console.log(result);`,
|
|
246
|
+
isFetchOperation: true,
|
|
247
|
+
};
|
|
248
|
+
// ============================================================================
|
|
249
|
+
// Fetch Demos (Read-only operations)
|
|
250
|
+
// ============================================================================
|
|
251
|
+
export const fetchContractDemo = {
|
|
252
|
+
tabName: 'fetch',
|
|
253
|
+
description: 'Fetch contract state by address',
|
|
254
|
+
imports: `import { fetchContract } from '@wuwei-labs/srsly/kit';`,
|
|
255
|
+
legacyImports: `import { fetchContract } from '@wuwei-labs/srsly/legacy';`,
|
|
256
|
+
instruction: `const result = await fetchContract("CONTRACT_ADDRESS");
|
|
257
|
+
console.log(result);`,
|
|
258
|
+
isFetchOperation: true,
|
|
259
|
+
};
|
|
260
|
+
export const fetchAllContractsDemo = {
|
|
261
|
+
tabName: 'fetch all',
|
|
262
|
+
description: 'Fetch all contract states from the program',
|
|
263
|
+
imports: `import { fetchAllContracts } from '@wuwei-labs/srsly/kit';`,
|
|
264
|
+
legacyImports: `import { fetchAllContracts } from '@wuwei-labs/srsly/legacy';`,
|
|
265
|
+
instruction: `const result = await fetchAllContracts();
|
|
266
|
+
console.log(result);`,
|
|
267
|
+
isFetchOperation: true,
|
|
268
|
+
};
|
|
269
|
+
export const fetchBorrowerDemo = {
|
|
270
|
+
tabName: 'fetch',
|
|
271
|
+
description: 'Fetch borrower state by address',
|
|
272
|
+
imports: `import { fetchBorrower } from '@wuwei-labs/srsly/kit';`,
|
|
273
|
+
legacyImports: `import { fetchBorrower } from '@wuwei-labs/srsly/legacy';`,
|
|
274
|
+
instruction: `const result = await fetchBorrower("BORROWER_STATE_ADDRESS");
|
|
275
|
+
console.log(result);`,
|
|
276
|
+
isFetchOperation: true,
|
|
277
|
+
};
|
|
278
|
+
export const fetchAllBorrowersDemo = {
|
|
279
|
+
tabName: 'fetch all',
|
|
280
|
+
description: 'Fetch all borrower states from the program',
|
|
281
|
+
imports: `import { fetchAllBorrowers } from '@wuwei-labs/srsly/kit';`,
|
|
282
|
+
legacyImports: `import { fetchAllBorrowers } from '@wuwei-labs/srsly/legacy';`,
|
|
283
|
+
instruction: `const result = await fetchAllBorrowers();
|
|
284
|
+
console.log(result);`,
|
|
285
|
+
isFetchOperation: true,
|
|
286
|
+
};
|
|
287
|
+
export const fetchRentalDemo = {
|
|
288
|
+
tabName: 'fetch',
|
|
289
|
+
description: 'Fetch rental state by address',
|
|
290
|
+
imports: `import { fetchRental } from '@wuwei-labs/srsly/kit';`,
|
|
291
|
+
legacyImports: `import { fetchRental } from '@wuwei-labs/srsly/legacy';`,
|
|
292
|
+
instruction: `const result = await fetchRental("RENTAL_STATE_ADDRESS");
|
|
293
|
+
console.log(result);`,
|
|
294
|
+
isFetchOperation: true,
|
|
295
|
+
};
|
|
296
|
+
export const fetchAllRentalsDemo = {
|
|
297
|
+
tabName: 'fetch all',
|
|
298
|
+
description: 'Fetch all rental states from the program',
|
|
299
|
+
imports: `import { fetchAllRentals } from '@wuwei-labs/srsly/kit';`,
|
|
300
|
+
legacyImports: `import { fetchAllRentals } from '@wuwei-labs/srsly/legacy';`,
|
|
301
|
+
instruction: `const result = await fetchAllRentals();
|
|
302
|
+
console.log(result);`,
|
|
303
|
+
isFetchOperation: true,
|
|
304
|
+
};
|
|
305
|
+
// ============================================================================
|
|
306
|
+
// Affiliate Demos
|
|
307
|
+
// ============================================================================
|
|
308
|
+
export const createAffiliateDemo = {
|
|
309
|
+
tabName: 'create',
|
|
310
|
+
description: 'Create a pending affiliate link to earn a share of fees',
|
|
311
|
+
imports: `import { createAffiliate } from '@wuwei-labs/srsly/kit';`,
|
|
312
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
313
|
+
import { setSdkConfig, createAffiliate } from '@wuwei-labs/srsly/legacy';
|
|
314
|
+
|
|
315
|
+
setSdkConfig({ PublicKey });`,
|
|
316
|
+
instruction: `const instruction = await createAffiliate({
|
|
317
|
+
affiliate: {{signerType}},
|
|
318
|
+
parentMemberState: "PARENT_MEMBER_STATE_PDA"
|
|
319
|
+
// discountAuthority: "DISCOUNT_AUTHORITY_ADDRESS" // Optional
|
|
320
|
+
});`,
|
|
321
|
+
};
|
|
322
|
+
export const approveAffiliateDemo = {
|
|
323
|
+
tabName: 'approve',
|
|
324
|
+
description: 'Approve and activate a pending affiliate',
|
|
325
|
+
imports: `import { approveAffiliate } from '@wuwei-labs/srsly/kit';`,
|
|
326
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
327
|
+
import { setSdkConfig, approveAffiliate } from '@wuwei-labs/srsly/legacy';
|
|
328
|
+
|
|
329
|
+
setSdkConfig({ PublicKey });`,
|
|
330
|
+
instruction: `const instruction = await approveAffiliate({
|
|
331
|
+
authority: {{signerType}},
|
|
332
|
+
vault: "VAULT_ADDRESS",
|
|
333
|
+
memberState: "PARENT_MEMBER_STATE_ADDRESS",
|
|
334
|
+
affiliateState: "AFFILIATE_STATE_ADDRESS",
|
|
335
|
+
percentage: 20 // 20% of parent's allocation
|
|
336
|
+
});`,
|
|
337
|
+
};
|
|
338
|
+
export const removeAffiliateDemo = {
|
|
339
|
+
tabName: 'remove',
|
|
340
|
+
description: 'Remove an affiliate and claim remaining balance',
|
|
341
|
+
imports: `import { removeAffiliate } from '@wuwei-labs/srsly/kit';`,
|
|
342
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
343
|
+
import { setSdkConfig, removeAffiliate } from '@wuwei-labs/srsly/legacy';
|
|
344
|
+
|
|
345
|
+
setSdkConfig({ PublicKey });`,
|
|
346
|
+
instruction: `const instruction = await removeAffiliate({
|
|
347
|
+
authority: {{signerType}},
|
|
348
|
+
mint: "ATLAS_MINT_ADDRESS",
|
|
349
|
+
vault: "VAULT_ADDRESS",
|
|
350
|
+
affiliateAuthority: "AFFILIATE_AUTHORITY_ADDRESS",
|
|
351
|
+
affiliateState: "AFFILIATE_STATE_ADDRESS"
|
|
352
|
+
});`,
|
|
353
|
+
};
|
|
354
|
+
export const updateAffiliateDemo = {
|
|
355
|
+
tabName: 'update',
|
|
356
|
+
description: 'Update affiliate settings (discount authority, authority transfer)',
|
|
357
|
+
imports: `import { updateAffiliate } from '@wuwei-labs/srsly/kit';`,
|
|
358
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
359
|
+
import { setSdkConfig, updateAffiliate } from '@wuwei-labs/srsly/legacy';
|
|
360
|
+
|
|
361
|
+
setSdkConfig({ PublicKey });`,
|
|
362
|
+
instruction: `const instruction = await updateAffiliate({
|
|
363
|
+
authority: {{signerType}},
|
|
364
|
+
affiliateState: "AFFILIATE_STATE_PDA",
|
|
365
|
+
discountAuthority: "NEW_DISCOUNT_AUTHORITY_ADDRESS"
|
|
366
|
+
// discountAuthority: null // Pass null to clear discount authority
|
|
367
|
+
});`,
|
|
368
|
+
};
|
|
369
|
+
export const claimAffiliateDemo = {
|
|
370
|
+
tabName: 'claim',
|
|
371
|
+
description: 'Claim accumulated affiliate earnings (auto-fetches member states)',
|
|
372
|
+
imports: `import { claim } from '@wuwei-labs/srsly/kit';`,
|
|
373
|
+
legacyImports: `import { PublicKey } from '@solana/web3.js';
|
|
374
|
+
import { setSdkConfig, claim } from '@wuwei-labs/srsly/legacy';
|
|
375
|
+
|
|
376
|
+
setSdkConfig({ PublicKey });`,
|
|
377
|
+
instruction: `const instruction = await claim({
|
|
378
|
+
payer: {{signerType}}
|
|
379
|
+
});`,
|
|
380
|
+
};
|
|
381
|
+
export const fetchAllMembersDemo = {
|
|
382
|
+
tabName: 'fetch all',
|
|
383
|
+
description: 'Fetch all member/affiliate states from the program',
|
|
384
|
+
imports: `import { fetchAllMembers } from '@wuwei-labs/srsly/kit';`,
|
|
385
|
+
legacyImports: `import { fetchAllMembers } from '@wuwei-labs/srsly/legacy';`,
|
|
386
|
+
instruction: `const result = await fetchAllMembers();
|
|
387
|
+
console.log(result);`,
|
|
388
|
+
isFetchOperation: true,
|
|
389
|
+
};
|
|
390
|
+
export const fetchMemberDemo = {
|
|
391
|
+
tabName: 'fetch',
|
|
392
|
+
description: 'Fetch affiliate/member state by address',
|
|
393
|
+
imports: `import { fetchMember } from '@wuwei-labs/srsly/kit';`,
|
|
394
|
+
legacyImports: `import { fetchMember } from '@wuwei-labs/srsly/legacy';`,
|
|
395
|
+
instruction: `const result = await fetchMember("MEMBER_STATE_ADDRESS");
|
|
396
|
+
console.log(result);`,
|
|
397
|
+
isFetchOperation: true,
|
|
398
|
+
};
|
|
116
399
|
// ============================================================================
|
|
117
400
|
// Demo Collections
|
|
118
401
|
// ============================================================================
|
|
@@ -120,12 +403,32 @@ export const reserveRentalDemo = {
|
|
|
120
403
|
export const ALL_DEMOS = {
|
|
121
404
|
createContract: createContractDemo,
|
|
122
405
|
closeContract: closeContractDemo,
|
|
123
|
-
|
|
406
|
+
updateContract: updateContractDemo,
|
|
407
|
+
setDelegate: setDelegateDemo,
|
|
408
|
+
claimBorrower: claimBorrowerDemo,
|
|
124
409
|
updateBorrower: updateBorrowerDemo,
|
|
125
410
|
acceptRental: acceptRentalDemo,
|
|
126
411
|
cancelRental: cancelRentalDemo,
|
|
127
412
|
closeRental: closeRentalDemo,
|
|
128
413
|
releaseRental: releaseRentalDemo,
|
|
129
414
|
reserveRental: reserveRentalDemo,
|
|
415
|
+
claimRental: claimRentalDemo,
|
|
416
|
+
fetchContract: fetchContractDemo,
|
|
417
|
+
fetchAllContracts: fetchAllContractsDemo,
|
|
418
|
+
fetchBorrower: fetchBorrowerDemo,
|
|
419
|
+
fetchAllBorrowers: fetchAllBorrowersDemo,
|
|
420
|
+
fetchRental: fetchRentalDemo,
|
|
421
|
+
fetchAllRentals: fetchAllRentalsDemo,
|
|
422
|
+
createAffiliate: createAffiliateDemo,
|
|
423
|
+
approveAffiliate: approveAffiliateDemo,
|
|
424
|
+
removeAffiliate: removeAffiliateDemo,
|
|
425
|
+
updateAffiliate: updateAffiliateDemo,
|
|
426
|
+
claimAffiliate: claimAffiliateDemo,
|
|
427
|
+
fetchMember: fetchMemberDemo,
|
|
428
|
+
fetchAllMembers: fetchAllMembersDemo,
|
|
429
|
+
ownerClaim: ownerClaimDemo,
|
|
430
|
+
ownerUpdate: ownerUpdateDemo,
|
|
431
|
+
fetchOwner: fetchOwnerDemo,
|
|
432
|
+
fetchAllOwners: fetchAllOwnersDemo,
|
|
130
433
|
};
|
|
131
434
|
//# sourceMappingURL=demos.js.map
|
package/dist/esm/demos.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demos.js","sourceRoot":"","sources":["../../src/demos.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"demos.js","sourceRoot":"","sources":["../../src/demos.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,8BAA8B;IAC3C,OAAO,EAAE,yDAAyD;IAClE,aAAa,EAAE;;;6BAGY;IAC3B,WAAW,EAAE;;;;;;;;IAQX;CACH,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAiB;IAC7C,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,gDAAgD;IAC7D,OAAO,EAAE,wDAAwD;IACjE,aAAa,EAAE;;;6BAGY;IAC3B,WAAW,EAAE;;;IAGX;CACH,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,iDAAiD;IAC9D,OAAO,EAAE,yDAAyD;IAClE,aAAa,EAAE;;;6BAGY;IAC3B,WAAW,EAAE;;;;;;;;;;;IAWX;CACH,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,y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
|
*/
|
|
8
|
-
import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBytesDecoder, getBytesEncoder, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from
|
|
9
|
-
import { getCapturedFlagDataDecoder, getCapturedFlagDataEncoder, } from '../types';
|
|
8
|
+
import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from "@solana/kit";
|
|
10
9
|
export const BORROWER_STATE_DISCRIMINATOR = new Uint8Array([
|
|
11
10
|
160, 47, 174, 209, 255, 213, 193, 235,
|
|
12
11
|
]);
|
|
13
12
|
export function getBorrowerStateDiscriminatorBytes() {
|
|
14
13
|
return fixEncoderSize(getBytesEncoder(), 8).encode(BORROWER_STATE_DISCRIMINATOR);
|
|
15
14
|
}
|
|
15
|
+
/** Gets the encoder for {@link BorrowerStateArgs} account data. */
|
|
16
16
|
export function getBorrowerStateEncoder() {
|
|
17
17
|
return transformEncoder(getStructEncoder([
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
['managedTokenAccount', getAddressEncoder()],
|
|
18
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
19
|
+
["version", getU32Encoder()],
|
|
20
|
+
["bump", getU8Encoder()],
|
|
21
|
+
["borrower", getAddressEncoder()],
|
|
22
|
+
["borrowerProfile", getOptionEncoder(getAddressEncoder())],
|
|
23
|
+
["activeRentals", getArrayEncoder(getAddressEncoder())],
|
|
24
|
+
["activeRentalCount", getU16Encoder()],
|
|
25
|
+
["capturePoints", getU32Encoder()],
|
|
26
|
+
["managedTokenAccount", getAddressEncoder()],
|
|
27
|
+
["createdAt", getI64Encoder()],
|
|
28
|
+
["updatedAt", getI64Encoder()],
|
|
30
29
|
]), (value) => ({ ...value, discriminator: BORROWER_STATE_DISCRIMINATOR }));
|
|
31
30
|
}
|
|
31
|
+
/** Gets the decoder for {@link BorrowerState} account data. */
|
|
32
32
|
export function getBorrowerStateDecoder() {
|
|
33
33
|
return getStructDecoder([
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
['managedTokenAccount', getAddressDecoder()],
|
|
34
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
35
|
+
["version", getU32Decoder()],
|
|
36
|
+
["bump", getU8Decoder()],
|
|
37
|
+
["borrower", getAddressDecoder()],
|
|
38
|
+
["borrowerProfile", getOptionDecoder(getAddressDecoder())],
|
|
39
|
+
["activeRentals", getArrayDecoder(getAddressDecoder())],
|
|
40
|
+
["activeRentalCount", getU16Decoder()],
|
|
41
|
+
["capturePoints", getU32Decoder()],
|
|
42
|
+
["managedTokenAccount", getAddressDecoder()],
|
|
43
|
+
["createdAt", getI64Decoder()],
|
|
44
|
+
["updatedAt", getI64Decoder()],
|
|
46
45
|
]);
|
|
47
46
|
}
|
|
47
|
+
/** Gets the codec for {@link BorrowerState} account data. */
|
|
48
48
|
export function getBorrowerStateCodec() {
|
|
49
49
|
return combineCodec(getBorrowerStateEncoder(), getBorrowerStateDecoder());
|
|
50
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"borrowerState.js","sourceRoot":"","sources":["../../../../../src/generated/codama/accounts/borrowerState.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,GAcjB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"borrowerState.js","sourceRoot":"","sources":["../../../../../src/generated/codama/accounts/borrowerState.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,GAcjB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,UAAU,CAAC;IACzD,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CACtC,CAAC,CAAC;AAEH,MAAM,UAAU,kCAAkC;IAChD,OAA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