Queries
QueryMsg
Config
Gets the configuration of the Enterprise contract.
Request
{ "config": {}}
Response
{ "config": { "payment_contract": "terra1gyh4td7v96mucr4eaksd2msg0jv0mcn9a5yj85vx5l7hty3tu9pspuduqu", "community_pool": "terra1ukpw6g9dqfw3fk2mqchplgcz4jaukttf6tpyrht7sw00t7mn7dps5l9qzt" }}
StreamsByDealIds
Gets all streams belonging to specified deal IDs. May specify only a single direction of streams to return (either from Enterprise to X, or to Enterprise from X).
Request
{ "streams_by_deal_ids": { "deal_ids": ["11", "13"], "stream_direction": "outgoing" }}
Response
{ "deal_stream_infos": [ { "deal_id": "13", "deal_name": "Bestest deal", "streams": [ { "status": "valid", "immutable": false, "token_id": "PAY-51", "stream_id": "51", "name": "Stream name", "asset_info": { "cw20": "terra1lm3km2v7mtcp34wlmdd5hgksc2x3f0pm3k9jyl0kjtjwztq6408qyq84vw" }, "creator_addr": "terra19cc0p93h5g9prs8stre4zgwmngmlxc48pg3hxjvt8tkujn6m5wpsshl7v3", "issuance_start_timestamp": "1657556130", "issuance_end_timestamp": "1657563330", "amount": "1000", "interval": "1", "last_claimed_timestamp": "1657562330", "total_funded": "7200000", "funds_remaining": "7200000" } ] } ]}
StreamsByStreamIds
Gets all stream infos with IDs listed in the stream IDs.
Request
{ "streams_by_stream_ids": { "stream_ids": ["11", "13"] }}
Response
{ "streams": [ { "status": "valid", "immutable": false, "token_id": "PAY-51", "stream_id": "51", "name": "Stream name", "asset_info": { "cw20": "terra1lm3km2v7mtcp34wlmdd5hgksc2x3f0pm3k9jyl0kjtjwztq6408qyq84vw" }, "creator_addr": "terra19cc0p93h5g9prs8stre4zgwmngmlxc48pg3hxjvt8tkujn6m5wpsshl7v3", "issuance_start_timestamp": "1657556130", "issuance_end_timestamp": "1657563330", "amount": "1000", "interval": "1", "last_claimed_timestamp": "1657562330", "total_funded": "7200000", "funds_remaining": "7200000" } ]}
StreamsCreatedByDao
Gets all stream infos that were created by the Enterprise. May specify optional 'start_after' for pagination.
Request
{ "streams_created_by_dao": { "start_after": "50" }}
Response
{ "streams": [ { "status": "valid", "immutable": false, "token_id": "PAY-51", "stream_id": "51", "name": "Stream name", "asset_info": { "cw20": "terra1lm3km2v7mtcp34wlmdd5hgksc2x3f0pm3k9jyl0kjtjwztq6408qyq84vw" }, "creator_addr": "terra19cc0p93h5g9prs8stre4zgwmngmlxc48pg3hxjvt8tkujn6m5wpsshl7v3", "issuance_start_timestamp": "1657556130", "issuance_end_timestamp": "1657563330", "amount": "1000", "interval": "1", "last_claimed_timestamp": "1657562330", "total_funded": "7200000", "funds_remaining": "7200000" } ]}
Stream
Gets stream info for the specified stream ID.
Request
{ "stream": { "stream_id": "50" }}
Response
{ "stream": { "status": "valid", "immutable": false, "token_id": "PAY-50", "stream_id": "50", "name": "Stream name", "asset_info": { "cw20": "terra1lm3km2v7mtcp34wlmdd5hgksc2x3f0pm3k9jyl0kjtjwztq6408qyq84vw" }, "creator_addr": "terra19cc0p93h5g9prs8stre4zgwmngmlxc48pg3hxjvt8tkujn6m5wpsshl7v3", "issuance_start_timestamp": "1657556130", "issuance_end_timestamp": "1657563330", "amount": "1000", "interval": "1", "last_claimed_timestamp": "1657562330", "total_funded": "7200000", "funds_remaining": "7200000" }}
ClaimableFunds
Gets currently claimable funds for each of the listed stream IDs.
Request
{ "streams": ["50", "51", "73"]}
Response
{ "claimable_amounts": [ { "id": "50", "amount": "1336355" }, { "id": "51", "amount": "12350" }, { "id": "73", "amount": "200075" } ]}