# Pre-paid model on Sentinel There two types of payment models are available on Sentinel - Post-paid or Pay as you use - Pre-paid In Post-paid model an individual node operator sets the price per Gigabyte of bandwidth that he/she provides. So when a client subscribres to a node he/she locks some amount which we will be released directly into the node's operator account based on the bandwidth consumption. In Pre-paid model where a provider creates one or multiple subscription plans and attaches the nodes to these subscription plans. In this model a node can be maintained by an individual or an organization which chooses to operate under a provider. When a client subscribes to these plans he/she pays specified amount to the Provider and gets the ability to access any of the node under the perticular plan. In this model node operators won't get any amount directly from the client but provider can share his/her/its revenue based on the offchain agreements. When someone wants to register an on-chain provider they have to fund the community pool with 250K $DVPNs. ## Registering a Provider ``` sh NAME= IDENTITY= WEBSITE= DESCRIPTION= FROM_KEY= sentinelhub tx vpn provider register \ --chain-id "sentinelhub-2" \ --node "https://rpc.sentinel.co:443" \ --gas-prices "0.1udvpn" \ --from "${FROM_KEY}" \ --name "${NAME}" \ --identity "${IDENTITY}" \ --website "${WEBSITE}" \ --description "${DESCRIPTION}" ``` ## Update a Provider ``` sh NAME= IDENTITY= WEBSITE= DESCRIPTION= FROM_KEY= sentinelhub tx vpn provider update \ --chain-id "sentinelhub-2" \ --node "https://rpc.sentinel.co:443" \ --gas-prices "0.1udvpn" \ --from "${FROM_KEY}" \ --name "${NAME}" \ --identity "${IDENTITY}" \ --website "${WEBSITE}" \ --description "${DESCRIPTION}" ``` ## Create a subscription plan ``` sh BYTES= PRICE= VALIDITY= FROM_KEY= sentinelhub tx vpn plan add \ --chain-id "sentinelhub-2" \ --node "https://rpc.sentinel.co:443" \ --gas-prices "0.1udvpn" \ --from "${FROM_KEY}" \ --bytes ${BYTES} \ --price "${PRICE}" \ --validity "${VALIDITY}" ``` ## Update a subscription plan status ``` sh PLAN_ID= STATUS= FROM_KEY= sentinelhub tx vpn plan status-set \ --chain-id "sentinelhub-2" \ --node "https://rpc.sentinel.co:443" \ --gas-prices "0.1udvpn" \ --from "${FROM_KEY}" \ --status "${STATUS}" ${PLAN_ID} ``` ## Add a node to a subscription plan ``` sh PLAN_ID= NODE_ADDRESS= FROM_KEY= sentinelhub tx vpn plan node-add \ --chain-id "sentinelhub-2" \ --node "https://rpc.sentinel.co:443" \ --gas-prices "0.1udvpn" \ --from "${FROM_KEY}" \ ${PLAN_ID} "${NODE_ADDRESS}" ``` ## Remove a node from a subscription plan ``` sh PLAN_ID= NODE_ADDRESS= FROM_KEY= sentinelhub tx vpn plan node-remove \ --chain-id "sentinelhub-2" \ --node "https://rpc.sentinel.co:443" \ --gas-prices "0.1udvpn" \ --from "${FROM_KEY}" \ ${PLAN_ID} "${NODE_ADDRESS}" ```