solana-docs 0.0.0
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/.eslintignore +8 -0
- package/.eslintrc +21 -0
- package/.prettierignore +7 -0
- package/.travis/before_install.sh +9 -0
- package/.travis/script.sh +4 -0
- package/README.md +59 -0
- package/art/data-plane-fanout.bob +19 -0
- package/art/data-plane-neighborhood.bob +25 -0
- package/art/data-plane-seeding.bob +15 -0
- package/art/data-plane.bob +18 -0
- package/art/fork-generation.bob +13 -0
- package/art/forks-pruned.bob +9 -0
- package/art/forks-pruned2.bob +11 -0
- package/art/forks.bob +13 -0
- package/art/passive-staking-callflow.msc +30 -0
- package/art/retransmit_stage.bob +45 -0
- package/art/runtime.bob +10 -0
- package/art/sdk-tools.bob +20 -0
- package/art/spv-bank-hash.bob +19 -0
- package/art/spv-block-merkle.bob +19 -0
- package/art/tpu.bob +19 -0
- package/art/tvu.bob +37 -0
- package/art/validator-proposal.bob +60 -0
- package/art/validator.bob +30 -0
- package/babel.config.js +3 -0
- package/build-cli-usage.sh +42 -0
- package/build.sh +40 -0
- package/convert-ascii-to-svg.sh +21 -0
- package/crowdin.yml +16 -0
- package/docusaurus.config.js +161 -0
- package/offline-cmd-md-links.sh +11 -0
- package/package.json +50 -0
- package/publish-docs.sh +56 -0
- package/set-solana-release-tag.sh +20 -0
- package/sidebars.js +210 -0
- package/src/cli/.usage.md.header +59 -0
- package/src/cli/choose-a-cluster.md +43 -0
- package/src/cli/conventions.md +80 -0
- package/src/cli/delegate-stake.md +206 -0
- package/src/cli/deploy-a-program.md +302 -0
- package/src/cli/install-solana-cli-tools.md +164 -0
- package/src/cli/transfer-tokens.md +158 -0
- package/src/cli.md +22 -0
- package/src/cluster/bench-tps.md +129 -0
- package/src/cluster/fork-generation.md +64 -0
- package/src/cluster/leader-rotation.md +88 -0
- package/src/cluster/managing-forks.md +36 -0
- package/src/cluster/overview.md +39 -0
- package/src/cluster/performance-metrics.md +25 -0
- package/src/cluster/rpc-endpoints.md +50 -0
- package/src/cluster/stake-delegation-and-rewards.md +197 -0
- package/src/cluster/synchronization.md +28 -0
- package/src/cluster/turbine-block-propagation.md +101 -0
- package/src/cluster/vote-signing.md +59 -0
- package/src/clusters.md +173 -0
- package/src/css/custom.css +73 -0
- package/src/developing/backwards-compatibility.md +151 -0
- package/src/developing/clients/javascript-api.md +332 -0
- package/src/developing/clients/javascript-reference.md +750 -0
- package/src/developing/clients/jsonrpc-api.md +5173 -0
- package/src/developing/clients/rust-api.md +36 -0
- package/src/developing/on-chain-programs/debugging.md +110 -0
- package/src/developing/on-chain-programs/deploying.md +24 -0
- package/src/developing/on-chain-programs/developing-c.md +202 -0
- package/src/developing/on-chain-programs/developing-rust.md +406 -0
- package/src/developing/on-chain-programs/examples.md +61 -0
- package/src/developing/on-chain-programs/faq.md +81 -0
- package/src/developing/on-chain-programs/overview.md +218 -0
- package/src/developing/plugins/accountsdb_plugin.md +360 -0
- package/src/developing/programming-model/accounts.md +231 -0
- package/src/developing/programming-model/calling-between-programs.md +351 -0
- package/src/developing/programming-model/overview.md +17 -0
- package/src/developing/programming-model/runtime.md +131 -0
- package/src/developing/programming-model/transactions.md +210 -0
- package/src/developing/runtime-facilities/programs.md +168 -0
- package/src/developing/runtime-facilities/sysvars.md +142 -0
- package/src/developing/test-validator.md +153 -0
- package/src/economics_overview.md +20 -0
- package/src/history.md +60 -0
- package/src/icons/Archivers.inline.svg +11 -0
- package/src/icons/Bulb.inline.svg +13 -0
- package/src/icons/Chat.inline.svg +10 -0
- package/src/icons/Clipboard.inline.svg +13 -0
- package/src/icons/Cloudbreak.inline.svg +11 -0
- package/src/icons/Code.inline.svg +11 -0
- package/src/icons/Fire.inline.svg +10 -0
- package/src/icons/Gamepad.inline.svg +11 -0
- package/src/icons/Globe.inline.svg +1 -0
- package/src/icons/Gulfstream.inline.svg +11 -0
- package/src/icons/History.inline.svg +11 -0
- package/src/icons/Money.inline.svg +11 -0
- package/src/icons/Pipeline.inline.svg +15 -0
- package/src/icons/PoH.inline.svg +11 -0
- package/src/icons/Sealevel.inline.svg +11 -0
- package/src/icons/Tools.inline.svg +11 -0
- package/src/icons/Tower.inline.svg +11 -0
- package/src/icons/Turbine.inline.svg +12 -0
- package/src/icons/duotone-icons/Clothes/Brassiere.svg +10 -0
- package/src/icons/duotone-icons/Clothes/Briefcase.svg +11 -0
- package/src/icons/duotone-icons/Clothes/Cap.svg +11 -0
- package/src/icons/duotone-icons/Clothes/Crown.svg +11 -0
- package/src/icons/duotone-icons/Clothes/Dress.svg +11 -0
- package/src/icons/duotone-icons/Clothes/Hanger.svg +10 -0
- package/src/icons/duotone-icons/Clothes/Hat.svg +11 -0
- package/src/icons/duotone-icons/Clothes/Panties.svg +10 -0
- package/src/icons/duotone-icons/Clothes/Shirt.svg +11 -0
- package/src/icons/duotone-icons/Clothes/Shoes.svg +11 -0
- package/src/icons/duotone-icons/Clothes/Shorts.svg +10 -0
- package/src/icons/duotone-icons/Clothes/Sneakers.svg +11 -0
- package/src/icons/duotone-icons/Clothes/Socks.svg +11 -0
- package/src/icons/duotone-icons/Clothes/Sun-glasses.svg +11 -0
- package/src/icons/duotone-icons/Clothes/T-Shirt.svg +10 -0
- package/src/icons/duotone-icons/Clothes/Tie.svg +11 -0
- package/src/icons/duotone-icons/Code/Backspace.svg +11 -0
- package/src/icons/duotone-icons/Code/CMD.svg +10 -0
- package/src/icons/duotone-icons/Code/Code.inline.svg +11 -0
- package/src/icons/duotone-icons/Code/Commit.svg +11 -0
- package/src/icons/duotone-icons/Code/Compiling.inline.svg +11 -0
- package/src/icons/duotone-icons/Code/Control.svg +10 -0
- package/src/icons/duotone-icons/Code/Done-circle.svg +11 -0
- package/src/icons/duotone-icons/Code/Error-circle.svg +11 -0
- package/src/icons/duotone-icons/Code/Git#1.svg +12 -0
- package/src/icons/duotone-icons/Code/Git#2.svg +15 -0
- package/src/icons/duotone-icons/Code/Git#3.svg +13 -0
- package/src/icons/duotone-icons/Code/Git#4.svg +13 -0
- package/src/icons/duotone-icons/Code/Github.svg +11 -0
- package/src/icons/duotone-icons/Code/Info-circle.svg +12 -0
- package/src/icons/duotone-icons/Code/Left-circle.svg +11 -0
- package/src/icons/duotone-icons/Code/Loading.svg +12 -0
- package/src/icons/duotone-icons/Code/Lock-circle.svg +11 -0
- package/src/icons/duotone-icons/Code/Lock-overturning.svg +11 -0
- package/src/icons/duotone-icons/Code/Minus.svg +11 -0
- package/src/icons/duotone-icons/Code/Option.svg +11 -0
- package/src/icons/duotone-icons/Code/Plus.svg +11 -0
- package/src/icons/duotone-icons/Code/Puzzle.svg +10 -0
- package/src/icons/duotone-icons/Code/Question-circle.svg +11 -0
- package/src/icons/duotone-icons/Code/Right-circle.svg +11 -0
- package/src/icons/duotone-icons/Code/Settings#4.svg +11 -0
- package/src/icons/duotone-icons/Code/Shift.svg +10 -0
- package/src/icons/duotone-icons/Code/Spy.svg +11 -0
- package/src/icons/duotone-icons/Code/Stop.svg +10 -0
- package/src/icons/duotone-icons/Code/Terminal.svg +11 -0
- package/src/icons/duotone-icons/Code/Thunder-circle.svg +11 -0
- package/src/icons/duotone-icons/Code/Time-schedule.svg +11 -0
- package/src/icons/duotone-icons/Code/Warning-1-circle.svg +12 -0
- package/src/icons/duotone-icons/Code/Warning-2.svg +12 -0
- package/src/icons/duotone-icons/Communication/Active-call.svg +11 -0
- package/src/icons/duotone-icons/Communication/Add-user.svg +11 -0
- package/src/icons/duotone-icons/Communication/Address-card.svg +10 -0
- package/src/icons/duotone-icons/Communication/Adress-book#1.svg +11 -0
- package/src/icons/duotone-icons/Communication/Adress-book#2.svg +11 -0
- package/src/icons/duotone-icons/Communication/Archive.svg +10 -0
- package/src/icons/duotone-icons/Communication/Call#1.svg +10 -0
- package/src/icons/duotone-icons/Communication/Call.svg +10 -0
- package/src/icons/duotone-icons/Communication/Chat#1.svg +11 -0
- package/src/icons/duotone-icons/Communication/Chat#2.svg +11 -0
- package/src/icons/duotone-icons/Communication/Chat#4.svg +10 -0
- package/src/icons/duotone-icons/Communication/Chat#5.svg +11 -0
- package/src/icons/duotone-icons/Communication/Chat#6.svg +11 -0
- package/src/icons/duotone-icons/Communication/Chat-check.svg +11 -0
- package/src/icons/duotone-icons/Communication/Chat-error.svg +11 -0
- package/src/icons/duotone-icons/Communication/Chat-locked.svg +11 -0
- package/src/icons/duotone-icons/Communication/Chat-smile.svg +11 -0
- package/src/icons/duotone-icons/Communication/Clipboard-check.svg +12 -0
- package/src/icons/duotone-icons/Communication/Clipboard-list.svg +17 -0
- package/src/icons/duotone-icons/Communication/Contact#1.svg +11 -0
- package/src/icons/duotone-icons/Communication/Delete-user.svg +11 -0
- package/src/icons/duotone-icons/Communication/Dial-numbers.svg +18 -0
- package/src/icons/duotone-icons/Communication/Flag.svg +11 -0
- package/src/icons/duotone-icons/Communication/Forward.svg +10 -0
- package/src/icons/duotone-icons/Communication/Group-chat.svg +11 -0
- package/src/icons/duotone-icons/Communication/Group.svg +11 -0
- package/src/icons/duotone-icons/Communication/Incoming-box.svg +12 -0
- package/src/icons/duotone-icons/Communication/Incoming-call.svg +11 -0
- package/src/icons/duotone-icons/Communication/Incoming-mail.svg +11 -0
- package/src/icons/duotone-icons/Communication/Mail-@.svg +10 -0
- package/src/icons/duotone-icons/Communication/Mail-attachment.svg +11 -0
- package/src/icons/duotone-icons/Communication/Mail-box.svg +11 -0
- package/src/icons/duotone-icons/Communication/Mail-error.svg +11 -0
- package/src/icons/duotone-icons/Communication/Mail-heart.svg +11 -0
- package/src/icons/duotone-icons/Communication/Mail-locked.svg +11 -0
- package/src/icons/duotone-icons/Communication/Mail-notification.svg +11 -0
- package/src/icons/duotone-icons/Communication/Mail-opened.svg +11 -0
- package/src/icons/duotone-icons/Communication/Mail-unocked.svg +11 -0
- package/src/icons/duotone-icons/Communication/Mail.svg +10 -0
- package/src/icons/duotone-icons/Communication/Missed-call.svg +11 -0
- package/src/icons/duotone-icons/Communication/Outgoing-box.svg +12 -0
- package/src/icons/duotone-icons/Communication/Outgoing-call.svg +11 -0
- package/src/icons/duotone-icons/Communication/Outgoing-mail.svg +11 -0
- package/src/icons/duotone-icons/Communication/RSS.svg +12 -0
- package/src/icons/duotone-icons/Communication/Readed-mail.svg +11 -0
- package/src/icons/duotone-icons/Communication/Reply-all.svg +11 -0
- package/src/icons/duotone-icons/Communication/Reply.svg +10 -0
- package/src/icons/duotone-icons/Communication/Right.svg +10 -0
- package/src/icons/duotone-icons/Communication/Safe-chat.svg +11 -0
- package/src/icons/duotone-icons/Communication/Send.svg +10 -0
- package/src/icons/duotone-icons/Communication/Sending mail.svg +11 -0
- package/src/icons/duotone-icons/Communication/Sending.svg +11 -0
- package/src/icons/duotone-icons/Communication/Share.svg +11 -0
- package/src/icons/duotone-icons/Communication/Shield-thunder.svg +11 -0
- package/src/icons/duotone-icons/Communication/Shield-user.svg +12 -0
- package/src/icons/duotone-icons/Communication/Snoozed-mail.svg +11 -0
- package/src/icons/duotone-icons/Communication/Spam.svg +10 -0
- package/src/icons/duotone-icons/Communication/Thumbtack.svg +11 -0
- package/src/icons/duotone-icons/Communication/Urgent-mail.svg +11 -0
- package/src/icons/duotone-icons/Communication/Write.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Baking-glove.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Bowl.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Chef.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Cooking-book.svg +17 -0
- package/src/icons/duotone-icons/Cooking/Cooking-pot.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Cutting board.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Dinner.svg +14 -0
- package/src/icons/duotone-icons/Cooking/Dish.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Dishes.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Fork-spoon-knife.svg +15 -0
- package/src/icons/duotone-icons/Cooking/Fork-spoon.svg +13 -0
- package/src/icons/duotone-icons/Cooking/Fork.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Frying-pan.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Grater.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Kitchen-scale.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Knife#1.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Knife#2.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Knife&fork#1.svg +13 -0
- package/src/icons/duotone-icons/Cooking/Knife&fork#2.svg +13 -0
- package/src/icons/duotone-icons/Cooking/Ladle.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Rolling-pin.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Saucepan.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Shovel.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Sieve.svg +11 -0
- package/src/icons/duotone-icons/Cooking/Spoon.svg +12 -0
- package/src/icons/duotone-icons/Design/Adjust.svg +10 -0
- package/src/icons/duotone-icons/Design/Anchor-center-down.svg +14 -0
- package/src/icons/duotone-icons/Design/Anchor-center-up.svg +14 -0
- package/src/icons/duotone-icons/Design/Anchor-center.svg +11 -0
- package/src/icons/duotone-icons/Design/Anchor-left-down.svg +14 -0
- package/src/icons/duotone-icons/Design/Anchor-left-up.svg +14 -0
- package/src/icons/duotone-icons/Design/Anchor-left.svg +14 -0
- package/src/icons/duotone-icons/Design/Anchor-right-down.svg +14 -0
- package/src/icons/duotone-icons/Design/Anchor-right-up.svg +14 -0
- package/src/icons/duotone-icons/Design/Anchor-right.svg +14 -0
- package/src/icons/duotone-icons/Design/Arrows.svg +11 -0
- package/src/icons/duotone-icons/Design/Bezier-curve.svg +11 -0
- package/src/icons/duotone-icons/Design/Border.svg +10 -0
- package/src/icons/duotone-icons/Design/Brush.svg +11 -0
- package/src/icons/duotone-icons/Design/Bucket.svg +11 -0
- package/src/icons/duotone-icons/Design/Cap-1.svg +11 -0
- package/src/icons/duotone-icons/Design/Cap-2.svg +10 -0
- package/src/icons/duotone-icons/Design/Cap-3.svg +11 -0
- package/src/icons/duotone-icons/Design/Circle.svg +10 -0
- package/src/icons/duotone-icons/Design/Color-profile.svg +11 -0
- package/src/icons/duotone-icons/Design/Color.svg +10 -0
- package/src/icons/duotone-icons/Design/Component.svg +10 -0
- package/src/icons/duotone-icons/Design/Crop.svg +11 -0
- package/src/icons/duotone-icons/Design/Difference.svg +11 -0
- package/src/icons/duotone-icons/Design/Edit.svg +11 -0
- package/src/icons/duotone-icons/Design/Eraser.svg +10 -0
- package/src/icons/duotone-icons/Design/Flatten.svg +11 -0
- package/src/icons/duotone-icons/Design/Flip-horizontal.svg +12 -0
- package/src/icons/duotone-icons/Design/Flip-vertical.svg +12 -0
- package/src/icons/duotone-icons/Design/Horizontal.svg +11 -0
- package/src/icons/duotone-icons/Design/Image.svg +10 -0
- package/src/icons/duotone-icons/Design/Interselect.svg +11 -0
- package/src/icons/duotone-icons/Design/Join-1.svg +11 -0
- package/src/icons/duotone-icons/Design/Join-2.svg +11 -0
- package/src/icons/duotone-icons/Design/Join-3.svg +11 -0
- package/src/icons/duotone-icons/Design/Layers.svg +11 -0
- package/src/icons/duotone-icons/Design/Line.svg +12 -0
- package/src/icons/duotone-icons/Design/Magic.svg +11 -0
- package/src/icons/duotone-icons/Design/Mask.svg +11 -0
- package/src/icons/duotone-icons/Design/Patch.svg +12 -0
- package/src/icons/duotone-icons/Design/Pen&ruller.svg +11 -0
- package/src/icons/duotone-icons/Design/Pen-tool-vector.svg +11 -0
- package/src/icons/duotone-icons/Design/Pencil.svg +11 -0
- package/src/icons/duotone-icons/Design/Picker.svg +11 -0
- package/src/icons/duotone-icons/Design/Pixels.svg +15 -0
- package/src/icons/duotone-icons/Design/Polygon.svg +10 -0
- package/src/icons/duotone-icons/Design/Position.svg +10 -0
- package/src/icons/duotone-icons/Design/Rectangle.svg +10 -0
- package/src/icons/duotone-icons/Design/Saturation.svg +11 -0
- package/src/icons/duotone-icons/Design/Select.svg +11 -0
- package/src/icons/duotone-icons/Design/Sketch.svg +11 -0
- package/src/icons/duotone-icons/Design/Stamp.svg +11 -0
- package/src/icons/duotone-icons/Design/Substract.svg +11 -0
- package/src/icons/duotone-icons/Design/Target.svg +11 -0
- package/src/icons/duotone-icons/Design/Triangle.svg +10 -0
- package/src/icons/duotone-icons/Design/Union.svg +10 -0
- package/src/icons/duotone-icons/Design/Vertical.svg +11 -0
- package/src/icons/duotone-icons/Design/Zoom minus.svg +12 -0
- package/src/icons/duotone-icons/Design/Zoom plus.svg +12 -0
- package/src/icons/duotone-icons/Devices/Airpods.svg +13 -0
- package/src/icons/duotone-icons/Devices/Android.svg +11 -0
- package/src/icons/duotone-icons/Devices/Apple-Watch.svg +11 -0
- package/src/icons/duotone-icons/Devices/Battery-charging.svg +12 -0
- package/src/icons/duotone-icons/Devices/Battery-empty.svg +11 -0
- package/src/icons/duotone-icons/Devices/Battery-full.svg +11 -0
- package/src/icons/duotone-icons/Devices/Battery-half.svg +11 -0
- package/src/icons/duotone-icons/Devices/Bluetooth.svg +11 -0
- package/src/icons/duotone-icons/Devices/CPU#1.svg +17 -0
- package/src/icons/duotone-icons/Devices/CPU#2.svg +23 -0
- package/src/icons/duotone-icons/Devices/Camera.svg +12 -0
- package/src/icons/duotone-icons/Devices/Cardboard-vr.svg +11 -0
- package/src/icons/duotone-icons/Devices/Cassete.svg +12 -0
- package/src/icons/duotone-icons/Devices/Diagnostics.svg +12 -0
- package/src/icons/duotone-icons/Devices/Display#1.svg +11 -0
- package/src/icons/duotone-icons/Devices/Display#2.svg +12 -0
- package/src/icons/duotone-icons/Devices/Display#3.svg +12 -0
- package/src/icons/duotone-icons/Devices/Gameboy.svg +11 -0
- package/src/icons/duotone-icons/Devices/Gamepad#1.svg +11 -0
- package/src/icons/duotone-icons/Devices/Gamepad#2.svg +11 -0
- package/src/icons/duotone-icons/Devices/Generator.svg +13 -0
- package/src/icons/duotone-icons/Devices/Hard-drive.svg +11 -0
- package/src/icons/duotone-icons/Devices/Headphones.svg +11 -0
- package/src/icons/duotone-icons/Devices/Homepod.svg +11 -0
- package/src/icons/duotone-icons/Devices/Keyboard.svg +11 -0
- package/src/icons/duotone-icons/Devices/LTE#1.svg +11 -0
- package/src/icons/duotone-icons/Devices/LTE#2.svg +11 -0
- package/src/icons/duotone-icons/Devices/Laptop-macbook.svg +11 -0
- package/src/icons/duotone-icons/Devices/Laptop.svg +11 -0
- package/src/icons/duotone-icons/Devices/Mic.svg +11 -0
- package/src/icons/duotone-icons/Devices/Midi.svg +16 -0
- package/src/icons/duotone-icons/Devices/Mouse.svg +12 -0
- package/src/icons/duotone-icons/Devices/Phone.svg +12 -0
- package/src/icons/duotone-icons/Devices/Printer.svg +11 -0
- package/src/icons/duotone-icons/Devices/Radio.svg +14 -0
- package/src/icons/duotone-icons/Devices/Router#1.svg +11 -0
- package/src/icons/duotone-icons/Devices/Router#2.svg +11 -0
- package/src/icons/duotone-icons/Devices/SD-card.svg +10 -0
- package/src/icons/duotone-icons/Devices/Server.svg +12 -0
- package/src/icons/duotone-icons/Devices/Speaker.svg +11 -0
- package/src/icons/duotone-icons/Devices/TV#1.svg +12 -0
- package/src/icons/duotone-icons/Devices/TV#2.svg +11 -0
- package/src/icons/duotone-icons/Devices/Tablet.svg +11 -0
- package/src/icons/duotone-icons/Devices/USB.svg +12 -0
- package/src/icons/duotone-icons/Devices/Usb-storage.svg +11 -0
- package/src/icons/duotone-icons/Devices/Video-camera.svg +11 -0
- package/src/icons/duotone-icons/Devices/Watch#1.svg +13 -0
- package/src/icons/duotone-icons/Devices/Watch#2.svg +13 -0
- package/src/icons/duotone-icons/Devices/Wi-fi.svg +11 -0
- package/src/icons/duotone-icons/Devices/iMac.svg +12 -0
- package/src/icons/duotone-icons/Devices/iPhone-X.svg +11 -0
- package/src/icons/duotone-icons/Devices/iPhone-back.svg +10 -0
- package/src/icons/duotone-icons/Devices/iPhone-x-back.svg +10 -0
- package/src/icons/duotone-icons/Electric/Air-conditioning.svg +11 -0
- package/src/icons/duotone-icons/Electric/Blender.svg +10 -0
- package/src/icons/duotone-icons/Electric/Fan.svg +12 -0
- package/src/icons/duotone-icons/Electric/Fridge.svg +10 -0
- package/src/icons/duotone-icons/Electric/Gas-stove.svg +11 -0
- package/src/icons/duotone-icons/Electric/Hair-dryer.svg +11 -0
- package/src/icons/duotone-icons/Electric/Highvoltage.svg +10 -0
- package/src/icons/duotone-icons/Electric/Iron.svg +11 -0
- package/src/icons/duotone-icons/Electric/Kettle.svg +11 -0
- package/src/icons/duotone-icons/Electric/Mixer.svg +11 -0
- package/src/icons/duotone-icons/Electric/Outlet.svg +11 -0
- package/src/icons/duotone-icons/Electric/Range-hood.svg +11 -0
- package/src/icons/duotone-icons/Electric/Shutdown.svg +11 -0
- package/src/icons/duotone-icons/Electric/Socket-eu.svg +10 -0
- package/src/icons/duotone-icons/Electric/Socket-us.svg +10 -0
- package/src/icons/duotone-icons/Electric/Washer.svg +11 -0
- package/src/icons/duotone-icons/Files/Cloud-download.svg +11 -0
- package/src/icons/duotone-icons/Files/Cloud-upload.svg +11 -0
- package/src/icons/duotone-icons/Files/Compilation.svg +14 -0
- package/src/icons/duotone-icons/Files/Compiled-file.svg +14 -0
- package/src/icons/duotone-icons/Files/Deleted-file.svg +11 -0
- package/src/icons/duotone-icons/Files/Deleted-folder.svg +11 -0
- package/src/icons/duotone-icons/Files/Download.inline.svg +12 -0
- package/src/icons/duotone-icons/Files/Downloaded file.svg +11 -0
- package/src/icons/duotone-icons/Files/Downloads-folder.svg +11 -0
- package/src/icons/duotone-icons/Files/Export.svg +12 -0
- package/src/icons/duotone-icons/Files/File-cloud.svg +11 -0
- package/src/icons/duotone-icons/Files/File-done.svg +11 -0
- package/src/icons/duotone-icons/Files/File-minus.svg +11 -0
- package/src/icons/duotone-icons/Files/File-plus.svg +11 -0
- package/src/icons/duotone-icons/Files/File.svg +12 -0
- package/src/icons/duotone-icons/Files/Folder-check.svg +11 -0
- package/src/icons/duotone-icons/Files/Folder-cloud.svg +11 -0
- package/src/icons/duotone-icons/Files/Folder-error.svg +11 -0
- package/src/icons/duotone-icons/Files/Folder-heart.svg +11 -0
- package/src/icons/duotone-icons/Files/Folder-minus.svg +11 -0
- package/src/icons/duotone-icons/Files/Folder-plus.svg +11 -0
- package/src/icons/duotone-icons/Files/Folder-solid.svg +10 -0
- package/src/icons/duotone-icons/Files/Folder-star.svg +11 -0
- package/src/icons/duotone-icons/Files/Folder-thunder.svg +11 -0
- package/src/icons/duotone-icons/Files/Folder.svg +10 -0
- package/src/icons/duotone-icons/Files/Group-folders.svg +11 -0
- package/src/icons/duotone-icons/Files/Import.svg +12 -0
- package/src/icons/duotone-icons/Files/Locked-folder.svg +11 -0
- package/src/icons/duotone-icons/Files/Media-folder.svg +11 -0
- package/src/icons/duotone-icons/Files/Media.svg +11 -0
- package/src/icons/duotone-icons/Files/Music.svg +11 -0
- package/src/icons/duotone-icons/Files/Pictures#1.svg +13 -0
- package/src/icons/duotone-icons/Files/Pictures#2.svg +15 -0
- package/src/icons/duotone-icons/Files/Protected-file.svg +11 -0
- package/src/icons/duotone-icons/Files/Selected-file.svg +11 -0
- package/src/icons/duotone-icons/Files/Share.svg +13 -0
- package/src/icons/duotone-icons/Files/Upload-folder.svg +11 -0
- package/src/icons/duotone-icons/Files/Upload.svg +12 -0
- package/src/icons/duotone-icons/Files/Uploaded-file.svg +11 -0
- package/src/icons/duotone-icons/Files/User-folder.svg +12 -0
- package/src/icons/duotone-icons/Food/Beer.svg +14 -0
- package/src/icons/duotone-icons/Food/Bottle#1.svg +11 -0
- package/src/icons/duotone-icons/Food/Bottle#2.svg +11 -0
- package/src/icons/duotone-icons/Food/Bread.svg +11 -0
- package/src/icons/duotone-icons/Food/Bucket.svg +11 -0
- package/src/icons/duotone-icons/Food/Burger.svg +12 -0
- package/src/icons/duotone-icons/Food/Cake.svg +12 -0
- package/src/icons/duotone-icons/Food/Carrot.svg +13 -0
- package/src/icons/duotone-icons/Food/Cheese.svg +11 -0
- package/src/icons/duotone-icons/Food/Chicken.svg +13 -0
- package/src/icons/duotone-icons/Food/Coffee#1.svg +14 -0
- package/src/icons/duotone-icons/Food/Coffee#2.svg +12 -0
- package/src/icons/duotone-icons/Food/Cookie.svg +13 -0
- package/src/icons/duotone-icons/Food/Dinner.svg +11 -0
- package/src/icons/duotone-icons/Food/Fish.svg +11 -0
- package/src/icons/duotone-icons/Food/French Bread.svg +10 -0
- package/src/icons/duotone-icons/Food/Glass-martini.svg +11 -0
- package/src/icons/duotone-icons/Food/Ice-cream#1.svg +11 -0
- package/src/icons/duotone-icons/Food/Ice-cream#2.svg +11 -0
- package/src/icons/duotone-icons/Food/Miso-soup.svg +11 -0
- package/src/icons/duotone-icons/Food/Orange.svg +11 -0
- package/src/icons/duotone-icons/Food/Pizza.svg +13 -0
- package/src/icons/duotone-icons/Food/Sushi.svg +11 -0
- package/src/icons/duotone-icons/Food/Two-bottles.svg +11 -0
- package/src/icons/duotone-icons/Food/Wine.svg +11 -0
- package/src/icons/duotone-icons/General/Attachment#1.svg +11 -0
- package/src/icons/duotone-icons/General/Attachment#2.svg +13 -0
- package/src/icons/duotone-icons/General/Binocular.svg +10 -0
- package/src/icons/duotone-icons/General/Bookmark.svg +10 -0
- package/src/icons/duotone-icons/General/Clip.svg +10 -0
- package/src/icons/duotone-icons/General/Clipboard.svg +13 -0
- package/src/icons/duotone-icons/General/Cursor.svg +10 -0
- package/src/icons/duotone-icons/General/Dislike.svg +11 -0
- package/src/icons/duotone-icons/General/Duplicate.svg +11 -0
- package/src/icons/duotone-icons/General/Edit.svg +10 -0
- package/src/icons/duotone-icons/General/Expand-arrows.svg +11 -0
- package/src/icons/duotone-icons/General/Fire.svg +10 -0
- package/src/icons/duotone-icons/General/Folder.svg +10 -0
- package/src/icons/duotone-icons/General/Half-heart.svg +11 -0
- package/src/icons/duotone-icons/General/Half-star.svg +11 -0
- package/src/icons/duotone-icons/General/Heart.svg +10 -0
- package/src/icons/duotone-icons/General/Hidden.svg +12 -0
- package/src/icons/duotone-icons/General/Like.svg +11 -0
- package/src/icons/duotone-icons/General/Lock.svg +16 -0
- package/src/icons/duotone-icons/General/Notification#2.svg +11 -0
- package/src/icons/duotone-icons/General/Notifications#1.svg +10 -0
- package/src/icons/duotone-icons/General/Other#1.svg +12 -0
- package/src/icons/duotone-icons/General/Other#2.svg +12 -0
- package/src/icons/duotone-icons/General/Sad.svg +11 -0
- package/src/icons/duotone-icons/General/Save.svg +11 -0
- package/src/icons/duotone-icons/General/Scale.svg +11 -0
- package/src/icons/duotone-icons/General/Scissors.svg +11 -0
- package/src/icons/duotone-icons/General/Search.svg +11 -0
- package/src/icons/duotone-icons/General/Settings#3.svg +11 -0
- package/src/icons/duotone-icons/General/Settings-1.inline.svg +11 -0
- package/src/icons/duotone-icons/General/Settings-2.svg +10 -0
- package/src/icons/duotone-icons/General/Shield-check.svg +11 -0
- package/src/icons/duotone-icons/General/Shield-disabled.svg +11 -0
- package/src/icons/duotone-icons/General/Shield-protected.svg +11 -0
- package/src/icons/duotone-icons/General/Size.svg +11 -0
- package/src/icons/duotone-icons/General/Smile.svg +11 -0
- package/src/icons/duotone-icons/General/Star.svg +10 -0
- package/src/icons/duotone-icons/General/Thunder-move.svg +11 -0
- package/src/icons/duotone-icons/General/Thunder.svg +10 -0
- package/src/icons/duotone-icons/General/Trash.svg +11 -0
- package/src/icons/duotone-icons/General/Unlock.svg +16 -0
- package/src/icons/duotone-icons/General/Update.svg +10 -0
- package/src/icons/duotone-icons/General/User.svg +11 -0
- package/src/icons/duotone-icons/General/Visible.svg +11 -0
- package/src/icons/duotone-icons/Home/Air-ballon.svg +11 -0
- package/src/icons/duotone-icons/Home/Alarm-clock.svg +12 -0
- package/src/icons/duotone-icons/Home/Armchair.svg +11 -0
- package/src/icons/duotone-icons/Home/Bag-chair.svg +11 -0
- package/src/icons/duotone-icons/Home/Bath.svg +11 -0
- package/src/icons/duotone-icons/Home/Bed.svg +12 -0
- package/src/icons/duotone-icons/Home/Book-open.svg +11 -0
- package/src/icons/duotone-icons/Home/Book.svg +16 -0
- package/src/icons/duotone-icons/Home/Box.svg +11 -0
- package/src/icons/duotone-icons/Home/Broom.svg +11 -0
- package/src/icons/duotone-icons/Home/Building.svg +12 -0
- package/src/icons/duotone-icons/Home/Bulb#1.svg +13 -0
- package/src/icons/duotone-icons/Home/Bulb#2.svg +13 -0
- package/src/icons/duotone-icons/Home/Chair#1.svg +11 -0
- package/src/icons/duotone-icons/Home/Chair#2.svg +11 -0
- package/src/icons/duotone-icons/Home/Clock.svg +11 -0
- package/src/icons/duotone-icons/Home/Commode#1.svg +11 -0
- package/src/icons/duotone-icons/Home/Commode#2.svg +11 -0
- package/src/icons/duotone-icons/Home/Couch.svg +11 -0
- package/src/icons/duotone-icons/Home/Cupboard.svg +11 -0
- package/src/icons/duotone-icons/Home/Curtains.svg +11 -0
- package/src/icons/duotone-icons/Home/Deer.svg +11 -0
- package/src/icons/duotone-icons/Home/Door-open.svg +11 -0
- package/src/icons/duotone-icons/Home/Earth.svg +11 -0
- package/src/icons/duotone-icons/Home/Fireplace.svg +11 -0
- package/src/icons/duotone-icons/Home/Flashlight.svg +11 -0
- package/src/icons/duotone-icons/Home/Flower#1.svg +13 -0
- package/src/icons/duotone-icons/Home/Flower#2.svg +14 -0
- package/src/icons/duotone-icons/Home/Flower#3.svg +12 -0
- package/src/icons/duotone-icons/Home/Globe.svg +11 -0
- package/src/icons/duotone-icons/Home/Home-heart.svg +11 -0
- package/src/icons/duotone-icons/Home/Home.svg +10 -0
- package/src/icons/duotone-icons/Home/Key.svg +11 -0
- package/src/icons/duotone-icons/Home/Ladder.svg +11 -0
- package/src/icons/duotone-icons/Home/Lamp#1.svg +13 -0
- package/src/icons/duotone-icons/Home/Lamp#2.svg +12 -0
- package/src/icons/duotone-icons/Home/Library.svg +11 -0
- package/src/icons/duotone-icons/Home/Mailbox.svg +11 -0
- package/src/icons/duotone-icons/Home/Mirror.svg +11 -0
- package/src/icons/duotone-icons/Home/Picture.svg +13 -0
- package/src/icons/duotone-icons/Home/Ruller.svg +10 -0
- package/src/icons/duotone-icons/Home/Stairs.svg +10 -0
- package/src/icons/duotone-icons/Home/Timer.svg +13 -0
- package/src/icons/duotone-icons/Home/Toilet.svg +11 -0
- package/src/icons/duotone-icons/Home/Towel.svg +10 -0
- package/src/icons/duotone-icons/Home/Trash.svg +11 -0
- package/src/icons/duotone-icons/Home/Water-mixer.svg +12 -0
- package/src/icons/duotone-icons/Home/Weight#1.svg +11 -0
- package/src/icons/duotone-icons/Home/Weight#2.svg +11 -0
- package/src/icons/duotone-icons/Home/Wood#1.svg +11 -0
- package/src/icons/duotone-icons/Home/Wood#2.svg +11 -0
- package/src/icons/duotone-icons/Home/Wood-horse.svg +10 -0
- package/src/icons/duotone-icons/Layout/Layout-3d.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-4-blocks.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-arrange.inline.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-grid.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-horizontal.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-left-panel-1.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-left-panel-2.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-right-panel-1.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-right-panel-2.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-top-panel-1.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-top-panel-2.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-top-panel-3.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-top-panel-4.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-top-panel-5.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-top-panel-6.svg +11 -0
- package/src/icons/duotone-icons/Layout/Layout-vertical.svg +11 -0
- package/src/icons/duotone-icons/Map/Compass.svg +10 -0
- package/src/icons/duotone-icons/Map/Direction#1.svg +10 -0
- package/src/icons/duotone-icons/Map/Direction#2.svg +10 -0
- package/src/icons/duotone-icons/Map/Location-arrow.svg +10 -0
- package/src/icons/duotone-icons/Map/Marker#1.svg +10 -0
- package/src/icons/duotone-icons/Map/Marker#2.svg +10 -0
- package/src/icons/duotone-icons/Map/Position.svg +12 -0
- package/src/icons/duotone-icons/Media/Add-music.svg +11 -0
- package/src/icons/duotone-icons/Media/Airplay-video.svg +11 -0
- package/src/icons/duotone-icons/Media/Airplay.svg +11 -0
- package/src/icons/duotone-icons/Media/Back.svg +11 -0
- package/src/icons/duotone-icons/Media/Backward.svg +11 -0
- package/src/icons/duotone-icons/Media/CD.svg +11 -0
- package/src/icons/duotone-icons/Media/DVD.svg +11 -0
- package/src/icons/duotone-icons/Media/Eject.svg +11 -0
- package/src/icons/duotone-icons/Media/Equalizer.svg +13 -0
- package/src/icons/duotone-icons/Media/Forward.svg +11 -0
- package/src/icons/duotone-icons/Media/Media-library#1.svg +13 -0
- package/src/icons/duotone-icons/Media/Media-library#2.svg +11 -0
- package/src/icons/duotone-icons/Media/Media-library#3.svg +17 -0
- package/src/icons/duotone-icons/Media/Movie-Lane #2.svg +11 -0
- package/src/icons/duotone-icons/Media/Movie-lane#1.svg +11 -0
- package/src/icons/duotone-icons/Media/Music-cloud.svg +11 -0
- package/src/icons/duotone-icons/Media/Music-note.svg +10 -0
- package/src/icons/duotone-icons/Media/Music.svg +10 -0
- package/src/icons/duotone-icons/Media/Mute.svg +11 -0
- package/src/icons/duotone-icons/Media/Next.svg +11 -0
- package/src/icons/duotone-icons/Media/Pause.svg +10 -0
- package/src/icons/duotone-icons/Media/Play.svg +10 -0
- package/src/icons/duotone-icons/Media/Playlist#1.svg +11 -0
- package/src/icons/duotone-icons/Media/Playlist#2.svg +11 -0
- package/src/icons/duotone-icons/Media/Rec.svg +10 -0
- package/src/icons/duotone-icons/Media/Repeat-one.svg +11 -0
- package/src/icons/duotone-icons/Media/Repeat.svg +11 -0
- package/src/icons/duotone-icons/Media/Shuffle.svg +11 -0
- package/src/icons/duotone-icons/Media/Volume-down.svg +11 -0
- package/src/icons/duotone-icons/Media/Volume-full.svg +11 -0
- package/src/icons/duotone-icons/Media/Volume-half.svg +11 -0
- package/src/icons/duotone-icons/Media/Volume-up.svg +11 -0
- package/src/icons/duotone-icons/Media/Vynil.svg +11 -0
- package/src/icons/duotone-icons/Media/Youtube.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Angle-double-down.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Angle-double-left.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Angle-double-right.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Angle-double-up.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Angle-down.svg +10 -0
- package/src/icons/duotone-icons/Navigation/Angle-left.svg +10 -0
- package/src/icons/duotone-icons/Navigation/Angle-right.svg +10 -0
- package/src/icons/duotone-icons/Navigation/Angle-up.svg +10 -0
- package/src/icons/duotone-icons/Navigation/Arrow-down.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Arrow-from-bottom.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Arrow-from-left.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Arrow-from-right.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Arrow-from-top.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Arrow-left.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Arrow-right.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Arrow-to-bottom.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Arrow-to-left.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Arrow-to-right.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Arrow-to-up.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Arrow-up.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Arrows-h.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Arrows-v.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Check.svg +10 -0
- package/src/icons/duotone-icons/Navigation/Close.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Double-check.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Down-2.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Down-left.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Down-right.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Exchange.svg +13 -0
- package/src/icons/duotone-icons/Navigation/Left 3.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Left-2.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Minus.svg +9 -0
- package/src/icons/duotone-icons/Navigation/Plus.svg +10 -0
- package/src/icons/duotone-icons/Navigation/Right 3.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Right-2.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Route.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Sign-in.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Sign-out.svg +12 -0
- package/src/icons/duotone-icons/Navigation/Up-2.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Up-down.svg +13 -0
- package/src/icons/duotone-icons/Navigation/Up-left.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Up-right.svg +11 -0
- package/src/icons/duotone-icons/Navigation/Waiting.svg +10 -0
- package/src/icons/duotone-icons/Shopping/ATM.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Bag#1.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Bag#2.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Barcode-read.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Barcode-scan.svg +12 -0
- package/src/icons/duotone-icons/Shopping/Barcode.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Bitcoin.svg +12 -0
- package/src/icons/duotone-icons/Shopping/Box#1.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Box#3.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Box2.inline.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Calculator.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Cart#1.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Cart#2.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Cart#3.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Chart-bar#1.svg +13 -0
- package/src/icons/duotone-icons/Shopping/Chart-bar#2.svg +13 -0
- package/src/icons/duotone-icons/Shopping/Chart-bar#3.svg +13 -0
- package/src/icons/duotone-icons/Shopping/Chart-line#1.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Chart-line#2.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Chart-pie.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Credit-card.svg +12 -0
- package/src/icons/duotone-icons/Shopping/Dollar.svg +12 -0
- package/src/icons/duotone-icons/Shopping/Euro.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Gift.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Loader.svg +12 -0
- package/src/icons/duotone-icons/Shopping/MC.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Money.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Pound.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Price #1.svg +10 -0
- package/src/icons/duotone-icons/Shopping/Price #2.svg +14 -0
- package/src/icons/duotone-icons/Shopping/Rouble.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Safe.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Sale#1.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Sale#2.svg +13 -0
- package/src/icons/duotone-icons/Shopping/Settings.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Sort#1.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Sort#2.svg +10 -0
- package/src/icons/duotone-icons/Shopping/Sort#3.svg +10 -0
- package/src/icons/duotone-icons/Shopping/Ticket.svg +10 -0
- package/src/icons/duotone-icons/Shopping/Wallet#2.svg +11 -0
- package/src/icons/duotone-icons/Shopping/Wallet#3.svg +12 -0
- package/src/icons/duotone-icons/Shopping/Wallet.svg +12 -0
- package/src/icons/duotone-icons/Text/Align-auto.svg +11 -0
- package/src/icons/duotone-icons/Text/Align-center.svg +11 -0
- package/src/icons/duotone-icons/Text/Align-justify.svg +11 -0
- package/src/icons/duotone-icons/Text/Align-left.svg +12 -0
- package/src/icons/duotone-icons/Text/Align-right.svg +11 -0
- package/src/icons/duotone-icons/Text/Article.svg +11 -0
- package/src/icons/duotone-icons/Text/Bold.svg +10 -0
- package/src/icons/duotone-icons/Text/Bullet-list.svg +11 -0
- package/src/icons/duotone-icons/Text/Code.svg +10 -0
- package/src/icons/duotone-icons/Text/Edit-text.svg +11 -0
- package/src/icons/duotone-icons/Text/Filter.svg +10 -0
- package/src/icons/duotone-icons/Text/Font.svg +11 -0
- package/src/icons/duotone-icons/Text/H1.svg +11 -0
- package/src/icons/duotone-icons/Text/H2.svg +11 -0
- package/src/icons/duotone-icons/Text/Itallic.svg +10 -0
- package/src/icons/duotone-icons/Text/Menu.svg +11 -0
- package/src/icons/duotone-icons/Text/Paragraph.svg +10 -0
- package/src/icons/duotone-icons/Text/Quote#1.svg +11 -0
- package/src/icons/duotone-icons/Text/Quote#2.svg +11 -0
- package/src/icons/duotone-icons/Text/Redo.svg +10 -0
- package/src/icons/duotone-icons/Text/Strikethrough.svg +11 -0
- package/src/icons/duotone-icons/Text/Text-height.svg +11 -0
- package/src/icons/duotone-icons/Text/Text-width.svg +11 -0
- package/src/icons/duotone-icons/Text/Text.svg +10 -0
- package/src/icons/duotone-icons/Text/Underline.svg +11 -0
- package/src/icons/duotone-icons/Text/Undo.svg +10 -0
- package/src/icons/duotone-icons/Tools/Angle Grinder.svg +12 -0
- package/src/icons/duotone-icons/Tools/Axe.svg +11 -0
- package/src/icons/duotone-icons/Tools/Brush.svg +11 -0
- package/src/icons/duotone-icons/Tools/Compass.svg +11 -0
- package/src/icons/duotone-icons/Tools/Hummer#2.svg +12 -0
- package/src/icons/duotone-icons/Tools/Hummer.svg +11 -0
- package/src/icons/duotone-icons/Tools/Pantone.svg +12 -0
- package/src/icons/duotone-icons/Tools/Road-Cone.svg +11 -0
- package/src/icons/duotone-icons/Tools/Roller.svg +12 -0
- package/src/icons/duotone-icons/Tools/Roulette.svg +11 -0
- package/src/icons/duotone-icons/Tools/Screwdriver.svg +11 -0
- package/src/icons/duotone-icons/Tools/Shovel.svg +11 -0
- package/src/icons/duotone-icons/Tools/Spatula.svg +11 -0
- package/src/icons/duotone-icons/Tools/Swiss-knife.svg +11 -0
- package/src/icons/duotone-icons/Tools/Tools.svg +11 -0
- package/src/icons/duotone-icons/Weather/Celcium.svg +11 -0
- package/src/icons/duotone-icons/Weather/Cloud#1.svg +10 -0
- package/src/icons/duotone-icons/Weather/Cloud#2.svg +11 -0
- package/src/icons/duotone-icons/Weather/Cloud-fog.svg +11 -0
- package/src/icons/duotone-icons/Weather/Cloud-sun.svg +11 -0
- package/src/icons/duotone-icons/Weather/Cloud-wind.svg +12 -0
- package/src/icons/duotone-icons/Weather/Cloudy-night.svg +11 -0
- package/src/icons/duotone-icons/Weather/Cloudy.svg +11 -0
- package/src/icons/duotone-icons/Weather/Day-rain.svg +11 -0
- package/src/icons/duotone-icons/Weather/Fahrenheit.svg +11 -0
- package/src/icons/duotone-icons/Weather/Fog.svg +15 -0
- package/src/icons/duotone-icons/Weather/Moon.svg +10 -0
- package/src/icons/duotone-icons/Weather/Night-fog.svg +11 -0
- package/src/icons/duotone-icons/Weather/Night-rain.svg +11 -0
- package/src/icons/duotone-icons/Weather/Rain#1.svg +11 -0
- package/src/icons/duotone-icons/Weather/Rain#2.svg +11 -0
- package/src/icons/duotone-icons/Weather/Rain#5.svg +11 -0
- package/src/icons/duotone-icons/Weather/Rainbow.svg +12 -0
- package/src/icons/duotone-icons/Weather/Snow#1.svg +11 -0
- package/src/icons/duotone-icons/Weather/Snow#2.svg +11 -0
- package/src/icons/duotone-icons/Weather/Snow#3.svg +11 -0
- package/src/icons/duotone-icons/Weather/Snow.svg +11 -0
- package/src/icons/duotone-icons/Weather/Storm.svg +11 -0
- package/src/icons/duotone-icons/Weather/Sun-fog.svg +11 -0
- package/src/icons/duotone-icons/Weather/Sun.svg +11 -0
- package/src/icons/duotone-icons/Weather/Suset#1.svg +11 -0
- package/src/icons/duotone-icons/Weather/Suset#2.svg +11 -0
- package/src/icons/duotone-icons/Weather/Temperature-empty.svg +10 -0
- package/src/icons/duotone-icons/Weather/Temperature-full.svg +10 -0
- package/src/icons/duotone-icons/Weather/Temperature-half.svg +10 -0
- package/src/icons/duotone-icons/Weather/Thunder-night.svg +11 -0
- package/src/icons/duotone-icons/Weather/Thunder.svg +11 -0
- package/src/icons/duotone-icons/Weather/Umbrella.svg +11 -0
- package/src/icons/duotone-icons/Weather/Wind.svg +11 -0
- package/src/icons/social/facebook.svg +10 -0
- package/src/icons/social/instagram.svg +10 -0
- package/src/icons/social/pinterest.svg +3 -0
- package/src/icons/social/twitter.svg +10 -0
- package/src/implemented-proposals/abi-management.md +161 -0
- package/src/implemented-proposals/bank-timestamp-correction.md +77 -0
- package/src/implemented-proposals/commitment.md +92 -0
- package/src/implemented-proposals/durable-tx-nonces.md +131 -0
- package/src/implemented-proposals/ed_overview/ed_economic_sustainability.md +9 -0
- package/src/implemented-proposals/ed_overview/ed_mvp.md +24 -0
- package/src/implemented-proposals/ed_overview/ed_overview.md +19 -0
- package/src/implemented-proposals/ed_overview/ed_references.md +7 -0
- package/src/implemented-proposals/ed_overview/ed_storage_rent_economics.md +17 -0
- package/src/implemented-proposals/ed_overview/ed_validation_client_economics/ed_vce_overview.md +9 -0
- package/src/implemented-proposals/ed_overview/ed_validation_client_economics/ed_vce_state_validation_protocol_based_rewards.md +64 -0
- package/src/implemented-proposals/ed_overview/ed_validation_client_economics/ed_vce_state_validation_transaction_fees.md +20 -0
- package/src/implemented-proposals/ed_overview/ed_validation_client_economics/ed_vce_validation_stake_delegation.md +28 -0
- package/src/implemented-proposals/implemented-proposals.md +9 -0
- package/src/implemented-proposals/installer.md +216 -0
- package/src/implemented-proposals/instruction_introspection.md +28 -0
- package/src/implemented-proposals/leader-leader-transition.md +55 -0
- package/src/implemented-proposals/leader-validator-transition.md +52 -0
- package/src/implemented-proposals/persistent-account-storage.md +83 -0
- package/src/implemented-proposals/readonly-accounts.md +25 -0
- package/src/implemented-proposals/reliable-vote-transmission.md +60 -0
- package/src/implemented-proposals/rent.md +69 -0
- package/src/implemented-proposals/repair-service.md +108 -0
- package/src/implemented-proposals/rpc-transaction-history.md +107 -0
- package/src/implemented-proposals/snapshot-verification.md +56 -0
- package/src/implemented-proposals/staking-rewards.md +33 -0
- package/src/implemented-proposals/testing-programs.md +53 -0
- package/src/implemented-proposals/tower-bft.md +138 -0
- package/src/implemented-proposals/transaction-fees.md +32 -0
- package/src/implemented-proposals/validator-timestamp-oracle.md +107 -0
- package/src/inflation/adjusted_staking_yield.md +118 -0
- package/src/inflation/inflation_schedule.md +40 -0
- package/src/inflation/terminology.md +54 -0
- package/src/integrations/exchange.md +753 -0
- package/src/introduction.md +33 -0
- package/src/offline-signing/durable-nonce.md +247 -0
- package/src/offline-signing.md +174 -0
- package/src/pages/index.js +160 -0
- package/src/pages/styles.module.css +41 -0
- package/src/proposals/accepted-design-proposals.md +11 -0
- package/src/proposals/accounts-db-replication.md +185 -0
- package/src/proposals/bankless-leader.md +57 -0
- package/src/proposals/block-confirmation.md +85 -0
- package/src/proposals/cluster-test-framework.md +102 -0
- package/src/proposals/comprehensive-compute-fees.md +164 -0
- package/src/proposals/embedding-move.md +37 -0
- package/src/proposals/interchain-transaction-verification.md +105 -0
- package/src/proposals/ledger-replication-to-implement.md +417 -0
- package/src/proposals/log_data.md +146 -0
- package/src/proposals/optimistic-confirmation-and-slashing.md +89 -0
- package/src/proposals/optimistic-transaction-propagation-signal.md +109 -0
- package/src/proposals/optimistic_confirmation.md +408 -0
- package/src/proposals/program-instruction-macro.md +226 -0
- package/src/proposals/return-data.md +144 -0
- package/src/proposals/rip-curl.md +56 -0
- package/src/proposals/rust-clients.md +54 -0
- package/src/proposals/simple-payment-and-state-verification.md +258 -0
- package/src/proposals/slashing.md +60 -0
- package/src/proposals/snapshot-verification.md +11 -0
- package/src/proposals/tick-verification.md +70 -0
- package/src/proposals/transactions-v2.md +334 -0
- package/src/proposals/validator-proposal.md +54 -0
- package/src/proposals/vote-signing-to-implement.md +116 -0
- package/src/running-validator/restart-cluster.md +117 -0
- package/src/running-validator/validator-failover.md +146 -0
- package/src/running-validator/validator-info.md +64 -0
- package/src/running-validator/validator-monitor.md +47 -0
- package/src/running-validator/validator-reqs.md +115 -0
- package/src/running-validator/validator-stake.md +132 -0
- package/src/running-validator/validator-start.md +492 -0
- package/src/running-validator/validator-troubleshoot.md +17 -0
- package/src/running-validator/vote-accounts.md +219 -0
- package/src/running-validator.md +7 -0
- package/src/staking/stake-accounts.md +141 -0
- package/src/staking/stake-programming.md +27 -0
- package/src/staking.md +117 -0
- package/src/storage_rent_economics.md +17 -0
- package/src/terminology.md +346 -0
- package/src/theme/Footer/index.js +126 -0
- package/src/theme/Footer/styles.module.css +15 -0
- package/src/transaction_fees.md +21 -0
- package/src/validator/anatomy.md +13 -0
- package/src/validator/blockstore.md +91 -0
- package/src/validator/gossip.md +90 -0
- package/src/validator/runtime.md +69 -0
- package/src/validator/tpu.md +5 -0
- package/src/validator/tvu.md +9 -0
- package/src/wallet-guide/apps.md +74 -0
- package/src/wallet-guide/cli.md +67 -0
- package/src/wallet-guide/file-system-wallet.md +65 -0
- package/src/wallet-guide/hardware-wallets/ledger.md +219 -0
- package/src/wallet-guide/hardware-wallets.md +53 -0
- package/src/wallet-guide/ledger-live.md +77 -0
- package/src/wallet-guide/paper-wallet.md +203 -0
- package/src/wallet-guide/solflare.md +201 -0
- package/src/wallet-guide/support.md +16 -0
- package/src/wallet-guide/web-wallets.md +52 -0
- package/src/wallet-guide.md +63 -0
- package/static/.nojekyll +0 -0
- package/static/img/favicon.ico +0 -0
- package/static/katex/README.md +91 -0
- package/static/katex/contrib/auto-render.js +350 -0
- package/static/katex/contrib/auto-render.min.js +1 -0
- package/static/katex/contrib/auto-render.mjs +226 -0
- package/static/katex/contrib/copy-tex.css +13 -0
- package/static/katex/contrib/copy-tex.js +213 -0
- package/static/katex/contrib/copy-tex.min.css +1 -0
- package/static/katex/contrib/copy-tex.min.js +1 -0
- package/static/katex/contrib/copy-tex.mjs +85 -0
- package/static/katex/contrib/mathtex-script-type.js +137 -0
- package/static/katex/contrib/mathtex-script-type.min.js +1 -0
- package/static/katex/contrib/mathtex-script-type.mjs +24 -0
- package/static/katex/contrib/mhchem.js +3241 -0
- package/static/katex/contrib/mhchem.min.js +1 -0
- package/static/katex/contrib/mhchem.mjs +3109 -0
- package/static/katex/contrib/render-a11y-string.js +870 -0
- package/static/katex/contrib/render-a11y-string.min.js +1 -0
- package/static/katex/contrib/render-a11y-string.mjs +753 -0
- package/static/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/static/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/static/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/static/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/static/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/static/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/static/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/static/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/static/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/static/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/static/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/static/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/static/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/static/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/static/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/static/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/static/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/static/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/static/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/static/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/static/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/static/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/static/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/static/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/static/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/static/katex/katex.css +1034 -0
- package/static/katex/katex.js +17308 -0
- package/static/katex/katex.min.css +1 -0
- package/static/katex/katex.min.js +1 -0
- package/static/katex/katex.mjs +16911 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Accounts"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Storing State between Transactions
|
|
6
|
+
|
|
7
|
+
If the program needs to store state between transactions, it does so using
|
|
8
|
+
_accounts_. Accounts are similar to files in operating systems such as Linux in
|
|
9
|
+
that they may hold arbitrary data that persists beyond
|
|
10
|
+
the lifetime of a program. Also like a file, an account includes metadata that
|
|
11
|
+
tells the runtime who is allowed to access the data and how.
|
|
12
|
+
|
|
13
|
+
Unlike a file, the account includes metadata for the lifetime of the file. That
|
|
14
|
+
lifetime is expressed by a number of fractional native
|
|
15
|
+
tokens called _lamports_. Accounts are held in validator memory and pay
|
|
16
|
+
["rent"](#rent) to stay there. Each validator periodically scans all accounts
|
|
17
|
+
and collects rent. Any account that drops to zero lamports is purged. Accounts
|
|
18
|
+
can also be marked [rent-exempt](#rent-exemption) if they contain a sufficient
|
|
19
|
+
number of lamports.
|
|
20
|
+
|
|
21
|
+
In the same way that a Linux user uses a path to look up a file, a Solana client
|
|
22
|
+
uses an _address_ to look up an account. The address is a 256-bit public key.
|
|
23
|
+
|
|
24
|
+
## Signers
|
|
25
|
+
|
|
26
|
+
Transactions may include digital [signatures](terminology.md#signature)
|
|
27
|
+
corresponding to the accounts' public keys referenced by the transaction. Such
|
|
28
|
+
signatures signify that the holder of the
|
|
29
|
+
account's private key signed and thus "authorized" the transaction. In this case,
|
|
30
|
+
the account is referred to as a _signer_. Whether an account is a signer or not
|
|
31
|
+
is communicated to the program as part of the account's metadata. Programs can
|
|
32
|
+
then use that information to make authority decisions.
|
|
33
|
+
|
|
34
|
+
## Read-only
|
|
35
|
+
|
|
36
|
+
Transactions can [indicate](transactions.md#message-header-format) that some of
|
|
37
|
+
the accounts it references be treated as _read-only accounts_ in order to enable
|
|
38
|
+
parallel account processing between transactions. The runtime permits read-only
|
|
39
|
+
accounts to be read concurrently by multiple programs. If a program attempts to
|
|
40
|
+
modify a read-only account, the transaction is rejected by the runtime.
|
|
41
|
+
|
|
42
|
+
## Executable
|
|
43
|
+
|
|
44
|
+
If an account is marked "executable" in its metadata, then it is considered a
|
|
45
|
+
program which can be executed by including the account's public key in an
|
|
46
|
+
instruction's [program id](transactions.md#program-id). Accounts are marked as
|
|
47
|
+
executable during a successful program deployment process by the loader that
|
|
48
|
+
owns the account. When a program is deployed to the execution engine (BPF deployment),
|
|
49
|
+
the loader determines that the bytecode in the account's data is valid.
|
|
50
|
+
If so, the loader permanently marks the program account as executable.
|
|
51
|
+
|
|
52
|
+
If a program is marked as final (non-upgradeable), the runtime enforces that the
|
|
53
|
+
account's data (the program) is immutable. Through the upgradeable loader, it is
|
|
54
|
+
possible to upload a totally new program to an existing program address.
|
|
55
|
+
|
|
56
|
+
## Creating
|
|
57
|
+
|
|
58
|
+
To create an account, a client generates a _keypair_ and registers its public key
|
|
59
|
+
using the `SystemProgram::CreateAccount` instruction with a fixed
|
|
60
|
+
storage size in bytes preallocated.
|
|
61
|
+
The current maximum size of an account's data is 10 megabytes.
|
|
62
|
+
|
|
63
|
+
An account address can be any arbitrary 256 bit value, and there are mechanisms
|
|
64
|
+
for advanced users to create derived addresses
|
|
65
|
+
(`SystemProgram::CreateAccountWithSeed`,
|
|
66
|
+
[`Pubkey::CreateProgramAddress`](calling-between-programs.md#program-derived-addresses)).
|
|
67
|
+
|
|
68
|
+
Accounts that have never been created via the system program can also be passed
|
|
69
|
+
to programs. When an instruction references an account that hasn't been
|
|
70
|
+
previously created, the program will be passed an account with no data and zero lamports
|
|
71
|
+
that is owned by the system program.
|
|
72
|
+
|
|
73
|
+
Such newly created accounts reflect
|
|
74
|
+
whether they sign the transaction and therefore can be used as an
|
|
75
|
+
authority. Authorities in this context convey to the program that the holder of
|
|
76
|
+
the private key associated with the account's public key signed the transaction.
|
|
77
|
+
The account's public key may be known to the program or recorded in another
|
|
78
|
+
account, signifying some kind of ownership or authority over an asset or
|
|
79
|
+
operation the program controls or performs.
|
|
80
|
+
|
|
81
|
+
## Ownership and Assignment to Programs
|
|
82
|
+
|
|
83
|
+
A created account is initialized to be _owned_ by a built-in program called the
|
|
84
|
+
System program and is called a _system account_ aptly. An account includes
|
|
85
|
+
"owner" metadata. The owner is a program id. The runtime grants the program
|
|
86
|
+
write access to the account if its id matches the owner. For the case of the
|
|
87
|
+
System program, the runtime allows clients to transfer lamports and importantly
|
|
88
|
+
_assign_ account ownership, meaning changing owner to different program id. If
|
|
89
|
+
an account is not owned by a program, the program is only permitted to read its
|
|
90
|
+
data and credit the account.
|
|
91
|
+
|
|
92
|
+
## Verifying validity of unmodified, reference-only accounts
|
|
93
|
+
|
|
94
|
+
For security purposes, it is recommended that programs check the validity of any
|
|
95
|
+
account it reads but does not modify.
|
|
96
|
+
|
|
97
|
+
This is because a malicious user
|
|
98
|
+
could create accounts with arbitrary data and then pass these accounts to the
|
|
99
|
+
program in place of valid accounts. The arbitrary data could be crafted in
|
|
100
|
+
a way that leads to unexpected or harmful program behavior.
|
|
101
|
+
|
|
102
|
+
The security model enforces that an account's data can only be modified by the
|
|
103
|
+
account's `Owner` program. This allows the program to trust that the data
|
|
104
|
+
passed to them via accounts they own. The
|
|
105
|
+
runtime enforces this by rejecting any transaction containing a program that
|
|
106
|
+
attempts to write to an account it does not own.
|
|
107
|
+
|
|
108
|
+
If a program were to not check account validity, it might read an account
|
|
109
|
+
it thinks it owns but doesn't. Anyone can
|
|
110
|
+
issue instructions to a program, and the runtime does not know that those
|
|
111
|
+
accounts are expected to be owned by the program.
|
|
112
|
+
|
|
113
|
+
To check an account's validity, the program should either check the account's
|
|
114
|
+
address against a known value or check that the account is indeed owned
|
|
115
|
+
correctly (usually owned by the program itself).
|
|
116
|
+
|
|
117
|
+
One example is when programs use a sysvar account. Unless the program checks the
|
|
118
|
+
account's address or owner, it's impossible to be sure whether it's a real and
|
|
119
|
+
valid sysvar account merely by successful deserialization of the account's data.
|
|
120
|
+
|
|
121
|
+
Accordingly, the Solana SDK [checks the sysvar account's validity during
|
|
122
|
+
deserialization](https://github.com/solana-labs/solana/blob/a95675a7ce1651f7b59443eb146b356bc4b3f374/sdk/program/src/sysvar/mod.rs#L65).
|
|
123
|
+
A alternative and safer way to read a sysvar is via the sysvar's [`get()`
|
|
124
|
+
function](https://github.com/solana-labs/solana/blob/64bfc14a75671e4ec3fe969ded01a599645080eb/sdk/program/src/sysvar/mod.rs#L73)
|
|
125
|
+
which doesn't require these checks.
|
|
126
|
+
|
|
127
|
+
If the program always modifies the account in question, the address/owner check
|
|
128
|
+
isn't required because modifying an unowned account will be rejected by the runtime,
|
|
129
|
+
and the containing transaction will be thrown out.
|
|
130
|
+
|
|
131
|
+
## Rent
|
|
132
|
+
|
|
133
|
+
Keeping accounts alive on Solana incurs a storage cost called _rent_ because the
|
|
134
|
+
blockchain cluster must actively maintain the data to process any future transactions.
|
|
135
|
+
This is different from Bitcoin and Ethereum, where storing accounts doesn't
|
|
136
|
+
incur any costs.
|
|
137
|
+
|
|
138
|
+
The rent is debited from an account's balance by the runtime upon the first
|
|
139
|
+
access (including the initial account creation) in the current epoch by
|
|
140
|
+
transactions or once per an epoch if there are no transactions. The fee is
|
|
141
|
+
currently a fixed rate, measured in bytes-times-epochs. The fee may change in
|
|
142
|
+
the future.
|
|
143
|
+
|
|
144
|
+
For the sake of simple rent calculation, rent is always collected for a single,
|
|
145
|
+
full epoch. Rent is not pro-rated, meaning there are neither fees nor refunds
|
|
146
|
+
for partial epochs. This means that, on account creation, the first rent
|
|
147
|
+
collected isn't for the current partial epoch, but collected up front for the
|
|
148
|
+
next full epoch. Subsequent rent collections are for further future epochs. On
|
|
149
|
+
the other end, if the balance of an already-rent-collected account drops below
|
|
150
|
+
another rent fee mid-epoch, the account will continue to exist through the
|
|
151
|
+
current epoch and be purged immediately at the start of the upcoming epoch.
|
|
152
|
+
|
|
153
|
+
Accounts can be exempt from paying rent if they maintain a minimum balance. This
|
|
154
|
+
rent-exemption is described below.
|
|
155
|
+
|
|
156
|
+
### Calculation of rent
|
|
157
|
+
|
|
158
|
+
Note: The rent rate can change in the future.
|
|
159
|
+
|
|
160
|
+
As of writing, the fixed rent fee is 19.055441478439427 lamports per byte-epoch
|
|
161
|
+
on the testnet and mainnet-beta clusters. An [epoch](terminology.md#epoch) is
|
|
162
|
+
targeted to be 2 days (For devnet, the rent fee is 0.3608183131797095 lamports
|
|
163
|
+
per byte-epoch with its 54m36s-long epoch).
|
|
164
|
+
|
|
165
|
+
This value is calculated to target 0.01 SOL per mebibyte-day (exactly matching
|
|
166
|
+
to 3.56 SOL per mebibyte-year):
|
|
167
|
+
|
|
168
|
+
```text
|
|
169
|
+
Rent fee: 19.055441478439427 = 10_000_000 (0.01 SOL) * 365(approx. day in a year) / (1024 * 1024)(1 MiB) / (365.25/2)(epochs in 1 year)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
And rent calculation is done with the `f64` precision and the final result is
|
|
173
|
+
truncated to `u64` in lamports.
|
|
174
|
+
|
|
175
|
+
The rent calculation includes account metadata (address, owner, lamports, etc)
|
|
176
|
+
in the size of an account. Therefore the smallest an account can be for rent
|
|
177
|
+
calculations is 128 bytes.
|
|
178
|
+
|
|
179
|
+
For example, an account is created with the initial transfer of 10,000 lamports
|
|
180
|
+
and no additional data. Rent is immediately debited from it on creation,
|
|
181
|
+
resulting in a balance of 7,561 lamports:
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
Rent: 2,439 = 19.055441478439427 (rent rate) * 128 bytes (minimum account size) * 1 (epoch)
|
|
185
|
+
Account Balance: 7,561 = 10,000 (transfered lamports) - 2,439 (this account's rent fee for an epoch)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
The account balance will be reduced to 5,122 lamports at the next epoch even if
|
|
189
|
+
there is no activity:
|
|
190
|
+
|
|
191
|
+
```text
|
|
192
|
+
Account Balance: 5,122 = 7,561 (current balance) - 2,439 (this account's rent fee for an epoch)
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Accordingly, a minimum-size account will be immediately removed after creation
|
|
196
|
+
if the transferred lamports are less than or equal to 2,439.
|
|
197
|
+
|
|
198
|
+
### Rent exemption
|
|
199
|
+
|
|
200
|
+
Alternatively, an account can be made entirely exempt from rent collection by
|
|
201
|
+
depositing at least 2 years worth of rent. This is checked every time an
|
|
202
|
+
account's balance is reduced, and rent is immediately debited once the balance
|
|
203
|
+
goes below the minimum amount.
|
|
204
|
+
|
|
205
|
+
Program executable accounts are required by the runtime to be rent-exempt to
|
|
206
|
+
avoid being purged.
|
|
207
|
+
|
|
208
|
+
Note: Use the [`getMinimumBalanceForRentExemption` RPC
|
|
209
|
+
endpoint](developing/clients/jsonrpc-api.md#getminimumbalanceforrentexemption) to calculate the
|
|
210
|
+
minimum balance for a particular account size. The following calculation is
|
|
211
|
+
illustrative only.
|
|
212
|
+
|
|
213
|
+
For example, a program executable with the size of 15,000 bytes requires a
|
|
214
|
+
balance of 105,290,880 lamports (=~ 0.105 SOL) to be rent-exempt:
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
105,290,880 = 19.055441478439427 (fee rate) * (128 + 15_000)(account size including metadata) * ((365.25/2) * 2)(epochs in 2 years)
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Rent can also be estimated via the [`solana rent` CLI subcommand](cli/usage.md#solana-rent)
|
|
221
|
+
|
|
222
|
+
```text
|
|
223
|
+
$ solana rent 15000
|
|
224
|
+
Rent per byte-year: 0.00000348 SOL
|
|
225
|
+
Rent per epoch: 0.000288276 SOL
|
|
226
|
+
Rent-exempt minimum: 0.10529088 SOL
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Note: Rest assured that, should the storage rent rate need to be increased at some
|
|
230
|
+
point in the future, steps will be taken to ensure that accounts that are rent-exempt
|
|
231
|
+
before the increase will remain rent-exempt afterwards
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Calling Between Programs
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Cross-Program Invocations
|
|
6
|
+
|
|
7
|
+
The Solana runtime allows programs to call each other via a mechanism called
|
|
8
|
+
cross-program invocation. Calling between programs is achieved by one program
|
|
9
|
+
invoking an instruction of the other. The invoking program is halted until the
|
|
10
|
+
invoked program finishes processing the instruction.
|
|
11
|
+
|
|
12
|
+
For example, a client could create a transaction that modifies two accounts,
|
|
13
|
+
each owned by separate on-chain programs:
|
|
14
|
+
|
|
15
|
+
```rust,ignore
|
|
16
|
+
let message = Message::new(vec![
|
|
17
|
+
token_instruction::pay(&alice_pubkey),
|
|
18
|
+
acme_instruction::launch_missiles(&bob_pubkey),
|
|
19
|
+
]);
|
|
20
|
+
client.send_and_confirm_message(&[&alice_keypair, &bob_keypair], &message);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
A client may instead allow the `acme` program to conveniently invoke `token`
|
|
24
|
+
instructions on the client's behalf:
|
|
25
|
+
|
|
26
|
+
```rust,ignore
|
|
27
|
+
let message = Message::new(vec![
|
|
28
|
+
acme_instruction::pay_and_launch_missiles(&alice_pubkey, &bob_pubkey),
|
|
29
|
+
]);
|
|
30
|
+
client.send_and_confirm_message(&[&alice_keypair, &bob_keypair], &message);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Given two on-chain programs `token` and `acme`, each implementing instructions
|
|
34
|
+
`pay()` and `launch_missiles()` respectively, acme can be implemented with a
|
|
35
|
+
call to a function defined in the `token` module by issuing a cross-program
|
|
36
|
+
invocation:
|
|
37
|
+
|
|
38
|
+
```rust,ignore
|
|
39
|
+
mod acme {
|
|
40
|
+
use token_instruction;
|
|
41
|
+
|
|
42
|
+
fn launch_missiles(accounts: &[AccountInfo]) -> Result<()> {
|
|
43
|
+
...
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
fn pay_and_launch_missiles(accounts: &[AccountInfo]) -> Result<()> {
|
|
47
|
+
let alice_pubkey = accounts[1].key;
|
|
48
|
+
let instruction = token_instruction::pay(&alice_pubkey);
|
|
49
|
+
invoke(&instruction, accounts)?;
|
|
50
|
+
|
|
51
|
+
launch_missiles(accounts)?;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`invoke()` is built into Solana's runtime and is responsible for routing the
|
|
56
|
+
given instruction to the `token` program via the instruction's `program_id`
|
|
57
|
+
field.
|
|
58
|
+
|
|
59
|
+
Note that `invoke` requires the caller to pass all the accounts required by the
|
|
60
|
+
instruction being invoked. This means that both the executable account (the
|
|
61
|
+
ones that matches the instruction's program id) and the accounts passed to the
|
|
62
|
+
instruction processor.
|
|
63
|
+
|
|
64
|
+
Before invoking `pay()`, the runtime must ensure that `acme` didn't modify any
|
|
65
|
+
accounts owned by `token`. It does this by applying the runtime's policy to the
|
|
66
|
+
current state of the accounts at the time `acme` calls `invoke` vs. the initial
|
|
67
|
+
state of the accounts at the beginning of the `acme`'s instruction. After
|
|
68
|
+
`pay()` completes, the runtime must again ensure that `token` didn't modify any
|
|
69
|
+
accounts owned by `acme` by again applying the runtime's policy, but this time
|
|
70
|
+
with the `token` program ID. Lastly, after `pay_and_launch_missiles()`
|
|
71
|
+
completes, the runtime must apply the runtime policy one more time, where it
|
|
72
|
+
normally would, but using all updated `pre_*` variables. If executing
|
|
73
|
+
`pay_and_launch_missiles()` up to `pay()` made no invalid account changes,
|
|
74
|
+
`pay()` made no invalid changes, and executing from `pay()` until
|
|
75
|
+
`pay_and_launch_missiles()` returns made no invalid changes, then the runtime
|
|
76
|
+
can transitively assume `pay_and_launch_missiles()` as whole made no invalid
|
|
77
|
+
account changes, and therefore commit all these account modifications.
|
|
78
|
+
|
|
79
|
+
### Instructions that require privileges
|
|
80
|
+
|
|
81
|
+
The runtime uses the privileges granted to the caller program to determine what
|
|
82
|
+
privileges can be extended to the callee. Privileges in this context refer to
|
|
83
|
+
signers and writable accounts. For example, if the instruction the caller is
|
|
84
|
+
processing contains a signer or writable account, then the caller can invoke an
|
|
85
|
+
instruction that also contains that signer and/or writable account.
|
|
86
|
+
|
|
87
|
+
This privilege extension relies on the fact that programs are immutable, except
|
|
88
|
+
during the special case of program upgrades.
|
|
89
|
+
|
|
90
|
+
In the case of the `acme` program, the runtime can safely treat the transaction's
|
|
91
|
+
signature as a signature of a `token` instruction. When the runtime sees the
|
|
92
|
+
`token` instruction references `alice_pubkey`, it looks up the key in the `acme`
|
|
93
|
+
instruction to see if that key corresponds to a signed account. In this case, it
|
|
94
|
+
does and thereby authorizes the `token` program to modify Alice's account.
|
|
95
|
+
|
|
96
|
+
### Program signed accounts
|
|
97
|
+
|
|
98
|
+
Programs can issue instructions that contain signed accounts that were not
|
|
99
|
+
signed in the original transaction by using [Program derived
|
|
100
|
+
addresses](#program-derived-addresses).
|
|
101
|
+
|
|
102
|
+
To sign an account with program derived addresses, a program may
|
|
103
|
+
`invoke_signed()`.
|
|
104
|
+
|
|
105
|
+
```rust,ignore
|
|
106
|
+
invoke_signed(
|
|
107
|
+
&instruction,
|
|
108
|
+
accounts,
|
|
109
|
+
&[&["First addresses seed"],
|
|
110
|
+
&["Second addresses first seed", "Second addresses second seed"]],
|
|
111
|
+
)?;
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Call Depth
|
|
115
|
+
|
|
116
|
+
Cross-program invocations allow programs to invoke other programs directly but
|
|
117
|
+
the depth is constrained currently to 4.
|
|
118
|
+
|
|
119
|
+
### Reentrancy
|
|
120
|
+
|
|
121
|
+
Reentrancy is currently limited to direct self recursion capped at a fixed
|
|
122
|
+
depth. This restriction prevents situations where a program might invoke another
|
|
123
|
+
from an intermediary state without the knowledge that it might later be called
|
|
124
|
+
back into. Direct recursion gives the program full control of its state at the
|
|
125
|
+
point that it gets called back.
|
|
126
|
+
|
|
127
|
+
## Program Derived Addresses
|
|
128
|
+
|
|
129
|
+
Program derived addresses allow programmatically generated signatures to be used
|
|
130
|
+
when [calling between programs](#cross-program-invocations).
|
|
131
|
+
|
|
132
|
+
Using a program derived address, a program may be given the authority over an
|
|
133
|
+
account and later transfer that authority to another. This is possible because
|
|
134
|
+
the program can act as the signer in the transaction that gives authority.
|
|
135
|
+
|
|
136
|
+
For example, if two users want to make a wager on the outcome of a game in
|
|
137
|
+
Solana, they must each transfer their wager's assets to some intermediary that
|
|
138
|
+
will honor their agreement. Currently, there is no way to implement this
|
|
139
|
+
intermediary as a program in Solana because the intermediary program cannot
|
|
140
|
+
transfer the assets to the winner.
|
|
141
|
+
|
|
142
|
+
This capability is necessary for many DeFi applications since they require
|
|
143
|
+
assets to be transferred to an escrow agent until some event occurs that
|
|
144
|
+
determines the new owner.
|
|
145
|
+
|
|
146
|
+
- Decentralized Exchanges that transfer assets between matching bid and ask
|
|
147
|
+
orders.
|
|
148
|
+
|
|
149
|
+
- Auctions that transfer assets to the winner.
|
|
150
|
+
|
|
151
|
+
- Games or prediction markets that collect and redistribute prizes to the
|
|
152
|
+
winners.
|
|
153
|
+
|
|
154
|
+
Program derived address:
|
|
155
|
+
|
|
156
|
+
1. Allow programs to control specific addresses, called program addresses, in
|
|
157
|
+
such a way that no external user can generate valid transactions with
|
|
158
|
+
signatures for those addresses.
|
|
159
|
+
|
|
160
|
+
2. Allow programs to programmatically sign for program addresses that are
|
|
161
|
+
present in instructions invoked via [Cross-Program Invocations](#cross-program-invocations).
|
|
162
|
+
|
|
163
|
+
Given the two conditions, users can securely transfer or assign the authority of
|
|
164
|
+
on-chain assets to program addresses and the program can then assign that
|
|
165
|
+
authority elsewhere at its discretion.
|
|
166
|
+
|
|
167
|
+
### Private keys for program addresses
|
|
168
|
+
|
|
169
|
+
A Program address does not lie on the ed25519 curve and therefore has no valid
|
|
170
|
+
private key associated with it, and thus generating a signature for it is
|
|
171
|
+
impossible. While it has no private key of its own, it can be used by a program
|
|
172
|
+
to issue an instruction that includes the Program address as a signer.
|
|
173
|
+
|
|
174
|
+
### Hash-based generated program addresses
|
|
175
|
+
|
|
176
|
+
Program addresses are deterministically derived from a collection of seeds and a
|
|
177
|
+
program id using a 256-bit pre-image resistant hash function. Program address
|
|
178
|
+
must not lie on the ed25519 curve to ensure there is no associated private key.
|
|
179
|
+
During generation an error will be returned if the address is found to lie on
|
|
180
|
+
the curve. There is about a 50/50 chance of this happening for a given
|
|
181
|
+
collection of seeds and program id. If this occurs a different set of seeds or
|
|
182
|
+
a seed bump (additional 8 bit seed) can be used to find a valid program address
|
|
183
|
+
off the curve.
|
|
184
|
+
|
|
185
|
+
Deterministic program addresses for programs follow a similar derivation path as
|
|
186
|
+
Accounts created with `SystemInstruction::CreateAccountWithSeed` which is
|
|
187
|
+
implemented with `Pubkey::create_with_seed`.
|
|
188
|
+
|
|
189
|
+
For reference that implementation is as follows:
|
|
190
|
+
|
|
191
|
+
```rust,ignore
|
|
192
|
+
pub fn create_with_seed(
|
|
193
|
+
base: &Pubkey,
|
|
194
|
+
seed: &str,
|
|
195
|
+
program_id: &Pubkey,
|
|
196
|
+
) -> Result<Pubkey, SystemError> {
|
|
197
|
+
if seed.len() > MAX_ADDRESS_SEED_LEN {
|
|
198
|
+
return Err(SystemError::MaxSeedLengthExceeded);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
Ok(Pubkey::new(
|
|
202
|
+
hashv(&[base.as_ref(), seed.as_ref(), program_id.as_ref()]).as_ref(),
|
|
203
|
+
))
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Programs can deterministically derive any number of addresses by using seeds.
|
|
208
|
+
These seeds can symbolically identify how the addresses are used.
|
|
209
|
+
|
|
210
|
+
From `Pubkey`::
|
|
211
|
+
|
|
212
|
+
```rust,ignore
|
|
213
|
+
/// Generate a derived program address
|
|
214
|
+
/// * seeds, symbolic keywords used to derive the key
|
|
215
|
+
/// * program_id, program that the address is derived for
|
|
216
|
+
pub fn create_program_address(
|
|
217
|
+
seeds: &[&[u8]],
|
|
218
|
+
program_id: &Pubkey,
|
|
219
|
+
) -> Result<Pubkey, PubkeyError>
|
|
220
|
+
|
|
221
|
+
/// Find a valid off-curve derived program address and its bump seed
|
|
222
|
+
/// * seeds, symbolic keywords used to derive the key
|
|
223
|
+
/// * program_id, program that the address is derived for
|
|
224
|
+
pub fn find_program_address(
|
|
225
|
+
seeds: &[&[u8]],
|
|
226
|
+
program_id: &Pubkey,
|
|
227
|
+
) -> Option<(Pubkey, u8)> {
|
|
228
|
+
let mut bump_seed = [std::u8::MAX];
|
|
229
|
+
for _ in 0..std::u8::MAX {
|
|
230
|
+
let mut seeds_with_bump = seeds.to_vec();
|
|
231
|
+
seeds_with_bump.push(&bump_seed);
|
|
232
|
+
if let Ok(address) = create_program_address(&seeds_with_bump, program_id) {
|
|
233
|
+
return Some((address, bump_seed[0]));
|
|
234
|
+
}
|
|
235
|
+
bump_seed[0] -= 1;
|
|
236
|
+
}
|
|
237
|
+
None
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Using program addresses
|
|
242
|
+
|
|
243
|
+
Clients can use the `create_program_address` function to generate a destination
|
|
244
|
+
address. In this example, we assume that
|
|
245
|
+
`create_program_address(&[&["escrow"]], &escrow_program_id)` generates a valid
|
|
246
|
+
program address that is off the curve.
|
|
247
|
+
|
|
248
|
+
```rust,ignore
|
|
249
|
+
// deterministically derive the escrow key
|
|
250
|
+
let escrow_pubkey = create_program_address(&[&["escrow"]], &escrow_program_id);
|
|
251
|
+
|
|
252
|
+
// construct a transfer message using that key
|
|
253
|
+
let message = Message::new(vec![
|
|
254
|
+
token_instruction::transfer(&alice_pubkey, &escrow_pubkey, 1),
|
|
255
|
+
]);
|
|
256
|
+
|
|
257
|
+
// process the message which transfer one 1 token to the escrow
|
|
258
|
+
client.send_and_confirm_message(&[&alice_keypair], &message);
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Programs can use the same function to generate the same address. In the function
|
|
262
|
+
below the program issues a `token_instruction::transfer` from a program address
|
|
263
|
+
as if it had the private key to sign the transaction.
|
|
264
|
+
|
|
265
|
+
```rust,ignore
|
|
266
|
+
fn transfer_one_token_from_escrow(
|
|
267
|
+
program_id: &Pubkey,
|
|
268
|
+
accounts: &[AccountInfo],
|
|
269
|
+
) -> ProgramResult {
|
|
270
|
+
// User supplies the destination
|
|
271
|
+
let alice_pubkey = keyed_accounts[1].unsigned_key();
|
|
272
|
+
|
|
273
|
+
// Deterministically derive the escrow pubkey.
|
|
274
|
+
let escrow_pubkey = create_program_address(&[&["escrow"]], program_id);
|
|
275
|
+
|
|
276
|
+
// Create the transfer instruction
|
|
277
|
+
let instruction = token_instruction::transfer(&escrow_pubkey, &alice_pubkey, 1);
|
|
278
|
+
|
|
279
|
+
// The runtime deterministically derives the key from the currently
|
|
280
|
+
// executing program ID and the supplied keywords.
|
|
281
|
+
// If the derived address matches a key marked as signed in the instruction
|
|
282
|
+
// then that key is accepted as signed.
|
|
283
|
+
invoke_signed(&instruction, accounts, &[&["escrow"]])
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Note that the address generated using `create_program_address` is not guaranteed
|
|
288
|
+
to be a valid program address off the curve. For example, let's assume that the
|
|
289
|
+
seed `"escrow2"` does not generate a valid program address.
|
|
290
|
+
|
|
291
|
+
To generate a valid program address using `"escrow2` as a seed, use
|
|
292
|
+
`find_program_address`, iterating through possible bump seeds until a valid
|
|
293
|
+
combination is found. The preceding example becomes:
|
|
294
|
+
|
|
295
|
+
```rust,ignore
|
|
296
|
+
// find the escrow key and valid bump seed
|
|
297
|
+
let (escrow_pubkey2, escrow_bump_seed) = find_program_address(&[&["escrow2"]], &escrow_program_id);
|
|
298
|
+
|
|
299
|
+
// construct a transfer message using that key
|
|
300
|
+
let message = Message::new(vec![
|
|
301
|
+
token_instruction::transfer(&alice_pubkey, &escrow_pubkey2, 1),
|
|
302
|
+
]);
|
|
303
|
+
|
|
304
|
+
// process the message which transfer one 1 token to the escrow
|
|
305
|
+
client.send_and_confirm_message(&[&alice_keypair], &message);
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Within the program, this becomes:
|
|
309
|
+
|
|
310
|
+
```rust,ignore
|
|
311
|
+
fn transfer_one_token_from_escrow2(
|
|
312
|
+
program_id: &Pubkey,
|
|
313
|
+
accounts: &[AccountInfo],
|
|
314
|
+
) -> ProgramResult {
|
|
315
|
+
// User supplies the destination
|
|
316
|
+
let alice_pubkey = keyed_accounts[1].unsigned_key();
|
|
317
|
+
|
|
318
|
+
// Iteratively derive the escrow pubkey
|
|
319
|
+
let (escrow_pubkey2, bump_seed) = find_program_address(&[&["escrow2"]], program_id);
|
|
320
|
+
|
|
321
|
+
// Create the transfer instruction
|
|
322
|
+
let instruction = token_instruction::transfer(&escrow_pubkey2, &alice_pubkey, 1);
|
|
323
|
+
|
|
324
|
+
// Include the generated bump seed to the list of all seeds
|
|
325
|
+
invoke_signed(&instruction, accounts, &[&["escrow2", &[bump_seed]]])
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Since `find_program_address` requires iterating over a number of calls to
|
|
330
|
+
`create_program_address`, it may use more
|
|
331
|
+
[compute budget](developing/programming-model/runtime.md#compute-budget) when
|
|
332
|
+
used on-chain. To reduce the compute cost, use `find_program_address` off-chain
|
|
333
|
+
and pass the resulting bump seed to the program.
|
|
334
|
+
|
|
335
|
+
### Instructions that require signers
|
|
336
|
+
|
|
337
|
+
The addresses generated with `create_program_address` and `find_program_address`
|
|
338
|
+
are indistinguishable from any other public key. The only way for the runtime to
|
|
339
|
+
verify that the address belongs to a program is for the program to supply the
|
|
340
|
+
seeds used to generate the address.
|
|
341
|
+
|
|
342
|
+
The runtime will internally call `create_program_address`, and compare the
|
|
343
|
+
result against the addresses supplied in the instruction.
|
|
344
|
+
|
|
345
|
+
## Examples
|
|
346
|
+
|
|
347
|
+
Refer to [Developing with
|
|
348
|
+
Rust](developing/on-chain-programs/../../../on-chain-programs/developing-rust.md#examples)
|
|
349
|
+
and [Developing with
|
|
350
|
+
C](developing/on-chain-programs/../../../on-chain-programs/developing-c.md#examples)
|
|
351
|
+
for examples of how to use cross-program invocation.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Overview"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
An [app](terminology.md#app) interacts with a Solana cluster by sending it
|
|
6
|
+
[transactions](transactions.md) with one or more
|
|
7
|
+
[instructions](transactions.md#instructions). The Solana [runtime](runtime.md)
|
|
8
|
+
passes those instructions to [programs](terminology.md#program) deployed by app
|
|
9
|
+
developers beforehand. An instruction might, for example, tell a program to
|
|
10
|
+
transfer [lamports](terminology.md#lamport) from one [account](accounts.md) to
|
|
11
|
+
another or create an interactive contract that governs how lamports are
|
|
12
|
+
transferred. Instructions are executed sequentially and atomically for each
|
|
13
|
+
transaction. If any instruction is invalid, all account changes in the
|
|
14
|
+
transaction are discarded.
|
|
15
|
+
|
|
16
|
+
To start developing immediately you can build, deploy, and run one of the
|
|
17
|
+
[examples](developing/on-chain-programs/examples.md).
|