Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ankit Yadav
    @ankit-yadv

    Hi @OsVaiyani_twitter,

    We don't have any plans to launch C# SDK in near future.

    daan-ost
    @daan-ost
    Hi Guys, the IOS demo app does not have an example to show the token balance of the loggedin user . Can you provide some example code? Tnx Daan
    Ankit Yadav
    @ankit-yadv

    Hi @daan-ost,

    We have added balance API in version 2.2.0, more detail here: https://github.com/ostdotcom/ost-wallet-sdk-ios#user-balance

    daan-ost
    @daan-ost
    @ankit-yadv Tnx, my developer is looking for an example in the demo-app for iOS. Do you have that already?
    Shinto2000
    @Shinto2000_twitter

    Hello, i'm using the key/secret directly from my platform.ost.com but am getting the following error. Expired API key & secret?

    $ node test.js
    {"success":false,"err":{"code":"UNAUTHORIZED","msg":"Access denied due to using expired API key and secret. You can check the active API Key and secret on developer's page in OST Platform.","error_data":[{"parameter":"api_key","msg":"The API Key is not entered correctly. Please inspect for what is being sent, verify it against the API KEY shown on developer's page in OST Platform and re-submit."}],"internal_id":"scm_ac_1"}}

    $ npm --version
    6.9.0

    Shinto2000
    @Shinto2000_twitter
    const ostObj = new OSTSDK({
    "apiKey": 'caae229c48a515dc5368acb1b3e2cddf',
    "apiSecret": ‘xxxxx’,
    "apiEndpoint": "https://api.ost.com/mainnet/v2/",
    "config": {"timeout": 15}
    });
    interchanged " with ' and no luck
    Ankit Yadav
    @ankit-yadv
    Hi @Shinto2000_twitter,
    In OST Platform, by default you would be in sandbox mode. Sandbox mode let's you test your economy on testnet. So you need to change apiEndpoint to "https://api.ost.com/testnet/v2/".
    Shinto2000
    @Shinto2000_twitter
    !!!!! Thank you
    $ node test.js
    {"success":true,"data":{"result_type":"token","token":{"id":1402,"name":"Think Bigger","symbol":"FTW","base_token":"OST","conversion_factor":1,"total_supply":"40000000000000000000000","decimals":18,"origin_chain":{"chain_id":3,"branded_token":"0x94f9feba4e54a4342a6229fe2c66a1ef78713313","organization":{"contract":"0x150fcb51cc8e11c6d98dbc49914c63adf4431340","owner":"0x2cc3fa06d4b8594ec6eaff11fd8f012b200ce633"},"stakers":["0x2cc3fa06d4b8594ec6eaff11fd8f012b200ce633"]},"auxiliary_chains":[{"chain_id":1406,"utility_branded_token":"0x82259ab097169582b3d553f0ee982cc5ad2a0978","company_token_holders":["0x1c68fa1f47e290e94c6117be8429da7b8803937e"],"company_uuids":["9931e53a-83e6-4f9c-92c2-1e4319eab349"],"organization":{"contract":"0x4afd3217834b1fe06b2dcfbb0625e8052deabddc","owner":"0x2cc3fa06d4b8594ec6eaff11fd8f012b200ce633"}}],"updated_timestamp":1560862401}}}
    Shinto2000
    @Shinto2000_twitter
    Screen Shot 2019-07-06 at 6.15.19 AM.png
    My final question. Here's my error based on that code above.
    $ node award.js
    /Users/xxx/Desktop/OST/award.js:16
    let raw_calldata = JSON.stringify({
    ^^^
    SyntaxError: let is disallowed as a lexically bound name
    at Module._compile (internal/modules/cjs/loader.js:721:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
    at first i left what was posted as but still same return: parameters: [[transferTo],[transferAmount]]
    Ankit Yadav
    @ankit-yadv

    Hi @Shinto2000_twitter,

    If you are separating your declarations with commas, you should not repeat let. You should either remove let from each declaration, or use semi-colons instead.

    Shinto2000
    @Shinto2000_twitter
    In doing so, i got this message:
    MacBook-Pro:OST $ node award.js
    {"success":false,"err":{"code":"BAD_REQUEST","msg":"At least one parameter is invalid or missing. See \"err.error_data\" array for more details.","error_data":[{"parameter":"to","msg":"Invalid to. Please inspect for what is being sent, rectify and re-submit."}],"internal_id":"s_et_b_2"}}
    $
    Shinto2000
    @Shinto2000_twitter
    pls disregard, i got mine working.
    $ node award.js
    {"success":true,"data":{"result_type":"transaction","transaction":{"id":"bd2f6e12-1cb7-4fc6-a26d-92cc909cc420","transaction_hash":null,"from":null,"to":"0x1c68fa1f47e290e94c6117be8429da7b8803937e","nonce":null,"value":null,"gas_price":"1000000000","gas_used":null,"transaction_fee":null,"block_confirmation":null,"status":"CREATED","updated_timestamp":1562465543,"block_timestamp":null,"block_number":null,"rule_name":null,"meta_property":{},"transfers":[{"from":"0x1c68fa1f47e290e94c6117be8429da7b8803937e","from_user_id":"9931e53a-83e6-4f9c-92c2-1e4319eab349","to":"0x18b1c66cb41c952c5982465588cf680b28432232","to_user_id":"a527c4d6-f572-458c-bf31-eba264cb5927","amount":"1000000000000000000000","kind":"transfer"}]}}}
    schlinkmumpitz
    @schlinkmumpitz

    Hi everyone, just wanted to point you to some syntactical errors in the example code of section "Execute a transaction" (at least for node.js).

    correct form would be:

    let transferTo = "0xa31e988eebc89d0bc3e4a9a5463545ea534593e4",
        transferAmount = '1',
        raw_calldata = JSON.stringify({
                method: "directTransfers",
                parameters: [[transferTo],[transferAmount]]
        }),
        meta_property = {
            "name": "transaction_name" , //like, download
            "type": "user_to_user", // user_to_user, company_to_user, user_to_company
            "details" : "" // memo field to add additional info about the transaction
        },
        executeParams = {
            user_id: "ee89965c-2fdb-41b5-8b6f-94f441463c7b",
            to: "0xe37906219ad67cc1301b970539c9860f9ce8d991",
            raw_calldata: raw_calldata,
            meta_property: meta_property
        };

    i saw similar problems at various positions. if you just copy&paste the examples you will get errors/warnings concerning variable declarations

    Ankit Yadav
    @ankit-yadv
    Hi @schlinkmumpitz ,
    Thanks for pointing out these errors, we will be updating dev.ost.com asap.
    pyramus
    @pyramus
    @ankit-yadv Yes, I've noticed a lot of similar syntax errors in examples throughout the documentation.
    Daniel Pham
    @nguyenpc
    @ankit-yadv I see there is a function that allow us to execute a transaction by scanning a QR code. could you guide us how we can create a QR-transaction to test that feature?
    pyramus
    @pyramus
    @Shinto2000_twitter (or anyone else) did you also manage to play around with company to user transfers yet?
    I'm unable to add transfer details to a direct transfer (Company->User) with the 'meta_property' parameter. I know this should be possible from the documentation, but examples are using different syntax (and most even commented out this parameter).
    I tried everything but just keep getting this error telling me the parameter is invalid.
    {"success":false,"err":{"code":"BAD_REQUEST","msg":"At least one parameter is invalid or missing. See \"err.error_data\" array for more details.","error_data":[{"parameter":"meta_property","msg":"Invalid parameter meta_property. Please ensure the input is well formed or visit https://dev.ost.com/platform/docs/api for details on accepted datatypes for API parameters."}],"internal_id":"v_ap_4"}}
    Ankit Yadav
    @ankit-yadv

    Hi @pyramus,

    can send me your code snippet of execute transaction parameters?

    pyramus
    @pyramus
    I'm using node. And the example on https://dev.ost.com/platform/docs/api/?javascript#transaction-object is completly different for company to user transfer.
    it works fine until I try to add the meta_property details
    Ankit Yadav
    @ankit-yadv
    What did you add in meta_property?
    Sharing the transaction parameters would help me solve your issue @pyramus
    pyramus
    @pyramus
    First I tried the example, then all sorts of variants. Checked here:
    meta_property spec in API doc
    so if you are able to get this example code attached to the transfer, please let me know
    meta_property = { "name": "transaction_name", "type": "company_to_user", "details" : ""}
    Ankit Yadav
    @ankit-yadv

    Hi @pyramus,

    can you try running your code with this value of meta_property?

    `
    meta_property:

    { "name": "transaction_name",
    "type": "company_to_user",
    "details": "Some more details about transactions"
    }
    `

    pyramus
    @pyramus
    that wont work. syntax is incorrect for node var declaration
    Daniel Pham
    @nguyenpc

    @ankit-yadv

    Hi @nguyenpc,

    You can follow this execute transaction guide here: https://dev.ost.com/platform/docs/guides/execute_transaction/#generating-qrcode-with-transaction-data

    Thank you, I generated a QR code as guided, the app seems regconize the tx, however it crashed after scanning the QR code.

    is there any other channel where we can submit our issue (i.e. Github)?

    pyramus
    @pyramus
    i have to use =
    for the rest I don't see any real difference in the value of your code @ankit-yadv
    but just to confirm: the exact same error happen when I put a non-empty string inside "details". obviously ;-)
    pyramus
    @pyramus
    @ankit-yadv
    let meta_property = { "name": "Signup Bonus", "type": "company_to_user", "details": "Credit to get started." }; executeParams = { user_id: companyUserId, to: contractRuleAddress, raw_calldata: raw_calldata, // meta_property: meta_property };
    executes correctly / but crashes when i uncomment meta_property
    this is exactly like the API specs, but please try to run your own examples from Node.js and you'll see it will fail
    Ankit Yadav
    @ankit-yadv
    @pyramus,
    I am trying these codes, I will update you once we fix these issues.
    pyramus
    @pyramus
    yeah sure. I would recommend to walk through some more of the Node examples, because there seems to be a lot of syntax errors as well (as me and @schlinkmumpitz mentioned). I really love the amount of examples you provided but it's a missed opportunity when they don't run ;-)
    Ankit Yadav
    @ankit-yadv

    Hi @nguyenpc,

    You can create a ticket here https://help.ost.com/support/home

    Daniel Pham
    @nguyenpc

    Hi @nguyenpc,

    You can create a ticket here https://help.ost.com/support/home

    I've submitted a ticket, thanks.

    Shinto2000
    @Shinto2000_twitter
    @pyramus Yes, my tx's were company-to-user, i had to make sure you get the correct rules address in first (to
    Required Rule address. You can get the rule address by using list all rules API.)

    i got the same error until i got the Rules address from 'Direct Transfer', and placed into the (to)

    let executeParams = {
    user_id: "9931e53a-83e6-4f9c-92c2-1e4319eab349",
    to: "0xe2c560d01f28d2962c934c747234f1453170fae8",
    raw_calldata: raw_calldata,
    //meta_property: meta_property
    };

    Ankit Yadav
    @ankit-yadv

    Thanks @Shinto2000_twitter for mentioning rules address, the to address is the address of rule that you want to execute.

    @pyramus you can also follow this execute transaction guide, it shows a step by step process to execute transactions.