Grant access condition.

        :param agreement_id: id of the agreement, hex str
        :param did: DID, str
        :param grantee_address: Address, hex str
        :param account: Account
        :return:
191251
def grant_access(self, agreement_id, did, grantee_address, account):
        
        return self._keeper.access_secret_store_condition.fulfill(
            agreement_id, add_0x_prefix(did_to_id(did)), grantee_address, account
        )
367349
public ACL getACL(AuthScheme scheme, String id){
        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.GetACL);

        GetACLProtocol p = new GetACLProtocol(scheme, id);

        Response resp = connection.submitRequest(header, p, null);
        return ((GetACLResponse) resp).getAcl();
    }
715976
def get_template(self, template_id):
        
        template = self.contract_concise.getTemplate(template_id)
        if template and len(template) == 4:
            return AgreementTemplate(*template)

        return None
1123224
def grant_client(self, client_id, read=True, write=True):
        
        scopes = ['openid']
        authorities = ['uaa.resource']

        if write:
            for zone in self.service.settings.data['ingest']['zone-token-scopes']:
                scopes.append(zone)
                authorities.append(zone)

        if read:
            for zone in self.service.settings.data['query']['zone-token-scopes']:
                scopes.append(zone)
                authorities.append(zone)

        self.service.uaa.uaac.update_client_grants(client_id, scope=scopes,
                authorities=authorities)

        return self.service.uaa.uaac.get_client(client_id)
235689
def approve(
            self,
            allowed_address: Address,
            allowance: TokenAmount,
    ):
        
        # Note that given_block_identifier is not used here as there
        # are no preconditions to check before sending the transaction

        log_details = {
            'node': pex(self.node_address),
            'contract': pex(self.address),
            'allowed_address': pex(allowed_address),
            'allowance': allowance,
        }

        checking_block = self.client.get_checking_block()
        error_prefix = 'Call to approve will fail'
        gas_limit = self.proxy.estimate_gas(
            checking_block,
            'approve',
            to_checksum_address(allowed_address),
            allowance,
        )

        if gas_limit:
            error_prefix = 'Call to approve failed'
            log.debug('approve called', **log_details)
            transaction_hash = self.proxy.transact(
                'approve',
                safe_gas_limit(gas_limit),
                to_checksum_address(allowed_address),
                allowance,
            )

            self.client.poll(transaction_hash)
            receipt_or_none = check_transaction_threw(self.client, transaction_hash)

        transaction_executed = gas_limit is not None
        if not transaction_executed or receipt_or_none:
            if transaction_executed:
                block = receipt_or_none['blockNumber']
            else:
                block = checking_block

            self.proxy.jsonrpc_client.check_for_insufficient_eth(
                transaction_name='approve',
                transaction_executed=transaction_executed,
                required_gas=GAS_REQUIRED_FOR_APPROVE,
                block_identifier=block,
            )

            msg = self._check_why_approved_failed(allowance, block)
            error_msg = f'{error_prefix}. {msg}'
            log.critical(error_msg, **log_details)
            raise RaidenUnrecoverableError(error_msg)

        log.info('approve successful', **log_details)
1017268
def disbursement_account(account_id)
      options = { account_id: account_id }
      JSON.parse(@client.post("users/#{send(:id)}/disbursement_account", options).body)
      true
    end
507788
def get_account_delta(self, address, token_type, block_id, vtxindex):
        
        cur = self.db.cursor()
        return namedb_get_account_delta(cur, address, token_type, block_id, vtxindex)
20587
def sharing_agreements(self):
        
        if self.api and self.sharing_agreement_ids:
            return self.api._get_sharing_agreements(self.sharing_agreement_ids)
348911
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return IpAddressInstance(
            self._version,
            payload,
            account_sid=self._solution['account_sid'],
            ip_access_control_list_sid=self._solution['ip_access_control_list_sid'],
            sid=self._solution['sid'],
        )
49984
def sharing_agreement_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/sharing_agreements/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
1316034
def account(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/accounts/{0}'.format(str(id))
        return self.__api_request('GET', url)
1303878
def approvecommittee(ctx, members, account):
    
    print_tx(ctx.bitshares.approvecommittee(members, account=account))
683252
def access_token=(token)
      token, scope = token.sub(/^bearer\s+/i, '').split(' ', 2)
      if scope
        warn "[DEPRECATION] (gocardless-ruby) merchant_id is now a separate " +
             "attribute, the manage_merchant scope should no longer be " +
             "included in the 'token' attribute. See http://git.io/G9y37Q " +
             "for more info."
      else
        scope = ''
      end

      @access_token = OAuth2::AccessToken.new(@oauth_client, token)
      @access_token.params['scope'] = scope

      set_merchant_id_from_scope(scope) unless @merchant_id
    end
1008772
def GET_account_record(self, path_info, account_addr, token_type):
        
        if not check_account_address(account_addr):
            return self._reply_json({'error': 'Invalid address'}, status_code=400)

        if not check_token_type(token_type):
            return self._reply_json({'error': 'Invalid token type'}, status_code=400)

        blockstackd_url = get_blockstackd_url()
        res = blockstackd_client.get_account_record(account_addr, token_type, hostport=blockstackd_url)
        if json_is_error(res):
            log.error("Failed to get account state for {} {}: {}".format(account_addr, token_type, res['error']))
            return self._reply_json({'error': 'Failed to get account record for {} {}: {}'.format(token_type, account_addr, res['error'])}, status_code=res.get('http_status', 500))

        self._reply_json(res)
        return
403796
def get_account_item(address, param)
      address = Utils.normalize_address address, allow_blank: true
      return @caches[param][address] if @caches[param].has_key?(address)

      account = get_account address
      v = account.send param
      @caches[param][address] = v
      v
    end
394594
def get_approval_by_id(self, issue_id_or_key, approval_id):
        
        url = 'rest/servicedeskapi/request/{0}/approval/{1}'.format(issue_id_or_key, approval_id)

        return self.get(url, headers=self.experimental_headers)
751429
def _store_account_address(self, address):
        
        address_key = address_prefix + utils.sha3(address)
        self.wb.put(address_key, address)